Bug 148789

Summary: [javadoc][dom] MemberRef DOM/AST node name could not handle qualified member type constructor references
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: martinae
Version: 3.2Keywords: api
Target Milestone: 3.3 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Frederic Fusier CLA 2006-06-27 05:57:45 EDT
After bug 96237 fix, it appears that MethodRef DOM/AST node name now may be qualified. As MethodRef 'name' field is currently a SimpleName, there's no way to store all tokens of member class constructor qualified reference...

So, this field must be changed to Name instead of SimpleName...
Comment 1 Frederic Fusier CLA 2006-06-27 05:59:57 EDT
Martin,

I saw that JDT/UI relies on the fact that MethodRef.getName() returns a SimpleName. Do you think it would be a great change on your side if we fix this in JDT/Core?
Comment 2 Martin Aeschlimann CLA 2006-06-27 07:55:08 EDT
MethodRef.getName() is API, you can't change that!
You can't even deprecate it and add a new accessor as implementors of a visitor can expect that they get the same call order.

They only way for new API in the AST is to create a new API level, as we did it to introduce the 5.0 contructs. But this issue isn't big enough for this.

I think the existing API is good enough. Note that the 'qualifier' on method ref is used for types. 'name' is used for field and method name (after the '#')

qualifier#name(parameter)
Comment 3 Frederic Fusier CLA 2006-06-27 09:06:25 EDT
I agree that correct change should not be change the type of this field and we'll need to add a new API level (something like ConstructorRef for example).

Note that bug 148804 I opened about type refactoring needs this change to be complete...
Comment 4 Martin Aeschlimann CLA 2006-06-27 09:22:46 EDT
Can you give an example where the method name has to be qualified?
Comment 5 Martin Aeschlimann CLA 2006-06-27 09:51:43 EDT
Oh I see '@see pack.Test.A#Test.A()'. Looks really strange and inconsistent that Javadoc requires this. I guess we won't be able to fix this. We can't also add new types to the AST (would break existing visitors again).

Comment 6 Frederic Fusier CLA 2006-06-27 10:26:39 EDT
bug 103304 was about this 'inconsistent' syntax. However, you're definetely right, and I missed that point, this is a javadoc tool bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4288720)...
So, obviously agree not to change our API for a bug in javadoc tool, I'll reopen bug 103304 to discuss about our behavior regarding this syntax...