protected Map<String, GModule> findGhidraModules() throws IOException {

		// Find standard module root directories from within the application root directories
		Collection<ResourceFile> moduleRootDirectories =
			ModuleUtilities.findModuleRootDirectories(applicationRootDirs, new LinkedHashSet<>());

		// Find installed extension modules
		for (ResourceFile extensionInstallDir : extensionInstallationDirs) {

			FileUtilities.forEachFile(extensionInstallDir, extensionDir -> {
				// Skip extensions in an application root directory... already found those.
				if (FileUtilities.isPathContainedWithin(applicationRootDirs, extensionDir)) {
					return;
				}

				// Skip extensions slated for cleanup
				if (ModuleUtilities.isUninstalled(extensionDir)) {
					return;
				}

				moduleRootDirectories.add(extensionDir);
			});
		}

		// Add external modules defined via a system property. This will typically be used by
		// user's developing 3rd party modules from something like Eclipse.
		String externalModules = System.getProperty("ghidra.external.modules", "");
		if (!externalModules.isBlank()) {
			for (String path : externalModules.split(File.pathSeparator)) {
				ResourceFile eclipseProjectDir = new ResourceFile(path);
				if (ModuleUtilities.isModuleDirectory(eclipseProjectDir)) {
					moduleRootDirectories.add(eclipseProjectDir);
				}
			}
		}

		return ModuleUtilities.findModules(applicationRootDirs, moduleRootDirectories);
	}
Finds the modules for this Ghidra application layout.

@return The modules for this Ghidra application layout.
@throws IOException if there was a problem finding the modules on disk.
Ghidra/Framework/Utility/src/main/java/ghidra/GhidraApplicationLayout.java