Bug 508829 - [Generic Editor] provide a way to customize reconciler
Summary: [Generic Editor] provide a way to customize reconciler
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.8 M1   Edit
Assignee: Lucas Bullen CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation, noteworthy
Depends on:
Blocks: 512956
  Show dependency tree
 
Reported: 2016-12-07 09:17 EST by Martin Lippert CLA
Modified: 2017-07-24 18:18 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Lippert CLA 2016-12-07 09:17:03 EST
I would like to customize the reconciler of the generic editor (note, not the PresentationREconciler, but the regular Reconciler), in order to switch off spell checking explicitly for specific editors.

Usually I would do this by providing a specific TextSourceViewerConfiguration that overrides the getReconciler method. I could still do that with for a generic editor, but I would have to subclass it. Would be much nicer if I could configure that via an extension, in a similar way than it is implemented for the presentation reconciler.
Comment 1 Mickael Istria CLA 2017-07-11 10:40:10 EDT
> in order to switch off spell checking explicitly for specific editors.

The spell-checker is disabled by default (bug 513314 )

Can you elaborate of some other use-case you have for reconcilers? Is there any of these that cannot be achieved with documentListener and documentSetupParticipant extension point? Examples would be important here as the reconcilers aren't clearly specified and are a bit of a "wildcard extension" that IMO should be used as little as possible in favor of more scoped extensions.

> Would be much nicer if I could configure that via an extension, in a similar way than it is implemented for the presentation reconciler.

+1. I've figured out a case recently that I believe cannot be done without extensible reconcilers (or without creating a new API, that is something we need to avoid): folding (bug 512956). So unless there is a better way to do folding -and if you know one, please tell ASAP!- we'll have to create the extension point for reconcilers.
Comment 2 Martin Lippert CLA 2017-07-11 11:16:53 EDT
I had the spell checker use case in mind and no other use cases in addition to that. Sorry, no additional requirements here... :-)
Comment 3 Mickael Istria CLA 2017-07-11 11:28:51 EDT
(In reply to Martin Lippert from comment #2)
> I had the spell checker use case in mind and no other use cases in addition
> to that. Sorry, no additional requirements here... :-)

You don't have to be sorry, it's actually the best answer I was hoping ;)
Comment 4 Eclipse Genie CLA 2017-07-18 09:12:48 EDT
New Gerrit change created: https://git.eclipse.org/r/101429
Comment 5 Mickael Istria CLA 2017-07-18 11:06:23 EDT
Proposed patch seems very close to be merged soon.
Once this is done, it's important to add a note about it in the documentation, in the News and Noteworthy page and in the PDE template.
Comment 7 Eclipse Genie CLA 2017-07-20 14:07:39 EDT
New Gerrit change created: https://git.eclipse.org/r/101673
Comment 8 Eclipse Genie CLA 2017-07-20 14:22:14 EDT
New Gerrit change created: https://git.eclipse.org/r/101674
Comment 9 Eclipse Genie CLA 2017-07-20 16:00:56 EDT
New Gerrit change created: https://git.eclipse.org/r/101686
Comment 13 Lars Vogel CLA 2017-07-24 09:48:34 EDT
Lucas, AFAIK the N&N contains errors. Can you run the HTML document though https://validator.w3.org/check can correct it?
Comment 14 Eclipse Genie CLA 2017-07-24 10:03:09 EDT
New Gerrit change created: https://git.eclipse.org/r/101825
Comment 15 Lucas Bullen CLA 2017-07-24 10:18:19 EDT
You are correct Lars. There was a closing p tag with no opening one. Fix applied in patch above.
Comment 17 Mickael Istria CLA 2017-07-24 18:18:12 EDT
I think we're done here. Remaining (minor) issues are tracked in separate tickets.
Thanks a lot Lucas for this good contribution, and for taking care of doc and PDE by the way!