From 15d0c40e783d0c2dd11078eae4b044c6ceb005b4 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 18 Jul 2018 09:02:34 +0200 Subject: [PATCH] unblock document before starting java call argument live template (EA-125190 - Throwable: PostprocessReformattingAspect.postponeFormatting) --- .../intellij/codeInsight/completion/JavaMethodCallElement.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/JavaMethodCallElement.java b/java/java-impl/src/com/intellij/codeInsight/completion/JavaMethodCallElement.java index 86ea31d2ee47..50e7ddd79e16 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/JavaMethodCallElement.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/JavaMethodCallElement.java @@ -256,6 +256,8 @@ public class JavaMethodCallElement extends LookupItem implements Type Editor editor = context.getEditor(); context.commitDocument(); + PsiDocumentManager.getInstance(context.getProject()).doPostponedOperationsAndUnblockDocument(editor.getDocument()); + PsiCall call = PsiTreeUtil.findElementOfClassAtOffset(context.getFile(), context.getStartOffset(), PsiCall.class, false); PsiExpressionList argList = call == null ? null : call.getArgumentList(); if (argList == null || !argList.isEmpty()) {