Package org.eclipse.handly.model.impl

## Class DefaultWorkingCopyCallback

- java.lang.Object
- - org.eclipse.handly.model.impl.WorkingCopyCallback
  - - org.eclipse.handly.model.impl.DefaultWorkingCopyCallback

- All Implemented Interfaces:
    `IWorkingCopyCallback`

      public class DefaultWorkingCopyCallback
      extends WorkingCopyCallback

  Default implementation of `IWorkingCopyCallback`.

  Clients can use this class as it stands or subclass it as circumstances warrant.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultWorkingCopyCallback()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `needsReconciling()` | Returns whether the working copy needs reconciling, i.e., its buffer has been modified since the last time it was reconciled.
    `void` | `reconcile​(IContext context, org.eclipse.core.runtime.IProgressMonitor monitor)` | Reconciles the working copy.

    - ### Methods inherited from class org.eclipse.handly.model.impl.WorkingCopyCallback

      `getWorkingCopyInfo, onDispose, onInit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultWorkingCopyCallback

          public DefaultWorkingCopyCallback()

  - ### Method Detail

    - #### needsReconciling

          public final boolean needsReconciling()

      Description copied from interface: `IWorkingCopyCallback`
      Returns whether the working copy needs reconciling, i.e., its buffer has been modified since the last time it was reconciled.

      Clients should not call this method (the model implementation calls it at appropriate times).

      Returns:
        `true` if the working copy needs reconciling, and `false` otherwise

    - #### reconcile

          public final void reconcile​(IContext context,
                                      org.eclipse.core.runtime.IProgressMonitor monitor)
                               throws org.eclipse.core.runtime.CoreException

      Description copied from interface: `IWorkingCopyCallback`
      Reconciles the working copy.

      Clients should not call this method (the model implementation calls it at appropriate times).

      Implementations are encouraged to support the following standard options, which may be specified in the given context:

      - `FORCE_RECONCILING` - Indicates whether reconciling has to be performed even if the working copy buffer has not been modified since the last time the working copy was reconciled.

      An implementation of this method is supposed to invoke the working copy's `reconcile strategy` by calling its `reconcile` method with an appropriately augmented context while providing the necessary synchronization guarantees.

      Parameters:
        `context` - the operation context (never `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 working copy could not be reconciled