Performance: do not update contents of windows when not needed
...such as when the tab with it is not visible. This ought to make debugger
feel more "snappy" for complex programs running on slow machines and / or
during remote debugging sessions.
Common code for this has been factored out to new abstract class
`VDBAbstractContentsApplication`. `VDBSbstractListApplication` and subclasses
have been adapted to use this feature.
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
"{ Package: 'jv:vdb' }"
"{ NameSpace: Smalltalk }"
VDBAbstractApplication subclass:#VDBAbstractContentsApplication
instanceVariableNames:'contentsValid'
classVariableNames:''
poolDictionaries:''
category:'VDB-UI-Abstract'
!
!VDBAbstractContentsApplication class methodsFor:'documentation'!
copyright
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
! !
!VDBAbstractContentsApplication class methodsFor:'queries'!
isAbstract
"Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again."
^ self == VDBAbstractContentsApplication.
! !
!VDBAbstractContentsApplication methodsFor:'change & update'!
enqueueDelayedUpdateContents
contentsValid := false.
windowVisible ifTrue:[
self enqueueDelayedUpdate:#delayedUpdateContentsInternal
]
"Created: / 01-10-2018 / 12:56:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 14-02-2019 / 16:11:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
updateAfterWindowVisibilityChanged
contentsValid ifFalse:[
self enqueueDelayedUpdateContents
].
"Created: / 14-02-2019 / 16:17:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!VDBAbstractContentsApplication methodsFor:'change & update-delayed'!
delayedUpdateContents
self subclassResponsibility
"Created: / 14-02-2019 / 16:16:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
delayedUpdateContentsInternal
"/ For internal use, do not override!!"
contentsValid := false.
windowVisible ifTrue:[
self delayedUpdateContents.
contentsValid := true.
].
"Created: / 14-02-2019 / 16:09:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!VDBAbstractContentsApplication methodsFor:'initialization'!
initialize
super initialize.
contentsValid := false.
"Created: / 14-02-2019 / 16:18:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !