use of com.intellij.rt.coverage.util.classFinder.ClassPathEntry in project intellij-community by JetBrains.
the class IdeaClassFinder method getClassPathEntries.
@Override
protected Collection getClassPathEntries() {
final Collection entries = super.getClassPathEntries();
final Module[] modules = ModuleManager.getInstance(myProject).getModules();
for (Module module : modules) {
final CompilerModuleExtension extension = CompilerModuleExtension.getInstance(module);
if (extension != null) {
final VirtualFile outputFile = extension.getCompilerOutputPath();
try {
if (outputFile != null) {
final URL outputURL = VfsUtilCore.virtualToIoFile(outputFile).toURI().toURL();
entries.add(new ClassPathEntry(outputFile.getPath(), UrlClassLoader.build().urls(outputURL).get()));
}
if (myCurrentSuite.isTrackTestFolders()) {
final VirtualFile testOutput = extension.getCompilerOutputPathForTests();
if (testOutput != null) {
final URL testOutputURL = VfsUtilCore.virtualToIoFile(testOutput).toURI().toURL();
entries.add(new ClassPathEntry(testOutput.getPath(), UrlClassLoader.build().urls(testOutputURL).get()));
}
}
} catch (MalformedURLException e1) {
LOG.error(e1);
}
}
}
return entries;
}
Aggregations