mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
[Java] Implement logic for placing separator after option in new terminal completion.
IDEA-359375 GitOrigin-RevId: 90bd91f7ec3f0322ec8dc19ab8e4209266bfaf88
This commit is contained in:
committed by
intellij-monorepo-bot
parent
305b11607a
commit
6e38f27c33
@@ -12,12 +12,16 @@ import javax.swing.Icon
|
||||
|
||||
internal object TerminalCompletionUtil {
|
||||
fun getNextSuggestionsString(suggestion: ShellCompletionSuggestion): String {
|
||||
var separator: String? = null
|
||||
val result = when (suggestion) {
|
||||
is ShellCommandSpec -> getNextOptionsAndArgumentsString(suggestion)
|
||||
is ShellOptionSpec -> getNextArgumentsString(suggestion.arguments)
|
||||
is ShellOptionSpec -> {
|
||||
separator = suggestion.separator
|
||||
getNextArgumentsString(suggestion.arguments)
|
||||
}
|
||||
else -> ""
|
||||
}
|
||||
return if (result.isNotEmpty()) " $result" else ""
|
||||
return if (result.isNotEmpty()) "${separator ?: " "}$result" else ""
|
||||
}
|
||||
|
||||
/** Returns required options and all arguments */
|
||||
|
||||
Reference in New Issue
Block a user