Java Tutorial - Java Script :
Jext
Jext is also a Java-based programmer-centric text editor. (Interestingly, Slava Pestov, the creator of jEdit, is also given credit as being a major contributor to the Jext source code.) Jext demonstrates a principle that is commonly found in less-mature open source products. The product may show its immaturity in the lack of high-quality documentation or features that may not be fully implemented.But certain features are innovative and unique, and serve to set the product apart from the rest. Open source code provides a method for this type of experimentation without every project having to reinvent everything from scratch.
The following table summarizes Jext, and the following sections discuss Jext in more detail.
Jext Features
Jext takes a slightly different approach from the other editors we have examined. Jext has an user interface that is designed for rapid coding. By choosing File ➪ New From Template you can create a basic Java class instantly. Templates exist for servlets, applets, main Java programs, and other common Java programs.Templates also exist to support JSP creation and many other types of files.Jext also provides the ability to organize a group of related files into a project.
It is easy to switch between files in a project; just click on the filename in the project pane. Like jEdit, Jext also supports plug-ins. However, Jext and jEdit use two different interfaces for implementing plug-ins, so Jext plug-ins are not compatible with jEdit plug-ins. Jext is packaged with two plug-ins preinstalled. Hypertyper provides a facility for completing partially typed strings. A keystroke-recording facility is provided by the other plug-in. Jext provides not one but two separate scripting languages for entering macros. Jext comes with jPython, which is a Java implementation of the Python programming language. It also comes with a language called Dawn. Dawn is a custom scripting language that uses a Reverse Polish Notation (RPN) based syntax.
RPN is the stack-oriented way of programming that was popular on Hewlett-Packard calculators and in the Forth programming language. One very nice feature of Jext can be found on the XInsert tab of the panel to the left of the application window. This can be seen in Figure 4.4. XInsert provides a series of templates and wizards that can be used to create common code skeletons. For example, choosing Templates ➪ Servlet instantly places the source code for a simple class based on HttpServlet into the edit buffer. The real power of this tool can be seen when creating XML files for Ant or when creating JavaServer Pages. Now, individual tags can be created to serve specific purposes, and the cursor is left positioned at the first attribute for the tag.
Jext Shortcomings
Although Jext does provide some tools that speed up the programming process, Jext suffers from a number of problems, including the following:
· Jext does not have an integrated help system. Instead, Jext provides a brief series of Web pages that are installed along with the editor.
· The help Web pages are poorly organized and have no search capability.
· At this time, the documentation also must be downloaded separately from the program.
Installing Jext
Installing Jext is reasonably easy. Download the jext-install.jar file from http://www.jext.org, and run the following command line: java -jar jext-install.jar This will run the Java-based installer program. Jext comes with several files to make Windows operation easier, most notably a Jext.exe program launcher that eliminates the needs for unreliable batch files. Once installed,download the documentation file, and extract the documentation.
