#1 Add interface for syntax/spelling checker


Can you please add a simple interface which allows to plug in a syntax/spelling checker?

The interface should look like this:

CheckResult[] check(RTextAreaBase editor,
int start, int end);

start and end are the offsets where the text has been changed (end > start if something was inserted, start == end if something was deleted). This should be run in a background thread and the editor should make sure that check() is only called from a single thread.

The method returns the an (possibly empty) array of problems. CheckResult is a simple data container:

class CheckResult {
int start, end;
Object data;

For each checker, you can install a renderer. The default renderer should draw a squiggly line and display data.toString() when the mouse hovers over it (unless data == null).

Other checkers can put a list of corrections or compiler error messages in the data field and use custom renderers to hook into the context menu.


  • Robert Futrell

    Robert Futrell - 2009-01-17

    Not a bad idea. There is already a (unused) SquiggleUnderlineHighlightPainter that draws a wavy underline like those commonly used for errors in IDE's. That could be used to underline spelling mistakes.

    There was once (still is?) a half-baked interface to add "parsers" that would parse the code in RSTA, and would allow it to squiggle underline programming errors. At first glance, a spell checker could be added to this interface as well.

  • Robert Futrell

    Robert Futrell - 2009-01-17
    • assigned_to: nobody --> robert_futrell
  • Robert Futrell

    Robert Futrell - 2009-07-29

    A first pass at a spell checker "add-on" is now in the SVN repository:


    This will be a small extra jar (under the LGPL) that adds spell checking to RSTA through its addParser() method. The README file in the SpellChecker project has some usage instructions, and the project also has an example program showing usage.

    I've got some more changes to push still, but after that the add-on should be mostly usable. Of course, it'll be fleshed out as feedback comes in before the next RSTA release.

  • Robert Futrell

    Robert Futrell - 2009-08-24

    The SpellChecker add-on will be released alongside the next RSyntaxTextArea release.

  • Robert Futrell

    Robert Futrell - 2009-08-24
    • status: open --> pending
  • Robert Futrell

    Robert Futrell - 2009-12-02
    • status: pending --> closed
  • Robert Futrell

    Robert Futrell - 2009-12-02

    Added in 1.4.0.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks