Package com.google.collide.client.code.debugging.DebuggerApiTypes

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


      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


  public void testUpdateBreakpoint() {
    doRunDebugger();
    BreakpointInfoImpl breakpointInfo = doSetBreakpoint();

    JsonArray<Location> locations = JsonCollections.createArray();
    final Location location1 = createLocation(1, 10, "source_id_1");
    final Location location2 = createLocation(2, 20, "source_id_2");
    locations.add(location1);
    locations.add(location2);
    debuggerApiStub.dispatchOnBreakpointResolvedEvent(SESSION_ID, breakpointInfo, locations);

    assertEquals(2, breakpointInfo.getLocations().size());
    assertEquals(location1, breakpointInfo.getLocations().get(0));
    assertEquals(location2, breakpointInfo.getLocations().get(1));

    // Update with no breakpointInfo.
    locations = JsonCollections.createArray();
    final Location location3 = createLocation(3, 30, "source_id_3");
    locations.add(location3);
    debuggerApiStub.dispatchOnBreakpointResolvedEvent(SESSION_ID, null,
        breakpointInfo.getBreakpointId(), locations);

    assertEquals(3, breakpointInfo.getLocations().size());
View Full Code Here

        .build();
  }

  private Location createLocation(final int lineNumber, final int columnNumber,
      final String scriptId) {
    return new Location() {

      @Override
      public int getColumnNumber() {
        return columnNumber;
      }
View Full Code Here

      return null;
    }

    final String functionName = json.getStringField("functionName");
    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() {
View Full Code Here

  private static Location parseLocation(final Jso json) {
    if (json == null) {
      return null;
    }

    return new Location() {

      @Override
      public int getColumnNumber() {
        return json.getFieldCastedToInteger("columnNumber");
      }
View Full Code Here

  private static JsonArray<Location> parseBreakpointLocations(Jso json) {
    JsonArray<Location> result = JsonCollections.createArray();

    if (json != null) {
      // Debugger.breakpointResolved response.
      Location location = parseLocation((Jso) json.getObjectField("location"));
      if (location != null) {
        result.add(location);
      }

      // Debugger.setBreakpointByUrl response.
View Full Code Here

TOP

Related Classes of com.google.collide.client.code.debugging.DebuggerApiTypes.Location

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.