VDBInstructionsAndSourcePresenter.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sun, 29 Jul 2018 22:03:48 +0100
changeset 86 e056e2aa79a1
parent 80 7a9cf1d6be50
child 91 c9da2e1b0327
permissions -rw-r--r--
UX: show veriable value also as tooltip This is useful when value is (very) long and don't fit into a list (so the list view shortens the text).

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

VDBAbstractPresenter subclass:#VDBInstructionsAndSourcePresenter
	instanceVariableNames:'instructionsAndSource'
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-Presentation'
!

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

!VDBInstructionsAndSourcePresenter methodsFor:'accessing'!

address
    ^ instructionsAndSource address

    "Created: / 26-06-2018 / 12:37:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 03-07-2018 / 14:52:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

basicBlock
    ^ self children first basicBlock

    "Created: / 26-06-2018 / 12:37:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

subject
    "Return an instance of GDB object that this presenter displays."

    ^ instructionsAndSource

    "Created: / 22-06-2018 / 15:10:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBInstructionsAndSourcePresenter methodsFor:'initialization'!

setInstructionsAndSource: aGDBInstructionsAndSourceLine
    instructionsAndSource := aGDBInstructionsAndSourceLine

    "Created: / 22-06-2018 / 12:40:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBInstructionsAndSourcePresenter methodsFor:'protocol-accessing'!

fetchChildren
    ^ instructionsAndSource instructions collect:[ :i | VDBInstructionPresenter new setInstruction: i; parent: self ]

    "Created: / 22-06-2018 / 12:19:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

label
    ^ instructionsAndSource file, ':  ', instructionsAndSource line printString

    "Created: / 22-06-2018 / 12:22:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBInstructionsAndSourcePresenter methodsFor:'testing'!

isInstructionsAndSourcePresenter
    ^ true
! !