@Override
	public void actionPerformed(ListingActionContext context) {
		if (isEnabled()) {
			Variable var = getVariable(context);
			if (var != null) {
				Symbol s = var.getSymbol();
				if (s == null) {
					Msg.showError(this, null, "Edit Failed", "Variable may not be modified");
					return;
				}
				AddEditDialog dialog =
					new AddEditDialog("Edit Variable Name", functionPlugin.getTool());
				dialog.editLabel(s, context.getProgram());
			}
		}
	}
Creates a new action with the given name and associated to the given
plugin.
@param plugin the plugin this action is associated with.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/EditOperandNameAction.java