use of org.eclipse.jface.text.tests.TestTextViewer in project eclipse.platform.text by eclipse.
the class AbstractReconcilerTest method setUp.
@Before
public void setUp() {
fBarrier = new Barrier();
fCallLog = Collections.synchronizedList(new ArrayList<String>());
fReconciler = new AbstractReconciler() {
@Override
protected void initialProcess() {
fCallLog.add("initialProcess");
fBarrier.await();
}
@Override
protected void process(DirtyRegion dirtyRegion) {
fCallLog.add("process");
fBarrier.await();
}
@Override
protected void reconcilerDocumentChanged(IDocument newDocument) {
fCallLog.add("reconcilerDocumentChanged");
}
@Override
protected void aboutToBeReconciled() {
fCallLog.add("aboutToBeReconciled");
}
@Override
protected void reconcilerReset() {
fCallLog.add("reconcilerReset");
}
@Override
public IReconcilingStrategy getReconcilingStrategy(String contentType) {
return null;
}
};
fReconciler.setIsIncrementalReconciler(false);
// make tests run faster
fReconciler.setDelay(50);
fProgressMonitor = new NullProgressMonitor();
fReconciler.setProgressMonitor(fProgressMonitor);
fViewer = new TestTextViewer();
fReconciler.install(fViewer);
fAccessor = new Accessor(fReconciler, AbstractReconciler.class);
Object object = fAccessor.get("fThread");
fAccessor = new Accessor(object, object.getClass());
}
Aggregations