On Mar 17, 2011, at 7:05 PM, Lukas Renggli wrote:
and I was wondering where is used the selectionIntervalFor:
To accurately highlight matches (senders, implementers, parse tree matches, lint issues) in the tools.
so this could be packaged separated so that we can use the environment without having to have the AST-core + parser loaded. In our version we will separate that. When AST-Core will be the default AST the problem will be less important.
Then I saw that BrowserEnvironmentWrapper introduces environment (which is good)
'BrowserEnvironment' implements a composite pattern. The variable 'environment' refers to another 'BrowserEnvironment' instance, not to a 'SystemDictionary'.
Now the superclass uses directly Smalltalk globals so may be this would be good to move enviroment above this way we can have a selection of the environemt as in BrowserEnvironment
No, BrowserEnvironment represents the system. In a system with multiple namespaces it represents a merged view of all the classes in the complete system no matter what namespace they are in. If we had namespaces a new subclass (NamespaceEnvironment) could provide a view onto a particular namespace, just like the PackageEnvironment does today.
but why not having environment = a parametrizing namespace in the browser environment this way we avoid all the Smalltalk globals everywhere and suddenly we can use the same environment to browse remote images and have currentSelectionEnvironment = the composite. I do not see why Wrapper is needed.
also have a browser that can browse a remote environment.
This was once possible, but since Class/Metaclass/SmalltalkDictionary moved so far away from RBClass/RBMetaclass/BrowserEnvironment (they were once polymorphic) it is very hard to do anything that works on different models.
We will fix. I think that we will clone the code and see what we can do. Stef