Appendix E. History of jEdit

Open Source projects are often started when the author "scratches an itch"; for example, some programmer itching for a good mail client might write one. jEdit, however, started as more of an experimental hack. I never intended it to be useful; its growth and popularity was completely unexpected to me.

Early Efforts

One can say that jEdit started as early as 1996. My first effort at writing an editor, and in fact my first effort at writing a real Java program, was an application called JavaJot. The source code totalled to about 5 kilobytes; JavaJot wasn't about to compete with emacs any time soon. I posted JavaJot to my homepage, but didn't get a single e-mail about it (no surprise either)

Nearly a year later (late 1997/early 1998) when I got a new PC, I started hacking in Java 1.1. I downloaded several Java 1.1 applications, to see how the new features can be used. One that particularly impressed me was John Jensen's TextEdit. It's most interesting feature was a plugin system; it could load external JAR files to extend the editor. It was a neat idea, but TextEdit didn't take it far enough; for example, plugins were limited to filtering the selected text, and couldn't do much else.

So soon after seeing TextEdit, I began coding "JEdit" (note that the first character was capitalized, unlike today's "jEdit"). I implemented a plugin system similar to TextEdit's, and added many other features that TextEdit lacked, such as multiple document support. JEdit was never released to the public; I felt that there were so many other trivial Java text editors out there, that JEdit wouldn't make much of a difference.

One of the reasons JEdit remained trivial was that at the time, the AWT sucked. Writing complex GUIs was too hard and often one had to write their own components, from scratch, to go beyond the very basic capabilities offered by the AWT. So when Swing 1.0 was released, promising rich, lightweight, customizable components, I immediately downloaded it. I was impressed. So impressed that I wrote an another editor, this time using Swing. I called it JE. It went far beyond the original JEdit in features, and was better than many Java editors available at the time.

However, because I didn't know Swing very well at the time, JE had many flaws; for example, the go to line function parsed the text for line break (\n) characters, instead of using the much faster Swing element map. So I never released it either.

Third Time Lucky

What I started coding next became the modern jEdit. I copied the "good" bits from JE, such as the plugin system, and rewrote the rest from scratch. I also released early and often. After I implemented file loading, saving, and several other fundamental features, I released the first jEdit with a "version number"; I called it jEdit 0.2. After version 0.2, I made a few more 0.x releases which added some more basic functionality, such as printing and search and replace.

jEdit 1.0 and 1.1

In September 1998, after only about a month of development, jEdit 1.0 was released. At this time, I never intended it to be anything more than a trivial text editor. jEdit 1.1 was released approximately one month later, but it only added a few minor features, and was still rather limited.

jEdit 1.2

After releasing jEdit 1.1, I more-or-less stopped developing it, not sure what to do next. But then as a quick hack, Tal Davidson (author of JStyle and Artistic Style) wrote a simple syntax highlighting backend parser that he called JSTokenMarker. After he sent it to me, I started work on jEdit 1.2 immediately. 1.2pre1 was a cleanup release, and 1.2pre2 integrated his code. It was buggy and slow, but it changed jEdit forever; it was no longer just a toy.

I continued enhancing JSTokenMarker throughout the 1.2 pre-releases. At version 1.2pre7, it was pretty stable, and it supported HTML and various other file types in addition to Java. Unfortunately, it was too slow and wasn't very well implemented (it was a quick hack, after all). So in jEdit 1.2pre8, I scrapped Tal's original code and wrote my own system, implementing it more carefully. It was a total rewrite, and in fact none of Tal's original code remains, but the JSTokenMarker legacy lives on; the main syntax parser class is named TokenMarker, and many other class and method names are similar or exactly the same as in Tal's original implementation - markTokens(), and so on.

By the time jEdit 1.2 was released, I began using it as my primary text editor. Because of this, jEdit 1.2 was probably the most significant release ever. Version 1.1 was just a trivial hack I wrote for fun. Then, in a little less than a month, it became a serious tool.

jEdit 2.0

jEdit 1.3 to 1.6 all added many useful features, but nothing too notable. However, jEdit 2.0 bought another major update to the core; it had a rewritten text area component.

The old text area component, which was based on the Swing JEditorPane, was slow, buggy and inflexible. The new one, in contrast, was a from-scratch implementation that was not based on the Swing text package, and it was much better suited for a text editor. jEdit versions 2.1, 2.2 and 2.3 took advantage of the new text area by adding rectangular selections, macros, a gutter and many other features.

jEdit 2.4

jEdit 2.4 bought the first major change to the syntax highlighting system since version 1.2. In previous jEdit releases, to write a new syntax highlighting mode, you had to write a token marker, and doing this was a lot of work. Token markers were sometimes tricky to write and debug.

The solution had actually been in development since jEdit 1.5. For nearly a year, Mike Dillon had been maintaining the "XMode" plugin, which allowed new syntax highlighting modes to be specified using an XML syntax. In jEdit 2.4, the old syntax highlighting system was scrapped and XMode was integrated. Now, the syntax highlighting modes are easier to write and maintain, can highlight more syntax, and of course, there are more of them.