Saturday, November 14, 2009

The jEdit IDE


jEdit an extremely customizable code editor. There are literally hundreds of plugins, and with the right combination, a full-fledged IDE can be setup. This is not out-of-the box, rather, it takes some work to get jEdit configured as a really good IDE.


The list below is what I consider to be the essential plugins for Java web application development. Together, these provide basic project management, version control, fast access to your files, customizable output from the various plugins and external tools, easily work with and execute Ant build files, view and navigate to errors, and move quickly through your code, in essence, the main features you'd want in any IDE. This is just a quick overview, read the individual help files for each plugin for details. This is a minimal set, there are many other plugins available that may be worth exploring if you work in other languages than Java.


This list is in alphabetical order rather than importance. Importance is really dependent on the user, so I leave that to you to decide.


  • Antelope Runs targets in Ant files with the click of a button, which makes it very easy to compile and build your code just as your build system does. There is an old version of this plugin available in Plugin Manager, but the newest version is at tigris.org.
  • AStyle A fast and good formatter for Java and C/C+ code, integrates with Beauty.
  • Beauty Provides a code beautifying framework. It works with the XML plugin to beautify XML-based files and with the AStyle plugin to beautify Java and C files. It provided built-in formatting of a variety of files, including html, javascript, css, jsp, etc.
  • BufferLocal This is the most unobstrusive plugin of all. It keeps track of the buffer local settings you make on a per file basis. "Buffer local" settings are those that you make using the Utilities - Buffer Options dialog. If you change those settings, this plugin will remember them for you and apply them automatically the next time you open the same file.
  • Calculator Full-featured RPN calculator, work in binary, octal, decimal, and hexidecimal. Perfect for when you need to work with computer-based numbers.
  • Character Map Lets you choose specific characters from any supported encoding for insertion into your code.
  • Code2HTML This plugin transforms the current source file or the current selection into a visually equivalent HTML file. The generated HTML files accurately represents the syntax highlighting and spacing of the file. This is great when preparing code examples for documentation or even for javadoc comments.
  • Console The Console plugin has four main functions:
    • Running external programs and commands.
    • Parsing the output of external programs for errors in a variety of formats, and reporting those errors using the ErrorList plugin.
    • The Commando feature provides graphical front-ends, specified using an XML file, to command-line tools.
    • Providing an extensible framework for other plugins that need to display streamed output.

    This is where many plugins will show their output, and can be considered one of the core plugins.
  • Context Menu The ContextMenu plugin allows you to change the text area's right-click context menu for each mode. To the menu, you can add jEdit's built-in actions, or actions from any plugin, or a macro. Selected actions can be also shown in jEdit's menu bar.
  • CtagsInterface The CtagsInterface plugin provides the "jumping around" feature that many IDE's provide. You can put the caret on a variable, and jump to the definition of the variable, or put the caret on a class name, and jump to the class itself.
  • ErrorList The ErrorList plugin displays errors and warnings generated by other plugins. It does nothing on its own, but many plugins use it to show any error messages. This is should be considered a core plugin.
  • Fast Open FastOpen is a plugin designed to quickly open any file in the current project by just typing in the first few characters of the filename you want to open. Besides quickly opening any file, it has a lot of features like switching between projects, indicating invalid filenames etc. FastOpen can open files in the projects and/or non project files too. I've got this set to open with Ctrl-Shift-F key combination.
  • Highlight This plugin is a very simple plugin that will highlight a word you selected and is very similar to the same feature found in IntelliJ. Ctrl-H will toggle highlighting of the current word.
  • ImageViewer This is a simple image viewer that makes it easy to see a preview of images files from jEdit's file system browser or from ProjectViewer. This plugin does not provide any image editing capability, rather, it is intended to help you find the right image file quickly without having to open a separate image editing application.
  • Info Viewer With the InfoViewer Plugin you can choose to use the built-in web browser or set the preferred browser that jEdit and assorted plugins use to display HTML documentation.
  • JavaSideKick The JavaSideKick plugin provides a highly customizable tool for navigating through Java source code. Integrated with SideKick, you can see a tree view for the hierarchy of classes, interfaces, and methods for the file in the current buffer. In addition, attributes, extends, implements and method exception information can be displayed. This plugin also provides browsing of Java-style property files and JavaCC files (.jj and .jjt files), and provided context-sensitive code completion for Java files.
  • JDiff This is a diff and merge utility for jEdit, and is as good or better than many other diff programs you may find on the internet. The SVN Plugin uses JDiff.
  • JIndex When editing Java source files, the JIndex plugin enables jEdit to show the JavaDoc API html documentation for the currently selected word, with a single key press. You'd be advised to use a regular browser with this plugin rather than InfoViewer.
  • Log Viewer This plugin allows you to follow several log files at a time within jEdit, much like you might do with tail.
  • LookAndFeel This one is not an essential plugin, but it can let you set the user interface to something more pleasant to use than Metal. The LookAndFeel plugin lets you choose between different non standard look and feel implementations for jEdit. Currently, the following look and feel implementations are supported:
    • JGoodies
    • Kunststoff
    • Metouia
    • NimROD
    • Oyoaha
    • Skin
    • Tonic
    • Napkin
    • Lipstik

    It's nice to be able to easily change up the look of your main application every now and then. Along with the Look and Feel plugin, the Editor Scheme plugin lets you choose between a number of color schemes for the main text area. Personally, I like Lipstik with the Zenburn theme and use the Editor Scheme plugin to set the Zenburn scheme.
  • MacroManager Not essential for code development, this plugin provides an interface within jEdit to the macros contributed to the jEdit Community website, much like Plugin Manager. It makes it easy to install new macros that others have written.
  • Navigator The Navigator Plugin provides a set of "Back" and "Forward" actions similar to a web browser. This is surprisingly handy when browsing code, especially when used in conjunction with CtagsInterface.
  • Outline Provides a SideKick-like tree which displays folds rather than language-specific structures. I don't use this much since I don't like folding and have it turned off, but it's nice for those languages for which there isn't a specific Sidekick parser.
  • PMDPlugin This is an essential plugin for working with Java. PMD is a Java source code analyzer - it finds unused variables, questionable design decisions, empty catch blocks, and so forth. I've got it set to check files on save. It can be really verbose and hard to configure, but the version included here has some UI fixes that I added to make it easier to set the rules. PMD in jEdit is a joy to use, unlike PMD in Eclipse, which is kind of a pain. It also comes with a rule designer so you can make your own rules for code checking, and a copy/paste detector to help locate duplicate code.
  • Project Viewer The ProjectViewer plugin allows defining groups of files as projects. Unlike Eclipse projects and workspaces, ProjectViewer is extremely flexible, and jEdit will easily let you work on files outside of your workspace and include files from anywhere in the file system. Consider this one a core plugin, it makes it really easy to organize your files. Several other plugins provide close integration with ProjectViewer, including SVN, CtagsInterface, TaskList, ImageViewer, and Fast Open.
  • SideKick The SideKick plugin provides a dockable window in which other plugins can display buffer structure. It really doesn't do anything by itself, it provides the framework for other plugins, such as JavaSideKick and XML to display a code browsing tree. The "Outline" view in Eclipse is modeled after Sidekick.
  • SVN This is a plugin for providing Subversion support from within jEdit. It is tightly integrated with Project Viewer, and requires no external SVN client libraries.
  • TaskList This is a handy plugin for showing to do's, notes, and so on. Just add a tag in your code and it'll show up in the Task List. Tasks can be displayed per file, for all open files, for a project, or for a selection of files from the file system browser.
  • TextAutocomplete Collects "words" in the current buffer and those that you type and offers you automatically a list of possible completions. It's pretty similar to the jEdit's function "Complete Word" but it's automatic, you don't need to press any key to invoke the list of completions. There are several plugins similar to this one, you might want to try them all to see which one best fits your needs. Note that code completion for Java files is better done with the JavaSideKick plugin, and the XML plugin provided code completion for XML and HTML.
  • TextTools The TextTools plugin provides a set of plugin actions for manipulating text in a buffer:
    • Sort
    • Reverse Sort
    • Advanced Sort (field sort)
    • Delete duplicates
    • Shuffle
    • Transpose Characters
    • Transpose Lines
    • Transpose Words
    • Column Insert
    • Block Fill Insert
    • Move Rectangular Selection
    • Toggle Line Comment
    • Toggle Range Comment

  • WhiteSpace The main feature of the WhiteSpace plugin is to highlight whitespace, but the feature I find most useful is to do clean up on buffers when saved, which can be a big help in keeping files in conformance with style guidelines.
  • XML The XML plugin combines the HtmlSideKick plugin by yours truly, the JavaScriptSideKick by Martin Raspe, the CSS SideKick by Jakub Roztocil, an improved CSS SideKick by me, EcmaScript parser, again by me, and the XmlIndenter plugin by Robert McKinnon, providing six distinct Sidekick parsers and four different completion services, as well as integrating with the Beauty plugin for beautifying XML and XML-like files.




You'll notice there is no debugger listed here. I've been working with Java code for about 12 years now, and have only rarely found a need for a debugger since leaving C behind. However, if you do need one, there are a couple of options. First, there is the GdbPlugin. This plugin works as a front-end to the GNU gdb debugger. Second is a separate application altogether, JSwat. There used to be a JSwat plugin for jEdit, but I don't believe it's being maintained anymore and doesn't work with the latest versions of jEdit. JSwat is available at http://jswat.sourceforge.net.

1 comment:

oap said...

Could you, please, fix the issue with the Look and Feel plugin? I am also using Lipstick along with Zenburn color scheme. After recent update Look and Feel plugin stopped working.