mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Spellchecker: cover null case
This commit is contained in:
@@ -218,19 +218,21 @@ public class SpellCheckerManager implements Disposable {
|
||||
final String transformed = spellChecker.getTransformation().transform(word);
|
||||
final EditableDictionary dictionary = DictionaryLevel.PROJECT == dictionaryLevel ? myProjectDictionary : myAppDictionary;
|
||||
if (transformed != null) {
|
||||
UndoManager.getInstance(project).undoableActionPerformed(new BasicUndoableAction(file) {
|
||||
@Override
|
||||
public void undo() {
|
||||
dictionary.removeFromDictionary(word);
|
||||
restartInspections();
|
||||
}
|
||||
if(file != null) {
|
||||
UndoManager.getInstance(project).undoableActionPerformed(new BasicUndoableAction(file) {
|
||||
@Override
|
||||
public void undo() {
|
||||
dictionary.removeFromDictionary(word);
|
||||
restartInspections();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void redo() {
|
||||
dictionary.addToDictionary(word);
|
||||
restartInspections();
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void redo() {
|
||||
dictionary.addToDictionary(word);
|
||||
restartInspections();
|
||||
}
|
||||
});
|
||||
}
|
||||
dictionary.addToDictionary(word);
|
||||
restartInspections();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user