Eclipse/STS may incorrectly report error messages for classes w/ Roo-codegeneration
Today (after quite some searching) I found an error in Eclipse's AspectJ tooling:
The reconciling part of the AJDT chokes on unnecessary fully qualified classnames, i.e. if an aspect declares a package and later references a class inside that very package using a fully qualified classname.
Example:
Code:
package foo.bar;
public class Baz {
}
Code:
package foo.bar;
public aspect Baz_AJ {
public int foo.bar.Baz.hi;
}
In such a case, AJDT thinks that that "hi" field is not called "hi", but rather "bar". The same is true for methods.
Handcrafted aspects are unlikely to contain such unnecessary fully qualified names, but code created by Roo is full of it. Bummer!
Fortunately, the code compiles and executes as expected, but if you experience strange errors while editing a Roo project in an Eclipse-based IDE (such as STS), don't worry too much about such errors.
If you are interested: I've made a bug report under https://bugs.eclipse.org/bugs/show_bug.cgi?id=279439 and the bug has been confirmed, but currently it is uncertain if the next version of AJDT will fix this problem.