本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}