leshan icon indicating copy to clipboard operation
leshan copied to clipboard

Visual studio code workspace settings for java

Open jvermillard opened this issue 2 years ago • 5 comments

Signed-off-by: Julien Vermillard [email protected]

jvermillard avatar Jul 18 '22 16:07 jvermillard

Does it need to install anything (some vscode plugin) or it works out of the box ?

sbernard31 avatar Jul 19 '22 08:07 sbernard31

you need the official java extension (IIRC there is a popup proposing to install the first time you open a java file)

jvermillard avatar Jul 19 '22 09:07 jvermillard

I didn't get the popup but I guess this should be this one : https://marketplace.visualstudio.com/items?itemName=redhat.java

sbernard31 avatar Jul 19 '22 13:07 sbernard31

Looking at : https://github.com/redhat-developer/vscode-java/wiki/Formatter-settings

I see that vscode also supports configuration in .setting folder.

You can also define the formatting preferences in your project's .settings/org.eclipse.jdt.core.prefs. It will override global formatting settings.

Currently this is possible to create those files with : mvn resources:copy-resources@configure-eclipse

But I guess, the root .vscode file is even better.

sbernard31 avatar Jul 19 '22 13:07 sbernard31

I need to re-check but the last time I tried that it was not working. Apparently it a bug which was fixed in vscode long time ago :thinking:

jvermillard avatar Aug 22 '22 11:08 jvermillard