Alan Ezust

Legal Notice

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, Front-Cover Texts or Back-Cover Texts, each as defined in the license. A copy of the license is included in the file `COPYING.DOC.txt` included with the jEdit distribution.

# What's New in jEdit 4.3

## Preface

No longer will jEdit be called "pre" or "final": instead, we are moving over to straight-decimal x.y.z version numbering scheme.

jEdit is a very mature text editor, and has gone through a very interesting phase of development. Left in a "prerelease" stage for about four years, it's had a long time to solifidy. Many of the original developers, including Slava Pestov, have stopped working directly on jEdit. Fortunately, because of the wonderful nature of open source, there are more and more eyeballs on this code than ever! We have received contributions of plugins, bugfixes, refactoring, and enhancements from around the globe, and our host, sourceforge.net reports that there are on average at least a half-million downloads per year, and this has been true for the entire millenium.

In terms of actual releases, there was a bit of a lull while Slava's absense was sinking in among the other members of the community, but in 2006, thanks to their generous donations of time, effort, and coding skills, we started releasing regular prereleases again, fixing bugs in the core and each other's plugins, making jEdit more stable, coherent, and useful than ever.

The thing that really excites me is seeing members of the community get more actively involved in improving jedit or its plugins. The core is huge, and there are over 164 plugins, so there is an endless source of things to do. I anticipate that the trackers will always have many open issues, but I see many of the old ones finally being closed, and that is very much satisfying. I can say with complete confidence that 4.4 is an improvement over 4.2 in every possible way. I hope that after you read this document, you will think so too, and perhaps want to join in on the development of future versions of jEdit or its plugins.

I watch the tracker traffic (`jedit-devel`) and commit logs (in the `jedit-commits` mailing list) with fascination, learning new Java tricks, or new jEdit tricks. It's quite satisfying to be this intimate with code that I find I am using every day. I feel I am on a first-name basis with all of the active committers, and I've given and/or received help from every one of them. While it is true, there are parts of it that could be designed a little better, it is still the best open source editor I've seen. Thanks to the plugins themselves, because they are broken up into neat little packages, it is easier for us to isolate and fix bugs. As long as I am using it, I will be compelled to fix bugs that annoy me, be they in the core, or any of the plugins I happen to use.

## Acknowledgements

This release would not have been possible if it were not for the frequent help and efforts of Dale Anson, Jeffrey Hoyt, Marcelo Vanzin, Matthieu Casanova, Kazutoshi Satoda, Shlomy Reinstein, Seph Soliman, Eric Berry, Robert Schwenn, and Björn "Vampire" Kautler. I would also like to give sincere thanks to all of the other core and plugin developers who have made significant contributions to help keep this editor alive and on the cutting edge.

## Java Compatibility

jEdit 4.3 requires Sun Java 1.5.0 or later. Older versions of Java are not supported.

If you want to use the new LCD Antialiasing feature of Java 1.6, it is supported. From Global Options - Text Area - Antialiased Smooth Text: select Subpixel, and un-check the Fractional Font Metrics checkbox.

## User-Visible Changes

1. Most likely, you'll notice first the new Tango icon set, used for the toolbar icons. If for some reason you are nostalgic for the old icon set, you can always switch back to it from the Appearance option pane.

2. There is an enhanced Status Bar (and accompanying service API to allow plugins to add new status bar diaplay/controls).

3. It is now possible to choose different, independent Buffer Sets for each EditPane buffer switcher. See Buffer Sets for more information.

4. The Dockable Interface has been enhanced and made into a jEdit service, so it is possible for plugins to offer alternate dockable window managers. Some of them give jEdit a very Eclipse-like feel. In addition, it is now possible to save and load dockable layouts, which are analogous to Eclipse perspectives.

### Re-added Features

Soft wrapping to the text area, one of my personal favorite features, is possible again, by setting the wrap width to zero. Thank you Slava! I really missed that feature. It's probably the main reason I started using, testing, and later developing jEdit 4.3.

### Plugin Manager

The three panes of the PluginManager have all been reworked and made more keyboard friendly. They handle multiple selections, show more information, allow sorting on more columns, the checkbox states don't get lost when you switch panes, and the manage panel now automatically loads dependent plugins if they are already downloaded. Anyone who is used to 4.2's plugin manager will notice the difference immediately.

From the Manage tab, it is now possible to save a set of installed plugins as a PluginSet. This is an XML file which can be located locally on your machine, or remotely on a network. Each time the Install tab is instantiated, the PluginSet is loaded and the set of plugins are checked for you to download and install.

If you are a plugin developer, see .

### Text Editing

Input Methods are now supported in jEdit. This should make it much easier for people to use alternate keyboard input methods to use jEdit and enter Chinese/Korean/Japanese characters, as well as other alternative input devices. Thank you, Kazutoshi Satoda, for fixing that and many other encoding and internationalization problems that prevented non-English speaking users from using jEdit properly in their native language.

### Syntax Highlighting

Many syntax highlighting modes were updated or rewritten to use the java.util.regex instead of gnu.regexp. Some modes were added, bring the total now to 150 languages.

### Regular Expressions

Most of the core code has been rewritten to use `java.util.regex` instead of `gnu.regexp`, so be sure to keep that in mind as you are composing your own regular expressions, whether they are in mode files, search expressions, or in your own plugins. XSearch plugin and others still use `gnu.regexp` plugin, which offers the legacy regex engine, in case the old behavior is still desired.

### Search and Replace

Added Skip Binary and Skip Hidden options for Directory Search.

### Handling of Multiple Encodings

