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 2020/10/26 16:12:23 UTC

[GitHub] [netbeans] JaroslavTulach opened a new pull request #2494: Where is the NbCode userdir?

JaroslavTulach opened a new pull request #2494:
URL: https://github.com/apache/netbeans/pull/2494


   Sváťa has just asked: where can I find `messages.log`? The answer is `$HOME/.config/Code/User/globalStorage/jlahoda.apache-netbeans-java/userdir/var/log/messages.log` but the problem is - the log isn't there!
   
   Turns out I have deleted the `--userdir` option in one of the refactorings. This PR fixes that.
   
   


----------------------------------------------------------------
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:
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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2494: Where is the NbCode userdir?

Posted by GitBox <gi...@apache.org>.
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.




----------------------------------------------------------------
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:
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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2494: Where is the NbCode userdir?

Posted by GitBox <gi...@apache.org>.
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:
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


[GitHub] [netbeans] JaroslavTulach merged pull request #2494: Where is the NbCode userdir?

Posted by GitBox <gi...@apache.org>.
JaroslavTulach merged pull request #2494:
URL: https://github.com/apache/netbeans/pull/2494


   


----------------------------------------------------------------
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:
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