Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No action to add @SuppressWarnings #2698

Closed
lbrayner opened this issue Jun 11, 2023 · 5 comments · Fixed by #3025
Closed

No action to add @SuppressWarnings #2698

lbrayner opened this issue Jun 11, 2023 · 5 comments · Fixed by #3025
Assignees

Comments

@lbrayner
Copy link
Contributor

I see SuppressWarningsSubProcessor_suppress_warnings_label in org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/CorrectionMessages.java, but no such action is offered by getCodeActionOptions in org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java. Is adding @SuppressWarnings("unchecked") out of vogue or deperecated? How do I deal with this if I want to suppress warnings on a case by case basis, and not session wide?

@rgrunber
Copy link
Contributor

We would probably just need to migrate SuppressWarningsSubProcessor from jdt.ui to jdt.core.manipulation and we'd be able to use that. It looks pretty straightforward to do though.

@lbrayner
Copy link
Contributor Author

We would probably just need to migrate SuppressWarningsSubProcessor from jdt.ui to jdt.core.manipulation and we'd be able to use that. It looks pretty straightforward to do though.

@rgrunber That'd be great!

@rgrunber
Copy link
Contributor

This is looking extremely possible now due to eclipse-jdt/eclipse.jdt.ui#815 . We should be able to use the classes directly once we update the target platform.

@hopehadfield
Copy link
Contributor

I'm interested in working on this.

@rgrunber
Copy link
Contributor

As a note, we've discovered that due to #1062 we shouldn't activate the warning & quick-fixes related to Unsupported @SuppressWarnings("...") because a codebase may have parameters that are not known to Eclipse, but are handled by other tools.

@rgrunber rgrunber added this to the End January 2024 milestone Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants