You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/12/11 09:39:44 UTC
[GitHub] [netbeans] sdedic commented on a change in pull request #3364: Merge the code lens actions with the launch config properties and adapt Gradle to apply env.
sdedic commented on a change in pull request #3364:
URL: https://github.com/apache/netbeans/pull/3364#discussion_r767135047
##########
File path: extide/gradle/src/org/netbeans/modules/gradle/execute/GradleDaemonExecutor.java
##########
@@ -383,6 +411,88 @@ private static String gradleExecutable() {
return Utilities.isWindows() ? "bin\\gradle.bat" : "bin/gradle"; //NOI18N
}
+ private static String[] unescapeParameters(String s) {
+ final int NULL = 0x0;
Review comment:
I was trying to find a difference between this and `BaseUtilities.parseParameters` -- if it is there, please put a comment in the source, so maintainer(s) are aware about the important differences.
##########
File path: java/java.lsp.server/vscode/src/extension.ts
##########
@@ -356,6 +356,27 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
await commands.executeCommand(selected.userData.command.command, ...(selected.userData.command.arguments || []));
}
}));
+ const mergeWithLaunchConfig = (dconfig : vscode.DebugConfiguration) => {
Review comment:
Excellent ! This will perfectly work with the project view's actions (run project, debug project).
##########
File path: extide/gradle/src/org/netbeans/modules/gradle/execute/GradleDaemonExecutor.java
##########
@@ -282,6 +276,40 @@ public void statusChanged(org.gradle.tooling.events.ProgressEvent event) {
}
}
+ private boolean setPlatformAndEnv(BuildLauncher buildLauncher, GradleJavaPlatformProvider platformProvider, String runEnvironment) {
+ String javaHome = null;
+ if (platformProvider != null) {
+ try {
+ buildLauncher.setJavaHome(platformProvider.getJavaHome());
+ javaHome = platformProvider.getJavaHome().getCanonicalPath();
+ } catch (IOException ex) {
+ io.getErr().println(Bundle.NO_PLATFORM(ex.getMessage()));
+ gradleTask.finish(1);
+ return false;
+ }
+ }
+ if (javaHome != null || runEnvironment != null) {
+ Map<String, String> envs = new HashMap<>(System.getenv());
+ if (javaHome != null) {
Review comment:
I'd maybe put the `javaHome` last, so it overrides values in the environment acquired from `runEnvironment` project property.
@lkishalmi what's your opinion ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists