Bug 14051 - The implementation for IType.resolveType(String) is not implemented as noted in the JavaDoc specs
Summary: The implementation for IType.resolveType(String) is not implemented as noted ...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-17 17:28 EDT by Gili Mendel CLA
Modified: 2002-05-14 07:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.