Bug 70334 - Invalid source range for unresolved qualified type reference
Summary: Invalid source range for unresolved qualified type reference
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-19 10:21 EDT by Markus Keller CLA
Modified: 2004-09-24 11:59 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-07-19 10:21:40 EDT
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.
Comment 1 Philipe Mulet CLA 2004-07-22 06:06:23 EDT
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.

Comment 2 Kent Johnson CLA 2004-08-09 12:35:38 EDT
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.
Comment 3 Kent Johnson CLA 2004-09-23 14:34:05 EDT
I am going to close this unless someone screams loud enough for me to hear it 
across the Atlantic.
Comment 4 Markus Keller CLA 2004-09-24 05:21:47 EDT
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.
Comment 5 Kent Johnson CLA 2004-09-24 11:41:03 EDT
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?
Comment 6 Philipe Mulet CLA 2004-09-24 11:48:09 EDT
Not really
Comment 7 Kent Johnson CLA 2004-09-24 11:59:59 EDT
.