@Override
	public boolean applyTo(Program program) {
		SymbolTable st = program.getSymbolTable();
		if (namespace == null && useLocalNamespace) {
			namespace = st.getNamespace(addr);
		}
		try {
			symbol = st.createLabel(addr, name, namespace, source);
			return true;
		}
		catch (InvalidInputException e) {
			if ((name == null) || (name.length() == 0)) {
				errorMsg = "You must enter a valid label name";
			}
			else {
				errorMsg = "Invalid name: " + e.getMessage();
			}
		}

		return false;

	}
Constructs a new command for adding a label.
@param addr address where the label is to be added.
@param name name of the new label. A null name will cause a default label be added.
@param source the source of this symbol
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/label/AddLabelCmd.java