SuggestedNameInfo (@NotNull PsiElement element, PsiElement nameSuggestionContext, @NotNull Set<String> result) { if (!active || nameSuggestionContext == null) { return null; } String initial = getText(nameSuggestionContext); if (initial == null) { return null; } String normalized = normalize(initial); Project project = element.getProject(); SpellCheckerManager manager = SpellCheckerManager.getInstance(project); denormalize(initial, manager.getSuggestions(normalized)) .stream() .filter(newName -> RenameUtil.isValidName(project, element, newName)) .forEach(result::add); return SuggestedNameInfo.NULL_INFO; }