| Summary: | Javadoc view doesnt show comment when it is below an annotation | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Prashant Deva <prashant.deva> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | deepakazad |
| Version: | 3.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Annotations are part of the class/method declaration, and the Javadoc *must* appear immediately before the declaration.
For example, consider the following valid declaration for an abstract class
@SupressWarnings("mywarning") abstract
/**
* Not a javadoc
*/
class MyClass{
}
Maybe you didnt get me, as you can see in my example, the comment does show 'exactly before' the class declaration.
What I am saying is that if I do this -
/**
* My Javadoc
*/
@SupressWarnings("mywarning")
class MyClass{
}
then the Javadoc view shows the comment, however if I do this -
@SupressWarnings("mywarning")
/**
* My Javadoc
*/
class MyClass{
}
then the Javadoc view doesnt show the comment.
(In reply to comment #2) > @SupressWarnings("mywarning") > /** > * My Javadoc > */ > class MyClass{ > } > > > then the Javadoc view doesnt show the comment. @SupressWarnings("mywarning") is part of the declaration, hence your comment is also part of the declaration and hence not a javadoc. /** Only this is a javadoc*/ @SupressWarnings("mywarning") /** not javadoc*/ class /** not javadoc*/ MyClass /** not javadoc*/{ } |
If I have a class declaration such as - @SupressWarnings("mywarning") /** * My Javadoc */ class MyClass{ } when I place the caret over MyClass the JavaDoc view wont show the comment. However, if I remove the annotation at the top (and place it after the comment), the javadoc for the class will show properly.