Bug 44300 - [Javadoc] @see reference might also be verified in (non-Javadoc) comments
Summary: [Javadoc] @see reference might also be verified in (non-Javadoc) comments
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: 3.0   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 51953 115298 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-07 10:04 EDT by Frederic Fusier CLA
Modified: 2005-11-07 09:22 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2003-10-07 10:04:06 EDT
Javadoc comment support will come soon in JDT-Core, but it will be applied only 
on Javadoc comment (ie. /** comment */). However, it seems that in some cases, 
we'd need also to verify some Javadoc tags even if they are not put in a 
Javadoc comment.

Typically when using action Source->Override/Implement Methods..., if I select 
a method from an interface then the inserted code will be as follow:
/* (non-Javadoc)
 * @see org.eclipse.jdt.core.IMyInterface#myMethod(int, int)
 */
public void myMethod(int a, int b) {
	// TODO Auto-generated method stub
}

In this case, it would be useful to verify that the reference used in this @see 
tag is correct and also match the method below...
Comment 1 Olivier Thomann CLA 2003-10-07 12:58:11 EDT
Updating title
Comment 2 Frederic Fusier CLA 2004-02-13 09:35:00 EST
*** Bug 51953 has been marked as a duplicate of this bug. ***
Comment 3 Alex Blewitt CLA 2004-02-13 10:27:28 EST
*** Bug 51953 has been marked as a duplicate of this bug. ***
Comment 4 Alex Blewitt CLA 2004-02-13 10:30:38 EST
I think that you can use the flag not to look for missing JavaDoc comments, but to look for missing 
*comments*.

Someone who has put a non-JD comment above a method has usually done so for a good reason, so

/* internal method */
public void thing()

could well have done so to avoid generating a JavaDoc comment.

I think the ones that should be looked for are types/methods/fields that don't have a comment above 
them; rather than introspecting a JD tag inside an ordinary comment.

Alternatively, it could be a preference option (warn missing JavaDoc/warn missing comment) which I 
would  be just as happy with.
Comment 5 Gregor Rosenauer CLA 2004-02-24 09:00:17 EST
Just a general question: Why doesn't ContentAssist insert a Javadoc-comment here 
in the first place? I'd much prefer it that way, since I usually add 
Javadoc-comments to overwritten functions too and explain what's different etc..
.
Comment 6 Alex Blewitt CLA 2004-02-24 11:37:07 EST
I'd prefer it to generate the non-JD comment on overridden methods as opposed 
to a JD one. Most of the time, an overridden method has the same intent and the 
JD should explain the intent, not the implementation.

However, an option to say 'generate JD comments or non-JD methods for overriden 
methods' in the code generation might solve both of these desires.

The main reason why it's not standard practice to put JD comments in overriden 
methods that do the same thing is to solve the problem of maintaining two 
descriptions of the same method intent.
Comment 7 Philipe Mulet CLA 2004-05-10 05:58:21 EDT
Post 3.0
Comment 8 Frederic Fusier CLA 2005-02-17 10:57:17 EST
Reopen to change state to WONTFIX
Comment 9 Frederic Fusier CLA 2005-02-17 10:58:56 EST
We'll not implement this behavior. Instead it would be better to have a specific
warning to say that block comment contains tags (see bug 52116)
Comment 10 Frederic Fusier CLA 2005-11-07 09:22:37 EST
*** Bug 115298 has been marked as a duplicate of this bug. ***