[squeak-dev] The Inbox: Tools-tcj.832.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Oct 21 22:50:28 UTC 2018

A new version of Tools was added to project The Inbox:

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

Name: Tools-tcj.832
Author: tcj
Time: 21 October 2018, 3:50:02.553053 pm
UUID: 52acbd13-8832-4974-b7ae-2f0ecfd3b4d7
Ancestors: Tools-cmm.831

Handle case where a minimized project window is deleted (and thus a changeset is removed) while a Simple Change Sorter window is open.  Stops a DNU from arising.  

Perhaps there is a more graceful way to handle this occasion in ChangeSorter>>#update or  #updateIfNecessary

=============== Diff against Tools-cmm.831 ===============

Item was changed:
  ----- Method: ChangeSorter>>setContents (in category 'code pane') -----
  	"return the source code that shows in the bottom pane"
  	| sel class strm changeType | 
  	self clearUserEditFlag.
+ 	myChangeSet ifNil: [^ contents := ''].   "should not happen but can"
  	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:
  				[: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].!

More information about the Squeak-dev mailing list