Bug 54648 - Hiding Warnings
Summary: Hiding Warnings
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-12 10:43 EST by Nobody - feel free to take it CLA
Modified: 2005-05-30 05:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody - feel free to take it CLA 2004-03-12 10:43:33 EST
It should be possible to hide warnings. Therefor there should be an 
ignore/hide list to which current warnings can be added.

The best thing for hiding a warning would be an option in the Quick Fix 
context menu.

The list should contain concrete references to the warnings, not just the 
types of warnings.
Comment 1 Martin Aeschlimann CLA 2004-03-15 06:33:05 EST
can you elaborate on this one?
warnings can be set per project or per workspace on the compiler
prefenence/property page.

Which warnings you want to hide? You want that per file?
Comment 2 Nobody - feel free to take it CLA 2004-03-17 07:53:20 EST
Sorry for not being precise.

I will give an example to illustrate:
Imagine the option "Local variable is never read" in Compiler > Unused Code 
being set to "Warning".

The statement "int i = 2;" would cause a warning unless i is read somewhere. 
Now for me, at this moment, it might be okay that i is never read, and I don't 
want to see this warning right now. But I might want to see other "Local 
variable is never read" warnings.

I would like to be able to hide this special warning, not hiding all the 
others.

Therefor there should be a "Hide" item in the Quick Fix menu. And there should 
exist a list for the hidden warnings. The user should be able to remove items 
from the list, of course.
Comment 3 Martin Aeschlimann CLA 2004-03-17 10:47:26 EST
This is very difficult to do this for a single wanrning as all the errors and
warnings are recomputed on every modification you do. So we would have to find
that disabled warning again, and even make it persistent when you close the editor.
The only thing I see that's possible is to have special 'comment' in the code.
There has been a similar request, moving to jdt.core.
Comment 4 Philipe Mulet CLA 2004-03-24 06:55:22 EST
Not for 3.0.
Comment 5 Philipe Mulet CLA 2005-05-30 05:24:23 EDT
reopening
Comment 6 Philipe Mulet CLA 2005-05-30 05:25:06 EDT
Can be achieved in 1.5 mode using @SuppressWarnings annotation.