mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: move "In All Repositories" action group to the top in log menu
This commit is contained in:
@@ -114,18 +114,19 @@ public class GitLogBranchOperationsActionGroup extends ActionGroup implements Du
|
||||
boolean isLocal = ref.getType() == GitRefManager.LOCAL_BRANCH;
|
||||
|
||||
List<AnAction> actions = new ArrayList<>(3);
|
||||
ActionGroup singleRepoActions = createBranchActions(project, Collections.singletonList(repository), ref, repository, isLocal);
|
||||
singleRepoActions.setPopup(false);
|
||||
actions.add(singleRepoActions);
|
||||
|
||||
if (isSyncBranch) {
|
||||
actions.add(Separator.getInstance());
|
||||
ActionGroup allReposActions = createBranchActions(project, allRepositories, ref, repository, isLocal);
|
||||
allReposActions.getTemplatePresentation().setText("In All Repositories");
|
||||
allReposActions.setPopup(true);
|
||||
actions.add(allReposActions);
|
||||
actions.add(Separator.getInstance());
|
||||
}
|
||||
|
||||
ActionGroup singleRepoActions = createBranchActions(project, Collections.singletonList(repository), ref, repository, isLocal);
|
||||
singleRepoActions.setPopup(false);
|
||||
actions.add(singleRepoActions);
|
||||
|
||||
String text = showBranchesPopup ? ref.getName() : "Branch '" + ref.getName() + "'";
|
||||
ActionGroup group = new DefaultActionGroup(actions);
|
||||
group.getTemplatePresentation().setText(text, false);
|
||||
|
||||
Reference in New Issue
Block a user