use of com.intellij.spellchecker.inspections.Splitter in project intellij-community by JetBrains.
the class SpellCheckerDictionaryGenerator method processLeafsNames.
protected void processLeafsNames(@NotNull final PsiElement leafElement, @NotNull final HashSet<String> seenNames) {
final Language language = leafElement.getLanguage();
SpellCheckingInspection.tokenize(leafElement, language, new TokenConsumer() {
@Override
public void consumeToken(PsiElement element, final String text, boolean useRename, int offset, TextRange rangeToCheck, Splitter splitter) {
splitter.split(text, rangeToCheck, textRange -> {
final String word = textRange.substring(text);
addSeenWord(seenNames, word, language);
});
}
});
}
Aggregations