Community
Participate
Working Groups
package test1; public class E { void foo() { test2.Test t= null; } } In 3.0, we get an IProblem with id UndefinedType and range "test2.Test". In HEAD, we get an IProblem with id UndefinedType and range "test2". (our failing test org.eclipse.jdt.ui.tests.quickfix.UnresolvedTypesQuickFixTest.testQualifiedType()) Either the problem should be marked as "Undefined Package", or the whole type reference should be in the range.
The proper ID should be: UndefinedTypeOrPackage. When resolving the qualified name, we do not know whether it stands for a package or an enclosing type.
We fixed the source range because 'test2' is what we cannot resolve. As Philippe suggested, we can change the name of the problem ID, but I don't see how that changes things. I think we should just leave things as is... now that we highlight the correct thing.
I am going to close this unless someone screams loud enough for me to hear it across the Atlantic.
In the example, the error message now reads "test2 cannot be resolved to a type". We have adapted the Quick Fix to the change, but the error message is still not fully correct. However, that's a minor problem.
I accept that we 'should' change the error message to: 'test2 cannot be resolved to a type or package' Philippe: do we care enough to do this?
Not really
.