You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Be able to configure in settings JSON files the compiler error/warning/ignore levels #4125
Eclipse allows to configure the JDT compiler error/warning/ignore levels for many options. For example to ignore creating a class that extends an annotation (pretty common on CDI injections *Literal classes).
There is a quick fix:
But that action doesn't add anything to the settings files at any of the User/Workspace/Folder levels and there is no obvious ways to revert the action. Clean Language Server Workspace appear to do it, but it would be useful if all the compiler error level settings, could be individually controlled using VS Code settings files.
I have noticed that if .settings/org.eclipse.jdt.core.prefs is present, for example if the project was imported to an Eclipse workspace and m2eclipse auto generated it, Quick Fix setting are stored there.
The problem with this is that projects imported to Eclipse with m2eclipse, usually have .classpath, .project and .settings added to .gitignore, in order to not have duplicate configuration files (pom.xml and Eclipse ones). For someone still using Eclipse but testing a migration for this extension, this makes things complicated.
In an ideal world, this extension would use its own configuration settings more inline with VS Code conventions. I would love to have all compiler settings on a file on the project much like java.format.settings.url currently works for code formatter settings.
"Ignore compiler problem(s)" works as described at #1791 (comment) .
It now respects java.settings.url and will save the options there. If that setting is not defined / file doesn't exist, then the setting will be saved to the project metadata location (it applies the option for every Java project imported). A simple Java: Clean Java Language Server Workspace can be used to clear these out.
As for something like a settings JSON to configure more options :
Thanks @rgrunber. I missed thet java.settings.url could be used for compiler options because it was mentioned on the Java Formatter Options section first and missed it later, my mistake.
Directly on VS Code files would be nice. Currently there is no UI to build these files, unless you go to Eclipse and export them. If you are using plain VS Code having the settings directly, VS Code can give auto completion, and help directly on the JSON entries, reducing greatly the need to build a custom UI.
@rgrunber did you ever merge a UI to configure the compiler options for a project? If not, I think that'd be something worthwhile. I know UIs are discouraged and clunkky in VS Code, but I think we could deliver something a bit less clunky than manually editing the .prefs folder.
Okay, thanks. I was thinking this could be something @MeherSru could work on if not (or maybe she could help with the rebase), since the feature seems pretty helpful.
Activity
robmv commentedon Jul 25, 2025
I have noticed that if
.settings/org.eclipse.jdt.core.prefsis present, for example if the project was imported to an Eclipse workspace and m2eclipse auto generated it, Quick Fix setting are stored there.The problem with this is that projects imported to Eclipse with m2eclipse, usually have
.classpath,.projectand.settingsadded to.gitignore, in order to not have duplicate configuration files (pom.xml and Eclipse ones). For someone still using Eclipse but testing a migration for this extension, this makes things complicated.In an ideal world, this extension would use its own configuration settings more inline with VS Code conventions. I would love to have all compiler settings on a file on the project much like
java.format.settings.urlcurrently works for code formatter settings.rgrunber commentedon Jul 30, 2025
"Ignore compiler problem(s)" works as described at #1791 (comment) .
As for something like a settings JSON to configure more options :
There is a settings
java.settings.urlwhich takes a path to an Eclipse preference file (eg..vscode/settings.prefs. You can set your preferences in that file (eg.foo=bar). You can place anything from https://github.com/eclipse-jdtls/eclipse.jdt.ls/wiki/Language-Server-Settings-&-Capabilities#java-compiler-options there. See #2358 (comment) as an example.robmv commentedon Aug 4, 2025
Thanks @rgrunber. I missed thet
java.settings.urlcould be used for compiler options because it was mentioned on the Java Formatter Options section first and missed it later, my mistake.I still think that something like:
Directly on VS Code files would be nice. Currently there is no UI to build these files, unless you go to Eclipse and export them. If you are using plain VS Code having the settings directly, VS Code can give auto completion, and help directly on the JSON entries, reducing greatly the need to build a custom UI.
rgrunber commentedon Aug 5, 2025
That's fair. I think The VS Code Java pack provides a UI for the format settings, and I think I had a draft that converted the compiler options to a wizard using https://github.com/redhat-developer/vscode-wizard . Maybe I can look into reviving that.
datho7561 commentedon Jun 17, 2026
@rgrunber did you ever merge a UI to configure the compiler options for a project? If not, I think that'd be something worthwhile. I know UIs are discouraged and clunkky in VS Code, but I think we could deliver something a bit less clunky than manually editing the .prefs folder.
rgrunber commentedon Jun 18, 2026
I didn't. I think initially https://github.com/microsoft/vscode-java-pack/tree/main/src/project-settings had one but never migrated it to vscode-java. I can look through my old local branches and see if I still have something based off of vscode-wizard, if that approach is still useful.
datho7561 commentedon Jun 19, 2026
Okay, thanks. I was thinking this could be something @MeherSru could work on if not (or maybe she could help with the rebase), since the feature seems pretty helpful.
rgrunber commentedon Jun 19, 2026
At this point, you would probably have better results just having some LLM look at https://github.com/microsoft/vscode-java-pack/tree/main/src/project-settings/assets/compiler/features and its usage of https://vscode-elements.github.io/ and construct a similar page with all the options from https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fcore%2FJavaCore.html . I would probably stick to the UI used in the other extensions for wizard pages than being the only/few adopters of vscode-wizard.
The script at https://gist.github.com/rgrunber/73a64539f4e008619d747d0b25f6c5ab (load script, call function) is what I used to keep https://github.com/eclipse-jdtls/eclipse.jdt.ls/wiki/Language-Server-Settings-&-Capabilities#java-compiler-options up to date.
Related issue at #2776