<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Ah cool, I actually was not aware of that class menu :-)</p>
<p><br>
</p>
<p>Yes, adding more templates there via a submenu sounds reasonable to me. +1!</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob@resfarm.de><br>
<b>Gesendet:</b> Sonntag, 8. Dezember 2019 17:46:07<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Create new trait in Browser</font>
<div> </div>
</div>
<div>
<div dir="ltr">That might be nice. But I think this is too many steps ahead for now.
<div>   
<div>Today the templates are invoked either
<div>- via empty selection (for a new class deriving from Object), or</div>
<div>- the class menu (to make subclasses of the selected class).</div>
<div>The trait template should be available somewhere similar.</div>
</div>
<div><br>
</div>
<div>Hooking into the menus is probably much easier than extending the auto-completion. The unsent method addSpecialMenu: looks like it was already done or considered at some point, but then got dropped or was overlooked and forgotten.
<div></div>
</div>
<div></div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am So., 8. Dez. 2019 um 17:32 Uhr schrieb Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="gmail-m_-3379412169936079657divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>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.</p>
<p><br>
</p>
<p>Would this maybe be rather a job for a good autocompletion?</p>
<div id="gmail-m_-3379412169936079657Signature">
<div id="gmail-m_-3379412169936079657divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper">
<div>
<div id="gmail-m_-3379412169936079657Item.MessagePartBody">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: ___ <span style="font-size:12pt">instanceVariableNames:
 '' </span><span style="font-size:12pt">classVariableNames: '' </span><span style="font-size:12pt">poolDictionaries: '' </span><span style="font-size:12pt">category: 'xyz'", and also the version with #uses:).</span></div>
<div id="gmail-m_-3379412169936079657Item.MessagePartBody"><span style="font-size:12pt">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.</span></div>
<div id="gmail-m_-3379412169936079657Item.MessagePartBody"><span style="font-size:12pt"><br>
</span></div>
<div id="gmail-m_-3379412169936079657Item.MessagePartBody"><span style="font-size:12pt">This whitelist could be defined by certain message categories (Class: #'subclass creation', Trait: #'instance creation').</span></div>
<div id="gmail-m_-3379412169936079657Item.MessagePartBody"><span style="font-size:12pt">I'm not familiar with the OCompletion implementation, but a bit with
<a href="https://github.com/MrModder/Autocompletion" target="_blank">Autocompletion</a>, where the latter allows specifying custom completion controllers, so this should be possible without huge design changes. Does someone know about OCompletion?</span></div>
<div id="gmail-m_-3379412169936079657Item.MessagePartBody"><span style="font-size:12pt"><br>
</span></div>
<div id="gmail-m_-3379412169936079657Item.MessagePartBody"><span style="font-size:12pt">Best,</span></div>
<div id="gmail-m_-3379412169936079657Item.MessagePartBody"><span style="font-size:12pt">Christoph</span></div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-3379412169936079657divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>>
 im Auftrag von Jakob Reschke <<a href="mailto:forums.jakob@resfarm.de" target="_blank">forums.jakob@resfarm.de</a>><br>
<b>Gesendet:</b> Sonntag, 8. Dezember 2019 16:39:57<br>
<b>An:</b> <a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">
squeak-dev@lists.squeakfoundation.org</a><br>
<b>Betreff:</b> [squeak-dev] Create new trait in Browser</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hello,
<div><br>
</div>
<div>When I want to create a new Trait, I currently search and type the trait template myself. You know, Trait named: #foo uses: ...</div>
<div><br>
</div>
<div>Should there not be a context menu item that fills the browser code pane with the template?</div>
<div><br>
</div>
<div>I see there is Browser>>newTrait and Browser>>addSpecialMenu: but the latter has no senders in my Trunk image.</div>
<div><br>
</div>
<div>Kind regards</div>
<div>Jakob</div>
</div>
</div>
</div>
<br>
</blockquote>
</div>
</div>
</body>
</html>