|
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
Seemingly
unsolvable bug? Going round in circles? 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
This plugin
provides 3 modes of assistance for the editing of java source files
: * Comment /
Uncomment - easily comment or uncomment multi-line selected
text. * Enclose
Selected Text within a selectable 'block type' - for
example:
3
This plugin shows what plugins are currently loaded and the name, version and author information for each one. Pim.zip PIM.java
4 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 Here are the JavaDoc HTML
pages detailing the two interfaces : 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. Or download the
plain source file.
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 Get involved ! |