@Override
			public void actionPerformed(ActionContext context) {
				Object contextObject = context.getContextObject();
				if (!(contextObject instanceof ToolButton)) {
					return;
				}

				ToolButton toolButton = (ToolButton) contextObject;
				ToolTemplate toolTemplate = toolButton.getToolTemplate();
				if (isToolRunning(toolTemplate)) {
					Msg.showWarn(this, toolButton, "Unable to Rename", "You must first close " +
						"any running instances of a tool before you can rename");
					return;
				}

				String oldName = toolTemplate.getName();
				String newName = getNewToolName(oldName);
				if (newName == null) {
					return;
				}

				ToolChest localToolChest = activeProject.getLocalToolChest();
				localToolChest.remove(oldName);
				toolTemplate.setName(newName);
				localToolChest.addToolTemplate(toolTemplate);
			}
builds the gui for the new front end
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/FrontEndPlugin.java