for Structuring and Documenting Source Code
Source code is usually not read sequentially but selectively. It is helpful
to connect related pieces of source code even if they are physically apart,
and to get annotations on frequently used names in a program. We have developed
hypertext facilities that allow a better structuring and browsing of source
code. The objects can be embedded into source code without disturbing the
compiler. The most useful facilities are folding, linking and annotating
of text pieces.
Folding allows a user to collapse a piece of text and to replace it by a
certain background text (e.g., a pseudocode statement or a comment). The
user can switch between the two texts with a simple mouse click. This can
be used to structure programs according to the method of stepwise refinement,
to fold away lengthy comments, or to shrink a program text to a skeleton
of procedure headings.
Linking allows a user to connect related pieces or text and graphics by
defining the starting and the end point of a link in either of the two document
kinds. By clicking at the starting point, the end point of the link will
be shown in a new window.
Finally we allow the user to define dictionaries of terms with associated
textual or graphic explanations. Wherever such a term appears in the source
code the user can click at it and gets a popup window with the corresponding
H.Mössenböck, K.Koskimies: Active Text for Structuring
and Understanding Source Code. SOFTWARE ­p; Practice & Experience
26(7): 833-850, July 1996. (postscript).