-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJava.hx
61 lines (57 loc) · 2.26 KB
/
Java.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* SPDX-FileCopyrightText: © Sebastian Thomschke and contributors
* SPDX-FileContributor: Sebastian Thomschke
* SPDX-License-Identifier: MIT
* SPDX-ArtifactOfProjectHomePage: https://github.com/sebthom/more-clink-completions
*/
package more_clink_completions.completions;
import clink.api.ArgMatcher;
import clink.api.Clink;
import clink.util.Suggest;
class Java {
public static function register() {
Clink.argMatcher("java").setDelayedInitializer(registerNow);
}
static function registerNow(parser:ArgMatcher, commandWord:String) {
parser //
.addFlags(["-cp", "-classpath", "--class-path"], Suggest.filesEndingWith(".jar"))
.addFlags(["-p", "--module-path", "--upgrade-module-path"], Suggest.dirs) //
//
.addFlag("--add-modules", ["ALL-DEFAULT", "ALL-SYSTEM", "ALL-MODULE-PATH"])
.addFlag("--enable-native-access", "") //
.addFlag("--list-modules")
.addFlags(["-d", "--describe-module", "--upgrade-module-path"], "") //
//
.addFlag("--dry-run")
.addFlag("--validate-modules") //
//
// -D<name>=<value>
//
.addFlags(["-verbose:class", "-verbose:module", "-verbose:gc", "-verbose:jni"])
//
.addFlags(["-version", "--version", "-showversion", "--show-version"])
.addFlag("--show-module-resolution")
.addFlags(["-?", "-h", "-help", "--help"])
.addFlags(["-X", "--help-extra"]) //
//
// -ea[:<packagename>...|:<classname>]
// -enableassertions[:<packagename>...|:<classname>]
// -da[:<packagename>...|:<classname>]
// -disableassertions[:<packagename>...|:<classname>]
//
.addFlags(["-esa", "-enablesystemassertions"])
.addFlags(["-dsa", "-disablesystemassertions"]) //
//
// -agentlib:<libname>[=<options>]
// -agentpath:<pathname>[=<options>]
// -javaagent:<jarpath>[=<options>]
// -splash:<imagepath>
// @argument files
// -disable-@files
//
.addFlag("--enable-preview")
//
.addFlag("-jar", Suggest.filesEndingWith(".jar"))
.addFlags(["-m", "--module"], "");
}
}