From 545aa80cb61d850bd9ffc517ae852cf645575494 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Wed, 27 Feb 2013 18:34:28 +0400 Subject: [PATCH] do not call filter with injected file and host tex trange --- .../codeInsight/daemon/impl/LocalInspectionsPass.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java index 2277b6ddf831..ae2d8b9b5228 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java @@ -620,16 +620,15 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass TextRange hostRange = ((DocumentWindow)documentRange).injectedToHost(editable); int start = hostRange.getStartOffset(); int end = hostRange.getEndOffset(); - HighlightInfo.Builder builder = HighlightInfo.newHighlightInfo(info.type); - builder.range(element, start, end); + HighlightInfo.Builder builder = HighlightInfo.newHighlightInfo(info.type).range(element, start, end); if (info.description != null) { builder.description(info.description); } if (info.toolTip != null) { builder.escapedToolTip(info.toolTip); } - HighlightInfo patched = builder.create(); - if (patched != null && (patched.startOffset != patched.endOffset || info.startOffset == info.endOffset)) { + HighlightInfo patched = builder.createUnconditionally(); + if (patched.startOffset != patched.endOffset || info.startOffset == info.endOffset) { patched.fromInjection = true; registerQuickFixes(tool, descriptor, patched, emptyActionRegistered); outInfos.add(patched);