Bug 14051

Summary: The implementation for IType.resolveType(String) is not implemented as noted in the JavaDoc specs
Product: [Eclipse Project] JDT Reporter: Gili Mendel <gmendel>
Component: CoreAssignee: David Audel <david_audel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.0 M6   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Gili Mendel CLA 2002-04-17 17:28:54 EDT
The interface mentions in its documentation (javadoc) that resolveType()
"Resolves the given type name within the context of this type (depending 
on the type hierarchy and its imports)". But when a call is made to resolve
a type which is neither in its hierarchy nor its imports (implemented by 
SourceType), the method
returns all the resolved types for the input in the entire classpath. 
This behaviour seems to go against the specification mentioned in the
documentation of the API, where the expected output for such an 
unresolveable input should have been a null.


It seems that SourceType, asks the SelectionEngine
to find the selection, and that in turn asks the CompilationUnitScope to
resolve all types inside the CompilationUnitDeclaration. If any resolution
fails, then the NameEnvironment of the JavaProject is used for resolution.

This change in semsntics may be to support the Code Assist.  In any case,
the specs or function needs to be updated.
Comment 1 David Audel CLA 2002-05-14 07:32:41 EDT
NameEnvironment is not used any more for resolution.

Fixed.