org.das2.jythoncompletion.CompletionContext

CompletionContext describes a place in code where completion was triggered, containing the type of completion and the context around it.

CompletionContext( String contextType, String contextString, String completable )


METHOD_NAME


CLASS_METHOD_NAME


ATTRIBUTE_NAME


PACKAGE_NAME


MODULE_NAME


DEFAULT_NAME


STRING_LITERAL_ARGUMENT

a string literal argument for a command like getDataSet. We can delegate completion to an engine for this command.


COMMAND_ARGUMENT

we are within the body of a command such as "plot" and we want to see what the arguments and named parameters are.


contextType

the context type, such as COMMAND_ARGUMENT or STRING_LITERAL_ARGUMENT. In ds= getDataSet('/hom<C>'), this is STRING_LITERAL_ARGUMENT


contextString

the context string, such as a command name. In ds= getDataSet('/hom<C>'), this is 'getDataSet'


completable

the item on which completion was triggered. In ds= getDataSet('/hom<C>'), this is '/hom'


getContextObjectClass

getContextObjectClass( ) → Class

return null or the class for the context.

Returns:

a java.lang.Class

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setContextObjectClass

setContextObjectClass( java.lang.Class claz ) → void

Parameters

claz - a java.lang.Class

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


toString

toString( ) → String

Returns:

java.lang.String

[search for examples] [view on GitHub] [view on old javadoc] [view source]