mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -180,9 +180,8 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
public void run() {
|
||||
highlight.run();
|
||||
progress.checkCanceled();
|
||||
HighlightingSession highlightingSession = HighlightingSessionImpl.getHighlightingSession(file, progress);
|
||||
PostHighlightingVisitor highlightingVisitor = new PostHighlightingVisitor(file, document, refCountHolder);
|
||||
highlightingVisitor.collectHighlights(file, holder, progress);
|
||||
highlightingVisitor.collectHighlights(holder, progress);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -74,12 +74,12 @@ public class HighlightingSessionImpl implements HighlightingSession {
|
||||
@Nullable EditorColorsScheme editorColorsScheme) {
|
||||
HighlightingSession session = getHighlightingSession(psiFile, progressIndicator);
|
||||
if (session == null) {
|
||||
session = new HighlightingSessionImpl(psiFile, editor, progressIndicator, editorColorsScheme);
|
||||
ConcurrentMap<PsiFile, HighlightingSession> map = progressIndicator.getUserData(HIGHLIGHTING_SESSION);
|
||||
if (map == null) {
|
||||
map = progressIndicator.putUserDataIfAbsent(HIGHLIGHTING_SESSION, ContainerUtil.newConcurrentMap());
|
||||
}
|
||||
session = ConcurrencyUtil.cacheOrGet(map, psiFile, session);
|
||||
session = ConcurrencyUtil.cacheOrGet(map, psiFile,
|
||||
new HighlightingSessionImpl(psiFile, editor, progressIndicator, editorColorsScheme));
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user