SWTImageJ Java Plugins - eclipse-swtimagej/SWTImageJ GitHub Wiki
Compile Java Plugins
The compilation of plugins is supported. The default ImageJ plugin templates ("Plugins->New->Plugin XXX") were ported to SWT.
In the plugins folder itself a two class template is available, too, where the dependent canvas class can directly opened and edited with the Eclipse WindowBuilder (SWTComposite.java). Use the action "Plugins->Compile And Run..." and compile the main class (Plugin_Shell.java) for the composite in the plugins folder of SwtImageJ (the plugins folder is on the ImageJ classpath).
As known from ImageJ newly compiled plugins can be loaded dynamically with the menu "Help->Refresh Menus".
IJPluginWindowBuilderExample
A simple example has been added to create Graphical User Interfaces easily with the WindowBuilder plugin of Eclipse. The SWTImageJ plugin is available as a plugin dependency
Within this plugin the SWTComposite class can be opened and edited with the WindowBuilder plugin.
Then simply copy the edited Java class SWTComposite to the plugins folder of the SWTImageJ plugin thus it can be loaded and compiled as an ImageJ plugin and extend the Plugins menu (The plugins folder of SWTImageJ is not declared as a Java package that's why the detour).
The steps are:
- Install Eclipse. Within Eclipse install the WindowBuilder plugin (Help->Install new Software).
- Clone and import this repository.
- Edit the SWTComposite.java class in the IJPluginWindowBuilderExample plugin.
- Copy the composite to the plugins folder of the SWTImageJ plugin.
- Then select the ImageJ.java file (package ij) and execute the action "Run As->Java Application".
- Compile and run the main Plugin_Shell.java class which calls the SWTComposite class (SWTImageJ menu: Plugins->Compile And Run).