@Override
	protected boolean isEnabledForContext(ListingActionContext context) {
		if (context.getAddress().isExternalAddress()) {
			return false;
		}
		int[] componentPath = context.getLocation().getComponentPath();
		if (componentPath != null && componentPath.length != 0) {
			return false;
		}
		return !plugin.isOnVariableReference(context) && !plugin.isOnSymbol(context) &&
			!plugin.isOnFunction(context);
	}
Creates a new instance of the action.

@param plugin Label Manager Plugin instance
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/AddLabelAction.java