-
Jan 14th, 2010, 12:21 PM
#1
using a roo generated entity in a project reference
I'm using eclipse and have created a project (lets call it ProjectA) with some entities (lets say Person for this example) in Roo
now have another project "ProjectB" in the workspace which has a project reference to ProejctA.
when I try to use Person in some code located in ProjectB, I do not get access to the getters & setters created in the AspectJ by roo. Am I missing somethere here or is there a better way to reference ProjectA from within ProjectB?
many thanks in advance.
Ben
-
Jan 14th, 2010, 05:34 PM
#2
When you say you cannot access the getters/setters, does this mean ProjectB does not compile at all or simply files you open in ProjectB with an Eclipse editor fail to show the introduced getters/setters during code assist?
Does ProjectB compile successfully if you attempt to compile it outside of Eclipse? If so, this indicates it's more likely an issue in AJDT.
I'll mention this tread to the AspectJ/AJDT team and see if they can offer any further suggestions.
-
Jan 14th, 2010, 05:54 PM
#3
Hi Ben,
I have't tried compiling out of the ide, but yes, it does not give me the code completion when inside the ide, which is something i would very much like to have. 
FWIW when I export ProjectA to a jar then import it in ProjectB it works fine, this problem only seems to come up when I am using a project reference...
thanks
Ben
Last edited by benmonro; Jan 14th, 2010 at 05:58 PM.
-
Jan 14th, 2010, 11:50 PM
#4
Hi benmonro,
I'm guessing that your project B is a Java project, not an AJ project. When I try your situation with 2 AJ projects with standard project references, I do not see the problem you describe, but when project B is a plain Java project, I do see the errors in the editor (but not in the problems view).
This is mostly by design. What is happening here is that both Projects A and B are being compiled correctly, but only the editor is showing problems.
A way around this is to make Project B an AJ project.
If you are interested, what is happening is that the magic that we have in AJDT to enable ITDs to appear where they should is only enabled when inside of an AspectJ project. The reason is that there is a bit of a performance hit for this extra functionality that may not be appropriate in pure Java projects.
Now, that being said, I did find a bit of a bug. When Project A is added to Project B's aspect path, I do see some real compile problems. I'll have to look deeper into this.
Is it possible for you to add the AJ nature to Project B and if so, does it help?
-
Jan 15th, 2010, 11:13 AM
#5
Hi Andrew,
I'll give it a whirl, but the project is an android project so I'm not sure if I'll be able to do that without messing up how android sees the project. I'll try it out and post my findings here.
many thanks for your help
Cheers
Ben
-
Jan 15th, 2010, 11:20 AM
#6
Well, if the need becomes big enough, we can consider relaxing the requirement that ITD-awareness is disabled in all Java projects. It could be possible to walk the project dependency graph to see if any project upstream is an AJ project and if so we could enable ITD-awareness in the Java project. But, I'm still a little concerned about the performance impacts in the Java projects.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules