Always inspect varobj when double-clicking on a variable
in variable inspector...
--- a/VDBVariableObjectPresenter.st Sat Sep 21 18:31:45 2019 +0100
+++ b/VDBVariableObjectPresenter.st Tue Sep 24 00:43:53 2019 +0100
@@ -107,9 +107,10 @@
!
varobj
- ^ varobj
+ ^ varobj varobj
"Created: / 28-01-2018 / 22:45:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 21-09-2019 / 01:30:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!VDBVariableObjectPresenter methodsFor:'initialization'!
@@ -180,27 +181,27 @@
"/ 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 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:[
+ 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
+ value isSymbol ifTrue:[
+ inspects anyOne receiver perform:value
].
- ] ifFalse:[
- super doDoubleClick
+ ] ifFalse:[
+ self varobj inspect
].
"Created: / 19-02-2018 / 16:10:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 21-08-2019 / 22:52:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 21-09-2019 / 01:29:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
doInspect:visualizerExpr
--- a/extensions.st Sat Sep 21 18:31:45 2019 +0100
+++ b/extensions.st Tue Sep 24 00:43:53 2019 +0100
@@ -66,6 +66,19 @@
"Modified: / 03-02-2018 / 09:58:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!GDBVariableObject methodsFor:'accessing-private'!
+
+varobj
+ "Return self. This is here to make it polymorph with `GDBVariable`
+ (since `VDBVariableObjectListApplication` handles both, variables
+ and varobjs."
+
+ ^ self
+
+ "Created: / 21-09-2019 / 01:28:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 24-09-2019 / 00:40:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!jv_vdb class methodsFor:'documentation'!
extensionsVersion_HG