make `Presentation.setText(Bundle.message("..."))` dynamic
authorDmitry.Krasilschikov <kradima@jetbrains.com>
Tue, 28 Jan 2020 13:37:58 +0000 (15:37 +0200)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Tue, 28 Jan 2020 14:37:01 +0000 (14:37 +0000)
GitOrigin-RevId: 54426726328063349514b0a0322cb638c398e8a5

93 files changed:
java/debugger/impl/src/com/intellij/debugger/actions/InterruptThreadAction.java
java/debugger/impl/src/com/intellij/debugger/actions/ToggleFieldBreakpointAction.java
java/debugger/impl/src/com/intellij/debugger/actions/ViewTextAction.java
java/idea-ui/src/com/intellij/ide/actions/TemplateProjectStructureAction.java
java/idea-ui/src/com/intellij/openapi/externalSystem/action/AttachExternalProjectAction.java
platform/execution-impl/src/com/intellij/execution/actions/EditRunConfigurationsAction.java
platform/execution-impl/src/com/intellij/execution/actions/RunConfigurationsComboBoxAction.java
platform/execution-impl/src/com/intellij/execution/actions/StopAction.java
platform/execution-impl/src/com/intellij/execution/runners/FakeRerunAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/DetachExternalProjectAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/IgnoreExternalProjectAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/OpenExternalConfigAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/OpenTasksActivationManagerAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/RefreshAllExternalProjectsAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/RefreshExternalProjectAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/ShowExternalSystemSettingsAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java
platform/lang-api/src/com/intellij/execution/ui/actions/CloseAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/AddArrangementRuleAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/AddArrangementSectionRuleAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/EditArrangementRuleAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/EditRuleAliasesDefinitionAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/MoveArrangementGroupingRuleDownAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/MoveArrangementGroupingRuleUpAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/MoveArrangementMatchingRuleDownAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/MoveArrangementMatchingRuleUpAction.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/action/RemoveArrangementRuleAction.java
platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionAction.java
platform/lang-impl/src/com/intellij/execution/dashboard/actions/DebugAction.java
platform/lang-impl/src/com/intellij/execution/dashboard/actions/RemoveRunConfigurationTypeAction.java
platform/lang-impl/src/com/intellij/execution/dashboard/actions/RunAction.java
platform/lang-impl/src/com/intellij/find/impl/FindPopupPanel.java
platform/lang-impl/src/com/intellij/ide/actions/CreateDirectoryOrPackageAction.java
platform/lang-impl/src/com/intellij/ide/bookmarks/actions/ToggleBookmarkAction.java
platform/lang-impl/src/com/intellij/ide/bookmarks/actions/ToggleBookmarkWithMnemonicAction.java
platform/lang-impl/src/com/intellij/ide/favoritesTreeView/actions/FavoritesCompactEmptyMiddlePackagesAction.java
platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyBrowserBaseEx.java
platform/lang-impl/src/com/intellij/ide/hierarchy/actions/BrowseCallHierarchyAction.java
platform/lang-impl/src/com/intellij/ide/hierarchy/actions/BrowseMethodHierarchyAction.java
platform/lang-impl/src/com/intellij/ide/hierarchy/actions/BrowseTypeHierarchyAction.java
platform/lang-impl/src/com/intellij/ide/hierarchy/newAPI/HierarchyBrowserBaseEx.java
platform/lang-impl/src/com/intellij/ide/hierarchy/newAPI/actions/BrowseCallHierarchyAction.java
platform/lang-impl/src/com/intellij/ide/hierarchy/newAPI/actions/BrowseMethodHierarchyAction.java
platform/lang-impl/src/com/intellij/ide/hierarchy/newAPI/actions/BrowseTypeHierarchyAction.java
platform/lang-impl/src/com/intellij/ide/navigationToolbar/ShowNavBarAction.java
platform/lang-impl/src/com/intellij/ide/projectView/actions/UnmarkRootAction.java
platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java
platform/lang-impl/src/com/intellij/ide/todo/TodoView.java
platform/lang-impl/src/com/intellij/lang/customFolding/GotoCustomRegionAction.java
platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/actions/ToggleExcludedStateAction.java
platform/lang-impl/src/com/intellij/psi/templateLanguages/ChangeTemplateDataLanguageAction.java
platform/lang-impl/src/com/intellij/testIntegration/GotoTestOrCodeAction.java
platform/platform-impl/src/com/intellij/designer/LightToolWindow.java
platform/platform-impl/src/com/intellij/ide/actions/CloseAllEditorsAction.java
platform/platform-impl/src/com/intellij/ide/actions/CloseAllEditorsToTheLeftAction.java
platform/platform-impl/src/com/intellij/ide/actions/CloseProjectAction.java
platform/platform-impl/src/com/intellij/ide/actions/CopyPathsAction.java
platform/platform-impl/src/com/intellij/ide/actions/DeleteAction.java
platform/platform-impl/src/com/intellij/ide/actions/RecentProjectsGroup.java
platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java
platform/platform-impl/src/com/intellij/ide/actions/TabNavigationActionBase.java
platform/platform-impl/src/com/intellij/ide/actions/TemplateProjectPropertiesAction.java
platform/platform-impl/src/com/intellij/ide/actions/ToggleReadOnlyAttributeAction.java
platform/platform-impl/src/com/intellij/ide/actions/WhatsNewAction.java
platform/platform-impl/src/com/intellij/ide/ui/customization/CustomizableActionsPanel.java
platform/platform-impl/src/com/intellij/openapi/editor/actions/ToggleUseSoftWrapsMenuAction.java
platform/platform-impl/src/com/intellij/openapi/fileChooser/actions/TogglePathShowingAction.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowHeader.java
platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/tree/actions/AddCloudConnectionActionGroup.java
platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/StructuralSearchDialog.java
platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java
platform/vcs-impl/src/com/intellij/ide/actions/StartUseVcsAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/RestoreShelvedChange.java
platform/vcs-impl/src/com/intellij/openapi/vcs/history/actions/CompareRevisionsAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/history/actions/CreatePatchFromDirectoryAction.java
plugins/ant/src/com/intellij/lang/ant/config/actions/RunTargetAction.java
plugins/ant/src/com/intellij/lang/ant/config/explorer/AntExplorer.java
plugins/devkit/devkit-core/src/build/PrepareAllToDeployAction.java
plugins/devkit/devkit-core/src/build/PrepareToDeployAction.java
plugins/gradle-maven/src/org/jetbrains/plugins/gradle/integrations/maven/codeInsight/actions/AddGradleDslDependencyAction.java
plugins/gradle/java/src/codeInsight/actions/AddGradleDslPluginAction.java
plugins/gradle/src/org/jetbrains/plugins/gradle/action/GradleRefreshProjectDependenciesAction.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRebuildAction.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/project/actions/ToggleIgnoredProjectsAction.java
plugins/svn4idea/src/org/jetbrains/idea/svn/actions/AbstractIntegrateChangesAction.java
plugins/svn4idea/src/org/jetbrains/idea/svn/actions/IgnoreActionGroup.java
plugins/svn4idea/src/org/jetbrains/idea/svn/actions/ShareWholeProject.java
plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/RepositoryBrowserDialog.java
python/src/com/jetbrains/python/console/PythonDebugLanguageConsoleView.java
python/src/com/jetbrains/toolWindowWithActions/PanelWithActions.java
xml/dom-impl/src/com/intellij/util/xml/tree/actions/DeleteDomElement.java
xml/dom-impl/src/com/intellij/util/xml/tree/actions/GotoDomElementDeclarationAction.java

index 99a3516b9f0101b2e7376a002b41c28f607cb712..bc1c062e8a2a16f63f5d5fe292ec0d1cb88bda58 100644 (file)
@@ -92,7 +92,7 @@ public class InterruptThreadAction extends DebuggerAction{
       }
     }
     final Presentation presentation = e.getPresentation();
-    presentation.setText(DebuggerBundle.message("action.interrupt.thread.text"));
+    presentation.setText(() -> DebuggerBundle.message("action.interrupt.thread.text"));
     presentation.setEnabledAndVisible(visible && enabled);
   }
 }
