mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 03:01:19 +08:00
GP-3336 - DeveloperDumpAllTypesScript wrap call with Swing
This commit is contained in:
@@ -26,8 +26,7 @@ import ghidra.app.services.DataTypeManagerService;
|
|||||||
import ghidra.app.util.ToolTipUtils;
|
import ghidra.app.util.ToolTipUtils;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.program.model.data.*;
|
import ghidra.program.model.data.*;
|
||||||
import ghidra.util.HTMLUtilities;
|
import ghidra.util.*;
|
||||||
import ghidra.util.Msg;
|
|
||||||
import ghidra.util.exception.CancelledException;
|
import ghidra.util.exception.CancelledException;
|
||||||
|
|
||||||
public class DeveloperDumpAllTypesScript extends GhidraScript {
|
public class DeveloperDumpAllTypesScript extends GhidraScript {
|
||||||
@@ -57,12 +56,14 @@ public class DeveloperDumpAllTypesScript extends GhidraScript {
|
|||||||
|
|
||||||
Iterator<DataType> allDataTypes = manager.getAllDataTypes();
|
Iterator<DataType> allDataTypes = manager.getAllDataTypes();
|
||||||
while (allDataTypes.hasNext()) {
|
while (allDataTypes.hasNext()) {
|
||||||
monitor.checkCanceled();
|
monitor.checkCancelled();
|
||||||
DataType dataType = allDataTypes.next();
|
DataType dataType = allDataTypes.next();
|
||||||
DataTypePath dataTypePath = dataType.getDataTypePath();
|
DataTypePath dataTypePath = dataType.getDataTypePath();
|
||||||
String pathString = dataTypePath.toString();
|
String pathString = dataTypePath.toString();
|
||||||
String htmlString = ToolTipUtils.getToolTipText(dataType);
|
String htmlString = ToolTipUtils.getToolTipText(dataType);
|
||||||
String plainString = HTMLUtilities.fromHTML(htmlString);
|
String plainString = Swing.runNow(() -> {
|
||||||
|
return HTMLUtilities.fromHTML(htmlString);
|
||||||
|
});
|
||||||
fileWriter.append(pathString);
|
fileWriter.append(pathString);
|
||||||
fileWriter.append("\n");
|
fileWriter.append("\n");
|
||||||
fileWriter.append(plainString);
|
fileWriter.append(plainString);
|
||||||
|
|||||||
Reference in New Issue
Block a user