[squeak-dev] The Inbox: Tools-ct.1107.mcz

Chris Muller asqueaker at gmail.com
Mon Jan 17 23:41:43 UTC 2022


+1

On Sat, Jan 15, 2022 at 4:22 PM <commits at source.squeak.org> wrote:
>
> A new version of Tools was added to project The Inbox:
> http://source.squeak.org/inbox/Tools-ct.1107.mcz
>
> ==================== Summary ====================
>
> Name: Tools-ct.1107
> Author: ct
> Time: 15 January 2022, 11:22:06.229373 pm
> UUID: 3c64c912-518e-8841-a1a7-5998436d9da4
> Ancestors: Tools-mt.1106
>
> Implements "copy class name" and "copy system/message category name" in all code browser tools and connects them to <cmd>c, analogously to the already existing message item "copy selector".
>
> Uploaded to the inbox for the unexpected event that anyone objects against the tiny UI change. Otherwise, I will move this to the Trunk after a few days. =)
>
> =============== Diff against Tools-mt.1106 ===============
>
> Item was changed:
>   ----- Method: Browser>>classListMenu: (in category 'class functions') -----
>   classListMenu: aMenu
>         "Conveniently fit for backward compatibility with old browers stored in image segments"
>         <classListMenuShifted: false>
> +       aMenu addTranslatedList: #(
> -       aMenu addList: #(
>                 -
>                 ('browse full (b)'                      browseMethodFull)
>                 ('browse hierarchy (h)'         spawnHierarchy)
>                 ('browse protocol (p)'          browseFullProtocol)
>                 ('browse documentation'         browseAllCommentsForClass)
>                 -
>                 ('printOut'                                     printOutClass)
>                 ('fileOut'                                      fileOutClass)
> +               ('copy name (c)'                        copyClassName)
>                 -
>                 ('show hierarchy'                       hierarchy)
>                 ('show definition'                      editClass)
>                 ('show comment'                 editComment)
>                 -
>                 ('references... (r)'                    browseVariableReferences)
>                 ('assignments... (a)'                   browseVariableAssignments)
>                 ('class refs (N)'                               browseClassRefs)
>                 -
>                 ('rename class ...'                     renameClass)
>                 ('copy class'                           copyClass)
>                 ('remove class (x)'                     removeClass)
>                 -
>                 ('find method...'                               findMethod)).
> +       ^ aMenu!
> -       ^ aMenu
> - !
>
> Item was changed:
>   ----- Method: Browser>>mainMessageCategoryMenu: (in category 'message category functions') -----
>   mainMessageCategoryMenu: aMenu
>         <messageCategoryMenu>
> +       ^ aMenu addTranslatedList: #(
> -       ^ aMenu addList: #(
>                         ('browse'                                               buildMessageCategoryBrowser)
>                         ('print out'                                            printOutMessageCategories)
>                         ('file out'                                             fileOutMessageCategories)
> +                       ('copy name (c)'                                copyMessageCategoryName)
>                         -
>                         ('reorganize'                                   editMessageCategories)
>                         ('alphabetize'                                  alphabetizeMessageCategories)
>                         ('remove empty categories'      removeEmptyCategories)
>                         ('categorize all uncategorized' categorizeAllUncategorizedMethods)
>                         ('new category...'                              addCategory)
>                         -
>                         ('rename...'                                            renameCategory)
>                         ('remove (x)'                                   removeMessageCategory));
> +               yourself!
> -               yourself
> - !
>
> Item was changed:
>   ----- Method: Browser>>mainSystemCategoryMenu: (in category 'system category functions') -----
>   mainSystemCategoryMenu: aMenu
>         <systemCategoryMenu>
>         aMenu addTranslatedList: #(
>                         ('find class... (f)'                                    findClass)
>                         ('back... (b)'                                          recent)
>                         -
>                         ('browse all'                                                   browseAllClasses)
>                         ('browse'                                                       buildSystemCategoryBrowser)).
>
>         (Smalltalk isMorphic and: [self selectedPackage notNil]) ifTrue: [
>                 aMenu
>                         add: ('browse package ''{1}''' translated format: {self selectedPackage name})
>                         subMenu: (self packageMenu: ((Smalltalk isMorphic
>                                 ifTrue: [MenuMorph new defaultTarget: self; yourself]
>                                 ifFalse: [CustomMenu new])
>                                 yourself))
>                         target: self
>                         selector: #yourself
>                         argumentList: #()].
>
>         aMenu addTranslatedList: #(
>                         -
>                         ('printOut'                                                     printOutSystemCategory)
>                         ('fileOut'                                                      fileOutSystemCategory)
> +                       ('copy name (c)'                                        copySystemCategoryName)
>                         -
>                         ('reorganize'                                           editSystemCategories)
>                         ('alphabetize'                                          alphabetizeSystemCategories)
>                         -
>                         ('update'                                                       updateSystemCategories)
>                         ('add item...'                                          addSystemCategory)
>                         ('rename...'                                                    renameSystemCategory)
>                         ('remove (x)'                                           removeSystemCategory)).
>         ^ aMenu!
>
> Item was changed:
>   ----- Method: Browser>>messageCategoryListKey:from: (in category 'message category list') -----
>   messageCategoryListKey: aCharacter from: view
>
> +       aCharacter == $c ifTrue: [ ^self copyMessageCategoryName ].
>         aCharacter == $x ifTrue: [ ^self removeMessageCategory ].
>         ^self arrowKey: aCharacter from: view
>         !
>
> Item was changed:
>   ----- Method: Browser>>systemCatListKey:from: (in category 'system category list') -----
>   systemCatListKey: aChar from: view
>         "Respond to a Command key.  I am a model with a code pane, and I also have a listView that has a list of methods.  The view knows how to get the list and selection."
>
> +       aChar == $b ifTrue: [^ self recent].
> +       aChar == $c ifTrue: [^ self copySystemCategoryName].
>         aChar == $f ifTrue: [^ self findClass].
>         aChar == $x ifTrue: [^ self removeSystemCategory].
> -       aChar == $b ifTrue: [^ self recent].
>         ^ self classListKey: aChar from: view!
>
> Item was added:
> + ----- Method: CodeHolder>>copyClassName (in category 'class functions') -----
> + copyClassName
> +
> +       self selectedClassName ifNotNil: [:name |
> +               Clipboard clipboardText: name asString].!
>
> Item was added:
> + ----- Method: CodeHolder>>copyMessageCategoryName (in category 'message category functions') -----
> + copyMessageCategoryName
> +
> +       self selectedMessageCategoryName ifNotNil: [:name |
> +               Clipboard clipboardText: name asString].!
>
> Item was added:
> + ----- Method: CodeHolder>>copySystemCategoryName (in category 'system category functions') -----
> + copySystemCategoryName
> +
> +       self selectedSystemCategoryName ifNotNil: [:name |
> +               Clipboard clipboardText: name asString].!
>
> Item was changed:
>   ----- Method: StringHolder>>classListKey:from: (in category '*Tools') -----
>   classListKey: aChar from: view
>         "Respond to a Command key.  I am a model with a list of classes and a
>         code pane, and I also have a listView that has a list of methods.  The
>         view knows how to get the list and selection."
>
> -       aChar == $f ifTrue: [^ self findMethod].
> -       aChar == $r ifTrue: [^ self browseVariableReferences].
>         aChar == $a ifTrue: [^ self browseVariableAssignments].
> +       aChar == $c ifTrue: [^ self copyClassName].
> +       aChar == $f ifTrue: [^ self findMethod].
>         aChar == $h ifTrue: [^ self spawnHierarchy].
> +       aChar == $r ifTrue: [^ self browseVariableReferences].
>         aChar == $x ifTrue: [^ self removeClass].
>         ^ self messageListKey: aChar from: view!
>
>


More information about the Squeak-dev mailing list