Package flash.tools.debugger

Examples of flash.tools.debugger.SourceFile


      StringBuilder sb = new StringBuilder();
      Iterator itr = m_fileInfo.getAllFiles();

      while(itr.hasNext())
      {
        SourceFile m = (SourceFile) ((Map.Entry)itr.next()).getValue();

        String name = m.getName();
        int id = m.getId();
        String path = m.getFullPath();

        sb.append(id);
        sb.append(' ');
        sb.append(path);
        sb.append(", "); //$NON-NLS-1$
View Full Code Here


      Iterator<Location> itr = b.getLocations().iterator();
      while(itr.hasNext())
      {
        Location l = itr.next();
        SourceFile file = l.getFile();
        String funcName = (file == null)
          ? getLocalizationManager().getLocalizedTextString("unknownBreakpointLocation") //$NON-NLS-1$
          : file.getFunctionNameForLine(m_session, l.getLine()) ;
        int offset = adjustOffsetForUnitTests((file == null) ? 0 : file.getOffsetForLine(l.getLine()));

        sb.append("0x"); //$NON-NLS-1$
        FieldFormat.formatLongToHex(sb, offset, 8);
        sb.append(' ');

        if (funcName != null)
        {
          Map<String, Object> funcArgs = new HashMap<String, Object>();
          funcArgs.put("functionName", funcName); //$NON-NLS-1$
          sb.append(getLocalizationManager().getLocalizedTextString("inFunctionAt", funcArgs)); //$NON-NLS-1$
        }

        sb.append(file.getName());
        if (file != null)
        {
          sb.append("#"); //$NON-NLS-1$
          sb.append(file.getId());
        }
        sb.append(':');
        sb.append(l.getLine());

        try
View Full Code Here

    // some formatting properties
    int i = frameNumber;

    Location loc = ctx.getLocation();
    SourceFile file = loc.getFile();
    int line = loc.getLine();
    String name = (file == null) ? "<null>" : file.getName(); //$NON-NLS-1$
    String sig = ctx.getCallSignature();
    String func = extractFunctionName(sig);

    // file == null or line < 0 appears to be a terminator for stack info
    if (file == null && line < 0)
        {
            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$
      }

      sb.append(name);

      // if this file is currently being filtered put the source file id after it
      if (file != null && (showFileId || !m_fileInfo.inFileList(file)))
      {
        sb.append('#');
        sb.append( file.getId() );

      }
      sb.append(':');
      sb.append(line);
    }
View Full Code Here

          SourceFile[] files = e.getSourceList(m_session);
          int max = Integer.MIN_VALUE;
          int min = Integer.MAX_VALUE;
          for(int j=0; j<files.length; j++)
          {
            SourceFile f = files[j];
            int id = f.getId();
            max = (id > max) ? id : max;
            min = (id < min) ? id : min;
          }

          args.put("scriptCount", Integer.toString(e.getSourceCount(m_session))); //$NON-NLS-1$
View Full Code Here

    Vector<String> syntheticFiles = new Vector<String>();
    Vector<String> actionsFiles = new Vector<String>();

    for (int i = 0; i < ar.length; i++)
    {
       SourceFile m = ar[i];
      int fileType = getFileType(m);
      int id = m.getId();
      String entry = m.getName() + "#" + id; //$NON-NLS-1$

      switch (fileType)
      {
      case SYNTHETIC_FILE:
        syntheticFiles.add(entry);
View Full Code Here

      if (hasMoreTokens())
      {
        arg = nextToken();
                int id = arg.equals(".") ? propertyGet(LIST_MODULE) : parseFileArg(-1, arg); //$NON-NLS-1$

        SourceFile m = m_fileInfo.getFile(id);
        listFunctionsFor(sb, m);
      }
      else
      {
        SourceFile[] ar = m_fileInfo.getFileList();
        if (ar == null)
          err(getLocalizationManager().getLocalizedTextString("noSourceFilesFound")); //$NON-NLS-1$
        else
                {
                    for(int i = 0; ar != null && i < ar.length; i++)
                    {
                        SourceFile m = ar[i];
                        listFunctionsFor(sb, m);
                    }
                }
      }
View Full Code Here

    {
        SourceFile[] sourceFiles = m_fileInfo.getFiles(match);

        for (int j = 0; j < sourceFiles.length; j++)
        {
            SourceFile sourceFile = sourceFiles[j];
            sb.append(sourceFile.getName());
      sb.append('#');
      sb.append(sourceFile.getId());
      sb.append(m_newline);
        }
    }
View Full Code Here

    {
      BreakAction b = breakpointAt(i);
      int status = b.getStatus();
      boolean isResolved = (status == BreakAction.RESOLVED);
      Location l = b.getLocation();
      SourceFile file = (l != null) ? l.getFile() : null;
      String funcName = (file == null) ? null : file.getFunctionNameForLine(m_session, l.getLine()) ;
      boolean singleSwf = b.isSingleSwf();
      int cmdCount = b.getCommandCount();
      int hits = b.getHits();
      String cond = b.getConditionString();
      boolean silent = b.isSilent();
      int offset = adjustOffsetForUnitTests((file == null) ? 0 : file.getOffsetForLine(l.getLine()));

      int num = b.getId();
      FieldFormat.formatLong(sb, num, 3);
      sb.append(" breakpoint     ");

      if (b.isAutoDisable())
        sb.append("dis  ");
      else if (b.isAutoDelete())
        sb.append("del  ");
      else
        sb.append("keep ");

      if (b.isEnabled())
        sb.append("y   ");
      else
        sb.append("n   ");

      sb.append("0x"); //$NON-NLS-1$
      FieldFormat.formatLongToHex(sb, offset, 8);
      sb.append(' ');

      if (funcName != null)
      {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("functionName", funcName); //$NON-NLS-1$
        sb.append(getLocalizationManager().getLocalizedTextString("inFunctionAt", args)); //$NON-NLS-1$
      }

      if (file != null)
      {
        sb.append(file.getName());
        if (isResolved && singleSwf)
        {
          sb.append("#"); //$NON-NLS-1$
          sb.append(file.getId());
        }
        sb.append(':');
        sb.append(l.getLine());
      }
      else
View Full Code Here

TOP

Related Classes of flash.tools.debugger.SourceFile

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.