本文整理汇总了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));
}
}
}
}
示例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()]));
}
示例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]);
}
示例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);
}
}