Package com.intellij.openapi.vcs

Examples of com.intellij.openapi.vcs.VcsException


      }
      if (null != line) {
        String message = "unexpected command output {" + commandOutput + "}, expected nothing";
        LOGGER.error(message);
        //noinspection ThrowableInstanceNeverThrown
        errors.add(new VcsException(message));
      }
    } catch (IOException e) {
      //noinspection ThrowableInstanceNeverThrown
      errors.add(new VcsException(e));
    }
  }
View Full Code Here


        if (line == null || !line.startsWith(changePackage.getId())) {
          String message = "unexpected command error output {" + errorOutput + "}, expected {" +
              changePackage.getId() + "}";
          LOGGER.error(message);
          //noinspection ThrowableInstanceNeverThrown
          errors.add(new VcsException(message));
        }
        while (((line = reader.readLine()) != null) && shouldIgnore(line)) {
        }
        if (line != null) {
          String message = "unexpected command error output {" + errorOutput + "}, expected {" +
              changePackage.getId() + "}";
          LOGGER.error(message);
          //noinspection ThrowableInstanceNeverThrown
          errors.add(new VcsException(message));
        }
      } catch (IOException e) {
        //noinspection ThrowableInstanceNeverThrown
        errors.add(new VcsException(e));
      }
    } else {
      super.handleErrorOutput(errorOutput);
    }
  }
View Full Code Here

                tempSandboxes.add(sandbox);
            }
            sandboxesByPath.clear();
            result.addAll(tempSandboxes);
        } catch (APIException e) {
            errors.add(new VcsException(e));
        }
    }
View Full Code Here

                String port = workItem.getField("portnumber").getValueAsString();
                MksServerInfo server = new MksServerInfo(username, hostname, port);
                tempServers.add(server);
            }
        }  catch (APIException e) {
            errors.add(new VcsException(e));
        } finally {
            servers = tempServers;
        }
    }
View Full Code Here

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


            }
            changePackages = tempChangePackages;
        } catch (APIException e) {
            errors.add(new VcsException(e));
        }

/*
        try {
            Response response = getAPIHelper().getSICommands().getChangePackages(null);
View Full Code Here

                MksMemberState state = new MksMemberState(VcsRevisionNumber.NULL, VcsRevisionNumber.NULL, null,
                        MksMemberState.Status.UNVERSIONED);
                setState(item.getField("Absolute Path").getValueAsString(), state);
            }
        } catch (APIException e) {
            errors.add(new VcsException(e));
        }
    }
View Full Code Here

  public void execute() {
    try {
      executeCommand();
    } catch (IOException e) {
      //noinspection ThrowableInstanceNeverThrown
      errors.add(new VcsException(e));
      return;
    }
//      System.out.println("pattern [" + wholeLinePatternString + "]");
    Pattern wholeLinePattern = Pattern.compile(wholeLinePatternString);
    BufferedReader reader = new BufferedReader(new StringReader(commandOutput));
    String line;
    try {
      while ((line = reader.readLine()) != null) {
        Matcher matcher = wholeLinePattern.matcher(line);
        if (matcher.matches()) {
          String workingRev = matcher.group(WORKING_REV_GROUP_IDX);
          String memberRev = matcher.group(MEMBER_REV_GROUP_IDX);
          String workingCpid = matcher.group(WORKING_CPID_GROUP_IDX);
          String deferred = matcher.group(DEFERRED_GROUP_IDX);
          String type = matcher.group(TYPE_GROUP_IDX);
          String locker = matcher.group(LOCKER_GROUP_IDX);
          String name = matcher.group(NAME_GROUP_IDX);
          String lockedSandbox = matcher.group(LOCKED_SANDBOX_GROUP_IDX);
          try {
            if (isRelevant(type)) {
              MksMemberState memberState = createState(workingRev, memberRev, workingCpid, locker,
                  lockedSandbox, type, deferred);
              setState(name, memberState);
            } else {
              LOGGER.debug("ignoring " + line);
//            } else {
//              LOGGER.warn("unexpected type " + type + " for " + line);
            }
          } catch (VcsException e) {
            // should not happen, VcsExceptions on ChangePackageId
            if (e.getCause() != null) {
              LOGGER.error(e);
            }
            //noinspection ThrowableInstanceNeverThrown
            errors.add(new VcsException(name + " " + e.getMessage()));

          }
        } else {
          //noinspection ThrowableInstanceNeverThrown
          errors.add(new VcsException(toString() + " : unexpected line [" + line + "]"));
        }
      }
    } catch (IOException e) {
      // shouldnt happen :IO exceptions on stringReader.read
      //noinspection ThrowableInstanceNeverThrown
      errors.add(new VcsException(e));
    }

  }
View Full Code Here

            @Override
            public void executeCommand(@NotNull MksVcs mksVcs, @NotNull List<VcsException> exceptions, @NotNull VirtualFile[] affectedFiles) throws VcsException {
                try {
                    new MKSAPIHelper.SICommands(MKSAPIHelper.getInstance().getSession()).launchMKSGUI();
                } catch (APIException e) {
                    exceptions.add(new VcsException(e));
                }
            }

            @NotNull
            @Override
View Full Code Here

            runner.execute(command);
        } catch (APIException e) {
            final Project project = PlatformDataKeys.PROJECT.getData(anActionEvent.getDataContext());
            ArrayList<VcsException> errors = new ArrayList<VcsException>();
            //noinspection ThrowableInstanceNeverThrown
            errors.add(new VcsException(e));
            MksVcs.getInstance(project).showErrors(errors, MksBundle.message("action.mks.preferences"));
        }


    }
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.