[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Is it possible to add a method in one project and use it from a higher up project?


I would like to be able to use AspectJ in one project to instert methods
into classes of projects that are lower down and to have those methods
accessable by a project that is higher up than the one insterting the

For example:

I am writing a compiler for a new language. I am using Eclipse and what
I have is one project called syntax_tree that contains the classes that
make up the syntax tree. I want to keep this project free from anything
else except defining the syntax tree classes. I then have another
project called pretty_print that inserts an abstract method prettyPrint
into the base of the syntax tree and then concrete methods are inserted
into the conceret subclasses that make up the syntax tree.

So all pretty printing code is in the project pretty_print and not
scattered through the syntax_tree project.

Now from another project I want to call the methods that were inserted
by the pretty_print project. For example, I have a pretty_print_tests
project that contains JUnit tests for the pretty_print project. But it
cannot call any of the methods added in the pretty_print project - I get
errors that they don't exist in the Eclipse editor. I have added the
pretty_print project as
one of the projects required for the pretty_print_tests. I have tried a
number of things but Eclipse editor always shows an error that the
method does
not exist.

Strangely enough though the problems tab does not show this error.
Running the project also seems to work so Eclipse is showing an error in the
editor that isn't actually an error. Is this a known bug?

How should I configure the projects to allow this sort of usage?

Thanks in advance,

Nicholas Allen