Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.227.mcz ==================== Summary ==================== Name: Morphic-ar.227 Author: ar Time: 12 November 2009, 8:28:28 am UUID: c0b674db-e685-7e48-a37c-3c9b6155c239 Ancestors: Morphic-ar.226, Morphic-ul.226 Merging Morphic-ul.226 - moved all #explorerContents and #hasContentsInExplorer to Morphic-Explorer - reimplemented #explorerContents in Dictionary, Integer, SequenceableCollection and Set =============== Diff against Morphic-ar.226 =============== Item was added: + ----- Method: SequenceableCollection>>explorerContents (in category '*Morphic-Explorer') ----- + explorerContents + + ^Array new: self size streamContents: [ :stream | + 1 to: self size do: [ :index | + stream nextPut: ( + ObjectExplorerWrapper + with: (self at: index) + name: index printString + model: self) ] ]! Item was added: + ----- Method: Set>>hasContentsInExplorer (in category '*Morphic-Explorer') ----- + hasContentsInExplorer + + ^self isEmpty not! Item was added: + ----- Method: Dictionary>>hasContentsInExplorer (in category '*Morphic-Explorer') ----- + hasContentsInExplorer + + ^self isEmpty not! Item was added: + ----- Method: OrderedCollection>>hasContentsInExplorer (in category '*Morphic-Explorer') ----- + hasContentsInExplorer + + ^self isEmpty not! Item was added: + ----- Method: Object>>hasContentsInExplorer (in category '*Morphic-Explorer') ----- + hasContentsInExplorer + + ^self basicSize > 0 or: [self class allInstVarNames isEmpty not] + ! Item was added: + ----- Method: Integer>>explorerContents (in category '*Morphic-Explorer') ----- + explorerContents + + ^#( + ('hexadecimal' 16) + ('octal' 8) + ('binary' 2)) collect: [ :each | + ObjectExplorerWrapper + with: each first translated + name: (self printStringBase: each second) + model: self ]! Item was added: + ----- Method: Float>>hasContentsInExplorer (in category '*Morphic-Explorer') ----- + hasContentsInExplorer + + ^false! Item was added: + ----- Method: CompiledMethod>>explorerContents (in category '*Morphic-Explorer') ----- + explorerContents + "(CompiledMethod compiledMethodAt: #explorerContents) explore" + + ^Array streamContents: + [:s| | tokens | + tokens := Scanner new scanTokens: (self headerDescription readStream skipTo: $"; upTo: $"). + s nextPut: (ObjectExplorerWrapper + with: ((0 to: tokens size by: 2) collect: + [:i| i = 0 ifTrue: [self header] ifFalse: [{tokens at: i - 1. tokens at: i}]]) + name: 'header' + model: self). + (1 to: self numLiterals) do: + [:key| + s nextPut: (ObjectExplorerWrapper + with: (self literalAt: key) + name: ('literal', key printString contractTo: 32) + model: self)]. + self isQuick + ifTrue: [s nextPut: (ObjectExplorerWrapper + with: self symbolic + name: #symbolic + model: self)] + ifFalse: + [self symbolicLinesDo: + [:pc :line| + pc <= 1 + ifTrue: + [s nextPut: (ObjectExplorerWrapper + with: line + name: 'pragma' + model: self)] + ifFalse: + [s nextPut: (ObjectExplorerWrapper + with: line + name: pc printString + model: self)]]]. + "should be self numLiterals + 1 * Smalltalk wordSize + 1" + self endPC + 1 + to: self basicSize + do: [:key| + s nextPut: (ObjectExplorerWrapper + with: (self basicAt: key) + name: key printString + model: self)]]! Item was added: + ----- Method: Set>>explorerContents (in category '*Morphic-Explorer') ----- + explorerContents + + ^Array new: self size streamContents: [ :stream | + self do: [ :each | + stream nextPut: ( + ObjectExplorerWrapper + with: each + name: (stream position + 1) printString + model: self) ] ]! Item was added: + ----- Method: String>>hasContentsInExplorer (in category '*Morphic-Explorer') ----- + hasContentsInExplorer + + ^false! Item was added: + ----- Method: Integer>>hasContentsInExplorer (in category '*Morphic-Explorer') ----- + hasContentsInExplorer + ^true! Item was added: + ----- Method: Dictionary>>explorerContents (in category '*Morphic-Explorer') ----- + explorerContents + + ^self keysSortedSafely replace: [ :key | + ObjectExplorerWrapper + with: (self at: key) + name: (key printString contractTo: 32) + model: self ] + ! |
Free forum by Nabble | Edit this page |