Class SelectionRequestor
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.SelectionRequestor
- All Implemented Interfaces:
ISelectionRequestor
Implementation of
ISelectionRequestor to assist with
code resolve in a compilation unit. Translates names to elements.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected IJavaElement[]protected HandleFactoryprotected NameLookupprotected Openable -
Constructor Summary
ConstructorsConstructorDescriptionSelectionRequestor(NameLookup nameLookup, Openable openable) Creates a selection requestor that uses that given name lookup facility to resolve names. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidacceptBinaryMethod(IType type, char[] selector, char[][] parameterPackageNames, char[][] parameterTypeNames, String[] parameterSignatures, char[][] typeParameterNames, char[][][] typeParameterBoundNames, char[] uniqueKey, boolean isConstructor) Resolve the binary method fix for 1FWFT6QvoidacceptError(CategorizedProblem error) Code assist notification of a compilation error detected during selection.voidacceptField(char[] declaringTypePackageName, char[] declaringTypeName, char[] name, boolean isDeclaration, char[] uniqueKey, int start, int end) Resolve the field.voidacceptLambdaMethod(MethodBinding binding, ICompilationUnit unit) voidacceptLocalField(FieldBinding fieldBinding) voidacceptLocalMethod(MethodBinding methodBinding) voidacceptLocalMethodTypeParameter(TypeVariableBinding typeVariableBinding) voidacceptLocalType(TypeBinding typeBinding) voidacceptLocalTypeParameter(TypeVariableBinding typeVariableBinding) voidacceptLocalVariable(LocalVariableBinding binding, ICompilationUnit unit) voidacceptMethod(char[] declaringTypePackageName, char[] declaringTypeName, String enclosingDeclaringTypeSignature, char[] selector, char[][] parameterPackageNames, char[][] parameterTypeNames, String[] parameterSignatures, char[][] typeParameterNames, char[][][] typeParameterBoundNames, boolean isConstructor, boolean isDeclaration, char[] uniqueKey, int start, int end) Resolve the methodprotected voidacceptMethodDeclaration(IType type, char[] selector, int start, int end) voidacceptMethodTypeParameter(char[] declaringTypePackageName, char[] declaringTypeName, char[] selector, int selectorStart, int selectorEnd, char[] typeParameterName, boolean isDeclaration, int start, int end) Code assist notification of a type parameter selection.voidacceptModule(char[] moduleName, char[] uniqueKey, int start, int end) Code assist notification of a module selection.voidacceptPackage(char[] packageName) Resolve the packageprotected voidacceptSourceMethod(IType type, char[] selector, char[][] parameterPackageNames, char[][] parameterTypeNames, String[] parameterSignatures, char[][] typeParameterNames, char[][][] typeParameterBoundNames, char[] uniqueKey) Resolve the source method fix for 1FWFT6QvoidacceptType(char[] packageName, char[] typeName, int modifiers, boolean isDeclaration, char[] uniqueKey, int start, int end) Resolve the type.voidacceptType(IType type) Resolve the type.voidacceptTypeParameter(char[] declaringTypePackageName, char[] declaringTypeName, char[] typeParameterName, boolean isDeclaration, int start, int end) Code assist notification of a type parameter selection.protected voidaddElement(IJavaElement element) protected IJavaElementfindLocalElement(int pos) protected IJavaElementfindLocalElement(int pos, MethodScope scope) findMethodFromBinding(MethodBinding method, String[] signatures, ReferenceBinding declaringClass) This method returns an IMethod element from the given method and declaring type bindings.Returns the resolved elements.protected IModuleDescriptionresolveModule(char[] moduleName) protected ITyperesolveType(char[] packageName, char[] typeName, int acceptFlags) Resolve the typeprotected ITyperesolveTypeByLocation(char[] packageName, char[] typeName, int acceptFlags, int start, int end)
-
Field Details
-
nameLookup
-
openable
-
elements
-
elementIndex
protected int elementIndex -
handleFactory
-
-
Constructor Details
-
SelectionRequestor
Creates a selection requestor that uses that given name lookup facility to resolve names. Fix for 1FVXGDK
-
-
Method Details
-
acceptBinaryMethod
protected void acceptBinaryMethod(IType type, char[] selector, char[][] parameterPackageNames, char[][] parameterTypeNames, String[] parameterSignatures, char[][] typeParameterNames, char[][][] typeParameterBoundNames, char[] uniqueKey, boolean isConstructor) Resolve the binary method fix for 1FWFT6Q -
acceptModule
public void acceptModule(char[] moduleName, char[] uniqueKey, int start, int end) Description copied from interface:ISelectionRequestorCode assist notification of a module selection.- Specified by:
acceptModulein interfaceISelectionRequestor- Parameters:
moduleName- name of the moduleuniqueKey- unique key of this modulestart- Start of the selectionend- End of the selection
-
acceptType
public void acceptType(char[] packageName, char[] typeName, int modifiers, boolean isDeclaration, char[] uniqueKey, int start, int end) Resolve the type.- Specified by:
acceptTypein interfaceISelectionRequestor- Parameters:
packageName- char[] Declaring package name of the type.typeName- char[] Name of the type.isDeclaration- boolean Answer if the selected type is a declarationuniqueKey- genric type signature of the selected type if it is a parameterized typestart- Start of the selectionend- End of the selection 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.M". The default package is represented by an empty array.
-
acceptType
Resolve the type. -
acceptError
Description copied from interface:ISelectionRequestorCode assist notification of a compilation error detected during selection.- Specified by:
acceptErrorin interfaceISelectionRequestor- Parameters:
error- CategorizedProblem Only problems which are categorized as errors are notified to the requestor, warnings are silently ignored. In case an error got signaled, no other completions might be available, therefore the problem message should be presented to the user. The source positions of the problem are related to the source where it was detected (might be in another compilation unit, if it was indirectly requested during the code assist process). Note: the problem knows its originating file name.- See Also:
-
acceptField
public void acceptField(char[] declaringTypePackageName, char[] declaringTypeName, char[] name, boolean isDeclaration, char[] uniqueKey, int start, int end) Resolve the field.- Specified by:
acceptFieldin interfaceISelectionRequestor- Parameters:
declaringTypePackageName- char[] Name of the package in which the type that contains this field is declared.declaringTypeName- char[] Name of the type declaring this new field.name- char[] Name of the field.isDeclaration- boolean Answer if the selected field is a declarationuniqueKey- unique key of this fieldstart- Start of the selectionend- End of the selection 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.M". The default package is represented by an empty array.
-
acceptLocalField
-
acceptLocalMethod
-
acceptLocalType
-
acceptLocalTypeParameter
-
acceptLocalMethodTypeParameter
-
acceptLocalVariable
-
acceptLambdaMethod
-
acceptMethod
public void acceptMethod(char[] declaringTypePackageName, char[] declaringTypeName, String enclosingDeclaringTypeSignature, char[] selector, char[][] parameterPackageNames, char[][] parameterTypeNames, String[] parameterSignatures, char[][] typeParameterNames, char[][][] typeParameterBoundNames, boolean isConstructor, boolean isDeclaration, char[] uniqueKey, int start, int end) Resolve the method- Specified by:
acceptMethodin interfaceISelectionRequestor- Parameters:
declaringTypePackageName- char[] Name of the package in which the type that contains this new method is declared.declaringTypeName- char[] Name of the type declaring this new method.enclosingDeclaringTypeSignature- String Type signature of the declaring type of the declaring type ornullif declaring type is a top level type.selector- char[] Name of the new method.parameterPackageNames- char[][] Names of the packages in which the parameter types are declared. Should contain as many elements as parameterTypeNames.parameterTypeNames- char[][] Names of the parameters types. Should contain as many elements as parameterPackageNames.parameterSignatures- String[] Signature of the parameters types. Should contain as many elements as parameterPackageNames.isConstructor- boolean Answer if the method is a constructor.isDeclaration- boolean Answer if the selected method is a declarationuniqueKey- unique key of the methodstart- Start of the selectionend- End of the selection NOTE - All package and type names are presented in their readable form: Package names are in the form "a.b.c". Base types are in the form "int" or "boolean". Array types are in the qualified form "M[]" or "int[]". Nested type names are in the qualified form "A.M". The default package is represented by an empty array.
-
acceptPackage
public void acceptPackage(char[] packageName) Resolve the package- Specified by:
acceptPackagein interfaceISelectionRequestor- Parameters:
packageName- char[] The package name. 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.
-
acceptSourceMethod
-
acceptMethodDeclaration
-
acceptTypeParameter
public void acceptTypeParameter(char[] declaringTypePackageName, char[] declaringTypeName, char[] typeParameterName, boolean isDeclaration, int start, int end) Description copied from interface:ISelectionRequestorCode assist notification of a type parameter selection.- Specified by:
acceptTypeParameterin interfaceISelectionRequestor- Parameters:
declaringTypePackageName- char[] Name of the package in which the type that contains this new method is declared.declaringTypeName- char[] Name of the type declaring this new method.typeParameterName- char[] Name of the type parameter.isDeclaration- boolean Answer if the selected type parameter is a declarationstart- Start of the selectionend- End of the selection 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.M". The default package is represented by an empty array.
-
acceptMethodTypeParameter
public void acceptMethodTypeParameter(char[] declaringTypePackageName, char[] declaringTypeName, char[] selector, int selectorStart, int selectorEnd, char[] typeParameterName, boolean isDeclaration, int start, int end) Description copied from interface:ISelectionRequestorCode assist notification of a type parameter selection.- Specified by:
acceptMethodTypeParameterin interfaceISelectionRequestor- Parameters:
declaringTypePackageName- char[] Name of the package in which the type that contains this new method is declared.declaringTypeName- char[] Name of the type declaring this new method.selector- char[] Name of the declaring method.selectorStart- int Start of the selector.selectorEnd- int End of the selector.typeParameterName- char[] Name of the type parameter.isDeclaration- boolean Answer if the selected type parameter is a declarationstart- Start of the selectionend- End of the selection 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.M". The default package is represented by an empty array.
-
addElement
-
findLocalElement
-
findLocalElement
-
findMethodFromBinding
public IJavaElement findMethodFromBinding(MethodBinding method, String[] signatures, ReferenceBinding declaringClass) This method returns an IMethod element from the given method and declaring type bindings. However, unlikeUtil.findMethod(IType, char[], String[], boolean), this does not require an IType to get the IMethod element.- Parameters:
method- the given method bindingsignatures- the type signatures of the method argumentsdeclaringClass- the binding of the method's declaring class- Returns:
- an IMethod corresponding to the method binding given, or null if none is found.
-
getElements
Returns the resolved elements. -
resolveModule
-
resolveType
Resolve the type -
resolveTypeByLocation
protected IType resolveTypeByLocation(char[] packageName, char[] typeName, int acceptFlags, int start, int end)
-