void (String word, DictionaryLevel level, ProblemDescriptor descriptor) { SideEffectGuard.checkSideEffectAllowed(SideEffectGuard.EffectType.SETTINGS); PsiElement psi = descriptor.getPsiElement(); PsiFile file = psi.getContainingFile(); Project project = file.getProject(); SpellCheckerManager.getInstance(project).acceptWordAsCorrect$intellij_spellchecker(word, file.getViewProvider().getVirtualFile(), project, level); TextRange range = descriptor.getTextRangeInElement().shiftRight(psi.getTextRange().getStartOffset()); UpdateHighlightersUtil.removeHighlightersWithExactRange(file.getViewProvider().getDocument(), project, range); }