org.eclipse.jdt.internal.core
Class CancelableNameEnvironment

java.lang.Object
  extended by org.eclipse.jdt.internal.core.SearchableEnvironment
      extended by org.eclipse.jdt.internal.core.CancelableNameEnvironment
All Implemented Interfaces:
IJavaSearchConstants, INameEnvironment

public class CancelableNameEnvironment
extends SearchableEnvironment


Field Summary
 org.eclipse.core.runtime.IProgressMonitor monitor
           
 
Fields inherited from class org.eclipse.jdt.internal.core.SearchableEnvironment
nameLookup
 
Fields inherited from interface org.eclipse.jdt.core.search.IJavaSearchConstants
ALL_OCCURRENCES, ANNOTATION_TYPE, ANNOTATION_TYPE_REFERENCE, CANCEL_IF_NOT_READY_TO_SEARCH, CASE_INSENSITIVE, CASE_SENSITIVE, CAST_TYPE_REFERENCE, CATCH_TYPE_REFERENCE, CLASS, CLASS_AND_ENUM, CLASS_AND_INTERFACE, CLASS_INSTANCE_CREATION_TYPE_REFERENCE, CONSTRUCTOR, DECLARATIONS, ENUM, EXACT_MATCH, FIELD, FIELD_DECLARATION_TYPE_REFERENCE, FORCE_IMMEDIATE_SEARCH, IGNORE_DECLARING_TYPE, IGNORE_RETURN_TYPE, IMPLEMENTORS, IMPLICIT_THIS_REFERENCE, IMPORT_DECLARATION_TYPE_REFERENCE, INSTANCEOF_TYPE_REFERENCE, INTERFACE, INTERFACE_AND_ANNOTATION, LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE, METHOD, PACKAGE, PARAMETER_DECLARATION_TYPE_REFERENCE, PATTERN_MATCH, PREFIX_MATCH, QUALIFIED_REFERENCE, READ_ACCESSES, REFERENCES, RETURN_TYPE_REFERENCE, SUPER_REFERENCE, SUPERTYPE_TYPE_REFERENCE, THIS_REFERENCE, THROWS_CLAUSE_TYPE_REFERENCE, TYPE, TYPE_ARGUMENT_TYPE_REFERENCE, TYPE_VARIABLE_BOUND_TYPE_REFERENCE, UNKNOWN, WAIT_UNTIL_READY_TO_SEARCH, WILDCARD_BOUND_TYPE_REFERENCE, WRITE_ACCESSES
 
Constructor Summary
CancelableNameEnvironment(JavaProject project, WorkingCopyOwner owner, org.eclipse.core.runtime.IProgressMonitor monitor)
           
 
Method Summary
 void findPackages(char[] prefix, ISearchRequestor requestor)
          Find the packages that start with the given prefix.
 NameEnvironmentAnswer findType(char[][] compoundTypeName)
          Find a type with the given compound name.
 NameEnvironmentAnswer findType(char[] name, char[][] packageName)
          Find a type named in the package .
 void findTypes(char[] prefix, boolean findMembers, boolean camelCaseMatch, int searchFor, ISearchRequestor storage)
          Find the top-level types that are defined in the current environment and whose name starts with the given prefix.
 
Methods inherited from class org.eclipse.jdt.internal.core.SearchableEnvironment
cleanup, findExactTypes, isPackage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

monitor

public org.eclipse.core.runtime.IProgressMonitor monitor
Constructor Detail

CancelableNameEnvironment

public CancelableNameEnvironment(JavaProject project,
                                 WorkingCopyOwner owner,
                                 org.eclipse.core.runtime.IProgressMonitor monitor)
                          throws JavaModelException
Throws:
JavaModelException
Method Detail

findPackages

public void findPackages(char[] prefix,
                         ISearchRequestor requestor)
Description copied from class: SearchableEnvironment
Find the packages that start with the given prefix. A valid prefix is a qualified name separated by periods (ex. java.util). The packages found are passed to: ISearchRequestor.acceptPackage(char[][] packageName)

Overrides:
findPackages in class SearchableEnvironment

findType

public NameEnvironmentAnswer findType(char[] name,
                                      char[][] packageName)
Description copied from interface: INameEnvironment
Find a type named in the package . Answer the binary form of the type if it is known to be consistent. Otherwise, answer the compilation unit which defines the type or null if the type does not exist. The default package is indicated by char[0][]. It is known that the package containing the type exists. NOTE: This method can be used to find a member type using its internal name A$B, but the source file for A is answered if the binary file is inconsistent.

Specified by:
findType in interface INameEnvironment
Overrides:
findType in class SearchableEnvironment
See Also:
INameEnvironment.findType(char[], char[][])

findType

public NameEnvironmentAnswer findType(char[][] compoundTypeName)
Description copied from interface: INameEnvironment
Find a type with the given compound name. Answer the binary form of the type if it is known to be consistent. Otherwise, answer the compilation unit which defines the type or null if the type does not exist. Types in the default package are specified as {{typeName}}. It is unknown whether the package containing the type actually exists. NOTE: This method can be used to find a member type using its internal name A$B, but the source file for A is answered if the binary file is inconsistent.

Specified by:
findType in interface INameEnvironment
Overrides:
findType in class SearchableEnvironment
See Also:
INameEnvironment.findType(char[][])

findTypes

public void findTypes(char[] prefix,
                      boolean findMembers,
                      boolean camelCaseMatch,
                      int searchFor,
                      ISearchRequestor storage)
Description copied from class: SearchableEnvironment
Find the top-level types that are defined in the current environment and whose name starts with the given prefix. The prefix is a qualified name separated by periods or a simple name (ex. java.util.V or V). The types found are passed to one of the following methods (if additional information is known about the types): ISearchRequestor.acceptType(char[][] packageName, char[] typeName) ISearchRequestor.acceptClass(char[][] packageName, char[] typeName, int modifiers) ISearchRequestor.acceptInterface(char[][] packageName, char[] typeName, int modifiers) This method can not be used to find member types... member types are found relative to their enclosing type.

Overrides:
findTypes in class SearchableEnvironment