views:

20

answers:

1

Hi !

In eclipse, I can say to editor (and of course compiler) I don't use that variable so remove the underline with @SuppressWarnings("unused")

Anyone knows in Netbeans 6.9 how can I remove the underline of unused variables in editor?

Thanks in advance

+1  A: 

Have you tried adding @SuppressWarnings("unused") by hand?

A bit of extra research tells me that javac -X includes a set of warnings that can be turned on/off using -Xlint. Unfortunately, "unused" is not on the list. So if (and that's a "big if") the netbeans compiler is based on javac, you might be out of luck.

Stephen C
Yes, I had tried with @SupressWarnings("unused") by hand and it only works in eclipse.Thank you for the response but I'm not talking about the compiler, I'm talking about the Netbeans editor. Regards
iberck
@iberck - unless there is something very strange about Netbeans, the Netbeans java editor uses an embedded incremental java compiler to implement syntax highlighting, underlining of unused variables, etc. I am talking about **that** compiler.
Stephen C