mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-09 14:08:03 -05:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -286,8 +286,7 @@ public abstract class AbstractPatchAction extends DockingAction {
|
||||
*/
|
||||
protected abstract boolean isApplicableToUnit(CodeUnit unit);
|
||||
|
||||
@Override
|
||||
public boolean isAddToPopup(ActionContext context) {
|
||||
protected boolean isApplicableToContext(ActionContext context) {
|
||||
CodeUnit cu = getCodeUnit(context);
|
||||
if (cu == null || !isApplicableToUnit(cu)) {
|
||||
return false;
|
||||
@@ -320,6 +319,16 @@ public abstract class AbstractPatchAction extends DockingAction {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabledForContext(ActionContext context) {
|
||||
return super.isEnabledForContext(context) && isApplicableToContext(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAddToPopup(ActionContext context) {
|
||||
return super.isAddToPopup(context) && isApplicableToContext(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform preparation and save any information needed later in {@link #accept()}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user