jisedlac commented on a change in pull request #2546: URL: https://github.com/apache/netbeans/pull/2546#discussion_r526739863
########## File path: java/java.lsp.server/vscode/README.md ########## @@ -21,80 +21,39 @@ --> +This is a technology preview of [Apache NetBeans](http://netbeans.org) +based extension for VSCode. Use it to get all the _goodies of NetBeans_ +via the VSCode user interface! Run on __JDK8__[1], __JDK11__, __JDK15__, etc. -Get all the goodies of NetBeans via the VSCode user interface! +[1]: <http://github.com/oracle/nb-javac> "Running on JDK8 requires additional download of GPLv2 with ClassPath Exception code" -## Building +Invoke "Open Folder" action to open project directories with `pom.xml` or `build.gradle` +build scripts. Edit, compile and debug (with the __Java 8+__ debugger configuration) +the `.java` application and test files in such projects. Debug not only Java code, +but JavaScript, Python, Ruby polyglot programs at once. -To build the VS Code extension invoke: +## Getting Started -```bash -netbeans$ ant build -netbeans$ cd java/java.lsp.server -java.lsp.server$ ant build-vscode-ext -D3rdparty.modules=.*nbjavac.* -``` +Follow the +[online instructions](https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+extension+for+Visual+Studio+Code) +to set your environment up to support +[typical development use-cases](https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+extension+for+Visual+Studio+Code). -The `3rdparty.modules` property doesn't have to be set at all. -The resulting extension is then in the `build` directory, with the `.vsix` extension. +## Supported Actions -### Building for Development +* __Java: Compile Workspace__ - invoke Maven or Gradle build +* __GraalVM: Pause in Script__ - place a breakpoint into first executed polyglot script +* debugger __Java 8+__ - start test or main class on JDK8+ in polyglot mode -If you want to develop the extension, use these steps for building instead: +## Supported Options -```bash -netbeans$ cd java/java.lsp.server -java.lsp.server$ ant build-lsp-server -D3rdparty.modules=.*nbjavac.* -java.lsp.server$ cd vscode -vscode$ npm install -vscode$ npm run watch -``` - -The `3rdparty.modules` property doesn't have to be set at all. -This target is faster than building the `.vsix` file. Find the instructions -for running and debugging below. - -### Cleaning - -Often it is also important to properly clean everything. Use: - -```bash -java.lsp.server$ ant clean-vscode-server -java.lsp.server$ cd ../.. -netbeans$ ant clean -``` - -## Running and Debugging - -Have a sample Maven project, open it in NetBeans first and select the main file for both -the Run and Debug actions. - -To use the extension created for developement you can run VSCode with -following parameter: - -```bash -vscode$ code --extensionDevelopmentPath=`pwd` path_to_the_maven_project -``` - -Or you can open the `vscode` folder in `code` directly and use **F5** to -debug the extension's *typescript code*. - -To debug the *Java code*, launch the NetBeans part of the VSCode system first -and specify suitable debug arguments: - -```bash -vscode$ npm run nbcode -- --jdkhome /jdk-14/ -J-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 -``` - -Connect to the process with Java debugger, setup all breakpoints. Then launch -and connect from the VSCode extension: - -```bash -vscode$ code --extensionDevelopmentPath=`pwd` path_to_the_maven_project -``` +* __netbeans.jdkhome__ - path to the JDK, see dedicated section below +* __netbeans.verbose__ - enables verbose extension logging +* __netbeans.conflict.check__ - avoid conflicts with other Java extensions, see below ## Selecting the JDK -The NbCode Java part needs to run on a JDK. The JDK is being searched in +The VSNetBeans Java part needs to run on a JDK. The JDK is being searched in Review comment: I believe the user is searching for the definition of JDK which runs/debugs the project. This is not immediately clear here. What about this wording? "The project is built, run and debugged using the same JDK which runs the VSNetBeans Java part. The JDK is being searched in following locations:" ---------------------------------------------------------------- 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
