Bug 148027 - Investigate "pointcut used by/uses pointcut" relationship
Summary: Investigate "pointcut used by/uses pointcut" relationship
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-21 08:55 EDT by Helen Beeken CLA
Modified: 2007-10-24 10:57 EDT (History)
2 users (show)

See Also:


Attachments
zip containing patches to remove rel as a temporary solution (3.58 KB, application/zip)
2006-06-21 11:36 EDT, Helen Beeken CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.