Hi Stephen,

I already have such a top-level scheme, but a bit deeper than you describe, 
with three levels, for Pharo 2.0. It has top-level categories and then it uses 
a prefix-matching approach (i.e. all configurations goes under 
Packages>>Configurations). Then, if a package has categories, it will split 
between categories as an usual browser will do.

The goal is to limit each level to a max of ~ 10 / 20 entries at most. It does 
not require any change to RPackage, PackageInfo and friends (but has to stay 
synchronized with their API and keep track of system changes such as 
loading/unloading/creating a package).

You can have a look at the code at:

https://github.com/ThierryGoubier/AltBrowser

Specifically AltBrowser class>>defaultPackageCategoriesNames
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package/AltBrowser.class/class/defaultPackageCategoriesNames.st
and AltBrowser class>>getRootItems
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package/AltBrowser.class/class/getRootItems.st

Where you will see how the system uses the current list of existing packages 
and the MC/RPackage API.

Thierry

________________________________
De : Pharo-dev [[email protected]] de la part de Stephen Travis 
Pope [[email protected]]
Date d'envoi : samedi 15 juin 2013 21:20
À : [email protected]
Objet : [Pharo-dev] Package Browser and System Organization


Hello Phar-ites!

I was at the STIC conference this week, and decided to do a small project in 
Pharo to "get my feet wet." I ported the "Package Browser" (AKA 6-paned 
browser) that I prefer to use. the basic idea of it is to parse the system 
categories into a 2-level hierarchy so that the left-most pane is the top-most 
packages (Collections, Kernel, System, etc.). If the system is well-organized, 
this list hardly needs a scroll bar!

I'm attaching the code with this letter for your edification.

To use the PackageBrowser, it really helps if the system categories form a nice 
2-level hierarchy, as in ,

Collections-Abstract
Collections-Arithmetic
Collections-Arrayed
Graphics-Files
Graphics-Fonts
Graphics-Primitives
etc.

The second file below is a system re-org for a Pharo 2.0 image. Obviously this 
is quite release-dependent, so it would be good to do this once in the release 
cycle for 3.0. In the "old days," there were about 12 top-level packages -- 
will this work in Pharo?

Enjoy!

Stephen Pope (stp)





----

Stephen Travis Pope  -  [email protected]<mailto:[email protected]>  
-  Santa Barbara, CA



Reply via email to