[squeak-dev] Create new trait in Browser

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Dec 8 16:32:08 UTC 2019


Nice idea! I have been using Traits for only one time in my Squeak life so far, but they surely can be helpful in certain cases.


Would this maybe be rather a job for a good autocompletion?

If I'm creating code, I will not search in any menus. I would like to type "Trait" into the class definition field and be proposed "Trait named: ___ uses: ___". Same for "Morph" ("Morph subclass: ___ instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'xyz'", and also the version with #uses:).
The autocompletion could detect that you are typing into a class definition field and then first suggest selectors from a whitelist of the ones mentioned above.

This whitelist could be defined by certain message categories (Class: #'subclass creation', Trait: #'instance creation').
I'm not familiar with the OCompletion implementation, but a bit with Autocompletion<https://github.com/MrModder/Autocompletion>, where the latter allows specifying custom completion controllers, so this should be possible without huge design changes. Does someone know about OCompletion?

Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob at resfarm.de>
Gesendet: Sonntag, 8. Dezember 2019 16:39:57
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] Create new trait in Browser

Hello,

When I want to create a new Trait, I currently search and type the trait template myself. You know, Trait named: #foo uses: ...

Should there not be a context menu item that fills the browser code pane with the template?

I see there is Browser>>newTrait and Browser>>addSpecialMenu: but the latter has no senders in my Trunk image.

Kind regards
Jakob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191208/e9112fc5/attachment.html>


More information about the Squeak-dev mailing list