use of com.intellij.lang.refactoring.NamesValidator in project intellij-community by JetBrains.
the class SpellCheckerDictionaryGenerator method addSeenWord.
protected void addSeenWord(HashSet<String> seenNames, String word, Language language) {
final String lowerWord = word.toLowerCase();
if (globalSeenNames.contains(lowerWord)) {
return;
}
final NamesValidator namesValidator = LanguageNamesValidation.INSTANCE.forLanguage(language);
if (namesValidator != null && namesValidator.isKeyword(word, myProject)) {
return;
}
globalSeenNames.add(lowerWord);
if (mySpellCheckerManager.hasProblem(lowerWord)) {
seenNames.add(lowerWord);
}
}
Aggregations