BUG? Organize Imports on Intertype-Declaration complains "Compilation unit has parse errors&quo [message #534689] |
Wed, 19 May 2010 18:28  |
Eclipse User |
|
|
|
i have an aspect with an inter-type declaration, which looks like this:
package de.wieger.domaindriven.sample;
<lots of unused imports>
privileged aspect Person_ITD {
Person.new(PersonBuilder pBuilder) {
this();
}
}
If i invoke "Organize Imports" in eclipse, i get the following error:
"Compilation unit has parse errors: Constructor call must be the first statement in a constructor".
I'm using AJDT 2.0.2.
It looks like this is a bug. Is anybody else experiencing this?
Should i file a bug for this in bugzilla?
From my prospective, it seems like the method AjOrganizeImportsOperation#collectReferences is a little bit too strict about what should be considered as a relevant parsing error.
I have seen, that AjCompilationUnitProblemFinder filters a lot of problems like the one causing trouble when invoking "organize imports" out.
There is an explicit snippet, dealing with my problem:
if (numArgs == 0 && id == IProblem.InvalidExplicitConstructorCall) {
// ITD constructor making explicit this() call.
// lots of potential for false negatives
return false;
}
Maybe this could indicate the direction for a fix?
What do you think?
regards,
Thomas
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08762 seconds