use of com.intellij.codeInspection.InspectionToolProvider in project intellij-community by JetBrains.
the class DaemonAnalyzerTestCase method createLocalInspectionTools.
protected static LocalInspectionTool[] createLocalInspectionTools(final InspectionToolProvider... provider) {
final ArrayList<LocalInspectionTool> result = new ArrayList<>();
for (InspectionToolProvider toolProvider : provider) {
for (Class aClass : toolProvider.getInspectionClasses()) {
try {
final Object tool = aClass.newInstance();
assertTrue(tool instanceof LocalInspectionTool);
result.add((LocalInspectionTool) tool);
} catch (Exception e) {
LOG.error(e);
}
}
}
return result.toArray(new LocalInspectionTool[result.size()]);
}
Aggregations