From b36ae98a8c1475af0d33d4f162f8388071db62e5 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Thu, 12 Nov 2009 18:10:06 +0300 Subject: [PATCH] title fixed --- .../ide/actions/QuickSwitchSchemeAction.java | 15 +++++++++++---- .../src/messages/VcsBundle.properties | 1 + .../vcs/actions/VcsQuickListPopupAction.java | 4 ++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ide/actions/QuickSwitchSchemeAction.java b/platform/platform-api/src/com/intellij/ide/actions/QuickSwitchSchemeAction.java index 98cfecd18bf1..3ca1d4ff0df1 100644 --- a/platform/platform-api/src/com/intellij/ide/actions/QuickSwitchSchemeAction.java +++ b/platform/platform-api/src/com/intellij/ide/actions/QuickSwitchSchemeAction.java @@ -42,18 +42,25 @@ public abstract class QuickSwitchSchemeAction extends AnAction implements DumbAw protected abstract void fillActions(Project project, DefaultActionGroup group, DataContext dataContext); - private static void showPopup(AnActionEvent e, DefaultActionGroup group) { + private void showPopup(AnActionEvent e, DefaultActionGroup group) { if (group.getChildrenCount() == 0) return; final ListPopup popup = JBPopupFactory.getInstance() - .createActionGroupPopup(e.getPresentation().getText(), + .createActionGroupPopup(QuickSwitchSchemeAction.this.getPopupTitle(e), group, - e.getDataContext(), - JBPopupFactory.ActionSelectionAid.NUMBERING, + e.getDataContext(), getAidMethod(), true); popup.showCenteredInCurrentWindow(e.getData(PlatformDataKeys.PROJECT)); } + protected JBPopupFactory.ActionSelectionAid getAidMethod() { + return JBPopupFactory.ActionSelectionAid.NUMBERING; + } + + protected String getPopupTitle(AnActionEvent e) { + return e.getPresentation().getText(); + } + public void update(AnActionEvent e) { super.update(e); e.getPresentation().setEnabled(e.getData(PlatformDataKeys.PROJECT) != null && isEnabled()); diff --git a/platform/platform-resources-en/src/messages/VcsBundle.properties b/platform/platform-resources-en/src/messages/VcsBundle.properties index e4e40386ee0f..f097c83195cd 100644 --- a/platform/platform-resources-en/src/messages/VcsBundle.properties +++ b/platform/platform-resources-en/src/messages/VcsBundle.properties @@ -533,4 +533,5 @@ all.vcs.init.message.text=Initializing VCS... switch.to.changelist=Switch &to changelist (''{0}'') move.to.changelist=&Move changes to active changelist (''{0}'') vcs.config.track.changed.on.server=Check "changed on server" conflicts in background +vcs.quicklist.pupup.title=VCS Quick List vcs.quicklist.pupup.section.local.history=Local History diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/VcsQuickListPopupAction.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/VcsQuickListPopupAction.java index 3119f90ad3be..781c28f93db7 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/VcsQuickListPopupAction.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/VcsQuickListPopupAction.java @@ -189,6 +189,10 @@ public class VcsQuickListPopupAction extends QuickSwitchSchemeAction implements toGroup.add(separator); } + protected String getPopupTitle(AnActionEvent e) { + return VcsBundle.message("vcs.quicklist.pupup.title"); + } + public enum SupportedVCS { VCS, NOT_IN_VCS