[squeak-dev] ToolSet and Environments (was Re: The Trunk: Tools-tonyg.1032.mcz)

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Wed Mar 24 16:22:24 UTC 2021


Hi Tony,


> Would a patch to ToolSet be welcome to add, say, `browseEnvironment:` and a convenience `Environment >> browse` to the various ToolSets?


To me, this looks like a useful enhancement!


> Would some thinking about how to surface those in the tooling be welcome?

Definitively! Maybe we could add an item to the browser's window menu that 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?

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! :-)

Best,
Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Tony Garnock-Jones <tonyg at leastfixedpoint.com>
Gesendet: Mittwoch, 24. März 2021 16:40:17
An: The general-purpose Squeak developers list
Betreff: [squeak-dev] ToolSet and Environments (was Re: The Trunk: Tools-tonyg.1032.mcz)

Hi all,

I've been experimenting with Environments a little. They look promising,
but if I understand correctly we don't have much in the way of tool
support for them yet?

Would a patch to ToolSet be welcome to add, say, `browseEnvironment:`
and a convenience `Environment >> browse` to the various ToolSets? It
took a little digging before I found

(Browser new selectEnvironment: someEnvironment) buildAndOpenFullBrowser

Further than that, there seems not to be many users of Environment's
class-side Instances variable yet. Is it intended to be a kind of
registry of available in-image Environments? Would some thinking about
how to surface those in the tooling be welcome?

Tony



On 3/24/21 3:36 PM, commits at source.squeak.org wrote:
> Tony Garnock-Jones uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-tonyg.1032.mcz
>
> ==================== Summary ====================
>
> Name: Tools-tonyg.1032
> Author: tonyg
> Time: 24 March 2021, 4:36:27.132139 pm
> UUID: 1077d608-e946-49dd-99f0-3a55ffe06e81
> Ancestors: Tools-mt.1031
>
> Repair Browser to allow selection of classes in non-default Environments.
>
> =============== Diff against Tools-mt.1031 ===============
>
> Item was changed:
>    ----- Method: Browser>>addTrait (in category 'traits') -----
>    addTrait
>        | input trait |
>        input := UIManager default request: 'add trait'.
>        input isEmptyOrNil ifFalse: [
> +              trait := self environment classNamed: input.
> -              trait := Smalltalk classNamed: input.
>                (trait isNil or: [trait isTrait not]) ifTrue: [
>                        ^self inform: 'Input invalid. ' , input , ' does not exist or is not a trait'].
>                self selectedClass setTraitComposition: self selectedClass traitComposition asTraitComposition +  trait.
>                self contentsChanged].
>    !
>
> Item was changed:
>    ----- Method: Browser>>hasClassSelected (in category 'class list') -----
>    hasClassSelected
> +      ^ selectedClassName notNil and: [(self environment classNamed: selectedClassName) notNil]!
> -      ^ selectedClassName notNil and: [(Smalltalk classNamed: selectedClassName) notNil]!
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210324/3b4cf50f/attachment.html>


More information about the Squeak-dev mailing list