don't commit document in the completion framework, give the chance to see the old PSI

This commit is contained in:
peter
2011-05-31 12:52:00 +02:00
parent e2bcfdad21
commit c49a02972a
2 changed files with 2 additions and 1 deletions
@@ -820,6 +820,8 @@ public class JavaCompletionUtil {
hasParams = false;
}
PsiDocumentManager.getInstance(context.getProject()).commitDocument(context.getDocument());
final CodeStyleSettings styleSettings = CodeStyleSettingsManager.getSettings(context.getProject());
ParenthesesInsertHandler.getInstance(hasParams,
styleSettings.SPACE_BEFORE_METHOD_CALL_PARENTHESES,
@@ -535,7 +535,6 @@ public class CodeCompletionHandlerBase implements CodeInsightActionHandler {
assert context.getStartOffset() >= 0 : "stale startOffset";
assert context.getTailOffset() >= 0 : "stale tailOffset";
PsiDocumentManager.getInstance(indicator.getProject()).commitAllDocuments();
item.handleInsert(context);
PostprocessReformattingAspect.getInstance(indicator.getProject()).doPostponedFormatting();