Bug 71354 [painting] IAE in StyledText.getBidiSegments upon revert
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
if (!(sourceViewer instanceof ISourceViewerExtension2)) {
			setPreferenceStore(createCombinedPreferenceStore(input));
			internalDoSetInput(input);
			return;
		}
		
		getSourceViewerDecorationSupport(sourceViewer).uninstall();
		((ISourceViewerExtension2)sourceViewer).unconfigure();
		
		setPreferenceStore(createCombinedPreferenceStore(input));
		
		 
		sourceViewer.configure(getSourceViewerConfiguration());
		getSourceViewerDecorationSupport(sourceViewer).install(getPreferenceStore());
		
		internalDoSetInput(input);
	}
	
	private void internalDoSetInput(IEditorInput input) throws CoreException {
		super.doSetInput(input);
		
		if (getSourceViewer() instanceof JavaSourceViewer) {
			JavaSourceViewer viewer= (JavaSourceViewer)getSourceViewer();
			if (viewer.getReconciler() == null) {
				IReconciler reconciler= getSourceViewerConfiguration().getReconciler(viewer);
				if (reconciler != null) {
					reconciler.install(viewer);
					viewer.setReconciler(reconciler);
				}
			}