## org.das2.jythoncompletion.JythonCompletionTask

Completions for Jython code. The completion task is created with the editor configured for completions (code and caret position within code), and "query" is called which will fill a CompletionResultSet.

## JythonCompletionTask( javax.swing.text.JTextComponent t )

create the completion task on the text component, using its content and caret position.

## CLIENT_PROPERTY_INTERPRETER_PROVIDER

## CLIENT_PROPERTY_PWD

## __CLASSTYPE

## cancel

cancel( ) → void

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## doQuery

doQuery( org.das2.jythoncompletion.CompletionContext cc, org.das2.jythoncompletion.support.CompletionResultSet resultSet ) → int

perform the completions query. This is the heart of Jython completions.

### Parameters

cc - a CompletionContext
resultSet - a CompletionResultSet

### Returns:

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

## escapeHtml

escapeHtml( String s ) → String

### Parameters

s - a String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getIconFor

getIconFor( Object jm ) → javax.swing.ImageIcon

return an identifying icon for the object, or null.

### Parameters

jm - java.lang.reflect.Method, or PyInteger, etc.

### Returns:

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

## getImportableCompletions

getImportableCompletions( String source, org.das2.jythoncompletion.CompletionContext cc, org.das2.jythoncompletion.support.CompletionResultSet result ) → int

get completions by looking at importLookup.jy, which is a list of commonly imported codes.

### Parameters

source - the script source.
cc - a CompletionContext
result - a CompletionResultSet

### Returns:

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

## getLastLine

getLastLine( String script ) → String

### Parameters

script - a String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLocalsCompletions

getLocalsCompletions( PythonInterpreter interp, org.das2.jythoncompletion.CompletionContext cc, org.das2.jythoncompletion.support.CompletionResultSet rs ) → int

get the locals completions, populating the result set

### Parameters

interp - the interpreter
cc - the completion context
rs - the result set object which will contain the completions

### Returns:

the number of completions found.

### See Also:

getLocalsCompletions(org.python.util.PythonInterpreter, org.das2.jythoncompletion.CompletionContext)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLocalsCompletions

getLocalsCompletions( PythonInterpreter interp, org.das2.jythoncompletion.CompletionContext cc ) → java.util.List

get the list of available names at this point in the code.

### Parameters

interp - the interpreter
cc - the completion context

### Returns:

the list of completions.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## keySort

keySort( java.util.List key, java.util.List[] lists ) → void

sorts all the lists by the first list. See http://stackoverflow.com/questions/15400514/syncronized-sorting-between-two-arraylists/24688828#24688828 Note the key list must be repeated for it to be sorted as well!

### Parameters

key - the list used to sort
lists - the lists to be sorted, often containing the key as well.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## query

query( org.das2.jythoncompletion.support.CompletionResultSet arg0 ) → void

### Parameters

arg0 - a CompletionResultSet

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## reduceObject

reduceObject( java.util.List signatures, java.util.List labels, java.util.List argss ) → void

### Parameters

signatures - a java.util.List
labels - a java.util.List
argss - a java.util.List

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## refresh

refresh( org.das2.jythoncompletion.support.CompletionResultSet arg0 ) → void

### Parameters

arg0 - a CompletionResultSet

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## trimLinesToMakeValid

trimLinesToMakeValid( String script ) → String

introduced to see if we can pop a little code from the end, in case we are within a triple-quoted string.

### Parameters

script - the script

### Returns:

the script, possibly with a few fewer lines.

### See Also:

SimplifyScriptSupport#alligatorParse(java.lang.String)
[search for examples] [view on GitHub] [view on old javadoc] [view source]