mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
canceled searching for tests
This commit is contained in:
@@ -19,6 +19,8 @@ import com.intellij.execution.testframework.TestSearchScope;
|
||||
import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.roots.CompilerModuleExtension;
|
||||
import com.intellij.openapi.roots.OrderEnumerator;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
@@ -72,6 +74,7 @@ public class TestClassCollector {
|
||||
Files.walkFileTree(baseDir, new SimpleFileVisitor<Path>() {
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
||||
ProgressManager.checkCanceled();
|
||||
FileVisitResult result = super.visitFile(file, attrs);
|
||||
File f = file.toFile();
|
||||
String fName = f.getName();
|
||||
@@ -102,6 +105,9 @@ public class TestClassCollector {
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user