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


Java SVNWorkspaceRoot.getResourcesFor方法代码示例

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


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

示例1: onNotify

import org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot; //导入方法依赖的package包/类
public void onNotify(File path, SVNNodeKind kind) {
	IPath pathEclipse = new Path(path.getAbsolutePath());
	IResource[] resources = SVNWorkspaceRoot.getResourcesFor(pathEclipse, false);
	for (IResource resource : resources) {			
		localRefreshList.add(resource);
	}
       
	if (operationNotifyListener != null)
	{
		operationNotifyListener.onNotify(path, kind);
		if ((operationNotifyListener.getMonitor() != null) && (operationNotifyListener.getMonitor().isCanceled()))
		{
			try {
				svnClient.cancelOperation();
			} catch (SVNClientException e) {
				SVNProviderPlugin.log(SVNException.wrapException(e));
			}
		}
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:21,代码来源:OperationManager.java

示例2: getSchedulingRule

import org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot; //导入方法依赖的package包/类
/**
 * Retgurn the scheduling rule to be obtained before work
 * begins on the given provider. By default, it is the provider's project.
 * This can be changed by subclasses.
 * @param provider
 * @return
 */
protected ISchedulingRule getSchedulingRule(SVNTeamProvider provider) {
	IResourceRuleFactory ruleFactory = provider.getRuleFactory();
	HashSet rules = new HashSet();
	IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
	for (int i = 0; i < resources.length; i++) {			
		IResource[] pathResources = SVNWorkspaceRoot.getResourcesFor(new Path(resources[i].getLocation().toOSString()), false);
		for (IResource pathResource : pathResources) {
			IProject resourceProject = pathResource.getProject();				
			rules.add(ruleFactory.modifyRule(resourceProject));
			if (resourceProject.getLocation() != null) {
				// Add nested projects
				for (IProject project : projects) {
					if (project.getLocation() != null) {
						if (!project.getLocation().equals(resourceProject.getLocation()) && resourceProject.getLocation().isPrefixOf(project.getLocation())) {
							rules.add(ruleFactory.modifyRule(project));
						}
					}
				}	
			}
		}
	}
	return MultiRule.combine((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:31,代码来源:RepositoryProviderOperation.java

示例3: getSVNLocalResource

import org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot; //导入方法依赖的package包/类
/**
 * return the ISVNLocalResource associated to this property or null
 * @param svnProperty
 * @return
 */
protected ISVNLocalResource getSVNLocalResource(ISVNProperty svnProperty) {
	File file = svnProperty.getFile();
	if (file == null || !file.exists()) {
		return null;
	}

	IPath pathEclipse; 
	pathEclipse = new Path(file.getAbsolutePath());

	// XXX IGORF ideally IResource should come from ISelection
	IResource[] resource = SVNWorkspaceRoot.getResourcesFor(pathEclipse);;
	if (resource.length == 0) {
		return null;
	}
	return SVNWorkspaceRoot.getSVNResourceFor(resource[0]);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:22,代码来源:SVNPropertyAction.java

示例4: onNotify

import org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot; //导入方法依赖的package包/类
public void onNotify(File path, SVNNodeKind kind) {
	IPath pathEclipse = new Path(path.getAbsolutePath());
	IResource[] resources = SVNWorkspaceRoot.getResourcesFor(pathEclipse, false);
	for (IResource resource : resources) {
		operationResources.add(resource);
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:8,代码来源:OperationResourceCollector.java


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