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-12-01 21:27:27 PST Added in 1.4.0. |
|
Date: 2009-08-24 16:16:25 PDT The SpellChecker add-on will be released alongside the next RSyntaxTextArea |
|
Date: 2009-07-29 06:21:48 PDT A first pass at a spell checker "add-on" is now in the SVN repository: |
|
Date: 2009-01-17 12:30:42 PST Not a bad idea. There is already a (unused) |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Pending | 2009-12-01 21:27:27 PST | robert_futrell |
| allow_comments | 1 | 2009-12-01 21:27:27 PST | robert_futrell |
| close_date | 2009-08-24 16:16 | 2009-12-01 21:27:27 PST | robert_futrell |
| status_id | Open | 2009-08-24 16:16:27 PDT | robert_futrell |
| close_date | - | 2009-08-24 16:16:27 PDT | robert_futrell |
| assigned_to | nobody | 2009-01-17 12:30:42 PST | robert_futrell |