private static void addRootsFromModule(Module module, Collection<String> pythonPathList) { // for Jython final CompilerModuleExtension extension = CompilerModuleExtension.getInstance(module); if (extension != null) { final VirtualFile path = extension.getCompilerOutputPath(); if (path != null) { pythonPathList.add(path.getPath()); } final VirtualFile pathForTests = extension.getCompilerOutputPathForTests(); if (pathForTests != null) { pythonPathList.add(pathForTests.getPath()); } } // additional paths from facets (f.e. buildout) final Facet[] facets = FacetManager.getInstance(module).getAllFacets(); for (Facet facet : facets) { if (facet instanceof PythonPathContributingFacet) { List<String> more_paths = ((PythonPathContributingFacet) facet).getAdditionalPythonPath(); if (more_paths != null) pythonPathList.addAll(more_paths); } } }
private static void removeModuleOutput(Module module, List<VirtualFile> from) { final CompilerModuleExtension extension = ModuleRootManager.getInstance(module).getModuleExtension(CompilerModuleExtension.class); from.remove(extension.getCompilerOutputPath()); from.remove(extension.getCompilerOutputPathForTests()); }