Issue Details (XML | Word | Printable)

Key: IDE-743
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Christian Dupuis
Reporter: Imported
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring IDE

Don't create "missing function" error marker when function is woven by AspectJ

Created: 14/Nov/07 05:10 PM   Updated: 01/Feb/08 02:56 PM
Component/s: beans.core
Affects Version/s: 2.0.1
Fix Version/s: 2.0.3

Time Tracking:
Original Estimate: 2d
Original Estimate - 2d
Remaining Estimate: 2d
Remaining Estimate - 2d
Time Spent: 0d
Remaining Estimate - 2d

File Attachments: 1. Zip Archive mylyn-context.zip (3 kB)

Environment: Windows Vista, Eclipse 3.3, Spring IDE 2.0.1, AspectJ 1.5.3, AJDT 1.5.0


 Description  « Hide
The Spring IDE bean file editor shows an error marker if a setter function is missing in order to set a bean property.
However, when a setter function is added to the Java class using AspectJ's inter-type declaration feature, the editor should not mark an error anymore.
In short: Spring IDE should be aware of aspects woven to a Java class.

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Christian Dupuis added a comment - 15/Nov/07 03:12 AM - edited
Wow, that is a really advanced usage of AspectJ ITD and Spring DI. I will definitely take care of fixing this as AJDT provides the required information about ITD that are missing from JDT.

Christian Dupuis added a comment - 13/Dec/07 04:39 PM
This should actually be possible my using the AJDT relationship information

The following code fragment has to go into every Introspector method

// move this code to Introspector to make ITD generally available
AJRelationshipType[] types = new AJRelationshipType[] {AJRelationshipManager.DECLARED_ON};
List<AJRelationship> rels = AJModel.getInstance().getAllRelationships(context.getRootElementProject(), types);
for (AJRelationship rel : rels) {
    if (rel.getTarget().equals(type)) {
	    IntertypeElement iType = (IntertypeElement) rel.getSource();
		if (iType.getParameterTypes().length == 1) {
			 System.out.println(iType.getElementName() + " - " + iType.getReturnType());
		 }
    }
}