mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-02 10:47:10 +08:00
GP-6669: JsonDoclet now outputs public/private/protected, which Jython
and PyGhidra will display in help()
This commit is contained in:
@@ -567,6 +567,10 @@ import pdb # imports Python's pdb
|
||||
import pdb_ # imports Ghidra's pdb
|
||||
```
|
||||
## Change History
|
||||
__3.2.0__
|
||||
* PyGhidra's `help()` override can now show `public/private/protected` on Ghidra Java fields and
|
||||
methods (available in Ghidra 12.2 and later).
|
||||
|
||||
__3.1.0__
|
||||
* PyGhidra will now, by default, restore `sys.modules` to its prior state after a PyGhidra script is
|
||||
run (or the interactive interpreter is reset) so the next time a script is run, it freshly loads
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
__version__ = "3.1.0"
|
||||
__version__ = "3.2.0"
|
||||
|
||||
# stub for documentation and typing
|
||||
# this is mostly to hide the function parameter
|
||||
|
||||
@@ -103,6 +103,8 @@ class _Helper:
|
||||
sig = f"{field['type_long']} {field['name']}"
|
||||
if field['static']:
|
||||
sig = "static " + sig
|
||||
if field.get("access"):
|
||||
sig = field.get("access") + " " + sig
|
||||
if constant_value := field['constant_value']:
|
||||
sig += " = " + constant_value
|
||||
sig += "\n"
|
||||
@@ -124,6 +126,8 @@ class _Helper:
|
||||
sig = f"{method['return']['type_short']} {method['name']}({paramsig})\n"
|
||||
if method['static']:
|
||||
sig = "static " + sig
|
||||
if method.get("access"):
|
||||
sig = method.get("access") + " " + sig
|
||||
if comment := method['comment']:
|
||||
desc = f" {comment}\n\n"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user