From b520ce6d71b7ac306d013bbb3de7f8bdf4bc6178 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sun, 17 Aug 2014 20:41:52 +0400 Subject: [PATCH] [git] formatting --- .../git4idea/ui/branch/GitBranchPopup.java | 45 +++++++------------ 1 file changed, 17 insertions(+), 28 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; /** - *

* The popup which allows to quickly switch and control Git branches. - *

- *

- * Use {@link #asListPopup()} to achieve the {@link ListPopup} itself. - *

- * - * @author Kirill Likhodedov + *

*/ 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.
" + - "If you wish to control branches in different roots separately, you may disable 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.
" + + "If you wish to control branches in different roots separately, " + + "you may disable 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; }