The following tools help explore the interactive Omega language.

Tools

The interactive language allows one to invoke methods in arbitrary Java objects. It is difficult to remember the names of the methods and the arguments they take. One can look at the Javadoc files. An alternative is to browse the class itself and get its methods. The class MethodViewer and its associated window version MethodViewerFrame provide a GUI for doing this. (The omegahat command is given below the screenshot.)

org.omegahat.Environment.GUITools.MethodViewerFrame
f = new MethodViewerFrame(getClass(),true); f.setVisible(true)
This shows the fields, constructors and methods of the specified class. The display can show either all the methods or just the public methods.
The window version allows the user to view a different class by simply typing the class name (partially qualified as understood by the Omegahat evaluator) in the text field.

To support further exploration, clicking on the class button brings up the ClassPathViewer tool.
org.omegahat.Environment.GUI.ClassPathViewer
f = new GenericFrame("Classpath Viewer").component(new ClassPathViewer(this));
This displays all the elements in the regular system classpath. (The elements provided by the localClasses() and dynamicClassLoader() are not displayed in this view at present.) For each of these elements, the classes contained within it are displayed (currently as a list). When this window is created from the MethodViewerFrame, selections made within a class list are reflected in the MethodViewer by displaying the elements of that class.

A different view can be provided dynamically using the Doclet package of Java2. This should preserve argument names. Later...


Duncan Temple Lang <duncan@research.bell-labs.com>
Last modified: Wed Apr 14 10:18:42 EDT 1999