private void initDialogForAdd(Program p, Address address) {
		if (!address.isMemoryAddress()) {
			throw new IllegalArgumentException(
				"AddEditDialog.addLabel only valid for memory address");
		}

		this.addr = address;
		this.program = p;
		SymbolTable symbolTable = p.getSymbolTable();
		symbol = null;
		setTitle("Add Label at " + address);
		initRecentChoices();
		entryPointCheckBox.setEnabled(true);
		entryPointCheckBox.setSelected(symbolTable.isExternalEntryPoint(address));
		pinnedCheckBox.setEnabled(true);
		pinnedCheckBox.setSelected(false);

		Symbol primarySymbol = symbolTable.getPrimarySymbol(address);
		if (primarySymbol == null) {
			primaryCheckBox.setSelected(true);
			primaryCheckBox.setEnabled(false);
		}
		else {
			primaryCheckBox.setSelected(false);
			primaryCheckBox.setEnabled(true);
		}

		namespaceChoices.setEnabled(true);
		initNamespaces();
		clearStatusText();

	}
Assumptions:
<ul>
 <li>New label in functions should default to local namespace.
 <li>Editing a default label in a function should default to the local namespace.
 <li>Function symbols user their parent namespace.
</ul>
Ghidra/Features/Base/src/main/java/ghidra/app/util/AddEditDialog.java