private void buildGraph() {
		graph = new SampleGraph();

		Map<Class<?>, SampleVertex> pluginToVertices = new HashMap<>();

		List<Plugin> plugins = tool.getManagedPlugins();
		for (Plugin p : plugins) {
			SampleVertex vertex = new SampleVertex(p.getName());
			graph.addVertex(vertex);
			pluginToVertices.put(p.getClass(), vertex);
		}

		for (Plugin p : plugins) {
			SampleVertex from = pluginToVertices.get(p.getClass());

			StringBuilder names = new StringBuilder();
			List<Class<?>> dependencies = p.getPluginDescription().getServicesRequired();
			for (Class<?> serviceClass : dependencies) {
				SampleVertex to = locateService(pluginToVertices, serviceClass);
				if (to != null) {
					names.append(serviceClass.getSimpleName()).append('\n');
					graph.addEdge(new SampleEdge(from, to));
				}
			}

			from.getTextArea().setText(names.toString());
		}

		try {
			VisualGraphLayout<SampleVertex, SampleEdge> layout =
				layoutProvider.getLayout(graph, TaskMonitor.DUMMY);
			graph.setLayout(layout);
		}
		catch (CancelledException e) {
			// can't happen as long as we are using the dummy monitor
		}
	}
A {@link ComponentProvider} that is the UI component of the {@link SampleGraphPlugin}.  This
shows a graph of the plugins in the system.
Ghidra/Extensions/sample/src/main/java/ghidra/examples/graph/SampleGraphProvider.java