[kepler-dev] Actor/Demo Indexing
cxh at eecs.berkeley.edu
Thu Feb 2 11:06:20 PST 2006
I hacked up a prototype of an actor/demo index system. The idea is
that for each class that extends NamedObj (such as actors), we list
the demonstration models in which the class is used.
This information is available in Edward's documentation viewer under
the "Demo Usage" link in the lower right corner
The setup needs work, but here's how to set things up.
1. Do a cvs update and build of PtolemyII
2. Generate the *Idx.htm files by reading the allNamedObjs.txt and
models.txt files, scanning the models in models.txt for actors
listed in allActors.txt.
(FIXME: this step also requires a graphical head because the demos
are getting parsed.)
The way this step works is it runs javadoc, runs our doclet and
then creates the Actor/Demo index.
When we run the ptII/doc/doclets/PtDoclet, we create
$PTII/doc/codeDoc/allNamedObjs.txt, which is the list of all of the
classes for which we generated documentation.
$PTII/ptolemy/configs/doc/models.txt is a file that contains the
filenames of all the demos.
The way we create the index is that we add a MoMLFilter that keeps track
of the names of classes that are seen in the demo .xml file.
We then cycle through all the classes listed in allNamedObj.txt
and all the demos in models.txt. The results are put into a
*Idx.htm file, for example
(FIXME: not all models parse, we need to add the compat filter)
(FIXME: if an actor or other class does not appear in a demo,
probably avoid creating a link to the mostly empty demo file.
However, we need to run the doclet before running the Actor/Demo
index tool so we know which classes we want to index. We could
blindly index everything, which might not be so bad)
(FIXME: if an object appears at a level other than the toplevel
of a demo, it would be nice if we could open that level up.
It appears that opening up non-top levels is not working)
3. Open up a model such as Butterfly.xml,
right click on the Ramp,
select Documentation -> GetDocumentation,
select "Demo Usage" from the lower right and browse other demos
where the actor is used
(FIXME: need better title of each demo, perhaps as an attribute?)
More information about the Kepler-dev