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

Tony Garnock-Jones tonyg at leastfixedpoint.com
Wed Mar 24 15:40:17 UTC 2021


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]!
> 
> 


More information about the Squeak-dev mailing list