It is a simple idea. Allow you to invoke an external program to filter any text you have selected in the JDeveloper Editor. Of course, it is up to you to define what filter means - limited by your imagination only. And by externalizing the filter process, it means you can use the tool or scripting language of your choice to implement and make on-the-fly changes to your filter.
Selected text is sent to the standard-input of the filter process.
The standard-output of the filter process is written back to replace the selected text.
Configuration is done via the JDeveloper Tools | Preferences menu, and is very simple at present. It only supports a single filter process definition. As you can see in the screenshot, you just need to enter a valid command line to invoke the filter. A nice enhancement would be the support for multiple filter definitions.
This is where the flexibility comes in. As an example, I've provided a rot13 encoder written in ruby [samples/myrot13filter.rb in the source kit].
Ruby, Perl, php, vbscript/WSH, bash ... use whatever you prefer. Rather than needing to develop and deploy an add-in in Java, you can just script the filter.
The truth is that I developed this add-in as more an investigation of the Extensions SDK, and the filter idea appeared to be unexplored territory.
As Brian Duff writes, there are some major improvements in the support for JDeveloper Extensions in 11g. Since it is still in preview, I decided to stick with Extension SDK 10.1.3 however.
There are four classes of significance. since this was an educational exercise, I spent a bit of time to make sure I really understood how it all worked, and tried to reflect that with liberal comments in the source.
Interested? Head on over to sourceforge to download the kit.