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

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Jan 17 13:00:09 UTC 2022


Hi Marcel,


in which particular place did I deviate from this rule ("just copy the text that the user currently sees"? Are you proposing to copy *all* visible items instead of the only selected one? I'm not sure whether there are any applications for such a feature. :-)


Best,

Christoph


PS: Your e-mail client has absorbed the <cmd>c from the original message. :P

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Januar 2022 12:21:28
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Tools-ct.1107.mcz

Hi Christoph --

If would be nice if you would just copy the text that the user currently sees in the particular list widget. Maybe #withBlanksTrimmed.l At least for the keyboard shortcut CMD+C. In the popup menu, you can be more fine-grained as you proposed.

Best,
Marcel

Am 15.01.2022 23:22:21 schrieb commits at source.squeak.org <commits at source.squeak.org>:

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 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"

+ 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

+ ^ 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

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!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220117/aa3450ec/attachment.html>


More information about the Squeak-dev mailing list