protected void handlePreferenceStoreChanged(PropertyChangeEvent event) { if (event.getProperty().equals(SpellingService.PREFERENCE_SPELLING_ENABLED)) { ISourceViewer viewer= getSourceViewer(); if (!(viewer instanceof ISourceViewerExtension2)) return; // cannot unconfigure - do nothing // XXX: this is pretty heavy-weight ((ISourceViewerExtension2)viewer).unconfigure(); viewer.configure(getSourceViewerConfiguration()); if (Boolean.FALSE.equals(event.getNewValue())) SpellingProblem.removeAllInActiveEditor(this, null); IAction quickAssistAction= getAction(ITextEditorActionConstants.QUICK_ASSIST); if (quickAssistAction instanceof IUpdate) ((IUpdate)quickAssistAction).update(); return; } super.handlePreferenceStoreChanged(event); }
@Override protected void handlePreferenceStoreChanged(PropertyChangeEvent event) { if (event.getProperty().equals(SpellingService.PREFERENCE_SPELLING_ENABLED)) { ISourceViewer viewer= getSourceViewer(); if (!(viewer instanceof ISourceViewerExtension2)) return; // cannot unconfigure - do nothing // XXX: this is pretty heavy-weight ((ISourceViewerExtension2)viewer).unconfigure(); viewer.configure(getSourceViewerConfiguration()); if (Boolean.FALSE.equals(event.getNewValue())) SpellingProblem.removeAll(getSourceViewer(), null); IAction quickAssistAction= getAction(ITextEditorActionConstants.QUICK_ASSIST); if (quickAssistAction instanceof IUpdate) ((IUpdate)quickAssistAction).update(); return; } super.handlePreferenceStoreChanged(event); }
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) { JDISourceViewer isv= (JDISourceViewer) getSourceViewer(); if (isv != null) { IContentAssistant assistant= isv.getContentAssistant(); if (assistant instanceof ContentAssistant) { JDIContentAssistPreference.changeConfiguration((ContentAssistant) assistant, event); } SourceViewerConfiguration configuration = getSourceViewerConfiguration(); if (configuration instanceof JavaSourceViewerConfiguration) { JavaSourceViewerConfiguration jsv = (JavaSourceViewerConfiguration) configuration; if (jsv.affectsTextPresentation(event)) { jsv.handlePropertyChangeEvent(event); isv.invalidateTextPresentation(); } } super.handlePreferenceStoreChanged(event); } }