Class SourceParamChoicesProvider
java.lang.Object
org.fife.rsta.ac.java.SourceParamChoicesProvider
- All Implemented Interfaces:
org.fife.ui.autocomplete.ParameterChoicesProvider
class SourceParamChoicesProvider
extends Object
implements org.fife.ui.autocomplete.ParameterChoicesProvider
A parameter choices provider for Java methods.
NOTE: This class is not thread-safe, but it's assumed that it is only ever called on the EDT, so it should be a non-issue.
- Version:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classA very simple, low-relevance parameter choice completion. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.fife.ui.autocomplete.CompletionProviderThe parentJavaCompletionProvider. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddPublicAndProtectedFieldsAndGetters(Type type, JarManager jm, Package pkg, List<org.fife.ui.autocomplete.Completion> list) Adds all accessible fields and getters of a specific type, from an extended class or implemented interface.List<org.fife.ui.autocomplete.Completion> getLocalVarsFieldsAndGetters(NormalClassDeclaration ncd, String type, int offs) Gets all local variables, fields, and simple getters defined in a class, that are of a specific type, and are accessible from a given offset.List<org.fife.ui.autocomplete.Completion> getParameterChoices(JTextComponent tc, org.fife.ui.autocomplete.ParameterizedCompletion.Parameter param) private booleanisPrimitiveNumericType(Type type) private booleanisSimpleGetter(Method method) Returns whether a method is a no-argument getter method.private booleanisTypeCompatible(Type type, String typeName) Returns whether aTypeand a type name are type compatible.
-
Field Details
-
provider
private org.fife.ui.autocomplete.CompletionProvider providerThe parentJavaCompletionProvider.
-
-
Constructor Details
-
SourceParamChoicesProvider
SourceParamChoicesProvider()
-
-
Method Details
-
addPublicAndProtectedFieldsAndGetters
private void addPublicAndProtectedFieldsAndGetters(Type type, JarManager jm, Package pkg, List<org.fife.ui.autocomplete.Completion> list) Adds all accessible fields and getters of a specific type, from an extended class or implemented interface.- Parameters:
type- The type being examined.jm- The jar manager.pkg- The parent package.list- The list of completions to add to.
-
getLocalVarsFieldsAndGetters
public List<org.fife.ui.autocomplete.Completion> getLocalVarsFieldsAndGetters(NormalClassDeclaration ncd, String type, int offs) Gets all local variables, fields, and simple getters defined in a class, that are of a specific type, and are accessible from a given offset.- Parameters:
ncd- The class.type- The type that the variables, fields, and (return value of) getters must be.offs- The offset of the caret.- Returns:
- The list of stuff, or an empty list if none are found.
-
getParameterChoices
public List<org.fife.ui.autocomplete.Completion> getParameterChoices(JTextComponent tc, org.fife.ui.autocomplete.ParameterizedCompletion.Parameter param) - Specified by:
getParameterChoicesin interfaceorg.fife.ui.autocomplete.ParameterChoicesProvider
-
isPrimitiveNumericType
-
isSimpleGetter
Returns whether a method is a no-argument getter method.- Parameters:
method- The method.- Returns:
- Whether it is a no-argument getter.
-
isTypeCompatible
-