void (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; } }