index 01d540b687da4be527d2ecf76aaeb156537aeace..6efd5f03d3bdc911110811d2c0adea618a6850cc 100644 (file)
@@ -92,7 +92,7 @@ public class ToggleFieldBreakpointAction extends AnAction {
       presentation.setVisible(toEnable);
     }
     else if(DebuggerAction.isContextView(event)) {
-      presentation.setText(DebuggerBundle.message("action.add.field.watchpoint.text"));
+      presentation.setText(() -> DebuggerBundle.message("action.add.field.watchpoint.text"));
       Project project = event.getData(CommonDataKeys.PROJECT);
       if(project != null && place != null) {
         Document document = PsiDocumentManager.getInstance(project).getDocument(place.getFile());
index 3a66eb2fc6a16f6c3398d515341a39b55787cf39..1d16cf1362783447bfc0092b8f4a40fad18e1c90 100644 (file)
@@ -59,7 +59,7 @@ public class ViewTextAction extends XFetchValueActionBase {
   public void update(@NotNull AnActionEvent e) {
     super.update(e);
     if (getStringNode(e) != null) {
-      e.getPresentation().setText(ActionsBundle.message("action.Debugger.ViewEditText.text"));
+      e.getPresentation().setText(() -> ActionsBundle.message("action.Debugger.ViewEditText.text"));
     }
   }
 
index cf35f329c21a86b2a6f662ba4a45e036b091abee..e08c1f8f46e7ef176e73eac9257480b35c60d199 100644 (file)
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
 public class TemplateProjectStructureAction extends ShowStructureSettingsAction {
   public TemplateProjectStructureAction() {
     String projectConceptName = StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName());
-    getTemplatePresentation().setText(ActionsBundle.message("action.TemplateProjectStructure.text.template", projectConceptName));
+    getTemplatePresentation().setText(() -> ActionsBundle.message("action.TemplateProjectStructure.text.template", projectConceptName));
     getTemplatePresentation().setDescription(ActionsBundle.message("action.TemplateProjectStructure.description.template", projectConceptName));
   }
 
index 28672b7f104ced5b39d21d52c1522debb64b6450..90ffcd21966366e6530b706661796d549edc8f53 100644 (file)
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull;
 public class AttachExternalProjectAction extends DumbAwareAction {
 
   public AttachExternalProjectAction() {
-    getTemplatePresentation().setText(ExternalSystemBundle.message("action.attach.external.project.text", "External"));
+    getTemplatePresentation().setText(() -> ExternalSystemBundle.message("action.attach.external.project.text", "External"));
     getTemplatePresentation().setDescription(ExternalSystemBundle.message("action.attach.external.project.description", "external"));
   }
 
@@ -34,7 +34,7 @@ public class AttachExternalProjectAction extends DumbAwareAction {
     ProjectSystemId externalSystemId = e.getData(ExternalSystemDataKeys.EXTERNAL_SYSTEM_ID);
     if (externalSystemId != null) {
       String name = externalSystemId.getReadableName();
-      presentation.setText(ExternalSystemBundle.message("action.attach.external.project.text", name));
+      presentation.setText(() -> ExternalSystemBundle.message("action.attach.external.project.text", name));
       presentation.setDescription(ExternalSystemBundle.message("action.attach.external.project.description", name));
     }
 
index cf62f9503b89f12a69e9cd43388d61793a0f7c0c..65bcfcba3ee473fa7be4990077d76cb6f81d9bd4 100644 (file)
@@ -34,7 +34,7 @@ public class EditRunConfigurationsAction extends DumbAwareAction {
     Project project = e.getProject();
     presentation.setEnabled(project == null || !DumbService.isDumb(project));
     if (ActionPlaces.RUN_CONFIGURATIONS_COMBOBOX.equals(e.getPlace())) {
-      presentation.setText(ExecutionBundle.message("edit.configuration.action"));
+      presentation.setText(() -> ExecutionBundle.message("edit.configuration.action"));
       presentation.setDescription(presentation.getText());
     }
   }
index 2c65e9847a28181dba4f1f458c10f10aa7b14065..f87ec7db740dcd8d65ba5289f81f25819dde0c97 100644 (file)
@@ -254,7 +254,7 @@ public class RunConfigurationsComboBoxAction extends ComboBoxAction implements D
         disable(presentation);
       }
       else {
-        presentation.setText(ExecutionBundle.message("save.temporary.run.configuration.action.name", Executor.shortenNameIfNeeded(settings.getName())));
+        presentation.setText(() -> ExecutionBundle.message("save.temporary.run.configuration.action.name", Executor.shortenNameIfNeeded(settings.getName())));
         presentation.setDescription(presentation.getText());
         presentation.setEnabledAndVisible(true);
       }
index 4148681ab4f6f786c39a5d0828077ee04dae301b..df749c4dd05157dafc5bf3a8876650b285f6ca8a 100644 (file)
@@ -57,7 +57,7 @@ public class StopAction extends DumbAwareAction implements AnAction.TransparentU
         icon = IconUtil.addText(icon, String.valueOf(stopCount));
       }
       else if (stopCount == 1) {
-          presentation.setText(ExecutionBundle.message("stop.configuration.action.name",
+          presentation.setText(() -> ExecutionBundle.message("stop.configuration.action.name",
                                                        StringUtil.escapeMnemonics(
                                                          StringUtil.notNullize(stoppableDescriptors.get(0).getDisplayName()))));
       }
@@ -81,7 +81,7 @@ public class StopAction extends DumbAwareAction implements AnAction.TransparentU
         presentation.setText(getTemplatePresentation().getText());
       }
       else {
-        presentation.setText(ExecutionBundle.message("stop.configuration.action.name",
+        presentation.setText(() -> ExecutionBundle.message("stop.configuration.action.name",
                                                      StringUtil.escapeMnemonics(runProfile == null
                                                                                 ? StringUtil.notNullize(contentDescriptor.getDisplayName())
                                                                                 : runProfile.getName())));
index 23052aaf7b834a5249f743653684b23bb08ee2ce..5c42119fc31db789320a4d7d392370012cb35394 100644 (file)
@@ -26,7 +26,7 @@ public class FakeRerunAction extends AnAction  {
     Presentation presentation = event.getPresentation();
     ExecutionEnvironment environment = getEnvironment(event);
     if (environment != null) {
-      presentation.setText(ExecutionBundle.message("rerun.configuration.action.name",
+      presentation.setText(() -> ExecutionBundle.message("rerun.configuration.action.name",
                                                    StringUtil.escapeMnemonics(environment.getRunProfile().getName())));
       presentation.setIcon(
         ActionPlaces.TOUCHBAR_GENERAL.equals(event.getPlace()) || ExecutionManagerImpl.isProcessRunning(getDescriptor(event)) ?
index 47179e990a99cd23d222ee3b8e4be2ae289461b7..1d83bc6c443c79c7427d125f1216fc89366a30cd 100644 (file)
@@ -29,7 +29,7 @@ public class DetachExternalProjectAction extends ExternalSystemNodeAction<Projec
 
   public DetachExternalProjectAction() {
     super(ProjectData.class);
-    getTemplatePresentation().setText(ExternalSystemBundle.message("action.detach.external.project.text", "External"));
+    getTemplatePresentation().setText(() -> ExternalSystemBundle.message("action.detach.external.project.text", "External"));
     getTemplatePresentation().setDescription(ExternalSystemBundle.message("action.detach.external.project.description"));
     getTemplatePresentation().setIcon(AllIcons.General.Remove);
   }
@@ -42,7 +42,7 @@ public class DetachExternalProjectAction extends ExternalSystemNodeAction<Projec
     ProjectSystemId systemId = getSystemId(e);
     final String systemIdName = systemId != null ? systemId.getReadableName() : "External";
     Presentation presentation = e.getPresentation();
-    presentation.setText(ExternalSystemBundle.message("action.detach.external.project.text", systemIdName));
+    presentation.setText(() -> ExternalSystemBundle.message("action.detach.external.project.text", systemIdName));
   }
 
   @Override
@@ -58,7 +58,7 @@ public class DetachExternalProjectAction extends ExternalSystemNodeAction<Projec
                       @NotNull AnActionEvent e) {
 
     e.getPresentation().setText(
-      ExternalSystemBundle.message("action.detach.external.project.text", projectSystemId.getReadableName())
+      () -> ExternalSystemBundle.message("action.detach.external.project.text", projectSystemId.getReadableName())
     );
 
     final ProjectNode projectNode = e.getData(ExternalSystemDataKeys.SELECTED_PROJECT_NODE);
index d6b9720e606aa0c5642dadc7ccc13fa619b3657b..3d35ed3651e0c1ba3425cba713ff403d91af4f81 100644 (file)
@@ -38,7 +38,7 @@ public class IgnoreExternalProjectAction extends ExternalSystemToggleAction {
   private static final Logger LOG = Logger.getInstance(IgnoreExternalProjectAction.class);
 
   public IgnoreExternalProjectAction() {
-    getTemplatePresentation().setText(ExternalSystemBundle.message("action.ignore.external.projects.text", "External", 1));
+    getTemplatePresentation().setText(() -> ExternalSystemBundle.message("action.ignore.external.projects.text", "External", 1));
     getTemplatePresentation()
       .setDescription(ExternalSystemBundle.message("action.ignore.external.projects.description", "external", 1));
   }
index 35d5dfcb6a0cc1c56d1f725cfd95794817aa64b2..f4049ccf65dacc0814c8e510f8cef3d3e3d5ef69 100644 (file)
@@ -19,7 +19,7 @@ public class OpenExternalConfigAction extends ExternalSystemNodeAction<ExternalC
 
   public OpenExternalConfigAction() {
     super(ExternalConfigPathAware.class);
-    getTemplatePresentation().setText(ExternalSystemBundle.message("action.open.config.text", "External"));
+    getTemplatePresentation().setText(() -> ExternalSystemBundle.message("action.open.config.text", "External"));
     getTemplatePresentation().setDescription(ExternalSystemBundle.message("action.open.config.description", "external"));
   }
 
@@ -34,7 +34,7 @@ public class OpenExternalConfigAction extends ExternalSystemNodeAction<ExternalC
     if (config == null) return false;
 
     ProjectSystemId externalSystemId = getSystemId(e);
-    e.getPresentation().setText(ExternalSystemBundle.message("action.open.config.text", externalSystemId.getReadableName()));
+    e.getPresentation().setText(() -> ExternalSystemBundle.message("action.open.config.text", externalSystemId.getReadableName()));
     e.getPresentation().setDescription(ExternalSystemBundle.message("action.open.config.description", externalSystemId.getReadableName()));
     final ExternalSystemUiAware uiAware = getExternalSystemUiAware(e);
     if (uiAware != null) {
index 2961eb623562eeb45beb00be7f7202ad3cdc9706..ac90711b3b2459d6b112dd59764a2896b358fac4 100644 (file)
@@ -25,7 +25,7 @@ public class OpenTasksActivationManagerAction extends ExternalSystemNodeAction<A
 
   public OpenTasksActivationManagerAction() {
     super(AbstractExternalEntityData.class);
-    getTemplatePresentation().setText(ExternalSystemBundle.message("external.system.task.activation.title"));
+    getTemplatePresentation().setText(() -> ExternalSystemBundle.message("external.system.task.activation.title"));
     getTemplatePresentation().setDescription(
       ExternalSystemBundle.message("external.system.task.activation.description", "external system"));
   }
@@ -38,7 +38,7 @@ public class OpenTasksActivationManagerAction extends ExternalSystemNodeAction<A
     final Object externalData = selectedNodes.get(0).getData();
 
     ProjectSystemId projectSystemId = getSystemId(e);
-    e.getPresentation().setText(ExternalSystemBundle.message("external.system.task.activation.title"));
+    e.getPresentation().setText(() -> ExternalSystemBundle.message("external.system.task.activation.title"));
     e.getPresentation().setDescription(
       ExternalSystemBundle.message("external.system.task.activation.description", projectSystemId.getReadableName()));
     final boolean isProjectNode = externalData instanceof ProjectData || externalData instanceof ModuleData;
index 6f1c83b98b92a9078f22b822c4198a108459fcda..62735760322653be224aadcdb3b4cdeeedb578cc 100644 (file)
@@ -30,7 +30,7 @@ import java.util.List;
  */
 public class RefreshAllExternalProjectsAction extends AnAction implements AnAction.TransparentUpdate, DumbAware {
   public RefreshAllExternalProjectsAction() {
-    getTemplatePresentation().setText(ExternalSystemBundle.message("action.refresh.all.projects.text", "External"));
+    getTemplatePresentation().setText(() -> ExternalSystemBundle.message("action.refresh.all.projects.text", "External"));
     getTemplatePresentation().setDescription(ExternalSystemBundle.message("action.refresh.all.projects.description", "external"));
   }
 
@@ -49,7 +49,7 @@ public class RefreshAllExternalProjectsAction extends AnAction implements AnActi
     }
 
     final String name = StringUtil.join(systemIds, projectSystemId -> projectSystemId.getReadableName(), ",");
-    e.getPresentation().setText(ExternalSystemBundle.message("action.refresh.all.projects.text", name));
+    e.getPresentation().setText(() -> ExternalSystemBundle.message("action.refresh.all.projects.text", name));
     e.getPresentation().setDescription(ExternalSystemBundle.message("action.refresh.all.projects.description", name));
 
     ExternalSystemProcessingManager processingManager = ServiceManager.getService(ExternalSystemProcessingManager.class);
index 17e2e95c34a100e0be76461410d2f11f54ebadc6..3a74872084d228752827e6ef51ca0143378adfb1 100644 (file)
@@ -32,7 +32,7 @@ import java.util.List;
 public class RefreshExternalProjectAction extends ExternalSystemNodeAction<AbstractExternalEntityData> implements DumbAware {
   public RefreshExternalProjectAction() {
     super(AbstractExternalEntityData.class);
-    getTemplatePresentation().setText(ExternalSystemBundle.message("action.refresh.project.text", "External"));
+    getTemplatePresentation().setText(() -> ExternalSystemBundle.message("action.refresh.project.text", "External"));
     getTemplatePresentation().setDescription(ExternalSystemBundle.message("action.refresh.project.description", "External"));
   }
 
@@ -45,7 +45,7 @@ public class RefreshExternalProjectAction extends ExternalSystemNodeAction<Abstr
     final String systemIdNameText = systemId != null ? systemId.getReadableName() : "External";
     final String systemIdNameDescription = systemId != null ? systemId.getReadableName() : "external";
     Presentation presentation = e.getPresentation();
-    presentation.setText(ExternalSystemBundle.message("action.refresh.project.text", systemIdNameText));
+    presentation.setText(() -> ExternalSystemBundle.message("action.refresh.project.text", systemIdNameText));
     presentation.setDescription(ExternalSystemBundle.message("action.refresh.project.description", systemIdNameDescription));
   }
 
index fcdcb3aaa0235a036df1ae77bab8a289e2dd3e20..cf626633039931995c9896d8fcd9b2981d6de7c2 100644 (file)
@@ -29,7 +29,7 @@ import org.jetbrains.annotations.NotNull;
 public class ShowExternalSystemSettingsAction extends ExternalSystemAction {
 
   public ShowExternalSystemSettingsAction() {
-    getTemplatePresentation().setText(ExternalSystemBundle.message("action.open.settings.text", "External"));
+    getTemplatePresentation().setText(() -> ExternalSystemBundle.message("action.open.settings.text", "External"));
     getTemplatePresentation().setDescription(ExternalSystemBundle.message("action.open.settings.description", "external"));
   }
 
@@ -40,7 +40,7 @@ public class ShowExternalSystemSettingsAction extends ExternalSystemAction {
     ProjectSystemId systemId = getSystemId(e);
     if (systemId == null) return false;
 
-    e.getPresentation().setText(ExternalSystemBundle.message("action.open.settings.text", systemId.getReadableName()));
+    e.getPresentation().setText(() -> ExternalSystemBundle.message("action.open.settings.text", systemId.getReadableName()));
     e.getPresentation().setDescription(ExternalSystemBundle.message("action.open.settings.description", systemId.getReadableName()));
     return true;
   }
index 106c2b714333cc2813d636e8d5397d1ee1774fa1..1178c20f8eefd7d0d3d57a69bea5617603b2cb93 100644 (file)
@@ -250,7 +250,7 @@ public class ExternalSystemRunConfiguration extends LocatableConfigurationBase i
       Presentation presentation = event.getPresentation();
       ExecutionEnvironment environment = getEnvironment(event);
       if (environment != null) {
-        presentation.setText(ExecutionBundle.message("rerun.configuration.action.name",
+        presentation.setText(() -> ExecutionBundle.message("rerun.configuration.action.name",
                                                      StringUtil.escapeMnemonics(environment.getRunProfile().getName())));
         Icon icon = ExecutionManagerImpl.isProcessRunning(getDescriptor(event))
                     ? AllIcons.Actions.Restart
index c94274204e17edc47bcd6098d5b8b4eac4706a95..5f5d2ab1e7b4e7ef423236bd6f947b8efc7bfe2c 100644 (file)
@@ -448,7 +448,7 @@ public final class ExternalSystemUtil {
                 }
               };
               String systemId = id.getProjectSystemId().getReadableName();
-              rerunImportAction.getTemplatePresentation().setText(ExternalSystemBundle.message("action.refresh.project.text", systemId));
+              rerunImportAction.getTemplatePresentation().setText(() -> ExternalSystemBundle.message("action.refresh.project.text", systemId));
               rerunImportAction.getTemplatePresentation()
                 .setDescription(ExternalSystemBundle.message("action.refresh.project.description", systemId));
               rerunImportAction.getTemplatePresentation().setIcon(AllIcons.Actions.Refresh);
index 279d76119c4cda588ff3d38242c6272c6536d496..c015ac3f1742d5b182e8eb11a6711e4892368631 100644 (file)
@@ -28,7 +28,7 @@ public class CloseAction extends AnAction implements DumbAware {
     ActionUtil.copyFrom(this, IdeActions.ACTION_CLOSE);
     final Presentation templatePresentation = getTemplatePresentation();
     templatePresentation.setIcon(AllIcons.Actions.Cancel);
-    templatePresentation.setText(ExecutionBundle.message("close.tab.action.name"));
+    templatePresentation.setText(() -> ExecutionBundle.message("close.tab.action.name"));
     templatePresentation.setDescription(Presentation.NULL_STRING);
   }
 
index 0d71889e6d8f54353b7e543612d4dba4f8d274cf..6e378c1dc8ef8b24e427a9fb2ad63dfbc8e3d87b 100644 (file)
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.NotNull;
 public class AddArrangementRuleAction extends AbstractArrangementRuleAction implements DumbAware {
   
   public AddArrangementRuleAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.rule.add.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.rule.add.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.rule.add.description"));
     getTemplatePresentation().setIcon(IconUtil.getAddIcon());
     setEnabledInModalContext(true);
index 5e0db6ad637fa9586f88a792312f2eff0591c5e1..5dfb991e046930ed7505395da2e26f3e80add4c3 100644 (file)
@@ -29,7 +29,7 @@ import org.jetbrains.annotations.NotNull;
 public class AddArrangementSectionRuleAction extends AddArrangementRuleAction {
 
   public AddArrangementSectionRuleAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.section.rule.add.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.section.rule.add.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.section.rule.add.description"));
     getTemplatePresentation().setIcon(AllIcons.CodeStyle.AddNewSectionRule);
   }
index d530384dcfcc97b8b4856d6870ebd6803849de9c..8f16fa83e2a307701032387b265af2628070d9aa 100644 (file)
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.NotNull;
 public class EditArrangementRuleAction extends AbstractArrangementRuleAction implements DumbAware, Toggleable {
 
   public EditArrangementRuleAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.rule.edit.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.rule.edit.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.rule.edit.description"));
     getTemplatePresentation().setIcon(IconUtil.getEditIcon());
     setEnabledInModalContext(true);
index afa374758c64d347ad4b1ff311e54625b3174813..b891d8202797bd00f86ea6272c84ab5b748e7272 100644 (file)
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.NotNull;
 public class EditRuleAliasesDefinitionAction extends AnAction {
 
   public EditRuleAliasesDefinitionAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.alias.rule.add.edit.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.alias.rule.add.edit.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.alias.rule.add.edit.description"));
     getTemplatePresentation().setIcon(AllIcons.General.GearPlain);
   }
index 7229fa9607201ef9761aec038ea09ec3fb49494f..0cbcc28dbfa7729b0fa00708d3368a27ebb26659 100644 (file)
@@ -17,7 +17,7 @@ import javax.swing.table.DefaultTableModel;
 public class MoveArrangementGroupingRuleDownAction extends AnAction implements DumbAware {
 
   public MoveArrangementGroupingRuleDownAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.rule.move.down.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.rule.move.down.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.rule.move.down.description"));
     getTemplatePresentation().setIcon(IconUtil.getMoveDownIcon());
   }
index 620cc9dbd9ac5db3118af7494352ff0b3dd98612..d91f7a391f8dc1c0f6113bdfcd111e40a8efd7d6 100644 (file)
@@ -17,7 +17,7 @@ import javax.swing.table.DefaultTableModel;
 public class MoveArrangementGroupingRuleUpAction extends AnAction implements DumbAware {
 
   public MoveArrangementGroupingRuleUpAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.rule.move.up.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.rule.move.up.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.rule.move.up.description"));
     getTemplatePresentation().setIcon(IconUtil.getMoveUpIcon());
   }
index d48507d128a9afed5acaa8005008851bd338c48a..0f5af72e66fe14856c0a690847b54fb73aea4d8f 100644 (file)
@@ -29,7 +29,7 @@ import java.util.List;
 public class MoveArrangementMatchingRuleDownAction extends AbstractMoveArrangementRuleAction {
 
   public MoveArrangementMatchingRuleDownAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.rule.move.down.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.rule.move.down.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.rule.move.down.description"));
     getTemplatePresentation().setIcon(IconUtil.getMoveDownIcon());
     setEnabledInModalContext(true);
index a2c3412671f5cc4ab4a9f05e2e0095957eada035..676eb4a64334e0853492006a346e2418a9331166 100644 (file)
@@ -29,7 +29,7 @@ import java.util.List;
 public class MoveArrangementMatchingRuleUpAction extends AbstractMoveArrangementRuleAction {
 
   public MoveArrangementMatchingRuleUpAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.rule.move.up.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.rule.move.up.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.rule.move.up.description"));
     getTemplatePresentation().setIcon(IconUtil.getMoveUpIcon());
     setEnabledInModalContext(true);
index 531981a68aecd42cafb387294decacadc9e4ea3a..72cf8ca71c107f827075a3b456cb1935f561472c 100644 (file)
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.NotNull;
 public class RemoveArrangementRuleAction extends AbstractArrangementRuleAction implements DumbAware {
 
   public RemoveArrangementRuleAction() {
-    getTemplatePresentation().setText(ApplicationBundle.message("arrangement.action.rule.remove.text"));
+    getTemplatePresentation().setText(() -> ApplicationBundle.message("arrangement.action.rule.remove.text"));
     getTemplatePresentation().setDescription(ApplicationBundle.message("arrangement.action.rule.remove.description"));
     getTemplatePresentation().setIcon(IconUtil.getRemoveIcon());
     setEnabledInModalContext(true);
index ad7a6c4e56f5248b1012490e691e38af8987aa20..f451e1f5b67738906dbfc00fdb4da9c1a0b57538 100644 (file)
@@ -64,7 +64,7 @@ public class RunInspectionAction extends GotoActionBase implements DataProvider
 
   public RunInspectionAction(String predefinedText) {
     myPredefinedText = predefinedText;
-    getTemplatePresentation().setText(IdeBundle.message("goto.inspection.action.text"));
+    getTemplatePresentation().setText(() -> IdeBundle.message("goto.inspection.action.text"));
   }
 
   @Override
index ea05154411a1150d81e18720a0c8c7240bd3151e..3fbf01a187d6ba522275983dab1f432678d5d75a 100644 (file)
@@ -37,12 +37,12 @@ public class DebugAction extends ExecutorAction {
   protected void update(@NotNull AnActionEvent e, boolean running) {
     Presentation presentation = e.getPresentation();
     if (running) {
-      presentation.setText(ExecutionBundle.message("run.dashboard.restart.debugger.action.name"));
+      presentation.setText(() -> ExecutionBundle.message("run.dashboard.restart.debugger.action.name"));
       presentation.setDescription(ExecutionBundle.message("run.dashboard.restart.debugger.action.description"));
       presentation.setIcon(AllIcons.Actions.RestartDebugger);
     }
     else {
-      presentation.setText(ExecutionBundle.message("run.dashboard.debug.action.name"));
+      presentation.setText(() -> ExecutionBundle.message("run.dashboard.debug.action.name"));
       presentation.setDescription(ExecutionBundle.message("run.dashboard.debug.action.description"));
       presentation.setIcon(AllIcons.Actions.StartDebugger);
     }
index 1516dc5b91487f68c1f0b1f0a38ee2b97335a3cd..322c184e9567c71690825cc4bbabed62117026e4 100644 (file)
@@ -28,7 +28,7 @@ public class RemoveRunConfigurationTypeAction extends DumbAwareAction {
 
     Presentation presentation = e.getPresentation();
     presentation.setEnabledAndVisible(true);
-    presentation.setText(ExecutionBundle.message("run.dashboard.remove.run.configuration.type.action.name",
+    presentation.setText(() -> ExecutionBundle.message("run.dashboard.remove.run.configuration.type.action.name",
                                                  "Configuration " + StringUtil.pluralize("Type", types.size())));
   }
 
index 946253262a91fc41aa5688bc3d0815006d26576d..ef04c92d61785cb200bfab9a3bb0dc5dadd86aed 100644 (file)
@@ -36,12 +36,12 @@ public class RunAction extends ExecutorAction {
   protected void update(@NotNull AnActionEvent e, boolean running) {
     Presentation presentation = e.getPresentation();
     if (running) {
-      presentation.setText(ExecutionBundle.message("run.dashboard.rerun.action.name"));
+      presentation.setText(() -> ExecutionBundle.message("run.dashboard.rerun.action.name"));
       presentation.setDescription(ExecutionBundle.message("run.dashboard.rerun.action.description"));
       presentation.setIcon(AllIcons.Actions.Restart);
     }
     else {
-      presentation.setText(ExecutionBundle.message("run.dashboard.run.action.name"));
+      presentation.setText(() -> ExecutionBundle.message("run.dashboard.run.action.name"));
       presentation.setDescription(ExecutionBundle.message("run.dashboard.run.action.description"));
       presentation.setIcon(AllIcons.Actions.Execute);
     }
index 9fa8c12a2d9e8bb551ad07b1442ff5a45f84a947..1ad8f03dfbf5442084d5381db852873a6312a246 100644 (file)
@@ -521,7 +521,7 @@ public class FindPopupPanel extends JBPanel<FindPopupPanel> implements FindUI {
 
     DefaultActionGroup tabOptionsGroup = new DefaultActionGroup() {{
       Presentation presentation = getTemplatePresentation();
-      presentation.setText(FindBundle.message("find.popup.show.tab.options"));
+      presentation.setText(() -> FindBundle.message("find.popup.show.tab.options"));
       presentation.setIcon(AllIcons.General.GearPlain);
       setPopup(true);
       setShortcutSet(CustomShortcutSet.fromString("alt ctrl DOWN"));
index e65a4b633f79aa66ac296e41f2ce2dccb233ba20..7f55aa64e9707159ef536a14ec9e486d56c2fdb0 100644 (file)
@@ -142,11 +142,11 @@ public class CreateDirectoryOrPackageAction extends AnAction implements DumbAwar
     }
 
     if (isPackage) {
-      presentation.setText(IdeBundle.message("action.package"));
+      presentation.setText(() -> IdeBundle.message("action.package"));
       presentation.setIcon(PlatformIcons.PACKAGE_ICON);
     }
     else {
-      presentation.setText(IdeBundle.message("action.directory"));
+      presentation.setText(() -> IdeBundle.message("action.directory"));
       presentation.setIcon(PlatformIcons.FOLDER_ICON);
     }
   }
index e014e6c74e49e71d2807ba3da87f2ff0cde17e38..b426302be1f6fd894688373c3010c77062ff4fdf 100644 (file)
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
 
 public class ToggleBookmarkAction extends BookmarksAction implements DumbAware, Toggleable {
   public ToggleBookmarkAction() {
-    getTemplatePresentation().setText(IdeBundle.message("action.bookmark.toggle"));
+    getTemplatePresentation().setText(() -> IdeBundle.message("action.bookmark.toggle"));
   }
 
   @Override
@@ -32,7 +32,7 @@ public class ToggleBookmarkAction extends BookmarksAction implements DumbAware,
       event.getPresentation().setText(selected ? "Clear Bookmark" : "Set Bookmark");
     }
     else {
-      event.getPresentation().setText(IdeBundle.message("action.bookmark.toggle"));
+      event.getPresentation().setText(() -> IdeBundle.message("action.bookmark.toggle"));
       Toggleable.setSelected(event.getPresentation(), selected);
     }
   }
index 7e798f06d0af125d31b862e727bb571b41367857..317440340c1ce05dc46905aa6a60acbfd5480f86 100644 (file)
@@ -24,7 +24,7 @@ public class ToggleBookmarkWithMnemonicAction extends ToggleBookmarkAction {
   private boolean myPopupShown;
 
   public ToggleBookmarkWithMnemonicAction() {
-    getTemplatePresentation().setText(IdeBundle.message("action.bookmark.toggle.mnemonic"));
+    getTemplatePresentation().setText(() -> IdeBundle.message("action.bookmark.toggle.mnemonic"));
   }
 
   @Override
@@ -42,7 +42,7 @@ public class ToggleBookmarkWithMnemonicAction extends ToggleBookmarkAction {
       }
     }
     else {
-      e.getPresentation().setText(IdeBundle.message("action.bookmark.toggle.mnemonic"));
+      e.getPresentation().setText(() -> IdeBundle.message("action.bookmark.toggle.mnemonic"));
     }
   }
 
index 7e94131cd624852ed49f791e242117f34462a39b..74d5a4a9ae1dd141ca5323be08c7450d51a79f75 100644 (file)
@@ -25,11 +25,11 @@ public class FavoritesCompactEmptyMiddlePackagesAction extends FavoritesToolbarB
     Presentation presentation = e.getPresentation();
     // see com.intellij.ide.projectView.impl.ProjectViewImpl.HideEmptyMiddlePackagesAction.update
     if (getViewSettings().isFlattenPackages()) {
-      presentation.setText(IdeBundle.message("action.hide.empty.middle.packages"));
+      presentation.setText(() -> IdeBundle.message("action.hide.empty.middle.packages"));
       presentation.setDescription(IdeBundle.message("action.show.hide.empty.middle.packages"));
     }
     else {
-      presentation.setText(IdeBundle.message("action.compact.empty.middle.packages"));
+      presentation.setText(() -> IdeBundle.message("action.compact.empty.middle.packages"));
       presentation.setDescription(IdeBundle.message("action.show.compact.empty.middle.packages"));
     }
 
index 018942ef12fad95604ad3ac01461c3a38492bdba..72d0843d57a6ab682f693b8409a00eba85660766 100644 (file)
@@ -684,7 +684,7 @@ public abstract class HierarchyBrowserBaseEx extends HierarchyBrowserBase implem
       else {
         String typeName = ElementDescriptionUtil.getElementDescription(selectedElement, UsageViewTypeLocation.INSTANCE);
         if (StringUtil.isNotEmpty(typeName)) {
-          presentation.setText(IdeBundle.message("action.base.on.this.0", StringUtil.capitalize(typeName)));
+          presentation.setText(() -> IdeBundle.message("action.base.on.this.0", StringUtil.capitalize(typeName)));
         }
         presentation.setEnabled(isEnabled(browser, selectedElement));
       }
index 600ea61ac70b28fe93e527d9421237f1f5db5223..f824b7dcab1bd7064e78f075b4c369932cd90645 100644 (file)
@@ -36,7 +36,7 @@ public final class BrowseCallHierarchyAction extends BrowseHierarchyActionBase {
   public final void update(@NotNull final AnActionEvent event){
     final Presentation presentation = event.getPresentation();
     if (!ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) {
-      presentation.setText(IdeBundle.message("action.browse.call.hierarchy"));
+      presentation.setText(() -> IdeBundle.message("action.browse.call.hierarchy"));
     }
 
     super.update(event);
index acee8eca12a885aa834ac0a7fa7f31a5ede5b066..f4b73b637b62ce00d10e3d57afff2743ada78bad 100644 (file)
@@ -36,7 +36,7 @@ public final class BrowseMethodHierarchyAction extends BrowseHierarchyActionBase
   public final void update(@NotNull final AnActionEvent event){
     final Presentation presentation = event.getPresentation();
     if (!ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) {
-      presentation.setText(IdeBundle.message("action.browse.method.hierarchy"));
+      presentation.setText(() -> IdeBundle.message("action.browse.method.hierarchy"));
     }
     super.update(event);
   }
index 424420a04845cd168bc435f1abf6c6327a4edfe4..da2124b98f684d3593c417b574b2ec4ef51caf76 100644 (file)
@@ -36,7 +36,7 @@ public final class BrowseTypeHierarchyAction extends BrowseHierarchyActionBase {
   public final void update(@NotNull final AnActionEvent event){
     final Presentation presentation = event.getPresentation();
     if (!ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) {
-      presentation.setText(IdeBundle.message("action.browse.type.hierarchy"));
+      presentation.setText(() -> IdeBundle.message("action.browse.type.hierarchy"));
     }
     super.update(event);
   }
index e8c247243b796217ef906fc122899cc98ea5ec24..bcaa17d86b8a452272c99b85334ebefe94d84132 100644 (file)
@@ -683,7 +683,7 @@ public abstract class HierarchyBrowserBaseEx extends HierarchyBrowserBase implem
       else {
         String typeName = ElementDescriptionUtil.getElementDescription(selectedElement, UsageViewTypeLocation.INSTANCE);
         if (StringUtil.isNotEmpty(typeName)) {
-          presentation.setText(IdeBundle.message("action.base.on.this.0", StringUtil.capitalize(typeName)));
+          presentation.setText(() -> IdeBundle.message("action.base.on.this.0", StringUtil.capitalize(typeName)));
         }
         presentation.setEnabled(isEnabled(browser, selectedElement));
       }
index 6f7c39694e19a5053264f8ad226041fc4c481653..b00571ddea76c77093e89c371caa0f2e886b9ed6 100644 (file)
@@ -18,7 +18,7 @@ public final class BrowseCallHierarchyAction extends BrowseHierarchyActionBase {
   public final void update(@NotNull final AnActionEvent event){
     final Presentation presentation = event.getPresentation();
     if (!ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) {
-      presentation.setText(IdeBundle.message("action.browse.call.hierarchy"));
+      presentation.setText(() -> IdeBundle.message("action.browse.call.hierarchy"));
     }
 
     super.update(event);
index 1b66cb6730add83a53414cfb7626df85e3bfe7dc..3bc84035e57cf15f813b9ad2e9c1009390de0082 100644 (file)
@@ -18,7 +18,7 @@ public final class BrowseMethodHierarchyAction extends BrowseHierarchyActionBase
   public final void update(@NotNull final AnActionEvent event){
     final Presentation presentation = event.getPresentation();
     if (!ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) {
-      presentation.setText(IdeBundle.message("action.browse.method.hierarchy"));
+      presentation.setText(() -> IdeBundle.message("action.browse.method.hierarchy"));
     }
     super.update(event);
   }
index bbc1e1fe0cbd0d972ca92ffd2ce31c5e31107652..45d429e1d7f7217e7e7e2997957cae09d9297109 100644 (file)
@@ -18,7 +18,7 @@ public final class BrowseTypeHierarchyAction extends BrowseHierarchyActionBase {
   public final void update(@NotNull final AnActionEvent event){
     final Presentation presentation = event.getPresentation();
     if (!ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) {
-      presentation.setText(IdeBundle.message("action.browse.type.hierarchy"));
+      presentation.setText(() -> IdeBundle.message("action.browse.type.hierarchy"));
     }
     super.update(event);
   }
index 9698ab3fcd520c8af5099ce43ec81684f399614b..a524a91af52665bc0aa342527c05e7a6b9f0062b 100644 (file)
@@ -50,7 +50,7 @@ public class ShowNavBarAction extends AnAction implements DumbAware, PopupAction
 
     // see RIDER-15982
     if (!ActionPlaces.isMainMenuOrActionSearch(e.getPlace())) {
-      e.getPresentation().setText(ActionsBundle.message("action.ShowNavBar.ShortText"));
+      e.getPresentation().setText(() -> ActionsBundle.message("action.ShowNavBar.ShortText"));
     }
   }
 }
index 57bef2f60198492da046abed26a02e783d88a445..bad1cdac9258557b9b65a6e954115d4ab5729c37 100644 (file)
@@ -27,7 +27,7 @@ public class UnmarkRootAction extends MarkRootActionBase {
     if (!Registry.is("ide.hide.excluded.files") && !selection.mySelectedExcludeRoots.isEmpty()
         && selection.mySelectedDirectories.isEmpty() && selection.mySelectedRoots.isEmpty()) {
       e.getPresentation().setEnabledAndVisible(true);
-      e.getPresentation().setText(LangBundle.message("mark.as.unmark.excluded"));
+      e.getPresentation().setText(() -> LangBundle.message("mark.as.unmark.excluded"));
       return;
     }
 
index 0dd82916c4e7af6f1010c93ef9396f0063b1f934..f3f7f993b8b62575d67f897cfcbc12c5adb5ff10 100644 (file)
@@ -125,7 +125,7 @@ abstract class TodoPanel extends SimpleToolWindowPanel implements OccurenceNavig
     public static class GroupByActionGroup extends DefaultActionGroup {
     {
       getTemplatePresentation().setIcon(AllIcons.Actions.GroupBy);
-      getTemplatePresentation().setText(IdeBundle.message("group.group.by"));
+      getTemplatePresentation().setText(() -> IdeBundle.message("group.group.by"));
       setPopup(true);
     }
 
index fae0d16ebcfd2179a2bdc100ddea788a6219fda0..b6cfca30956f4d1a6869d89a43d1e3cbcf8114ac 100644 (file)
@@ -159,7 +159,7 @@ public class TodoView implements PersistentStateComponent<TodoView.State>, Dispo
     if (toolWindow instanceof ToolWindowEx) {
       DefaultActionGroup group = new DefaultActionGroup() {
         {
-          getTemplatePresentation().setText(IdeBundle.message("group.view.options"));
+          getTemplatePresentation().setText(() -> IdeBundle.message("group.view.options"));
           setPopup(true);
           add(myAllTodos.createAutoScrollToSourceAction());
           addSeparator();
index 51b1f4926ba6047c88e34db889cbdc939aa92b1c..936bc9eec4a2b98c0dca2b0605a66424138cf1a3 100644 (file)
@@ -61,7 +61,7 @@ public class GotoCustomRegionAction extends AnAction implements DumbAware, Popup
   @Override
   public void update(@NotNull AnActionEvent e) {
     Presentation presentation = e.getPresentation();
-    presentation.setText(IdeBundle.message("goto.custom.region.menu.item"));
+    presentation.setText(() -> IdeBundle.message("goto.custom.region.menu.item"));
     final Editor editor = e.getData(CommonDataKeys.EDITOR);
     final Project project = e.getProject();
     boolean isAvailable = editor != null && project != null;
index 22444f5bac00f305a1aa1f456dd5e6033c46e3df..f778fe4a38cecf2b4ad7959b8f98f6ff99c500ad 100644 (file)
@@ -37,7 +37,7 @@ public class ToggleExcludedStateAction extends ContentEntryEditingAction {
     super(tree);
     myEntryTreeEditor = entryEditor;
     final Presentation templatePresentation = getTemplatePresentation();
-    templatePresentation.setText(ProjectBundle.message("module.toggle.excluded.action"));
+    templatePresentation.setText(() -> ProjectBundle.message("module.toggle.excluded.action"));
     templatePresentation.setDescription(ProjectBundle.message("module.toggle.excluded.action.description"));
     templatePresentation.setIcon(AllIcons.Modules.ExcludeRoot);
   }
@@ -72,6 +72,6 @@ public class ToggleExcludedStateAction extends ContentEntryEditingAction {
   public void update(@NotNull final AnActionEvent e) {
     super.update(e);
     final Presentation presentation = e.getPresentation();
-    presentation.setText(ProjectBundle.message("module.toggle.excluded.action"));
+    presentation.setText(() -> ProjectBundle.message("module.toggle.excluded.action"));
   }
 }
index da5ec33aa463ce09ec5e08064a99f7326426b8b8..77f4ce29f043f8c79ddda6dea9536fddac8360ca 100644 (file)
@@ -35,7 +35,7 @@ public class ChangeTemplateDataLanguageAction extends AnAction {
     if (provider instanceof ConfigurableTemplateLanguageFileViewProvider) {
       final TemplateLanguageFileViewProvider viewProvider = (TemplateLanguageFileViewProvider)provider;
 
-      e.getPresentation().setText(LangBundle.message("quickfix.change.template.data.language.text", viewProvider.getTemplateDataLanguage().getDisplayName()));
+      e.getPresentation().setText(() -> LangBundle.message("quickfix.change.template.data.language.text", viewProvider.getTemplateDataLanguage().getDisplayName()));
       e.getPresentation().setEnabledAndVisible(true);
     }
 
index 2d6fb8c23060002e4db66c28445aaf90807ce4bd..be7bcd3b00b79554cb4f7c6e94f11cefc9457db8 100644 (file)
@@ -43,10 +43,10 @@ public class GotoTestOrCodeAction extends BaseCodeInsightAction {
 
     presentation.setEnabledAndVisible(true);
     if (TestFinderHelper.isTest(element)) {
-      presentation.setText(ActionsBundle.message("action.GotoTestSubject.text"));
+      presentation.setText(() -> ActionsBundle.message("action.GotoTestSubject.text"));
       presentation.setDescription(ActionsBundle.message("action.GotoTestSubject.description"));
     } else {
-      presentation.setText(ActionsBundle.message("action.GotoTest.text"));
+      presentation.setText(() -> ActionsBundle.message("action.GotoTest.text"));
       presentation.setDescription(ActionsBundle.message("action.GotoTest.description"));
     }
   }
index f8feecebcda3d1166ad79d265f0a4401b00fa3e3..df1aca99476e4cc8e916e84904e58e889c9950e8 100644 (file)
@@ -365,7 +365,7 @@ public class LightToolWindow extends JPanel {
   private class HideAction extends AnAction {
     HideAction() {
       Presentation presentation = getTemplatePresentation();
-      presentation.setText(UIBundle.message("tool.window.hide.action.name"));
+      presentation.setText(() -> UIBundle.message("tool.window.hide.action.name"));
       presentation.setIcon(AllIcons.General.HideToolWindow);
     }
 
index 77534e3a18a95353daf994c2eb0d0e5f32242258..69f6f333e6589b82b6d97a24939026f1a60d290b 100644 (file)
@@ -46,10 +46,10 @@ public class CloseAllEditorsAction extends AnAction implements DumbAware {
     Presentation presentation = event.getPresentation();
     final EditorWindow editorWindow = event.getData(EditorWindow.DATA_KEY);
     if (editorWindow != null && editorWindow.inSplitter()) {
-      presentation.setText(IdeBundle.message("action.close.all.editors.in.tab.group"));
+      presentation.setText(() -> IdeBundle.message("action.close.all.editors.in.tab.group"));
     }
     else {
-      presentation.setText(IdeBundle.message("action.close.all.editors"));
+      presentation.setText(() -> IdeBundle.message("action.close.all.editors"));
     }
     Project project = event.getData(CommonDataKeys.PROJECT);
     if (project == null) {
index d48bd7a739428ee296077478297ee07d8c3df0c5..c9a2cedfb7a5935ada328bd3d1286e36522efcfa 100644 (file)
@@ -45,7 +45,7 @@ public class CloseAllEditorsToTheLeftAction extends CloseEditorsActionBase {
     super.update(event);
     int tabPlacement = UISettings.getInstance().getEditorTabPlacement();
     if (tabPlacement == SwingConstants.LEFT || tabPlacement == SwingConstants.RIGHT) {
-      event.getPresentation().setText(IdeBundle.message(getAlternativeTextKey()));
+      event.getPresentation().setText(() -> IdeBundle.message(getAlternativeTextKey()));
     }
   }
 
index 3b23167b8b0d22e4b7f297fed70f4ceae49cbee3..063596e3051c42de958d7fe384de8430c7c1b795 100644 (file)
@@ -43,7 +43,7 @@ public final class CloseProjectAction extends AnAction implements DumbAware {
     Project project = event.getData(CommonDataKeys.PROJECT);
     presentation.setEnabled(project != null);
     if (ProjectAttachProcessor.canAttachToProject() && project != null && ModuleManager.getInstance(project).getModules().length > 1) {
-      presentation.setText(IdeBundle.message("action.close.projects.in.current.window"));
+      presentation.setText(() -> IdeBundle.message("action.close.projects.in.current.window"));
     }
     else {
       presentation.setText(IdeUICustomization.getInstance().getCloseProjectActionText());
index 8b2d5ccd7d4fc3eb912721da01eecd6c101ac2bd..e2ff2205075812089075f29decb36f2390ebc499 100644 (file)
@@ -48,7 +48,7 @@ public class CopyPathsAction extends AnAction implements DumbAware {
     Presentation presentation = event.getPresentation();
     presentation.setEnabled(num > 0);
     presentation.setVisible(num > 0 || !ActionPlaces.isPopupPlace(event.getPlace()));
-    presentation.setText(IdeBundle.message(num == 1 ? "action.copy.path" : "action.copy.paths"));
+    presentation.setText(() -> IdeBundle.message(num == 1 ? "action.copy.path" : "action.copy.paths"));
   }
 
   public static boolean isCopyReferencePopupAvailable() {
index d7b7fa332aa460e304e7c498b6a0efdda07f3f44..b9286a59f112d41c9e4007c988a1405aa3006c4a 100644 (file)
@@ -49,10 +49,10 @@ public class DeleteAction extends AnAction implements DumbAware {
     Presentation presentation = e.getPresentation();
 
     if (ActionPlaces.isPopupPlace(e.getPlace())) {
-      presentation.setText(IdeBundle.message("action.delete.ellipsis"));
+      presentation.setText(() -> IdeBundle.message("action.delete.ellipsis"));
     }
     else {
-      presentation.setText(IdeBundle.message("action.delete"));
+      presentation.setText(() -> IdeBundle.message("action.delete"));
     }
     if (e.isFromActionToolbar() && e.getPresentation().getIcon() == null) {
       e.getPresentation().setIcon(IconUtil.getRemoveIcon());
index 79a8ab32d789f280b056b67e848f0247aeba2b42..9a5691ab30f310b00ad7957574077bef150ae2f3 100644 (file)
@@ -21,7 +21,7 @@ import java.util.List;
 public class RecentProjectsGroup extends ActionGroup implements DumbAware {
   public RecentProjectsGroup() {
     Presentation presentation = getTemplatePresentation();
-    presentation.setText(ActionsBundle.message(SystemInfo.isMac ? "group.reopen.mac.text" : "group.reopen.win.text"));
+    presentation.setText(() -> ActionsBundle.message(SystemInfo.isMac ? "group.reopen.mac.text" : "group.reopen.win.text"));
   }
 
   @Override
index 539498955c6f2df12d392ca9c7e3add7f7d4d88c..df3a457eef6ada137df475a7db57e6b83694377c 100644 (file)
@@ -45,7 +45,7 @@ public class ShowFilePathAction extends DumbAwareAction {
     if (visible) {
       VirtualFile file = getFile(e);
       e.getPresentation().setEnabled(file != null);
-      e.getPresentation().setText(ActionsBundle.message(file != null && file.isDirectory() ? "action.ShowFilePath.directory" : "action.ShowFilePath.file"));
+      e.getPresentation().setText(() -> ActionsBundle.message(file != null && file.isDirectory() ? "action.ShowFilePath.directory" : "action.ShowFilePath.file"));
     }
   }
 
index d226b88265ffb62a3942bd2327992b47521ae267..701be9f943fe8d7f7508996f4f1c865672a6c06a 100644 (file)
@@ -147,10 +147,10 @@ abstract class TabNavigationActionBase extends AnAction implements DumbAware {
     protected GoToTabAction(@NotNull NavigationType navigationType) {
       super(navigationType);
       if (navigationType == NavigationType.LAST) {
-        getTemplatePresentation().setText(ActionsBundle.message("action.GoToLastTab.text"));
+        getTemplatePresentation().setText(() -> ActionsBundle.message("action.GoToLastTab.text"));
         getTemplatePresentation().setDescription(ActionsBundle.message("action.GoToLastTab.description"));
       } else {
-        getTemplatePresentation().setText(ActionsBundle.message("action.GoToTab.text", navigationType.ordinal() + 1));
+        getTemplatePresentation().setText(() -> ActionsBundle.message("action.GoToTab.text", navigationType.ordinal() + 1));
         getTemplatePresentation().setDescription(ActionsBundle.message("action.GoToTab.description", navigationType.ordinal() + 1));
       }
     }
index a077e58d65fcdd3f5461d4afccbe98244b3d1ccb..37bc63d86b127241d46b07c5c0bcaa574c43abec 100644 (file)
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.NotNull;
 public class TemplateProjectPropertiesAction extends AnAction implements DumbAware {
   public TemplateProjectPropertiesAction() {
     String projectConceptName = StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName());
-    getTemplatePresentation().setText(ActionsBundle.message("action.TemplateProjectProperties.text.template", CommonBundle.settingsTitle(), projectConceptName));
+    getTemplatePresentation().setText(() -> ActionsBundle.message("action.TemplateProjectProperties.text.template", CommonBundle.settingsTitle(), projectConceptName));
     getTemplatePresentation().setDescription(ActionsBundle.message("action.TemplateProjectProperties.description.template", projectConceptName));
   }
 
index 62e24661255a093da49ad257d2514fc8eac982fa..c3f871df4fc420bdf098b41604371af138527a8d 100644 (file)
@@ -45,17 +45,21 @@ public class ToggleReadOnlyAttributeAction extends AnAction implements DumbAware
         if (file.isWritable()) ++rw; else ++ro;
         if (file.isDirectory()) ++d; else ++f;
       }
+      int finalRo = ro;
+      int finalRw = rw;
+      int finalF = f;
+      int finalD = d;
       if (ro > 0 && rw > 0) {
-        e.getPresentation().setText(ActionsBundle.message("action.ToggleReadOnlyAttribute.text"));
+        e.getPresentation().setText(() -> ActionsBundle.message("action.ToggleReadOnlyAttribute.text"));
       }
       else if (f > 0 && d == 0) {
-        e.getPresentation().setText(ActionsBundle.message("action.ToggleReadOnlyAttribute.files", ro, rw, f, d));
+        e.getPresentation().setText(() -> ActionsBundle.message("action.ToggleReadOnlyAttribute.files", finalRo, finalRw, finalF, finalD));
       }
       else if (f == 0 && d > 0) {
-        e.getPresentation().setText(ActionsBundle.message("action.ToggleReadOnlyAttribute.dirs", ro, rw, f, d));
+        e.getPresentation().setText(() -> ActionsBundle.message("action.ToggleReadOnlyAttribute.dirs", finalRo, finalRw, finalF, finalD));
       }
       else {
-        e.getPresentation().setText(ActionsBundle.message("action.ToggleReadOnlyAttribute.mixed", ro, rw, f, d));
+        e.getPresentation().setText(() -> ActionsBundle.message("action.ToggleReadOnlyAttribute.mixed", finalRo, finalRw, finalF, finalD));
       }
     }
   }
index e8252b49d3f5f35ec34b214c58980beeca54d2ff..6b7b13edae009ed19b3662fd899201828b39bc82 100644 (file)
@@ -22,7 +22,7 @@ public class WhatsNewAction extends AnAction implements DumbAware {
     e.getPresentation().setVisible(visible);
     if (visible) {
       e.getPresentation()
-        .setText(IdeBundle.message("whatsnew.action.custom.text", ApplicationNamesInfo.getInstance().getFullProductName()));
+        .setText(() -> IdeBundle.message("whatsnew.action.custom.text", ApplicationNamesInfo.getInstance().getFullProductName()));
       e.getPresentation().setDescription(
         IdeBundle.message("whatsnew.action.custom.description", ApplicationNamesInfo.getInstance().getFullProductName()));
     }
index e50c585f24a2e3745a0cbb4aef04d6ee5a8b1129..6fca7e97ec3ee7a56a152d28e6ae453cffe37e19 100644 (file)
@@ -865,10 +865,10 @@ public class CustomizableActionsPanel {
       Pair<TreeSet<String>, List<ActionUrl>> selection = findActionsUnderSelection();
       e.getPresentation().setEnabled(!selection.second.isEmpty());
       if (selection.first.size() != 1) {
-        e.getPresentation().setText(IdeBundle.message("button.restore.selected.groups"));
+        e.getPresentation().setText(() -> IdeBundle.message("button.restore.selected.groups"));
       }
       else {
-        e.getPresentation().setText(IdeBundle.message("button.restore.selection", selection.first.iterator().next()));
+        e.getPresentation().setText(() -> IdeBundle.message("button.restore.selection", selection.first.iterator().next()));
       }
     }
   }
index fc28f1d5314b9c8c2a99a719987178a86d68cf2e..afa9d78d46a3e1d37e6927dd996e6b7af55cbbd7 100644 (file)
@@ -39,7 +39,7 @@ public class ToggleUseSoftWrapsMenuAction extends AbstractToggleUseSoftWrapsActi
       e.getPresentation().setIcon(null);
     }
     if (ActionPlaces.UNKNOWN.equals(e.getPlace())) {
-      e.getPresentation().setText(ActionsBundle.message("action.EditorGutterToggleLocalSoftWraps.gutterText"));
+      e.getPresentation().setText(() -> ActionsBundle.message("action.EditorGutterToggleLocalSoftWraps.gutterText"));
     }
     e.getPresentation().setEnabled(getEditor(e) != null);
   }
index 5eb4fd9822a2c14cdaf1d67d993fa8732dc3afcb..3f4ed22cf1dd5ed2fa140e4f1da4bbf0611815cf 100644 (file)
@@ -17,7 +17,7 @@ public class  TogglePathShowingAction extends AnAction implements DumbAware {
 
   @Override
   public void update(@NotNull final AnActionEvent e) {
-    e.getPresentation().setText(IdeBundle.message("file.chooser.hide.path.tooltip.text"));
+    e.getPresentation().setText(() -> IdeBundle.message("file.chooser.hide.path.tooltip.text"));
     DialogWrapper dialog = DialogWrapper.findInstance(e.getData(PlatformDataKeys.CONTEXT_COMPONENT));
     e.getPresentation().setEnabled(dialog instanceof FileChooserDialogImpl);
   }
index 902c14fec2c74bb863104e778c0c6719b16a20c0..b3ed91b27691b4f0084bf2d450aa9c2a31e1b925 100644 (file)
@@ -306,7 +306,7 @@ public abstract class ToolWindowHeader extends JPanel implements UISettingsListe
     HideAction() {
       ActionUtil.copyFrom(this, InternalDecorator.HIDE_ACTIVE_WINDOW_ACTION_ID);
       getTemplatePresentation().setIcon(AllIcons.General.HideToolWindow);
-      getTemplatePresentation().setText(UIBundle.message("tool.window.hide.action.name"));
+      getTemplatePresentation().setText(() -> UIBundle.message("tool.window.hide.action.name"));
     }
 
     @Override
index ff696abf601dbb54118ac41ceb3a14252230ba47..110d396b1b4c970923bd14c5f7d1eb713ac8602b 100644 (file)
@@ -42,7 +42,7 @@ public class AddCloudConnectionActionGroup extends ActionGroup {
     @Override
     public void update(@NotNull AnActionEvent e) {
       if (e.getPlace().equals(ActionPlaces.ACTION_SEARCH)) {
-        e.getPresentation().setText(CloudBundle.message("new.cloud.connection.configurable.title", myServerType.getPresentableName()));
+        e.getPresentation().setText(() -> CloudBundle.message("new.cloud.connection.configurable.title", myServerType.getPresentableName()));
       }
       else {
         e.getPresentation().setText(myServerType.getPresentableName());
index a59c3a70c2298e7c056f5dacddc30656f3dd1c83..868eb8c2111896574af78336a3d0d7d033095555 100644 (file)
@@ -1237,7 +1237,7 @@ public class StructuralSearchDialog extends DialogWrapper implements ProjectMana
     }
 
     private void init() {
-      getTemplatePresentation().setText(SSRBundle.message(myReplace ? "switch.to.search.action" : "switch.to.replace.action"));
+      getTemplatePresentation().setText(() -> SSRBundle.message(myReplace ? "switch.to.search.action" : "switch.to.replace.action"));
       final ActionManager actionManager = ActionManager.getInstance();
       final ShortcutSet searchShortcutSet = actionManager.getAction("StructuralSearchPlugin.StructuralSearchAction").getShortcutSet();
       final ShortcutSet replaceShortcutSet = actionManager.getAction("StructuralSearchPlugin.StructuralReplaceAction").getShortcutSet();
index 3e9af2d47d6d312dd5b83b77056e1861464f3054..0c33ce5b921cd6f889d780e183092aa377c77198 100644 (file)
@@ -839,7 +839,7 @@ public class UsageViewImpl implements UsageViewEx {
     DefaultActionGroup group = new DefaultActionGroup();
     group.setPopup(true);
     group.getTemplatePresentation().setIcon(AllIcons.Actions.GroupBy);
-    group.getTemplatePresentation().setText(UsageViewBundle.message("action.group.by.title"));
+    group.getTemplatePresentation().setText(() -> UsageViewBundle.message("action.group.by.title"));
     group.getTemplatePresentation().setDescription(UsageViewBundle.message("action.group.by.title"));
     final AnAction[] groupingActions = createGroupingActions();
     if (groupingActions.length > 0) {
index 21de0a20f1642a194c55d5a4ffab1d0043e7ee8e..8556de5ecc45b252251088b2ede3adb7e8fc12b8 100644 (file)
@@ -23,7 +23,7 @@ public class StartUseVcsAction extends DumbAwareAction {
     Presentation presentation = e.getPresentation();
     presentation.setEnabledAndVisible(enabled);
     if (enabled) {
-      presentation.setText(VcsBundle.message("action.enable.version.control.integration.text"));
+      presentation.setText(() -> VcsBundle.message("action.enable.version.control.integration.text"));
     }
   }
 
index 76961d4265fe68fbf41d59039a2e90bc465050c6..08c7e3249e1f4d24c622dc15d5bda7e3cd6c5feb 100644 (file)
@@ -32,7 +32,7 @@ public class RestoreShelvedChange extends DumbAwareAction {
       return;
     }
     Collection<ShelvedChangeList> deletedLists = notNullize(e.getData(ShelvedChangesViewManager.SHELVED_DELETED_CHANGELIST_KEY));
-    presentation.setText(VcsBundle.message("vcs.shelf.action.restore.text"));
+    presentation.setText(() -> VcsBundle.message("vcs.shelf.action.restore.text"));
     presentation
       .setDescription(VcsBundle.message("vcs.shelf.action.restore.description", StringUtil.pluralize("changelist", deletedLists.size())));
     presentation.setEnabled(!isEmpty(deletedLists));
index f00d5565fd49911c787857aaecee1f3e00e7daf4..87325ba5d9a3ea529a24d0d20ca43a3e438cdf1b 100644 (file)
@@ -39,7 +39,7 @@ public class CompareRevisionsAction implements AnActionExtensionProvider {
 
   @Override
   public void update(@NotNull AnActionEvent e) {
-    e.getPresentation().setText(VcsBundle.message("action.name.compare"));
+    e.getPresentation().setText(() -> VcsBundle.message("action.name.compare"));
     e.getPresentation().setDescription(VcsBundle.message("action.description.compare"));
 
     VcsFileRevision[] revisions = e.getData(VcsDataKeys.VCS_FILE_REVISIONS);
index e8a0b8834ab24abf894885a29e0bb1a74df92b82..c0c117e6bb57a68d71da7ed573216a0f175b8605 100644 (file)
@@ -63,7 +63,7 @@ public class CreatePatchFromDirectoryAction implements AnActionExtensionProvider
   @Override
   public void update(@NotNull AnActionEvent e) {
     e.getPresentation().setVisible(true);
-    e.getPresentation().setText(VcsBundle.message("action.name.create.patch.for.selected.revisions"));
+    e.getPresentation().setText(() -> VcsBundle.message("action.name.create.patch.for.selected.revisions"));
     e.getPresentation().setDescription(VcsBundle.message("action.description.create.patch.for.selected.revisions"));
 
     VcsFileRevision[] revisions = e.getData(VcsDataKeys.VCS_FILE_REVISIONS);
index 86a0552abf451ebdbc5a75833a68da07b11d0562..bce303710993d5d3d33e68b79f278818ce26b8a4 100644 (file)
@@ -58,10 +58,10 @@ public class RunTargetAction extends AnAction {
     Pair<AntBuildFileBase, AntDomTarget> antTarget = findAntTarget(e);
     if (antTarget == null) {
       presentation.setEnabled(false);
-      presentation.setText(AntActionsBundle.message("action.RunTargetAction.text.template", ""));
+      presentation.setText(() -> AntActionsBundle.message("action.RunTargetAction.text.template", ""));
     } else {
       presentation.setEnabled(true);
-      presentation.setText(AntActionsBundle.message("action.RunTargetAction.text.template", "'" + antTarget.second.getName().getValue() + "'"));
+      presentation.setText(() -> AntActionsBundle.message("action.RunTargetAction.text.template", "'" + antTarget.second.getName().getValue() + "'"));
     }
   }
 
index 8b6072393926804826fa4ddc63c38384e078bea1..c49f3b57577238516fc1e7eb7fb55ebd87f56f5c 100644 (file)
@@ -636,20 +636,20 @@ public class AntExplorer extends SimpleToolWindowPanel implements DataProvider,
       final Presentation presentation = event.getPresentation();
       final String place = event.getPlace();
       if (ActionPlaces.ANT_EXPLORER_TOOLBAR.equals(place)) {
-        presentation.setText(AntBundle.message("run.ant.file.or.target.action.name"));
+        presentation.setText(() -> AntBundle.message("run.ant.file.or.target.action.name"));
       }
       else {
         final TreePath[] paths = myTree.getSelectionPaths();
         if (paths != null && paths.length == 1 &&
             ((DefaultMutableTreeNode)paths[0].getLastPathComponent()).getUserObject() instanceof AntBuildFileNodeDescriptor) {
-          presentation.setText(AntBundle.message("run.ant.build.action.name"));
+          presentation.setText(() -> AntBundle.message("run.ant.build.action.name"));
         }
         else {
           if (paths == null || paths.length == 1) {
-            presentation.setText(AntBundle.message("run.ant.target.action.name"));
+            presentation.setText(() -> AntBundle.message("run.ant.target.action.name"));
           }
           else {
-            presentation.setText(AntBundle.message("run.ant.targets.action.name"));
+            presentation.setText(() -> AntBundle.message("run.ant.targets.action.name"));
           }
         }
       }
@@ -911,7 +911,7 @@ public class AntExplorer extends SimpleToolWindowPanel implements DataProvider,
         presentation.setEnabled(enabled);
       }
       else {
-        presentation.setText(AntBundle.message("remove.selected.meta.targets.action.name"));
+        presentation.setText(() -> AntBundle.message("remove.selected.meta.targets.action.name"));
         final AntBuildTarget[] targets = getTargetObjectsFromPaths(paths);
         boolean enabled = targets.length > 0;
         for (final AntBuildTarget buildTarget : targets) {
index 00620c0eca9ddc428669ada030bb9622cc8353d2..0930863a0985fe703340892cb8bf5f361a900955 100644 (file)
@@ -59,7 +59,7 @@ public class PrepareAllToDeployAction extends PrepareToDeployAction {
     }
     e.getPresentation().setEnabledAndVisible(enabled);
     if (enabled) {
-      e.getPresentation().setText(DevKitBundle.message("prepare.for.deployment.all"));
+      e.getPresentation().setText(() -> DevKitBundle.message("prepare.for.deployment.all"));
     }
   }
 }
\ No newline at end of file
index 8e1a7feaf3842329f58376e175d77caf13a677ea..a444c1154f4041d6a5f08c736b7019194380d299 100644 (file)
@@ -335,7 +335,7 @@ public class PrepareToDeployAction extends AnAction {
     boolean enabled = module != null && PluginModuleType.isOfType(module);
     e.getPresentation().setEnabledAndVisible(enabled);
     if (enabled) {
-      e.getPresentation().setText(DevKitBundle.message("prepare.for.deployment", module.getName()));
+      e.getPresentation().setText(() -> DevKitBundle.message("prepare.for.deployment", module.getName()));
     }
   }
 }
\ No newline at end of file
index e73e367bdc7cb4d2ca4400bdb9ddfd74c6e2f77d..f9e0ed36a2152b234b2ba88437f550a6516fa614 100644 (file)
@@ -38,7 +38,7 @@ public class AddGradleDslDependencyAction extends CodeInsightAction {
 
   public AddGradleDslDependencyAction() {
     getTemplatePresentation().setDescription(GradleBundle.message("gradle.codeInsight.action.add_maven_dependency.description"));
-    getTemplatePresentation().setText(GradleBundle.message("gradle.codeInsight.action.add_maven_dependency.text"));
+    getTemplatePresentation().setText(() -> GradleBundle.message("gradle.codeInsight.action.add_maven_dependency.text"));
     getTemplatePresentation().setIcon(AllIcons.Nodes.PpLib);
   }
 
index 48933134760cd670c454303ecce14098b360e404..8edabb61d9bfcc3a92e2c37194c75d15a2ad0d9d 100644 (file)
@@ -32,7 +32,7 @@ public class AddGradleDslPluginAction extends CodeInsightAction {
 
   public AddGradleDslPluginAction() {
     getTemplatePresentation().setDescription(GradleBundle.message("gradle.codeInsight.action.apply_plugin.description"));
-    getTemplatePresentation().setText(GradleBundle.message("gradle.codeInsight.action.apply_plugin.text"));
+    getTemplatePresentation().setText(() -> GradleBundle.message("gradle.codeInsight.action.apply_plugin.text"));
     getTemplatePresentation().setIcon(GradleIcons.Gradle);
 
     myPlugins = new ArrayList<>();
index e35b93b19779b7641eb7b06ebfa6734e778f46ce..2caa6d509f78504b1e5a81d18bae868103add523 100644 (file)
@@ -26,7 +26,7 @@ import java.util.List;
  */
 public class GradleRefreshProjectDependenciesAction extends RefreshExternalProjectAction {
   public GradleRefreshProjectDependenciesAction() {
-    getTemplatePresentation().setText(GradleBundle.message("gradle.action.refresh.dependencies.text"));
+    getTemplatePresentation().setText(() -> GradleBundle.message("gradle.action.refresh.dependencies.text"));
     getTemplatePresentation().setDescription(GradleBundle.message("gradle.action.refresh.dependencies.description"));
   }
 
index 006f3bc328979babaf2a4668284e5060cfd20acf..3bc6222e2058287c8ee42fffac52c9bf8d6e05f2 100644 (file)
@@ -39,7 +39,7 @@ public class MavenRebuildAction extends FakeRerunAction {
   public void update(@NotNull AnActionEvent event) {
     Presentation presentation = event.getPresentation();
 
-    presentation.setText(ExecutionBundle.message("rerun.configuration.action.name",
+    presentation.setText(() -> ExecutionBundle.message("rerun.configuration.action.name",
                                                  StringUtil.escapeMnemonics(myEnvironment.getRunProfile().getName())));
     presentation.setIcon(
       ExecutionManagerImpl.isProcessRunning(myEnvironment.getContentToReuse()) ?
index b5b938c922fb87dafecbf43f46c00cb036039de9..2d6d014140680c7d03e85185d6eec2063ec1f488 100644 (file)
@@ -41,13 +41,13 @@ public class ToggleIgnoredProjectsAction extends MavenAction {
     List<MavenProject> projects = MavenActionUtil.getMavenProjects(context);
 
     if (isIgnoredInSettings(projectsManager, projects)) {
-      e.getPresentation().setText(MavenProjectBundle.message("maven.ignore.edit"));
+      e.getPresentation().setText(() -> MavenProjectBundle.message("maven.ignore.edit"));
     }
     else if (isIgnored(projectsManager, projects)) {
-      e.getPresentation().setText(MavenProjectBundle.message("maven.unignore"));
+      e.getPresentation().setText(() -> MavenProjectBundle.message("maven.unignore"));
     }
     else {
-      e.getPresentation().setText(MavenProjectBundle.message("maven.ignore"));
+      e.getPresentation().setText(() -> MavenProjectBundle.message("maven.ignore"));
     }
   }
 
index aa7a01cd9f9cc59e56d646fde17f234476f04e0c..12cd2d3eb6b191bb5a577f75fa93241bf73b6868 100644 (file)
@@ -39,7 +39,7 @@ public abstract class AbstractIntegrateChangesAction<T extends SelectedCommitted
       return;
     }
 
-    presentation.setText(SvnBundle.message("action.Subversion.integrate.changes.actionname"));
+    presentation.setText(() -> SvnBundle.message("action.Subversion.integrate.changes.actionname"));
     presentation.setDescription(SvnBundle.message("action.Subversion.integrate.changes.description"));
 
     final T checker = createChecker();
index 110a1bcca1f57b529bdd789ad651790c7e486120..aea9ca43c88573737756c9d2be51d446eb7ee5ee 100644 (file)
@@ -85,7 +85,7 @@ public class IgnoreActionGroup extends DefaultActionGroup implements DumbAware {
           add(myRemoveExtensionAction);
         }
 
-        e.getPresentation().setText(SvnBundle.message("group.RevertIgnoreChoicesGroup.text"));
+        e.getPresentation().setText(() -> SvnBundle.message("group.RevertIgnoreChoicesGroup.text"));
       } else if (myHelperAction.allCanBeIgnored()) {
         final String ignoreExactlyName = (fileGroupInfo.oneFileSelected()) ?
                                          fileGroupInfo.getFileName() : SvnBundle.message("action.Subversion.Ignore.ExactMatch.text");
@@ -95,7 +95,7 @@ public class IgnoreActionGroup extends DefaultActionGroup implements DumbAware {
           myAddExtensionAction.setActionText(fileGroupInfo.getExtensionMask());
           add(myAddExtensionAction);
         }
-        e.getPresentation().setText(SvnBundle.message("group.IgnoreChoicesGroup.text"));
+        e.getPresentation().setText(() -> SvnBundle.message("group.IgnoreChoicesGroup.text"));
       }
     }
   }
index 984c94c0e0201f277a4867b2b643af98ddfb40f9..388b6543add961a19324508f4164ef7451e654a9 100644 (file)
@@ -32,7 +32,7 @@ public class ShareWholeProject extends AnAction implements DumbAware {
 
     presentation.setVisible(checker.isVisible());
     if (checker.isEnabled()) {
-      presentation.setText(SvnBundle.message("action.share.whole.project.text"));
+      presentation.setText(() -> SvnBundle.message("action.share.whole.project.text"));
     }
   }
 
index c28a1dbd23ad5172e941c51eac8e67a44c2ace14..bb1f592ca82c0347ad24b15e36110d0174bf5e92 100644 (file)
@@ -334,7 +334,7 @@ public class RepositoryBrowserDialog extends DialogWrapper {
   protected class HistoryAction extends DumbAwareAction {
     @Override
     public void update(@NotNull AnActionEvent e) {
-      e.getPresentation().setText(SvnBundle.message("repository.browser.history.action"));
+      e.getPresentation().setText(() -> SvnBundle.message("repository.browser.history.action"));
       e.getPresentation().setDescription(SvnBundle.message("repository.browser.history.action"));
       final RepositoryTreeNode node = getRepositoryBrowser().getSelectedNode();
       e.getPresentation().setEnabled(node != null && node.getURL() != null && !myProject.isDefault());
@@ -366,7 +366,7 @@ public class RepositoryBrowserDialog extends DialogWrapper {
 
     @Override
     public void update(@NotNull AnActionEvent e) {
-      e.getPresentation().setText(SvnBundle.message("action.name.refresh"));
+      e.getPresentation().setText(() -> SvnBundle.message("action.name.refresh"));
       e.getPresentation().setDescription(SvnBundle.message("repository.browser.refresh.action"));
       e.getPresentation().setIcon(AllIcons.Actions.Refresh);
       e.getPresentation().setEnabled(myBrowserComponent.getSelectedNode() != null);
@@ -394,7 +394,7 @@ public class RepositoryBrowserDialog extends DialogWrapper {
     public void update(@NotNull AnActionEvent e) {
       if (e.getPlace().equals(PLACE_TOOLBAR)) {
         e.getPresentation().setDescription(SvnBundle.message("repository.browser.add.location.action.description"));
-        e.getPresentation().setText(SvnBundle.message("repository.browser.add.location.action.text"));
+        e.getPresentation().setText(() -> SvnBundle.message("repository.browser.add.location.action.text"));
         e.getPresentation().setIcon(IconUtil.getAddIcon());
       }
     }
@@ -434,7 +434,7 @@ public class RepositoryBrowserDialog extends DialogWrapper {
       RepositoryTreeNode node = myBrowserComponent.getSelectedNode();
       if (e.getPlace().equals(PLACE_TOOLBAR)) {
         e.getPresentation().setDescription(SvnBundle.message("repository.browser.edit.location.menu.item"));
-        e.getPresentation().setText(SvnBundle.message("repository.browser.edit.location.menu.item"));
+        e.getPresentation().setText(() -> SvnBundle.message("repository.browser.edit.location.menu.item"));
         e.getPresentation().setIcon(AllIcons.Actions.EditSource);
       }
       e.getPresentation().setEnabled(node != null && node.getParent() instanceof RepositoryTreeRootNode);
@@ -868,7 +868,7 @@ public class RepositoryBrowserDialog extends DialogWrapper {
     @Override
     public void update(@NotNull AnActionEvent e) {
       e.getPresentation().setVisible(showImportAction());
-      e.getPresentation().setText(SvnBundle.message("repository.browser.import.action"));
+      e.getPresentation().setText(() -> SvnBundle.message("repository.browser.import.action"));
       setEnabled(e, getRepositoryBrowser().getSelectedNode(),
                  ProjectLevelVcsManager.getInstance(myProject).isBackgroundVcsOperationRunning());
     }
@@ -960,7 +960,7 @@ public class RepositoryBrowserDialog extends DialogWrapper {
     @Override
     public void update(@NotNull final AnActionEvent e) {
       e.getPresentation().setDescription(SvnBundle.message("repository.browser.details.action"));
-      e.getPresentation().setText(SvnBundle.message("repository.browser.details.action"));
+      e.getPresentation().setText(() -> SvnBundle.message("repository.browser.details.action"));
       e.getPresentation().setIcon(AllIcons.Actions.Annotate);
       super.update(e);
     }
index 3e45d878fa577964ea9a854eaf496478d390d2ca..27a0230bf3421b2dd32df88d8d1c85566623e083 100644 (file)
@@ -34,7 +34,7 @@ public class PythonDebugLanguageConsoleView extends DuplexConsoleView<ConsoleVie
     enableConsole(!PyConsoleOptions.getInstance(project).isShowDebugConsoleByDefault());
 
     getSwitchConsoleActionPresentation().setIcon(PythonIcons.Python.PythonConsole);
-    getSwitchConsoleActionPresentation().setText(PyBundle.message("run.configuration.show.command.line.action.name"));
+    getSwitchConsoleActionPresentation().setText(() -> PyBundle.message("run.configuration.show.command.line.action.name"));
 
     List<AnAction> actions = ContainerUtil.newArrayList(PyConsoleUtil.createTabCompletionAction(getPydevConsoleView()));
     actions.add(PyConsoleUtil.createInterruptAction(getPydevConsoleView()));
index cbd5fc5fd6b7954c34d026cabfa1b96821d769ec..534255766155b10c9d2887ca7fead23e1b34bf27 100644 (file)
@@ -104,7 +104,7 @@ final class PanelWithActions extends JPanel {
     @Override
     public void update(@NotNull final AnActionEvent e) {
       super.update(e);
-      e.getPresentation().setText(PyBundle.message("windowWithActions.closeWindow"));
+      e.getPresentation().setText(() -> PyBundle.message("windowWithActions.closeWindow"));
     }
 
     @Override
index 5f136e069835e01dddb026ad22ebb9fbee344461..6343557c3ea15636afe6e68d2e194eb72a4143cc 100644 (file)
@@ -84,7 +84,7 @@ public class DeleteDomElement extends BaseDomTreeAction {
       e.getPresentation().setText(getPresentationText(selectedNode, ApplicationBundle.message("action.remove")));
     }
     else {
-      e.getPresentation().setText(ApplicationBundle.message("action.remove"));
+      e.getPresentation().setText(() -> ApplicationBundle.message("action.remove"));
     }
 
     e.getPresentation().setIcon(AllIcons.General.Remove);
index 95d41ea144a477f3f2b889accf9f7e2cbde8c071..88f6447df741cb650cba036bd9ee69dc761771ee 100644 (file)
@@ -44,6 +44,6 @@ public class GotoDomElementDeclarationAction extends BaseDomTreeAction {
   @Override
   public void update(AnActionEvent e, DomModelTreeView treeView) {
     e.getPresentation().setVisible(treeView.getTree().getSelectedNode() instanceof BaseDomElementNode);
-    e.getPresentation().setText(ActionsBundle.message("action.EditSource.text"));
+    e.getPresentation().setText(() -> ActionsBundle.message("action.EditSource.text"));
   }
 }