@Override public void inputDocumentChanged(IDocument oldInput, IDocument newInput) { fDocument= newInput; if (fDocument == null) return; reconcilerDocumentChanged(fDocument); fDocument.addDocumentListener(this); if (!fThread.isDirty()) aboutToBeReconciled(); startReconciling(); } }
@Override public void inputDocumentChanged(IDocument oldInput, IDocument newInput) { fDocument= newInput; if (fDocument == null) return; reconcilerDocumentChanged(fDocument); fDocument.addDocumentListener(this); if (!fThread.isDirty()) aboutToBeReconciled(); startReconciling(); } }
@Override public void documentChanged(DocumentEvent e) { if (fThread.isActive() || !fThread.isDirty() && fThread.isAlive()) { if (!fIsAllowedToModifyDocument && Thread.currentThread() == fThread) throw new UnsupportedOperationException("The reconciler thread is not allowed to modify the document"); //$NON-NLS-1$ aboutToBeReconciled(); } /* * The second OR condition handles the case when the document * gets changed while still inside initialProcess(). */ if (fThread.isActive() || fThread.isDirty() && fThread.isAlive()) fProgressMonitor.setCanceled(true); if (fIsIncrementalReconciler) createDirtyRegion(e); fThread.reset(); }
@Override public void documentChanged(DocumentEvent e) { if (fThread.isActive() || !fThread.isDirty() && fThread.isAlive()) { if (!fIsAllowedToModifyDocument && Thread.currentThread() == fThread) throw new UnsupportedOperationException("The reconciler thread is not allowed to modify the document"); //$NON-NLS-1$ aboutToBeReconciled(); } /* * The second OR condition handles the case when the document * gets changed while still inside initialProcess(). */ if (fThread.isActive() || fThread.isDirty() && fThread.isAlive()) fProgressMonitor.setCanceled(true); if (fIsIncrementalReconciler) createDirtyRegion(e); fThread.reset(); }
/** * Forces the reconciler to reconcile the structure of the whole document. * Clients may extend this method. */ protected void forceReconciling() { if (fDocument != null) { if (!fThread.isDirty()&& fThread.isAlive()) aboutToBeReconciled(); if (fThread.isActive()) fProgressMonitor.setCanceled(true); if (fIsIncrementalReconciler) { DocumentEvent e= new DocumentEvent(fDocument, 0, fDocument.getLength(), fDocument.get()); createDirtyRegion(e); } startReconciling(); } }
/** * Forces the reconciler to reconcile the structure of the whole document. * Clients may extend this method. */ protected void forceReconciling() { if (fDocument != null) { if (!fThread.isDirty()&& fThread.isAlive()) aboutToBeReconciled(); if (fThread.isActive()) fProgressMonitor.setCanceled(true); if (fIsIncrementalReconciler) { DocumentEvent e= new DocumentEvent(fDocument, 0, fDocument.getLength(), fDocument.get()); createDirtyRegion(e); } startReconciling(); } }