New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of setting the current working directory and environment variables. #3180
Conversation
cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/CPPLiteDebugger.java
Outdated
Show resolved
Hide resolved
ide/extexecution.base/src/org/netbeans/api/extexecution/base/ExplicitProcessParameters.java
Show resolved
Hide resolved
...a.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java
Outdated
Show resolved
Hide resolved
...a.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java
Outdated
Show resolved
Hide resolved
java/maven/src/org/netbeans/modules/maven/runjar/LaunchArgPrereqsChecker.java
Show resolved
Hide resolved
java/maven/src/org/netbeans/modules/maven/runjar/LaunchArgPrereqsChecker.java
Outdated
Show resolved
Hide resolved
cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/CPPLiteDebuggerConfig.java
Show resolved
Hide resolved
323553f
to
e818ef7
Compare
…ables for Java8+ VSCode projects.
e818ef7
to
371f003
Compare
Gradle implementation added, thanks @sdedic for hints. Tests and Javadoc added. |
...lite.debugger/test/unit/src/org/netbeans/modules/cpplite/debugger/ProcessParametersTest.java
Show resolved
Hide resolved
...lite.debugger/test/unit/src/org/netbeans/modules/cpplite/debugger/ProcessParametersTest.java
Show resolved
Hide resolved
ide/nativeimage.api/src/org/netbeans/modules/nativeimage/api/debug/StartDebugParameters.java
Show resolved
Hide resolved
* @param command the command to run the native image. | ||
* @return a new builder | ||
*/ | ||
public static Builder newBuilder(List<String> command) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this method be more usable with vargargs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, ExplicitProcessParameters
and ProcessBuilder
have both list and vararg methods. List is used in the implementation, hence I've added a list method into the API. A method that takes vararg can be easily added in the future when the appropriate use-case emerges.
@@ -110,6 +110,18 @@ | |||
in action's context Lookup. See <a href="@TOP@/org/netbeans/modules/gradle/java/api/ProjectActions.html#TOKEN_JAVAEXEC_ARGS">ProjectActions.TOKEN_JAVAEXEC_ARGS</a> | |||
for more details. | |||
</api> | |||
<api category="stable" group="property" name="javaExec.runWorkingDir" type="export"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is type="import"
as you are importing/using the Gradle API here. Thanks for documenting the contract anyway!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there's export
for other properties as well. IMHO the idea is, that these properties are created from ExplicitProcessParameters
. We are essentially providing property values that are used in NetBeansRunSinglePlugin.groovy
then.
Extending ExplicitProcessParameters with working directory and environment.
Adapted for Maven and native image.
Gradle support is TBD.