diff --git 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 index b4b52e2cbe4..a7594719bc5 100644 --- 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 @@ -221,12 +221,9 @@ private void createLocalActions() { addLocalAction(previousAction); nextAction = new NextPreviousDataTypeAction(this, plugin.getName(), true); addLocalAction(nextAction); - filterArraysAction = getFilterArraysAction(); - addLocalAction(filterArraysAction); - filterPointersAction = getFilterPointersAction(); - addLocalAction(filterPointersAction); - conflictHandlerModesAction = getConflictHandlerModesAction(); - addLocalAction(conflictHandlerModesAction); + addLocalAction(getFilterArraysAction()); + addLocalAction(getFilterPointersAction()); + addLocalAction(getConflictHandlerModesAction()); // toolbar menu addLocalAction(new OpenArchiveAction(plugin)); @@ -318,6 +315,7 @@ public boolean isFilteringArrays() { private ToggleDockingAction getFilterPointersAction() { if (filterPointersAction == null) { filterPointersAction = new FilterPointersAction(plugin); + archiveGTree.enablePointerFilter(filterPointersAction.isSelected()); } return filterPointersAction; @@ -326,6 +324,7 @@ private ToggleDockingAction getFilterPointersAction() { private ToggleDockingAction getFilterArraysAction() { if (filterArraysAction == null) { filterArraysAction = new FilterArraysAction(plugin); + archiveGTree.enableArrayFilter(filterArraysAction.isSelected()); } return filterArraysAction; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/ConflictHandlerModesAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/ConflictHandlerModesAction.java index 33eed2e4028..5ada3f196dd 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/ConflictHandlerModesAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/ConflictHandlerModesAction.java @@ -26,14 +26,11 @@ import ghidra.program.model.data.DataTypeConflictHandler.ConflictResolutionPolicy; import ghidra.util.HelpLocation; -public class ConflictHandlerModesAction extends - MultiStateDockingAction { - -// private final DataTypeManagerPlugin plugin; +public class ConflictHandlerModesAction + extends MultiStateDockingAction { public ConflictHandlerModesAction(DataTypeManagerPlugin plugin) { super("Data Type Conflict Resolution Mode", plugin.getName()); -// this.plugin = plugin; setGroup("conflicts"); @@ -49,27 +46,22 @@ public ConflictHandlerModesAction(DataTypeManagerPlugin plugin) { //@formatter:on ActionState renameAndAddState = - new ActionState<>( - "Rename New or Moved Data Type", renameAndAddIcon, + new ActionState<>("Rename New or Moved Data Type", renameAndAddIcon, DataTypeConflictHandler.ConflictResolutionPolicy.RENAME_AND_ADD); renameAndAddState.setHelpLocation(conflictModesHelpLocation); ActionState useExistingState = - new ActionState<>( - "Use Existing Data Type", useExistingIcon, + new ActionState<>("Use Existing Data Type", useExistingIcon, DataTypeConflictHandler.ConflictResolutionPolicy.USE_EXISTING); useExistingState.setHelpLocation(conflictModesHelpLocation); ActionState replaceExistingState = - new ActionState<>( - "Replace Existing Data Type", replaceExistingIcon, + new ActionState<>("Replace Existing Data Type", replaceExistingIcon, DataTypeConflictHandler.ConflictResolutionPolicy.REPLACE_EXISTING); replaceExistingState.setHelpLocation(conflictModesHelpLocation); ActionState replaceDefaultState = - new ActionState<>( - "Replace Empty Structures else Rename", - replaceDefaultIcon, + new ActionState<>("Replace Empty Structures else Rename", replaceDefaultIcon, DataTypeConflictHandler.ConflictResolutionPolicy.REPLACE_EMPTY_STRUCTS_OR_RENAME_AND_ADD); replaceDefaultState.setHelpLocation(conflictModesHelpLocation); @@ -86,7 +78,7 @@ public ConflictHandlerModesAction(DataTypeManagerPlugin plugin) { @Override public void actionStateChanged(ActionState newActionState, EventTrigger trigger) { - // action tracks its own state + // nothing to do; the action state is queried as needed by the client } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/tree/DataTypeArchiveGTree.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/tree/DataTypeArchiveGTree.java index 72e3f3b5176..fa73fcfc2b7 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/tree/DataTypeArchiveGTree.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/tree/DataTypeArchiveGTree.java @@ -364,7 +364,6 @@ public void treeExpanded(TreeExpansionEvent event) { } private class DataTypeTreeRenderer extends GTreeRenderer { - private static final int ICON_WIDTH = 24; private static final int ICON_HEIGHT = 18; @Override