<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi Tony,</p>
<p><br>
</p>
<p>> <span style="font-size:12pt">Would a patch to ToolSet be welcome to add, say, `browseEnvironment:` </span><span style="font-size:12pt">and a convenience `Environment >> browse` to the various ToolSets?</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">To me, this looks like a useful enhancement!</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">> </span><span style="font-size:12pt">Would some thinking about </span><span style="font-size:12pt"></span><span style="font-size:12pt">how to surface those in the tooling be welcome?</span><span style="font-size:12pt"></p>
<div><br>
</div>
<div>Definitively! <span style="font-size:12pt">Maybe we could add an item to the browser's window menu that
</span><span style="font-size:12pt">pops up an environment selector (basically UIManager chooseFrom... and an accessor for Environment Instances) to change the currently visible environment in a browser? How would this look like in a PackagePaneBrowser?</span></div>
<div><span style="font-size:12pt"><br>
</span></div>
<div><span style="font-size:12pt">An important use case for Environments that I could think of would be to clone a class (hierarchy) to edit a copy of it and replacing the original class in the main environment. For example, when refactoring the Compiler ...
 I think we would need much more tooling for this and probably also some tests. I don't know how well environments are being supported right now - but for example, they are not even nestable at the moment, which would be helpful for the use case I have given.
 This is an interesting construction site! :-)</span></div>
<div><span style="font-size:12pt"><br>
</span></div>
<div><span style="font-size:12pt">Best,</span></div>
<div><span style="font-size:12pt">Christoph</span></div>
</span>
<p></p>
<div id="x_Signature">
<div id="x_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="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Tony Garnock-Jones <tonyg@leastfixedpoint.com><br>
<b>Gesendet:</b> Mittwoch, 24. März 2021 16:40:17<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> [squeak-dev] ToolSet and Environments (was Re: The Trunk: Tools-tonyg.1032.mcz)</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi all,<br>
<br>
I've been experimenting with Environments a little. They look promising, <br>
but if I understand correctly we don't have much in the way of tool <br>
support for them yet?<br>
<br>
Would a patch to ToolSet be welcome to add, say, `browseEnvironment:` <br>
and a convenience `Environment >> browse` to the various ToolSets? It <br>
took a little digging before I found<br>
<br>
(Browser new selectEnvironment: someEnvironment) buildAndOpenFullBrowser<br>
<br>
Further than that, there seems not to be many users of Environment's <br>
class-side Instances variable yet. Is it intended to be a kind of <br>
registry of available in-image Environments? Would some thinking about <br>
how to surface those in the tooling be welcome?<br>
<br>
Tony<br>
<br>
<br>
<br>
On 3/24/21 3:36 PM, commits@source.squeak.org wrote:<br>
> Tony Garnock-Jones uploaded a new version of Tools to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/Tools-tonyg.1032.mcz">http://source.squeak.org/trunk/Tools-tonyg.1032.mcz</a><br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: Tools-tonyg.1032<br>
> Author: tonyg<br>
> Time: 24 March 2021, 4:36:27.132139 pm<br>
> UUID: 1077d608-e946-49dd-99f0-3a55ffe06e81<br>
> Ancestors: Tools-mt.1031<br>
> <br>
> Repair Browser to allow selection of classes in non-default Environments.<br>
> <br>
> =============== Diff against Tools-mt.1031 ===============<br>
> <br>
> Item was changed:<br>
>    ----- Method: Browser>>addTrait (in category 'traits') -----<br>
>    addTrait<br>
>        | input trait |<br>
>        input := UIManager default request: 'add trait'.<br>
>        input isEmptyOrNil ifFalse: [<br>
> +              trait := self environment classNamed: input.<br>
> -              trait := Smalltalk classNamed: input.<br>
>                (trait isNil or: [trait isTrait not]) ifTrue: [<br>
>                        ^self inform: 'Input invalid. ' , input , ' does not exist or is not a trait'].<br>
>                self selectedClass setTraitComposition: self selectedClass traitComposition asTraitComposition +  trait.<br>
>                self contentsChanged].<br>
>    !<br>
> <br>
> Item was changed:<br>
>    ----- Method: Browser>>hasClassSelected (in category 'class list') -----<br>
>    hasClassSelected<br>
> +      ^ selectedClassName notNil and: [(self environment classNamed: selectedClassName) notNil]!<br>
> -      ^ selectedClassName notNil and: [(Smalltalk classNamed: selectedClassName) notNil]!<br>
> <br>
> <br>
<br>
</div>
</span></font>
</body>
</html>