Skip to content

jiangdequan/vscode-java-ide

Repository files navigation

Java IDE: Saber logo

Saber for VS Code [中文]

Marketplace Version Visual Studio Marketplace Platform Language License

This extension includes many useful utilities for Java. To make the vscode work as Eclipse or IDEA when you are coding in java.
These functions are implemented by parsing strings in java files. Therefore, your codes should best meet the specification of java.
If you have some good ideas, you can submit a feature suggestion here.

Overview

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:

  • Rename Java File

Requirements

  • JDK (version 1.8.0 or later)
  • VS Code (version 1.19.0 or later)

Install

  • Install from the Marketplace, you can find it by typing: "vscode-java-saber" "Java IDE"

How To Use

New

  • Method 1: Right click on a java file or a directory in the explorer Alt text Alt text

  • Method 2: You must open a java file in text editor => ctrl + shift + p => type: java new Alt text 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 Alt text

  • Method 2: You must open a java file in text editor => ctrl + shift + p => type: getter setter Alt text

  • Method 3: Use keyboard shortcut 'alt + insert'

Copy Qualified Name

  • Method 1: Right click on the opened java file in the explorer Alt text

  • Method 2: You must open a java file in text editor => ctrl + shift + p => type: copy qualified name Alt text

  • Method 3: Right click on the opened java file in the editor Alt text

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

  • Method 1: Right click on the project explorer Alt text

  • Method 2: ctrl + shift + p => type: Sort Project By Name Alt text

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 Alt text Alt text

Generate Docs

  • Method 1:
  1. Select the codes you want to generate java docs as below Alt text Alt text

  2. Then right click on the opened java file in the editor or use keyboard shortcut 'alt + i' Alt text

Feedback and Questions

You can find the full list of issues at Issue Tracker. You can submit a bug or feature suggestion.

License

Dual-licensed under BSD 2-Clause License and GPLv2 with the Classpath Exception.

This extention is included into "Java IDE Pack" extention pack.