(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;
This commit is contained in:
Nadya Zabrodina
2017-03-31 16:58:37 +03:00
parent dc46445f5a
commit dd58bac2c2
@@ -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;
}
}