Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to silence a "... malformed doc comments ..." warning?
How to silence a "... malformed doc comments ..." warning? [message #258111] Thu, 15 January 2009 13:37 Go to next message
Eclipse UserFriend
Some code that is generated using GMF gives me the following warnings:
-------------------------------
Javadoc: 'public' visibility for malformed doc comments hides this
'protected' reference TestItemProviderAdapterFactory.java
test.edit/src/test/provider line 293 Java Problem
-------------------------------

I have some difficulty parsing that sentence, but if I understand it
correctly this is because some javadoc comment (which is considered
"public")

-------------
....
* This delegates to {@link #changeNotifier} and to {@link
#parentAdapterFactory}.
....
-------------
contains references to two methods that are protected, which apparently
violates some visibility rule.
Since this is generated code, which I definitely do not want to modify
each time after it is regenerated, I rather want to suppress that
warning.

I changed misc. compiler options trying to ignore this, but that warning
didn't go away.
How can I silence this warning? What option do I need to change to
"Ignore" to make this warning disappear?

Michael
Re: How to silence a "... malformed doc comments ..." warning? [message #258129 is a reply to message #258111] Fri, 16 January 2009 04:09 Go to previous message
Eclipse UserFriend
In fact "'public' visibility for malformed doc comments" refers to the
preference 'Only consider members as visible as' you can access onto
'Java Compiler' -> 'Javadoc' preferences page.

When you set the preference 'Malformed Javadoc comments' either to
'Warning' or 'Error' then the 'Only consider members as visible as'
preference is enabled and has the 'Public' default value.

With this setting, only Javadoc comments of 'public' members are parsed.
The warning you get is because one of this kind of Javadoc comment has
a reference to members with a lower visibility (protected in your case).
The compiler warns such a case because that would create an invalid
reference in the generated documentation if you used the same value
for the javadoc tool parameter (-public).

The simplest ways to get rid of this warning is either not to put this
kind of reference in your javadoc comment or to change the preference
'Only consider members as visible as' to 'protected'.

HTH


Michael Moser wrote:
> Some code that is generated using GMF gives me the following warnings:
> -------------------------------
> Javadoc: 'public' visibility for malformed doc comments hides this
> 'protected' reference TestItemProviderAdapterFactory.java
> test.edit/src/test/provider line 293 Java Problem
> -------------------------------
>
> I have some difficulty parsing that sentence, but if I understand it
> correctly this is because some javadoc comment (which is considered
> "public")
>
> -------------
> ....
> * This delegates to {@link #changeNotifier} and to {@link
> #parentAdapterFactory}.
> ....
> -------------
> contains references to two methods that are protected, which apparently
> violates some visibility rule.
> Since this is generated code, which I definitely do not want to modify
> each time after it is regenerated, I rather want to suppress that warning.
>
> I changed misc. compiler options trying to ignore this, but that warning
> didn't go away.
> How can I silence this warning? What option do I need to change to
> "Ignore" to make this warning disappear?
>
> Michael
>
>
>
>
Previous Topic:Cannot load classes when running a plug-in
Next Topic:Force Compiler compliance level to 1.3 when creating new workspaces
Goto Forum:
  


Current Time: Wed May 07 06:49:58 EDT 2025

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

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

Back to the top