mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
file level higlighting disappears on typing
This commit is contained in:
@@ -430,6 +430,13 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
HighlightInfo info = assertOneElement(fileLevel);
|
||||
assertEquals("top level", info.getDescription());
|
||||
|
||||
type("\n\n");
|
||||
doHighlighting();
|
||||
fileLevel =
|
||||
((DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(ourProject)).getFileLevelHighlights(getProject(), getFile());
|
||||
info = assertOneElement(fileLevel);
|
||||
assertEquals("top level", info.getDescription());
|
||||
|
||||
type("//xxx"); //disable top level annotation
|
||||
List<HighlightInfo> warnings = doHighlighting(HighlightSeverity.WARNING);
|
||||
assertEmpty(warnings);
|
||||
|
||||
+3
-1
@@ -167,7 +167,9 @@ public class UpdateHighlightersUtil {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
|
||||
final DaemonCodeAnalyzerEx codeAnalyzer = DaemonCodeAnalyzerEx.getInstanceEx(project);
|
||||
codeAnalyzer.cleanFileLevelHighlights(project, group, psiFile);
|
||||
if (startOffset == 0 && endOffset == document.getTextLength()) {
|
||||
codeAnalyzer.cleanFileLevelHighlights(project, group, psiFile);
|
||||
}
|
||||
|
||||
final MarkupModel markup = DocumentMarkupModel.forDocument(document, project, true);
|
||||
assertMarkupConsistent(markup, project);
|
||||
|
||||
Reference in New Issue
Block a user