mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-07-30 07:18:37 -09:00
Merge remote-tracking branch
'origin/GP-7030-dragonmacher-edit-references-npe'
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user