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

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


      return;
    }

    JsonArray<PropertyDescriptor> properties = response.getProperties();
    for (int i = 0, n = properties.size(); i < n; ++i) {
      PropertyDescriptor property = properties.get(i);
      boolean isGetterOrSetter =
          (property.getGetterFunction() != null || property.getSetterFunction() != null);
      if (isGetterOrSetter) {
        if (property.getGetterFunction() != null) {
          RemoteObjectNode child = RemoteObjectNode.createGetterProperty(
              property.getName(), property.getGetterFunction());
          appendNewNode(parentNode, child);
        }
        if (property.getSetterFunction() != null) {
          RemoteObjectNode child = RemoteObjectNode.createSetterProperty(
              property.getName(), property.getSetterFunction());
          appendNewNode(parentNode, child);
        }
      } else if (property.getValue() != null) {
        RemoteObjectNode child =
            new RemoteObjectNode.Builder(property.getName(), property.getValue())
                .setWasThrown(property.wasThrown())
                .setDeletable(property.isConfigurable())
                .setWritable(property.isWritable())
                .setEnumerable(property.isEnumerable())
                .build();
        appendNewNode(parentNode, child);
      }
    }
View Full Code Here


    JsonArray<PropertyDescriptor> properties = parsedResponse.getProperties();
    assertNotNull(properties);
    assertEquals(2, properties.size());

    PropertyDescriptor propertyDescriptor = properties.get(0);
    assertNull(propertyDescriptor.getGetterFunction());
    assertNull(propertyDescriptor.getSetterFunction());
    assertEquals("msg", propertyDescriptor.getName());
    assertRemoteObject("onTimer callback", false, null, RemoteObjectType.STRING, null,
        propertyDescriptor.getValue());
    assertFalse(propertyDescriptor.wasThrown());

    propertyDescriptor = properties.get(1);
    assertNull(propertyDescriptor.getGetterFunction());
    assertNull(propertyDescriptor.getSetterFunction());
    assertEquals("logs", propertyDescriptor.getName());
    assertRemoteObject("HTMLDivElement", true, "{\"injectedScriptId\":1,\"id\":19}",
        RemoteObjectType.OBJECT, RemoteObjectSubType.NODE, propertyDescriptor.getValue());
    assertFalse(propertyDescriptor.wasThrown());
  }
View Full Code Here

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

    final RemoteObject remoteObject = parseRemoteObject((Jso) json.getObjectField("value"));
    final RemoteObject getter = parseRemoteObject((Jso) json.getObjectField("get"));
    final RemoteObject setter = parseRemoteObject((Jso) json.getObjectField("set"));

    return new PropertyDescriptor() {

      @Override
      public String getName() {
        return json.getStringField("name");
      }
View Full Code Here

TOP

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

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.