public class XtextDocumentReconcileStrategy extends java.lang.Object implements org.eclipse.jface.text.reconciler.IReconcilingStrategy, org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension, ISourceViewerAware
IXtextDocument
's contents with the model in the underlying
XtextResource
. Uses partial parsing to only update a minimum section of the model.
Since 2.4.2, it must run in a write transaction on the document. You have to call
setSourceViewer(ISourceViewer)
, setDocument(IDocument)
and setResource(XtextResource)
before calling any reconcile method.Constructor and Description |
---|
XtextDocumentReconcileStrategy() |
Modifier and Type | Method and Description |
---|---|
protected void |
doReconcile(org.eclipse.jface.text.IRegion region) |
void |
initialReconcile() |
protected void |
postParse(XtextResource resource,
org.eclipse.core.runtime.IProgressMonitor monitor) |
void |
reconcile(org.eclipse.jface.text.reconciler.DirtyRegion dirtyRegion,
org.eclipse.jface.text.IRegion subRegion) |
void |
reconcile(org.eclipse.jface.text.IRegion region) |
void |
setDocument(org.eclipse.jface.text.IDocument document) |
void |
setEditor(XtextEditor editor) |
void |
setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor) |
void |
setResource(XtextResource resource) |
void |
setSourceViewer(org.eclipse.jface.text.source.ISourceViewer sourceViewer) |
public void reconcile(org.eclipse.jface.text.IRegion region)
reconcile
in interface org.eclipse.jface.text.reconciler.IReconcilingStrategy
public void reconcile(org.eclipse.jface.text.reconciler.DirtyRegion dirtyRegion, org.eclipse.jface.text.IRegion subRegion)
reconcile
in interface org.eclipse.jface.text.reconciler.IReconcilingStrategy
public void setEditor(XtextEditor editor)
public void setDocument(org.eclipse.jface.text.IDocument document)
setDocument
in interface org.eclipse.jface.text.reconciler.IReconcilingStrategy
public void setSourceViewer(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
setSourceViewer
in interface ISourceViewerAware
public void setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
setProgressMonitor
in interface org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension
public void initialReconcile()
initialReconcile
in interface org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension
public void setResource(XtextResource resource)
protected void doReconcile(org.eclipse.jface.text.IRegion region)
protected void postParse(XtextResource resource, org.eclipse.core.runtime.IProgressMonitor monitor) throws OperationCanceledError, org.eclipse.core.runtime.OperationCanceledException
OperationCanceledError
org.eclipse.core.runtime.OperationCanceledException