private void checkForRemoveLabel() {

		if (!isEditing()) {
			return; // adding a label; cannot delete existing label
		}

		if (isDefaultLabel()) {
			return; // label is already default; cannot be removed
		}

		if (isExternalLabel()) {
			return; // cannot remove external labels
		}

		int choice = OptionDialog.showYesNoDialog(getParent(), "Remove Label?",
			"You have removed the label text--would you like to remove the existing label?");
		if (choice == OptionDialog.YES_OPTION) {

			Command<Program> cmd =
				new DeleteLabelCmd(addr, symbol.getName(), symbol.getParentNamespace());
			if (!tool.execute(cmd, program)) {
				setStatusText(cmd.getStatusMsg());
			}
			else {
				close();
			}
		}
	}
Invokes the dialog to edit an existing label in the given program
@param targetSymbol the symbol(label) to edit
@param targetProgram the program containing the symbol
@param provider the ComponentProvider to parent and center the dialog over.
Ghidra/Features/Base/src/main/java/ghidra/app/util/AddEditDialog.java