Package org.eclipse.php.debug.core.debugger.messages

Examples of org.eclipse.php.debug.core.debugger.messages.IDebugResponseMessage


          byteArrayOutputStream.writeTo(connectionOut);
          connectionOut.flush();
        }
      }

      IDebugResponseMessage response = null;
      int timeoutTick = 500; // 0.5 of second
      int waitedTime = 0;
      while (response == null && isConnected()) {
        synchronized (request) {
          response = (IDebugResponseMessage) responseTable
View Full Code Here


                  messageHandler.handle(newInputMessage,
                      debugTarget);

                  if (messageHandler instanceof IDebugRequestHandler) {
                    // create response
                    IDebugResponseMessage response = ((IDebugRequestHandler) messageHandler)
                        .getResponseMessage();

                    // send response
                    byteArray.reset();
                    response.serialize(outArray);

                    synchronized (out) {
                      out.writeInt(byteArray.size());
                      byteArray.writeTo(out);
                      out.flush();
                    }
                  }
                } else if (newInputMessage instanceof IDebugResponseMessage) {
                  IDebugResponseMessage r = (IDebugResponseMessage) newInputMessage;
                  int requestId = r.getID(); // take the
                                // request ID
                                // from the
                                // response.
                  IDebugRequestMessage req = (IDebugRequestMessage) requestsTable
                      .remove(requestId); // find the
View Full Code Here

   * @return current working directory, or <code>null</code> in case of error
   */
  public String getCWDOld() {
    EvalRequest request = new EvalRequest();
    request.setCommand("getcwd()"); //$NON-NLS-1$
    IDebugResponseMessage response = sendCustomRequest(request);
    if (response != null && response instanceof EvalResponse) {
      String result = ((EvalResponse) response).getResult();
      if (!EVAL_ERROR.equals(result)) {
        return result;
      }
View Full Code Here

   *
   * @return current working directory, or <code>null</code> in case of error
   */
  public String getCWDNew() {
    GetCWDRequest request = new GetCWDRequest();
    IDebugResponseMessage response = sendCustomRequest(request);
    if (response != null && response.getStatus() == 0) {
      return ((GetCWDResponse) response).getCWD();
    }
    return null;
  }
View Full Code Here

   */
  public boolean setCurrentWorkingDirectory(String cwd) {
    try {
      EvalRequest request = new EvalRequest();
      request.setCommand(String.format("chdir('%1$s')", cwd)); //$NON-NLS-1$
      IDebugResponseMessage response = sendCustomRequest(request);
      if (response != null && response instanceof EvalResponse) {
        String result = ((EvalResponse) response).getResult();
        if (!EVAL_ERROR.equals(result)) {
          return true;
        }
View Full Code Here

   * @param message
   *            request that will be sent to the debugger
   * @return message response recieved from the debugger
   */
  public IDebugResponseMessage sendCustomRequest(IDebugRequestMessage request) {
    IDebugResponseMessage response = null;
    if (this.isActive()) {
      try {
        Object obj = connection.sendRequest(request);
        if (obj instanceof IDebugResponseMessage) {
          response = (IDebugResponseMessage) obj;
View Full Code Here

  }

  public boolean setProtocol(int protocolID) {
    SetProtocolRequest request = new SetProtocolRequest();
    request.setProtocolID(protocolID);
    IDebugResponseMessage response = sendCustomRequest(request);
    if (response != null && response instanceof SetProtocolResponse) {
      int responceProtocolID = ((SetProtocolResponse) response)
          .getProtocolID();
      if (responceProtocolID == protocolID) {
        currentProtocolId = protocolID;
View Full Code Here

TOP

Related Classes of org.eclipse.php.debug.core.debugger.messages.IDebugResponseMessage

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.