Bug 280508

Summary: [completion] aspectOf() not offered as a completion choice
Product: [Tools] AJDT Reporter: Ramnivas Laddad <ramnivas>
Component: UIAssignee: AJDT-inbox <AJDT-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: andrew.eisenberg
Version: 2.0.1   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 280510, 282409    

Description Ramnivas Laddad CLA 2009-06-16 15:27:46 EDT
Trivial code (but pasting it here, anyway)

package example;

public aspect AnAspect {
	public void aMethod() {
	}

	static void aStaticMethod() {
	}
}

package example;

public class AClass {
	public void foo() {
		AnAspect.   <- No aspectOf here (offers only aStaticMethod())
	}
}
Comment 1 Andrew Eisenberg CLA 2009-07-03 14:01:43 EDT
I think I might be able to address this by mocking up the aspectOf method in the ITDInserter class.  This is the class that adds ITDs to types during reconciling and content assist.  I'll have a look at it today.
Comment 2 Andrew Eisenberg CLA 2009-07-03 16:00:49 EDT
I have a fix for this that I will commit to the 3.5 branch shortly after doing some more testing.

There are 2 caveates with the fix:
1. Will not work within the aspect itself.  Ie- content assist inside of the aspect will not show its own aspectOf() method, but other aspects' aspectOf methods will appear.
2. Does not distinguish between the various forms of aspectOf (ie- aspectOf(Object) is not include).

I will create a new bug for this and please let me know how important fixing these things will be.
Comment 3 Andrew Eisenberg CLA 2009-07-27 10:58:52 EDT
Closing this bug because it has been addressed.  All future problems with aspectOf() content assist proposals should go in bug 282409.