Daniele
Daniele

Reputation: 329

Does Visual Studio Code provide a procedure/snippet to create a new Java class file similar to Eclipse?

I'm playing with VS Code and I'm wondering if there is a way to quickly create a new class file in a project similar to others popular IDEs. At the moment I'm stuck to manually creating the new file, naming it something.java, and fill it with the necessary code. I've already installed the common Java extensions pack (debugger, dep.viewer, language support, maven).

Any clue? Maybe a third party extension?

Upvotes: 1

Views: 640

Answers (1)

Daniel
Daniel

Reputation: 1594

The only shortcut I know so far is to use the code templates. Create the new file, name it accordingly ("example.java") and enter "class" or "interface" in the new file. Then hit + and select the correct suggestion: enter image description here

VSC then creates a skeleton for the class/interface based on the filename.

Upvotes: 5

Related Questions