IDEA-140446 vcs: fix actions in "Unversioned Files" dialog

* set icon for ChangesView.Ignore action
* do not hide actions, mark them disabled instead
This commit is contained in:
Aleksey Pivovarov
2016-03-16 16:38:56 +03:00
parent f6f41f1591
commit 1446cdecb6
3 changed files with 2 additions and 3 deletions
@@ -110,7 +110,7 @@
<action id="ChangesView.AddUnversioned" class="com.intellij.openapi.vcs.changes.actions.ScheduleForAdditionAction">
<keyboard-shortcut first-keystroke="control alt A" keymap="$default"/>
</action>
<action id="ChangesView.Ignore" class="com.intellij.openapi.vcs.changes.actions.IgnoreUnversionedAction"/>
<action id="ChangesView.Ignore" class="com.intellij.openapi.vcs.changes.actions.IgnoreUnversionedAction" icon="AllIcons.Actions.Properties"/>
<action id="ChangesView.RemoveDeleted" class="com.intellij.openapi.vcs.changes.actions.ScheduleForRemovalAction"
icon="AllIcons.Actions.Exclude"/>
<action id="ChangesView.Edit" class="com.intellij.openapi.vcs.changes.actions.EditAction"/>
@@ -49,6 +49,6 @@ public class DeleteUnversionedFilesAction extends DumbAwareAction {
@Override
public void update(AnActionEvent e) {
DeleteProvider deleteProvider = e.getData(PlatformDataKeys.DELETE_ELEMENT_PROVIDER);
e.getPresentation().setVisible(deleteProvider != null && deleteProvider.canDeleteElement(e.getDataContext()));
e.getPresentation().setEnabled(deleteProvider != null && deleteProvider.canDeleteElement(e.getDataContext()));
}
}
@@ -65,6 +65,5 @@ public class IgnoreUnversionedAction extends AnAction {
}
boolean enabled = files != null && !files.isEmpty();
e.getPresentation().setEnabled(enabled);
e.getPresentation().setVisible(enabled);
}
}