mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not rewrite file level highlightings
This commit is contained in:
+6
-7
@@ -116,6 +116,8 @@ public class UpdateHighlightersUtil {
|
||||
int endOffset,
|
||||
@NotNull Collection<HighlightInfo> highlights,
|
||||
int group) {
|
||||
PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(document);
|
||||
cleanFileLevelHighlights(project, group, psiFile);
|
||||
setHighlightersToEditor(project, document, Collections.singletonMap(new TextRange(startOffset, endOffset), highlights), group);
|
||||
}
|
||||
|
||||
@@ -192,15 +194,12 @@ public class UpdateHighlightersUtil {
|
||||
assertMarkupConsistent(markup, project);
|
||||
}
|
||||
|
||||
public static void setHighlightersToEditor(@NotNull Project project,
|
||||
@NotNull Document document,
|
||||
@NotNull Map<TextRange, Collection<HighlightInfo>> infos,
|
||||
final int group) {
|
||||
static void setHighlightersToEditor(@NotNull Project project,
|
||||
@NotNull Document document,
|
||||
@NotNull Map<TextRange, Collection<HighlightInfo>> infos,
|
||||
final int group) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
|
||||
PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(document);
|
||||
cleanFileLevelHighlights(project, group, psiFile);
|
||||
|
||||
final List<TextRange> ranges = new ArrayList<TextRange>(infos.keySet());
|
||||
Collections.sort(ranges, BY_START_OFFSET);
|
||||
//merge intersecting
|
||||
|
||||
Reference in New Issue
Block a user