Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » javadocs null for duplicate fields and methods
javadocs null for duplicate fields and methods [message #213882] Wed, 31 August 2005 16:07 Go to next message
Eclipse UserFriend
When using the ASTParser, if the resolve bindings is turned on
(.setResolveBindings(true)) the javadoc for any duplicate fields or methods
are null.

For example, when using ASTParser with the following source:

public class A {
/**
* my field javadoc comment
*/
private int myField;

/**
* my duplicated field javadoc comment
*/
private int myField;

/**
* my method javadoc comment
*/
private void myMethod() {
}

/**
* my duplicated method javadoc comment
*/
private void myMethod() {
}
}

If the resolve binding is on, the FieldDeclaration.getJavadoc() for both
fields named "myField" and the MethodDeclaration.getJavadoc() for both
methods named "myMethod" will return null.
However, if resolve binding is off, the javadoc returned is non-null.

Why would having resolve bindings set on set all duplicate fields' and
methods' javadocs to null?

Note that duplicate classes in the same java file do not have this problem.
Re: javadocs null for duplicate fields and methods [message #213931 is a reply to message #213882] Thu, 01 September 2005 05:24 Go to previous messageGo to next message
Eclipse UserFriend
Seems to be a bug. Could you please file it at
https://bugs.eclipse.org/bugs/
for JDT/Core?

Note that the comments are available via CompilationUnit#getCommentList() in
both cases.

Thanks,
Markus


Toan wrote:
> When using the ASTParser, if the resolve bindings is turned on
> (.setResolveBindings(true)) the javadoc for any duplicate fields or methods
> are null.
>
> For example, when using ASTParser with the following source:
>
> public class A {
> /**
> * my field javadoc comment
> */
> private int myField;
>
> /**
> * my duplicated field javadoc comment
> */
> private int myField;
>
> /**
> * my method javadoc comment
> */
> private void myMethod() {
> }
>
> /**
> * my duplicated method javadoc comment
> */
> private void myMethod() {
> }
> }
>
> If the resolve binding is on, the FieldDeclaration.getJavadoc() for both
> fields named "myField" and the MethodDeclaration.getJavadoc() for both
> methods named "myMethod" will return null.
> However, if resolve binding is off, the javadoc returned is non-null.
>
> Why would having resolve bindings set on set all duplicate fields' and
> methods' javadocs to null?
>
> Note that duplicate classes in the same java file do not have this problem.
>
Re: javadocs null for duplicate fields and methods [message #213946 is a reply to message #213931] Thu, 01 September 2005 06:09 Go to previous messageGo to next message
Eclipse UserFriend
This a side effect of fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=84049.
Please open a new bug for this issue and we'll continue discussion about it using your bug.
Thanks

Markus Keller wrote:
> Seems to be a bug. Could you please file it at
> https://bugs.eclipse.org/bugs/
> for JDT/Core?
>
> Note that the comments are available via
> CompilationUnit#getCommentList() in both cases.
>
> Thanks,
> Markus
>
>
> Toan wrote:
>
>> When using the ASTParser, if the resolve bindings is turned on
>> (.setResolveBindings(true)) the javadoc for any duplicate fields or
>> methods
>> are null.
>>
>> For example, when using ASTParser with the following source:
>>
>> public class A {
>> /**
>> * my field javadoc comment
>> */
>> private int myField;
>>
>> /**
>> * my duplicated field javadoc comment
>> */
>> private int myField;
>>
>> /**
>> * my method javadoc comment
>> */
>> private void myMethod() {
>> }
>>
>> /**
>> * my duplicated method javadoc comment
>> */
>> private void myMethod() {
>> }
>> }
>>
>> If the resolve binding is on, the FieldDeclaration.getJavadoc() for
>> both fields named "myField" and the MethodDeclaration.getJavadoc() for
>> both methods named "myMethod" will return null.
>> However, if resolve binding is off, the javadoc returned is non-null.
>>
>> Why would having resolve bindings set on set all duplicate fields' and
>> methods' javadocs to null?
>>
>> Note that duplicate classes in the same java file do not have this
>> problem.
>>
Re: javadocs null for duplicate fields and methods [message #214027 is a reply to message #213946] Thu, 01 September 2005 17:22 Go to previous message
Eclipse UserFriend
I reported the bug, bug id is 108639 under JDT core.
Thanks for the help.
Previous Topic:[Ant] New Ant version for Eclipse 3.0.0
Next Topic:IJavaElement does not exist when using NodeFinder ?
Goto Forum:
  


Current Time: Tue Jul 08 22:14:20 EDT 2025

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

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

Back to the top