Examples of CallFrame


Examples of com.google.collide.client.code.debugging.DebuggerApiTypes.CallFrame

   *         script in a resource, served by the Collide server, or
   *         {@code null} if this script is served elsewhere, or is anonymous
   *         (result of an {@code eval()} call and etc.), or for other reasons
   */
  public PathUtil getActiveCallFramePath() {
    CallFrame callFrame = getActiveCallFrame();
    if (callFrame == null || callFrame.getLocation() == null) {
      return null;
    }

    Preconditions.checkNotNull(sourceMapping, "No source mapping!");
    Preconditions.checkNotNull(scriptParsedResponses, "No parsed scripts!");

    String scriptId = callFrame.getLocation().getScriptId();
    return sourceMapping.getLocalScriptPath(scriptParsedResponses.get(scriptId));
  }
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerApiTypes.CallFrame

    String scriptId = callFrame.getLocation().getScriptId();
    return sourceMapping.getLocalScriptPath(scriptParsedResponses.get(scriptId));
  }

  public int getActiveCallFrameExecutionLineNumber() {
    CallFrame callFrame = getActiveCallFrame();
    if (callFrame == null || callFrame.getLocation() == null) {
      return -1;
    }

    Preconditions.checkNotNull(sourceMapping, "No source mapping!");
    Preconditions.checkNotNull(scriptParsedResponses, "No parsed scripts!");

    String scriptId = callFrame.getLocation().getScriptId();
    return sourceMapping.getLocalSourceLineNumber(scriptParsedResponses.get(scriptId),
        callFrame.getLocation());
  }
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerApiTypes.CallFrame

  }

  void setRemoteObjectProperty(RemoteObjectId remoteObjectId, String propertyName,
      String propertyValueExpression) {
    if (active) {
      CallFrame callFrame = getActiveCallFrame();
      if (callFrame != null) {
        debuggerApi.setRemoteObjectPropertyEvaluatedOnCallFrame(
            sessionId, callFrame, remoteObjectId, propertyName, propertyValueExpression);
      } else {
        debuggerApi.setRemoteObjectProperty(
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerApiTypes.CallFrame

    }
  }

  private void sendEvaluateExpressionRequest(String expression) {
    if (active) {
      CallFrame callFrame = getActiveCallFrame();
      if (callFrame != null) {
        debuggerApi.evaluateExpressionOnCallFrame(sessionId, callFrame, expression);
      } else {
        debuggerApi.evaluateExpression(sessionId, expression);
      }
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerApiTypes.CallFrame

    if (debuggerState.isPaused()) {
      OnPausedResponse onPausedResponse = Preconditions.checkNotNull(
          debuggerState.getOnPausedResponse());
      JsonArray<CallFrame> callFrames = onPausedResponse.getCallFrames();
      for (int i = 0, n = callFrames.size(); i < n; ++i) {
        CallFrame callFrame = callFrames.get(i);
        Location location = callFrame.getLocation();
        OnScriptParsedResponse onScriptParsedResponse = debuggerState.getOnScriptParsedResponse(
            location.getScriptId());

        // TODO: What about i18n?
        String title = StringUtils.ensureNotEmpty(callFrame.getFunctionName(),
            "(anonymous function)");
        String subtitle = getShortenedScriptUrl(onScriptParsedResponse) + ":" +
            (location.getLineNumber() + 1);
        debuggingSidebar.addCallFrame(title, subtitle);
      }
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerApiTypes.CallFrame

      }
    }
  }

  void renderDebuggerCallFrame() {
    CallFrame callFrame = debuggerState.getActiveCallFrame();
    if (callFrame == null) {
      // Debugger is not paused. Remove the previous scope tree UI.
      debuggingSidebar.setScopeVariablesRootNodes(null);
      debuggingSidebar.refreshWatchExpressions();
      return;
    }

    // Render the Scope Variables pane.
    JsonArray<RemoteObjectNode> rootNodes = JsonCollections.createArray();

    JsonArray<Scope> scopeChain = callFrame.getScopeChain();
    for (int i = 0, n = scopeChain.size(); i < n; ++i) {
      Scope scope = scopeChain.get(i);
      String name = StringUtils.capitalizeFirstLetter(scope.getType().toString());
      RemoteObject remoteObject = scope.getObject();

      RemoteObjectNode.Builder scopeNodeBuilder = new RemoteObjectNode.Builder(name, remoteObject)
          .setOrderIndex(i)
          .setWritable(false)
          .setDeletable(false)
          .setTransient(scope.isTransient());

      // Append the call frame "this" object to the top scope.
      if (i == 0 && callFrame.getThis() != null) {
        RemoteObjectNode thisNode = new RemoteObjectNode.Builder("this", callFrame.getThis())
            .setWritable(false)
            .setDeletable(false)
            .build();
        RemoteObjectNode scopeNode = scopeNodeBuilder
            .setHasChildren(true) // At least will contain the "this" child.
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerApiTypes.CallFrame

  private static JsonArray<CallFrame> parseCallFramesArray(JsonArray<JsonObject> jsonArray) {
    JsonArray<CallFrame> result = JsonCollections.createArray();
    if (jsonArray != null) {
      for (int i = 0, n = jsonArray.size(); i < n; ++i) {
        CallFrame callFrame = parseCallFrame((Jso) jsonArray.get(i));
        if (callFrame != null) {
          result.add(callFrame);
        }
      }
    }
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerApiTypes.CallFrame

    final String callFrameId = json.getStringField("callFrameId");
    final Location location = parseLocation((Jso) json.getObjectField("location"));
    final JsonArray<Scope> scopeChain = parseScopeChain(json.getArrayField("scopeChain"));
    final RemoteObject thisObject = parseRemoteObject((Jso) json.getObjectField("this"));

    return new CallFrame() {

      @Override
      public String getFunctionName() {
        return functionName;
      }
View Full Code Here

Examples of org.apache.cocoon.callstack.CallFrame

        protected abstract Enumeration namesOf(HttpServletRequest request);

        public Enumeration getNames() {
            Set names = new HashSet();
            for (int i = 0; i < CallStack.size(); i++) {
                CallFrame frame = CallStack.frameAt(i);
                HttpServletRequest request = (HttpServletRequest) frame.getAttribute(CallFrameHelper.REQUEST_OBJECT);
                if (request instanceof ServletServiceRequest) {
                    names.addAll(this.values.keySet());
                } else {
                    for (Enumeration enumeration = this.namesOf(request); enumeration.hasMoreElements();) {
                        names.add(enumeration.nextElement());
View Full Code Here

Examples of org.apache.cocoon.callstack.CallFrame

        }

        public Map getValues() {
            Map result = new HashMap();
            for (int i = 0; i < CallStack.size(); i++) {
                CallFrame frame = CallStack.frameAt(i);
                HttpServletRequest request = (HttpServletRequest) frame.getAttribute(CallFrameHelper.REQUEST_OBJECT);
                if (request instanceof ServletServiceRequest) {
                    result.putAll(this.values);
                } else {
                    result.putAll(request.getParameterMap());
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.