diff --git a/platform/platform-impl/src/com/intellij/ide/actions/DeleteAction.java b/platform/platform-impl/src/com/intellij/ide/actions/DeleteAction.java
index 4669c1b93132..814c3104602f 100644
--- a/platform/platform-impl/src/com/intellij/ide/actions/DeleteAction.java
+++ b/platform/platform-impl/src/com/intellij/ide/actions/DeleteAction.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2000-2015 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide.actions;
import com.intellij.ide.DeleteProvider;
@@ -23,6 +9,7 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.speedSearch.SpeedSearchSupply;
+import com.intellij.util.IconUtil;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -66,6 +53,9 @@ public class DeleteAction extends AnAction implements DumbAware {
else {
presentation.setText(IdeBundle.message("action.delete"));
}
+ if (e.isFromActionToolbar() && e.getPresentation().getIcon() == null) {
+ e.getPresentation().setIcon(IconUtil.getRemoveIcon());
+ }
if (e.getProject() == null) {
presentation.setEnabled(false);
diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties
index 186572f33ee7..eec816198046 100644
--- a/platform/platform-resources-en/src/messages/ActionsBundle.properties
+++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties
@@ -1288,8 +1288,6 @@ action.ChangesView.Move.text=Move to Another Changelist...
action.ChangesView.Move.description=Move selected changes to another changelist
action.ChangesView.Diff.text=Show Diff
action.ChangesView.Diff.description=Compare files or revisions
-action.ChangesView.DeleteUnversioned.text=Delete...
-action.ChangesView.DeleteUnversioned.description=
action.ChangesView.AddUnversioned.text=Add to VCS
action.ChangesView.AddUnversioned.description=Schedule selected files to be added to VCS
action.ChangesView.RemoveDeleted.text=Remove from VCS
diff --git a/platform/platform-resources/src/idea/VcsActions.xml b/platform/platform-resources/src/idea/VcsActions.xml
index 8eaef9bafe92..b743d17fd8b9 100644
--- a/platform/platform-resources/src/idea/VcsActions.xml
+++ b/platform/platform-resources/src/idea/VcsActions.xml
@@ -123,7 +123,7 @@
-
+
@@ -147,12 +147,12 @@
-
+
@@ -409,7 +409,7 @@
-
+
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/IgnoredViewDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/IgnoredViewDialog.java
index 441ca9cec4b9..fbeed666fd09 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/IgnoredViewDialog.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/IgnoredViewDialog.java
@@ -1,10 +1,10 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.vcs.changes;
+import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.actionSystem.AnAction;
-import com.intellij.openapi.actionSystem.CommonShortcuts;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
-import com.intellij.openapi.actionSystem.EmptyAction;
+import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.changes.ui.ChangesListView;
import com.intellij.openapi.vfs.VirtualFile;
@@ -20,8 +20,8 @@ public class IgnoredViewDialog extends SpecificFilesViewDialog {
@Override
protected void addCustomActions(@NotNull DefaultActionGroup group) {
- AnAction deleteAction =
- EmptyAction.registerWithShortcutSet("ChangesView.DeleteUnversioned", CommonShortcuts.getDelete(), myView);
+ AnAction deleteAction = ActionManager.getInstance().getAction(IdeActions.ACTION_DELETE);
+ deleteAction.registerCustomShortcutSet(myView, null);
group.add(deleteAction);
myView.installPopupHandler(new DefaultActionGroup(deleteAction));
}
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UnversionedViewDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UnversionedViewDialog.java
index 0f5074428d32..d28af841d2f0 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UnversionedViewDialog.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UnversionedViewDialog.java
@@ -3,7 +3,6 @@ package com.intellij.openapi.vcs.changes;
import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.ActionManager;
-import com.intellij.openapi.actionSystem.CommonShortcuts;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.changes.ui.ChangesListView;
@@ -13,7 +12,6 @@ import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.util.List;
-import static com.intellij.openapi.actionSystem.EmptyAction.registerWithShortcutSet;
import static com.intellij.openapi.actionSystem.ex.ActionUtil.recursiveRegisterShortcutSet;
public class UnversionedViewDialog extends SpecificFilesViewDialog {
@@ -44,10 +42,7 @@ public class UnversionedViewDialog extends SpecificFilesViewDialog {
@NotNull
public static ActionGroup registerUnversionedPopupGroup(@NotNull JComponent component) {
ActionGroup popupGroup = getUnversionedPopupGroup();
-
recursiveRegisterShortcutSet(popupGroup, component, null);
- registerWithShortcutSet("ChangesView.DeleteUnversioned", CommonShortcuts.getDelete(), component);
-
return popupGroup;
}