Saber for VS Code [中文]
This extension includes many useful utilities for Java. To make the vscode work as Eclipse or IDEA when you are coding in java.
It makes users coding in java more efficient. Here`s a list of features:
- New: Java files(annotation/class/interface/enum/package/JSP/HTML)
- Generate Getters and Getters
- Copy Qualified Name
- Sort Project By Name
- Run Maven Goals
- Generate Docs
Some features ready to do:
- JDK (version 1.8.0 or later)
- VS Code (version 1.19.0 or later)
- Install from the Marketplace, you can find it by typing: "vscode-java-saber" "Java IDE"
How To Use
PS: These functions are implemented by parsing strings in java files. Therefore, your codes should best meet the specification of java.
Method 1: Right click on a java file or a directory in the explorer
Method 2: You must open a java file in text editor => ctrl + shift + p => type: java new
It will create a java file in the same directory of the opened file.
Generate Getters and Setters
Known issue: When the inner class is defined in the class, there will be problems with generating getters and setters
Method 1: Right click on the opened java file in the editor
Method 2: You must open a java file in text editor => ctrl + shift + p => type: getter setter
Method 3: Use keyboard shortcut 'alt + insert'
Copy Qualified Name
Method 1: Right click on the opened java file in the explorer
Method 2: You must open a java file in text editor => ctrl + shift + p => type: copy qualified name
Method 3: Right click on the opened java file in the editor
Sort Project By Name
Edit the config "ide.projectAutoSort" to true, it will auto sort projects by name when adding a project to the workspace, default is false
Run Maven Goals
Edit the config "ide.mavenDefaultGoals" to what you like, default is "clean install -Dmaven.test.skip=true" and "clean install"
- Method 1: Right click on a pom.xml file
Select the codes you want to generate java docs as below
Then right click on the opened java file in the editor or use keyboard shortcut 'alt + i'
Feedback and Questions
You can find the full list of issues at Issue Tracker. You can submit a bug or feature suggestion.
Dual-licensed under BSD 2-Clause License and GPLv2 with the Classpath Exception.
This extention is included into "Java IDE Pack" extention pack.