Search in sources :

Example 1 with EditorCustomization

use of com.intellij.ui.EditorCustomization in project intellij-community by JetBrains.

the class SpellCheckingEditorCustomizationTest method doTest.

private void doTest(boolean enabled, String document) {
    InspectionProfileImpl.INIT_INSPECTIONS = true;
    try {
        myFixture.configureByText(PlainTextFileType.INSTANCE, document);
        myFixture.enableInspections(new SpellCheckingInspection());
        EditorCustomization customization = SpellCheckingEditorCustomizationProvider.getInstance().getCustomization(enabled);
        assertNotNull(customization);
        customization.customize((EditorEx) myFixture.getEditor());
        myFixture.checkHighlighting();
    } finally {
        InspectionProfileImpl.INIT_INSPECTIONS = false;
    }
}
Also used : SpellCheckingInspection(com.intellij.spellchecker.inspections.SpellCheckingInspection) EditorCustomization(com.intellij.ui.EditorCustomization)

Example 2 with EditorCustomization

use of com.intellij.ui.EditorCustomization in project intellij-community by JetBrains.

the class TextFieldWithCompletion method createEditor.

@Override
protected EditorEx createEditor() {
    EditorEx editor = super.createEditor();
    EditorCustomization disableSpellChecking = SpellCheckingEditorCustomizationProvider.getInstance().getDisabledCustomization();
    if (disableSpellChecking != null)
        disableSpellChecking.customize(editor);
    editor.putUserData(AutoPopupController.ALWAYS_AUTO_POPUP, myForceAutoPopup);
    if (myShowHint) {
        TextCompletionUtil.installCompletionHint(editor);
    }
    return editor;
}
Also used : EditorEx(com.intellij.openapi.editor.ex.EditorEx) EditorCustomization(com.intellij.ui.EditorCustomization)

Aggregations

EditorCustomization (com.intellij.ui.EditorCustomization)2 EditorEx (com.intellij.openapi.editor.ex.EditorEx)1 SpellCheckingInspection (com.intellij.spellchecker.inspections.SpellCheckingInspection)1