diff-preview: add action for moving diff preview to new window
[idea/community.git] / platform / vcs-impl / src / com / intellij / openapi / vcs / changes / actions / diff / MoveDiffPreviewAction.kt
index 956d17f53aa814758cc864f690456ce70944dc81..7c3a93e8c9cf43967d2e629c645897afddb8c7c9 100644 (file)
@@ -35,3 +35,7 @@ internal abstract class MoveDiffPreviewAction(private val openInNewWindow: Boole
 internal class MoveDiffPreviewToEditorAction : MoveDiffPreviewAction(false) {
   override fun isEnabledAndVisible(project: Project): Boolean = EditorDiffPreviewFilesManager.getInstance(project).shouldOpenInNewWindow
 }
+
+internal class MoveDiffPreviewToNewWindowAction : MoveDiffPreviewAction(true) {
+  override fun isEnabledAndVisible(project: Project): Boolean = !EditorDiffPreviewFilesManager.getInstance(project).shouldOpenInNewWindow
+}