mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-24 03:09:36 +08:00
GT-3485 - fixed a few miscellaneous problems relating to recent action
context changes
This commit is contained in:
-6
@@ -110,15 +110,9 @@ public abstract class AbstractNextPreviousAction extends CodeViewerContextAction
|
||||
|
||||
void setDirection(boolean isForward) {
|
||||
this.isForward = isForward;
|
||||
getMenuBarData().setMenuItemName(getMenuName());
|
||||
setDescription(getDescription());
|
||||
}
|
||||
|
||||
private String getMenuName() {
|
||||
String prefix = isForward ? "Next " : "Previous ";
|
||||
return prefix + getNavigationTypeName();
|
||||
}
|
||||
|
||||
private String getDescriptionString() {
|
||||
String prefix = isForward ? "Go To Next " : "Go To Previous ";
|
||||
return prefix + getNavigationTypeName();
|
||||
|
||||
-1
@@ -141,7 +141,6 @@ public class NextPrevCodeUnitPlugin extends Plugin {
|
||||
@Override
|
||||
public void actionPerformed(NavigatableActionContext context) {
|
||||
isForward = !isForward;
|
||||
getMenuBarData().setIcon(isForward ? forwardIcon : backwardIcon);
|
||||
getToolBarData().setIcon(isForward ? forwardIcon : backwardIcon);
|
||||
updateActions(isForward);
|
||||
}
|
||||
|
||||
-6
@@ -227,15 +227,9 @@ public class NextPreviousBookmarkAction extends MultiStateDockingAction<String>
|
||||
|
||||
public void setDirection(boolean isForward) {
|
||||
this.isForward = isForward;
|
||||
getMenuBarData().setMenuItemName(getMenuName());
|
||||
setDescription(getDescription());
|
||||
}
|
||||
|
||||
private String getMenuName() {
|
||||
String prefix = isForward ? "Next " : "Previous ";
|
||||
return prefix + getNavigationTypeName();
|
||||
}
|
||||
|
||||
private String getNavigationTypeName() {
|
||||
return "Bookmark";
|
||||
}
|
||||
|
||||
+5
-2
@@ -98,8 +98,11 @@ public abstract class AbstractDecompilerAction extends DockingAction {
|
||||
HighSymbol highSymbol = null;
|
||||
if (variable == null) {
|
||||
// Token may be from a variable reference, in which case we have to dig to find the actual symbol
|
||||
Address storageAddress =
|
||||
getStorageAddress(token, highFunction.getFunction().getProgram());
|
||||
Function function = highFunction.getFunction();
|
||||
if (function == null) {
|
||||
return null;
|
||||
}
|
||||
Address storageAddress = getStorageAddress(token, function.getProgram());
|
||||
if (storageAddress == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user