diff --git a/Ghidra/Features/Python/Module.manifest b/Ghidra/Features/Jython/Module.manifest similarity index 100% rename from Ghidra/Features/Python/Module.manifest rename to Ghidra/Features/Jython/Module.manifest diff --git a/Ghidra/Features/Python/build.gradle b/Ghidra/Features/Jython/build.gradle similarity index 87% rename from Ghidra/Features/Python/build.gradle rename to Ghidra/Features/Jython/build.gradle index 32abc8a940..b832d40f24 100644 --- a/Ghidra/Features/Python/build.gradle +++ b/Ghidra/Features/Jython/build.gradle @@ -21,7 +21,7 @@ apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle" apply from: "$rootProject.projectDir/gradle/javadoc.gradle" apply plugin: 'eclipse' -eclipse.project.name = 'Features Python' +eclipse.project.name = 'Features Jython' def JYTHON = "org.python:jython-standalone:2.7.3" @@ -51,15 +51,15 @@ task jythonUnpack(type: Copy) { destinationDir file("build/data/${JYTHON_DIR}") } -task pythonSrcCopy(type: Copy) { - description "Copy python-src directory (for Feature Python)" +task jythonSrcCopy(type: Copy) { + description "Copy jython-src directory (for Feature Jython)" - from(file("python-src")) + from(file("jython-src")) - destinationDir file("build/data/python-src") + destinationDir file("build/data/jython-src") } // Ensure that Jython is usable in development xx rootProject.prepDev.dependsOn jythonUnpack jar.dependsOn jythonUnpack -jar.dependsOn pythonSrcCopy +jar.dependsOn jythonSrcCopy diff --git a/Ghidra/Features/Python/certification.manifest b/Ghidra/Features/Jython/certification.manifest similarity index 64% rename from Ghidra/Features/Python/certification.manifest rename to Ghidra/Features/Jython/certification.manifest index 716354906c..d3b4b1eb36 100644 --- a/Ghidra/Features/Python/certification.manifest +++ b/Ghidra/Features/Jython/certification.manifest @@ -2,7 +2,7 @@ ##MODULE IP: Jython License ##MODULE IP: LGPL 2.1 Module.manifest||GHIDRA||||END| -data/python.theme.properties||GHIDRA||||END| +data/jython.theme.properties||GHIDRA||||END| src/main/help/help/TOC_Source.xml||GHIDRA||||END| -src/main/help/help/topics/Python/interpreter.html||GHIDRA||||END| +src/main/help/help/topics/Jython/interpreter.html||GHIDRA||||END| src/main/resources/images/python.png||GHIDRA||||END| diff --git a/Ghidra/Features/Jython/data/jython.theme.properties b/Ghidra/Features/Jython/data/jython.theme.properties new file mode 100644 index 0000000000..7798dfc264 --- /dev/null +++ b/Ghidra/Features/Jython/data/jython.theme.properties @@ -0,0 +1,21 @@ + +[Defaults] + +color.fg.plugin.jython.syntax.class = color.palette.blue +color.fg.plugin.jython.syntax.code = color.palette.darkgreen +color.fg.plugin.jython.syntax.function = color.palette.green +color.fg.plugin.jython.syntax.instance = color.palette.purple +color.fg.plugin.jython.syntax.map = color.palette.steelblue +color.fg.plugin.jython.syntax.method = color.palette.teal +color.fg.plugin.jython.syntax.null = color.palette.red +color.fg.plugin.jython.syntax.number = color.palette.darkgray +color.fg.plugin.jython.syntax.package = color.palette.darkred +color.fg.plugin.jython.syntax.sequence = color.palette.saddlebrown +color.fg.plugin.jython.syntax.special = color.palette.darkgreen + +icon.plugin.jython = python.png + + + +[Dark Defaults] + diff --git a/Ghidra/Features/Python/ghidra_scripts/AddCommentToProgramScriptPy.py b/Ghidra/Features/Jython/ghidra_scripts/AddCommentToProgramScriptPy.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/AddCommentToProgramScriptPy.py rename to Ghidra/Features/Jython/ghidra_scripts/AddCommentToProgramScriptPy.py diff --git a/Ghidra/Features/Python/ghidra_scripts/AskScriptPy.py b/Ghidra/Features/Jython/ghidra_scripts/AskScriptPy.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/AskScriptPy.py rename to Ghidra/Features/Jython/ghidra_scripts/AskScriptPy.py diff --git a/Ghidra/Features/Python/ghidra_scripts/CallAnotherScriptForAllProgramsPy.py b/Ghidra/Features/Jython/ghidra_scripts/CallAnotherScriptForAllProgramsPy.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/CallAnotherScriptForAllProgramsPy.py rename to Ghidra/Features/Jython/ghidra_scripts/CallAnotherScriptForAllProgramsPy.py diff --git a/Ghidra/Features/Python/ghidra_scripts/CallAnotherScriptPy.py b/Ghidra/Features/Jython/ghidra_scripts/CallAnotherScriptPy.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/CallAnotherScriptPy.py rename to Ghidra/Features/Jython/ghidra_scripts/CallAnotherScriptPy.py diff --git a/Ghidra/Features/Python/ghidra_scripts/ChooseDataTypeScriptPy.py b/Ghidra/Features/Jython/ghidra_scripts/ChooseDataTypeScriptPy.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/ChooseDataTypeScriptPy.py rename to Ghidra/Features/Jython/ghidra_scripts/ChooseDataTypeScriptPy.py diff --git a/Ghidra/Features/Python/ghidra_scripts/ExampleColorScriptPy.py b/Ghidra/Features/Jython/ghidra_scripts/ExampleColorScriptPy.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/ExampleColorScriptPy.py rename to Ghidra/Features/Jython/ghidra_scripts/ExampleColorScriptPy.py diff --git a/Ghidra/Features/Python/ghidra_scripts/FormatExampleScriptPy.py b/Ghidra/Features/Jython/ghidra_scripts/FormatExampleScriptPy.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/FormatExampleScriptPy.py rename to Ghidra/Features/Jython/ghidra_scripts/FormatExampleScriptPy.py diff --git a/Ghidra/Features/Python/ghidra_scripts/ImportSymbolsScript.py b/Ghidra/Features/Jython/ghidra_scripts/ImportSymbolsScript.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/ImportSymbolsScript.py rename to Ghidra/Features/Jython/ghidra_scripts/ImportSymbolsScript.py diff --git a/Ghidra/Features/Python/ghidra_scripts/PrintNonZeroPurge.py b/Ghidra/Features/Jython/ghidra_scripts/PrintNonZeroPurge.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/PrintNonZeroPurge.py rename to Ghidra/Features/Jython/ghidra_scripts/PrintNonZeroPurge.py diff --git a/Ghidra/Features/Python/ghidra_scripts/ToolPropertiesExampleScriptPy.py b/Ghidra/Features/Jython/ghidra_scripts/ToolPropertiesExampleScriptPy.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/ToolPropertiesExampleScriptPy.py rename to Ghidra/Features/Jython/ghidra_scripts/ToolPropertiesExampleScriptPy.py diff --git a/Ghidra/Features/Python/ghidra_scripts/external_module_callee.py b/Ghidra/Features/Jython/ghidra_scripts/external_module_callee.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/external_module_callee.py rename to Ghidra/Features/Jython/ghidra_scripts/external_module_callee.py diff --git a/Ghidra/Features/Python/ghidra_scripts/external_module_caller.py b/Ghidra/Features/Jython/ghidra_scripts/external_module_caller.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/external_module_caller.py rename to Ghidra/Features/Jython/ghidra_scripts/external_module_caller.py diff --git a/Ghidra/Features/Python/ghidra_scripts/ghidra_basics.py b/Ghidra/Features/Jython/ghidra_scripts/ghidra_basics.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/ghidra_basics.py rename to Ghidra/Features/Jython/ghidra_scripts/ghidra_basics.py diff --git a/Ghidra/Features/Python/ghidra_scripts/jython_basics.py b/Ghidra/Features/Jython/ghidra_scripts/jython_basics.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/jython_basics.py rename to Ghidra/Features/Jython/ghidra_scripts/jython_basics.py diff --git a/Ghidra/Features/Python/ghidra_scripts/python_basics.py b/Ghidra/Features/Jython/ghidra_scripts/python_basics.py similarity index 100% rename from Ghidra/Features/Python/ghidra_scripts/python_basics.py rename to Ghidra/Features/Jython/ghidra_scripts/python_basics.py diff --git a/Ghidra/Features/Python/python-src/ghidradoc.py b/Ghidra/Features/Jython/jython-src/ghidradoc.py similarity index 100% rename from Ghidra/Features/Python/python-src/ghidradoc.py rename to Ghidra/Features/Jython/jython-src/ghidradoc.py diff --git a/Ghidra/Features/Python/python-src/introspect.py b/Ghidra/Features/Jython/jython-src/introspect.py similarity index 99% rename from Ghidra/Features/Python/python-src/introspect.py rename to Ghidra/Features/Jython/jython-src/introspect.py index aeb4ae2f30..97096f78ec 100644 --- a/Ghidra/Features/Python/python-src/introspect.py +++ b/Ghidra/Features/Jython/jython-src/introspect.py @@ -16,7 +16,7 @@ import sys import tokenize import types import __main__ -from ghidra.python import PythonCodeCompletionFactory +from ghidra.jython import JythonCodeCompletionFactory import java # needed for java.lang.Class try: @@ -72,7 +72,7 @@ def getAutoCompleteList(command='', locals=None, includeMagic=1, pyObj = getattr(object, attribute) else: pyObj = locals[attribute] - completion_list.append(PythonCodeCompletionFactory. + completion_list.append(JythonCodeCompletionFactory. newCodeCompletion(attribute, attribute, pyObj, diff --git a/Ghidra/Features/Python/python-src/jintrospect.py b/Ghidra/Features/Jython/jython-src/jintrospect.py similarity index 99% rename from Ghidra/Features/Python/python-src/jintrospect.py rename to Ghidra/Features/Jython/jython-src/jintrospect.py index 8501e31d4d..9ef61dca20 100644 --- a/Ghidra/Features/Python/python-src/jintrospect.py +++ b/Ghidra/Features/Jython/jython-src/jintrospect.py @@ -8,7 +8,7 @@ import string import __builtin__ import java # needed for java.lang.Class import org # for org.python.core -import ghidra # for PythonCodeCompletionFactory +import ghidra # for JythonCodeCompletionFactory __author__ = "Don Coleman " diff --git a/Ghidra/Features/Python/python-src/sitecustomize.py b/Ghidra/Features/Jython/jython-src/sitecustomize.py similarity index 100% rename from Ghidra/Features/Python/python-src/sitecustomize.py rename to Ghidra/Features/Jython/jython-src/sitecustomize.py diff --git a/Ghidra/Features/Python/src/main/help/help/TOC_Source.xml b/Ghidra/Features/Jython/src/main/help/help/TOC_Source.xml similarity index 55% rename from Ghidra/Features/Python/src/main/help/help/TOC_Source.xml rename to Ghidra/Features/Jython/src/main/help/help/TOC_Source.xml index acdd831d0b..cf46dcb1b7 100644 --- a/Ghidra/Features/Python/src/main/help/help/TOC_Source.xml +++ b/Ghidra/Features/Jython/src/main/help/help/TOC_Source.xml @@ -3,7 +3,7 @@ - + diff --git a/Ghidra/Features/Python/src/main/help/help/topics/Python/interpreter.html b/Ghidra/Features/Jython/src/main/help/help/topics/Jython/interpreter.html similarity index 89% rename from Ghidra/Features/Python/src/main/help/help/topics/Python/interpreter.html rename to Ghidra/Features/Jython/src/main/help/help/topics/Jython/interpreter.html index 4aeb57dc80..d420e49d5d 100644 --- a/Ghidra/Features/Python/src/main/help/help/topics/Python/interpreter.html +++ b/Ghidra/Features/Jython/src/main/help/help/topics/Jython/interpreter.html @@ -2,15 +2,15 @@ - Python Interpreter + Jython Interpreter -

Python Interpreter

+

Jython Interpreter

- The Ghidra Python Interpreter provides a full general-purpose Python interactive shell + The Ghidra Jython Interpreter provides a full general-purpose Jython interactive shell and allows you to interact with your current Ghidra session by exposing Ghidra's powerful Java API through the magic of Jython.

@@ -18,7 +18,7 @@

Environment

- The Ghidra Python Interpreter is configured to run in a similar context as a Ghidra + The Ghidra Jython Interpreter is configured to run in a similar context as a Ghidra script. Therefore, you immediately have access to variables such as currentProgram, currentSelection, currentAddress, etc without needing to import them. These variables exist as Java objects behind the scenes, but Jython allows you to interact with @@ -48,7 +48,7 @@ hierarchy, so nothing has to be explicitly imported before they can be used. However, because the DataTypeSelectionDialog class and AllowedDataType enum reside in different packages, they must be explicitly imported. Failure to do so will result in a - Python NameError. + Jython NameError.

@@ -78,7 +78,7 @@

Keybindings

- The Ghidra Python Interpreter supports the following hard-coded keybindings: + The Ghidra Jython Interpreter supports the following hard-coded keybindings: