[squeak-dev] The Trunk: Environments-cwp.15.mcz

Colin Putney colin at wiresong.com
Sun Mar 10 05:17:27 UTC 2013


On Sat, Mar 9, 2013 at 8:30 PM, <commits at source.squeak.org> wrote:


> ==================== Summary ====================
>
> Name: Environments-cwp.15
> Author: cwp
> Time: 9 March 2013, 8:15:12.639 pm
> UUID: 57b74903-5b1b-495e-86c9-97bde295a0ce
> Ancestors: Environments-cwp.14
>
> Added the ability to rename classes as they are imported or exported.
>


With this update, Environments now understand the following messages:

import: anEnvironment

Imports all the bindings from the other environment, with no renaming


import: anEnvironment addingPrefix: aString

Imports all the bindings from the given environment which have keys that do
not begin with the specified prefix. The bindings are made visible in the
receiver with the prefix added. For example, if the other environment has
classes named Foo and XXBar, Foo will be imported as XXFoo, but XXBar will
not be imported.

import: anEnvironment removingPrefix: aString

Imports all bindings from the given environment which have keys that begin
with the specified prefix. The bindings are made visible in the receiver
with the prefix removed. For example, if the other environment has classes
named Foo and XXBar, XXBar will be imported as Bar, but Foo will not be
imported.

importSelf

Imports all the classes and globals defined in the receiver visible to
methods compiled in the receiver, with no renaming.


from: anEnvironment import: aSpec

Imports only the specified bindings from the given environment. The
specification may be any of the following: a symbol, an association, a
dictionary or an array of specifications. These all do what you'd expect,
giving you either a straight import or an alias.


exportSelf

Makes all the classes and globals defined in the environment public
(available for import by other environments).


export: aSpec

Makes the specified classes and globals public, using the same
specifications as #from:import:.


exportAddingPrefix: aString

Makes the classes and globals that don't have the given prefix public,
adding the prefix, similar to #import:addingPrefix:.


exportRemovingPrefix: aString

Makes the classes and globals that do have the given prefix public,
removing the prefix, similar to #import:removingPrefix:.



This covers all the use cases I can think of, so now I'm going to move on
and start working on making the rest of the system environment-aware. UI
for easily opening a class browser on an environment. Tools for defining
and modifying environments during development. Environment support in
Monticello, SystemNavigator, SystemChangeNotifier etc.

Cheers,

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130309/6f6cf220/attachment.htm


More information about the Squeak-dev mailing list