[vcs]: change getDoc to getCachedDoc to avoid document creation

This commit is contained in:
Nadya Zabrodina
2016-11-03 19:21:34 +03:00
parent 5273ea97a9
commit a8a2705a66
@@ -35,7 +35,7 @@ public class ChangeListCompletionContributor extends CompletionContributor imple
@Override
public void fillCompletionVariants(@NotNull final CompletionParameters parameters, @NotNull final CompletionResultSet result) {
final PsiFile file = parameters.getOriginalFile();
final Document document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file);
final Document document = PsiDocumentManager.getInstance(file.getProject()).getCachedDocument(file);
if (document == null) return;
ComboBox comboBox = document.getUserData(COMBO_BOX_KEY);
if (comboBox == null) return;