[hg] main-silver: #235370: Do not remove the step requests befor...

  • From:
  • To:
  • Subject: [hg] main-silver: #235370: Do not remove the step requests befor...
  • Date: Sun, 01 Sep 2013 18:40:03 -0700

changeset d0aaa651f583 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/d0aaa651f583
description:
        #235370: Do not remove the step requests before we set the last 
operation.

diffstat:

 
debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesNodeModel.java
 |  13 +++++++++-
 
debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
      |  11 ++++---
 2 files changed, 18 insertions(+), 6 deletions(-)

diffs (54 lines):

diff --git 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesNodeModel.java
 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesNodeModel.java
--- 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesNodeModel.java
+++ 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesNodeModel.java
@@ -248,7 +248,18 @@
         }
         if (o instanceof Operation) {
             Operation op = (Operation) o;
-            boolean isDone = op.getReturnValue() != null;
+            Operation lastOperation = null;
+            {
+                JPDAThread t = debugger.getCurrentThread();
+                if (t != null) {
+                    java.util.List<Operation> lastOperations = 
t.getLastOperations();
+                    if (lastOperations != null && lastOperations.size() > 0) 
{
+                        lastOperation = 
lastOperations.get(lastOperations.size() - 1);
+                    }
+                }
+            }
+            boolean isDone = op == lastOperation;
+            //boolean isDone = op.getReturnValue() != null;
             if (isDone) {
                 return NbBundle.getMessage(VariablesNodeModel.class, 
"afterOperation_descr", op.getMethodName());
             } else {
diff --git 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
--- 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
+++ 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
@@ -372,14 +372,14 @@
         lock.lock();
         try {
             st.setInStep(false, null);
-            removeStepRequests (tr);
+            boolean suspended = false;
             try {
-                boolean suspended = ThreadReferenceWrapper.isSuspended0(tr);
+                suspended = ThreadReferenceWrapper.isSuspended0(tr);
+            } catch (IllegalThreadStateExceptionWrapper itsex) {
+            }
                 if (!suspended) {
                     // The thread was already resumed in the mean time by 
someone else.
-                    return false;
-                }
-            } catch (IllegalThreadStateExceptionWrapper itsex) {
+                removeStepRequests (tr);
                 return false;
             }
             /*if (stepWatch != null) {
@@ -388,6 +388,7 @@
             }*/
             String className = 
ReferenceTypeWrapper.name(LocationWrapper.declaringType(LocatableWrapper.location(event)));
             setLastOperation(tr);
+            removeStepRequests (tr);
             //S ystem.out.println("/nStepAction.exec");
 
             int suspendPolicy = getDebuggerImpl().getSuspend();

[hg] main-silver: #235370: Do not remove the step requests befor...

mentlicher 09/02/2013

Project Features

About this Project

Debugger was started in November 2009, is owned by tpavek, and has 29 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close