ignore broken tools each time to be able to createTools concurrently

This commit is contained in:
Anna Kozlova
2015-02-12 18:52:03 +01:00
parent 08e3f74fd1
commit 8f46e89025
@@ -152,18 +152,13 @@ public class InspectionToolRegistrar {
ensureInitialized();
final List<InspectionToolWrapper> tools = ContainerUtil.newArrayListWithCapacity(myInspectionToolFactories.size());
final Set<Factory<InspectionToolWrapper>> broken = ContainerUtil.newHashSet();
for (final Factory<InspectionToolWrapper> factory : myInspectionToolFactories) {
ProgressManager.checkCanceled();
final InspectionToolWrapper toolWrapper = factory.create();
if (toolWrapper != null && checkTool(toolWrapper) == null) {
tools.add(toolWrapper);
}
else {
broken.add(factory);
}
}
myInspectionToolFactories.removeAll(broken);
return tools;
}