Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Developing a Aspectj based plugin - Newbie questions
Developing a Aspectj based plugin - Newbie questions [message #596646] Sun, 27 January 2008 01:48
André Fonseca is currently offline André FonsecaFriend
Messages: 11
Registered: July 2009
Junior Member
I am working on a Eclipse plugin that I will need to capture some
information of the aspectj compiler, like aspects, pointcuts, etc., but
I'am facing some dificulties. In that example (
AsmRelationshipMapUsageTest method ,coded by Mik Kersten, that I tried to
adaptate to my plugin) I tried to capture the methods that are afected by

public void FindAdvisedMethods() {
System.out.println("Methods affected by advice: ");
HierarchyWalker walker = new HierarchyWalker() {
public void preProcess(IProgramElement node) {
if (node.getKind().equals(IProgramElement.Kind.METHOD)) {
List relations =
if (relations != null) {
for (Iterator it = relations.iterator();
it.hasNext(); ) {
IRelationship relationship =
(relationship.getKind().equals(IRelationship.Kind.ADVICE)) {
"method: " + node.toString()
+ ", advised by: " +
AsmManager.getDefault().getHierarchy().getRoot().walk(walker );

In the last line comes the problem. The Eclipse's debug shows that
AsmManager.getDefault().getHierarchy().getRoot() returns null. Can anyone
explain me the possible reasons?

Another question: In the developer's guide
( s_on_top_of_AJDT_and_AspectJ)
it seens to exist another way to do same thing that the method abdove is
doing. If it is correct, what implementation i should use and why?
Another thing: If I choose to implement the way that is used in the
developer's guide, how I could get another informations like: aspects,
pointcuts, declare parents, etc.?

Thanks evebory that is reading this mail and sorry the poor english!

André Fonseca
Previous Topic:Developing a Aspectj based plugin - Newbie questions
Next Topic:Is it possible to weave aspects on anonymous inner classes?
Goto Forum:

Current Time: Tue May 22 23:37:52 GMT 2018

Powered by FUDForum. Page generated in 0.01746 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top