mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[Java] IDEA-385246 javac extra options completion in terminal
GitOrigin-RevId: 8e4e0e9993b29b0e1a55cb88cc19ba7e5ea63927
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cb873a1dd7
commit
3b64d3885a
@@ -105,4 +105,20 @@ private val UI_OPTION_INFO_MAP = mapOf(
|
||||
"--system" to UIOptionInfo(argumentName = "jdk"),
|
||||
"--target" to UIOptionInfo(argumentName = "release"),
|
||||
"--upgrade-module-path" to UIOptionInfo(argumentName = "path", suggestionsGenerator = ShellDataGenerators.fileSuggestionsGenerator()),
|
||||
"--add-exports" to UIOptionInfo(repeatTimes = 0, argumentName = "module/package=other-module(,other-module)*"),
|
||||
"--add-reads" to UIOptionInfo(repeatTimes = 0, argumentName = "module=other-module(,other-module)*"),
|
||||
"--default-module-for-created-files" to UIOptionInfo(argumentName = "module-name"),
|
||||
"--patch-module" to UIOptionInfo(repeatTimes = 0, argumentName = "module=path"),
|
||||
"-Xbootclasspath:" to UIOptionInfo(separator = "", argumentName = "path"),
|
||||
"-Xbootclasspath/a:" to UIOptionInfo(separator = "", argumentName = "path"),
|
||||
"-Xbootclasspath/p:" to UIOptionInfo(separator = "", argumentName = "path"),
|
||||
"-Xdiags:" to UIOptionInfo(separator = "", isArgumentOptional = true, argumentName = "compact|verbose"),
|
||||
"-Xdoclint:" to UIOptionInfo(separator = "", argumentName = "(none|all)"),
|
||||
"-Xdoclint/package:" to UIOptionInfo(separator = "", argumentName = "(none|all)"),
|
||||
"-Xlint:" to UIOptionInfo(separator = "", argumentName = "[-]key(,[-]key)*"),
|
||||
"-Xmaxerrs" to UIOptionInfo(argumentName = "number"),
|
||||
"-Xmaxwarns" to UIOptionInfo(argumentName = "number"),
|
||||
"-Xpkginfo:" to UIOptionInfo(separator = "", argumentName = "always|legacy|nonempty", isArgumentOptional = true),
|
||||
"-Xplugin:" to UIOptionInfo(separator = "", argumentName = "name"),
|
||||
"-Xprefer:" to UIOptionInfo(separator = "", argumentName = "source|newer", isArgumentOptional = true),
|
||||
)
|
||||
+6
@@ -44,6 +44,12 @@ internal class JavacShellCommandSpecsProviderTest(engine: TerminalEngine) : JdkC
|
||||
UsefulTestCase.assertContainsElements(fixture.getCompletionNames("javac "), listOf("--enable-preview", "--release", "--source", "--target"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `extra options are present`() = runBlocking {
|
||||
val fixture = createFixture()
|
||||
UsefulTestCase.assertContainsElements(fixture.getCompletionNames("javac "), listOf("-Xlint", "-Xbootclasspath:"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `classpath suggestion generator`() = runBlocking {
|
||||
val separator = JavaShellCommandUtils.getClassPathSeparator()
|
||||
|
||||
+2
@@ -88,6 +88,8 @@ internal abstract class JdkCommandsShellSpecsProviderTestBase(private val engine
|
||||
VMOption("source", null, null, VMOptionKind.Standard, null, VMOptionVariant.DASH_DASH),
|
||||
VMOption("target", null, null, VMOptionKind.Standard, null, VMOptionVariant.DASH_DASH),
|
||||
VMOption("experimental", null, null, VMOptionKind.Experimental, null, VMOptionVariant.DASH_DASH),
|
||||
VMOption("lint", null, null, VMOptionKind.Product, null, VMOptionVariant.X),
|
||||
VMOption("bootclasspath:", null, null, VMOptionKind.Product, null, VMOptionVariant.X),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user