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