本文整理汇总了Java中org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot.peekResourceStatusFor方法的典型用法代码示例。如果您正苦于以下问题:Java SVNWorkspaceRoot.peekResourceStatusFor方法的具体用法?Java SVNWorkspaceRoot.peekResourceStatusFor怎么用?Java SVNWorkspaceRoot.peekResourceStatusFor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot
的用法示例。
在下文中一共展示了SVNWorkspaceRoot.peekResourceStatusFor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isManagedBySubversion
import org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot; //导入方法依赖的package包/类
/**
* @return true if the container is managed by SVN
*/
public boolean isManagedBySubversion(IPath folder)
{
File svnDir = folder.append(getAdminDirectoryName()).toFile();
if (svnDir == null || !svnDir.exists() || !svnDir.isDirectory())
return false;
try {
LocalResourceStatus status = SVNWorkspaceRoot.peekResourceStatusFor(folder);
if (status.hasRemote())
return true;
} catch (SVNException e) {
if (e.getMessage() != null && e.getMessage().contains(UPGRADE_NEEDED)) {
return true;
}
}
return false;
}
示例2: doesSVNDirectoryExist
import org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot; //导入方法依赖的package包/类
/**
* check if there is a valid svn directory
*/
private boolean doesSVNDirectoryExist() {
// Determine if there is an existing .svn/ directory from which configuration
// information can be retrieved.
boolean isSVNFolder = false;
try {
projectStatus = SVNWorkspaceRoot.peekResourceStatusFor(project);;
isSVNFolder = (projectStatus != null) && projectStatus.hasRemote();
} catch (final SVNException e) {
Shell shell = null;
// If this is called before the pages have been added, getContainer will return null
if (getContainer() != null) {
shell = getContainer().getShell();
}
SVNUIPlugin.openError(shell, null, null, e);
}
return isSVNFolder;
}