ISourceViewer sourceViewer = getSourceViewer();
if (!(sourceViewer instanceof ISourceViewerExtension2)) {
changePreferenceStore(createCombinedPreferenceStore(input));
} else {
ISourceViewerExtension2 sourceViewerExt2 = (ISourceViewerExtension2) sourceViewer;
getSourceViewerDecorationSupport(sourceViewer).uninstall();
sourceViewerExt2.unconfigure();
changePreferenceStore(createCombinedPreferenceStore(input));
sourceViewer.configure(getSourceViewerConfiguration());
getSourceViewerDecorationSupport(sourceViewer).install(getPreferenceStore());