Bug 322039 - Fully qualified ITD has incorrect handle identifier
Summary: Fully qualified ITD has incorrect handle identifier
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.9   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P2 normal (vote)
Target Milestone: 1.6.10   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-06 19:47 EDT by Andrew Eisenberg CLA
Modified: 2010-08-20 10:49 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Eisenberg CLA 2010-08-06 19:47:15 EDT
In the following aspect:

public aspect Aspect {
	public void q2.ThisClass.something2() {}
}

In aspectJ, the ITD has the following handle identifier (notice that the ITD name is not fully qualified):

=AspectJ Project/src2<p*Aspect.aj'Aspect)ThisClass.something2

However, it should be (with fully qualified name):

=AspectJ Project/src2<p*Aspect.aj'Aspect)q2.ThisClass.something2

This means that fully qualified ITDs cannot be navigated to or searched.  I'm a little surprised that this doesn't work because I thought I had tests for it...
Comment 1 Andrew Eisenberg CLA 2010-08-17 17:20:09 EDT
This is becoming more important since searching for ITDs has become a required feature for 2.1.1
Comment 2 Andrew Clement CLA 2010-08-18 11:29:42 EDT
i changed some element name processing to make this work.  If the new element names are too annoying (outline view?) then I will come up with another way to persist the data so it can be included in the handle. let me know
Comment 3 Andrew Eisenberg CLA 2010-08-18 11:55:33 EDT
This appears to be working now.  Thanks for the fix.

A couple of things:

1. Yes, the fully qualified name appears in the outline view.  There may be a way to control the name without having to fuss too much with the internal representation.  For example, ProgramElement.toLinkLabel() returns the ITD with the simple name of the type.

2. The source location of the element appears to be off.  Or at least when you navigate from the target type, the wrong location is highlighted.  I have to track this down.  It might be an AJDT problem.
Comment 4 Andrew Eisenberg CLA 2010-08-18 12:10:26 EDT
#1 looks quite difficult to fix.  The name in the outline view is generated from IJavaElement.getElementName().  This method is also called to generate the handle identifier.  So, we can't fix one without breaking the other.

Although, I'd prefer the name in the outline view to be nicer, I'm not too fussed about it.  I'd rather all the other bits and pieces work.
Comment 5 Andrew Eisenberg CLA 2010-08-18 12:45:25 EDT
#2 is now fixed.  It was an AJDT issue.
Comment 6 Andrew Clement CLA 2010-08-18 13:05:29 EDT
please resynchronize.  I changed it to do it another way, now the names remain short but the handle will include the fqname.
Comment 7 Andrew Clement CLA 2010-08-20 10:49:24 EDT
believed fixed