UX: do not fetch registers if register list is not visible.
--- a/VDBFrameApplication.st Sat Jan 08 23:28:55 2022 +0000
+++ b/VDBFrameApplication.st Thu Mar 17 16:23:22 2022 +0000
@@ -2,6 +2,7 @@
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2020 LabWare
+Copyright (C) 2022 LabWare
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
@@ -12,7 +13,7 @@
"{ NameSpace: Smalltalk }"
VDBTabbingContainer subclass:#VDBFrameApplication
- instanceVariableNames:'frameHolder variableObjectListHolder registerListHolder'
+ instanceVariableNames:'frameHolder variableObjectListApp registerListApp'
classVariableNames:''
poolDictionaries:''
category:'VDB-UI-Others'
@@ -25,6 +26,7 @@
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2020 LabWare
+Copyright (C) 2022 LabWare
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
@@ -87,189 +89,30 @@
^ frameHolder
!
-frameHolder:something
- "set the 'frameHolder' value holder (automatically generated)"
-
- |oldValue newValue|
-
- frameHolder notNil ifTrue:[
- oldValue := frameHolder value.
- frameHolder removeDependent:self.
- ].
- frameHolder := something.
- frameHolder notNil ifTrue:[
- frameHolder addDependent:self.
- ].
- newValue := frameHolder value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:frameHolder.
- ].
-!
-
-registerListHolder
- "return/create the 'variableObjectListHolder' value holder (automatically generated)"
-
- registerListHolder isNil ifTrue:[
- registerListHolder := ValueHolder with: #().
- registerListHolder addDependent:self.
- ].
- ^ registerListHolder
-
- "Created: / 01-10-2018 / 10:07:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-registerListHolder:something
- "set the 'variableObjectListHolder' value holder (automatically generated)"
-
- |oldValue newValue|
-
- registerListHolder notNil ifTrue:[
- oldValue := registerListHolder value.
- registerListHolder removeDependent:self.
- ].
- registerListHolder := something.
- registerListHolder notNil ifTrue:[
- registerListHolder addDependent:self.
- ].
- newValue := registerListHolder value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:registerListHolder.
- ].
-
- "Created: / 01-10-2018 / 10:08:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-variableObjectListHolder
- "return/create the 'variableObjectListHolder' value holder (automatically generated)"
-
- variableObjectListHolder isNil ifTrue:[
- variableObjectListHolder := ValueHolder with: #().
- variableObjectListHolder addDependent:self.
- ].
- ^ variableObjectListHolder
-
- "Modified: / 03-02-2018 / 07:33:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-variableObjectListHolder:something
- "set the 'variableObjectListHolder' value holder (automatically generated)"
-
- |oldValue newValue|
-
- variableObjectListHolder notNil ifTrue:[
- oldValue := variableObjectListHolder value.
- variableObjectListHolder removeDependent:self.
- ].
- variableObjectListHolder := something.
- variableObjectListHolder notNil ifTrue:[
- variableObjectListHolder addDependent:self.
- ].
- newValue := variableObjectListHolder value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:variableObjectListHolder.
- ].
-! !
-
-!VDBFrameApplication methodsFor:'change & update'!
-
-enqueueDelayedUpdateRegisterList
- self enqueueMessage:#delayedUpdateRegisterList
-
- "Created: / 01-10-2018 / 10:06:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 18-02-2019 / 10:23:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-enqueueDelayedUpdateVariableObjectList
- self enqueueMessage:#delayedUpdateVariableObjectList
-
- "Created: / 03-02-2018 / 07:28:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 18-02-2019 / 10:23:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-update:aspect with:param from:sender
- "Invoked when an object that I depend upon sends a change notification."
-
- sender == frameHolder ifTrue:[
- self enqueueDelayedUpdateContents.
- ^ self.
- ].
- super update:aspect with:param from:sender
-
- "Created: / 03-02-2018 / 09:48:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 01-10-2018 / 12:02:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 18-06-2020 / 23:30:19 / Jan Vrany <jan.vrany@labware.com>"
-! !
-
-!VDBFrameApplication methodsFor:'change & update-delayed'!
-
-delayedUpdateContents
- self delayedUpdateRegisterList.
- self delayedUpdateVariableObjectList
-
- "Created: / 18-06-2020 / 23:30:31 / Jan Vrany <jan.vrany@labware.com>"
-!
-
-delayedUpdateRegisterList
- | frame list |
-
- debugger isNil ifTrue:[
- self registerListHolder value:#().
- ^ self.
- ].
- frame := frameHolder value.
- frame isNil ifTrue:[
- self registerListHolder value:#().
- ^ self.
- ].
-
- list := frame registers.
- self registerListHolder value:list.
-
- "Created: / 01-10-2018 / 10:07:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 22-05-2020 / 13:32:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 23-06-2020 / 14:04:42 / Jan Vrany <jan.vrany@labware.com>"
-!
-
-delayedUpdateVariableObjectList
- | frame list |
-
- debugger isNil ifTrue:[
- self variableObjectListHolder value:#().
- ^ self.
- ].
- frame := frameHolder value.
- frame isNil ifTrue:[
- self variableObjectListHolder value:#().
- ^ self.
- ].
- "/ It may happen that the variable is out of scope. In that case, we get an error
- "/ '-var-create: unable to create variable object'. So, ignore all such variables.
- "/ See GDB source code:
- "/
- "/ gdb/mi/mi-cmd-var.c
- "/ gdb/testsuite/gdb.mi/mi-var-cmd.exp
- list := frame variables.
- self variableObjectListHolder value:list.
-
- "Created: / 03-02-2018 / 07:30:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 05-07-2018 / 11:57:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 23-06-2020 / 14:04:53 / Jan Vrany <jan.vrany@labware.com>"
+frameHolder: aValueModel
+ frameHolder := aValueModel.
+ variableObjectListApp frameHolder: aValueModel.
+ registerListApp frameHolder: aValueModel.
! !
!VDBFrameApplication methodsFor:'initialization & release'!
initialize
super initialize.
- self addApplication: (VDBVariableObjectListApplication new
+ variableObjectListApp := (VDBVariableObjectListApplication new
debuggerHolder: self debuggerHolder;
- variableObjectListHolder: self variableObjectListHolder;
+ frameHolder: self frameHolder;
yourself).
- self addApplication: (VDBRegisterListApplication new
+ registerListApp := (VDBRegisterListApplication new
debuggerHolder: self debuggerHolder;
- registerListHolder: self registerListHolder;
- yourself)
+ frameHolder: self frameHolder;
+ yourself).
+
+ self addApplication: variableObjectListApp.
+ self addApplication: registerListApp.
"Created: / 01-10-2018 / 10:03:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-03-2022 / 15:54:18 / Jan Vrany <jan.vrany@labware.com>"
! !
!VDBFrameApplication class methodsFor:'documentation'!
--- a/VDBRegisterListApplication.st Sat Jan 08 23:28:55 2022 +0000
+++ b/VDBRegisterListApplication.st Thu Mar 17 16:23:22 2022 +0000
@@ -1,7 +1,7 @@
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
-Copyright (C) 2021 LabWare
+Copyright (C) 2021-2022 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) 2021 LabWare
+Copyright (C) 2021-2022 LabWare
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
@@ -328,9 +328,11 @@
!
onStoppedEvent: aGDBStoppedEvent
- self enqueueDelayedInvalidateInternalList
+ self enqueueDelayedUpdateContents
+ "/self enqueueDelayedInvalidateInternalList
"Created: / 01-02-2018 / 23:14:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-03-2022 / 16:04:40 / Jan Vrany <jan.vrany@labware.com>"
! !
!VDBRegisterListApplication methodsFor:'initialization & release'!
--- a/VDBVariableObjectListApplication.st Sat Jan 08 23:28:55 2022 +0000
+++ b/VDBVariableObjectListApplication.st Thu Mar 17 16:23:22 2022 +0000
@@ -1,7 +1,7 @@
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
-Copyright (C) 2020-2021 LabWare
+Copyright (C) 2020-2022 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-2021 LabWare
+Copyright (C) 2020-2022 LabWare
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
@@ -144,6 +144,17 @@
"Modified: / 06-10-2018 / 09:09:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+frameHolder: aValueModel
+ | variableObjectList |
+
+ variableObjectList := (AspectAdaptor forAspect:#variables)
+ subjectChannel: aValueModel;
+ yourself.
+ self variableObjectListHolder: variableObjectList
+
+ "Created: / 17-03-2022 / 15:46:00 / Jan Vrany <jan.vrany@labware.com>"
+!
+
selectedVariableObjectHolder
"return/create the 'selectedVariableHolder' value holder (automatically generated)"