PlugIn Modules

PlugIn modules add functionality to the IDE and also provide a powerful means of customisation - you choose what additional functionality you wish to have and can choose between the available solutions.

TJI will gradually change to make greater use of a plugin-based architecture. The API for constructing plugins and the source code for various examples is now public (in beta release). 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.


 

Available PlugIns

 

The first three plugins described below are distributed with TJI (inside tji.jar). When TJI is started, the jar files for these plugins are placed in subdirectory 'plugins' automatically.

 

1 'Chess' PlugIn
Version 1.1
Kinabaloo Software

Seemingly unsolvable bug? Going round in circles?
Then free your mind with a quick-fire chess game!
Based on an open-source chess applet by Sieuwert van Otterloo, 1999; Kinabaloo Software has added graphical pieces, taken-pieces display and mouse drag & drop support.

Anyone interested in how easy it is to wrap an existing program as a TJI plugin can take a look at the wrapper for the Chess plugin : Chess.java

 

2 'ShortCuts' PlugIn
Version 1.2
Kinabaloo Software

This plugin provides 3 modes of assistance for the editing of java source files :

* Enabling the simple specification of Text Replacements when editing; for example: str > String.
You can define replacements by a dialog available from the 'Edit' menu ('Edit ShortCuts').

* Comment / Uncomment - easily comment or uncomment multi-line selected text.
Available via the popup menu shown when right-button mouse click on selected text.

* Enclose Selected Text within a selectable 'block type' - for example:
if () {...}
Available via the popup menu shown when right-button mouse click on selected text.

 

3 PlugIn Manager
Version 1.0
Kinabaloo Software

This plugin shows what plugins are currently loaded and the name, version and author information for each one.

Pim.zip
The source file as a TJI project.
Download to any directory and then choose 'Import Project' from the 'Project' menu.
Also, see the notes below.

PIM.java
Place source file in the 'modules' subdirectory and then add it to a new empty project to compile. Set the project type as 'Plugin'.
Also, see the notes below.

 

4 Doodle

You may have seen the Example Application called Paint already. If not, download and import it.

The Doodle Plugin Module uses it.


 

How To Install a PlugIn

Download the plugin jar file to - or later place in - the 'modules' sub-directory of your IDE installation.

The plugin will be automatically loaded when the IDE is next started.

If you are downloading a plugin as a project, import the project zip file to run and edit it.

 


 

How To Write a PlugIn

Plugin API and example source code now in BETA release.

A plugin must implement interface TJIModule.

Interface TJI provides access to the IDE.

Both the source files and class files are included in tji.jar
The source files are also available from the above links for reference.

Here are the JavaDoc HTML pages detailing the two interfaces :
TJIModule and TJI

There are two basic types of plugin - those that require their own GUI tab within the IDE, and those that don't (but may still add menu items to the IDE's GUI). Both types are created in the same way but those that require their own GUI tab should extend JPanel.

Source code should be placed within the 'modules' subdirectory, with appropriate package to directory stucture if required. After compilation, the plugin module will be automatically reloaded - just as if you had selected 'Reload Plugin Modules' from the 'Options' menu.

Here is an example plugin (source code) that has its own GUI. It is a 'toy' plugin that does not do anything useful itself, but is designed to illustrate various features of plugin development. (The 'PlugIn Manager' plugin detailed above also employs its own GUI tab - and is a useful plugin.)

Download source as a TJI project.
(Download to any directory and then choose 'Import Project' from the 'Project' menu). Then (build and) run it.)
ExampleModule1.zip

Or download the plain source file.
(Place the source file in the 'modules' subdirectory and then add it to a new empty project. Then set the 'project type' (Project menu) as 'Plugin'. Then (build and) run it.)
ExampleModule1.java

 

Notes for PlugIn developers :

If you require functionality not currently provided, let us know by email and we will endeavour to add it quickly.

Class files are loaded in preference to same-name class files within jar files so you can edit and run a plugin without worrying about a jar'd version of the same classes. After compiling plugin source code, select 'Run' to update it in the IDE.

When creating a jar file for a plugin ('Project' menu, 'Jar Project'), remember to specify the 'main' file first.


 

Some Ideas for PlugIns

WYSIWYG HTML Editor
Support for JavaScript
(Unit) Testing
Search & Replace using Pattern Matching (Regex)
Improved Debugging
Support for Ant
Support for Java Beans
Enterprise Java Add Ons
Obfuscator
Dissambler
A 'console' for creating objects and invoking methods etc.
Source code to 'pretty' HTML format
Code Formatting - according to user preferences
Version control
Additional UML support
Group work and submission (colleges and universities)
'On-Line' learning

Get involved !
Add your expertise !