The Inbox: Tools-cbc.746.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Tools-cbc.746.mcz

commits-2
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/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.
  !


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-cbc.746.mcz

Nicolas Cellier
+1
this bothers me from time to time

2017-03-09 1:53 GMT+01:00 <[hidden email]>:
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/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.
  !