[squeak-dev] The Trunk: Tools-cbc.746.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Mar 10 22:09:43 UTC 2017
Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cbc.746.mcz
==================== Summary ====================
Name: Tools-cbc.746
Author: cbc
Time: 8 March 2017, 4:53:23.157166 pm
UUID: a31e7f9b-00c9-b04a-ab5e-c1dcfe5fc27d
Ancestors: Tools-jr.745
When added a new method cateogry, the new category is set as the current category.
This means any immediately entered methods will go to the new messageCategory and not the old one (or unclassified, depending on where your mouse was when you added the new category).
=============== Diff against Tools-jr.745 ===============
Item was changed:
----- Method: Browser>>addCategory (in category 'message category functions') -----
addCategory
"Present a choice of categories or prompt for a new category name and add it before the current selection, or at the end if no current selection"
| labels reject lines newName oldCategory |
self okToChange ifFalse: [^ self].
self hasClassSelected ifFalse: [^ self].
labels := OrderedCollection new.
reject := Set new.
reject
addAll: self selectedClassOrMetaClass organization categories;
add: ClassOrganizer nullCategory;
add: ClassOrganizer default.
lines := OrderedCollection new.
self selectedClassOrMetaClass allSuperclasses do: [:cls | | cats |
cls = Object ifFalse: [
cats := cls organization categories reject:
[:cat | reject includes: cat].
cats isEmpty ifFalse: [
lines add: labels size.
labels addAll: cats asSortedCollection.
reject addAll: cats]]].
(newName := UIManager default
chooseFromOrAddTo: labels
lines: lines
title: 'Add Category') ifNil: [^ self].
- oldCategory := self selectedMessageCategoryName.
newName isEmpty
ifTrue: [^ self]
ifFalse: [newName := newName asSymbol].
+ oldCategory := self selectedMessageCategoryName.
self classOrMetaClassOrganizer
addCategory: newName
before: (self hasMessageCategorySelected
ifFalse: [nil]
ifTrue: [self selectedMessageCategoryName]).
self changed: #messageCategoryList.
+ self selectMessageCategoryNamed: newName.
- self selectMessageCategoryNamed:
- (oldCategory isNil
- ifTrue: [self classOrMetaClassOrganizer categories last]
- ifFalse: [oldCategory]).
self changed: #messageCategoryList.
!
More information about the Squeak-dev
mailing list
|