Bug 308399

Summary: Relationship applying to incorrect program element when source code is on same line
Product: [Tools] AspectJ Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: IDEAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 1.6.7   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

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.