void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { SpellCheckerManager manager = SpellCheckerManager.getInstance(project); if (myWord != null) { manager.acceptWordAsCorrect(myWord, project); } else { manager.acceptWordAsCorrect(ProblemDescriptorUtil.extractHighlightedText(descriptor, descriptor.getPsiElement()), project); } }