Skip to main content



      Home
Home » Newcomers » Newcomers » Compiler warnings "per file"?
Compiler warnings "per file"? [message #187465] Tue, 09 January 2007 07:45 Go to next message
Eclipse UserFriend
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 #187514 is a reply to message #187465] Tue, 09 January 2007 10:50 Go to previous messageGo to next message
Eclipse UserFriend
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
>
Re: Compiler warnings "per file"? [message #187553 is a reply to message #187514] Tue, 09 January 2007 14:37 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Mix Perl & Java in the same project
Next Topic:How to change Eclipse syntax parser for JSP file?
Goto Forum:
  


Current Time: Tue Jul 01 13:59:42 EDT 2025

Powered by FUDForum. Page generated in 0.11255 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top