## org.das2.jythoncompletion.CompletionSupport

support functions for Jython editor completions.

## checkJavaSubClass

checkJavaSubClass( javax.swing.text.JTextComponent editor ) → org.das2.jythoncompletion.CompletionContext

is the carot within a subclass of an identifiable Java class? TODO: this is a proof-of-concept kludge right now, where it just looks for g.*

### Parameters

editor - a JTextComponent

### Returns:

null or the CompletionContext for this.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getCompletionContext

getCompletionContext( javax.swing.text.JTextComponent editor ) → org.das2.jythoncompletion.CompletionContext

get the completion context for the editor at the carot position.

### Parameters

editor - the editor component containing the script and the carot position.

### Returns:

the completion context
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getCompletionContext

getCompletionContext( String line, int pos, int i0, int i1, int i2 ) → org.das2.jythoncompletion.CompletionContext

Get the completion context, locating the carot within the code and identifying it as needing a package name, variable name, function, etc. This parses the line using PythonGrammar

### Parameters

line - the line
pos - the position within the line
i0 - always 0 (not used)
i1 - always 0 (not used)
i2 - the position within the line (not used)

### Returns:

the completion context
[search for examples] [view on GitHub] [view on old javadoc] [view source]