当前位置: 首页>>代码示例>>Java>>正文


Java RepositoryProvider.isShared方法代码示例

本文整理汇总了Java中org.eclipse.team.core.RepositoryProvider.isShared方法的典型用法代码示例。如果您正苦于以下问题:Java RepositoryProvider.isShared方法的具体用法?Java RepositoryProvider.isShared怎么用?Java RepositoryProvider.isShared使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.team.core.RepositoryProvider的用法示例。


在下文中一共展示了RepositoryProvider.isShared方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reconnectToTeamProviders

import org.eclipse.team.core.RepositoryProvider; //导入方法依赖的package包/类
/**
 * Will try to reconnect team provicers - but only for projects not being
 * shared already!
 * @param monitor 
 * 
 * @param data
 * @param projectsList
 */
public void reconnectToTeamProviders(IProgressMonitor monitor, ProjectShareData data, List<IProject> projectsList) {
	if (data == null) {
		return;
	}
	if (projectsList == null || projectsList.isEmpty()) {
		return;
	}

	for (IProject project : projectsList) {
		if (RepositoryProvider.isShared(project)) {
			/* already shared - so ignore! */
			continue;
		}
		String projectName = project.getName();

		IPath path = project.getFullPath();
		String providerId = data.getProviderId(path);
		if (providerId == null) {
			continue;
		}
		try {
			RepositoryProvider.map(project, providerId);
			progressMessage(monitor, "Reconnected team provider for project: "+projectName);
		} catch (TeamException e) {
			IDEUtil.logError("Was not able to reconnect team provider on project:"+projectName, e);
		}
	}
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:37,代码来源:ProjectShareSupport.java

示例2: shouldRun

import org.eclipse.team.core.RepositoryProvider; //导入方法依赖的package包/类
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();
    }
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:12,代码来源:SVNTeamProviderType.java

示例3: share

import org.eclipse.team.core.RepositoryProvider; //导入方法依赖的package包/类
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();
    }
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:13,代码来源:SVNTeamProviderType.java

示例4: isSharedProject

import org.eclipse.team.core.RepositoryProvider; //导入方法依赖的package包/类
private static boolean isSharedProject(IProject project) {
	return !project.isAccessible() || RepositoryProvider.isShared(project) && !isBinaryPDEProject(project);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:NonSharedProjectFilter.java

示例5: isConfigured

import org.eclipse.team.core.RepositoryProvider; //导入方法依赖的package包/类
/**
 * <p>
 * Tests whether the specified resource's project is configured to use
 * <b>any</b> repository provider.
 * </p>
 *
 * <p>
 * To test whether the resource's project is configured to use a
 * <b>specific</b> repository provider, call
 * {@link #isConfiguredWith(IResource, String)} instead. However,
 * {@link #isConfigured(IResource)} is more efficient since it does not
 * require Eclipse to lazily instantiate a repository provider for the
 * resource's project.
 * </p>
 *
 * <p>
 * If the resource is contained in a closed project, this method will return
 * <code>false</code> even if the project is configured to use a repository
 * provider.
 * </p>
 *
 * <p>
 * If the specified resource is the root resource, this method returns
 * <code>false</code>.
 * </p>
 *
 * @param resource
 *        the resource to test (must not be <code>null</code>)
 * @return <code>true</code> if the resource's project is configured to use
 *         any repository provider, or <code>false</code> if the resource is
 *         in a closed project, is in a project not configured to use a
 *         repository provider, or is the root resource
 */
public static boolean isConfigured(final IResource resource) {
    Check.notNull(resource, "resource"); //$NON-NLS-1$

    if (IResource.ROOT == resource.getType()) {
        return false;
    }

    return RepositoryProvider.isShared(resource.getProject());
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:43,代码来源:TeamUtils.java


注:本文中的org.eclipse.team.core.RepositoryProvider.isShared方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。