===== JEdit plugins for GroIMP ====== The embedded text editor jEdit has some additional plugins not included in the GroIMP version. They can be downloaded on the jEdit [[http://www.jedit.org/|website]]. ==== Integration in GroIMP ==== To include a jEdit plugin in GroIMP you need to: - Download the plugin source code from the jEdit website. - Do some modification on the code (explained bellow). - Compile the plugin into a jar. - Move the jar into the jEdit repository (.de.grogra.ext.jedit/jars) in the GroIMP configuration repository (the default path is /home/.grogra.de-platform on linux, and \Users\\.grogra.de-platform on Windows). 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: - Get a java.awt.Windows from a JFrame. - Get a JRootPane from a java.awt.Windows. 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.