ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
if ( null == svnResource ) {
throw new ReviewboardException(MessageFormat.format(RbSubclipseMessages.getString("ERROR_NOSVNPROPERTIES"),
new Object[]{ resource.getLocation().toString() }));
} else {
LocalResourceStatus status = null;
try {
status = svnResource.getStatus();
} catch (SVNException e) {
}
if( null != status ){
try {
repositoryRootUrl = status.getRepository().getRootFolder().getUrl().toString();
} catch (Exception e) {
repositoryRootUrl = null;
}
}
if ( null == status || !status.isManaged()
|| null == repositoryRootUrl
|| repositoryRootUrl.trim().isEmpty()) {
throw new ReviewboardException(
MessageFormat.format(RbSubclipseMessages.getString("ERROR_NOSVNPROPERTIES"),
new Object[]{ resource.getLocation().toString() }));