Examples of Breakpoint


Examples of org.rstudio.studio.client.common.debugging.model.Breakpoint

      // not part of a deleted range.
      ArrayList<Breakpoint> movedBreakpoints = new ArrayList<Breakpoint>();
    
      for (int idx = 0; idx < breakpoints_.size(); idx++)
      {
         Breakpoint breakpoint = breakpoints_.get(idx);
         int breakpointRow = rowFromLine(breakpoint.getEditorLineNumber());
         if (breakpointRow >= shiftStartRow)
         {
            // remove the breakpoint from its old position
            movedBreakpoints.add(breakpoint);
            removeBreakpointMarker(breakpoint);
         }
      }
      for (Breakpoint breakpoint: movedBreakpoints)
      {
         // calculate the new position of the breakpoint
         int oldBreakpointPosition =
               rowFromLine(breakpoint.getEditorLineNumber());
         int newBreakpointPosition =
               oldBreakpointPosition + shiftedBy;
        
         // add a breakpoint in this new position only if it wasn't
         // in a deleted range, and if we don't already have a
         // breakpoint there
         if (oldBreakpointPosition >= end.getRow() &&
             !(oldBreakpointPosition == end.getRow() && shiftedBy < 0) &&
             getBreakpointIdxByLine(lineFromRow(newBreakpointPosition)) < 0)
         {
            breakpoint.moveToLineNumber(lineFromRow(newBreakpointPosition));
            placeBreakpointMarker(breakpoint);
            fireEvent(new BreakpointMoveEvent(breakpoint.getBreakpointId()));
         }
         else
         {
            breakpoints_.remove(breakpoint);
            fireEvent(new BreakpointSetEvent(
                  breakpoint.getEditorLineNumber(),
                  breakpoint.getBreakpointId(),
                  false));
         }
      }
   }
View Full Code Here

Examples of org.rstudio.studio.client.common.debugging.model.Breakpoint

      int breakpointIdx = getBreakpointIdxByLine(lineNumber);

      // if there's already a breakpoint on that line, remove it
      if (breakpointIdx >= 0)
      {
         Breakpoint breakpoint = breakpoints_.get(breakpointIdx);
         removeBreakpointMarker(breakpoint);
         fireEvent(new BreakpointSetEvent(
               lineNumber,
               breakpoint.getBreakpointId(),
               false));
         breakpoints_.remove(breakpointIdx);
      }

      // if there's no breakpoint on that line yet, create a new unset
View Full Code Here

