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
None
None
Public
|
Date: 2009-08-24 23:16 The SpellChecker add-on will be released alongside the next RSyntaxTextArea |
|
Date: 2009-07-29 13:21 A first pass at a spell checker "add-on" is now in the SVN repository: |
|
Date: 2009-01-17 20:30 Not a bad idea. There is already a (unused) |
| Field | Old Value | Date | By |
|---|---|---|---|
| close_date | - | 2009-08-24 23:16 | robert_futrell |
| status_id | Open | 2009-08-24 23:16 | robert_futrell |
| assigned_to | nobody | 2009-01-17 20:30 | robert_futrell |