mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[terminal] rename ShLangService to TerminalShLangService, reduce visibility by making it internal
GitOrigin-RevId: 2389635907546f8e3ad3c9c7a4d3436c654495d9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
46320b80de
commit
4e36f4ead1
@@ -5,7 +5,7 @@
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<shellOccurrencesHighlightingSuppressor implementation="org.jetbrains.plugins.terminal.sh.prompt.TerminalPromptHighlightingSuppressor"/>
|
||||
<applicationService serviceInterface="org.jetbrains.plugins.terminal.block.shellSupport.ShLangService"
|
||||
serviceImplementation="org.jetbrains.plugins.terminal.sh.prompt.ShLangServiceImpl"/>
|
||||
<applicationService serviceInterface="org.jetbrains.plugins.terminal.block.shellSupport.TerminalShLangService"
|
||||
serviceImplementation="org.jetbrains.plugins.terminal.sh.prompt.TerminalShLangServiceImpl"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
+2
-2
@@ -9,9 +9,9 @@ import com.intellij.sh.ShLanguage
|
||||
import com.intellij.sh.psi.ShCommandsList
|
||||
import com.intellij.sh.psi.ShFileElementType
|
||||
import com.intellij.sh.psi.ShSimpleCommand
|
||||
import org.jetbrains.plugins.terminal.block.shellSupport.ShLangService
|
||||
import org.jetbrains.plugins.terminal.block.shellSupport.TerminalShLangService
|
||||
|
||||
class ShLangServiceImpl : ShLangService {
|
||||
internal class TerminalShLangServiceImpl : TerminalShLangService {
|
||||
override val promptContentElementType: IElementType
|
||||
get() = ShFileElementType.INSTANCE
|
||||
|
||||
+2
-2
@@ -11,12 +11,12 @@ import org.jetbrains.plugins.terminal.exp.completion.TerminalShellSupport
|
||||
|
||||
internal abstract class BaseShSupport : TerminalShellSupport {
|
||||
override val promptContentElementType: IElementType?
|
||||
get() = serviceOrNull<ShLangService>()?.promptContentElementType
|
||||
get() = serviceOrNull<TerminalShLangService>()?.promptContentElementType
|
||||
|
||||
override val lineContinuationChar: Char = '\\'
|
||||
|
||||
override fun getCommandTokens(project: Project, command: String): List<String>? {
|
||||
return serviceOrNull<ShLangService>()?.getShellCommandTokens(project, command)
|
||||
return serviceOrNull<TerminalShLangService>()?.getShellCommandTokens(project, command)
|
||||
}
|
||||
|
||||
override fun parseAliases(aliasesDefinition: String): Map<String, String> {
|
||||
|
||||
+3
-1
@@ -3,8 +3,10 @@ package org.jetbrains.plugins.terminal.block.shellSupport
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.tree.IElementType
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
interface ShLangService {
|
||||
@ApiStatus.Internal
|
||||
interface TerminalShLangService {
|
||||
val promptContentElementType: IElementType
|
||||
|
||||
fun getShellCommandTokens(project: Project, command: String): List<String>?
|
||||
+3
-3
@@ -9,17 +9,17 @@ import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.psi.tree.IElementType
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.Json
|
||||
import org.jetbrains.plugins.terminal.block.shellSupport.ShLangService
|
||||
import org.jetbrains.plugins.terminal.block.shellSupport.TerminalShLangService
|
||||
import org.jetbrains.plugins.terminal.exp.completion.TerminalShellSupport
|
||||
|
||||
internal class PowerShellSupport : TerminalShellSupport {
|
||||
override val promptContentElementType: IElementType?
|
||||
get() = serviceOrNull<ShLangService>()?.promptContentElementType
|
||||
get() = serviceOrNull<TerminalShLangService>()?.promptContentElementType
|
||||
|
||||
override val lineContinuationChar: Char = '`'
|
||||
|
||||
override fun getCommandTokens(project: Project, command: String): List<String>? {
|
||||
return serviceOrNull<ShLangService>()?.getShellCommandTokens(project, command)
|
||||
return serviceOrNull<TerminalShLangService>()?.getShellCommandTokens(project, command)
|
||||
}
|
||||
|
||||
override fun parseCommandHistory(history: String): List<String> {
|
||||
|
||||
Reference in New Issue
Block a user