org.eclipse.handly.model.impl

## Interface IReconcileStrategy

-     public interface IReconcileStrategy

  Reconciles a model based on text of a particular content type.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Property<java.lang.Boolean>` | `RECONCILING_FORCED` Indicates whether reconciling is forced, i.e., the source text has not been modified since the last time the model was reconciled.
    `static Property<java.lang.Object>` | `SOURCE_AST` Specifies the source AST for reconciling.
    `static Property<java.lang.String>` | `SOURCE_CONTENTS` Specifies the source string for reconciling.
    `static Property<ISnapshot>` | `SOURCE_SNAPSHOT` Specifies the source snapshot for reconciling.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `reconcile(IContext context, org.eclipse.core.runtime.IProgressMonitor monitor)` Reconciles a model according to options specified in the given context.

- - ### Field Detail

    - #### RECONCILING_FORCED

          static final Property<java.lang.Boolean> 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:
        `reconcile(IContext, IProgressMonitor)`

    - #### SOURCE_AST

          static final Property<java.lang.Object> SOURCE_AST

      Specifies the source AST for reconciling.
      See Also:
        `reconcile(IContext, IProgressMonitor)`

    - #### SOURCE_CONTENTS

          static final Property<java.lang.String> SOURCE_CONTENTS

      Specifies the source string for reconciling.
      See Also:
        `reconcile(IContext, IProgressMonitor)`

    - #### SOURCE_SNAPSHOT

          static final Property<ISnapshot> SOURCE_SNAPSHOT

      Specifies the source snapshot for reconciling.
      See Also:
        `reconcile(IContext, IProgressMonitor)`

  - ### Method Detail

    - #### 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` or `SOURCE_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 which `SOURCE_AST` was created or `SOURCE_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 (not `null`)
        `monitor` - a progress monitor, or `null` if progress reporting is not desired. The caller must not rely on `IProgressMonitor.done()` having been called by the receiver
      Throws:
        `org.eclipse.core.runtime.CoreException` - if the model could not be reconciled
        `org.eclipse.core.runtime.OperationCanceledException` - if this method is canceled

Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0