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


Java VcsException.getMessages方法代码示例

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


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

示例1: executeOperation

import com.intellij.openapi.vcs.VcsException; //导入方法依赖的package包/类
private AnnotateOperation executeOperation(File file, String revision, CvsEnvironment root, boolean binary, boolean retryOnFailure)
  throws VcsException {
  final AnnotateOperation operation = new AnnotateOperation(file, revision, root, binary);
  final CvsOperationExecutor executor = new CvsOperationExecutor(myProject);
  executor.performActionSync(new CommandCvsHandler(CvsBundle.getAnnotateOperationName(), operation), CvsOperationExecutorCallback.EMPTY);
  final CvsResult result = executor.getResult();
  if (result.hasErrors()) {
    if (!retryOnFailure) {
      throw result.composeError();
    }
    for (VcsException error : result.getErrors()) {
      for (String message : error.getMessages()) {
        if (message.contains(INVALID_OPTION_F) || message.contains(USAGE_CVSNTSRV_SERVER)) {
          ourDoNotAnnotateBinaryRoots.add(root.getCvsRootAsString());
          return executeOperation(file, revision, root, false, false);
        }
      }
    }
    throw result.composeError();
  }
  return operation;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CvsAnnotationProvider.java

示例2: stringifyErrors

import com.intellij.openapi.vcs.VcsException; //导入方法依赖的package包/类
/**
 * Splits the given VcsExceptions to one string. Exceptions are separated by <br/>
 * Line separator is also replaced by <br/>
 */
public static @NotNull String stringifyErrors(@Nullable Collection<VcsException> errors) {
  if (errors == null) {
    return "";
  }
  StringBuilder content = new StringBuilder();
  for (VcsException e : errors) {
    for (String message : e.getMessages()) {
      content.append(message.replace("\n", "<br/>")).append("<br/>");
    }
  }
  return content.toString();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GitUIUtil.java

示例3: run

import com.intellij.openapi.vcs.VcsException; //导入方法依赖的package包/类
public CvsResult run(Project project) {
  final CvsResult executionResult = internalRun(project);

  for (VcsException error : executionResult.getErrors()) {
    for (String message : error.getMessages()) {
      if (message.contains(INVALID_OPTION_S)) {
        disableSuppressEmptyHeadersForCurrentCvsRoot();
        // try only once
        return internalRun(project);
      }
    }
  }
  return executionResult;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:LoadHistoryOperation.java


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