40 lines
852 B
Smalltalk
40 lines
852 B
Smalltalk
Class {
|
|
#name : #GrafoscopioCodeNode,
|
|
#superclass : #GrafoscopioTrunkNode,
|
|
#instVars : [
|
|
'icon',
|
|
'body'
|
|
],
|
|
#category : #'Grafoscopio-Model'
|
|
}
|
|
|
|
{ #category : #adding }
|
|
GrafoscopioCodeNode >> addNode: aNode [
|
|
"Adds the given node to the receivers collection of children, and sets this object as the parent
|
|
of the node"
|
|
"aNode parent = self ifTrue: [ ^ self ]."
|
|
self children add: aNode.
|
|
aNode parent: self.
|
|
^aNode
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioCodeNode >> content [
|
|
^ body ifNil:[ '' ]
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioCodeNode >> header [
|
|
^ super header, ' (Code)'
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioCodeNode >> shouldAskBeforeRemove [
|
|
^ self content isNotEmpty
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioCodeNode >> specModelClass [
|
|
^ GrafoscopioNewCodeModel
|
|
]
|