Community
Participate
Working Groups
As described here: http://forum.springsource.org/showthread.php?t=83147 There is a user who is referencing an ITD in a non-Java project and the Java editor is not recognizing this reference, giving a spurious error. Early on when starting with JDT weaving, we made the decision to disable all effects of JDT weaving when working outside of Java projects. This was to ensure that Java users would see 0 impact on their code when JDT Weaving is enabled. However, perhaps we are being too strict and Java projects that reference AJ projects should include ITD capability where appropriate (eg- content assist and reconciles).
The simplest solution here is to add the AJ nature to a project, but not change anything else. This will mark the project as 'interesting' from the point of view of the weaving service, but will not force any new compiler or builder on the Java project. Perhaps the best solution is to support this in the UI by perhaps adding a new context menu command that adds the nature w/o adding the builder.
interesting solution. On one hand sounds scary but I can't think of any downsides. Able to automate it if the trigger is adding/removing a project dependency?
discussion on the mailing list about this issue, from Sharon Gorman: 1) I do not really have an issue with making it and AspectJ project. In my opinion this is fine as a work around. My issue was that even when I did this, the code assist did not work correctly. 2) Once I removed and re-added my project dependency via eclipse, rather than relying on m2eclipse, the code assist started working. I note that the m2Eclipse adds the dependency under "Maven Dependencies" on the Package explorer whereas once I re-added it it appears under the "Web App Libraries".
For a detailed description of the workaround see: http://contraptionsforprogramming.blogspot.com/2010/03/intertype-declaration-support-in-java.html As described in comment 1, this should be supported in the UI.
After thinking on it some more, i am starting to think addition of the nature is probably still only a temporary workaround. Even if it was done automatically, it is going to show up as something quirky in your pure java projects - I wouldn't want to see it in mine really, and I know what it is doing. It will show up when committing projects into repos and worse when someone else is sync'ing/extracting a project, they'll see this odd thing that apparently has no business being there. And perhaps sometime later you remove the dependency on the AJ project, you are left with this 'thing' in your .project file (unless we are doing the necessary analysis of project dependencies, which if we were:) The trigger for offering ITD completion in a pure-java project is whether it has a dependency in some fashion to an AJ project. I think that is something we could compute once then maintain as project dependencies are changed in eclipse - does this detail really have to manifest in the project as a real setting?
*** Bug 324240 has been marked as a duplicate of this bug. ***
I'm attempting to use Roo-generated getters and setters from a Groovy project, and AspectJ and Groovy simply will not play nice together in Eclipse. The dupe discussed a fix for 3.6, but I'm on Kepler, and I'm still getting the same behavior. Any chance of necro-bumping this bug?