generated from JetBrains/intellij-platform-plugin-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ext-terminal): introduce NewTerminalUiUtil class and refactor su…
…ggestCommand method to support new UI context #135
- Loading branch information
Showing
2 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
exts/ext-terminal/src/241/main/kotlin/cc/unitmesh/terminal/NewTerminalUiUtil.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package cc.unitmesh.terminal | ||
|
||
import com.intellij.openapi.util.registry.Registry | ||
import com.intellij.ui.NewUI | ||
import org.jetbrains.plugins.terminal.LocalBlockTerminalRunner.Companion.BLOCK_TERMINAL_REGISTRY | ||
|
||
class NewTerminalUiUtil { | ||
fun isNewTerminal(): Boolean { | ||
return NewUI.isEnabled() && !Registry.`is`(BLOCK_TERMINAL_REGISTRY, false) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters