private void addActions(GraphDisplay display,
			java.util.function.Function<AttributedVertex, Address> addressFunction) {

		display.addAction(
			new ActionBuilder("Rename Symbol", "Block Graph").popupMenuPath("Rename Symbol")
					.withContext(VertexGraphActionContext.class)
					.helpLocation(new HelpLocation("ProgramGraphPlugin", "Rename_Symbol"))
					// only enable action when vertex corresponds to an address
					.enabledWhen(c -> addressFunction.apply(c.getClickedVertex()) != null)
					.onAction(c -> updateVertexName(addressFunction, c))
					.build());
	}
<CODE>GraphTask</CODE> is a threaded task creating either a block or call graph.
Ghidra/Features/ProgramGraph/src/main/java/ghidra/graph/program/BlockGraphTask.java