VDBSourceAndDisassemblyApplication.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 21 Sep 2019 18:31:45 +0100
changeset 185 bb863cb24c1a
parent 164 364ebdd1d42c
child 193 e6393500a665
permissions -rw-r--r--
Do not try to raise transcript window if `Transcript` is not graphical ...but - for instance - a `StdOut` or `StdErr`.

"
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 }"

VDBTabbingContainer subclass:#VDBSourceAndDisassemblyApplication
	instanceVariableNames:'frameHolder'
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-UI-Source'
!

!VDBSourceAndDisassemblyApplication 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/
"
! !

!VDBSourceAndDisassemblyApplication methodsFor:'aspects'!

frameHolder
    "return/create the 'frameHolder' value holder (automatically generated)"

    frameHolder isNil ifTrue:[
        frameHolder := ValueHolder new.
        frameHolder addDependent:self.
    ].
    ^ frameHolder
!

frameHolder:aValueModel
    "set the 'frameHolder' value holder (automatically generated)"

    |oldValue newValue|

    frameHolder notNil ifTrue:[
        oldValue := frameHolder value.
        frameHolder removeDependent:self.
    ].
    frameHolder := aValueModel.
    components do:[:each | 
        each application perform: #frameHolder: with: frameHolder .
        MessageNotUnderstood ignoreIn:[  
            each application perform: #disassemblableHolder: with: frameHolder
        ]
    ].
    frameHolder notNil ifTrue:[
        frameHolder addDependent:self.
    ].
    newValue := frameHolder value.
    oldValue ~~ newValue ifTrue:[
        self update:#value with:newValue from:frameHolder.
    ].

    "Modified: / 10-06-2019 / 22:37:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBSourceAndDisassemblyApplication methodsFor:'initialization'!

initialize
    super initialize.
    self addApplication: (VDBSourceApplication new
                            debuggerHolder: self debuggerHolder;
                            frameHolder:  self frameHolder;
                            yourself).
    self addApplication: (VDBInstructionListApplication new
                            debuggerHolder: self debuggerHolder;
                            disassemblableHolder: self frameHolder;
                            frameHolder: self frameHolder;
                            yourself)

    "Created: / 01-10-2018 / 12:45:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 10-06-2019 / 12:46:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified (format): / 10-06-2019 / 22:31:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBSourceAndDisassemblyApplication class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !