Package flash.tools.debugger

Examples of flash.tools.debugger.Location


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

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


                line = result[1];
      }
      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();
//      int start = 0;
//      for (;;)
//      {
//        int bp = breakpointIndexOf(module, line, start, true);
//        if (bp == -1)
//          break; // no more matches
//        boolean isEnabled = breakpointAt(bp).isEnabled();
//        existingBreakpoints.add("" + bp + (isEnabled ? "" : " (disabled)"));
//      }
//      if (existingBreakpoints.size() > 0)
//      {
//        String
//      }

      // go off; create it and set it
            BreakAction b = addBreakpoint(module, line)// throws npe if not able to set
            Location l = b.getLocation();

      int which = b.getId();
      String name = l.getFile().getName();
      int offset  = adjustOffsetForUnitTests(l.getFile().getOffsetForLine(line));

      Map<String, Object> args = new HashMap<String, Object>();
      args.put("breakpointNumber", Integer.toString(which)); //$NON-NLS-1$
      args.put("file", name); //$NON-NLS-1$
      args.put("line", Integer.toString(line)); //$NON-NLS-1$
View Full Code Here

            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)
            {
              args.put("functionName", funcName); //$NON-NLS-1$
              formatString = "resolvedBreakpointToFunction"; //$NON-NLS-1$
View Full Code Here

        // set a breakpoint in a specific swf not all of them
    try
    {
      if (singleSwfBreakpoint)
      {
        Location l = findAndEnableBreak(swf, f, line);
        col.add(l);
      }
      else
      {
        // walk all swfs looking to add this breakpoint
        SwfInfo[] swfs = m_fileInfo.getSwfs();
        for(int i=0; i<swfs.length; i++)
        {
          swf = swfs[i];
          if (swf != null)
          {
            Location l = findAndEnableBreak(swf, f, line);
            if (l != null)
              col.add(l);
          }
        }
      }
View Full Code Here

        fileId = sameFile.getId();
      else
        fileId = -1;
    }

    Location l = (fileId > -1) ? breakEnableRequest(fileId, line) : null;
    return l;
  }
View Full Code Here

  /**
   * Received when a breakpoint has been removed (or disabled)
   */
  Location breakEnableRequest(int fileId, int line) throws NotConnectedException
  {
    Location l = null;
    try
    {
      l = m_session.setBreakpoint(fileId, line);
    }
    catch(NoResponseException nre)
View Full Code Here

      Iterator itr = col.iterator();
   
      // probe all locations looking for a match
      while(!match && itr.hasNext())
      {
        Location l = (Location)itr.next();
        if (l != null && l.getFile().getId() == fileId && l.getLine() == line)
          match = true;
      }
    }
    return match;
  }
View Full Code Here

  public void removeFileIdRange(int startingId, int endingId)
  {
    Iterator<Location> i = iterator();
    while(i.hasNext())
    {
      Location l = i.next();
      int id = (l.getFile() == null) ? -1 : l.getFile().getId();
      if (id >= startingId && id <= endingId)
        i.remove();
    }
  }
View Full Code Here

  {
    boolean found = false;
    Iterator<Location> i = iterator();
    while(i.hasNext() && !found)
    {
      Location l = i.next();
      int id = (l.getFile() == null) ? -1 : l.getFile().getId();
      if (id == fileId && l.getLine() == line)
        found = true;
    }
    return found;
  }
View Full Code Here

    // now let's comb the table looking to see if this breakpoint should
    // be removed at the session level.  Use the first entry as a template
    // for which location we are talking about.
    int at = 0;
    boolean hit = false;
    Location l = col.first();
    do
    {
        at = breakpointIndexOf(l, at);
      if (at > -1)
      {
View Full Code Here

TOP

Related Classes of flash.tools.debugger.Location

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.