1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 03:45:35 +02:00

Updated reconciler usage to make use of new MonoReconciler class

and removed CReconciler.
Patch contributed by Anton Leherbauer
PR 130089
This commit is contained in:
Thomas Fletcher 2006-04-19 21:19:27 +00:00
parent 302fc99a1f
commit 93740b5316
2 changed files with 2 additions and 28 deletions

View file

@ -1,15 +0,0 @@
package org.eclipse.cdt.internal.ui.text;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.reconciler.DirtyRegion;
import org.eclipse.jface.text.reconciler.Reconciler;
public class CReconciler extends Reconciler {
protected void process(DirtyRegion dirtyRegion) {
if(dirtyRegion != null) {
getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE).reconcile(dirtyRegion, null);
}
}
}

View file

@ -44,7 +44,7 @@ import org.eclipse.jface.text.information.InformationPresenter;
import org.eclipse.jface.text.presentation.IPresentationReconciler;
import org.eclipse.jface.text.presentation.PresentationReconciler;
import org.eclipse.jface.text.reconciler.IReconciler;
import org.eclipse.jface.text.reconciler.Reconciler;
import org.eclipse.jface.text.reconciler.MonoReconciler;
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.source.IAnnotationHover;
@ -222,21 +222,10 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
*/
public IReconciler getReconciler(ISourceViewer sourceViewer) {
if (fEditor != null && fEditor.isEditable()) {
Reconciler reconciler= new CReconciler() {
protected void initialProcess() {
// prevent case where getDocument() returns null
// and causes exception in initialProcess()
// PR 63890
IDocument doc = getDocument();
if (doc != null)
super.initialProcess();
}
};
//Delay changed and non-incremental reconciler used due to
//PR 130089
MonoReconciler reconciler= new MonoReconciler(new CReconcilingStrategy(fEditor), false);
reconciler.setDelay(500);
reconciler.setIsIncrementalReconciler(false);
reconciler.setReconcilingStrategy(new CReconcilingStrategy(fEditor), IDocument.DEFAULT_CONTENT_TYPE);
return reconciler;
}
return null;