Class BranchCheckoutManager

java.lang.Object
com._1c.g5.v8.dt.internal.team.ui.BranchCheckoutManager
All Implemented Interfaces:
IBranchCheckoutManager

public class BranchCheckoutManager extends Object implements IBranchCheckoutManager
Allows to check out a branch and observe checkouts.

  1. First user is asked to save all unsaved changes. However, checkout operation continues even if user refuses to save dirty editors.
  2. If there is configuration project associated with the repository then user is asked to stash or revert uncomitted changes. Cancellation here means cancellation of checkout operation.
  3. Once working copy is clean, project (if any) is synchronized with the new state of its resources.
  4. If any listeners were registered, they are notified that checkout is about to begin.
  5. Checkout itself happens through EGit.
  6. If any listeners were registered, they are notified that checkout has finished.
  • Constructor Details

    • BranchCheckoutManager

      public BranchCheckoutManager()
  • Method Details

    • addCheckoutListener

      public void addCheckoutListener(IBranchCheckoutListener l)
      Description copied from interface: IBranchCheckoutManager
      Adds branch checkout listener.
      Specified by:
      addCheckoutListener in interface IBranchCheckoutManager
      Parameters:
      l - the listener, cannot be null
    • removeCheckoutListener

      public void removeCheckoutListener(IBranchCheckoutListener l)
      Description copied from interface: IBranchCheckoutManager
      Removes branch checkout listener.
      Specified by:
      removeCheckoutListener in interface IBranchCheckoutManager
      Parameters:
      l - the listener, cannot be null
    • checkoutBranch

      public void checkoutBranch(org.eclipse.swt.widgets.Shell shell, org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.lib.Ref ref, org.eclipse.core.resources.IProject parentProject)
      Checks out the provided branch.
      Parameters:
      shell - the shell, cannot be null
      repository - the git repository, cannot be null
      ref - the branch to checkout, cannot be null
      parentProject - the repository parent project, may be null if unknown