From b1ace7dbfe62bc309ac753dd18facea01605cfe6 Mon Sep 17 00:00:00 2001 From: irengrig Date: Thu, 15 Nov 2012 12:28:12 +0400 Subject: [PATCH] IDEA-94954 Move to Change List without VCS throws NPE --- .../vcs/changes/actions/MoveChangesToAnotherListAction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/MoveChangesToAnotherListAction.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/MoveChangesToAnotherListAction.java index 3ad72797cd91..75ff4cebe540 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/MoveChangesToAnotherListAction.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/MoveChangesToAnotherListAction.java @@ -61,6 +61,7 @@ public class MoveChangesToAnotherListAction extends AnAction implements DumbAwar private static boolean isEnabled(final AnActionEvent e) { final Project project = e.getData(PlatformDataKeys.PROJECT); if (project == null) return false; + if (! ProjectLevelVcsManager.getInstance(project).hasActiveVcss()) return false; final List unversionedFiles = e.getData(ChangesListView.UNVERSIONED_FILES_DATA_KEY); if (unversionedFiles != null && (! unversionedFiles.isEmpty())) return true; @@ -131,6 +132,7 @@ public class MoveChangesToAnotherListAction extends AnAction implements DumbAwar public void actionPerformed(AnActionEvent e) { final Project project = e.getData(PlatformDataKeys.PROJECT); if (project == null) return; + if (! ProjectLevelVcsManager.getInstance(project).hasActiveVcss()) return; Change[] changes = e.getData(VcsDataKeys.CHANGES); List unversionedFiles = e.getData(ChangesListView.UNVERSIONED_FILES_DATA_KEY);