From dd58bac2c28b7c43fbfc8dc69803dce46ecf2a1d Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Fri, 31 Mar 2017 16:50:08 +0300 Subject: [PATCH] (IDEA-170558) don't show popup after special chars in Custom File type * don't show completion autoPopup if there is no changelist Combobox data in the related document; --- .../openapi/vcs/changes/ChangeListCompletionContributor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListCompletionContributor.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListCompletionContributor.java index 8b39e8e92332..9e14110b17f8 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListCompletionContributor.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListCompletionContributor.java @@ -47,7 +47,9 @@ public class ChangeListCompletionContributor extends CompletionContributor imple @Override public boolean invokeAutoPopup(@NotNull PsiElement position, char typeChar) { - return true; + PsiFile file = position.getContainingFile(); + Document cachedDocument = PsiDocumentManager.getInstance(file.getProject()).getCachedDocument(file); + return cachedDocument != null && cachedDocument.getUserData(COMBO_BOX_KEY) != null; } }