checkCanceled

This commit is contained in:
Alexey Kudravtsev
2013-10-25 13:42:27 +04:00
parent 90e5604cea
commit 8ad0f3121a
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2013 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.
@@ -20,6 +20,7 @@ import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInspection.InspectionProfile;
import com.intellij.codeInspection.InspectionProfileEntry;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.psi.PsiElement;
@@ -63,6 +64,7 @@ public class InspectionProfileWrapper {
alreadyChecked = true;
Set<InspectionProfileEntry> uniqTools = new THashSet<InspectionProfileEntry>(toolWrappers.length);
for (InspectionToolWrapper toolWrapper : toolWrappers) {
ProgressManager.checkCanceled();
if (!uniqTools.add(toolWrapper.getTool())) {
LOG.error("Inspection " + toolWrapper.getDisplayName() + " (" + toolWrapper.getTool().getClass() + ") already registered");
}