Skip to content

Commit

Permalink
Merge pull request #153 from MarcusDenker/Merge-StInspectorTempNode-S…
Browse files Browse the repository at this point in the history
…tDebuggerInspectorTempNode

Merge-StInspectorTempNode-StDebuggerInspectorTempNode
  • Loading branch information
estebanlm authored Jan 6, 2021
2 parents 481f690 + 614b800 commit 49afd3f
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 59 deletions.
11 changes: 11 additions & 0 deletions src/NewTools-Debugger/ArgumentVariable.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Extension { #name : #ArgumentVariable }

{ #category : #'*NewTools-Debugger' }
ArgumentVariable >> debuggerColor [
^(SHRBTextStyler new attributesFor: #true) first color
]

{ #category : #'*NewTools-Debugger' }
ArgumentVariable >> variableTag [
^ 'arg'
]
2 changes: 1 addition & 1 deletion src/NewTools-Debugger/StDebuggerContext.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ StDebuggerContext >> stackTopNode [
StDebuggerContext >> temporaryVariablesNodes [

^ self context astScope allTemps collect: [ :temp |
(StDebuggerInspectorTempNode hostObject: self context) tempVariable: temp ]
(StInspectorTempNode hostObject: self context) tempVariable: temp ]
]

{ #category : #nodes }
Expand Down
56 changes: 0 additions & 56 deletions src/NewTools-Debugger/StDebuggerInspectorTempNode.class.st

This file was deleted.

11 changes: 11 additions & 0 deletions src/NewTools-Debugger/TemporaryVariable.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Extension { #name : #TemporaryVariable }

{ #category : #'*NewTools-Debugger' }
TemporaryVariable >> debuggerColor [
^(SHRBTextStyler new attributesFor: #string) first color
]

{ #category : #'*NewTools-Debugger' }
TemporaryVariable >> variableTag [
^ 'temp'
]
35 changes: 35 additions & 0 deletions src/NewTools-Inspector/StInspectorTempNode.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,35 @@ Class {
#category : #'NewTools-Inspector-Model'
}

{ #category : #comparing }
StInspectorTempNode >> = anObject [

"Answer whether the receiver and anObject represent the same object."

self == anObject ifTrue: [ ^ true ].
self class = anObject class ifFalse: [ ^ false ].
^ tempVariable = anObject tempVariable and: [
hostObject = anObject hostObject ]
]

{ #category : #accessing }
StInspectorTempNode >> children [
^ #()
]

{ #category : #accessing }
StInspectorTempNode >> debuggerColor [
^ tempVariable debuggerColors
]

{ #category : #comparing }
StInspectorTempNode >> hash [

"Answer an integer value that is related to the identity of the receiver."

^ tempVariable hash bitXor: (hostObject hash)
]

{ #category : #accessing }
StInspectorTempNode >> key [
^ tempVariable name
Expand All @@ -34,3 +63,9 @@ StInspectorTempNode >> tempVariable [
StInspectorTempNode >> tempVariable: anObject [
tempVariable := anObject
]

{ #category : #accessing }
StInspectorTempNode >> variableTag [

^ tempVariable variableTag
]
4 changes: 2 additions & 2 deletions src/NewTools-Inspector/StNodeCollector.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ StNodeCollector >> slotNodes [

{ #category : #building }
StNodeCollector >> tempNodesForContext: aContext [
^ aContext astScope allTemps collect: [ :temp |
(StInspectorTempNode hostObject: aContext) tempVariable: temp]

^ aContext astScope allTemps collect: [ :temp |
(StInspectorTempNode hostObject: aContext) tempVariable: temp ]
]

0 comments on commit 49afd3f

Please sign in to comment.