[ANN] Namespace browser
Michael van der Gulik
squeakml at gulik.co.nz
Fri Apr 13 08:44:26 UTC 2007
Hi all.
I've modified the PlusTools class browser to be able to work with my
Namespaces. Screenshot at
http://www.gulik.co.nz/namespaces-screenshot.png. What you're looking at
(in the screenshot) is a tree widget in place of the class organisation
browser. Instead of using a ClassOrganizer, I've created a Namespace
class (subclass of Dictionary) which can contain classes, "global
variables" (well, "global" for only that Namespace) and other Namespaces.
The pane to the left of the code window is the "import list", which does
the same job as the list of import statements in any other language
(*cough* Java *cough*). For convenience, you can expand the imports to
see what's inside them. Imports must be other Namespaces.
If anybody's interested, load it on 3.9 by doing:
1. Add http://www.squeaksource.com/SecureSqueak as a Monticello repo and
open it.
2. Load my modified ToolBuilder-Kernel.
3. Load my modified ToolBuilder-Morphic.
4. Load my modified PlusTools. Ignore the warning; you won't be using
those classes (or if you do, you need to fix them first!).
5. Load my Namespaces package.
6. Load my NamespaceTools package.
7. Do: NamespaceBrowser example.
This will copy the Speech classes as an example and build a Namespace
tree from them for you to play with. There are comments in Namespace and
NamespaceBrowser which explain things a bit more.
To modify either of the tree panes, drag and drop things around. Also,
use the "inspect" menu item to actually test your code - the browser
that you have open has the only reference to the Namespace tree, and if
you close it, they'll be GCed and be lost forever!
My next project is modifying Monticello so that you can load and save
Namespace trees.
Have fun.
Michael.
More information about the Squeak-dev
mailing list
|