@Override
	public boolean isEnabledForContext(ActionContext context) {

		if (hasIncompleteFieldEntry()) {
			return false;
		}
		if (model.getSelectedComponentRows().length != 1) {
			return false;
		}

		Composite composite = model.getOriginalComposite();
		if (composite == null) {
			return false; // not sure if this can happen
		}

		FieldMatcher fieldMatcher = getFieldMatcher();
		if (fieldMatcher == null) {
			return false;
		}

		updateMenuName(fieldMatcher.getFieldName());
		return true;
	}
An action to show references to the field in the currently selected editor row.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/FindReferencesToStructureFieldAction.java