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

Marcel Taeumel marcel.taeumel at hpi.de
Fri Mar 26 11:41:45 UTC 2021


Hi Tony.

> Is it intended to be a kind of registry of available in-image Environments?

Yes, looks similar to PackageOrganizer.

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

Yes, indeed. :-) I just added ToolSet cass >> #browseEnvironment: and Environment >> #browse to Trunk. And I noticed that something seems to be missing from empty environments since I cannot compile a new class into it through the Browser. Not even "Smalltalk" as a global can be resovled -- even though it is in "declarations". Maybe Environment >> #initializeWithName: is not correct?

Have fun! :-)

Best,
Marcel
Am 24.03.2021 16:40:28 schrieb Tony Garnock-Jones <tonyg at leastfixedpoint.com>:
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/20210326/e4cdc2bc/attachment.html>


More information about the Squeak-dev mailing list