This is an automated email from the ASF dual-hosted git repository. sdedic pushed a commit to branch vsnetbeans_1603 in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/vsnetbeans_1603 by this push: new 5f137d0a9f2 Temporary fix: Support extra cluster directories. new 9f79279995f Merge pull request #5350 from sdedic/vscode-launch-fix 5f137d0a9f2 is described below commit 5f137d0a9f2bef979ec26946cf88b4cf8d199dbb Author: Svata Dedic <svatopluk.de...@oracle.com> AuthorDate: Mon Jan 23 13:42:26 2023 +0100 Temporary fix: Support extra cluster directories. --- java/java.lsp.server/vscode/src/nbcode.ts | 4 +--- platform/o.n.bootstrap/src/org/netbeans/MainImpl.java | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/java/java.lsp.server/vscode/src/nbcode.ts b/java/java.lsp.server/vscode/src/nbcode.ts index 1130c67d8d7..6df035717f9 100644 --- a/java/java.lsp.server/vscode/src/nbcode.ts +++ b/java/java.lsp.server/vscode/src/nbcode.ts @@ -69,6 +69,7 @@ export function launch( if (info.verbose) { ideArgs.push('-J-Dnetbeans.logger.console=true'); } + ideArgs.push(`-J-Dnetbeans.extra.dirs="${clusterPath}"`) if (env['netbeans.extra.options']) { ideArgs.push(env['netbeans.extra.options']); } @@ -81,9 +82,6 @@ export function launch( let process: ChildProcessByStdio<any, Readable, Readable> = spawn(nbcodePath, ideArgs, { cwd : userDir, stdio : ["ignore", "pipe", "pipe"], - env : Object.assign({ - 'extra_clusters' : clusterPath - }, global.process.env) }); return process; } diff --git a/platform/o.n.bootstrap/src/org/netbeans/MainImpl.java b/platform/o.n.bootstrap/src/org/netbeans/MainImpl.java index b812f970b2b..2dc5ba137bc 100644 --- a/platform/o.n.bootstrap/src/org/netbeans/MainImpl.java +++ b/platform/o.n.bootstrap/src/org/netbeans/MainImpl.java @@ -119,6 +119,19 @@ final class MainImpl extends Object { } // #34069: need to do the same for nbdirs. String nbdirs = System.getProperty("netbeans.dirs"); // NOI18N + String extNbDirs = System.getProperty("netbeans.extra.dirs"); // NOI18N + if (extNbDirs != null) { + // support for potential spaces in the cluster path: + if (extNbDirs.startsWith("\"")) { + extNbDirs = extNbDirs.substring(1, extNbDirs.lastIndexOf('"')); + } + if (nbdirs == null) { + nbdirs = extNbDirs; + } else { + nbdirs = nbdirs + File.pathSeparator + extNbDirs; + } + System.setProperty("netbeans.dirs", nbdirs); // NOI18N + } if (nbdirs != null) { StringTokenizer tok = new StringTokenizer(nbdirs, File.pathSeparator); while (tok.hasMoreTokens()) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists