[Java] Add options related to the agent in java command

IDEA-359564

GitOrigin-RevId: d0e146d0a3cae4012102ad93f7aa95f5dc20a4a2
This commit is contained in:
Georgii Ustinov
2024-09-24 14:04:18 +00:00
committed by intellij-monorepo-bot
parent 026ce3349f
commit 84bd0f28bc
2 changed files with 34 additions and 0 deletions
@@ -79,5 +79,11 @@ java.command.terminal.enable.preview.option.description=Allows classes to depend
java.command.terminal.verbose.option.description=Enables verbose output for the given subsystem.
java.command.terminal.verbose.option.argument.text.8=class|gc|gni
java.command.terminal.verbose.option.argument.text.11=class|module|gc|gni
java.command.terminal.agentlib.option.description=Loads native agent library \\<libname\\>.
java.command.terminal.agentlib.option.argument.text=<libname>[=<options>]
java.command.terminal.agentpath.option.description=Loads native agent library by full \\&lt;pathname\\&gt;.
java.command.terminal.agentpath.option.argument.text=<pathname>[=<options>]
java.command.terminal.javaagent.option.description=Loads Java programming language agent by \\&ltjarpath\\&gt;.
java.command.terminal.javaagent.option.argument.text=<jarpath>[=<options>]
error.stream.name=error
output.stream.name=output
@@ -90,6 +90,34 @@ class JavaShellCommandSpecsProvider : ShellCommandSpecsProvider {
isOptional = true
}
}
option("-agentlib") {
description(JavaTerminalBundle.message("java.command.terminal.agentlib.option.description"))
separator = ":"
repeatTimes = 0
argument {
displayName(JavaTerminalBundle.message("java.command.terminal.agentlib.option.argument.text"))
}
}
option("-agentpath") {
description(JavaTerminalBundle.message("java.command.terminal.agentpath.option.description"))
separator = ":"
repeatTimes = 0
argument {
displayName(JavaTerminalBundle.message("java.command.terminal.agentpath.option.argument.text"))
}
}
option("-javaagent") {
description(JavaTerminalBundle.message("java.command.terminal.javaagent.option.description"))
separator = ":"
repeatTimes = 0
argument {
displayName(JavaTerminalBundle.message("java.command.terminal.agentpath.option.argument.text"))
}
}
argument {
displayName(JavaTerminalBundle.message("java.command.terminal.argument.main.class.text"))
suggestions(ShellDataGenerators.fileSuggestionsGenerator())