@Override
	public void mouseClicked(MouseEvent e) {
		if (!isHandlingMouseEvents) {
			return;
		}

		E edge = selectedEdge; // save off before we reset
		e.consume();
		resetState();

		// on double-clicks we go to the vertex in the current edge direction unless that vertex
		// is already selected, then we go to the other vertex
		VisualizationViewer<V, E> viewer = getViewer(e);
		MutableSelectedState<V> selectedState = viewer.getSelectedVertexState();

		Graph<V, E> graph = viewer.getVisualizationModel().getGraph();
		V end = graph.getEdgeTarget(edge);
		if (!selectedState.isSelected(end)) {
			pickAndShowVertex(end, selectedState, viewer);
			return;
		}

		// the destination was picked, go the other direction
		V source = graph.getEdgeSource(edge);
		pickAndShowVertex(source, selectedState, viewer);
	}
Mouse plugin to allow for edge navigation

@param <V> the vertex type
@param <E> the edge type
Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/mouse/JgtEdgeNavigationPlugin.java