Package flash.tools.debugger

Examples of flash.tools.debugger.SourceFile


    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

      appendBreakInfo(sb);
      //sb.append("unknown location");
    }
    else
    {
      SourceFile file = l.getFile();
      name = file.getName();
      line = l.getLine();
      String funcName = file.getFunctionNameForLine(m_session, line) ;

      // where were we last time
      int lastModule = propertyGet(LIST_MODULE);
      int lastDepth = propertyGet(LAST_FRAME_DEPTH);

      int thisModule = file.getId();
      int thisDepth = propertyGet(CURRENT_FRAME_DEPTH)// triggered via getCurrentLocation()

      // mark where we stopped
      propertyPut(LAST_FRAME_DEPTH, thisDepth);

      // if we have changed our context or we are not spitting out source then dump our location
      if (!postStep || lastModule != thisModule || lastDepth != thisDepth )
      {
        // is it a fault?
        String reasonForHalting;
        if ( reason == SuspendReason.Fault || reason == SuspendReason.StopRequest)
        {
          StringBuilder s = new StringBuilder();
          appendReason(s, reason);
          reasonForHalting = s.toString();
        }
        // if its a breakpoint add that information
        else if ( (bp = enabledBreakpointIndexOf(l)) > -1 )
        {
          Map<String, Object> args = new HashMap<String, Object>();
          args.put("breakpointNumber", Integer.toString(breakpointAt(bp).getId())); //$NON-NLS-1$
          reasonForHalting = getLocalizationManager().getLocalizedTextString("hitBreakpoint", args); //$NON-NLS-1$
        }
        else
        {
          reasonForHalting = getLocalizationManager().getLocalizedTextString("executionHalted"); //$NON-NLS-1$
        }

        Map<String, Object> args = new HashMap<String, Object>();
        args.put("reasonForHalting", reasonForHalting); //$NON-NLS-1$
        args.put("fileAndLine", name + ':' + line); //$NON-NLS-1$
        String formatString;
        if (funcName != null)
        {
          args.put("functionName", funcName); //$NON-NLS-1$
          formatString = "haltedInFunction"; //$NON-NLS-1$
        }
        else
        {
          formatString = "haltedInFile"; //$NON-NLS-1$
        }
        sb.append(getLocalizationManager().getLocalizedTextString(formatString, args));

        if (!m_fullnameOption)
          sb.append(m_newline);       
      }

            // set current listing poistion and emit emacs trigger
            setListingPosition(thisModule, line);

      // dump our source line if not in emacs mode
      if (!m_fullnameOption)
        appendSource(sb, file.getId(), line, file.getLine(line), false);
    }
  }
View Full Code Here

      try
      {
        Location l = bp.getLocation();
        int line = l.getLine();
        SourceFile f = l.getFile();
        Location newLoc = findAndEnableBreak(swf, f, line);
        if (newLoc != null)
          bp.addLocation(newLoc);
      }
      catch(InProgressException ipe)
View Full Code Here

  void doHome()
  {
    try
    {
      Location l = getCurrentLocation();
      SourceFile file = l.getFile();
      int module = file.getId();
      int line = l.getLine();

      // now set it
            setListingPosition(module, line);
    }
View Full Code Here

      }
      else
      {
        // no parameter mean use current location;  null pointer if nothing works
        Location l = getCurrentLocation();
        SourceFile file = l.getFile();
        module = file.getId();
        line = l.getLine();
      }

//      // check to see if there are any existing breakpoints at this file/line
//      LinkedList existingBreakpoints = new LinkedList();
View Full Code Here

     * @return object associated with breakpoint
     */
    BreakAction addBreakpoint(int fileId, int line) throws NotConnectedException, NullPointerException
    {
    // use fileId SourceFile to denote the name of file in which we wish to set a breakpoint
        SourceFile f = m_fileInfo.getFile(fileId);
    LocationCollection col = enableBreak(f, line);

        BreakAction b = new BreakAction(col)//  throws NullPointerException if collection is null
        b.setEnabled(true);
    b.setSingleSwf(m_fileInfo.isSwfFilterOn());
View Full Code Here

            // whoo-hoo, it resolved!
                    module = result[0];
                    line = result[1];
   
            // use module SourceFile to denote the name of file in which we wish to set a breakpoint
                SourceFile f = m_fileInfo.getFile(module);
            LocationCollection col = enableBreak(f, line);
            if (col.isEmpty())
              throw new NullPointerException(getLocalizationManager().getLocalizedTextString("noExecutableCode")); //$NON-NLS-1$
            b.setLocations(col);
   
            Location l = col.first();
            SourceFile file = (l != null) ? l.getFile() : null;
            String funcName = (file == null) ? null : file.getFunctionNameForLine(m_session, l.getLine()) ;

            Map<String, Object> args = new HashMap<String, Object>();
            String formatString;
            args.put("breakpointNumber", Integer.toString(b.getId())); //$NON-NLS-1$
            String filename = file.getName();
            if (b.isSingleSwf() && file != null)
            {
              filename = filename + "#" + file.getId(); //$NON-NLS-1$
            }
            args.put("file", filename); //$NON-NLS-1$
            args.put("line", new Integer(l.getLine())); //$NON-NLS-1$

            if (funcName != null)
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.