public final class SelectionEngine extends Engine implements ISearchRequestor
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static boolean |
PERF |
compilerOptions, currentPackageName, discouragedReferenceIsError, forbiddenReferenceIsError, importCacheCount, importCachesInitialized, importsCache, lookupEnvironment, nameEnvironment, onDemandImportCacheCount, onDemandImportsCache, options, unitScope| Constructor and Description |
|---|
SelectionEngine(SearchableEnvironment nameEnvironment,
ISelectionRequestor requestor,
java.util.Map settings,
WorkingCopyOwner owner)
The SelectionEngine is responsible for computing the selected object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptConstructor(int modifiers,
char[] simpleTypeName,
int parameterCount,
char[] signature,
char[][] parameterTypes,
char[][] parameterNames,
int typeModifiers,
char[] packageName,
int extraFlags,
java.lang.String path,
AccessRestriction access) |
void |
acceptPackage(char[] packageName)
One result of the search consists of a new package.
|
void |
acceptType(char[] packageName,
char[] simpleTypeName,
char[][] enclosingTypeNames,
int modifiers,
AccessRestriction accessRestriction)
One result of the search consists of a new type.
|
protected MethodBinding |
findOverriddenMethodInType(ReferenceBinding overriddenType,
MethodBinding overriding) |
AssistParser |
getParser() |
void |
select(ICompilationUnit sourceUnit,
int selectionSourceStart,
int selectionSourceEnd)
Ask the engine to compute the selection at the specified position
of the given compilation unit.
|
void |
selectType(char[] typeName,
IType context)
Asks the engine to compute the selection of the given type
from the given context
|
accept, accept, accept, getSignature, getSignature, getTypeSignature, initializeImportCaches, initializePackageCache, mustQualifyType, parseBlockStatements, resetpublic SelectionEngine(SearchableEnvironment nameEnvironment, ISelectionRequestor requestor, java.util.Map settings, WorkingCopyOwner owner)
nameEnvironment - org.aspectj.org.eclipse.jdt.internal.core.SearchableEnvironment
used to resolve type/package references and search for types/packages
based on partial names.requestor - org.aspectj.org.eclipse.jdt.internal.codeassist.ISelectionRequestor
since the engine might produce answers of various forms, the engine
is associated with a requestor able to accept all possible completions.settings - java.util.Map
set of options used to configure the code assist engine.public void acceptConstructor(int modifiers,
char[] simpleTypeName,
int parameterCount,
char[] signature,
char[][] parameterTypes,
char[][] parameterNames,
int typeModifiers,
char[] packageName,
int extraFlags,
java.lang.String path,
AccessRestriction access)
acceptConstructor in interface ISearchRequestorpublic void acceptType(char[] packageName,
char[] simpleTypeName,
char[][] enclosingTypeNames,
int modifiers,
AccessRestriction accessRestriction)
ISearchRequestoracceptType in interface ISearchRequestorpublic void acceptPackage(char[] packageName)
acceptPackage in interface ISearchRequestorpackageName - char[]
NOTE - All package names are presented in their readable form:
Package names are in the form "a.b.c".
The default package is represented by an empty array.public AssistParser getParser()
public void select(ICompilationUnit sourceUnit, int selectionSourceStart, int selectionSourceEnd)
sourceUnit - org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit
the source of the current compilation unit.selectionSourceStart - intselectionSourceEnd - int
a range in the source where the selection is.public void selectType(char[] typeName,
IType context)
throws JavaModelException
typeName - char[]
a type name which is to be resolved in the context of a compilation unit.
NOTE: the type name is supposed to be correctly reduced (no whitespaces, no unicodes left)context - org.aspectj.org.eclipse.jdt.core.IType
the context in which code assist is invoked.JavaModelExceptionprotected MethodBinding findOverriddenMethodInType(ReferenceBinding overriddenType, MethodBinding overriding) throws JavaModelException
JavaModelException