Inside the JBuilder OpenTools API
Chapter 16 - EditorKits and Scanners

Previous   Next   Listings

The OpenToolsNode example hooks into several parts of the JBuilder API. It defines a new node type that knows how to deal with OpenTools manifest files (.opentools extension). For these nodes it defines a new EditorKit and Scanner to provide syntax highlighting within the editor. It adds a list of headers to the Structure Pane and links these back to their locations in the file. Popup menus in the Structure and Editor Panes let you easily add a new header to the file. And finally, an OpenTool personality lets you turn OpenTools support on or off in JBuilder 10 and up.

Zipped Files

OpenToolsNode.jpx   The project file for this tool
OpenToolsNode.html Project notes
classes.opentools The OpenTools manifest The TextFileNode descendent that knows about OpenTools manifest files. It links to the editor kit and structure component. The TextEditorKit descendent for these files. It links to the scanner. The Scanner implementation that tokenizes OpenTools manifest files The TextStructure descendent that displays the headers from these files A popup menu that lists the standard OpenTools headers and inserts them on request A wizard to create or update a classes.opentools file based on the OpenTools found in the project. The UI for the above wizard A wizard to create a new OpenTools project - adding the OpenTools SDK library and creating your classes.opentools file The UI for the above wizard A custom personality for OpenTools related features (JBuilder 10 only)
OpenToolsNode.jar The packaged tool
Inside the JBuilder OpenTools API 2004, Keith Wood Previous   Next   Listings