Package org.eclipse.handly.model.impl
Interface IReconcileStrategy
public interface IReconcileStrategy
Reconciles a model based on text of a particular content type.
-
Field Summary
Modifier and TypeFieldDescriptionIndicates whether reconciling is forced, i.e., the source text has not been modified since the last time the model was reconciled.Specifies the source AST for reconciling.Specifies the source string for reconciling.Specifies the source snapshot for reconciling. -
Method Summary
-
Field Details
-
RECONCILING_FORCED
Indicates whether reconciling is forced, i.e., the source text has not been modified since the last time the model was reconciled. Default value:false
.- See Also:
-
SOURCE_AST
Specifies the source AST for reconciling.- See Also:
-
SOURCE_CONTENTS
Specifies the source string for reconciling.- See Also:
-
SOURCE_SNAPSHOT
Specifies the source snapshot for reconciling.- See Also:
-
-
Method Details
-
reconcile
void reconcile(IContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException Reconciles a model according to options specified in the given context.The following context options, if simultaneously present, must be mutually consistent:
-
SOURCE_AST
- Specifies the AST to use when reconciling. The AST is safe to read in the dynamic context of this method call, but must not be modified. -
SOURCE_CONTENTS
- Specifies the source string to use when reconciling.
At least one of
SOURCE_AST
orSOURCE_CONTENTS
must have a non-null value in the given context.The given context may provide additional data that this method can use, including the following:
-
RECONCILING_FORCED
- Indicates whether reconciling is forced, i.e., the source text has not been modified since the last time the model was reconciled. -
SOURCE_SNAPSHOT
- Specifies the source snapshot from whichSOURCE_AST
was created orSOURCE_CONTENTS
was obtained. The snapshot may expire.
This method makes no guarantees about synchronization of reconcile operations. Such guarantees must be provided by the caller.
- Parameters:
context
- the operation context (notnull
)monitor
- a progress monitor, ornull
if 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 model could not be reconciledorg.eclipse.core.runtime.OperationCanceledException
- if this method is canceled
-
-