Skip to content

Visual studio code workspace settings for java#1289

Open
jvermillard wants to merge 1 commit intomasterfrom
vscode-settings
Open

Visual studio code workspace settings for java#1289
jvermillard wants to merge 1 commit intomasterfrom
vscode-settings

Conversation

@jvermillard
Copy link
Copy Markdown
Contributor

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

@sbernard31
Copy link
Copy Markdown
Contributor

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

@jvermillard
Copy link
Copy Markdown
Contributor Author

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

@sbernard31
Copy link
Copy Markdown
Contributor

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

Comment thread .vscode/settings.json
@@ -0,0 +1,6 @@
{
"java.format.settings.url": "https://raw.githubusercontent.com/eclipse/leshan/master/eclipse/eclipse-code-style.xml",
Copy link
Copy Markdown
Contributor

@sbernard31 sbernard31 Jul 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using the file in local repository ?

Suggested change
"java.format.settings.url": "https://raw.githubusercontent.com/eclipse/leshan/master/eclipse/eclipse-code-style.xml",
"java.format.settings.url": "./eclipse/eclipse-code-style.xml",

@sbernard31
Copy link
Copy Markdown
Contributor

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.

@jvermillard
Copy link
Copy Markdown
Contributor Author

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 🤔

@sonarqubecloud
Copy link
Copy Markdown

@sbernard31
Copy link
Copy Markdown
Contributor

What do we do with that ?
Should we finalize it OR should I close the PR ?

@sbernard31
Copy link
Copy Markdown
Contributor

@jvermillard what should we do with that ?

We close it ? or we make it works ? 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants