Java Code Examples for org.eclipse.team.core.RepositoryProvider#isShared()

The following examples show how to use org.eclipse.team.core.RepositoryProvider#isShared() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FilesInSyncFilter.java    From eclipse-cs with GNU Lesser General Public License v2.1 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public boolean accept(Object element) {
  boolean passes = true;

  if (element instanceof IFile) {

    IFile file = (IFile) element;
    IProject project = file.getProject();

    if (RepositoryProvider.isShared(project)) {

      RepositoryProvider provider = RepositoryProvider.getProvider(project);

      if (provider != null) {

        Subscriber subscriber = provider.getSubscriber();

        if (subscriber != null) {
          passes = hasChanges(file, subscriber);
        }
      }
    }
  }
  return passes;
}
 
Example 2
Source File: SVNTeamProviderType.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public boolean shouldRun() {
    synchronized (projectsToShare) {
        for (Iterator<IProject> iter = projectsToShare.iterator(); iter.hasNext();) {
            IProject project = iter.next();
            if (RepositoryProvider.isShared(project)) {
                iter.remove();
            }
        }
        return !projectsToShare.isEmpty();
    }
}
 
Example 3
Source File: SVNTeamProviderType.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public void share(IProject project) {
    if (!RepositoryProvider.isShared(project)) {
        synchronized (projectsToShare) {
            if (!projectsToShare.contains(project)) {
                SVNWorkspaceRoot.setManagedBySubclipse(project);
                projectsToShare.add(project);
            }
        }
        if(getState() == Job.NONE && !isQueueEmpty())
            schedule();
    }
}
 
Example 4
Source File: NonSharedProjectFilter.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private static boolean isSharedProject(IProject project) {
	return !project.isAccessible() || RepositoryProvider.isShared(project) && !isBinaryPDEProject(project);
}
 
Example 5
Source File: CustomPopupMenuExtender.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
private boolean isLocalProject(IProject project) {
    return !RepositoryProvider.isShared(project);
}