Bug 148027

Summary: Investigate "pointcut used by/uses pointcut" relationship
Product: [Tools] AspectJ Reporter: Helen Beeken <hlhawkins>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 CC: aclement, mpchapman
Version: DEVELOPMENT   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
zip containing patches to remove rel as a temporary solution none

Description Helen Beeken CLA 2006-06-21 08:55:16 EDT
Due to the use of IProgramElements to create handles (comment #15 of bug 141730) there is a problem with the pointcut used by/uses pointcut relationship. This patch changed places where handles were created for given source locations to first finding the corresponding ipe for the source location within the hierarchy and then creating the handle for this ipe. This works provided the ipe exists in the hierarcy. When it comes to the relationship map all relationships bar the uses pointcut/pointcut used by relationship are created once the hierarchy is built. However, with the uses pointcut/pointcut used by relationship this is added as part of the visitor, namely whilst the hierarchy is being created. If the corresponding pointcut doesn't exist yet then a file node is returned (due to the implementation of AspectJElementHierarchy.findElementForSourceLine(ISourceLocation)) and it is this which is added to the relationship map.

Therefore, we need to investigate moving the creation of this relationship to the place when other relationships are created.
Comment 1 Helen Beeken CLA 2006-06-21 11:36:23 EDT
Created attachment 45005 [details]
zip containing patches to remove rel as a temporary solution

A short term solution is to remove the uses pointcut/pointcut used by relationship for the time being. This can be done by setting the flag AsmHierarchyBuilder.shouldAddUsesPointcut to be false. This requires a few tests to check for different things depending on the value of this flag.

The attached zip file contains patches to do this:

-pr148027-ajde-patch.txt: apply to the ajde project
-pr148027-ajdt-core-patch.txt: apply to the org.aspectj.ajdt.core project
-pr148027-tests-patch.txt: apply to the tests project
Comment 2 Andrew Clement CLA 2006-06-22 04:01:48 EDT
patches from comment #1 in.