@Override
    public boolean isEnabledForContext(ActionContext context) {
    	Object contextObject = context.getContextObject();
		if (contextObject instanceof FieldHeaderLocation) {
			loc = (FieldHeaderLocation)contextObject;
			if (loc.getRow() < loc.getModel().getNumRows()) {
				return true;
			}
		}
		return false;
	}
Action class that inserts a new row into a FieldModel.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/format/actions/InsertRowAction.java