Bug 280508 - [completion] aspectOf() not offered as a completion choice
Summary: [completion] aspectOf() not offered as a completion choice
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.0.1   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 280510 282409
  Show dependency tree
 
Reported: 2009-06-16 15:27 EDT by Ramnivas Laddad CLA
Modified: 2009-07-27 10:58 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 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.