public final class ProjectActions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TOKEN_JAVAEXEC_ARGS
Replaceable token for program parameters as a commandline option.
|
static String |
TOKEN_JAVAEXEC_CWD
Replaceable token for program working directory.
|
static String |
TOKEN_JAVAEXEC_ENV
Replaceable token for program environment variables.
|
static String |
TOKEN_JAVAEXEC_JVMARGS
Replaceable token for JVM arguments project property.
|
public static String TOKEN_JAVAEXEC_JVMARGS
action-mapping.xml
that can be customized by the user. This feature cooperates with
NetBeans Tooling Gradle plugin provided by org.netbeans.gradle module.
action-mapping.xml
as followes:
<actions> <apply-for plugins="application"> <action name="run"> <args>run ${javaExec.jvmArgs} ${javaExec.args}</args> </action> <action name="debug"> <args>run --debug-jvm ${javaExec.jvmArgs} ${javaExec.args}</args> </action> </apply-for> </actions>
ExplicitProcessParameters
from the action's context Lookup, and populates the replaceable token mapping.
ExplicitProcessParameters
params =ExplicitProcessParameters
.builder(). args("Frodo"). launcherArg("-verbose"). build();ExplicitProcessParameters
params2 =ExplicitProcessParameters
.builder(). args("Baggins").replaceArgs(false). launcherArg("-Dcompanion=Sam"). build();ActionProvider
actions = project.getLookup().lookup(ActionProvider
.class); assert actions != null : "No actions available"; // Invoke the project action, with two explicit params actions.invokeAction(ActionProvider
.COMMAND_RUN,Lookups
.fixed( params, params2 ));
public static String TOKEN_JAVAEXEC_ARGS
ProjectActions.TOKEN_JAVAEXEC_JVMARGS
for code examples.public static String TOKEN_JAVAEXEC_CWD
action-mapping.xml
and can be customized by the user. This feature cooperates with NetBeans Tooling Gradle plugin provided by org.netbeans.gradle module.
The Gradle Java project support consumes ExplicitProcessParameters
from the action's context Lookup, and populates the replaceable token mapping
from ExplicitProcessParameters.getWorkingDirectory()
.public static String TOKEN_JAVAEXEC_ENV
action-mapping.xml
and can be customized by the user. This feature cooperates with NetBeans Tooling Gradle plugin provided by org.netbeans.gradle module.
The Gradle Java project support consumes ExplicitProcessParameters
from the action's context Lookup, and populates the replaceable token mapping
from ExplicitProcessParameters.getEnvironmentVariables()
.