当前位置: 首页>>代码示例>>Java>>正文


Java BranchActionGroupPopup类代码示例

本文整理汇总了Java中com.intellij.dvcs.ui.BranchActionGroupPopup的典型用法代码示例。如果您正苦于以下问题:Java BranchActionGroupPopup类的具体用法?Java BranchActionGroupPopup怎么用?Java BranchActionGroupPopup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BranchActionGroupPopup类属于com.intellij.dvcs.ui包,在下文中一共展示了BranchActionGroupPopup类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DvcsBranchPopup

import com.intellij.dvcs.ui.BranchActionGroupPopup; //导入依赖的package包/类
protected DvcsBranchPopup(@NotNull Repo currentRepository,
                          @NotNull AbstractRepositoryManager<Repo> repositoryManager,
                          @NotNull DvcsMultiRootBranchConfig<Repo> multiRootBranchConfig,
                          @NotNull DvcsSyncSettings vcsSettings,
                          @NotNull Condition<AnAction> preselectActionCondition) {
  myProject = currentRepository.getProject();
  myCurrentRepository = currentRepository;
  myRepositoryManager = repositoryManager;
  myVcs = currentRepository.getVcs();
  myVcsSettings = vcsSettings;
  myMultiRootBranchConfig = multiRootBranchConfig;
  String title = createPopupTitle(currentRepository);
  myPopup = new BranchActionGroupPopup(title, myProject, preselectActionCondition, createActions());

  initBranchSyncPolicyIfNotInitialized();
  setCurrentBranchInfo();
  warnThatBranchesDivergedIfNeeded();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:DvcsBranchPopup.java

示例2: DvcsBranchPopup

import com.intellij.dvcs.ui.BranchActionGroupPopup; //导入依赖的package包/类
protected DvcsBranchPopup(@Nonnull Repo currentRepository,
                          @Nonnull AbstractRepositoryManager<Repo> repositoryManager,
                          @Nonnull DvcsMultiRootBranchConfig<Repo> multiRootBranchConfig,
                          @Nonnull DvcsSyncSettings vcsSettings,
                          @Nonnull Condition<AnAction> preselectActionCondition,
                          @Nullable String dimensionKey) {
  myProject = currentRepository.getProject();
  myCurrentRepository = currentRepository;
  myRepositoryManager = repositoryManager;
  myVcs = currentRepository.getVcs();
  myVcsSettings = vcsSettings;
  myMultiRootBranchConfig = multiRootBranchConfig;
  String title = myVcs.getDisplayName() + " Branches";
  myRepoTitleInfo = (myRepositoryManager.moreThanOneRoot() && myVcsSettings.getSyncSetting() == DvcsSyncSettings.Value.DONT_SYNC) ? " in " + DvcsUtil.getShortRepositoryName(currentRepository) : "";
  myPopup = new BranchActionGroupPopup(title + myRepoTitleInfo, myProject, preselectActionCondition, createActions(), dimensionKey);

  initBranchSyncPolicyIfNotInitialized();
  setCurrentBranchInfo();
  warnThatBranchesDivergedIfNeeded();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:DvcsBranchPopup.java

示例3: HgBranchPopup

import com.intellij.dvcs.ui.BranchActionGroupPopup; //导入依赖的package包/类
private HgBranchPopup(@NotNull Project project, @NotNull HgRepository currentRepository) {
  myProject = project;
  myCurrentRepository = currentRepository;
  String title = createPopupTitle(currentRepository);

  Condition<AnAction> preselectActionCondition = new Condition<AnAction>() {
    @Override
    public boolean value(AnAction action) {
      return false;
    }
  };
  myPopup = new BranchActionGroupPopup(title, project, preselectActionCondition, createActions());
  setCurrentBranchInfo();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:HgBranchPopup.java

示例4: GitBranchPopup

import com.intellij.dvcs.ui.BranchActionGroupPopup; //导入依赖的package包/类
private GitBranchPopup(@NotNull Project project, @NotNull GitRepository currentRepository) {
  myProject = project;
  myCurrentRepository = currentRepository;
  myRepositoryManager = GitUtil.getRepositoryManager(project);
  myVcs = GitVcs.getInstance(project);
  myVcsSettings = GitVcsSettings.getInstance(myProject);

  myMultiRootBranchConfig = new GitMultiRootBranchConfig(myRepositoryManager.getRepositories());

  String title = createPopupTitle(currentRepository);

  Condition<AnAction> preselectActionCondition = new Condition<AnAction>() {
    @Override
    public boolean value(AnAction action) {
      if (action instanceof GitBranchPopupActions.LocalBranchActions) {
        GitBranchPopupActions.LocalBranchActions branchAction = (GitBranchPopupActions.LocalBranchActions)action;
        String branchName = branchAction.getBranchName();

        String recentBranch;
        List<GitRepository> repositories = branchAction.getRepositories();
        if (repositories.size() == 1) {
          recentBranch = myVcsSettings.getRecentBranchesByRepository().get(repositories.iterator().next().getRoot().getPath());
        }
        else {
          recentBranch = myVcsSettings.getRecentCommonBranch();
        }

        if (recentBranch != null && recentBranch.equals(branchName)) {
          return true;
        }
      }
      return false;
    }
  };

  myPopup = new BranchActionGroupPopup(title, project, preselectActionCondition, createActions());

  initBranchSyncPolicyIfNotInitialized();
  setCurrentBranchInfo();
  warnThatBranchesDivergedIfNeeded();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:42,代码来源:GitBranchPopup.java


注:本文中的com.intellij.dvcs.ui.BranchActionGroupPopup类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。