[squeak-dev] The Trunk: Tools-fbs.434.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 3 20:30:37 UTC 2013


Frank Shearar uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-fbs.434.mcz

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

Name: Tools-fbs.434
Author: fbs
Time: 3 January 2013, 8:30:01.897 pm
UUID: ca7203ee-5227-4b9e-afe9-4fc7b1a5a8cd
Ancestors: Tools-cwp.433

Pulling these bits out makes new kinds of Browsers able to partially override behaviour.

=============== Diff against Tools-cwp.433 ===============

Item was changed:
  ----- Method: Browser>>contents (in category 'accessing') -----
  contents
  	"Depending on the current selection, different information is retrieved.
  	Answer a string description of that information. This information is the
  	method of the currently selected class and message."
  
  	| comment theClass latestCompiledMethod |
  	latestCompiledMethod := currentCompiledMethod.
  	currentCompiledMethod := nil.
  
  	editSelection == #newTrait
  		ifTrue: [^ClassDescription newTraitTemplateIn: self selectedSystemCategory].
  	editSelection == #none ifTrue: [^ ''].
  	editSelection == #editSystemCategories 
  		ifTrue: [^ systemOrganizer printString].
  	editSelection == #newClass 
+ 		ifTrue: [^ self newClassContents].
- 		ifTrue: [^ (theClass := self selectedClass)
- 			ifNil:
- 				[Class template: self selectedSystemCategory]
- 			ifNotNil:
- 				[Class templateForSubclassOf: theClass category: self selectedSystemCategory]].
  	editSelection == #editClass 
  		ifTrue: [^self classDefinitionText].
  	editSelection == #editComment 
  		ifTrue:
  			[(theClass := self selectedClass) ifNil: [^ ''].
  			comment := theClass comment.
  			currentCompiledMethod := theClass organization commentRemoteStr.
  			^ comment size = 0
  				ifTrue: ['This class has not yet been commented.']
  				ifFalse: [comment]].
  	editSelection == #hierarchy 
  		ifTrue: [^self selectedClassOrMetaClass printHierarchy].
  	editSelection == #editMessageCategories 
  		ifTrue: [^ self classOrMetaClassOrganizer printString].
  	editSelection == #newMessage
  		ifTrue:
  			[^ (theClass := self selectedClassOrMetaClass) 
  				ifNil: ['']
  				ifNotNil: [theClass sourceCodeTemplate]].
  	editSelection == #editMessage
  		ifTrue:
  			[^ self editContentsWithDefault:
  				[currentCompiledMethod := latestCompiledMethod.
  				self selectedMessage]].
  
  	self error: 'Browser internal error: unknown edit selection.'!

Item was added:
+ ----- Method: Browser>>newClassContents (in category 'accessing') -----
+ newClassContents
+ 	| theClass |
+ 	^ (theClass := self selectedClass)
+ 		ifNil:
+ 			[Class template: self selectedSystemCategory]
+ 		ifNotNil:
+ 			[Class templateForSubclassOf: theClass category: self selectedSystemCategory]!



More information about the Squeak-dev mailing list