Skip to content

Ghidra is a software reverse engineering (SRE) framework

Merge remote-tracking branch 'origin/patch'

Ryan Kurtzbc2f6977984d
diff --cc Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypesProvider.java
index d7f8745fa9,29a06a8991..40f56b32f5
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypesProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypesProvider.java
@@@ -780,28 -780,8 +780,27 @@@ public class DataTypesProvider extends
contextChanged();
}
+ /**
+ * Returns a list of all the data types selected in the data types tree
+ * @return a list of all the data types selected in the data types tree
+ */
+ public List<DataType> getSelectedDataTypes() {
+ List<DataType> selectedDataTypes = new ArrayList<>();
+ DataTypeArchiveGTree gTree = getGTree();
+ for (TreePath path : gTree.getSelectionPaths()) {
+ Object node = path.getLastPathComponent();
+ if (node instanceof DataTypeNode) {
+ DataType dataType = ((DataTypeNode) node).getDataType();
+ if (dataType != null) {
+ selectedDataTypes.add(dataType);
+ }
+ }
+ }
+ return selectedDataTypes;
+ }
+
// this is a callback from the action--we need this to prevent callbacks, as the other
- // version of this method will try to get the method, which will lazily created it, which
- // will trigger a callback...
+ // version of this method will update the action, which would trigger a callback
public void setIncludeDataTypeMembersInFilterCallback(boolean newValue) {
includeDataMembersInFilter = newValue;
archiveGTree.setIncludeDataTypeMembersInSearch(includeDataMembersInFilter);