コード例 #1
0
 @NotNull
 public String getCaption() {
   return "Current branch in "
       + DvcsUtil.getShortRepositoryName(myRepository)
       + ": "
       + getDisplayableBranchText();
 }
コード例 #2
0
 /**
  * @param currentRepository Pass null in the case of common repositories - none repository will be
  *     highlighted then.
  * @param actionsGroup
  * @param branchText
  */
 public RootAction(
     @NotNull T repository,
     @Nullable T currentRepository,
     @NotNull ActionGroup actionsGroup,
     @NotNull String branchText) {
   super("", true);
   myRepository = repository;
   myGroup = actionsGroup;
   myBranchText = branchText;
   if (repository.equals(currentRepository)) {
     getTemplatePresentation().setIcon(PlatformIcons.CHECK_ICON);
   }
   getTemplatePresentation().setText(DvcsUtil.getShortRepositoryName(repository), false);
 }