Package org.eclipse.egit.core.synchronize.dto

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet


    return false;
  }

  private void runPushOperation() {
    GitSynchronizeDataSet gsds = (GitSynchronizeDataSet) getConfiguration()
        .getProperty(SYNCHRONIZATION_DATA);

    for (GitSynchronizeData gsd : gsds) {
      String remoteName = gsd.getDstRemoteName();
      if (remoteName == null)
View Full Code Here


   */
  private static SubscriberScopeManager createScopeManager(
      final IResource[] resources) {
    ResourceMapping[] mappings = GitScopeUtil
        .getResourceMappings(resources);
    GitSynchronizeDataSet set = new GitSynchronizeDataSet();
    Subscriber subscriber = new GitResourceVariantTreeSubscriber(set);
    SubscriberScopeManager manager = new SubscriberScopeManager(
        UIText.GitScopeOperation_GitScopeManager, mappings, subscriber,
        true);
    return manager;
View Full Code Here

    return new SynchronizeModelOperation(configuration, elements) {

      public void run(IProgressMonitor monitor)
          throws InvocationTargetException, InterruptedException {
        GitSynchronizeDataSet gsds = (GitSynchronizeDataSet) getConfiguration()
            .getProperty(SYNCHRONIZATION_DATA);

        Set<Repository> repositories = new HashSet<Repository>();
        for (GitSynchronizeData gsd : gsds)
          repositories.add(gsd.getRepository());
View Full Code Here

      throws PartInitException {
    try {
      boolean forceFetchPref = Activator.getDefault().getPreferenceStore()
          .getBoolean(UIPreferences.SYNC_VIEW_FETCH_BEFORE_LAUNCH);
      boolean forceFetch = getBoolean(memento.getBoolean(FORCE_FETCH_KEY), forceFetchPref);
      gsds = new GitSynchronizeDataSet(forceFetch);
      IMemento[] children = memento.getChildren(DATA_NODE_KEY);
      if (children != null)
        restoreSynchronizationData(children);
    } finally {
      super.init(secondaryId, memento);
View Full Code Here

      // Synchronize using the local data for now.
      final ResourceMapping[] mappings = allMappings
          .toArray(new ResourceMapping[allMappings.size()]);
      final GitSynchronizeData data = new GitSynchronizeData(repository,
          srcRev, dstRev, true, includedResources);
      launch(new GitSynchronizeDataSet(data), mappings);
    } else {
      final ResourceMapping[] mappings = allMappings
          .toArray(new ResourceMapping[allMappings.size()]);
      final GitSynchronizeData data = new GitSynchronizeData(repository,
          srcRev, dstRev, includeLocal, includedResources);
      launch(new GitSynchronizeDataSet(data), mappings);
    }
  }
View Full Code Here

   * @param data
   * @param resources
   */
  public static final void launch(GitSynchronizeData data,
      IResource[] resources) {
    launch(new GitSynchronizeDataSet(data), resources);
  }
View Full Code Here

  public ResourceMapping[] getMappings(IResource resource,
      ResourceMappingContext context, IProgressMonitor monitor)
      throws CoreException {
    if (context instanceof GitSubscriberResourceMappingContext) {
      GitSubscriberResourceMappingContext gitContext = (GitSubscriberResourceMappingContext) context;
      GitSynchronizeDataSet gsds = gitContext.getSyncData();
      GitSynchronizeData data = gsds.getData(resource.getProject());

      if (data != null) {
        GitModelObject object = null;
        try {
          object = GitModelObject.createRoot(data);
View Full Code Here

    addPage(page);
  }

  @Override
  public boolean performFinish() {
    GitSynchronizeDataSet gsdSet = new GitSynchronizeDataSet(page.forceFetch());

    Map<Repository, String> branches = page.getSelectedBranches();
    boolean shouldIncludeLocal = page.shouldIncludeLocal();
    for (Entry<Repository, String> branchesEntry : branches.entrySet())
      try {
        Repository repo = branchesEntry.getKey();
        GitSynchronizeData data = new GitSynchronizeData(
            repo, HEAD, branchesEntry.getValue(),
            shouldIncludeLocal);
        Set<IResource> resources = getSelectedResources(repo);
        if (resources != null && resources.size() > 0)
          data.setIncludedResources(resources);
        gsdSet.add(data);
      } catch (IOException e) {
        Activator.logError(e.getMessage(), e);
      }

    Set<IProject> selectedProjects
View Full Code Here

    };
  }

  @Override
  public boolean isEnabled() {
    GitSynchronizeDataSet gsds = (GitSynchronizeDataSet) getConfiguration()
        .getProperty(SYNCHRONIZATION_DATA);
    for (GitSynchronizeData gsd : gsds)
      if (gsd.getDstRemoteName() != null)
        return true;
View Full Code Here

    if (containerMap.isEmpty())
      return null;

    boolean launchFetch = Activator.getDefault().getPreferenceStore()
        .getBoolean(UIPreferences.SYNC_VIEW_FETCH_BEFORE_LAUNCH);
    GitSynchronizeDataSet gsdSet = new GitSynchronizeDataSet();
    for (Entry<Repository, Set<IResource>> entry : containerMap.entrySet())
      try {
        Repository repo = entry.getKey();
        String dstRef = getDstRef(repo, launchFetch);
        GitSynchronizeData data = new GitSynchronizeData(repo, HEAD, dstRef, true);
        Set<IResource> containers = entry.getValue();
        if (!containers.isEmpty())
          data.setIncludedResources(containers);

        gsdSet.add(data);
      } catch (IOException e) {
        Activator.handleError(e.getMessage(), e, true);
      }

    GitModelSynchronize.launch(gsdSet, getSelectedResources(event));
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.