VDBVariableObjectPresenter.st
changeset 240 c5450baf51cd
parent 206 c606b8fc373f
child 252 3b99f2b0fa86
--- a/VDBVariableObjectPresenter.st	Mon Nov 08 14:22:20 2021 +0000
+++ b/VDBVariableObjectPresenter.st	Wed Nov 17 13:38:30 2021 +0000
@@ -1,7 +1,7 @@
 "
 jv:vdb - Visual / VM Debugger
 Copyright (C) 2015-now Jan Vrany
-Copyright (C) 2020 LabWare
+Copyright (C) 2020-2021 LabWare
 
 This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
 
@@ -24,7 +24,7 @@
 "
 jv:vdb - Visual / VM Debugger
 Copyright (C) 2015-now Jan Vrany
-Copyright (C) 2020 LabWare
+Copyright (C) 2020-2021 LabWare
 
 This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
 
@@ -202,26 +202,20 @@
     "Modified: / 28-01-2018 / 22:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-doDoubleClick
-    self doInspect.
+doInspect
+    self doInspectUsingVisualizer: 'vdb.contents_visualizer'
 
-    "Created: / 19-02-2018 / 16:10:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 21-09-2019 / 01:29:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 17-11-2020 / 21:53:06 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified: / 17-11-2021 / 13:17:01 / Jan Vrany <jan.vrany@labware.com>"
 !
 
-doInspect
-    self doInspect: 'vdb.contents_visualizer'
-!
-
-doInspect:visualizerExpr 
+doInspectUsingVisualizer:visualizerExpr 
     "
      Open an inspector of a copy of varobj. If `visualizerExpr`
      is not nil then the visualizer of a *copy* is set to
      `visualizerExpr`
 "
     
-    | dup  app  wnd |
+    | dup |
 
     dup := varobj duplicate.
     dup == varobj ifTrue:[
@@ -233,26 +227,9 @@
     visualizerExpr notNil ifTrue:[
         dup visualizer:visualizerExpr
     ].
-     
-    "/ If used in Inspector2, open child in the same inspector windpow.
-    
-    app := self application.
-    app notNil ifTrue:[
-        wnd := app window.
-        wnd notNil ifTrue:[
-            wnd := wnd topView.
-            (wnd application isKindOf:Tools::Inspector2) ifTrue:[
-                wnd application inspect:dup.
-                ^ self.
-            ].
-        ].
-    ].
-     
-    "/ ...otherwise open a new inspector...            
-    
-    dup inspect.
+    self doInspect: dup
 
-    "Created: / 08-07-2019 / 20:17:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 17-11-2021 / 13:16:42 / Jan Vrany <jan.vrany@labware.com>"
 ! !
 
 !VDBVariableObjectPresenter methodsFor:'private'!