Package flash.tools.debugger

Examples of flash.tools.debugger.Variable


   */
  Value locateParentForNamed(long id, String name, boolean traverseProto) throws PlayerDebugException
  {
    StringBuilder sb = new StringBuilder();

    Variable var = null;
    Value val = null;
    try
    {
      var = memberNamed(id, name);

      // see if we need to traverse the proto chain
      while (var == null && traverseProto)
      {
        // first attempt to get __proto__, then resolve name
        Variable proto = memberNamed(id, "__proto__"); //$NON-NLS-1$
         sb.append("__proto__"); //$NON-NLS-1$
        if (proto == null)
          traverseProto = false;
        else
        {
          id = proto.getValue().getId();
          var = memberNamed(id, name);
          if (var == null)
            sb.append('.');
        }
      }
View Full Code Here


  }

  // 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

            validFrame = false;
        }
        else
    {
      Variable[] var = ctx.getArguments(m_session);
      Variable dis = ctx.getThis(m_session);
      boolean displayArgs = (func != null) || (var != null);

      sb.append('#');
      FieldFormat.formatLong(sb, i, 3);
      sb.append(' ');

      if (showThis && dis != null)
      {
        ExpressionCache.appendVariable(sb, dis);
        sb.append("."); //$NON-NLS-1$
      }

      if (func != null)
        sb.append(func);

      if (displayArgs)
      {
        sb.append('(');
        for (int j=0; j<var.length; j++)
        {
          Variable v = var[j];
          sb.append(v.getName());
          sb.append('=');
          ExpressionCache.appendVariableValue(sb, v.getValue());
          if ((j+1)<var.length)
            sb.append(", "); //$NON-NLS-1$
        }
        sb.append(")"); //$NON-NLS-1$
        sb.append(getLocalizationManager().getLocalizedTextString("atFilename")); //$NON-NLS-1$
View Full Code Here

    try
    {
      Variable[] vars = m_session.getVariableList();
      for(int i=0; i<vars.length; i++)
      {
        Variable v = vars[i];

        // all non-local and non-arg variables
        if ( !v.isAttributeSet(VariableAttribute.IS_LOCAL) &&
           !v.isAttributeSet(VariableAttribute.IS_ARGUMENT) )
        {
          ExpressionCache.appendVariable(sb, vars[i]);
          sb.append(m_newline);
        }
      }
View Full Code Here

      Frame ctx = ar[num];
      Variable[] vars = ctx.getLocals(m_session);

      for(int i=0; i<vars.length; i++)
      {
        Variable v = vars[i];

        // see if variable is local
        if ( v.isAttributeSet(VariableAttribute.IS_LOCAL) )
        {
          ExpressionCache.appendVariable(sb, v);
          sb.append(m_newline);
        }
      }
View Full Code Here

      Frame ctx = ar[num];
      Variable[] scopes = ctx.getScopeChain(m_session);

      for(int i=0; i<scopes.length; i++)
      {
        Variable scope = scopes[i];
        ExpressionCache.appendVariable(sb, scope);
        sb.append(m_newline);
      }
    }
    catch(NullPointerException npe)
View Full Code Here

      proto = null;

      // see if we find one called 'member'
      for(int i=0; i<members.length; i++)
      {
        Variable m = members[i];
        String memName = m.getName();
        if (memName.equals(member) && !tree.containsKey(m))
        {
          e.add(name);
          e.add(result);
          e.add(m);
          tree.put(m, name+"."+memName); //$NON-NLS-1$
          done = true;
        }
        else if (memName.equals("__proto__")) //$NON-NLS-1$
          proto = members[i].getValue();
      }
    }

    // now traverse other mcs recursively
    done = false;
    proto = result;
    while(!done && proto != null)
    {
      Variable[] members = proto.getMembers(m_session);
      proto = null;

      // see if we find an mc
      for(int i=0; i<members.length; i++)
      {
        Variable m = members[i];
        String memName = m.getName();

        // if our type is NOT object or movieclip then we are done
        if (m.getValue().getType() != VariableType.OBJECT && m.getValue().getType() != VariableType.MOVIECLIP)
          ;
        else if (m.getValue().getId() != Value.UNKNOWN_ID)
          dumpTree(tree, e, name, m.getValue(), member);
        else if (memName.equals("__proto__")) //$NON-NLS-1$
        {
          proto = m.getValue();
//          name = name + ".__proto__";
        }
      }
    }
  }
View Full Code Here

    // walk the list
    Iterator<Object> i = e.iterator();
    while(i.hasNext())
    {
      String name = (String) i.next();
      Variable key = (Variable) i.next();
      Variable val = (Variable)i.next();

//      sb.append(key);
//      sb.append(".");
//      sb.append(val.getName());
      if (fullName)
        sb.append(name);
      ExpressionCache.appendVariableValue(sb, key.getValue(), key.getName());
      sb.append("."); //$NON-NLS-1$
      sb.append(memName);
      sb.append(" = "); //$NON-NLS-1$
      ExpressionCache.appendVariableValue(sb, val.getValue(), val.getName());
      sb.append(m_newline);
    }
    return sb;
  }
View Full Code Here

      /* dump the output */
      StringBuilder sb = new StringBuilder();

      if (result instanceof Variable)
      {
        Variable v = (Variable) result;

        // if it has a path then display it!
        if (v.isAttributeSet(VariableAttribute.IS_LOCAL))
          s = getLocalizationManager().getLocalizedTextString("localVariable"); //$NON-NLS-1$
        else if (v.isAttributeSet(VariableAttribute.IS_ARGUMENT))
          s = getLocalizationManager().getLocalizedTextString("functionArgumentVariable"); //$NON-NLS-1$
        else if ( (v instanceof VariableFacade) && (s = ((VariableFacade)v).getPath()) != null && s.length() > 0 )
          ;
        else
          s = "_global"; //$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.