Interface IBranchCheckoutContext


public interface IBranchCheckoutContext
The branch checkout context. Provides information about the checkout and means for progress reporting.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.core.runtime.IProgressMonitor
     
    org.eclipse.jgit.lib.Repository
     
    org.eclipse.jgit.lib.Ref
     
    void
    setExtraWork(double work)
    Sets the relative amount of work, which the listener is going to consume from the total checkout operation progress.
  • Method Details

    • getRepository

      org.eclipse.jgit.lib.Repository getRepository()
      Returns:
      the repository to checkout, never null
    • getTarget

      org.eclipse.jgit.lib.Ref getTarget()
      Returns:
      the target ref, never null
    • setExtraWork

      void setExtraWork(double work)
      Sets the relative amount of work, which the listener is going to consume from the total checkout operation progress. The checkout itself is assumed to take 1.0 units of work.

      This method has nothing to do with the amount of work, allocated with IProgressMonitor.beginTask(String, int) or SubMonitor.setWorkRemaining(int).

      For example, if execution of beforeCheckout and afterCheckout is expected to be two times faster than checkout, the listener must call setExtraWork(0.5). Then it may report progress with an arbitrary granularity, controlled with the methods of IProgressMonitor and SubMonitor.

      Parameters:
      work - the relative work units, must not be negative
    • getProgressMonitor

      org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()
      Returns:
      the progress monitor to report listener's progress, never null