Skip to content

Commit 17d822a

Browse files
committed
README updates
1 parent f42e1bf commit 17d822a

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

README.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,27 @@
2929
[![License](https://img.shields.io/github/license/oracle/javavscode?style=for-the-badge&logo=apache)](https://github.com/oracle/javavscode/blob/main/LICENSE.txt)
3030

3131
Java Platform extension from Oracle brings full featured development support (edit-compile-debug & test cycle) to VS Code. It also offers support for Maven and Gradle projects. Applications using JDK 8 and above are supported.
32+
33+
3234
## Getting Started
33-
1. Setting up the JDK
35+
1. VS Code Tips
36+
- To install and update extensions refer to [extensions](https://code.visualstudio.com/docs/getstarted/extensions).
37+
- Search for a command by opening the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and typing the keywords.
38+
- Keyboard Shortcut:
39+
- Windows/Linux: `Ctrl+Shift+P`
40+
- macOS: `Shift+Command+P`
41+
- Type `>` in the search bar at the top.
42+
- User input box opens at the top whenever input is required.
43+
2. Setting up the JDK
3444
- If no JDK is present in your system then the extension can set things up for you. For more details refer to [JDK Downloader](#jdk-downloader) section.
35-
- Set the JDK in the `View | Command Palette | Preferences: Open User Settings | Jdk: Jdkhome` setting to point to the JDK that the Language Server will run on and also by default use for running and compiling projects.
45+
- Set the JDK in the `Open Settings | Jdk: Jdkhome` setting to point to the JDK that the Language Server will run on and also by default use for running and compiling projects.
3646
- The extension requires JDK 17 or newer to run.
37-
- Optionally, set a different JDK to compile and run projects in the `View | Command Palette | Preferences: Open User Settings | Jdk › Project: Jdkhome` setting.
47+
- Optionally, set a different JDK to compile and run projects in the `Open Settings | Jdk › Project: Jdkhome` setting.
3848
- By default, the __jdk.jdkhome__ setting is used.
3949
- Projects can run on JDK 8 and above.
4050
- For more information, see the section [Selecting the JDK](#selecting-the-jdk).
41-
4. Use any one of the following ways to start coding, compiling and debugging in Java.
42-
- Simply create a new Java class with `public static void main(String[] args)` method.
51+
3. Use any one of the following ways to start coding, compiling and debugging in Java.
52+
- Simply create a new Java class with `main` method.
4353
- Use the __Java: New File from Template...__ command to create a new Java file.
4454
- Use the __Java: New Project...__ command to create a new project.
4555
- Open the folder with existing __Maven__ or __Gradle__ project files (_pom.xml_ or _build.gradle, gradle.properties_).
@@ -70,9 +80,11 @@ Project Explorer provides an overview of logical project structure, groups sourc
7080
* Experience interactive coding with Java notebooks.
7181
Use the __Java: Create New Notebook...__ command to create a new Java notebook(`.ijnb` file)
7282
![Java Notebook](vscode/images/java_notebook.gif)
83+
* Add code snippets with `+ Code` button and document with markdown cells with `+ Markdown`.
84+
* Double click on a cell to edit and hit `Esc` when done.
7385
* Jupyter-style notebooks let you combine Java code snippets with markdown-formatted text cells.
7486
* Run individual code cells or execute the entire notebook.
75-
* Save outputs alongside code cells.
87+
* Can save outputs alongside code cells.
7688
* Sharing notebooks
7789
* Share as `.ijnb` files for use with Oracle Java extension.
7890
* Rename with `.ipynb` for viewing in other IDEs Jupyter etc.
@@ -176,24 +188,24 @@ Move members refactoring provides dedicated form as well.
176188
## Formatter Preferences
177189
Easily update default formatter preferences by adjusting a simple configuration option to tailor settings according to specific needs.
178190

179-
Go to VSCode `View | Command Palette | Preferences:Open User Settings | Extensions | Java` and set `Jdk › Format: Settings Path:` option to the formatter preferences file.
191+
Go to VSCode `Open Settings | Extensions | Java` and set `Jdk › Format: Settings Path:` option to the formatter preferences file.
180192

181193
Please refer to [Java formatting preferences](https://github.com/oracle/javavscode/wiki/Java-formatting-preferences) wiki for more info.
182194

183195
## Hints Preferences
184196
Easily update default hint preferences by adjusting a simple configuration option to tailor hint preferences to specific needs.
185197

186-
Go to VSCode `View | Command Palette | Preferences:Open User Settings | Extensions | Java` and set `Jdk › Hints: Preferences:` option to the xml hint preferences file.
198+
Go to VSCode `Open Settings | Extensions | Java` and set `Jdk › Hints: Preferences:` option to the xml hint preferences file.
187199

188200
## Organize Imports
189201
Out of the box support for organizing imports in Java sources is available. It removes unused imports, groups imports by packages and updates your imports whenever a file is saved. In addition to the defaults, there is a rich set of configuration options.
190202

191-
Go to VSCode `View | Command Palette | Preferences:Open User Settings | Extensions | Java` and search for _Jdk_ to set `Jdk > Java > Imports:` options:
203+
Go to VSCode `Open Settings | Extensions | Java` and search for _Jdk_ to set `Jdk > Java > Imports:` options:
192204
* `Count For Using Star Import` - Class count to use a star-import, 999 is the default value
193205
* `Count For Using Static Star Import` - Members count to use a static star-import, 999 is the default value
194206
* `Groups` - Groups of import statements (specified by their package prefixes) and their sorting order. Import statements within a group are ordered alphabetically
195207

196-
And `View | Command Palette | Preferences:Open User Settings | Extensions > Java > On Save: Organize Imports` - Enable organize imports action on a document save
208+
And `Open Settings | Extensions > Java > On Save: Organize Imports` - Enable organize imports action on a document save
197209

198210
## JavaDoc smart editing
199211
When adding JavaDoc to code Oracle Java Platform extension assists by suggesting to insert preformatted and prepopulated JavaDoc comment. Type `/**` above method signature and IDE offers to complete the JavaDoc. The action creates JavaDoc comment with all arguments prepared.
@@ -222,9 +234,9 @@ As soon as one of the settings is changed, the Language Server is restarted.
222234

223235
## How to use JDK early access builds
224236
This setup makes it easier to experiment with early access JDK builds. Follow these steps to enable the use of an early access JDK:
225-
Step-1: Navigate to `View | Command Palette | Preferences:Open User Settings | Jdk > Advanced > Disable: Nbjavac` and enable the checkbox.
237+
Step-1: Navigate to `Open Settings | Jdk > Advanced > Disable: Nbjavac` and enable the checkbox.
226238

227-
Step-2: Set the JDK in `View | Command Palette | Preferences:Open User Settings (JSON) ...` by updating the __jdk.jdkhome__ setting to point to the early access JDK path.
239+
Step-2: Set the JDK in `Open Settings | Jdk: Jdkhome` to point to the early access JDK path.
228240

229241
## Troubleshooting
230242
If your extension is not starting and throwing some error like no JDK found even if you have a working JDK installed in your machine, then you can try deleting cache for the workspace using `View | Command Palette | Delete oracle java extension cache for this workspace`.

vscode/images/java_notebook.gif

105 KB
Loading

vscode/images/jshell.gif

-252 KB
Loading

vscode/images/project_notebook.gif

18.2 KB
Loading

0 commit comments

Comments
 (0)