Klasse SelectionEngine
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.codeassist.impl.Engine
org.aspectj.org.eclipse.jdt.internal.codeassist.SelectionEngine
- Alle implementierten Schnittstellen:
ISearchRequestor,ITypeRequestor
The selection engine is intended to infer the nature of a selected name in some
source code. This name can be qualified.
Selection is resolving context using a name environment (no need to search), assuming
the source where selection occurred is correct and will not perform any completion
attempt. If this was the desired behavior, a call to the CompletionEngine should be
performed instead.
-
Feldübersicht
FelderVon Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.codeassist.impl.Engine
compilerOptions, currentPackageName, discouragedReferenceIsError, forbiddenReferenceIsError, importCacheCount, importCachesInitialized, importsCache, lookupEnvironment, nameEnvironment, onDemandImportCacheCount, onDemandImportsCache, options, unitScope -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSelectionEngine(SearchableEnvironment nameEnvironment, ISelectionRequestor requestor, Map settings, WorkingCopyOwner owner) The SelectionEngine is responsible for computing the selected object. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaccept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) Add additional source types (the first one is the requested type, the rest is formed by the secondary types defined in the same compilation unit).voidacceptConstructor(int modifiers, char[] simpleTypeName, int parameterCount, char[] signature, char[][] parameterTypes, char[][] parameterNames, int typeModifiers, char[] packageName, int extraFlags, String path, AccessRestriction access) voidacceptModule(char[] moduleName) voidacceptPackage(char[] packageName) One result of the search consists of a new package.voidacceptType(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, int modifiers, AccessRestriction accessRestriction) One result of the search consists of a new type.protected MethodBindingfindOverriddenMethodInType(ReferenceBinding overriddenType, MethodBinding overriding) voidselect(ICompilationUnit sourceUnit, int selectionSourceStart, int selectionSourceEnd) Ask the engine to compute the selection at the specified position of the given compilation unit.voidselectType(char[] typeName, IType context) Asks the engine to compute the selection of the given type from the given contextVon Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.codeassist.impl.Engine
accept, accept, getSignature, getSignature, getTypeSignature, initializeImportCaches, initializePackageCache, mustQualifyType, parseBlockStatements, resetVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.internal.compiler.impl.ITypeRequestor
accept
-
Felddetails
-
DEBUG
public static boolean DEBUG -
PERF
public static boolean PERF
-
-
Konstruktordetails
-
SelectionEngine
public SelectionEngine(SearchableEnvironment nameEnvironment, ISelectionRequestor requestor, Map settings, WorkingCopyOwner owner) The SelectionEngine is responsible for computing the selected object. It requires a searchable name environment, which supports some specific search APIs, and a requestor to feed back the results to a UI.- Parameter:
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.
-
-
Methodendetails
-
acceptConstructor
public void acceptConstructor(int modifiers, char[] simpleTypeName, int parameterCount, char[] signature, char[][] parameterTypes, char[][] parameterNames, int typeModifiers, char[] packageName, int extraFlags, String path, AccessRestriction access) - Angegeben von:
acceptConstructorin SchnittstelleISearchRequestor
-
accept
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) Beschreibung aus Klasse kopiert:EngineAdd additional source types (the first one is the requested type, the rest is formed by the secondary types defined in the same compilation unit).- Angegeben von:
acceptin SchnittstelleITypeRequestor- Setzt außer Kraft:
acceptin KlasseEngine
-
acceptType
public void acceptType(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, int modifiers, AccessRestriction accessRestriction) Beschreibung aus Schnittstelle kopiert:ISearchRequestorOne result of the search consists of a new type. NOTE - All package and type names are presented in their readable form: Package names are in the form "a.b.c". Nested type names are in the qualified form "A.I". The default package is represented by an empty array.- Angegeben von:
acceptTypein SchnittstelleISearchRequestor
-
acceptPackage
public void acceptPackage(char[] packageName) Beschreibung aus Schnittstelle kopiert:ISearchRequestorOne result of the search consists of a new package. 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.- Angegeben von:
acceptPackagein SchnittstelleISearchRequestor
-
getParser
-
select
Ask the engine to compute the selection at the specified position of the given compilation unit.- Parameter:
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.
-
selectType
Asks the engine to compute the selection of the given type from the given context- Parameter:
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.- Löst aus:
JavaModelException
-
findOverriddenMethodInType
protected MethodBinding findOverriddenMethodInType(ReferenceBinding overriddenType, MethodBinding overriding) throws JavaModelException - Löst aus:
JavaModelException
-
acceptModule
public void acceptModule(char[] moduleName) - Angegeben von:
acceptModulein SchnittstelleISearchRequestor
-