Package org.eclipse.team.core.subscribers

Examples of org.eclipse.team.core.subscribers.Subscriber


                throw new InvocationTargetException(e);                   
            }
        }
      }
      if (_configuration.getParticipant() instanceof SubscriberParticipant) {
        Subscriber subscriber = ((SubscriberParticipant)_configuration.getParticipant()).getSubscriber();
        try {
          subscriber.refresh(committedResources.toArray(new IResource[0]), IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, -1));
        } catch (TeamException e) {
          throw new InvocationTargetException(e);
        }
      }
    } finally {
View Full Code Here


  public static IResource[] getTeamOutOfSyncResources(IProject project, IProgressMonitor monitor) throws CoreException {
    RepositoryProvider provider = RepositoryProvider.getProvider(project);
    if (provider == null) {
      return new IResource[0];
    }
    Subscriber subscriber = provider.getSubscriber();
    subscriber.refresh(new IResource[] {project}, IResource.DEPTH_INFINITE, monitor);

    SyncInfoSet sis = new SyncInfoSet();
    subscriber.collectOutOfSync(new IResource[] {project}, IResource.DEPTH_INFINITE, sis, monitor);
    List<IResource> res = new ArrayList<IResource>();
    for (IResource resource : sis.getResources()) {
      if (resource instanceof IFile) {
        IFile file = (IFile) resource;
        if (file.getName().endsWith(".bnd") || file.getName().equals("packageinfo")) {
View Full Code Here

        if (vcs == null)
            return;
        if (log.isTraceEnabled()) {
            RepositoryProvider provider = RepositoryProvider
                .getProvider(project);
            Subscriber subscriber = provider.getSubscriber();
            if (subscriber != null)
                subscriber.addListener(subscriberChangeListener);
            else
                log.error("Could not add this SharedProject as an ISubscriberChangeListener."); //$NON-NLS-1$
        }
        Set<IPath> paths = resourceMap.keySet();
        for (IPath path : paths) {
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)
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

    if (input instanceof ResourceDiffCompareInput && ctx instanceof SubscriberMergeContext) {
      // Team only considers local resources as "left"
      // We'll use the cached data instead as left could be remote
      final IResource resource = ((ResourceNode) input.getLeft())
          .getResource();
      final Subscriber subscriber = ((SubscriberMergeContext)ctx).getSubscriber();

      if (resource instanceof IFile
          && subscriber instanceof GitResourceVariantTreeSubscriber) {
        try {
          final IFileRevision revision = ((GitResourceVariantTreeSubscriber) subscriber)
View Full Code Here

TOP

Related Classes of org.eclipse.team.core.subscribers.Subscriber

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.