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


Java SVNWCClient.doSetProperty方法代码示例

本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNWCClient.doSetProperty方法的典型用法代码示例。如果您正苦于以下问题:Java SVNWCClient.doSetProperty方法的具体用法?Java SVNWCClient.doSetProperty怎么用?Java SVNWCClient.doSetProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.tmatesoft.svn.core.wc.SVNWCClient的用法示例。


在下文中一共展示了SVNWCClient.doSetProperty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: actionPerformed

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent e) {
  Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext());
  SVNWCClient wcClient = myVcs.createWCClient();
  SVNPropertyData propValue = null;
  try {
    propValue = wcClient.doGetProperty(myFile, SVNProperty.KEYWORDS, SVNRevision.UNDEFINED, SVNRevision.WORKING);
  } catch (SVNException e1) {
    // show error message
  }
  
  SetKeywordsDialog dialog = new SetKeywordsDialog(project,
                                                   propValue != null ? SVNPropertyValue.getPropertyAsString(propValue.getValue()) : null);
  dialog.show();
  if (dialog.isOK()) {
    String value = dialog.getKeywords();
    try {
      wcClient.doSetProperty(myFile, SVNProperty.KEYWORDS, SVNPropertyValue.create(value), false, false, null);
    }
    catch (SVNException err) {
      // show error message
      VcsBalloonProblemNotifier.showOverChangesView(myVcs.getProject(), "Can not set property: " + err.getMessage(), MessageType.ERROR);
    }
  }
  setFile(myVcs, myFile);
  updateFileStatus(false);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:PropertiesComponent.java

示例2: setProperty

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private void setProperty(final File file, final String name, final String value) throws SVNException {
  final SVNWCClient client = myVcs.getSvnKitManager().createWCClient();
  client.doSetProperty(file, new ISVNPropertyValueProvider() {
    @Override
    public SVNProperties providePropertyValues(File path, SVNProperties properties) throws SVNException {
      final SVNProperties result = new SVNProperties();
      result.put(name, SVNPropertyValue.create(value));
      return result;
    }
  }, true, SVNDepth.EMPTY, null, null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:SvnRollbackTest.java

示例3: setIgnores

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public static void setIgnores(final SvnVcs vcs, final Collection<String> patterns, final File file)
  throws SVNException {
  final SVNWCClient client = vcs.createWCClient();
  final StringBuilder sb = new StringBuilder();
  for (String pattern : patterns) {
    sb.append(pattern).append('\n');
  }
  if (! patterns.isEmpty()) {
    final String value = sb.toString();
    client.doSetProperty(file, SvnPropertyKeys.SVN_IGNORE, SVNPropertyValue.create(value), false, SVNDepth.EMPTY, null, null);
  } else {
    client.doSetProperty(file, SvnPropertyKeys.SVN_IGNORE, null, false, SVNDepth.EMPTY, null, null);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:SvnPropertyService.java

示例4: batchPerform

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
protected void batchPerform(Project project, SvnVcs activeVcs, VirtualFile[] file, DataContext context)
  throws VcsException {
  File[] ioFiles = new File[file.length];
  for (int i = 0; i < ioFiles.length; i++) {
    ioFiles[i] = new File(file[i].getPath());
  }

  SetPropertyDialog dialog = new SetPropertyDialog(project, ioFiles, null, true);
  dialog.show();

  if (dialog.isOK()) {
    String name = dialog.getPropertyName();
    String value = dialog.getPropertyValue();
    boolean recursive = dialog.isRecursive();

    SVNWCClient wcClient = activeVcs.createWCClient();
    for (int i = 0; i < ioFiles.length; i++) {
      File ioFile = ioFiles[i];
      try {
        wcClient.doSetProperty(ioFile, name, SVNPropertyValue.create(value), false, recursive, null);
      }
      catch (SVNException e) {
        throw new VcsException(e);
      }
    }
    for(int i = 0; i < file.length; i++) {
      if (recursive && file[i].isDirectory()) {
        VcsDirtyScopeManager.getInstance(project).dirDirtyRecursively(file[i], true);
      } else {
        VcsDirtyScopeManager.getInstance(project).fileDirty(file[i]);
      }
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:35,代码来源:SetPropertyAction.java

示例5: setProperty

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private void setProperty(final File file, final String name, final String value) throws SVNException {
  final SVNWCClient client = myVcs.createWCClient();
  client.doSetProperty(file, new ISVNPropertyValueProvider() {
    @Override
    public SVNProperties providePropertyValues(File path, SVNProperties properties) throws SVNException {
      final SVNProperties result = new SVNProperties();
      result.put(name, SVNPropertyValue.create(value));
      return result;
    }
  }, true, SVNDepth.EMPTY, null, null);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:SvnRollbackTest.java


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