Package org.eclipse.team.core.synchronize

Examples of org.eclipse.team.core.synchronize.SyncInfo


                    variant = new WGAPluginResourceVariant(_server, remotePluginInfo);
                }
               
                PluginInfo localPluginInfo = _localPluginInfos.get(resource);
               
                SyncInfo info = new WGAPluginResourceSyncInfo(_runtime, _server, resource, localPluginInfo, variant, _remoteWGAVersion);
                info.init();
                return info;
            } else {
              IResourceVariant variant = null;
              FSDesignResourceState state = _remoteStatesByResource.get(resource);
              if (state != null) {
                variant = new WGAFSDesignResourceVariant(_server, state);
              }
              LocalFSDesignResourceState localState = _localStatesByResource.get(resource);
              SyncInfo info = new WGAFSDesignResourceSyncInfo(_runtime, _server, resource, localState, variant, variant, _comparator);
              info.init();
              return info;
            }
        } catch (CoreException e) {
          throw TeamException.asTeamException(e);
        }
View Full Code Here


 
  public Image decorateImage(Image image, Object element) {
    if(element instanceof ISynchronizeModelElement) {
        ISynchronizeModelElement node = (ISynchronizeModelElement)element;
        if(node instanceof IAdaptable) {
          SyncInfo info = (SyncInfo)((IAdaptable)node).getAdapter(SyncInfo.class);
          if (info != null) {
            Image result = null;
            IResource resource = info.getLocal();
            result = _designFolderDecorator.decorateImage(image, element);           
            if (result != null) {
              result = _natureDecorator.decorateImage(result, element);
            }
          }
View Full Code Here

    _configuration = configuration;
  }

  public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
    RemoteSession session = null;
    SyncInfo infos[] = getSyncInfoSet().getSyncInfos();
    try {
      monitor.beginTask("Committing resource changes", -1);
      List<IResource> committedResources = new ArrayList<IResource>();
      for (SyncInfo info : infos) {
        if (info instanceof WGAFSDesignResourceSyncInfo) {
View Full Code Here

    }

    public int getKind() {
      int kind = IDiff.NO_CHANGE;
      if (syncInfoSet != null) {
        SyncInfo syncInfo = syncInfoSet.getSyncInfo(resource);
        if (syncInfo != null) {
          int change = SyncInfo.getChange(syncInfo.getKind());
          if (change == SyncInfo.CONFLICTING) kind = IThreeWayDiff.CONFLICTING;
          else if (change == SyncInfo.CHANGE) kind = IDiff.CHANGE;
          else if (change == SyncInfo.ADDITION) kind = IDiff.ADD;
          else if (change == SyncInfo.DELETION) kind = IDiff.REMOVE;
        }
View Full Code Here

     * @param resource
     * @return The revision of the resource as a String, or null.
     */
    public String getRevisionString(IResource resource) {
        Subscriber subscriber = provider.getSubscriber();
        SyncInfo syncInfo;
        try {
            syncInfo = subscriber.getSyncInfo(resource);
        } catch (TeamException e) {
            undocumentedException(e);
            return null;
        }
        if (syncInfo == null)
            return null;
        return syncInfo.getLocalContentIdentifier();
    }
View Full Code Here

  public IDiff getDiff(IResource resource) throws CoreException {
    final GitSynchronizeData syncData = gsds.getData(resource.getProject());
    if (syncData == null || syncData.shouldIncludeLocal())
      return super.getDiff(resource);

    SyncInfo info = getSyncInfo(resource);
    if (info == null || info.getKind() == SyncInfo.IN_SYNC)
      return null;
    return syncInfoConverter.getDeltaFor(info);
  }
View Full Code Here

  @Override
  protected SyncInfo getSyncInfo(IResource local, IResourceVariant base,
      IResourceVariant remote) throws TeamException {

    Repository repo = gsds.getData(local.getProject()).getRepository();
    SyncInfo info = new GitSyncInfo(local, base, remote,
        getResourceComparator(), cache.get(repo), repo);

    info.init();
    return info;
  }
View Full Code Here

            }
            // REVIEWME: temp workaround to trick compare algorithm that change is a new outgoing addition
            baseVariant = null;
        }

        SyncInfo syncInfo =
                new ComponentSyncInfo(resource, baseVariant, remoteVariant, getComponentVariantComparatorInstance());
        syncInfo.init();

        // if in sync, remove resource for further consideration
        if (syncInfo.getKind() == SyncInfo.IN_SYNC) {
            if (logger.isDebugEnabled()) {
                logger.debug("Resource '" + resource.getProjectRelativePath().toPortableString()
                        + "' is in sync - removing as a cached sync resource");
            }
            syncResources.remove(resource);
View Full Code Here

    IResourceVariant remote = remoteTree.fetchVariant(local, IResource.DEPTH_ZERO, monitor);
    return getSyncInfo(local, null, remote);
  }

  protected SyncInfo getSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote) throws TeamException {
    SyncInfo info = new RemoteSyncInfo(local, remote, comparator);
    info.init();
    return info;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.team.core.synchronize.SyncInfo

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.