private boolean showDialog(boolean oldNameIsCancel) {
		InputDialogListener listener = new InputDialogListener() {
			@Override
			public boolean inputIsValid(InputDialog dialog) {
				String name = dialog.getValue();
				if (StringUtils.isBlank(name)) {
					dialog.setStatusText("Cannot have empty name");
					return false;
				}

				name = name.trim();
				if (name.equals(oldName)) {		// No change to name
					newName = name;
					return true;				// but valid (ends up being equivalent to cancel
				}
				boolean res = isValid(name);
				if (!res) {
					dialog.setStatusText(errorMsg);
				}
				return res;
			}
		};

		String label = "Rename " + oldName + ":";
		InputDialog renameVarDialog = new InputDialog(getTransactionName(),
			new String[] { label }, new String[] { oldName }, listener);

		tool.showDialog(renameVarDialog);

		if (renameVarDialog.isCanceled()) {
			return false;
		}
		if (oldNameIsCancel && newName.equals(oldName)) {
			return false;
		}
		return true;

	}
Bring up a dialog that is initialized with the old name, and allows the user to select a new name
@param oldNameIsCancel is true if the user keeping/entering the old name is considered a cancel
@return true unless the user canceled
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/RenameTask.java