[Cuis-dev] Refactoring proposal for Browser>>messageCategoryList and Browser>>messageList
Facundo Javier Gelatti
javiergelatti at gmail.com
Tue Sep 22 16:01:15 PDT 2026
Hello!
This is a follow-up to the changes I sent in April ("Refactoring proposal
for Browser>>classList"). The goal of these changes is to improve the
separation between content and presentation in the browser. Last time I
worked on the class list, and now the attached changesets apply the same
idea to the message categories and methods lists, by giving each list a
single extension point where the presentation of their items can be defined.
I kept the same conventions of the previous changes, where the messages for
the class list were #classList (returns a collection of classes),
#classItems (returns labels), and #labelForClass: (returns the label for
each class).
In this case we have something similar: #messageCategoryList/#messageList
return symbols, #messageCategoryItems/#messageItems return labels, and
#labelForCategory:/#labelForSelector: return the label specific for one
category/selector.
To help during review, I split the work into small sequential change sets,
each of which also migrates the windows already open in the image. Here's a
summary of the changes:
1. *implement_labelForCategory_for_browser*: the extension point for the
message categories list.
2. *implement_labelForSelector_for_browser*: the extension point for the
methods list. The coloring that CodeFileBrowser used to do inside
#messageList moves to its #labelForSelector: override, so the
#messageList override is no longer needed. I also adjusted
#categorizeUnderCategoryAt:selector: because drag and drop now passes it
an item, not a selector.
3. *use_labelForSelector_from_ChangeSorter*: the ChangeSorter method
list is now a regular PluggableListMorph over #messageItems, so the
index methods now translate between the index and #currentSelector.
4. *implement_labelForSelector_for_MethodSet*: the same extension point
for MethodSet. I also included a small cleanup of a redundant assignment
in MessageNames>>messageList.
5. *haveFun*: this last one is not meant for integration, but it's
useful to test the changes. It overrides the three label methods to show
icons and colors in all of the lists, to demonstrate what the extension
points make possible.
Cheers!
Facu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260922/70ae1665/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.implement_labelForCategory_for_browser-FJG.001.cs.st
Type: application/vnd.sailingtracker.track
Size: 3035 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260922/70ae1665/attachment-0005.st>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.implement_labelForSelector_for_browser-FJG.001.cs.st
Type: application/vnd.sailingtracker.track
Size: 3897 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260922/70ae1665/attachment-0006.st>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.use_labelForSelector_from_ChangeSorter-FJG.001.cs.st
Type: application/vnd.sailingtracker.track
Size: 3897 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260922/70ae1665/attachment-0007.st>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4.implement_labelForSelector_for_MethodSet-FJG.001.cs.st
Type: application/vnd.sailingtracker.track
Size: 1556 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260922/70ae1665/attachment-0008.st>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5.haveFun.st
Type: application/vnd.sailingtracker.track
Size: 27379 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260922/70ae1665/attachment-0009.st>
More information about the Cuis-dev
mailing list