Package org.eclipse.jdt.internal.debug.core.model

Examples of org.eclipse.jdt.internal.debug.core.model.JDIStackFrame


    }

    private boolean setRemoteOnBreakReturn(int step_over) throws DebugException {

        JDIStackFrame top = (JDIStackFrame) getTopStackFrame();
        if ( top == null || (!(top instanceof MVELStackFrame)) ) {
            return false;
        }

        Iterator handleriter = getVM().classesByName( "org.drools.core.base.mvel.MVELDebugHandler" ).iterator();
View Full Code Here


    // clean up cached projects for stack frames
    synchronized (fProjectsByFrame) {
      Set<IJavaStackFrame> frames = fProjectsByFrame.keySet();
      List<IJavaStackFrame> framesToRemove = new ArrayList<IJavaStackFrame>();
      Iterator<IJavaStackFrame> iter = frames.iterator();
      JDIStackFrame frame;
      while (iter.hasNext()) {
        frame = (JDIStackFrame) iter.next();
        if (frame.getDebugTarget() == target) {
          framesToRemove.add(frame);
        }
      }
      iter = framesToRemove.iterator();
      while (iter.hasNext()) {
View Full Code Here

    List<JDIStackFrame> dropFrames = getAffectedFrames(target.getThreads(), resources,
        replacedClassNames);

    // All threads that want to drop to frame are able. Proceed with the
    // drop
    JDIStackFrame dropFrame = null;
    Iterator<JDIStackFrame> iter = dropFrames.iterator();
    while (iter.hasNext()) {
      try {
        dropFrame = iter.next();
        dropFrame.dropToFrame();
      } catch (DebugException de) {
        notifyFailedDrop(
            ((JDIThread) dropFrame.getThread())
                .computeStackFrames(),
            replacedClassNames);
      }
    }
  }
View Full Code Here

    List<JDIStackFrame> popFrames = getAffectedFrames(target.getThreads(), resources,
        replacedClassNames);

    // All threads that want to drop to frame are able. Proceed with the
    // drop
    JDIStackFrame popFrame = null;
    Iterator<JDIStackFrame> iter = popFrames.iterator();
    while (iter.hasNext()) {
      try {
        popFrame = iter.next();
        popFrame.popFrame();
        poppedThreads.add(popFrame.getThread());
      } catch (DebugException de) {
        poppedThreads.remove(popFrame.getThread());
        notifyFailedDrop(
            ((JDIThread) popFrame.getThread()).computeStackFrames(),
            replacedClassNames);
      }
    }
  }
View Full Code Here

   * Returns a list of frames which should be popped in the given threads.
   */
  protected List<JDIStackFrame> getAffectedFrames(IThread[] threads, List<IResource> resourceList,
      List<String> replacedClassNames) throws DebugException {
    JDIThread thread = null;
    JDIStackFrame affectedFrame = null;
    List<JDIStackFrame> popFrames = new ArrayList<JDIStackFrame>();
    int numThreads = threads.length;
    IResource[] resources = new IResource[resourceList.size()];
    resourceList.toArray(resources);
    for (int i = 0; i < numThreads; i++) {
      thread = (JDIThread) threads[i];
      if (thread.isSuspended()) {
        affectedFrame = getAffectedFrame(thread, replacedClassNames);
        if (affectedFrame == null) {
          // No frame to drop to in this thread
          continue;
        }
        if (affectedFrame.supportsDropToFrame()) {
          popFrames.add(affectedFrame);
        } else {
          // if any thread that should drop does not support the drop,
          // do not drop in any threads.
          for (int j = 0; j < numThreads; j++) {
View Full Code Here

   * affected (and not simply all frames in affected types) will be returned.
   */
  protected JDIStackFrame getAffectedFrame(JDIThread thread,
      List<String> replacedClassNames) throws DebugException {
    List<IJavaStackFrame> frames = thread.computeStackFrames();
    JDIStackFrame affectedFrame = null;
    JDIStackFrame frame = null;
    ICompilationUnit compilationUnit = null;
    CompilationUnitDelta delta = null;
    IProject project = null;
    for (int j = frames.size() - 1; j >= 0; j--) {
      frame = (JDIStackFrame) frames.get(j);
      if (containsChangedType(frame, replacedClassNames)) {
        // smart drop to frame support
        compilationUnit = getCompilationUnit(frame);
        // if we can't find the source, then do type-based drop
        if (compilationUnit != null) {
          try {
            project = compilationUnit.getCorrespondingResource()
                .getProject();
            delta = getDelta(compilationUnit,
                getLastProjectBuildTime(project));
            if (!delta.hasChanged(frame.getName(),
                frame.getSignature())) {
              continue;
            }
          } catch (CoreException exception) {
            // If smart drop to frame fails, just do type-based drop
          }
        }

        if (frame.supportsDropToFrame()) {
          affectedFrame = frame;
          break;
        }
        // The frame we wanted to drop to cannot be popped.
        // Set the affected frame to the next lowest pop-able
        // frame on the stack.
        while (j > 0) {
          j--;
          frame = (JDIStackFrame) frames.get(j);
          if (frame.supportsDropToFrame()) {
            affectedFrame = frame;
            break;
          }
        }
        break;
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.debug.core.model.JDIStackFrame

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.