void (@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet result) { PsiSnippetAttributeValue value = (PsiSnippetAttributeValue)parameters.getPosition(); PsiSnippetAttribute attribute = ObjectUtils.tryCast(value.getParent(), PsiSnippetAttribute.class); if (attribute == null) return; PsiSnippetAttributeList list = ObjectUtils.tryCast(attribute.getParent(), PsiSnippetAttributeList.class); if (list == null) return; PsiSnippetDocTagValue snippet = ObjectUtils.tryCast(list.getParent(), PsiSnippetDocTagValue.class); if (snippet == null) return; boolean alreadyQuoted = value.getText().startsWith("\""); switch (attribute.getName()) { case PsiSnippetAttribute.REGION_ATTRIBUTE -> { SnippetMarkup markup = SnippetMarkup.fromSnippet(snippet); if (markup != null) { for (String region : markup.getRegions()) { addAttributeValue(result, region, alreadyQuoted); } } } case PsiSnippetAttribute.LANG_ATTRIBUTE -> { result = result.caseInsensitive(); for (Language language : Language.getRegisteredLanguages()) { String id = language.getID(); if (id.equals("JAVA")) id = "java"; addAttributeValue(result, id, alreadyQuoted); } } } }