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

disable unused import warnings #894

Closed
clankill3r opened this issue Apr 21, 2019 · 6 comments
Closed

disable unused import warnings #894

clankill3r opened this issue Apr 21, 2019 · 6 comments

Comments

@clankill3r
Copy link

Is there a way to disable unused import warnings.
At some stages I don't care about them and I have hundreds of them, they get in the way of things I do care about.

@snjeza
Copy link
Contributor

snjeza commented Apr 21, 2019

You can add the following preference:

org.eclipse.jdt.core.compiler.problem.unusedImport=ignore

to <your_project>/.settings/org.eclipse.jdt.core.prefs

@AntSworD
Copy link

You can add the following preference:

org.eclipse.jdt.core.compiler.problem.unusedImport=ignore

to <your_project>/.settings/org.eclipse.jdt.core.prefs

It doesn't work for me,can I figure out what happen by myself?
Another config of org.eclipse.jdt.core.prefs is not working too, such as org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore

@snjeza
Copy link
Contributor

snjeza commented May 31, 2019

@AntSworD could you provide a sample project?

@HarveyTvT
Copy link

@A

You can add the following preference:

org.eclipse.jdt.core.compiler.problem.unusedImport=ignore

to <your_project>/.settings/org.eclipse.jdt.core.prefs

It doesn't work for me,can I figure out what happen by myself?
Another config of org.eclipse.jdt.core.prefs is not working too, such as org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore

if you are working on a java project with multiple sub-projects, you can try to copy org.eclipse.jdt.core.prefs to each sub-projects`s .settings folder

./main-project
----./.settings
----./sub-project
--------./settings
------------./org.eclipse.jdt.core.prefs

@clankill3r
Copy link
Author

I can no longer get this to work.
I'm not using maven or gradlle but I just use 'vscode' (I have no idea how to call it), with the lib folder, and where I can add libs using the + button under the Java Projects in the EXPLORER.

This is what my structure looks like:

Screen Shot 2020-08-28 at 10 40 04

@clankill3r
Copy link
Author

It seems like org.eclipse.jdt.core.prefs magically works again so I close this issue for now.

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

No branches or pull requests

4 participants