[Java] Add double dashed options for VM from java 11

IDEA-359245

GitOrigin-RevId: c3a326917e8a51e82ba148a27d37f5a687c1cab8
This commit is contained in:
Georgii Ustinov
2024-09-23 16:06:29 +03:00
committed by intellij-monorepo-bot
parent fcb6bd7426
commit 19770e4674
2 changed files with 13 additions and 11 deletions

View File

@@ -58,5 +58,8 @@ java.command.terminal.add.exports.option.description=Updates \\<module\\>
java.command.terminal.add.exports.option.argument.text=<module>/<package>=<target-module>(,<target-module>)*
java.command.terminal.source.option.description=Set the \\&lt;version\\&gt; of the source in source-file mode.
java.command.terminal.source.option.argument.text=version
java.command.terminal.disable.@files.option.description=Disable further argument file expansion.
java.command.terminal.illegal.access.option.description=\\&lt;value\\&gt permit or deny access to members of types in named modules by code in unnamed modules. \\&lt;value\\&gt; is one of "deny", "permit", "warn", or "debug" This option will be removed in a future release.
java.command.terminal.illegal.access.option.argument.text=value
error.stream.name=error
output.stream.name=output

View File

@@ -101,17 +101,15 @@ class JavaShellCommandSpecsProvider : ShellCommandSpecsProvider {
val optionName = it.optionName
val presentableName = "${it.variant.prefix()}$optionName"
option(presentableName) {
if (JavaTerminalBundle.isMessageInBundle(getOptionBundleKey(optionName)) && JavaTerminalBundle.isMessageInBundle(getOptionArgumentBundleKey(optionName))) {
description(JavaTerminalBundle.message(getOptionBundleKey(optionName)))
if (KNOWN_OPTIONS_WITH_EMPTY_SEPARATOR.contains(presentableName)) separator = ""
argument {
displayName(JavaTerminalBundle.message(getOptionArgumentBundleKey(optionName)))
}
}
else {
if (!JavaTerminalBundle.isMessageInBundle(getOptionBundleKey(optionName))) {
LOG.warn("Unknown DashDash option: \"$optionName\". Provide ${getOptionBundleKey(optionName)} and ${getOptionArgumentBundleKey(optionName)}")
return@option
}
description(JavaTerminalBundle.message(getOptionBundleKey(optionName)))
if (!JavaTerminalBundle.isMessageInBundle(getOptionArgumentBundleKey(optionName))) return@option
if (KNOWN_OPTIONS_WITH_EMPTY_SEPARATOR.contains(presentableName)) separator = ""
argument {
displayName(JavaTerminalBundle.message(getOptionArgumentBundleKey(optionName)))
}
}
}
@@ -161,7 +159,8 @@ private val KNOWN_OPTIONS_WITH_EMPTY_SEPARATOR = setOf(
"-Xbootclasspath/p:",
"-Xlog:",
"-Xloggc:",
"--finalization="
"--finalization=",
"--illegal-access="
)
private val LOG = Logger.getInstance(JavaShellCommandSpecsProvider::class.java)