The embedded text editor jEdit has some additional plugins not included in the GroIMP version.
They can be downloaded on the jEdit website.
To include a jEdit plugin in GroIMP you need to:
To be integrated in GroIMP the jEdit plugins must be modified. Indeed the main component of jEdit, the View, inherits from javax.swing.JFrame
, whereas to be embedded in a GroIMP windows, it has been changed to inherit from a GroIMP class that inherit from javax.swing.JRootPane
.
As the to classes cannot be casted on each other, the plugins, that interact with a javax.swing.JFrame
must now interact with a javax.swing.JRootPane
.
The two most common changes you will need to do are:
For instance, in case 1:
window = new JWindow(view);
should be window = new JWindow(SwingUtilities.getWindowAncestor(view));
.
And case 2: View view = (View) window.getOwner();
should be
View view = (View) ((JWindow) window. getOwner()).getRootPane();
.
To spot the where your should make changes in the code you can use Eclipse. Import the jEdit plugin's source code into the jEdit repository in GroIMP source code. Eclipse will find the casting errors.