Fixes action owner usage

This commit is contained in:
dragonmacher 2024-12-19 16:15:45 -05:00
parent a8abf12ede
commit b22574ea9c
26 changed files with 132 additions and 125 deletions

View file

@ -31,7 +31,7 @@ public class ZoomInAAction extends DockingAction {
private MemviewProvider provider;
public ZoomInAAction(MemviewProvider provider) {
super("Zoom In (Addrs)", provider.getName());
super("Zoom In (Addrs)", provider.getOwner());
this.provider = provider;
setEnabled(true);

View file

@ -31,7 +31,7 @@ public class ZoomInTAction extends DockingAction {
private MemviewProvider provider;
public ZoomInTAction(MemviewProvider provider) {
super("Zoom In (Time)", provider.getName());
super("Zoom In (Time)", provider.getOwner());
this.provider = provider;
setEnabled(true);

View file

@ -31,7 +31,7 @@ public class ZoomOutAAction extends DockingAction {
private MemviewProvider provider;
public ZoomOutAAction(MemviewProvider provider) {
super("Zoom Out (Addrs)", provider.getName());
super("Zoom Out (Addrs)", provider.getOwner());
this.provider = provider;
setEnabled(true);

View file

@ -31,7 +31,7 @@ public class ZoomOutTAction extends DockingAction {
private MemviewProvider provider;
public ZoomOutTAction(MemviewProvider provider) {
super("Zoom Out (Time)", provider.getName());
super("Zoom Out (Time)", provider.getOwner());
this.provider = provider;
setEnabled(true);

View file

@ -37,8 +37,8 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
private JPanel mainPanel;
private DockingAction action;
public HelloWorldComponentProvider(PluginTool tool, String name) {
super(tool, name, name);
public HelloWorldComponentProvider(PluginTool tool, String owner) {
super(tool, "Hello World", owner);
buildMainPanel();
setIcon(new GIcon("icon.sample.provider"));
setHelpLocation(HELP);
@ -51,7 +51,7 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
private void createActions() {
// set actions for Hello->World menu item
action = new DockingAction("Hello World", getName()) {
action = new DockingAction("Hello World", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
// pop up a "Hello World" dialog
@ -66,7 +66,7 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
Icon icon = new GIcon("icon.sample.action.hello.world");
action.setMenuBarData(new MenuData(new String[] { "Misc", "Hello World" }, icon));
action.setKeyBindingData(
new KeyBindingData(KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.CTRL_MASK)));
new KeyBindingData(KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.CTRL_DOWN_MASK)));
// puts the action on the local toolbar.
action.setToolBarData(new ToolBarData(icon));
@ -77,7 +77,7 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
addLocalAction(action);
//Example popup action
DockingAction popupAction = new DockingAction("Hello Popup", getName()) {
DockingAction popupAction = new DockingAction("Hello Popup", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
announce("Hello World");
@ -136,9 +136,6 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
return null;
}
/**
* popup the Hello Dialog
*/
protected void announce(String message) {
Msg.showInfo(getClass(), mainPanel, "Hello World", message);
}
@ -148,13 +145,7 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
super(name);
setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 5));
addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
announce("Hello World");
}
});
addActionListener(e -> announce("Hello World"));
}
}
}

View file

@ -39,8 +39,8 @@ public class ShowInfoComponentProvider extends ComponentProviderAdapter {
private Program currentProgram;
private ProgramLocation currentLocation;
public ShowInfoComponentProvider(PluginTool tool, String name) {
super(tool, name, name);
public ShowInfoComponentProvider(PluginTool tool, String owner) {
super(tool, "Show Location Info", owner);
create();
setIcon(PROVIDER_ICON);
setDefaultWindowPosition(WindowPosition.BOTTOM);
@ -102,7 +102,7 @@ public class ShowInfoComponentProvider extends ComponentProviderAdapter {
}
private void createActions() {
clearAction = new DockingAction("Clear Text Area", getName()) {
clearAction = new DockingAction("Clear Text Area", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
textArea.setText("");

View file

@ -102,12 +102,14 @@ public class BSimOverviewProvider extends ComponentProviderAdapter {
addLocalAction(new SelectionNavigationAction(plugin, table));
HelpLocation help =
new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Overview_Search_Info_Action");
new ActionBuilder("Search Info", getName()).toolBarIcon(Icons.INFO_ICON)
new ActionBuilder("Search Info", getOwner())
.toolBarIcon(Icons.INFO_ICON)
.helpLocation(help)
.onAction(c -> showSearchInfo())
.buildAndInstallLocal(this);
new ActionBuilder("Make Selection", getOwner()).popupMenuPath("Make Selection")
new ActionBuilder("Make Selection", getOwner())
.popupMenuPath("Make Selection")
.description("Make a selection using selected rows")
.helpLocation(
new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Overview_Make_Selection"))

View file

@ -132,23 +132,27 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
}
private void createActions() {
new ActionBuilder("Search Info", getName()).toolBarIcon(Icons.INFO_ICON)
new ActionBuilder("Search Info", getOwner())
.toolBarIcon(Icons.INFO_ICON)
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Search_Info_Action"))
.onAction(c -> showSearchInfo())
.buildAndInstallLocal(this);
new ActionBuilder("Show Searched Functions", getName()).toolBarIcon(FUNCTIONS_ICON)
new ActionBuilder("Show Searched Functions", getOwner())
.toolBarIcon(FUNCTIONS_ICON)
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Searched_Functions"))
.onAction(c -> showSearchedFunctions())
.buildAndInstallLocal(this);
new ActionBuilder("Filter Results", getName()).toolBarIcon(Icons.CONFIGURE_FILTER_ICON)
new ActionBuilder("Filter Results", getOwner())
.toolBarIcon(Icons.CONFIGURE_FILTER_ICON)
.helpLocation(
new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Filter_Results_Action"))
.onAction(c -> showFilterPanel())
.buildAndInstallLocal(this);
new ActionBuilder("Filter Executable", getName()).popupMenuPath("Filter on this Executable")
new ActionBuilder("Filter Executable", getOwner())
.popupMenuPath("Filter on this Executable")
.description("Filter on a specific executable in the function match table")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Filter_On_Executable"))
.withContext(ExecutableTableActionContext.class)
@ -156,7 +160,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::filterOnExecutable)
.buildAndInstallLocal(this);
new ActionBuilder("Load Executable", getName()).popupMenuPath("Load Executable")
new ActionBuilder("Load Executable", getOwner())
.popupMenuPath("Load Executable")
.description("Load the selected executable into the Codebrowser")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Load_Executable"))
.withContext(ExecutableTableActionContext.class)
@ -164,7 +169,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::loadExecutable)
.buildAndInstallLocal(this);
new ActionBuilder("Compare Functions", getName()).popupMenuPath("Compare Functions")
new ActionBuilder("Compare Functions", getOwner())
.popupMenuPath("Compare Functions")
.popupMenuGroup("1")
.keyBinding("shift c")
.sharedKeyBinding()
@ -175,7 +181,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::compareFunctions)
.buildAndInstallLocal(this);
new ActionBuilder("Apply Function Name", getName()).popupMenuPath("Apply Name")
new ActionBuilder("Apply Function Name", getOwner())
.popupMenuPath("Apply Name")
.popupMenuGroup(APPLY_GROUP, "1")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Apply_Name"))
.withContext(BSimMatchesTableActionContext.class)
@ -183,7 +190,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::applyName)
.buildAndInstallLocal(this);
new ActionBuilder("Apply Function Signature", getName()).popupMenuPath("Apply Signature")
new ActionBuilder("Apply Function Signature", getOwner())
.popupMenuPath("Apply Signature")
.popupMenuGroup(APPLY_GROUP, "2")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Apply_Signature"))
.withContext(BSimMatchesTableActionContext.class)
@ -191,7 +199,7 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::applySignature)
.buildAndInstallLocal(this);
new ActionBuilder("Apply Signature and Datatypes", getName())
new ActionBuilder("Apply Signature and Datatypes", getOwner())
.popupMenuPath("Apply Signature and Data Types")
.popupMenuGroup(APPLY_GROUP, "3")
.helpLocation(
@ -201,7 +209,7 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::applySignatureWithDatatypes)
.buildAndInstallLocal(this);
showExecutableTableAction = new ToggleActionBuilder("Show Executables Table", getName())
showExecutableTableAction = new ToggleActionBuilder("Show Executables Table", getOwner())
.toolBarIcon(SPLIT_VIEW_ICON)
.description("Toggles showing Executables table")
.helpLocation(
@ -212,7 +220,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
addLocalAction(new SelectionNavigationAction(plugin, matchesTable.getTable()));
new ActionBuilder("Clear BSim Error Status", getName()).popupMenuPath("Clear error status")
new ActionBuilder("Clear BSim Error Status", getOwner())
.popupMenuPath("Clear error status")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Clear_Error_Status"))
.withContext(BSimMatchesTableActionContext.class)
.enabledWhen(this::canClearErrors)

View file

@ -58,7 +58,7 @@ public class ListingMergePanelProvider extends ComponentProviderAdapter
public List<DockingActionIf> getPopupActions(Tool dt, ActionContext context) {
ListingPanel resultPanel = mergePanel.getResultPanel();
if (resultPanel != null) {
return resultPanel.getHeaderActions(getName());
return resultPanel.getHeaderActions(getOwner());
}
return null;
}

View file

@ -461,7 +461,7 @@ public class CodeViewerProvider extends NavigatableComponentProviderAdapter
tool.addLocalAction(this, new CollapseAllDataAction(this));
tool.addLocalAction(this, new ToggleExpandCollapseDataAction(this));
cloneCodeViewerAction = new CloneCodeViewerAction(getName(), this);
cloneCodeViewerAction = new CloneCodeViewerAction(plugin.getName(), this);
addLocalAction(cloneCodeViewerAction);
DockingAction action = new GotoPreviousFunctionAction(tool, plugin.getName());
@ -982,7 +982,7 @@ public class CodeViewerProvider extends NavigatableComponentProviderAdapter
@Override
public List<DockingActionIf> getPopupActions(Tool dt, ActionContext context) {
if (context.getComponentProvider() == this) {
return listingPanel.getHeaderActions(getName());
return listingPanel.getHeaderActions(getOwner());
}
return null;
}

View file

@ -63,7 +63,7 @@ public class InterpreterComponentProvider extends ComponentProviderAdapter
private void createActions() {
DockingAction clearAction = new DockingAction("Clear Interpreter", getName()) {
DockingAction clearAction = new DockingAction("Clear Interpreter", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
clear();

View file

@ -249,7 +249,7 @@ public class LocationReferencesProvider extends ComponentProviderAdapter
selectionAction =
new MakeProgramSelectionAction(locationReferencesPlugin, referencesPanel.getTable());
highlightAction = new ToggleDockingAction("Highlight Matches", getName()) {
highlightAction = new ToggleDockingAction("Highlight Matches", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
updateHighlights();

View file

@ -133,7 +133,7 @@ public class BundleStatusComponentProvider extends ComponentProviderAdapter {
private void addBundlesAction(String actionName, String description, Icon icon,
Runnable runnable) {
new ActionBuilder(actionName, this.getName()).popupMenuPath(description)
new ActionBuilder(actionName, getOwner()).popupMenuPath(description)
.popupMenuIcon(icon)
.popupMenuGroup(BUNDLE_GROUP)
.description(description)
@ -145,7 +145,8 @@ public class BundleStatusComponentProvider extends ComponentProviderAdapter {
private void createActions() {
Icon icon = Icons.REFRESH_ICON;
new ActionBuilder("RefreshBundles", this.getName()).popupMenuPath("Refresh all")
new ActionBuilder("RefreshBundles", getOwner())
.popupMenuPath("Refresh all")
.popupMenuIcon(icon)
.popupMenuGroup(BUNDLE_LIST_GROUP)
.toolBarIcon(icon)
@ -164,7 +165,8 @@ public class BundleStatusComponentProvider extends ComponentProviderAdapter {
this::doCleanBundleBuildCaches);
icon = Icons.ADD_ICON;
new ActionBuilder("AddBundles", this.getName()).popupMenuPath("Add bundle(s)")
new ActionBuilder("AddBundles", getOwner())
.popupMenuPath("Add bundle(s)")
.popupMenuIcon(icon)
.popupMenuGroup(BUNDLE_LIST_GROUP)
.toolBarIcon(icon)
@ -174,7 +176,7 @@ public class BundleStatusComponentProvider extends ComponentProviderAdapter {
.buildAndInstallLocal(this);
icon = Icons.DELETE_ICON;
new ActionBuilder("RemoveBundles", this.getName())
new ActionBuilder("RemoveBundles", getOwner())
.popupMenuPath("Remove selected bundle(s)")
.popupMenuIcon(icon)
.popupMenuGroup(BUNDLE_LIST_GROUP)

View file

@ -100,7 +100,7 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
void createActions() {
HelpLocation helpLocation = new HelpLocation("RegisterPlugin", "tool_buttons");
deleteRegisterValuesAction = new DockingAction("Delete Register Value Ranges", getName()) {
deleteRegisterValuesAction = new DockingAction("Delete Register Value Ranges", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
values.deleteSelectedRanges();
@ -114,7 +114,7 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
deleteRegisterValuesAction.setHelpLocation(helpLocation);
tool.addLocalAction(this, deleteRegisterValuesAction);
selectRegisterValuesAction = new DockingAction("Select Register Value Ranges", getName()) {
selectRegisterValuesAction = new DockingAction("Select Register Value Ranges", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
values.selectedRanges();
@ -129,7 +129,7 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
tool.addLocalAction(this, selectRegisterValuesAction);
showDefaultRegisterValuesAction =
new ToggleDockingAction("Show default register values", getName()) {
new ToggleDockingAction("Show default register values", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
values.setShowDefaultValues(showDefaultRegisterValuesAction.isSelected());
@ -144,7 +144,7 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
.setHelpLocation(new HelpLocation("RegisterPlugin", "menu_actions"));
tool.addLocalAction(this, showDefaultRegisterValuesAction);
filterRegistersAction = new ToggleDockingAction("Filter Registers", getName()) {
filterRegistersAction = new ToggleDockingAction("Filter Registers", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
tree.setFiltered(filterRegistersAction.isSelected());
@ -157,7 +157,8 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
filterRegistersAction.setHelpLocation(helpLocation);
tool.addLocalAction(this, filterRegistersAction);
followLocationToggleAction = new ToggleDockingAction("Follow location changes", getName()) {
followLocationToggleAction =
new ToggleDockingAction("Follow location changes", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
followLocation = followLocationToggleAction.isSelected();

View file

@ -174,7 +174,7 @@ public class TableComponentProvider<T> extends ComponentProviderAdapter
selectionNavigationAction
.setHelpLocation(new HelpLocation(HelpTopics.SEARCH, "Selection_Navigation"));
externalGotoAction = new DockingAction("Go to External Location", getName()) {
externalGotoAction = new DockingAction("Go to External Location", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
gotoExternalAddress(getSelectedExternalAddress());

View file

@ -38,8 +38,8 @@ public class DomainEventComponentProvider extends ComponentProviderAdapter {
private DockingAction clearAction;
private List<String> eventList;
public DomainEventComponentProvider(PluginTool tool, String name) {
super(tool, name, name);
public DomainEventComponentProvider(PluginTool tool, String owner) {
super(tool, "Domain Events", owner);
eventList = new ArrayList<>();
textArea = new JTextArea(10, 80);
@ -64,7 +64,7 @@ public class DomainEventComponentProvider extends ComponentProviderAdapter {
}
private void createAction() {
clearAction = new DockingAction("Clear Display", getName()) {
clearAction = new DockingAction("Clear Display", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
clear();

View file

@ -36,8 +36,8 @@ public class DomainFolderChangesDisplayComponentProvider extends ComponentProvid
private Point bottom = new Point(0, 10000);
private DockingAction clearAction;
public DomainFolderChangesDisplayComponentProvider(PluginTool tool, String name) {
super(tool, name, name);
public DomainFolderChangesDisplayComponentProvider(PluginTool tool, String owner) {
super(tool, "Domain Folder Changes", owner);
textArea = new JTextArea(10, 80);
textArea.setEditable(true);
scrollPane = new JScrollPane(textArea);
@ -63,7 +63,7 @@ public class DomainFolderChangesDisplayComponentProvider extends ComponentProvid
}
private void createAction() {
clearAction = new DockingAction("Clear Display", getName()) {
clearAction = new DockingAction("Clear Display", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
clear();

View file

@ -36,8 +36,8 @@ public class EventDisplayComponentProvider extends ComponentProviderAdapter {
private Point bottom = new Point(0, 10000);
private DockingAction clearAction;
public EventDisplayComponentProvider(PluginTool tool, String name) {
super(tool, name, name);
public EventDisplayComponentProvider(PluginTool tool, String owner) {
super(tool, "Plugin Event Display", owner);
textArea = new JTextArea(10, 80);
textArea.setEditable(true);
scrollPane = new JScrollPane(textArea);
@ -73,7 +73,7 @@ public class EventDisplayComponentProvider extends ComponentProviderAdapter {
}
private void createAction() {
clearAction = new DockingAction("Clear Display", getName()) {
clearAction = new DockingAction("Clear Display", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
clear();

View file

@ -60,7 +60,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
public TextEditorComponentProvider(FileSystemBrowserPlugin plugin, String textFileName,
String text) {
super(plugin.getTool(), TITLE, "TextEditorComponentProvider");
super(plugin.getTool(), TITLE, plugin.getName());
this.textFileName = textFileName;
initialize(text);
}
@ -134,7 +134,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
}
private void createActions() {
undoAction = new DockingAction("Undo", getName()) {
undoAction = new DockingAction("Undo", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
undo();
@ -150,7 +150,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
undoAction.setKeyBindingData(new KeyBindingData("ctrl z"));
addLocalAction(undoAction);
redoAction = new DockingAction("Redo", getName()) {
redoAction = new DockingAction("Redo", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
redo();
@ -166,7 +166,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
redoAction.setKeyBindingData(new KeyBindingData("ctrl shift z"));
addLocalAction(redoAction);
saveAction = new DockingAction("Save File", getName()) {
saveAction = new DockingAction("Save File", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
save();
@ -182,7 +182,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
saveAction.setKeyBindingData(new KeyBindingData("ctrl-s"));
addLocalAction(saveAction);
saveAsAction = new DockingAction("Save File As", getName()) {
saveAsAction = new DockingAction("Save File As", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
saveAs();
@ -192,7 +192,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
saveAsAction.setToolBarData(new ToolBarData(Icons.SAVE_AS_ICON, "Save"));
addLocalAction(saveAsAction);
fontAction = new DockingAction("Select Font", getName()) {
fontAction = new DockingAction("Select Font", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
doSelectFont();

View file

@ -298,7 +298,7 @@ public class HeaderActionsTest extends AbstractGhidraHeadedIntegrationTest {
private DockingAction getHeaderAction(String name) {
ListingPanel listingPanel = cb.getListingPanel();
List<DockingActionIf> actions = listingPanel.getHeaderActions(provider.getName());
List<DockingActionIf> actions = listingPanel.getHeaderActions(provider.getOwner());
for (DockingActionIf action : actions) {
if (action.getName().equals(name)) {
return (DockingAction) action;

View file

@ -157,7 +157,7 @@ public class FunctionComparisonProvider extends ComponentProviderAdapter
functionComparisonPanel.getDualListingPanel();
if (dualListingPanel != null) {
ListingPanel leftPanel = dualListingPanel.getListingPanel(LEFT);
return leftPanel.getHeaderActions(getName());
return leftPanel.getHeaderActions(getOwner());
}
}
return new ArrayList<>();

View file

@ -222,7 +222,7 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
functionComparisonPanel.getDualListingPanel();
if (dualListingPanel != null) {
ListingPanel leftPanel = dualListingPanel.getListingPanel(LEFT);
return leftPanel.getHeaderActions(getName());
return leftPanel.getHeaderActions(getOwner());
}
}
return new ArrayList<>();
@ -368,7 +368,7 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
statusPanel.add(statusLabel, BorderLayout.CENTER);
dualTablePanel.add(statusPanel, BorderLayout.SOUTH);
functionComparisonPanel = new FunctionComparisonPanel(tool, getName());
functionComparisonPanel = new FunctionComparisonPanel(tool, getOwner());
addSpecificCodeComparisonActions();
functionComparisonPanel.setCurrentTabbedComponent(ListingCodeComparisonPanel.NAME);
functionComparisonPanel.setTitlePrefixes("Source:", "Destination:");

View file

@ -152,7 +152,7 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
markupItemsTablePanel.add(tablePanel, BorderLayout.CENTER);
markupItemsTablePanel.add(filterAreaPanel, BorderLayout.SOUTH);
functionComparisonPanel = new FunctionComparisonPanel(tool, getName());
functionComparisonPanel = new FunctionComparisonPanel(tool, getOwner());
addSpecificCodeComparisonActions();
functionComparisonPanel.setCurrentTabbedComponent(ListingCodeComparisonPanel.NAME);
functionComparisonPanel.setTitlePrefixes("Source:", "Destination:");
@ -161,7 +161,8 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
dualListingPanel.getListingPanel(LEFT)
.setProgramLocationListener(new SourceProgramLocationListener());
dualListingPanel.getListingPanel(RIGHT).setProgramLocationListener(
dualListingPanel.getListingPanel(RIGHT)
.setProgramLocationListener(
new DestinationProgramLocationListener());
sourceHighlightProvider = new VTDualListingHighlightProvider(controller, true);
@ -466,7 +467,7 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
ListingCodeComparisonPanel dualListingPanel = functionComparisonPanel.getDualListingPanel();
if (context.getComponentProvider() == this && dualListingPanel != null) {
ListingPanel sourcePanel = dualListingPanel.getListingPanel(LEFT);
return sourcePanel.getHeaderActions(getName());
return sourcePanel.getHeaderActions(getOwner());
}
return new ArrayList<>();
}

View file

@ -140,7 +140,8 @@ public class VTMatchTableProvider extends ComponentProviderAdapter
tableSelectionStateAction = new MatchTableSelectionAction(this);
addLocalAction(tableSelectionStateAction);
new ActionBuilder("Compare Functions", getName()).popupMenuPath("Compare Functions")
new ActionBuilder("Compare Functions", getOwner())
.popupMenuPath("Compare Functions")
.popupMenuGroup("Selection")
.popupMenuIcon(COMPARISON_ICON)
.keyBinding("shift c")

View file

@ -43,9 +43,9 @@ import ghidra.feature.vt.gui.plugin.*;
import ghidra.feature.vt.gui.provider.markuptable.DisplayableListingAddress;
import ghidra.feature.vt.gui.provider.matchtable.MatchTableRenderer;
import ghidra.feature.vt.gui.util.AbstractVTMatchTableModel.StatusTableColumn;
import ghidra.features.base.codecompare.model.MatchedFunctionComparisonModel;
import ghidra.feature.vt.gui.util.MatchInfo;
import ghidra.feature.vt.gui.util.MatchStatusRenderer;
import ghidra.features.base.codecompare.model.MatchedFunctionComparisonModel;
import ghidra.framework.model.*;
import ghidra.framework.options.Options;
import ghidra.framework.plugintool.ComponentProviderAdapter;
@ -136,7 +136,7 @@ public abstract class VTMatchOneToManyTableProvider extends ComponentProviderAda
addLocalAction(new SetVTMatchFromOneToManyAction(controller, true));
addLocalAction(new ClearMatchAction(controller));
addLocalAction(new AcceptMatchAction(controller));
new ActionBuilder("Compare Functions", getName())
new ActionBuilder("Compare Functions", getOwner())
.popupMenuPath("Compare Functions")
.popupMenuIcon(COMPARISON_ICON)
.popupMenuGroup("AAA_VT_Main")

View file

@ -80,7 +80,7 @@ public class SkeletonPlugin extends ProgramPlugin {
private DockingAction action;
public MyProvider(Plugin plugin, String owner) {
super(plugin.getTool(), owner, owner);
super(plugin.getTool(), "Skeleton Provider", owner);
buildPanel();
createActions();
}
@ -96,7 +96,7 @@ public class SkeletonPlugin extends ProgramPlugin {
// Customize actions
private void createActions() {
action = new DockingAction("My Action", getName()) {
action = new DockingAction("My Action", getOwner()) {
@Override
public void actionPerformed(ActionContext context) {
Msg.showInfo(getClass(), panel, "Custom Action", "Hello!");