use of com.intellij.spellchecker.inspections.SpellCheckingInspection in project intellij-plugins by JetBrains.
the class ActionScriptHighlightingTest method runRenameSpellcheckerFixWithChooseVariant.
private void runRenameSpellcheckerFixWithChooseVariant(String variantName) throws Exception {
TemplateManagerImpl.setTemplateTesting(getProject(), getTestRootDisposable());
enableInspectionTool(new SpellCheckingInspection());
doSimpleHighlightingWithInvokeFixAndCheckResult("Typo: Rename to...");
final LookupEx lookup = LookupManager.getActiveLookup(myEditor);
assertNotNull(lookup);
boolean selected = false;
for (LookupElement l : lookup.getItems()) {
if (variantName.equals(l.getLookupString())) {
selected = true;
((LookupImpl) lookup).finishLookup(Lookup.AUTO_INSERT_SELECT_CHAR, l);
}
}
assertTrue(selected);
LookupManager.getInstance(myProject).hideActiveLookup();
checkResultByFile(BASE_PATH + getTestName(false) + "_after2.js2");
}
use of com.intellij.spellchecker.inspections.SpellCheckingInspection in project intellij-plugins by JetBrains.
the class FlexHighlightingTest method testSpellChecker.
@JSTestOptions(JSTestOption.WithFlexSdk)
public void testSpellChecker() throws Exception {
enableInspectionTool(new SpellCheckingInspection());
configureByFile(getBasePath() + "/" + getTestName(false) + ".mxml");
ExpectedHighlightingData expectedHighlightingData = new ExpectedHighlightingData(myEditor.getDocument(), true, true, false, myFile);
Collection<HighlightInfo> infoCollection = checkHighlighting(expectedHighlightingData);
assertEquals(1, countNonInformationHighlights(infoCollection));
findAndInvokeActionWithExpectedCheck("Typo: Rename to...", "mxml", infoCollection);
}
use of com.intellij.spellchecker.inspections.SpellCheckingInspection in project intellij-community by JetBrains.
the class PropertiesSpellcheckingTest method testPropertiesSpellcheckingStrategy.
public void testPropertiesSpellcheckingStrategy() {
myFixture.enableInspections(new SpellCheckingInspection());
myFixture.configureByText("test.properties", "valid.key=value\n" + "# comment is <TYPO descr=\"Typo: In word 'cheked'\">cheked</TYPO>\n" + "validWord<TYPO descr=\"Typo: In word 'Buuundary'\">Buuundary</TYPO>=value\n" + "i3<TYPO descr=\"Typo: In word 'nvalid'\">nvalid</TYPO>.key=i3<TYPO descr=\"Typo: In word 'nvalid'\">nvalid</TYPO>Value");
myFixture.testHighlighting();
}
Aggregations