Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to suppress javadoc compiler warning for public static attributes?
How to suppress javadoc compiler warning for public static attributes? [message #635218] Tue, 26 October 2010 03:51 Go to next message
Velganesh Subramanian is currently offline Velganesh SubramanianFriend
Messages: 69
Registered: July 2009
Member
I have turned on compiler for javadoc also since I would like to maintain javadoc as in Eclipse code. I have classes that has constants (public static final) and classes that extend NLS for i18n. The attributes are public and the names are self explanatory and they do not deserve javadoc. The compiler generates warning since the attributes are public and there is no way to suppress this. Or, is there a way to suppress?

Can this be a new feature request for JDT UI?
Re: How to suppress javadoc compiler warning for public static attributes? [message #635243 is a reply to message #635218] Tue, 26 October 2010 07:40 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Velganesh Subramanian wrote:
> I have turned on compiler for javadoc also since I would like to
> maintain javadoc as in Eclipse code. I have classes that has constants
> (public static final) and classes that extend NLS for i18n. The
> attributes are public and the names are self explanatory and they do
> not deserve javadoc. The compiler generates warning since the
> attributes are public and there is no way to suppress this. Or, is
> there a way to suppress?
Add @SuppressWarnings("all") before the declaration.

Dani
>
> Can this be a new feature request for JDT UI?
Re: How to suppress javadoc compiler warning for public static attributes? [message #635503 is a reply to message #635243] Wed, 27 October 2010 07:09 Go to previous messageGo to next message
Velganesh Subramanian is currently offline Velganesh SubramanianFriend
Messages: 69
Registered: July 2009
Member
Is it a good practice to suppress ALL warnings? I don't think so.

I use Checkstyle to check for proper javadoc - it throws too many wanrings and my editor is filled with Checkstyle comments. I guess there is no way out.
Re: How to suppress javadoc compiler warning for public static attributes? [message #635515 is a reply to message #635503] Wed, 27 October 2010 07:31 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Velganesh Subramanian wrote:
> Is it a good practice to suppress ALL warnings? I don't think so.
Well, how many other warnings do you expect on a field declaration? And
while we're at it: is it a good practice not to Javadoc your public
members? ;-)

Dani
>
> I use Checkstyle to check for proper javadoc - it throws too many
> wanrings and my editor is filled with Checkstyle comments. I guess
> there is no way out.
Re: How to suppress javadoc compiler warning for public static attributes? [message #635538 is a reply to message #635515] Wed, 27 October 2010 09:47 Go to previous message
Velganesh Subramanian is currently offline Velganesh SubramanianFriend
Messages: 69
Registered: July 2009
Member
If you take JavaUIMessages of JDT UI plug-in as example, how much you can add for each attribute?
Previous Topic:my problem with java
Next Topic:Makefile for a java project
Goto Forum:
  


Current Time: Thu Apr 25 09:24:04 GMT 2024

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

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

Back to the top