start inspections in parallel with highlighting since the latter has more work to do now

This commit is contained in:
Alexey Kudravtsev
2016-04-05 19:14:33 +03:00
parent c560d099ed
commit 5ea2a69393
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ public class LocalInspectionsPassFactory extends AbstractProjectComponent implem
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.daemon.impl.LocalInspectionsPassFactory");
public LocalInspectionsPassFactory(Project project, TextEditorHighlightingPassRegistrar highlightingPassRegistrar) {
super(project);
highlightingPassRegistrar.registerTextEditorHighlightingPass(this, new int[]{Pass.UPDATE_ALL}, ArrayUtil.EMPTY_INT_ARRAY, true, Pass.LOCAL_INSPECTIONS);
highlightingPassRegistrar.registerTextEditorHighlightingPass(this, ArrayUtil.EMPTY_INT_ARRAY, new int[]{Pass.UPDATE_ALL}, true, Pass.LOCAL_INSPECTIONS);
}
@Override
@@ -93,7 +93,7 @@ public class LocalInspectionsPassFactory extends AbstractProjectComponent implem
@Override
List<LocalInspectionToolWrapper> getInspectionTools(@NotNull InspectionProfileWrapper profile) {
List<LocalInspectionToolWrapper> tools = super.getInspectionTools(profile);
List<LocalInspectionToolWrapper> result = new ArrayList<LocalInspectionToolWrapper>(tools.size());
List<LocalInspectionToolWrapper> result = new ArrayList<>(tools.size());
for (LocalInspectionToolWrapper tool : tools) {
if (!tool.runForWholeFile()) result.add(tool);
}