@Override
	public boolean isEnabledForContext(ActionContext context) {
		if (context == null) {
			return false;
		}
		return getAddress(context) != null && getProgram(context) == plugin.getCurrentProgram();
	}
Method called when the action is invoked.

@param ActionEvent details regarding the invocation of this action
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/bookmark/AddBookmarkAction.java