Bug 308399 - Relationship applying to incorrect program element when source code is on same line
Summary: Relationship applying to incorrect program element when source code is on sam...
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: IDE (show other bugs)
Version: 1.6.7   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-07 16:47 EDT by Andrew Eisenberg CLA
Modified: 2010-04-07 16:47 EDT (History)
0 users

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-04-07 16:47:44 EDT
Here is an aspect:

aspect Aspect { 
  int Java.xxx = 0; 
}

Here is a Java class:

class Java {	void foo() {
		this.xxx++;
	}
}

Note that in the Java class, the foo method declaration is on the same line as the class declaration.  When I print the relationship map, I get:

=SearchTestsProject/src<{Java.java[Java~foo ::
	=SearchTestsProject/src<{Java.java[Java~foo --aspect declarations--> [=SearchTestsProject/src<*Aspect.aj}Aspect)Java.xxx]
=SearchTestsProject/src<*Aspect.aj}Aspect)Java.xxx ::
	=SearchTestsProject/src<*Aspect.aj}Aspect)Java.xxx --declared on--> [=SearchTestsProject/src<{Java.java[Java~foo]

So, the relationship map says that the target of the ITD is the foo() method, whereas it should be the type itself.  This causes problems for navigation as well as search.  But, since formatting code in this way is uncommon, I am not to concerned about it.