--- a/VDBVariableObjectPresenter.st Wed Nov 18 07:08:41 2020 +0000
+++ b/VDBVariableObjectPresenter.st Tue Nov 17 22:02:29 2020 +0000
@@ -1,6 +1,7 @@
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2020 LabWare
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
@@ -23,6 +24,7 @@
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2020 LabWare
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
@@ -48,22 +50,29 @@
<resource: #menu>
^
- #(Menu
- (
+ #(Menu (
+ (MenuItem
+ label: 'Inspect'
+ itemValue: doInspect
+ isVisible: true
+ )
+ (MenuItem
+ label: '-'
+ isVisible: true
+ )
(MenuItem
label: 'Copy Value'
itemValue: doCopyValue
isVisible: true
- )
+ )
(MenuItem
label: 'Copy Expression'
itemValue: doCopyPath
isVisible: true
- )
)
+ ) nil
nil
- nil
- )
+ )
! !
!VDBVariableObjectPresenter methodsFor:'accessing'!
@@ -194,34 +203,15 @@
!
doDoubleClick
- "/ This is really an ugly hack: in Smalltalk IDEs, double clock
- "/ on variable usually inspects it. We want the same, but in this case,
- "/ inspect operation may involve changing varobj's visualizer.
- "/
- "/ To allow plugins to define their own inspect actions, first search
- "/ extending menu items for item matching "Inspect" - if there's one,
- "/ do this, if none or more than one, do `super doDoubleClick`.
-
- | dummy inspects |
-
- dummy := Menu new.
- self contextMenuExtendersFor:#contextMenu
- do:[:each | self perform:each with:dummy ].
- inspects := (dummy items ? #())
- select:[:item | item label startsWith:'Inspect' ].
- inspects size == 1 ifTrue:[
- | value |
-
- value := inspects anyOne value.
- value isSymbol ifTrue:[
- inspects anyOne receiver perform:value
- ].
- ] ifFalse:[
- self varobj inspect
- ].
+ self doInspect.
"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>"
+!
+
+doInspect
+ self doInspect: 'vdb.contents_visualizer'
!
doInspect:visualizerExpr
@@ -263,19 +253,6 @@
dup inspect.
"Created: / 08-07-2019 / 20:17:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-doInspectBeeObject
- self doInspect:'obj'.
-
- "Created: / 08-07-2019 / 21:55:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-doInspectStXObject
- self doInspect:'instance_create'.
-
- "Created: / 10-02-2018 / 23:17:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 08-07-2019 / 22:50:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!VDBVariableObjectPresenter methodsFor:'private'!