[squeak-dev] The Trunk: Tools-fbs.350.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri May 6 21:12:27 UTC 2011
Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-fbs.350.mcz
==================== Summary ====================
Name: Tools-fbs.350
Author: fbs
Time: 6 May 2011, 9:13:44.159 pm
UUID: c71fe985-f3c6-5c47-9471-0d0f279bc3b8
Ancestors: Tools-cmm.348
Fix for http://bugs.squeak.org/view.php?id=7634
Everything else in a ChangeRecord uses meta as a Boolean.
=============== Diff against Tools-cmm.348 ===============
Item was changed:
----- Method: ClassCommentVersionsBrowser>>scanVersionsOf: (in category 'basic function') -----
scanVersionsOf: class
"Scan for all past versions of the class comment of the given class"
| oldCommentRemoteStr sourceFilesCopy position prevPos stamp preamble tokens prevFileIndex |
classOfMethod := class.
oldCommentRemoteStr := class organization commentRemoteStr.
currentCompiledMethod := oldCommentRemoteStr.
selectorOfMethod := #Comment.
changeList := OrderedCollection new.
list := OrderedCollection new.
listIndex := 0.
oldCommentRemoteStr ifNil:[^ nil] ifNotNil: [oldCommentRemoteStr sourcePointer].
sourceFilesCopy := SourceFiles collect:
[:x | x isNil ifTrue: [ nil ]
ifFalse: [x readOnlyCopy]].
position := oldCommentRemoteStr position.
file := sourceFilesCopy at: oldCommentRemoteStr sourceFileNumber.
[position notNil & file notNil]
whileTrue:
[file position: (0 max: position-150). " Skip back to before the preamble"
[file position < (position-1)] "then pick it up from the front"
whileTrue: [preamble := file nextChunk].
prevPos := nil.
stamp := ''.
(preamble findString: 'commentStamp:' startingAt: 1) > 0
ifTrue: [tokens := Scanner new scanTokens: preamble.
(tokens at: tokens size-3) = #commentStamp:
ifTrue: ["New format gives change stamp and unified prior pointer"
stamp := tokens at: tokens size-2.
prevPos := tokens last.
prevFileIndex := sourceFilesCopy fileIndexFromSourcePointer: prevPos.
prevPos := sourceFilesCopy filePositionFromSourcePointer: prevPos]]
ifFalse: ["The stamp get lost, maybe after a condenseChanges"
stamp := '<historical>'].
+
self addItem:
(ChangeRecord new file: file position: position type: #classComment
+ class: class name category: nil meta: class isMeta stamp: stamp)
- class: class name category: nil meta: class stamp: stamp)
text: stamp , ' ' , class name , ' class comment'.
prevPos = 0 ifTrue:[prevPos := nil].
position := prevPos.
prevPos notNil
ifTrue:[file := sourceFilesCopy at: prevFileIndex]].
sourceFilesCopy do: [:x | x notNil ifTrue: [x close]].
listSelections := Array new: list size withAll: false!
More information about the Squeak-dev
mailing list
|