diff options
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/IReconcilingStrategy.java')
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/IReconcilingStrategy.java | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/IReconcilingStrategy.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/IReconcilingStrategy.java new file mode 100644 index 00000000000..8292a23ae9f --- /dev/null +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/IReconcilingStrategy.java @@ -0,0 +1,54 @@ +package org.eclipse.jface.text.reconciler; + +/* + * (c) Copyright IBM Corp. 2000, 2001. + * All Rights Reserved. + */ + + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; + + +/** + * A reconciling strategy is used by an reconciler to reconcile a model + * based on text of a particular content type. It provides methods for + * incremental as well as non-incremental reconciling.<p> + * This interface must be implemented by clients. Implementers should be + * registered with a reconciler in order get involved in the reconciling + * process. + */ +public interface IReconcilingStrategy { + + /** + * Tells this reconciling strategy on which document it will + * work. This method will be called before any other method + * and can be called multiple times. The regions passed to the + * other methods always refer to the most recent document + * passed into this method. + * + * @param document the document on which this strategy will work + */ + void setDocument(IDocument document); + + /** + * Activates incremental reconciling of the specified dirty region. + * As a dirty region might span multiple content types, the segment of the + * dirty region which should be investigated is also provided to this + * reconciling strategy. The given regions refer to the document passed into + * the most recent call of <code>setDocument</code>. + * + * @param dirtyRegion the document region which has been changed + * @param subRegion the sub region in the dirty region which should be reconciled + */ + void reconcile(DirtyRegion dirtyRegion, IRegion subRegion); + + /** + * Activates non-incremental reconciling. The reconciling strategy is just told + * that there are changes and that it should reconcile the given partition of the + * document most recently passed into <code>setDocument</code>. + * + * @param partition the document partition to be reconciled + */ + void reconcile(IRegion partition); +}
\ No newline at end of file |