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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,7 +31,7 @@ public class ZoomInAAction extends DockingAction {
private MemviewProvider provider; private MemviewProvider provider;
public ZoomInAAction(MemviewProvider provider) { public ZoomInAAction(MemviewProvider provider) {
super("Zoom In (Addrs)", provider.getName()); super("Zoom In (Addrs)", provider.getOwner());
this.provider = provider; this.provider = provider;
setEnabled(true); setEnabled(true);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,7 +31,7 @@ public class ZoomInTAction extends DockingAction {
private MemviewProvider provider; private MemviewProvider provider;
public ZoomInTAction(MemviewProvider provider) { public ZoomInTAction(MemviewProvider provider) {
super("Zoom In (Time)", provider.getName()); super("Zoom In (Time)", provider.getOwner());
this.provider = provider; this.provider = provider;
setEnabled(true); setEnabled(true);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,7 +31,7 @@ public class ZoomOutAAction extends DockingAction {
private MemviewProvider provider; private MemviewProvider provider;
public ZoomOutAAction(MemviewProvider provider) { public ZoomOutAAction(MemviewProvider provider) {
super("Zoom Out (Addrs)", provider.getName()); super("Zoom Out (Addrs)", provider.getOwner());
this.provider = provider; this.provider = provider;
setEnabled(true); setEnabled(true);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,7 +31,7 @@ public class ZoomOutTAction extends DockingAction {
private MemviewProvider provider; private MemviewProvider provider;
public ZoomOutTAction(MemviewProvider provider) { public ZoomOutTAction(MemviewProvider provider) {
super("Zoom Out (Time)", provider.getName()); super("Zoom Out (Time)", provider.getOwner());
this.provider = provider; this.provider = provider;
setEnabled(true); setEnabled(true);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -37,8 +37,8 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
private JPanel mainPanel; private JPanel mainPanel;
private DockingAction action; private DockingAction action;
public HelloWorldComponentProvider(PluginTool tool, String name) { public HelloWorldComponentProvider(PluginTool tool, String owner) {
super(tool, name, name); super(tool, "Hello World", owner);
buildMainPanel(); buildMainPanel();
setIcon(new GIcon("icon.sample.provider")); setIcon(new GIcon("icon.sample.provider"));
setHelpLocation(HELP); setHelpLocation(HELP);
@ -51,7 +51,7 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
private void createActions() { private void createActions() {
// set actions for Hello->World menu item // set actions for Hello->World menu item
action = new DockingAction("Hello World", getName()) { action = new DockingAction("Hello World", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
// pop up a "Hello World" dialog // pop up a "Hello World" dialog
@ -66,7 +66,7 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
Icon icon = new GIcon("icon.sample.action.hello.world"); Icon icon = new GIcon("icon.sample.action.hello.world");
action.setMenuBarData(new MenuData(new String[] { "Misc", "Hello World" }, icon)); action.setMenuBarData(new MenuData(new String[] { "Misc", "Hello World" }, icon));
action.setKeyBindingData( 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. // puts the action on the local toolbar.
action.setToolBarData(new ToolBarData(icon)); action.setToolBarData(new ToolBarData(icon));
@ -77,7 +77,7 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
addLocalAction(action); addLocalAction(action);
//Example popup action //Example popup action
DockingAction popupAction = new DockingAction("Hello Popup", getName()) { DockingAction popupAction = new DockingAction("Hello Popup", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
announce("Hello World"); announce("Hello World");
@ -136,9 +136,6 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
return null; return null;
} }
/**
* popup the Hello Dialog
*/
protected void announce(String message) { protected void announce(String message) {
Msg.showInfo(getClass(), mainPanel, "Hello World", message); Msg.showInfo(getClass(), mainPanel, "Hello World", message);
} }
@ -148,13 +145,7 @@ public class HelloWorldComponentProvider extends ComponentProviderAdapter {
super(name); super(name);
setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 5)); setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 5));
addActionListener(new ActionListener() { addActionListener(e -> announce("Hello World"));
@Override
public void actionPerformed(ActionEvent e) {
announce("Hello World");
}
});
} }
} }
} }

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -39,8 +39,8 @@ public class ShowInfoComponentProvider extends ComponentProviderAdapter {
private Program currentProgram; private Program currentProgram;
private ProgramLocation currentLocation; private ProgramLocation currentLocation;
public ShowInfoComponentProvider(PluginTool tool, String name) { public ShowInfoComponentProvider(PluginTool tool, String owner) {
super(tool, name, name); super(tool, "Show Location Info", owner);
create(); create();
setIcon(PROVIDER_ICON); setIcon(PROVIDER_ICON);
setDefaultWindowPosition(WindowPosition.BOTTOM); setDefaultWindowPosition(WindowPosition.BOTTOM);
@ -102,7 +102,7 @@ public class ShowInfoComponentProvider extends ComponentProviderAdapter {
} }
private void createActions() { private void createActions() {
clearAction = new DockingAction("Clear Text Area", getName()) { clearAction = new DockingAction("Clear Text Area", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
textArea.setText(""); textArea.setText("");

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -102,12 +102,14 @@ public class BSimOverviewProvider extends ComponentProviderAdapter {
addLocalAction(new SelectionNavigationAction(plugin, table)); addLocalAction(new SelectionNavigationAction(plugin, table));
HelpLocation help = HelpLocation help =
new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Overview_Search_Info_Action"); 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) .helpLocation(help)
.onAction(c -> showSearchInfo()) .onAction(c -> showSearchInfo())
.buildAndInstallLocal(this); .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") .description("Make a selection using selected rows")
.helpLocation( .helpLocation(
new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Overview_Make_Selection")) new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Overview_Make_Selection"))

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -132,23 +132,27 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
} }
private void createActions() { 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")) .helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Search_Info_Action"))
.onAction(c -> showSearchInfo()) .onAction(c -> showSearchInfo())
.buildAndInstallLocal(this); .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")) .helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Searched_Functions"))
.onAction(c -> showSearchedFunctions()) .onAction(c -> showSearchedFunctions())
.buildAndInstallLocal(this); .buildAndInstallLocal(this);
new ActionBuilder("Filter Results", getName()).toolBarIcon(Icons.CONFIGURE_FILTER_ICON) new ActionBuilder("Filter Results", getOwner())
.toolBarIcon(Icons.CONFIGURE_FILTER_ICON)
.helpLocation( .helpLocation(
new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Filter_Results_Action")) new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Filter_Results_Action"))
.onAction(c -> showFilterPanel()) .onAction(c -> showFilterPanel())
.buildAndInstallLocal(this); .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") .description("Filter on a specific executable in the function match table")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Filter_On_Executable")) .helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Filter_On_Executable"))
.withContext(ExecutableTableActionContext.class) .withContext(ExecutableTableActionContext.class)
@ -156,7 +160,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::filterOnExecutable) .onAction(this::filterOnExecutable)
.buildAndInstallLocal(this); .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") .description("Load the selected executable into the Codebrowser")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Load_Executable")) .helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Load_Executable"))
.withContext(ExecutableTableActionContext.class) .withContext(ExecutableTableActionContext.class)
@ -164,7 +169,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::loadExecutable) .onAction(this::loadExecutable)
.buildAndInstallLocal(this); .buildAndInstallLocal(this);
new ActionBuilder("Compare Functions", getName()).popupMenuPath("Compare Functions") new ActionBuilder("Compare Functions", getOwner())
.popupMenuPath("Compare Functions")
.popupMenuGroup("1") .popupMenuGroup("1")
.keyBinding("shift c") .keyBinding("shift c")
.sharedKeyBinding() .sharedKeyBinding()
@ -175,7 +181,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::compareFunctions) .onAction(this::compareFunctions)
.buildAndInstallLocal(this); .buildAndInstallLocal(this);
new ActionBuilder("Apply Function Name", getName()).popupMenuPath("Apply Name") new ActionBuilder("Apply Function Name", getOwner())
.popupMenuPath("Apply Name")
.popupMenuGroup(APPLY_GROUP, "1") .popupMenuGroup(APPLY_GROUP, "1")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Apply_Name")) .helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Apply_Name"))
.withContext(BSimMatchesTableActionContext.class) .withContext(BSimMatchesTableActionContext.class)
@ -183,7 +190,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::applyName) .onAction(this::applyName)
.buildAndInstallLocal(this); .buildAndInstallLocal(this);
new ActionBuilder("Apply Function Signature", getName()).popupMenuPath("Apply Signature") new ActionBuilder("Apply Function Signature", getOwner())
.popupMenuPath("Apply Signature")
.popupMenuGroup(APPLY_GROUP, "2") .popupMenuGroup(APPLY_GROUP, "2")
.helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Apply_Signature")) .helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Apply_Signature"))
.withContext(BSimMatchesTableActionContext.class) .withContext(BSimMatchesTableActionContext.class)
@ -191,7 +199,7 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::applySignature) .onAction(this::applySignature)
.buildAndInstallLocal(this); .buildAndInstallLocal(this);
new ActionBuilder("Apply Signature and Datatypes", getName()) new ActionBuilder("Apply Signature and Datatypes", getOwner())
.popupMenuPath("Apply Signature and Data Types") .popupMenuPath("Apply Signature and Data Types")
.popupMenuGroup(APPLY_GROUP, "3") .popupMenuGroup(APPLY_GROUP, "3")
.helpLocation( .helpLocation(
@ -201,7 +209,7 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
.onAction(this::applySignatureWithDatatypes) .onAction(this::applySignatureWithDatatypes)
.buildAndInstallLocal(this); .buildAndInstallLocal(this);
showExecutableTableAction = new ToggleActionBuilder("Show Executables Table", getName()) showExecutableTableAction = new ToggleActionBuilder("Show Executables Table", getOwner())
.toolBarIcon(SPLIT_VIEW_ICON) .toolBarIcon(SPLIT_VIEW_ICON)
.description("Toggles showing Executables table") .description("Toggles showing Executables table")
.helpLocation( .helpLocation(
@ -212,7 +220,8 @@ public class BSimSearchResultsProvider extends ComponentProviderAdapter {
addLocalAction(new SelectionNavigationAction(plugin, matchesTable.getTable())); 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")) .helpLocation(new HelpLocation(BSimSearchPlugin.HELP_TOPIC, "Clear_Error_Status"))
.withContext(BSimMatchesTableActionContext.class) .withContext(BSimMatchesTableActionContext.class)
.enabledWhen(this::canClearErrors) .enabledWhen(this::canClearErrors)

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -58,7 +58,7 @@ public class ListingMergePanelProvider extends ComponentProviderAdapter
public List<DockingActionIf> getPopupActions(Tool dt, ActionContext context) { public List<DockingActionIf> getPopupActions(Tool dt, ActionContext context) {
ListingPanel resultPanel = mergePanel.getResultPanel(); ListingPanel resultPanel = mergePanel.getResultPanel();
if (resultPanel != null) { if (resultPanel != null) {
return resultPanel.getHeaderActions(getName()); return resultPanel.getHeaderActions(getOwner());
} }
return null; return null;
} }

View file

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

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -63,7 +63,7 @@ public class InterpreterComponentProvider extends ComponentProviderAdapter
private void createActions() { private void createActions() {
DockingAction clearAction = new DockingAction("Clear Interpreter", getName()) { DockingAction clearAction = new DockingAction("Clear Interpreter", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
clear(); clear();

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -249,7 +249,7 @@ public class LocationReferencesProvider extends ComponentProviderAdapter
selectionAction = selectionAction =
new MakeProgramSelectionAction(locationReferencesPlugin, referencesPanel.getTable()); new MakeProgramSelectionAction(locationReferencesPlugin, referencesPanel.getTable());
highlightAction = new ToggleDockingAction("Highlight Matches", getName()) { highlightAction = new ToggleDockingAction("Highlight Matches", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
updateHighlights(); updateHighlights();

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -133,7 +133,7 @@ public class BundleStatusComponentProvider extends ComponentProviderAdapter {
private void addBundlesAction(String actionName, String description, Icon icon, private void addBundlesAction(String actionName, String description, Icon icon,
Runnable runnable) { Runnable runnable) {
new ActionBuilder(actionName, this.getName()).popupMenuPath(description) new ActionBuilder(actionName, getOwner()).popupMenuPath(description)
.popupMenuIcon(icon) .popupMenuIcon(icon)
.popupMenuGroup(BUNDLE_GROUP) .popupMenuGroup(BUNDLE_GROUP)
.description(description) .description(description)
@ -145,7 +145,8 @@ public class BundleStatusComponentProvider extends ComponentProviderAdapter {
private void createActions() { private void createActions() {
Icon icon = Icons.REFRESH_ICON; Icon icon = Icons.REFRESH_ICON;
new ActionBuilder("RefreshBundles", this.getName()).popupMenuPath("Refresh all") new ActionBuilder("RefreshBundles", getOwner())
.popupMenuPath("Refresh all")
.popupMenuIcon(icon) .popupMenuIcon(icon)
.popupMenuGroup(BUNDLE_LIST_GROUP) .popupMenuGroup(BUNDLE_LIST_GROUP)
.toolBarIcon(icon) .toolBarIcon(icon)
@ -164,7 +165,8 @@ public class BundleStatusComponentProvider extends ComponentProviderAdapter {
this::doCleanBundleBuildCaches); this::doCleanBundleBuildCaches);
icon = Icons.ADD_ICON; icon = Icons.ADD_ICON;
new ActionBuilder("AddBundles", this.getName()).popupMenuPath("Add bundle(s)") new ActionBuilder("AddBundles", getOwner())
.popupMenuPath("Add bundle(s)")
.popupMenuIcon(icon) .popupMenuIcon(icon)
.popupMenuGroup(BUNDLE_LIST_GROUP) .popupMenuGroup(BUNDLE_LIST_GROUP)
.toolBarIcon(icon) .toolBarIcon(icon)
@ -174,7 +176,7 @@ public class BundleStatusComponentProvider extends ComponentProviderAdapter {
.buildAndInstallLocal(this); .buildAndInstallLocal(this);
icon = Icons.DELETE_ICON; icon = Icons.DELETE_ICON;
new ActionBuilder("RemoveBundles", this.getName()) new ActionBuilder("RemoveBundles", getOwner())
.popupMenuPath("Remove selected bundle(s)") .popupMenuPath("Remove selected bundle(s)")
.popupMenuIcon(icon) .popupMenuIcon(icon)
.popupMenuGroup(BUNDLE_LIST_GROUP) .popupMenuGroup(BUNDLE_LIST_GROUP)

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -100,7 +100,7 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
void createActions() { void createActions() {
HelpLocation helpLocation = new HelpLocation("RegisterPlugin", "tool_buttons"); HelpLocation helpLocation = new HelpLocation("RegisterPlugin", "tool_buttons");
deleteRegisterValuesAction = new DockingAction("Delete Register Value Ranges", getName()) { deleteRegisterValuesAction = new DockingAction("Delete Register Value Ranges", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
values.deleteSelectedRanges(); values.deleteSelectedRanges();
@ -114,7 +114,7 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
deleteRegisterValuesAction.setHelpLocation(helpLocation); deleteRegisterValuesAction.setHelpLocation(helpLocation);
tool.addLocalAction(this, deleteRegisterValuesAction); tool.addLocalAction(this, deleteRegisterValuesAction);
selectRegisterValuesAction = new DockingAction("Select Register Value Ranges", getName()) { selectRegisterValuesAction = new DockingAction("Select Register Value Ranges", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
values.selectedRanges(); values.selectedRanges();
@ -129,7 +129,7 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
tool.addLocalAction(this, selectRegisterValuesAction); tool.addLocalAction(this, selectRegisterValuesAction);
showDefaultRegisterValuesAction = showDefaultRegisterValuesAction =
new ToggleDockingAction("Show default register values", getName()) { new ToggleDockingAction("Show default register values", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
values.setShowDefaultValues(showDefaultRegisterValuesAction.isSelected()); values.setShowDefaultValues(showDefaultRegisterValuesAction.isSelected());
@ -144,7 +144,7 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
.setHelpLocation(new HelpLocation("RegisterPlugin", "menu_actions")); .setHelpLocation(new HelpLocation("RegisterPlugin", "menu_actions"));
tool.addLocalAction(this, showDefaultRegisterValuesAction); tool.addLocalAction(this, showDefaultRegisterValuesAction);
filterRegistersAction = new ToggleDockingAction("Filter Registers", getName()) { filterRegistersAction = new ToggleDockingAction("Filter Registers", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
tree.setFiltered(filterRegistersAction.isSelected()); tree.setFiltered(filterRegistersAction.isSelected());
@ -157,12 +157,13 @@ public class RegisterManagerProvider extends ComponentProviderAdapter {
filterRegistersAction.setHelpLocation(helpLocation); filterRegistersAction.setHelpLocation(helpLocation);
tool.addLocalAction(this, filterRegistersAction); tool.addLocalAction(this, filterRegistersAction);
followLocationToggleAction = new ToggleDockingAction("Follow location changes", getName()) { followLocationToggleAction =
@Override new ToggleDockingAction("Follow location changes", getOwner()) {
public void actionPerformed(ActionContext context) { @Override
followLocation = followLocationToggleAction.isSelected(); public void actionPerformed(ActionContext context) {
} followLocation = followLocationToggleAction.isSelected();
}; }
};
followLocationToggleAction.setEnabled(true); followLocationToggleAction.setEnabled(true);
followLocationToggleAction.setHelpLocation(helpLocation); followLocationToggleAction.setHelpLocation(helpLocation);
followLocationToggleAction.setToolBarData(new ToolBarData(RECV_LOCATION_ICON, "NavAction")); followLocationToggleAction.setToolBarData(new ToolBarData(RECV_LOCATION_ICON, "NavAction"));

View file

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

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -38,8 +38,8 @@ public class DomainEventComponentProvider extends ComponentProviderAdapter {
private DockingAction clearAction; private DockingAction clearAction;
private List<String> eventList; private List<String> eventList;
public DomainEventComponentProvider(PluginTool tool, String name) { public DomainEventComponentProvider(PluginTool tool, String owner) {
super(tool, name, name); super(tool, "Domain Events", owner);
eventList = new ArrayList<>(); eventList = new ArrayList<>();
textArea = new JTextArea(10, 80); textArea = new JTextArea(10, 80);
@ -64,7 +64,7 @@ public class DomainEventComponentProvider extends ComponentProviderAdapter {
} }
private void createAction() { private void createAction() {
clearAction = new DockingAction("Clear Display", getName()) { clearAction = new DockingAction("Clear Display", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
clear(); clear();

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -36,8 +36,8 @@ public class DomainFolderChangesDisplayComponentProvider extends ComponentProvid
private Point bottom = new Point(0, 10000); private Point bottom = new Point(0, 10000);
private DockingAction clearAction; private DockingAction clearAction;
public DomainFolderChangesDisplayComponentProvider(PluginTool tool, String name) { public DomainFolderChangesDisplayComponentProvider(PluginTool tool, String owner) {
super(tool, name, name); super(tool, "Domain Folder Changes", owner);
textArea = new JTextArea(10, 80); textArea = new JTextArea(10, 80);
textArea.setEditable(true); textArea.setEditable(true);
scrollPane = new JScrollPane(textArea); scrollPane = new JScrollPane(textArea);
@ -63,7 +63,7 @@ public class DomainFolderChangesDisplayComponentProvider extends ComponentProvid
} }
private void createAction() { private void createAction() {
clearAction = new DockingAction("Clear Display", getName()) { clearAction = new DockingAction("Clear Display", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
clear(); clear();

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -36,8 +36,8 @@ public class EventDisplayComponentProvider extends ComponentProviderAdapter {
private Point bottom = new Point(0, 10000); private Point bottom = new Point(0, 10000);
private DockingAction clearAction; private DockingAction clearAction;
public EventDisplayComponentProvider(PluginTool tool, String name) { public EventDisplayComponentProvider(PluginTool tool, String owner) {
super(tool, name, name); super(tool, "Plugin Event Display", owner);
textArea = new JTextArea(10, 80); textArea = new JTextArea(10, 80);
textArea.setEditable(true); textArea.setEditable(true);
scrollPane = new JScrollPane(textArea); scrollPane = new JScrollPane(textArea);
@ -73,7 +73,7 @@ public class EventDisplayComponentProvider extends ComponentProviderAdapter {
} }
private void createAction() { private void createAction() {
clearAction = new DockingAction("Clear Display", getName()) { clearAction = new DockingAction("Clear Display", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
clear(); clear();

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -60,7 +60,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
public TextEditorComponentProvider(FileSystemBrowserPlugin plugin, String textFileName, public TextEditorComponentProvider(FileSystemBrowserPlugin plugin, String textFileName,
String text) { String text) {
super(plugin.getTool(), TITLE, "TextEditorComponentProvider"); super(plugin.getTool(), TITLE, plugin.getName());
this.textFileName = textFileName; this.textFileName = textFileName;
initialize(text); initialize(text);
} }
@ -134,7 +134,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
} }
private void createActions() { private void createActions() {
undoAction = new DockingAction("Undo", getName()) { undoAction = new DockingAction("Undo", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
undo(); undo();
@ -150,7 +150,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
undoAction.setKeyBindingData(new KeyBindingData("ctrl z")); undoAction.setKeyBindingData(new KeyBindingData("ctrl z"));
addLocalAction(undoAction); addLocalAction(undoAction);
redoAction = new DockingAction("Redo", getName()) { redoAction = new DockingAction("Redo", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
redo(); redo();
@ -166,7 +166,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
redoAction.setKeyBindingData(new KeyBindingData("ctrl shift z")); redoAction.setKeyBindingData(new KeyBindingData("ctrl shift z"));
addLocalAction(redoAction); addLocalAction(redoAction);
saveAction = new DockingAction("Save File", getName()) { saveAction = new DockingAction("Save File", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
save(); save();
@ -182,7 +182,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
saveAction.setKeyBindingData(new KeyBindingData("ctrl-s")); saveAction.setKeyBindingData(new KeyBindingData("ctrl-s"));
addLocalAction(saveAction); addLocalAction(saveAction);
saveAsAction = new DockingAction("Save File As", getName()) { saveAsAction = new DockingAction("Save File As", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
saveAs(); saveAs();
@ -192,7 +192,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
saveAsAction.setToolBarData(new ToolBarData(Icons.SAVE_AS_ICON, "Save")); saveAsAction.setToolBarData(new ToolBarData(Icons.SAVE_AS_ICON, "Save"));
addLocalAction(saveAsAction); addLocalAction(saveAsAction);
fontAction = new DockingAction("Select Font", getName()) { fontAction = new DockingAction("Select Font", getOwner()) {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
doSelectFont(); doSelectFont();

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -298,7 +298,7 @@ public class HeaderActionsTest extends AbstractGhidraHeadedIntegrationTest {
private DockingAction getHeaderAction(String name) { private DockingAction getHeaderAction(String name) {
ListingPanel listingPanel = cb.getListingPanel(); ListingPanel listingPanel = cb.getListingPanel();
List<DockingActionIf> actions = listingPanel.getHeaderActions(provider.getName()); List<DockingActionIf> actions = listingPanel.getHeaderActions(provider.getOwner());
for (DockingActionIf action : actions) { for (DockingActionIf action : actions) {
if (action.getName().equals(name)) { if (action.getName().equals(name)) {
return (DockingAction) action; return (DockingAction) action;

View file

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

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -222,7 +222,7 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
functionComparisonPanel.getDualListingPanel(); functionComparisonPanel.getDualListingPanel();
if (dualListingPanel != null) { if (dualListingPanel != null) {
ListingPanel leftPanel = dualListingPanel.getListingPanel(LEFT); ListingPanel leftPanel = dualListingPanel.getListingPanel(LEFT);
return leftPanel.getHeaderActions(getName()); return leftPanel.getHeaderActions(getOwner());
} }
} }
return new ArrayList<>(); return new ArrayList<>();
@ -368,7 +368,7 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
statusPanel.add(statusLabel, BorderLayout.CENTER); statusPanel.add(statusLabel, BorderLayout.CENTER);
dualTablePanel.add(statusPanel, BorderLayout.SOUTH); dualTablePanel.add(statusPanel, BorderLayout.SOUTH);
functionComparisonPanel = new FunctionComparisonPanel(tool, getName()); functionComparisonPanel = new FunctionComparisonPanel(tool, getOwner());
addSpecificCodeComparisonActions(); addSpecificCodeComparisonActions();
functionComparisonPanel.setCurrentTabbedComponent(ListingCodeComparisonPanel.NAME); functionComparisonPanel.setCurrentTabbedComponent(ListingCodeComparisonPanel.NAME);
functionComparisonPanel.setTitlePrefixes("Source:", "Destination:"); functionComparisonPanel.setTitlePrefixes("Source:", "Destination:");

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 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(tablePanel, BorderLayout.CENTER);
markupItemsTablePanel.add(filterAreaPanel, BorderLayout.SOUTH); markupItemsTablePanel.add(filterAreaPanel, BorderLayout.SOUTH);
functionComparisonPanel = new FunctionComparisonPanel(tool, getName()); functionComparisonPanel = new FunctionComparisonPanel(tool, getOwner());
addSpecificCodeComparisonActions(); addSpecificCodeComparisonActions();
functionComparisonPanel.setCurrentTabbedComponent(ListingCodeComparisonPanel.NAME); functionComparisonPanel.setCurrentTabbedComponent(ListingCodeComparisonPanel.NAME);
functionComparisonPanel.setTitlePrefixes("Source:", "Destination:"); functionComparisonPanel.setTitlePrefixes("Source:", "Destination:");
@ -161,8 +161,9 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
dualListingPanel.getListingPanel(LEFT) dualListingPanel.getListingPanel(LEFT)
.setProgramLocationListener(new SourceProgramLocationListener()); .setProgramLocationListener(new SourceProgramLocationListener());
dualListingPanel.getListingPanel(RIGHT).setProgramLocationListener( dualListingPanel.getListingPanel(RIGHT)
new DestinationProgramLocationListener()); .setProgramLocationListener(
new DestinationProgramLocationListener());
sourceHighlightProvider = new VTDualListingHighlightProvider(controller, true); sourceHighlightProvider = new VTDualListingHighlightProvider(controller, true);
destinationHighlightProvider = new VTDualListingHighlightProvider(controller, false); destinationHighlightProvider = new VTDualListingHighlightProvider(controller, false);
@ -466,7 +467,7 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
ListingCodeComparisonPanel dualListingPanel = functionComparisonPanel.getDualListingPanel(); ListingCodeComparisonPanel dualListingPanel = functionComparisonPanel.getDualListingPanel();
if (context.getComponentProvider() == this && dualListingPanel != null) { if (context.getComponentProvider() == this && dualListingPanel != null) {
ListingPanel sourcePanel = dualListingPanel.getListingPanel(LEFT); ListingPanel sourcePanel = dualListingPanel.getListingPanel(LEFT);
return sourcePanel.getHeaderActions(getName()); return sourcePanel.getHeaderActions(getOwner());
} }
return new ArrayList<>(); return new ArrayList<>();
} }

View file

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

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 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.markuptable.DisplayableListingAddress;
import ghidra.feature.vt.gui.provider.matchtable.MatchTableRenderer; import ghidra.feature.vt.gui.provider.matchtable.MatchTableRenderer;
import ghidra.feature.vt.gui.util.AbstractVTMatchTableModel.StatusTableColumn; 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.MatchInfo;
import ghidra.feature.vt.gui.util.MatchStatusRenderer; import ghidra.feature.vt.gui.util.MatchStatusRenderer;
import ghidra.features.base.codecompare.model.MatchedFunctionComparisonModel;
import ghidra.framework.model.*; import ghidra.framework.model.*;
import ghidra.framework.options.Options; import ghidra.framework.options.Options;
import ghidra.framework.plugintool.ComponentProviderAdapter; import ghidra.framework.plugintool.ComponentProviderAdapter;
@ -136,7 +136,7 @@ public abstract class VTMatchOneToManyTableProvider extends ComponentProviderAda
addLocalAction(new SetVTMatchFromOneToManyAction(controller, true)); addLocalAction(new SetVTMatchFromOneToManyAction(controller, true));
addLocalAction(new ClearMatchAction(controller)); addLocalAction(new ClearMatchAction(controller));
addLocalAction(new AcceptMatchAction(controller)); addLocalAction(new AcceptMatchAction(controller));
new ActionBuilder("Compare Functions", getName()) new ActionBuilder("Compare Functions", getOwner())
.popupMenuPath("Compare Functions") .popupMenuPath("Compare Functions")
.popupMenuIcon(COMPARISON_ICON) .popupMenuIcon(COMPARISON_ICON)
.popupMenuGroup("AAA_VT_Main") .popupMenuGroup("AAA_VT_Main")

View file

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