Package com.intellij.openapi.vcs

Examples of com.intellij.openapi.vcs.VcsException


    public void execute() {
        try {
            executeCommand();
        } catch (IOException e) {
            //noinspection ThrowableInstanceNeverThrown
            errors.add(new VcsException(e));
        }
    }
View Full Code Here


        String[] parts = line.split(LINE_SEPARATOR);
        if (parts.length < 2) {
          LOGGER.error("unexpected command output {" + line + "}, expected 2 parts separated by [" +
              LINE_SEPARATOR + "]", "");
          //noinspection ThrowableInstanceNeverThrown
          errors.add(new VcsException("ListSandboxes : unexpected line structure " + line));
        } else {
          tempSandboxes.add(parts[0]);
        }
      }
      sandboxes = tempSandboxes;
    } catch (IOException e) {
      //noinspection ThrowableInstanceNeverThrown
      errors.add(new VcsException(e));
    }
  }
View Full Code Here

      if (isDropped(type)) {
        return new MksMemberState(null, (MksRevisionNumber.createRevision(memberRev)), workingCpid,
            MksMemberState.Status.DROPPED);
      } else {
        LOGGER.warn("unexpected ! ");
        throw new VcsException("expected only deferred-drops as deferred");
      }
    } else {
      if (workingRev == null && "archived".equals(type)) {
        return new MksMemberState(null, (MksRevisionNumber.createRevision(memberRev)), workingCpid,
            MksMemberState.Status.REMOTELY_ADDED);
      } else if (workingRev != null && memberRev != null) {
        return new MksMemberState((MksRevisionNumber.createRevision(workingRev)),
            (MksRevisionNumber.createRevision(memberRev)), workingCpid,
            MksMemberState.Status.SYNC);
      } else if (isDropped(type) && workingRev != null) {
        return new MksMemberState((MksRevisionNumber.createRevision(workingRev)),
            (MksRevisionNumber.createRevision(memberRev)), workingCpid,
            MksMemberState.Status.REMOTELY_DROPPED);
      } else {
        LOGGER.warn("unexpected ! ");
        throw new VcsException("unexpected");
      }

    }
  }
View Full Code Here

  public void execute() {
    try {
      executeCommand();
    } catch (IOException e) {
      //noinspection ThrowableInstanceNeverThrown
      errors.add(new VcsException(e));
    }
  }
View Full Code Here

  public String getContent() throws VcsException {
    if (foundError()) {
      for (VcsException vcsException : errors.subList(previousErrorCount, errors.size())) {
        LOGGER.error(vcsException);
      }
      throw new VcsException(errors.get(previousErrorCount));
    } else {
      return commandOutput;
    }
  }
View Full Code Here

            command.addOption(new Option("gui"));
            runner.execute(command);
        } catch (APIException e) {
            ArrayList<VcsException> errors = new ArrayList<VcsException>();
            //noinspection ThrowableInstanceNeverThrown
            errors.add(new VcsException(e));
            MksVcs.getInstance(mksVcs.getProject()).showErrors(errors, "About MKS");
        }
    }
View Full Code Here

  public void execute() {
    try {
      executeCommand();
    } catch (IOException e) {
      //noinspection ThrowableInstanceNeverThrown
      errors.add(new VcsException(e));
      return;
    }
    BufferedReader reader = new BufferedReader(new StringReader(commandOutput));
    String line;
    try {
      while ((line = reader.readLine()) != null) {
        Matcher matcher = pattern.matcher(line);
        if (!matcher.matches()) {
          LOGGER.error(
              "unexpected command output {" + line + "}, expected something matching " + patternString,
              "");
          // ignoring line
        } else {
          String sandboxPath = matcher.group(SANDBOX_PATH_GROUP_IDX);
          String projectPath = matcher.group(PROJECT_PATH_GROUP_IDX);
          String projectType = matcher.group(PROJECT_TYPE_GROUP_IDX);
          String projectVersion = matcher.group(PROJECT_VERSION_GROUP_IDX);
          String serverHostAndPort = matcher.group(SERVER_GROUP_IDX);
          final SandboxInfo info =
              resolveSandbox(sandboxPath, serverHostAndPort, projectPath, projectVersion);
          result.add(info);
        }
      }
    } catch (IOException e) {
      LOGGER.error("error reading output " + commandOutput, e);
      //noinspection ThrowableInstanceNeverThrown
      errors.add(new VcsException(e));
    }

  }
View Full Code Here

                MksMemberState memberState = createState(item);
                setState(memberName, memberState);
            }
        } catch (APIException e) {
            errors.add(new VcsException(e));
        } catch (VcsException e) {
            errors.add(new VcsException(e));
        }

    }
View Full Code Here

                debug(sandboxWorkItem, sandboxName);

            }
      sandboxes = tempSandboxes;
    } catch (APIException e) {
            errors.add(new VcsException(e));
        }
    }
View Full Code Here

    @Override
    public void execute() {
        try {
            getAPIHelper().getSICommands().siChangePackageView(changePackage.getId());
        } catch (APIException e) {
            errors.add(new VcsException(e));
        }
    }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.vcs.VcsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.