diff options
Diffstat (limited to 'plugins/git4idea/src/git4idea/ui/branch')
-rw-r--r-- | plugins/git4idea/src/git4idea/ui/branch/GitBranchPopup.java | 45 | ||||
-rw-r--r-- | plugins/git4idea/src/git4idea/ui/branch/GitBranchPopupActions.java | 6 |
2 files changed, 18 insertions, 33 deletions
diff --git a/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopup.java b/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopup.java index bd9c8fb3a1b3..1cb7cf6a66c9 100644 --- a/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopup.java +++ b/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopup.java @@ -45,14 +45,8 @@ import javax.swing.event.HyperlinkEvent; import java.util.List; /** - * <p> * The popup which allows to quickly switch and control Git branches. - * </p> - * <p> - * Use {@link #asListPopup()} to achieve the {@link ListPopup} itself. - * </p> - * - * @author Kirill Likhodedov + * <p/> */ class GitBranchPopup { @@ -160,32 +154,28 @@ class GitBranchPopup { } private void notifyAboutSyncedBranches() { - VcsNotifier.getInstance(myProject).notifyImportantInfo("Synchronous branch control enabled", - "You have several Git roots in the project and they all are checked out at the same branch. " + - "We've enabled synchronous branch control for the project. <br/>" + - "If you wish to control branches in different roots separately, you may <a href='settings'>disable</a> the setting.", - new NotificationListener() { - @Override - public void hyperlinkUpdate(@NotNull Notification notification, - @NotNull HyperlinkEvent event) { - if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { - ShowSettingsUtil.getInstance().showSettingsDialog(myProject, myVcs - .getConfigurable().getDisplayName()); - if (myVcsSettings.getSyncSetting() == GitBranchSyncSetting.DONT) { - notification.expire(); - } - } - } - } - ); + String description = "You have several Git roots in the project and they all are checked out at the same branch. " + + "We've enabled synchronous branch control for the project. <br/>" + + "If you wish to control branches in different roots separately, " + + "you may <a href='settings'>disable</a> the setting."; + NotificationListener listener = new NotificationListener() { + @Override + public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) { + if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + ShowSettingsUtil.getInstance().showSettingsDialog(myProject, myVcs.getConfigurable().getDisplayName()); + if (myVcsSettings.getSyncSetting() == GitBranchSyncSetting.DONT) { + notification.expire(); + } + } + } + }; + VcsNotifier.getInstance(myProject).notifyImportantInfo("Synchronous branch control enabled", description, listener); } private ActionGroup createActions() { DefaultActionGroup popupGroup = new DefaultActionGroup(null, false); - GitRepositoryManager repositoryManager = myRepositoryManager; if (repositoryManager.moreThanOneRoot()) { - if (userWantsSyncControl()) { fillWithCommonRepositoryActions(popupGroup, repositoryManager); } @@ -196,7 +186,6 @@ class GitBranchPopup { else { fillPopupWithCurrentRepositoryActions(popupGroup, null); } - popupGroup.addSeparator(); return popupGroup; } diff --git a/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopupActions.java b/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopupActions.java index dbd3f8c902e5..b3cba24540de 100644 --- a/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopupActions.java +++ b/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopupActions.java @@ -36,10 +36,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -/** - * - * @author Kirill Likhodedov - */ class GitBranchPopupActions { private final Project myProject; @@ -123,7 +119,7 @@ class GitBranchPopupActions { public void update(AnActionEvent e) { if (myRepository.isFresh()) { e.getPresentation().setEnabled(false); - e.getPresentation().setDescription("Checkout is not possible before the first commit."); + e.getPresentation().setDescription("Checkout is not possible before the first commit"); } } } |