Package flash.tools.debugger

Examples of flash.tools.debugger.Value


   * @param o
   *            the value to format.
   */
  public void appendVariableValue(StringBuilder sb, final Object o, final int isolateId)
  {
    Value v;

    if (o instanceof Value) {
      v = (Value) o;
    } else {
      v = new Value() {
        public int getAttributes() {
          return 0;
        }

        public String[] getClassHierarchy(boolean allLevels) {
View Full Code Here


      String name = (cli.hasMoreTokens()) ? cli.nextToken() : null;

      StringBuilder sb = new StringBuilder();
      sb.append(name);
      sb.append(" = "); //$NON-NLS-1$
      Value v = ((PlayerSession)session).getValue(id, name, isolateId);
            cli.m_exprCache.appendVariableValue(sb, v, isolateId);
      cli.out( sb.toString() );
    }
    catch(NullPointerException npe)
    {
View Full Code Here

  public boolean hasValueChanged(Session s)
  {
    boolean hasValueChanged = false;
    if (s instanceof PlayerSession)
    {
      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();
              if (previousValueAsString != null)
              {
                if (!previousValueAsString.equals(getValue().getValueAsString()))
                {
                  hasValueChanged = true;
View Full Code Here

        int oldInvokeGetters = playerSession.getPreference(SessionManager.PREF_INVOKE_GETTERS);
        playerSession.setPreference(SessionManager.PREF_INVOKE_GETTERS, 1);

        try {
          // fire the getter using the original object id. make sure we get something reasonable back
          Value v = playerSession.getValue(m_nonProtoParentId, getRawName(), m_isolateId);
          if (v != null)
          {
            m_value = v;
            m_firedGetter = true;
            if (m_value instanceof DValue)
View Full Code Here

        optionalPreferredType = PreferredType.NUMBER;
    }

    if (optionalPreferredType == PreferredType.NUMBER)
    {
      Value result = callValueOf(session, v, isolateId);
      if (isPrimitive(result))
        return result;
      result = callToString(session, v, isolateId);
      if (isPrimitive(result))
        return result;
      throw new RuntimeException(new PlayerFaultException(new ExceptionFault(ASTBuilder.getLocalizationManager().getLocalizedTextString("typeError"), false, null, isolateId))); //$NON-NLS-1$
    }
    else
    {
      Value result = callToString(session, v, isolateId);
      if (isPrimitive(result))
        return result;
      result = callValueOf(session, v, isolateId);
      if (isPrimitive(result))
        return result;
View Full Code Here

  /** ECMA 11.8.5.  Returns true, false, or undefined. */
  public static Value lessThan(Session session, Value x, Value y)
  {
    x = safeValue(x, Isolate.DEFAULT_ID);
    y = safeValue(y, Isolate.DEFAULT_ID);
    Value px = toPrimitive(session, x, PreferredType.NUMBER, x.getIsolateId());
    Value py = toPrimitive(session, y, PreferredType.NUMBER, y.getIsolateId());
    if (px.getType() == VariableType.STRING
        && py.getType() == VariableType.STRING)
    {
      String sx = px.getValueAsString();
      String sy = py.getValueAsString();
      return DValue.forPrimitive(new Boolean(sx.compareTo(sy) < 0), x.getIsolateId());
    }
    else
    {
      double dx = toNumber(session, px);
View Full Code Here

    getValue(Value.THIS_ID);
    getValue(Value.ROOT_ID);

    // request as many levels as we can get
    int i = 0;
    Value v = null;
    do
    {
      v = getValue(Value.LEVEL_ID-i);
    }
    while( i++ < 128 && v != null);

    // now that we've primed the DManager we can request the base variable whose
    // children are the variables that are available
    v = m_manager.getValue(Value.BASE_ID);
    if (v == null)
      throw new VersionException();
    return v.getMembers(this);
  }
View Full Code Here

    }
  }

  public Value getGlobal(String name) throws NotSuspendedException, NoResponseException, NotConnectedException
  {
    Value v = getValue(0, name);

    if (v==null || v.getType() == VariableType.UNDEFINED)
      return null;
    else
      return v;
  }
View Full Code Here

   * paragraph was written for AS2; __proto__ doesn't exist
   * in AS3.  TODO: revise this paragraph]
   */
  public Value getValue(long varId, String name) throws NotSuspendedException, NoResponseException, NotConnectedException
  {
    Value v = null;
    if (isSuspended())
    {
      int fireGetter = getPreference(SessionManager.PREF_INVOKE_GETTERS);

      // disable children attaching to parent variables and clear our
View Full Code Here

  /*
   * @see flash.tools.debugger.Session#callFunction(flash.tools.debugger.Value, java.lang.String, flash.tools.debugger.Value[])
   */
  public Value callFunction(Value thisValue, String funcname, Value[] args) throws PlayerDebugException
  {
    Value retval = callPseudoFunction(thisValue, funcname, args);
    if (retval != null) {
      return retval;
    }

    return callFunction(thisValue, false, funcname, args);
View Full Code Here

TOP

Related Classes of flash.tools.debugger.Value

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.