[squeak-dev] The Trunk: Tools-nice.219.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 29 21:15:21 UTC 2010


Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.219.mcz

==================== Summary ====================

Name: Tools-nice.219
Author: nice
Time: 29 March 2010, 10:14:45.919 pm
UUID: f34a6d9a-9dca-6245-bfd5-9ab198a1957b
Ancestors: Tools-ar.218

Attempt to fix http://bugs.squeak.org/view.php?id=7463
currentClassName instVar is decorated with annotation and cannot be used directly as a class name.

=============== Diff against Tools-ar.218 ===============

Item was changed:
  ----- Method: ChangeSorter>>setContents (in category 'code pane') -----
  setContents
  	"return the source code that shows in the bottom pane"
  
  	| sel class strm changeType | 
  	self clearUserEditFlag.
  	currentClassName ifNil: [^ contents := myChangeSet preambleString ifNil: ['']].
  	class := self selectedClassOrMetaClass.
  	(sel := self selectedMessageName) == nil
  		ifFalse: [changeType := (myChangeSet atSelector: (sel := sel asSymbol) class: class).
  			changeType == #remove
  				ifTrue: [^ contents := 'Method has been removed (see versions)'].
  			changeType == #addedThenRemoved
  				ifTrue: [^ contents := 'Added then removed (see versions)'].
  			class ifNil: [^ contents := 'Method was added, but cannot be found!!'].
  			(class includesSelector: sel)
  				ifFalse: [^ contents := 'Method was added, but cannot be found!!'].
  			contents := class sourceCodeAt: sel.
  			(#(prettyPrint prettyDiffs) includes: contentsSymbol) ifTrue:
  				[contents :=  class prettyPrinterClass
  					format: contents in: class notifying: nil].
  			self showingAnyKindOfDiffs
  				ifTrue: [contents := self diffFromPriorSourceFor: contents].
  			^ contents := contents asText makeSelectorBoldIn: class]
  		ifTrue: [strm := WriteStream on: (String new: 100).
+ 			(myChangeSet classChangeAt: (self withoutItemAnnotation: currentClassName)) do:
- 			(myChangeSet classChangeAt: currentClassName) do:
  				[:each |
  				each = #remove ifTrue: [strm nextPutAll: 'Entire class was removed.'; cr].
  				each = #addedThenRemoved ifTrue: [strm nextPutAll: 'Class was added then removed.'].
  				each = #rename ifTrue: [strm nextPutAll: 'Class name was changed.'; cr].
  				each = #add ifTrue: [strm nextPutAll: 'Class definition was added.'; cr].
  				each = #change ifTrue: [strm nextPutAll: 'Class definition was changed.'; cr].
  				each = #reorganize ifTrue: [strm nextPutAll: 'Class organization was changed.'; cr].
  				each = #comment ifTrue: [strm nextPutAll: 'New class comment.'; cr.
  				]].
  			^ contents := strm contents].!

Item was changed:
  CodeHolder subclass: #ChangeSorter
  	instanceVariableNames: 'parent myChangeSet currentClassName currentSelector priorChangeSetList'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Tools-Changes'!
  
+ !ChangeSorter commentStamp: 'wiz 2/3/2010 23:38' prior: 0!
+ I display a ChangeSet.  Two of me are in a DualChangeSorter.
+ 
+ aStringOrNil
+ Instance Variables
+ 	currentClassName:		<aStringOrNil>
+ 	currentSelector:		<aStringOrNil>
+ 	myChangeSet:		<aChangeSet>
+ 	parent:		<aDualChangeSorterOrNil>
+ 	priorChangeSetList:		<aCollection>
+ 
+ 
+ currentClassName
+ 	- string parseable into class-name [class] [class trait]
+ 	needs to be fitlered by (self withoutItemAnnotation: currentClassName) to remove pakaging note
+ 
+ 
+ currentSelector
+ 	- string parseable into selector-name 
+ 	needs to be fitlered by (self withoutItemAnnotation: currentSelector) to remove pakaging note
+ 
+ myChangeSet
+ 	- name of current changeset
+ parent
+ 	-the dual changesorter that contains this one. Used for dealing with the other half.
+ priorChangeSetList
+ 	- holds the current change set list. Used to detect changes in list when a newly generated list no long match the prior list.
+ 	!
- !ChangeSorter commentStamp: '<historical>' prior: 0!
- I display a ChangeSet.  Two of me are in a DualChangeSorter.!

Item was changed:
  SelectionMenu subclass: #CustomMenu
  	instanceVariableNames: 'labels dividers lastDivider title targets arguments'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Tools-Menus'!
  
+ !CustomMenu commentStamp: 'nice 3/24/2010 07:36' prior: 0!
- !CustomMenu commentStamp: '<historical>' prior: 0!
  I am used to build menus on-the-fly. I maintain lists of menu items, actions (usually symbols to be sent as messages), and menu section dividing lines to which my clients may append new entries and lines by sending me the messages:
  
  	add: aString action: anAction
  	addLine
  
  After the menu is constructed, it may be invoked with one of the following messages:
  
  	startUp: initialSelection
  	startUp
  
  I am a subclass of ActionMenu, so I inherit a number of instance variables. The ones I am particularly concerned with are:
  
+ 	items := an OrderedCollection of strings to appear in the menu
+ 	selectors := an OrderedCollection of Symbols to be used as message selectors
+ 	lineArray := an OrderedCollection of line positions
+ 	lastLine := used to keep track of the last line to avoid making duplicate entries in lineArray!
- 	items _ an OrderedCollection of strings to appear in the menu
- 	selectors _ an OrderedCollection of Symbols to be used as message selectors
- 	lineArray _ an OrderedCollection of line positions
- 	lastLine _ used to keep track of the last line to avoid making duplicate entries in lineArray!




More information about the Squeak-dev mailing list