JaroslavTulach commented on a change in pull request #2494:
URL: https://github.com/apache/netbeans/pull/2494#discussion_r512085171
##########
File path: java/java.lsp.server/vscode/src/nbcode.ts
##########
@@ -86,7 +88,8 @@ if (typeof process === 'object' && process.argv0 === 'node') {
}
let clusters = fs.readdirSync(nbcode).filter(c => c !== 'bin' && c !==
'etc').map(c => path.join(nbcode, c));
let args = process.argv.slice(2);
- let globalStorage = path.join(os.homedir(), '.config', 'Code', 'User',
'globalStorage', 'jlahoda.apache-netbeans-java');
+ let json = JSON.parse("" + fs.readFileSync(path.join(extension,
'package.json')));
+ let globalStorage = path.join(os.homedir(), '.config', 'Code', 'User',
'globalStorage', json.publisher + '.' + json.name);
Review comment:
While at it, let also read the `publisher` and extension `name` from the
actual `package.json` file. E.g. as soon as the publisher is changed from
`jlahoda` to `apache`, the userdir stays synchronized between `npm run nbcode`
and the actual global storage directory from inside of the VSCode extension.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists