Community
Participate
Working Groups
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.
NameEnvironment is not used any more for resolution. Fixed.