Package flash.tools.debugger

Examples of flash.tools.debugger.Variable


  }

  // variant of locateParentForNamed, whereby we return the child variable
  Variable locateForNamed(long id, String name, boolean traverseProto) throws PlayerDebugException
  {
    Variable var = null;
    Value v = locateParentForNamed(id, name, traverseProto);
    if (v != null)
    {
      try
      {
View Full Code Here


    {
      Value previousParent = ((PlayerSession)s).getPreviousValue(m_nonProtoParentId, m_isolateId);
      if (previousParent != null)
      {
        try {
          Variable previousMember = previousParent.getMemberNamed(null, getName());
          // If the old variable had a getter but never invoked that getter,
          // then it's too late, we don't know the old value.
          if (previousMember instanceof DVariable && !previousMember.needsToInvokeGetter())
          {
            Value previousValue = ((DVariable)previousMember).m_value;
            if (previousValue != null)
            {
              String previousValueAsString = previousValue.getValueAsString();
View Full Code Here

  /**
   * Comparator interface for sorting Variables
   */
  public int compareTo(Object o2)
  {
    Variable v2 = (Variable)o2;

    String n1 = getName();
    String n2 = v2.getName();
   
    return String.CASE_INSENSITIVE_ORDER.compare(n1, n2);
  }
View Full Code Here

    {
      Value previousParent = ((PlayerSession)s).getPreviousValue(m_nonProtoParentId);
      if (previousParent != null)
      {
        try {
          Variable previousMember = previousParent.getMemberNamed(null, getName());
          // If the old variable had a getter but never invoked that getter,
          // then it's too late, we don't know the old value.
          if (previousMember instanceof DVariable && !previousMember.needsToInvokeGetter())
          {
            Value previousValue = ((DVariable)previousMember).m_value;
            if (previousValue != null)
            {
              String previousValueAsString = previousValue.getValueAsString();
View Full Code Here

  /**
   * Comparator interface for sorting Variables
   */
  public int compareTo(Object o2)
  {
    Variable v2 = (Variable)o2;

    String n1 = getName();
    String n2 = v2.getName();

    return String.CASE_INSENSITIVE_ORDER.compare(n1, n2);
  }
View Full Code Here

      }
      else
      {
        boolean wasCreateIfMissing = m_createIfMissing;
        createPseudoVariables(true);
        Variable var = null;
        try {
          var = resolveToVariable(o);
        } finally {
          createPseudoVariables(wasCreateIfMissing);
        }

        if (var == null)
          throw new NoSuchVariableException((var == null) ? m_current : var.getName());

        // set the value, for the case of a variable that does not exist it will not have a type
        // so we try to glean one from v.
        FaultEvent faultEvent = var.setValue(getSession(), v.getType(), v.getValueAsString());
        if (faultEvent != null)
          throw new PlayerFaultException(faultEvent);
      }
    }
    catch(PlayerDebugException pde)
View Full Code Here

  }

  /* returns a string consisting of formatted member names and values */
  public Object lookupMembers(Object o) throws NoSuchVariableException
  {
    Variable var = null;
    Value val = null;
      Variable[] mems = null;
    try
    {
      var = resolveToVariable(o);
      if (var != null)
        val = var.getValue();
      else
        val = resolveToValue(o);
      mems = val.getMembers(getSession());
    }
    catch(NullPointerException npe)
View Full Code Here

   * using the current context.
   * @return variable, or <code>null</code>
   */
  Variable resolveToVariable(Object o) throws PlayerDebugException
  {
    Variable v = null;

    // if o is a variable already, then we're done!
    if (o instanceof Variable)
      return (Variable)o;

View Full Code Here

   * name.
   * @throws NoSuchVariableException if id is UNKNOWN_ID
   */
  Variable memberNamed(long id, String name) throws NoSuchVariableException, PlayerDebugException
  {
    Variable v = null;
    Value parent = getSession().getValue(id);

    if (parent == null)
      throw new NoSuchVariableException(name);

View Full Code Here

      long baseId = Value.BASE_ID;
      int depth = ((Integer)m_cache.get(DebugCLI.DISPLAY_FRAME_NUMBER)).intValue();
      baseId -= depth;

      // obtain data about our current state
      Variable contextVar = null;
      Value contextVal = null;
      Value val = null;

      // look for 'name' starting from local scope
      if ( (val = locateParentForNamed(baseId, name, false)) != null)
        ;

      // get the this pointer, then look for 'name' starting from that point
      else if ( ( (contextVar = locateForNamed(baseId, "this", false)) != null ) &&  //$NON-NLS-1$
            ( setName("this") && (val = locateParentForNamed(contextVar.getValue().getId(), name, true)) != null ) ) //$NON-NLS-1$
        ;

      // now try to see if 'name' exists off of _root
      else if ( setName("_root") && (val = locateParentForNamed(Value.ROOT_ID, name, true)) != null ) //$NON-NLS-1$
        ;
View Full Code Here

TOP

Related Classes of flash.tools.debugger.Variable

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.