be prepared to externally canceled completion in async commit (EA-38205)

This commit is contained in:
peter
2012-08-14 16:42:40 +02:00
parent 2028b65898
commit 62caf220fb
@@ -523,12 +523,12 @@ public class CodeCompletionHandlerBase {
final Project project = hostFile.getProject();
if (!synchronous) {
if (!CompletionServiceImpl.assertPhase(CompletionPhase.CommittingDocuments.class, CompletionPhase.NoCompletion.getClass())) {
CompletionServiceImpl.setCompletionPhase(CompletionPhase.NoCompletion);
if (CompletionServiceImpl.isPhase(CompletionPhase.NoCompletion.getClass()) ||
!CompletionServiceImpl.assertPhase(CompletionPhase.CommittingDocuments.class)) {
Disposer.dispose(translator);
return;
}
final CompletionPhase.CommittingDocuments phase = (CompletionPhase.CommittingDocuments)CompletionServiceImpl.getCompletionPhase();
CompletionAutoPopupHandler.runLaterWithCommitted(project, hostDocument, new Runnable() {