mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WI-40696 Spellchecker considers known capitalized word incorrect
This commit is contained in:
@@ -222,18 +222,18 @@ public class SpellCheckerManager implements Disposable {
|
||||
UndoManager.getInstance(project).undoableActionPerformed(new BasicUndoableAction(file) {
|
||||
@Override
|
||||
public void undo() {
|
||||
dictionary.removeFromDictionary(word);
|
||||
dictionary.removeFromDictionary(transformed);
|
||||
restartInspections();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void redo() {
|
||||
dictionary.addToDictionary(word);
|
||||
dictionary.addToDictionary(transformed);
|
||||
restartInspections();
|
||||
}
|
||||
});
|
||||
}
|
||||
dictionary.addToDictionary(word);
|
||||
dictionary.addToDictionary(transformed);
|
||||
restartInspections();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.spellchecker.inspector;
|
||||
|
||||
import com.intellij.spellchecker.SpellCheckerManager;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
public class AcceptWordAsCorrectTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
|
||||
private void doTest(String word) {
|
||||
final SpellCheckerManager manager = SpellCheckerManager.getInstance(myFixture.getProject());
|
||||
assertTrue(manager.hasProblem(word));
|
||||
manager.acceptWordAsCorrect(word, myFixture.getProject());
|
||||
assertFalse(manager.hasProblem(word));
|
||||
}
|
||||
|
||||
public void testGeneral(){
|
||||
doTest("wooord");
|
||||
}
|
||||
|
||||
public void testCamelCase(){
|
||||
doTest("Tyyyyypo");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user