Package ghidra.python
Class PythonCodeCompletionFactory
- java.lang.Object
 - 
- ghidra.python.PythonCodeCompletionFactory
 
 
- 
public class PythonCodeCompletionFactory extends java.lang.ObjectGenerates CodeCompletions from Python objects. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.awt.ColorCLASS_COLORstatic java.awt.ColorCODE_COLORstatic java.lang.StringCOMPLETION_LABELstatic java.awt.ColorFUNCTION_COLORstatic java.awt.ColorINSTANCE_COLORstatic java.awt.ColorMAP_COLORstatic java.awt.ColorMETHOD_COLORstatic java.awt.ColorNULL_COLORstatic java.awt.ColorNUMBER_COLORstatic java.awt.ColorPACKAGE_COLORstatic java.awt.ColorSEQUENCE_COLORstatic java.awt.ColorSPECIAL_COLOR 
- 
Constructor Summary
Constructors Constructor Description PythonCodeCompletionFactory() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidchangeOptions(Options options, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)Handle an Option change.static java.lang.Object[]getCallMethods(org.python.core.PyObject obj)Returns the Java __call__ methods declared for a Python object.static ghidra.app.plugin.core.console.CodeCompletionnewCodeCompletion(java.lang.String description, java.lang.String insertion, org.python.core.PyObject pyObj)Creates a new CodeCompletion from the given Python objects.static voidsetupOptions(PythonPlugin plugin, Options options)Sets up Python code completion Options. 
 - 
 
- 
- 
Field Detail
- 
COMPLETION_LABEL
public static final java.lang.String COMPLETION_LABEL
- See Also:
 - Constant Field Values
 
 
- 
NULL_COLOR
public static final java.awt.Color NULL_COLOR
 
- 
FUNCTION_COLOR
public static final java.awt.Color FUNCTION_COLOR
 
- 
PACKAGE_COLOR
public static final java.awt.Color PACKAGE_COLOR
 
- 
CLASS_COLOR
public static final java.awt.Color CLASS_COLOR
 
- 
METHOD_COLOR
public static final java.awt.Color METHOD_COLOR
 
- 
CODE_COLOR
public static final java.awt.Color CODE_COLOR
 
- 
INSTANCE_COLOR
public static final java.awt.Color INSTANCE_COLOR
 
- 
SEQUENCE_COLOR
public static final java.awt.Color SEQUENCE_COLOR
 
- 
MAP_COLOR
public static final java.awt.Color MAP_COLOR
 
- 
NUMBER_COLOR
public static final java.awt.Color NUMBER_COLOR
 
- 
SPECIAL_COLOR
public static final java.awt.Color SPECIAL_COLOR
 
 - 
 
- 
Method Detail
- 
newCodeCompletion
public static ghidra.app.plugin.core.console.CodeCompletion newCodeCompletion(java.lang.String description, java.lang.String insertion, org.python.core.PyObject pyObj)Creates a new CodeCompletion from the given Python objects.- Parameters:
 description- description of the new CodeCompletioninsertion- what will be inserted to make the code completepyObj- a Python Object- Returns:
 - A new CodeCompletion from the given Python objects.
 
 
- 
setupOptions
public static void setupOptions(PythonPlugin plugin, Options options)
Sets up Python code completion Options.- Parameters:
 plugin- python plugin as options owneroptions- an Options handle
 
- 
changeOptions
public static void changeOptions(Options options, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
Handle an Option change. This is named slightly differently because it is a static method, not an instance method. By the time we get here, we assume that the Option changed is indeed ours.- Parameters:
 options- the Options handlename- name of the Option changedoldValue- the old valuenewValue- the new value
 
- 
getCallMethods
public static java.lang.Object[] getCallMethods(org.python.core.PyObject obj)
Returns the Java __call__ methods declared for a Python object. Some Python "methods" in the new-style Python objects are actually classes in and of themselves, re-implementing __call__ methods to tell us how to call them. This returns an array of those Methods (for code completion help).- Parameters:
 obj- a PyObject- Returns:
 - the Java __call__ methods declared for the Python object
 
 
 - 
 
 -