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


Java SVNWCClient.setEventHandler方法代码示例

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


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

示例1: add

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
/**
 * TODO: Implement correct support for includeIgnored parameter. Also check that correct depth will be used for all cases (when another
 * TODO: overload of doAdd() is used) as, for instance, SVNDepth.recurseFromDepth(EMPTY) = false, SVNDepth.fromRecursive(false) = FILES.
 */
@Override
public void add(@NotNull File file,
                @Nullable Depth depth,
                boolean makeParents,
                boolean includeIgnored,
                boolean force,
                @Nullable ProgressTracker handler) throws VcsException {
  try {
    SVNWCClient client = myVcs.getSvnKitManager().createWCClient();

    client.setEventHandler(toEventHandler(handler));
    client.doAdd(file, force,
                 false, // directory should already be created
                 makeParents, // not used but will be passed as makeParents value
                 Depth.isRecursive(depth));
  }
  catch (SVNException e) {
    throw new VcsException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:SvnKitAddClient.java

示例2: upgrade

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
@Override
public void upgrade(@NotNull File path, @NotNull WorkingCopyFormat format, @Nullable ProgressTracker handler) throws VcsException {
  validateFormat(format, getSupportedFormats());

  SVNWCClient client = myVcs.getSvnKitManager().createWCClient();

  client.setEventHandler(toEventHandler(handler));
  try {
    cleanupIfNecessary(path, format, client, handler);
    upgrade(path, format, client, handler);
  }
  catch (SVNException e) {
    throw new SvnBindException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:SvnKitUpgradeClient.java

示例3: revert

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
@Override
public void revert(@NotNull Collection<File> paths, @Nullable Depth depth, @Nullable ProgressTracker handler) throws VcsException {
  SVNWCClient client = myVcs.getSvnKitManager().createWCClient();

  client.setEventHandler(toEventHandler(handler));
  try {
    client.doRevert(ArrayUtil.toObjectArray(paths, File.class), toDepth(depth), null);
  }
  catch (SVNException e) {
    throw new VcsException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SvnKitRevertClient.java

示例4: delete

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
@Override
public void delete(@NotNull File path, boolean force, boolean dryRun, @Nullable ProgressTracker handler) throws VcsException {
  SVNWCClient client = myVcs.getSvnKitManager().createWCClient();
  client.setEventHandler(toEventHandler(handler));

  try {
    client.doDelete(path, force, dryRun);
  }
  catch (SVNException e) {
    throw new VcsException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SvnKitDeleteClient.java

示例5: cleanup

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
@Override
public void cleanup(@NotNull File path, @Nullable ProgressTracker handler) throws VcsException {
  SVNWCClient client = myVcs.getSvnKitManager().createWCClient();

  client.setEventHandler(toEventHandler(handler));
  try {
    client.doCleanup(path);
  }
  catch (SVNException e) {
    throw new SvnBindException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SvnKitCleanupClient.java

示例6: getClient

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
@NotNull
private SVNWCClient getClient(@Nullable ProgressTracker handler) {
  SVNWCClient client = myVcs.getSvnKitManager().createWCClient();

  client.setEventHandler(toEventHandler(handler));

  return client;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:SvnKitLockClient.java

示例7: run

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public void run(@NotNull final ProgressIndicator indicator) {
  ProjectLevelVcsManager.getInstanceChecked(myProject).startBackgroundVcsOperation();
  indicator.setIndeterminate(true);
  final boolean supportsChangelists = myNewFormat.supportsChangelists();
  if (supportsChangelists) {
    myBeforeChangeLists = ChangeListManager.getInstance(myProject).getChangeListsCopy();
  }
  final SVNWCClient wcClient = myVcs.createWCClient();
  wcClient.setEventHandler(new ISVNEventHandler() {
    @Override
    public void handleEvent(SVNEvent event, double progress) throws SVNException {
      if (SVNEventAction.UPGRADED_PATH.equals(event.getAction()) && event.getFile() != null) {
        indicator.setText2("Upgraded path " + VcsUtil.getPathForProgressPresentation(event.getFile()));
      }
    }

    @Override
    public void checkCancelled() throws SVNCancelException {
      indicator.checkCanceled();
    }
  });
  try {
    for (WCInfo wcInfo : myWcInfos) {
      File path = new File(wcInfo.getPath());
      if (! wcInfo.isIsWcRoot()) {
        path = SvnUtil.getWorkingCopyRoot(path);
      }
      try {
        if (WorkingCopyFormat.ONE_DOT_SEVEN.equals(myNewFormat)) {
          indicator.setText(SvnBundle.message("action.Subversion.cleanup.progress.text", path.getAbsolutePath()));
          wcClient.doCleanup(path);
        }
        indicator.setText(SvnBundle.message("action.change.wcopy.format.task.progress.text", path.getAbsolutePath(),
                                            SvnUtil.formatRepresentation(wcInfo.getFormat()), SvnUtil.formatRepresentation(myNewFormat)));
        wcClient.doSetWCFormat(path, myNewFormat.getFormat());
      } catch (Throwable e) {
        myExceptions.add(e);
      }
    }
  }
  finally {
    ProjectLevelVcsManager.getInstance(myProject).stopBackgroundVcsOperation();

    // to map to native
    if (supportsChangelists) {
      SvnVcs.getInstance(myProject).processChangeLists(myBeforeChangeLists);
    }

    ApplicationManager.getApplication().getMessageBus().syncPublisher(SvnVcs.WC_CONVERTED).run();
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:52,代码来源:SvnFormatWorker.java


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