[Xotcl] introspective tools for documentation?

Uwe Zdun bm0005 at sp2.power.uni-essen.de
Tue Mar 19 22:25:59 CET 2002


Hi,

the basic idea is to re-define the @ token at runtime, if needed, before
the code wit the metadata ist exectuted, and then a dynamic object
structure is build that can be queried. staticMetaDataAnaylzer.xotcl does
the same but it does only look at the metadata (and class dependencies,
methods). It uses the dynamic script metadataAnalyzer.xotcl.

here's an example use of this script (from its documentation):

    package require xotcl::metadataAnalyzer

    # instantiate metadata analyzer object
    MetadataAnalyzer @::m
    # make this object be known to @ and turn @ metadata processing on
    @ analyzerObj @::m
    @ onOff 1

    # read in some metadata tags (in sample file) & execute the file
    source lib/testx.xotcl

    # turn @ metadata processing off again
    @ onOff 0

    # print out all collected metadata
    puts [@::m print]


It should have more handy info options etc. but this has to be still 
implemented ... perhaps you like to volunteer ...
of course, you can also implement other interpretations of @ for your own
purposes. If so, please let us know, so that other users
benefit from these functionalities as well.

--uwe




On Tue, 19 Mar 2002, Catherine Letondal wrote:

> 
> Hi,
> 
> I believe the only way to document code is now through the @ object
> and the makeDoc.xotcl script, which uses several utilities from the
> library/system directory (the old one was the metadata mechanism). 
> Am I right?
> 
> My question is about the introspective aspect of this feature: how
> do you get the documentation for a class, method, ...?
> By parsing its file?
> 
> Thanks a lot for any help,
> 
> -- 
> Catherine Letondal -- Pasteur Institute Computing Center
> _______________________________________________
> Xotcl mailing list  -  Xotcl at alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
> 




More information about the Xotcl mailing list