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 doSetInput(IEditorInput input) throws CoreException { ISourceViewer sourceViewer= getSourceViewer(); if (!(sourceViewer instanceof ISourceViewerExtension2)) { setPreferenceStore(createCombinedPreferenceStore(input)); internalDoSetInput(input); return; } // uninstall & unregister preference store listener getSourceViewerDecorationSupport(sourceViewer).uninstall(); ((ISourceViewerExtension2)sourceViewer).unconfigure(); setPreferenceStore(createCombinedPreferenceStore(input)); // install & register preference store listener sourceViewer.configure(getSourceViewerConfiguration()); getSourceViewerDecorationSupport(sourceViewer).install(getPreferenceStore()); internalDoSetInput(input); }
@Override protected void doSetInput(IEditorInput input) throws CoreException { ISourceViewer sourceViewer= getSourceViewer(); if (!(sourceViewer instanceof ISourceViewerExtension2)) { setPreferenceStore(createCombinedPreferenceStore(input)); internalDoSetInput(input); return; } // uninstall & unregister preference store listener getSourceViewerDecorationSupport(sourceViewer).uninstall(); ((ISourceViewerExtension2)sourceViewer).unconfigure(); setPreferenceStore(createCombinedPreferenceStore(input)); // install & register preference store listener sourceViewer.configure(getSourceViewerConfiguration()); getSourceViewerDecorationSupport(sourceViewer).install(getPreferenceStore()); internalDoSetInput(input); }
@Override protected void doSetInput(IEditorInput input) throws CoreException { ISourceViewer sourceViewer= getSourceViewer(); if (!(sourceViewer instanceof ISourceViewerExtension2)) { setPreferenceStore(createCombinedPreferenceStore(input)); internalDoSetInput(input); return; } // uninstall & unregister preference store listener getSourceViewerDecorationSupport(sourceViewer).uninstall(); ((ISourceViewerExtension2)sourceViewer).unconfigure(); setPreferenceStore(createCombinedPreferenceStore(input)); // install & register preference store listener sourceViewer.configure(getSourceViewerConfiguration()); getSourceViewerDecorationSupport(sourceViewer).install(getPreferenceStore()); internalDoSetInput(input); }
((ISourceViewerExtension2) getSourceViewer()).unconfigure(); SQLSourceViewerConfiguration configuration = createSourceViewerConfiguration(); setSourceViewerConfiguration( configuration );