mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GT-3485 - fixed a few miscellaneous problems relating to recent action
context changes
This commit is contained in:
parent
42db5154f9
commit
b66577c4dc
4 changed files with 5 additions and 15 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue