[hg] main-silver: #229789: Try to set the var to the value of Ja...

  • From:
  • To:
  • Subject: [hg] main-silver: #229789: Try to set the var to the value of Ja...
  • Date: Wed, 12 Jun 2013 19:57:42 -0700

changeset d2933c497891 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/d2933c497891
description:
        #229789: Try to set the var to the value of Java initialization 
String. If that is not successful, resort to the object replication.

diffstat:

 
debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/ValuePropertyEditor.java
 |  13 ++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diffs (37 lines):

diff --git 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/ValuePropertyEditor.java
 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/ValuePropertyEditor.java
--- 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/ValuePropertyEditor.java
+++ 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/ValuePropertyEditor.java
@@ -64,6 +64,7 @@
 import org.netbeans.api.debugger.jpda.ObjectVariable;
 import org.netbeans.api.debugger.jpda.Super;
 import org.netbeans.api.debugger.jpda.Variable;
+import org.netbeans.modules.debugger.jpda.expr.JDIVariable;
 import org.netbeans.spi.debugger.ContextProvider;
 import org.netbeans.spi.viewmodel.TableModel;
 import org.openide.DialogDisplayer;
@@ -246,6 +247,17 @@
         Runnable run = new Runnable() {
             @Override
             public void run() {
+                String javaInitStr = 
delegatePropertyEditor.getJavaInitializationString();
+                boolean setFromMirror = false;
+                try {
+                    var.setValue(javaInitStr);
+                    if (mirror == null || ((JDIVariable) var).getJDIValue() 
!= null) {
+                        setFromMirror = true;
+                    } // false when mirror != null and JDI value is null 
(set value was not successful)
+                } catch (InvalidExpressionException ex) {
+                    logger.log(Level.INFO, "InvalidExpressionException when 
evaluating "+javaInitStr+":", ex);
+                }
+                if (!setFromMirror) {
                 try {
                     var.setFromMirrorObject(mirror);
                 } catch (InvalidObjectException ioex) {
@@ -253,6 +265,7 @@
                     DialogDisplayer.getDefault().notify(nd);
                 }
             }
+            }
         };
         if (SwingUtilities.isEventDispatchThread()) {
             RequestProcessor rp = contextProvider.lookupFirst(null, 
RequestProcessor.class);

[hg] main-silver: #229789: Try to set the var to the value of Ja...

mentlicher 06/13/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