From eccc21743aac96146c9ac9d9f015106748d12bfd Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 29 Sep 2014 17:45:10 +0200 Subject: [PATCH] more diagnostics for EA-58991 - assert: ChooseByNameBase$CalcElementsThread$$.run --- .../com/intellij/ide/util/gotoByName/ChooseByNameBase.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java index 13dc53302b79..66b590aa9b96 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java @@ -1024,6 +1024,7 @@ public abstract class ChooseByNameBase { } private void scheduleCalcElements(final CalcElementsThread thread) { + ApplicationManager.getApplication().assertIsDispatchThread(); myCalcElementsThread = thread; ApplicationManager.getApplication().executeOnPooledThread(thread); } @@ -1561,7 +1562,8 @@ public abstract class ChooseByNameBase { @Override public void run() { if (!myCancelled.isCanceled()) { - LOG.assertTrue(myCalcElementsThread == CalcElementsThread.this); + CalcElementsThread currentBgProcess = myCalcElementsThread; + LOG.assertTrue(currentBgProcess == CalcElementsThread.this, currentBgProcess); myCallback.consume(edt ? filter(elements) : filtered); } } @@ -1620,6 +1622,7 @@ public abstract class ChooseByNameBase { } private boolean cancel() { + ApplicationManager.getApplication().assertIsDispatchThread(); if (myCancelled.isCanceled()) { return false; }