private LocationReferencesProvider findProvider(LocationDescriptor newLocationDescriptor,
			Navigatable navigatable) {
		// start backward to get the most recently added provider first
		for (int i = providerList.size() - 1; i >= 0; i--) {
			LocationReferencesProvider provider = providerList.get(i);
			LocationDescriptor descriptor = provider.getLocationDescriptor();
			if (descriptor.equals(newLocationDescriptor)) {
				Navigatable providerNavigatable = provider.getNavigatable();
				if (providerNavigatable.equals(navigatable)) {
					return provider;
				}
			}
		}
		return null;
	}
Plugin to show a list of references to the item represented by the location of the cursor.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesPlugin.java