本文整理汇总了Java中org.tmatesoft.svn.core.SVNPropertyValue.getPropertyAsString方法的典型用法代码示例。如果您正苦于以下问题:Java SVNPropertyValue.getPropertyAsString方法的具体用法?Java SVNPropertyValue.getPropertyAsString怎么用?Java SVNPropertyValue.getPropertyAsString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tmatesoft.svn.core.SVNPropertyValue
的用法示例。
在下文中一共展示了SVNPropertyValue.getPropertyAsString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIgnoreStringsUnder
import org.tmatesoft.svn.core.SVNPropertyValue; //导入方法依赖的package包/类
@Nullable
public static Set<String> getIgnoreStringsUnder(final SvnVcs vcs, final VirtualFile dir) {
try {
final SVNPropertyData data = vcs.createWCClient().doGetProperty(new File(dir.getPath()), SvnPropertyKeys.SVN_IGNORE, SVNRevision.WORKING, SVNRevision.WORKING);
final SVNPropertyValue value = (data == null) ? null : data.getValue();
if (value != null) {
final Set<String> ignorePatterns = new HashSet<String>();
final String propAsString = SVNPropertyValue.getPropertyAsString(value);
final StringTokenizer st = new StringTokenizer(propAsString, "\r\n ");
while (st.hasMoreElements()) {
final String ignorePattern = (String) st.nextElement();
ignorePatterns.add(ignorePattern);
}
return ignorePatterns;
}
}
catch (SVNException e) {
LOG.info(e);
}
return null;
}
示例2: processFolder
import org.tmatesoft.svn.core.SVNPropertyValue; //导入方法依赖的package包/类
protected void processFolder(final VirtualFile folder, final File folderDir, final Set<String> data, final SVNPropertyValue propertyValue)
throws SVNException {
if (propertyValue == null) {
myFilesOk = false;
myExtensionOk = false;
return;
}
final Set<String> ignorePatterns = new HashSet<String>();
final StringTokenizer st = new StringTokenizer(SVNPropertyValue.getPropertyAsString(propertyValue), "\r\n ");
while (st.hasMoreElements()) {
final String ignorePattern = (String)st.nextElement();
ignorePatterns.add(ignorePattern);
}
myExtensionOk &= ignorePatterns.contains(myExtensionPattern);
for (final String fileName : data) {
if (!ignorePatterns.contains(fileName)) {
myFilesOk = false;
}
}
}
示例3: getNewPropertyValue
import org.tmatesoft.svn.core.SVNPropertyValue; //导入方法依赖的package包/类
protected String getNewPropertyValue(final Set<String> data, final SVNPropertyValue propertyValue) {
final String ignoreString;
if (data.size() == 1) {
ignoreString = data.iterator().next();
} else {
final StringBuilder sb = new StringBuilder();
for (final String name : data) {
sb.append(name).append('\n');
}
ignoreString = sb.toString();
}
return (propertyValue == null) ? ignoreString : (SVNPropertyValue.getPropertyAsString(propertyValue) + '\n' + ignoreString);
}