mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Move applicable 'Mark Directory As' actions to each product, implement 'Mark as Resource Root' action for WebIDE (WI-5783)
This commit is contained in:
+7
-4
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user