git: enable progress output foldings for vcs console only
[idea/community.git] / plugins / git4idea / src / git4idea / console / GitConsoleFolding.kt
index 57c94d985a3295de56611d39d58bb3cc7bc13342..f9093aa0470ee8d9dec5fca29ce43f0c3c09c044 100644 (file)
@@ -2,11 +2,13 @@
 package git4idea.console
 
 import com.intellij.execution.ConsoleFolding
+import com.intellij.execution.ui.ConsoleView
 import com.intellij.openapi.project.Project
 import com.intellij.openapi.util.TextRange
 import com.intellij.openapi.util.text.StringUtil
 import com.intellij.vcs.console.VcsConsoleFolding
 import com.intellij.vcs.console.VcsConsoleFolding.Placeholder
+import com.intellij.vcs.console.VcsConsoleView
 import git4idea.commands.GitImplBase
 import java.util.regex.Matcher
 import java.util.regex.Pattern
@@ -50,4 +52,8 @@ class GitProgressOutputConsoleFolding : ConsoleFolding() {
   override fun shouldFoldLine(project: Project, line: String): Boolean {
     return GitImplBase.looksLikeProgress(line)
   }
+
+  override fun isEnabledForConsole(consoleView: ConsoleView): Boolean {
+    return consoleView is VcsConsoleView
+  }
 }
\ No newline at end of file