A full list of encodings supported by your Java implementation is now shown in the file system browser's Commands>Encoding menu and other places. Previously only a small list of common encodings was shown.

You can choose which of this list you want to display in the Encodings general options pane. You can also choose the fallback order of encodings to try in the event of decode errors in the General option pane.

The encoding used by XML files is (should be?) auto-detected if the file provides an XML declaration like the following:

    <?xml version="1.0" encoding="UTF-8"?>

### File System Browser

The file system browser is much more keyboard friendly, and supports some common shortcuts set by default in KDE and Windows (del, f2, f5, A+Left and A+Right for history, A+up for parent dir).

### Bundled Macros

There are a number of new bundled macros, and most of the existing ones have undergone enhancements and bug fixes. jEdit 4.2 bundled 58 macros in 7 categories; jEdit 4.3 bundles 75 macros in 9 categories.

Of course you can create new macros of your own, either by recording actions or writing them from scratch.

## API Changes

There are quite a few API changes which are documented, in the source as well as the core guidelines and the CHANGES.txt documents. If ever you find that some of the API documentation is lacking or needs further explanation, please post a feature request or a question onto the -devel mailing list.

### Buffer vs jEditBuffer

Now that the text area is independent of the rest of jEdit, various text area-related APIs that used to take org.gjt.sp.jedit.Buffer instances now take org.gjt.sp.jedit.buffer.JEditBuffers.

BufferChangeListener and BufferChangeAdapter are now deprecated. Use BufferListener instead.

### Plugin API changes

jEdit 4.2 used to run plugins that were designed only for the 4.1 plugin API, but plugins that are missing the "activate" property will no longer load properly in 4.3.

There are two new properties that all plugins can have: `description` and `longdescription`. The former is just a string property, while the latter is a reference to an html or text file. See EditPlugin API docs for details.

### Dockable Interface

A new boolean attribute, `MOVABLE`, can now be specified for `DOCKABLE` tags in the `dockables.xml` file. This attribute specifies the behavior when the docking position of the dockable window is changed. If true, the existing instance of the dockable window is moved to the new docking position, thus maintaining its state after the move (this is the new behavior). If false, the BeanShell code is invoked to get the instance to put in the new docking position (this is the existing behavior). The BeanShell code typically returns a new instance of the dockable, cause the state to be lost as a result of the change in docking position. The default value of this attribute is false for backward compatibility.

A new interface, DockableWindow, is introduced for `MOVABLE` dockable windows to be notified before their docking position is changed. This enables dockable windows to react to this change, e.g. by changing their layout depending on whether they are docked at the top/bottom or the left/right. This interface is meaningless (for now) for non-MOVABLE dockable windows.

A new Service, DockableWindowManagerProvier is introduced to permit plugins to offer alternate dockable frameworks, replacing the legacy dockables that are starting to look rather old.

## The core plugins

This chapter showcases the new(er) plugins that were under the most active development during jEdit 4.3. Some of them influenced the development of the jEdit core, and others are good enough to be incorporated into the core, but are left as separate plugins simply because it makes it easier for us to maintain and debug them.

The latest version of Console has many improvements, and takes advantage of new features of jEdit.

Navigator, providing a navigable history, is new and improved - it provides the user with Eclipse-like Navigation to previous locations, for each TextArea of each View. It uses new EditBus messages which are now available in the public API, PositionChanging and BufferChanging.

#### ProjectViewer

For managing groups of files and organizing them into trees, ProjectViewer is very useful. It's been under active development, and many bugs are fixed quickly after they are found. Its ability to filter its input set based on regular expressions or the contents of CVS/SVN/Perforce entries makes it especially handy for other plugins that use it, such as FastOpen and OpenIt, both of which are also recently updated for 4.3.

ProjectViewer is also very important for language plugins that want to deal with file sets. It defines a project-wide property specification, that makes it possible to have different settings depending on what the active project is.

#### SideKicks and Language Plugins

SideKick has been debugged and the documentation has been improved. Further, there is a new combobox that lets you choose your parser, and a new SplitPane to show you the contents of the hovered element. The combobox is especially important since there are multiple parsers that can be used on a given file, especially when you are working with Python, PHP, HTML, XML, or JavaScript files.

Many language-specific plugins have been redesigned to use the new and improved SideKick. In particular, CtagsSideKick (a replacement for CodeBrowser), JPyDebug, JythonInterpreter, RubyPlugin, PHPParser, JavaSideKick, XML, and PerlSideKick. Be sure to try them out.

In case you're looking for JavaCore, JBrowse, CodeAid, DotComplete, or PropertySideKick, they have all been merged (in terms of functionality) into the new JavaSideKick plugin. Some other plugins that depend on these above plugins still need to be converted to use JavaSideKick instead of the old java plugins listed above.

As for HtmlSideKick, JavaScriptSideKick, and XmlIndenter, they have all been merged into the new XML 2 plugin, which now includes two parsers for CSS, one for Ecmascript, and completion popups for elements and attributes in XML, CSS, and HTML.

If you use many different languages, you should also try out the very clever ContextMenu plugin.

The SVNPlugin is new, and the JDiff plugin is improved. Many other plugins have latest versions that require jEdit 4.3.

## Future Plans

During this process of cleaning up jEdit, I started on many projects and did not finish them. They are still worthwhile projects, ones I would like to get back to. As always, if there are any volunteers who would like to help out with them, please join the `jedit-devel` mailing list, look at some unassigned bugs and feature requests, and see if you can do any of them. Feel free to ask for help if you are stuck. The other developers are always happy to initiate someone new into the code.

Also take a look at the TODO file for examples of some of the work that was started but not finished yet on the core. Some plugins also have their own TODO lists.