[squeak-dev] Merge Request: browseUsersOfTrait.1.cs

christoph.thiede at student.hpi.uni-potsdam.de christoph.thiede at student.hpi.uni-potsdam.de
Wed Oct 27 08:40:37 UTC 2021


Hi Jakob,

> there seems to have been a query implemented already, doesn't it?

Well, yeah, that's not a secret, I had only wrapped this for the SystemNavigation:

    allUsersOf: aTrait

        ^ aTrait users collect: [:class | MethodReference class: class selector: #Definition]

But when you mentioned the word "hierarchy", you gave me a better idea of how we can integrate trait users into our base tooling ... Why not simply integrate "subtraits" (users) and "supertraits" (other traits from the trait composition) into the hierarchy browser? :D

I gave this a try, summarizing subclasses/trait users and superclasses/composed traits under a small protocol for "ancestors" and "sucsessors" on Behavior, and think that the result works pretty nice, at least for me. Please see the attached change set and the screenshot. Hope you like it. :-)

Best,
Christoph

---
Sent from Squeak Inbox Talk

On 2021-10-27T20:20:04+02:00, jakres+squeak at gmail.com wrote:

> Until now I used the hierarchy view one gets when pressing the ?
> button for the class comment a few more times. Arguably this makes it
> more discoverable. But that it has also worked before means that there
> seems to have been a query implemented already, doesn't it?
> 
> Am Mi., 27. Okt. 2021 um 19:41 Uhr schrieb
> <christoph.thiede at student.hpi.uni-potsdam.de>:
> >
> > This small changeset adds a query to the system navigation and an item to the context menu of a trait in a system browser for browsing all users of this trait.
> >
> > Please review & merge. :-)
> >
> > ---
> > Sent from Squeak Inbox Talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211027/682329b5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: browseTraitHierarchy.1.cs
Type: application/octet-stream
Size: 3419 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211027/682329b5/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: browseTraitHierarchy.png
Type: application/octet-stream
Size: 44170 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211027/682329b5/attachment-0003.obj>


More information about the Squeak-dev mailing list