diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencesProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencesProvider.java index c3b8a6b241..80173db00d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencesProvider.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencesProvider.java @@ -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. @@ -157,6 +157,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter setWindowMenuGroup(TITLE_PREFIX); tool.addComponentProvider(this, false); + setupActions(); } private void setupActions() { @@ -179,7 +180,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter new MenuData(new String[] { "Add..." }, ADD_ICON, ADD_REFS_GROUP)); addRefAction.setToolBarData(new ToolBarData(ADD_ICON, "EditAction")); addRefAction.setEnabled(true); - tool.addLocalAction(this, addRefAction); + addLocalAction(addRefAction); deleteRefAction = new DockingAction("Delete References", plugin.getName()) { @Override @@ -199,7 +200,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter new MenuData(new String[] { "Delete..." }, DELETE_ICON, ADD_REFS_GROUP)); deleteRefAction.setToolBarData(new ToolBarData(DELETE_ICON, "EditAction")); deleteRefAction.setEnabled(false); - tool.addLocalAction(this, deleteRefAction); + addLocalAction(deleteRefAction); editRefAction = new DockingAction("Edit Reference", plugin.getName()) { @Override @@ -219,7 +220,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter new MenuData(new String[] { "Edit..." }, EDIT_ICON, ADD_REFS_GROUP)); editRefAction.setToolBarData(new ToolBarData(EDIT_ICON, "EditAction")); editRefAction.setEnabled(false); - tool.addLocalAction(this, editRefAction); + addLocalAction(editRefAction); selectAction = new DockingAction("Select Destinations", plugin.getName()) { @Override @@ -232,7 +233,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter selectAction.setDescription("Select reference destinations"); selectAction.setToolBarData(new ToolBarData(SELECT_ICON, "NavAction")); selectAction.setEnabled(true); - tool.addLocalAction(this, selectAction); + addLocalAction(selectAction); followLocationToggleAction = new ToggleDockingAction("Follow location changes", plugin.getName()) { @@ -243,7 +244,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter }; followLocationToggleAction.setEnabled(true); followLocationToggleAction.setToolBarData(new ToolBarData(RECV_LOCATION_ICON, "NavAction")); - tool.addLocalAction(this, followLocationToggleAction); + addLocalAction(followLocationToggleAction); gotoReferenceLocationToggleAction = new ToggleDockingAction("GoTo selected destination", plugin.getName()) { @@ -255,7 +256,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter gotoReferenceLocationToggleAction .setToolBarData(new ToolBarData(SEND_LOCATION_ICON, "NavAction")); gotoReferenceLocationToggleAction.setEnabled(true); - tool.addLocalAction(this, gotoReferenceLocationToggleAction); + addLocalAction(gotoReferenceLocationToggleAction); goHomeAction = new DockingAction("GoTo source location", plugin.getName()) { @Override @@ -269,7 +270,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter goHomeAction.setToolBarData(new ToolBarData(HOME_ICON, "NavAction")); goHomeAction.setDescription("GoTo reference source location"); goHomeAction.setEnabled(true); - tool.addLocalAction(this, goHomeAction); + addLocalAction(goHomeAction); enableGotoReferenceLocation(plugin.getDefaultGotoReferenceLocation()); enableFollowLocation(plugin.getDefaultFollowOnLocation()); @@ -376,7 +377,6 @@ public class EditReferencesProvider extends ComponentProviderAdapter if (!tool.isVisible(this)) { tool.showComponentProvider(this, true); - setupActions(); } else { init(referenceInfo); @@ -603,13 +603,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter instrPanel.setSelectedOpIndex(opIndex, -1); followSelectedReference(); } -// else { -// int opIndex = MNEONIC_OPINDEX; -// if (selRows.length != 0) { -// opIndex = tableModel.getReference(selRows[0]).getOperandIndex(); -// } -// instrPanel.setSelectedOpIndex(opIndex); -// } + selectionBusy = false; updateLocation(); adjustActionState(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/Writeable.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/Writeable.java index 51cbe16fc6..ec2365e41c 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/Writeable.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/Writeable.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * 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. diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/PeUtils.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/PeUtils.java index fe8e6b5853..18a1ed0f5a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/PeUtils.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/PeUtils.java @@ -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.