mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
minor optimizations, more diagnostics
GitOrigin-RevId: 9b4a3f33b413a7cb90ec8b182172432b1bdbdc40
This commit is contained in:
committed by
intellij-monorepo-bot
parent
271ff248eb
commit
031eb02b63
@@ -2971,7 +2971,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
||||
}
|
||||
|
||||
private void checkFirstAnnotation() {
|
||||
AtomicBoolean reported = new AtomicBoolean();
|
||||
AtomicReference<Throwable> reported = new AtomicReference<>();
|
||||
getProject().getMessageBus().connect(getTestRootDisposable()).subscribe(DaemonCodeAnalyzer.DAEMON_EVENT_TOPIC,
|
||||
new DaemonCodeAnalyzer.DaemonListener() {
|
||||
@Override
|
||||
@@ -2979,7 +2979,8 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
||||
@NotNull Collection<? extends AnnotatorStatistics> statistics,
|
||||
@NotNull PsiFile file) {
|
||||
AnnotatorStatistics stat = assertOneElement(ContainerUtil.filter(statistics, stat1 -> stat1.annotator instanceof MyInfoAnnotator));
|
||||
assertFalse(reported.getAndSet(true));
|
||||
Throwable old = reported.getAndSet(new Throwable());
|
||||
assertNull(old==null?null:ExceptionUtil.getMessage(old), old);
|
||||
assertEquals("Annotation(message='comment', severity='INFORMATION', toolTip='<html>comment</html>')", stat.firstAnnotation.toString());
|
||||
assertSame(stat.firstAnnotation, stat.lastAnnotation);
|
||||
assertTrue(stat.annotatorStartStamp > 0);
|
||||
@@ -2996,7 +2997,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
||||
configureByText(JavaFileType.INSTANCE, text);
|
||||
|
||||
doHighlighting();
|
||||
assertTrue(reported.get());
|
||||
assertNotNull(reported.get());
|
||||
}
|
||||
|
||||
public void testUncommittedByAccidentNonPhysicalDocumentMustNotHangDaemon() {
|
||||
@@ -3040,6 +3041,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
||||
configureByText(JavaFileType.INSTANCE, text);
|
||||
makeWholeEditorWindowVisible((EditorImpl)myEditor); // get "visible area first" optimization out of the way
|
||||
UIUtil.markAsFocused(getEditor().getContentComponent(), true); // to make ShowIntentionPass call its collectInformation()
|
||||
SeverityRegistrar.getSeverityRegistrar(getProject()); //preload inspection profile
|
||||
|
||||
AtomicReference<String> diagnosticText = new AtomicReference<>("1st run");
|
||||
AtomicInteger stallMs = new AtomicInteger();
|
||||
|
||||
Reference in New Issue
Block a user