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

commits at source.squeak.org commits at source.squeak.org
Fri Jul 8 17:45:16 UTC 2011

Levente Uzonyi uploaded a new version of Tools to project The Trunk:

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

Name: Tools-fbs.364
Author: fbs
Time: 27 June 2011, 12:56:26.402 pm
UUID: c881a91c-eaac-4a40-acfb-79fbe119558f
Ancestors: Tools-fbs.363

Mantis #7648: when deselecting a class after a class-side method's been viewed, the selectedMessageName must be nil: you can't be viewing a method at this point!

=============== Diff against Tools-fbs.363 ===============

Item was changed:
  ----- Method: Browser>>selectClassNamed: (in category 'class list') -----
  selectClassNamed: aSymbolOrString
  	| className currentMessageCategoryName currentMessageName |
  	currentMessageCategoryName := [self selectedMessageCategoryName]
  										on: Error
  										do: [:ex| ex return: nil].
  	currentMessageName := [self selectedMessageName]
  								on: Error
  								do: [:ex| ex return: nil].
  	selectedClassName := aSymbolOrString ifNotNil: [ aSymbolOrString asSymbol ].
  	self setClassOrganizer.
  	"Try to reselect the category and/or selector if the new class has them."
  	selectedMessageCategoryName :=(self messageCategoryList includes: currentMessageCategoryName)
  		ifTrue: [currentMessageCategoryName]
  		ifFalse: [nil].
+ 	selectedMessageName := (self messageList includes: currentMessageName)
+ 		ifTrue: [currentMessageName]
+ 		ifFalse: [nil].
- 	selectedMessageName := currentMessageName.
  	self hasMessageSelected ifTrue:
  		[self editSelection: #editMessage] ifFalse:
  	[self hasMessageCategorySelected ifTrue:
  		[self editSelection: #newMessage] ifFalse:
  	[self classCommentIndicated
  		ifTrue: [self editSelection: #editComment]
  		ifFalse: [self editSelection: (self hasClassSelected not
  					ifTrue: [(metaClassIndicated or: [ self hasSystemCategorySelected not ])
  						ifTrue: [#none]
  						ifFalse: [#newClass]]
  					ifFalse: [#editClass])]]].
  	contents := nil.
  	self selectedClass isNil
  		ifFalse: [className := self selectedClass name.
  					(RecentClasses includes: className)
  				ifTrue: [RecentClasses remove: className].
  			RecentClasses addFirst: className.
  			RecentClasses size > 16
  				ifTrue: [RecentClasses removeLast]].
  	self changed: #classSelectionChanged.
  	self changed: #classCommentText.
  	self changed: #classListIndex.	"update my selection"
  	self changed: #messageCategoryList.
  	self changed: #messageList.
  	self changed: #relabel.
  	self contentsChanged!

More information about the Squeak-dev mailing list