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


Java SVNPropertyValue.getPropertyAsString方法代码示例

本文整理汇总了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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:SvnPropertyService.java

示例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;
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:SvnPropertyService.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:SvnPropertyService.java


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