void (@NotNull final CompletionParameters parameters, @NotNull final CompletionResultSet result) { final PsiFile file = parameters.getOriginalFile(); final Document document = PsiDocumentManager.getInstance(file.getProject()).getCachedDocument(file); if (document == null) return; ComboBox comboBox = document.getUserData(COMBO_BOX_KEY); if (comboBox == null) return; final CompletionResultSet resultSet = result.withPrefixMatcher(new PlainPrefixMatcher(document.getText())); for (int i = 0; i < comboBox.getItemCount(); i++) { resultSet.addElement(LookupElementBuilder.create(comboBox.getItemAt(i))); } }