本文整理汇总了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);
}
}
}
示例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();
}
}
示例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();
}
}
示例4: isSharedProject
import org.eclipse.team.core.RepositoryProvider; //导入方法依赖的package包/类
private static boolean isSharedProject(IProject project) {
return !project.isAccessible() || RepositoryProvider.isShared(project) && !isBinaryPDEProject(project);
}
示例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());
}