Object[] (@NotNull PsiReferenceBase reference) { Charset[] charsets = CharsetToolkit.getAvailableCharsets(); LookupElement[] res = new LookupElement[charsets.length]; for (int i = 0; i < charsets.length; i++) { res[i] = LookupElementBuilder.create(charsets[i].name()).withCaseSensitivity(false); } return res; }