Examples of org.rstudio.studio.client.common.debugging.model.Breakpoint

  
   public Breakpoint setTopLevelBreakpoint(
         final String path,
         final int lineNumber)
   {
      final Breakpoint breakpoint = addBreakpoint(Breakpoint.create(
            currentBreakpointId_++,
            path,
            "toplevel",
            lineNumber,
            path.equals(activeSource_) ?
                  Breakpoint.STATE_INACTIVE :
                  Breakpoint.STATE_ACTIVE,
            Breakpoint.TYPE_TOPLEVEL));
     
      // If we're actively sourcing this file, we can't set breakpoints in
      // it just yet
      if (path.equals(activeSource_))
         breakpoint.setPendingDebugCompletion(true);

      notifyServer(breakpoint, true, true);

      ArrayList<Breakpoint> bps = new ArrayList<Breakpoint>();
      bps.add(breakpoint);
View Full Code Here

Examples of org.rstudio.studio.client.common.debugging.model.Breakpoint

         final String functionName,
         int lineNumber,
         final boolean immediately)
   {
      // create the new breakpoint and arguments for the server call
      final Breakpoint breakpoint = addBreakpoint(Breakpoint.create(
            currentBreakpointId_++,
            path,
            functionName,
            lineNumber,
            immediately ?
                  Breakpoint.STATE_PROCESSING :
                  Breakpoint.STATE_INACTIVE,
            Breakpoint.TYPE_FUNCTION));
      notifyServer(breakpoint, true, false);
     
      // If the breakpoint is in a function that is active on the callstack,
      // it's being set on the stored rather than the executing copy. It's
      // possible to set it right now, but it will probably violate user
      // expectations. Process it when the function is no longer executing.
      if (activeFunctions_.contains(
            new FileFunction(breakpoint)))
      {
         breakpoint.setPendingDebugCompletion(true);
         markInactiveBreakpoint(breakpoint);
      }     
      else
      {
         server_.getFunctionState(functionName, path, lineNumber,
               new ServerRequestCallback<FunctionState>()
         {
            @Override
            public void onResponseReceived(FunctionState state)
            {
               if (state.isPackageFunction())
               {
                  breakpoint.markAsPackageBreakpoint(state.getPackageName());
               }
               // If the breakpoint is not to be set immediately,
               // stop processing now
               if (!immediately)
                  return;
View Full Code Here

Examples of org.rstudio.studio.client.common.debugging.model.Breakpoint

      return breakpoint;
   }
  
   public void removeBreakpoint(int breakpointId)
   {
      Breakpoint breakpoint = getBreakpoint(breakpointId);
      if (breakpoint != null)
      {
         breakpoints_.remove(breakpoint);
         if (breakpoint.getState() == Breakpoint.STATE_ACTIVE &&
             breakpoint.getType() == Breakpoint.TYPE_FUNCTION)
         {
            setFunctionBreakpoints(new FileFunction(breakpoint));
         }
         notifyServer(breakpoint, false,
               breakpoint.getType() == Breakpoint.TYPE_TOPLEVEL);
      }
      onBreakpointAddOrRemove();
   }
View Full Code Here

Examples of org.rstudio.studio.client.common.debugging.model.Breakpoint

      // need to update the line number--we just need to persist the new state.
      breakpointStateDirty_ = true;
     
      // the breakpoint knows its position in the function, which needs to be
      // recalculated; do that the next time we set breakpoints on this function
      Breakpoint breakpoint = getBreakpoint(breakpointId);
      if (breakpoint != null)
      {
         breakpoint.markStepsNeedUpdate();
         notifyServer(breakpoint, true, false);
      }
   }
View Full Code Here

Examples of org.rstudio.studio.client.common.debugging.model.Breakpoint

                // restore all of the breakpoints
                JsArray<Breakpoint> breakpoints =
                      state.getPersistedBreakpoints();
                for (int idx = 0; idx < breakpoints.length(); idx++)
                {
                   Breakpoint breakpoint = breakpoints.get(idx);
                  
                   // make sure the next breakpoint we create after a restore
                   // has a value larger than any existing breakpoint
                   currentBreakpointId_ = Math.max(
                         currentBreakpointId_,
                         breakpoint.getBreakpointId() + 1);
                  
                   addBreakpoint(breakpoint);
                }
               
                // this initialization happens after the source windows are
View Full Code Here

Examples of org.rstudio.studio.client.common.debugging.model.Breakpoint

      // each breakpoint with its steps.
      for (int i = 0; i < breakpoints.size() &&
                      i < stepList.length(); i++)
      {
         FunctionSteps steps = stepList.get(i);
         Breakpoint breakpoint = breakpoints.get(i);
         if (steps.getSteps().length() > 0)
         {
            // if the server set this breakpoint on a different line than
            // requested, make sure there's not already a breakpoint on that
            // line; if there is, discard this one.
            if (breakpoint.getLineNumber() != steps.getLineNumber())
            {
               for (Breakpoint possibleDupe: breakpoints_)
               {
                  if (breakpoint.getPath().equals(
                         possibleDupe.getPath()) &&
                      steps.getLineNumber() ==
                         possibleDupe.getLineNumber() &&
                      breakpoint.getBreakpointId() !=
                         possibleDupe.getBreakpointId())
                  {
                     breakpoint.setState(Breakpoint.STATE_REMOVING);
                     unSettableBreakpoints.add(breakpoint);
                  }
               }
            }
            breakpoint.addFunctionSteps(steps.getName(),
                  steps.getLineNumber(),
                  steps.getSteps());
         }
         else
         {
View Full Code Here

Examples of org.teavm.debugging.Breakpoint

    @Override
    public void breakpointAdded(IBreakpoint breakpoint) {
        try {
            IJavaLineBreakpoint lineBreakpoint = (IJavaLineBreakpoint)breakpoint;
            String fileName = lineBreakpoint.getTypeName().replace('.', '/') + ".java";
            Breakpoint teavmBreakpoint = teavmDebugger.createBreakpoint(fileName, lineBreakpoint.getLineNumber());
            breakpointMap.put(lineBreakpoint, teavmBreakpoint);
            breakpointBackMap.put(teavmBreakpoint, lineBreakpoint);
        } catch (CoreException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of se.sics.cooja.mspmote.plugins.MspCodeWatcher.Breakpoints.Breakpoint

  public BreakpointsUI(Breakpoints breakpoints, final MspCodeWatcher codeWatcher) {
    this.breakpoints = breakpoints;
    breakpoints.addBreakpointListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        Breakpoint triggered = BreakpointsUI.this.breakpoints.getLastTriggered();
        if (triggered != null) {
          flashBreakpoint(triggered);
        }

        breakpointsTable.repaint();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.