From 8eea3245c7e01f04b30e5e44c16f9edf1efc317a Mon Sep 17 00:00:00 2001 From: "Kirill.Safonov" Date: Tue, 12 Apr 2011 17:45:39 +0400 Subject: [PATCH] Move applicable 'Mark Directory As' actions to each product, implement 'Mark as Resource Root' action for WebIDE (WI-5783) --- .../projectView/actions/MarkExcludeRootAction.java | 11 +++++++---- .../platform-resources/src/idea/LangActions.xml | 4 ---- resources/src/idea/IdeaActions.xml | 14 +++++++++++++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkExcludeRootAction.java b/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkExcludeRootAction.java index f5f43948188c..9238074e63eb 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkExcludeRootAction.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkExcludeRootAction.java @@ -33,13 +33,16 @@ public class MarkExcludeRootAction extends MarkRootAction { public void actionPerformed(AnActionEvent e) { VirtualFile[] vFiles = e.getData(PlatformDataKeys.VIRTUAL_FILE_ARRAY); String message = vFiles.length == 1 ? FileUtil.toSystemDependentName(vFiles [0].getPath()) : vFiles.length + " selected files"; - final int rc = Messages.showOkCancelDialog(e.getData(PlatformDataKeys.PROJECT), - "Are you sure you would like to exclude " + message + - " from the project?\nYou can restore excluded folders later using the Project Structure dialog.", - "Mark as Excluded", Messages.getQuestionIcon()); + final int rc = Messages + .showOkCancelDialog(e.getData(PlatformDataKeys.PROJECT), getPromptText(message), "Mark as Excluded", Messages.getQuestionIcon()); if (rc != 0) { return; } super.actionPerformed(e); } + + protected String getPromptText(String message) { + return "Are you sure you would like to exclude " + message + + " from the project?\nYou can restore excluded folders later using the Project Structure dialog."; + } } diff --git a/platform/platform-resources/src/idea/LangActions.xml b/platform/platform-resources/src/idea/LangActions.xml index e4de42ddae9d..f2e736bea908 100644 --- a/platform/platform-resources/src/idea/LangActions.xml +++ b/platform/platform-resources/src/idea/LangActions.xml @@ -413,10 +413,6 @@ - - - - diff --git a/resources/src/idea/IdeaActions.xml b/resources/src/idea/IdeaActions.xml index 57c46ff3a576..c7146a82f873 100644 --- a/resources/src/idea/IdeaActions.xml +++ b/resources/src/idea/IdeaActions.xml @@ -671,6 +671,18 @@ - + + + + + + + + + + + + +