Move text from CloseProjectAction into IdeBundle

This commit is contained in:
Evgeniy.Stepanov
2017-01-25 10:51:49 +01:00
parent 8c7858ce3e
commit 357ece6bfd
2 changed files with 5 additions and 4 deletions
@@ -15,6 +15,7 @@
*/
package com.intellij.ide.actions;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.impl.ProjectUtil;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
@@ -27,8 +28,6 @@ import com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame;
import com.intellij.projectImport.ProjectAttachProcessor;
public class CloseProjectAction extends AnAction implements DumbAware {
public static String defaultActionText = "Close Pro_ject";
@Override
public void actionPerformed(AnActionEvent e) {
Project project = e.getProject();
@@ -44,10 +43,10 @@ public 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("Close Pro_jects in Current Window");
presentation.setText(IdeBundle.message("action.close.projects.in.current.window"));
}
else {
presentation.setText(defaultActionText);
presentation.setText(IdeBundle.message("action.close.project"));
}
}
}
@@ -255,6 +255,8 @@ button.cancel=&Cancel
error.cannot.load.project=Cannot load project: {0}
title.cannot.load.project=Cannot Load Project
error.project.file.is.corrupted=Project file is corrupted
action.close.project=Close Pro_ject
action.close.projects.in.current.window=Close Pro_jects in Current Window
title.cannot.convert.project=Cannot Convert Project
dialog.title.convert.project=Convert Project