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

@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -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

@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -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,8 +161,9 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
dualListingPanel.getListingPanel(LEFT)
.setProgramLocationListener(new SourceProgramLocationListener());
dualListingPanel.getListingPanel(RIGHT).setProgramLocationListener(
new DestinationProgramLocationListener());
dualListingPanel.getListingPanel(RIGHT)
.setProgramLocationListener(
new DestinationProgramLocationListener());
sourceHighlightProvider = new VTDualListingHighlightProvider(controller, true);
destinationHighlightProvider = new VTDualListingHighlightProvider(controller, false);
@@ -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

@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -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")