Move applicable 'Mark Directory As' actions to each product, implement 'Mark as Resource Root' action for WebIDE (WI-5783)

This commit is contained in:
Kirill.Safonov
2011-04-12 17:48:43 +04:00
parent 98568c1380
commit 8eea3245c7
3 changed files with 20 additions and 9 deletions
@@ -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.";
}
}
@@ -413,10 +413,6 @@
<group id="ProjectViewPopupMenuSettingsGroup">
<group id="MarkRootGroup" class="com.intellij.ide.projectView.actions.MarkRootGroup" popup="true">
<action id="MarkSourceRoot" class="com.intellij.ide.projectView.actions.MarkRootAction"/>
<action id="MarkTestSourceRoot" class="com.intellij.ide.projectView.actions.MarkTestSourceRootAction"/>
<action id="MarkExcludeRoot" class="com.intellij.ide.projectView.actions.MarkExcludeRootAction"/>
<action id="UnmarkRoot" class="com.intellij.ide.projectView.actions.UnmarkRootAction"/>
</group>
</group>
+13 -1
View File
@@ -671,6 +671,18 @@
<add-to-group group-id="DiffPanel.Toolbar" anchor="after" relative-to-action="$Copy"/>
</group>
<action id="MarkSourceRoot" class="com.intellij.ide.projectView.actions.MarkRootAction">
<add-to-group group-id="MarkRootGroup"/>
</action>
<action id="MarkTestSourceRoot" class="com.intellij.ide.projectView.actions.MarkTestSourceRootAction">
<add-to-group group-id="MarkRootGroup"/>
</action>
<action id="MarkExcludeRoot" class="com.intellij.ide.projectView.actions.MarkExcludeRootAction">
<add-to-group group-id="MarkRootGroup"/>
</action>
<action id="UnmarkRoot" class="com.intellij.ide.projectView.actions.UnmarkRootAction">
<add-to-group group-id="MarkRootGroup"/>
</action>
</actions>
</component>