Geertjan is a DZone Zone Leader and has posted 457 posts at DZone. You can read more from them at their website. View Full User Profile

Interview: Steve Clarke from TJI Java IDE

06.14.2008
| 11628 views |
  • submit to reddit
This year is TJI's 10th birthday. Can you go through the main developments, year by year?

Starting with the core - project organisation, compilation and program run systems in 1998, the system was expanded with syntax coloring and automatic JavaDoc-style project documentation in 1999. Framework projects, based on modifiable templates, and a multi-stage source file backup system were added in 2000.

In 2001, project import and export functionality was added, together with editing features such as drag and drop, brace pair highlights, search in project, undo and redo, split view, and automatic tab formatting.

The first 'Java Guru' API help system was created by 2002. The Java Guru was initially based only on reflection but with the twist of a sortable table for methods. Incorporation of the HTML API documentation extended its usefulness and this module was released in a standalone version around 2004.

With an eye to the education sector, many Java and OOD tutorials were added, with companion projects in 2003. This was followed in 2004 by the UML View - a class diagram with popup dialogs to show the fields and methods and which allows the adding, removing or editing of elements. The code and UML views are automatically synchronised.

In 2004, two GUI Builders were included. One uses absolute positioning of components on a JPanel and the other employs layout managers and allows nesting of containers. Also, intelligent refactoring of base directory, package, class and method.

In 2005, the internal web server and JDBC database features were added to aid the learning of these important technologies. The support is somewhat limited but allows the development of real applications using servlets, JSP and SQL.

In 2006, live syntax checking was added together with code completion of various kinds. Also, multi-level code folding, with 'keep existing folds open' by clicking with the right muse button. In 2007, TJI's own style of tracing was added; this very useful feature works as a debugger as well as profiler.

During 2008 TJI was updated for Java 1.6. A number of changes have also been made throughout to improve further the ease of use and overall design.

What are some of your favorite features?

  • One big feature is the 'Java Guru' API help tool that presents a sortable table of methods for any class. This is based on reflection so it works without the Java API documenttion being present. One can search for a class without knowing the full package name and search for a method, in which case all matching methods (or the first 100 in some cases) are shown to choose from. The class/interface or method name can be typed in, selected from a menu or Java Guru will take its cue from the text at the current editor caret position.

    If the HTML API documentation is available, the relevant description is extracted from it and shown for any selected package, class/interface or method. Clicking on a hyperlink will update the Java Guru system. One can also view 'Uses of a Class or Interface' - subclasses / implementing classes, and methods that take that class/interface as a parameter or return it. Although first relaesed as part of TJI in 2003 and improved in 2005, as far as I know it is still rather unique. Java Guru is available as a standalone system that can work alongside any IDE or editor; it will take its cue from what is on the system clipboard.

  • One small feature that I find very useful and not yet copied (again, as far as I know) is being able to type a space as a tab at the start of lines (the spacebar is far easier to reach when typing). Also, a multiple-entry clipboard has been a part of TJI from the beginning and is still not in all IDEs despite its usefulness.

  • One recent change is interesting. This offers the option of a black background for the editors. This might sound like just a style thing, something cool for hard-core geeks who might miss the terminal window. But in fact this presents less stress on the eye muscles and the text itself is considerably more vivid. So much so that I immediately noticed a small error in our syntax coloring system (now fixed) that I hadn't noticed in years! I think that although it will not be to everyone's taste it might even offer a measurable productivity boost.

  • The auto-layout of the UML class diagram presented an interesting problem. My appraoch was to put the main class in the center and then use a simple form of evolutionary algorithm based on natural selection. Classes are placed at random available places and a score for total distance of all connections calculated, with a big penalty for crossed connections. After a number of iterations, the best 'solutions' were modified in a couple of ways, again at random, to create the next trial set. Once a target score was met or the number of interations passes a particular value, the solution is presented. It works well.

What future developments can we expect TJI to undergo?

The GUI designers could be improved, perhaps with some new Layout Managers, and I might look again at debugging and support for Java Beans among others.

One thing that consistently interests me is to move away from source files as such and allow the programmer to focus on classes, their fields and methods, such that one only ever edits methods and not whole source files (class and interface definitions and fields would be entered by dialog). If I remember correctly, IBMs Visual Age was a pioneer of this approach and I think it is a good one. It is something I would like to explore further, without going so far as a CASE tool. For now, code folding helps somewhat in this regard.

PlugIn modules that add functionality to the IDE can be developed using a simple API. This enables existing plugins to be customised, improved or extended - and new functionality added by you or others as a plugin development community builds around TJI.

Plugins can optionally have their own GUI panel. As an example, the Custom Shortcuts that allows the user to define say 'sop' as short for 'System.out.println' is actually a plugin that adds an item to the Edit menu. When you type 'sop' followed by a space this is changed into 'System.out.println'. This plugin is so useful that it is bundled with TJI - on first run, the plugin jar is deployed to the modules folder. 'Comment / Uncomment' and 'Enclose Selected Text within a selectable 'block type' - for example, if () {...}' is also provided by this bundled plugin.

The public plugin API is described on the website and includes example source code and suggestions for plugins. Basically, a plugin needs to implement interface TJIModule. This defines the nature of the plugin and declares methods start() stop() and changeOccurred(changeID), plus a few other methods such as getAuthor(); in effect, it allows TJI to speak to the plugin. The start(IDE) method is called when TJI is ready and passes a reference to itself to the plugin (TJI implements interface TJI which defines what the plugin can see and do with the IDE). The start() method returns whether the plugin requires its own GUI panel.

The second larger interface (TJI) makes available the core IDE features to the plugin. So, for example, a plugin can find out what projects are loaded, the currently in-focus one, etc. call certain functions, such as to create a new project, and make use of certain resources such as the file browser.

Any final thoughts to share?

TJI Java IDE and the standalone Java Guru are free to try and are covered by the same license, which costs USD $39 for a single user, with multi-user licenses available. Go here to download it!

 

AttachmentSize
nss1s.png31.16 KB
nss2s.png27.76 KB
nss3s.png19.83 KB
nss4s.png158.24 KB
steve_clarke.png27.5 KB
Published at DZone with permission of its author, Geertjan Wielenga.

Comments

Steve Clarke replied on Fri, 2008/08/22 - 2:31pm

Over the last couple of months, TJI Java IDE has undergone a major revision and the new version is at our new website : http://www.tji-java-ide.com/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.