void (boolean disposeOffsetMap) { cancel(); ThreadingAssertions.assertEventDispatchThread(); Disposer.dispose(myQueue); LookupManager.getInstance(getProject()).removePropertyChangeListener(myLookupManagerListener); CompletionServiceImpl .assertPhase(CompletionPhase.BgCalculation.class, CompletionPhase.ItemsCalculated.class, CompletionPhase.Synchronous.class, CompletionPhase.CommittingDocuments.class); CompletionProgressIndicator currentCompletion = CompletionServiceImpl.getCurrentCompletionProgressIndicator(); LOG.assertTrue(currentCompletion == this, currentCompletion + "!=" + this); CompletionPhase oldPhase = CompletionServiceImpl.getCompletionPhase(); if (oldPhase instanceof CompletionPhase.CommittingDocuments) { LOG.assertTrue(oldPhase.indicator != null, oldPhase); ((CompletionPhase.CommittingDocuments)oldPhase).replaced = true; } CompletionServiceImpl.setCompletionPhase(CompletionPhase.NoCompletion); if (disposeOffsetMap) { disposeIndicator(); } }