@Override
	public void selectionChanged(Set<AttributedVertex> vertices) {
		AddressSet addressSet = getAddresses(vertices);
		if (addressSet != null) {
			ProgramSelection selection = new ProgramSelection(addressSet);
			ProgramSelectionPluginEvent event =
				new ProgramSelectionPluginEvent(name, selection, program);
			tool.firePluginEvent(event);
		}
	}
Base class for GraphDisplay listeners whose nodes represent addresses.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/graph/AddressBasedGraphDisplayListener.java