IDEA-51739 Code highlight is not updated upon modification

This commit is contained in:
Maxim.Mossienko
2010-01-27 17:31:11 +03:00
parent b5469ff725
commit 4dead6b5b9
4 changed files with 2 additions and 5 deletions
@@ -47,7 +47,6 @@ public class LineMarkerInfo<T extends PsiElement> {
@Nullable private final Function<? super T, String> myTooltipProvider;
private final GutterIconRenderer.Alignment myIconAlignment;
@Nullable private final GutterIconNavigationHandler<T> myNavigationHandler;
public TextAttributesKey textAttributesKey;
public LineMarkerInfo(T element,
@@ -143,7 +143,6 @@ public class LineMarkersPass extends ProgressableTextEditorHighlightingPass impl
return injectedMarker.getLineMarkerTooltip();
}
}, injectedMarker.getNavigationHandler(), GutterIconRenderer.Alignment.RIGHT);
converted.textAttributesKey = injectedMarker.textAttributesKey;
result.add(converted);
}
}
@@ -399,8 +399,7 @@ public class UpdateHighlightersUtil {
}
RangeHighlighter marker = toReuse.reuseHighlighterAt(info.startOffset, info.endOffset);
if (marker == null) {
TextAttributes attributes = info.textAttributesKey == null ? null : colorsScheme.getAttributes(info.textAttributesKey);
marker = markupModel.addRangeHighlighter(info.startOffset, info.endOffset, HighlighterLayer.ADDITIONAL_SYNTAX, attributes, HighlighterTargetArea.EXACT_RANGE);
marker = markupModel.addRangeHighlighter(info.startOffset, info.endOffset, HighlighterLayer.ADDITIONAL_SYNTAX, null, HighlighterTargetArea.EXACT_RANGE);
}
LineMarkerInfo.LineMarkerGutterIconRenderer renderer = (LineMarkerInfo.LineMarkerGutterIconRenderer)info.createGutterRenderer();
LineMarkerInfo.LineMarkerGutterIconRenderer oldRenderer = marker.getGutterIconRenderer() instanceof LineMarkerInfo.LineMarkerGutterIconRenderer ? (LineMarkerInfo.LineMarkerGutterIconRenderer)marker.getGutterIconRenderer() : null;
@@ -244,7 +244,7 @@ public class DefaultXmlExtension extends XmlExtension {
@NonNls String nsDeclarationAttrName = null;
for(XmlTag t = context; t != null; t = t.getParentTag()) {
if (t.hasNamespaceDeclarations()) {
if (nsDeclarationAttrName == null) nsDeclarationAttrName = "xmlns:"+namespacePrefix;
if (nsDeclarationAttrName == null) nsDeclarationAttrName = namespacePrefix.length() > 0 ? "xmlns:"+namespacePrefix:"xmlns";
if (t.getAttributeValue(nsDeclarationAttrName) != null) return true;
}
}