Compiler warnings "per file"? [message #187465] |
Tue, 09 January 2007 12:45 |
Eclipse User |
|
|
|
Originally posted by: makron.gmx.net
Hello everyone,
Im starting to work on a larger Java project using Eclipse. There has not
always been taken much care about code cleanliness by the past developers.
I however would like to produce clean code, eg. check on the compiler
warnings which are produced by it. Now as the rest of the code is more or
less fixed, it would be very helpful if I could activate compiler flags on
a per file basis, deactivating warnings coming from old files while
activating those within my own.
As Eclipses compiler preferences seem to be project wide, is there
something like c compiler pragma (@cmd/#cmd or the like) which I could put
at the top of certain files to trigger or prevent warnings? Or any other
way to do it?
Thanks for any help,
Mark
|
|
|
|
Re: Compiler warnings "per file"? [message #187553 is a reply to message #187514] |
Tue, 09 January 2007 19:37 |
Eclipse User |
|
|
|
Originally posted by: mikael.lonneberg.gmail.com
Daniel Megert skrev:
> M.Akron wrote:
>
>> Hello everyone,
>>
>> Im starting to work on a larger Java project using Eclipse. There has
>> not always been taken much care about code cleanliness by the past
>> developers. I however would like to produce clean code, eg. check on
>> the compiler warnings which are produced by it. Now as the rest of the
>> code is more or less fixed, it would be very helpful if I could
>> activate compiler flags on a per file basis, deactivating warnings
>> coming from old files while activating those within my own.
>> As Eclipses compiler preferences seem to be project wide, is there
>> something like c compiler pragma (@cmd/#cmd or the like) which I could
>> put at the top of certain files to trigger or prevent warnings? Or any
>> other way to do it?
>
> If you use 5.0 you can use the @SuppressWarnings annotation
>
> Dani
>
>>
>> Thanks for any help,
>> Mark
>>
You could create a new filter and add a working set that you then use to
apply what you want warnings on.
|
|
|
Powered by
FUDForum. Page generated in 0.07482 seconds