Class WorkingCopyReconcilingStrategy
- java.lang.Object
-
- org.eclipse.handly.ui.text.reconciler.WorkingCopyReconcilingStrategy
-
- All Implemented Interfaces:
org.eclipse.jface.text.reconciler.IReconcilingStrategy,org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension
public class WorkingCopyReconcilingStrategy extends java.lang.Object implements org.eclipse.jface.text.reconciler.IReconcilingStrategy, org.eclipse.jface.text.reconciler.IReconcilingStrategyExtensionReconciles a working copy.
-
-
Constructor Summary
Constructors Constructor Description WorkingCopyReconcilingStrategy(java.util.function.Function<org.eclipse.jface.text.IDocument,ISourceFile> documentToSourceFile)Creates a new working copy reconciling strategy with a function that is used to determine the source file for the reconciling strategy's document.WorkingCopyReconcilingStrategy(IWorkingCopyManager workingCopyManager)Creates a new working copy reconciling strategy with the given working copy manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialReconcile()protected voidreconcile(ISourceFile sourceFile, boolean initialReconcile, org.eclipse.core.runtime.IProgressMonitor monitor)Reconciles the given source file.voidreconcile(org.eclipse.jface.text.IRegion partition)voidreconcile(org.eclipse.jface.text.reconciler.DirtyRegion dirtyRegion, org.eclipse.jface.text.IRegion subRegion)voidsetDocument(org.eclipse.jface.text.IDocument document)voidsetProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
-
-
-
Constructor Detail
-
WorkingCopyReconcilingStrategy
public WorkingCopyReconcilingStrategy(IWorkingCopyManager workingCopyManager)
Creates a new working copy reconciling strategy with the given working copy manager. The working copy manager is used to determine the working copy for the reconciling strategy's document.- Parameters:
workingCopyManager- notnull
-
WorkingCopyReconcilingStrategy
public WorkingCopyReconcilingStrategy(java.util.function.Function<org.eclipse.jface.text.IDocument,ISourceFile> documentToSourceFile)
Creates a new working copy reconciling strategy with a function that is used to determine the source file for the reconciling strategy's document.- Parameters:
documentToSourceFile- notnull- Since:
- 1.5
-
-
Method Detail
-
setDocument
public void setDocument(org.eclipse.jface.text.IDocument document)
- Specified by:
setDocumentin interfaceorg.eclipse.jface.text.reconciler.IReconcilingStrategy
-
setProgressMonitor
public void setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
setProgressMonitorin interfaceorg.eclipse.jface.text.reconciler.IReconcilingStrategyExtension
-
initialReconcile
public final void initialReconcile()
This implementation delegates to
reconcile(ISourceFile, boolean, IProgressMonitor), passing the working copy for the reconciling strategy's document and indicating that this is the initial reconcile; any exceptions are logged and not rethrown.- Specified by:
initialReconcilein interfaceorg.eclipse.jface.text.reconciler.IReconcilingStrategyExtension
-
reconcile
public final void reconcile(org.eclipse.jface.text.reconciler.DirtyRegion dirtyRegion, org.eclipse.jface.text.IRegion subRegion)This implementation delegates to
reconcile(ISourceFile, boolean, IProgressMonitor), passing the working copy for the reconciling strategy's document; any exceptions are logged and not rethrown.- Specified by:
reconcilein interfaceorg.eclipse.jface.text.reconciler.IReconcilingStrategy
-
reconcile
public final void reconcile(org.eclipse.jface.text.IRegion partition)
This implementation delegates to
reconcile(ISourceFile, boolean, IProgressMonitor), passing the working copy for the reconciling strategy's document; any exceptions are logged and not rethrown.- Specified by:
reconcilein interfaceorg.eclipse.jface.text.reconciler.IReconcilingStrategy
-
reconcile
protected void reconcile(ISourceFile sourceFile, boolean initialReconcile, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
Reconciles the given source file. Does nothing if the source file is not in working copy mode or if its buffer has not been modified since the last time it was reconciled.This implementation invokes
Elements..reconcile(sourceFile, monitor)- Parameters:
sourceFile- nevernullinitialReconcile-trueif this is the initial reconcile, andfalseotherwisemonitor- a progress monitor, ornullif progress reporting is not desired. The caller must not rely onIProgressMonitor.done()having been called by the receiver- Throws:
org.eclipse.core.runtime.CoreException- if the working copy could not be reconciledorg.eclipse.core.runtime.OperationCanceledException- if this method is canceled
-
-