Bug 513314 - Generic editor spellcheck reconciler shouldn't be enabled by default
Summary: Generic editor spellcheck reconciler shouldn't be enabled by default
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.7 M7   Edit
Assignee: Mickael Istria CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 517681
  Show dependency tree
 
Reported: 2017-03-08 10:03 EST by Alexander Kurtakov CLA
Modified: 2017-06-06 04:11 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 Alexander Kurtakov CLA 2017-03-08 10:03:02 EST
While converting editors to the generic one I faced the spellcheck annotation/underline and what's worse it provides hovers which take precedence over hovers added for the given editor thus actually decreasing functionality.
Comment 1 Dani Megert CLA 2017-03-08 12:00:24 EST
I disagree regarding disabling it, but it should only spell check partitions that have natural language, e.g. Javadoc or "normal" text files.
Comment 2 Mickael Istria CLA 2017-03-08 12:08:22 EST
The partition mechanism is not necessary to work the generic editor. It's made optional at the convenience of contributors. So we cannot rely on it for decision.
Concretely, the partition mechanism is one of the layers that are very Eclipse-specific and perceived as overkill for some language developers who have some tools applying on text files directly and who don't do partitioning in Eclipse. It's something we need to make fully optional for the success of the Generic Editor and we cannot rely on it as a part of a solution there.
It's much simpler and more consistent with current state to disable spell-checking by default in Generic Editor and let people enable spell checking by themselves where and when they need it.
I'll have the example and PDE template show how to enable spell checking where it makes sense.
Comment 3 Dani Megert CLA 2017-03-08 12:19:33 EST
(In reply to Mickael Istria from comment #2)
> It's much simpler and more consistent with current state to disable
> spell-checking by default in Generic Editor and let people enable spell
> checking by themselves where and when they need it.

OK, but then they must be able to enable it per generic editor extension. Otherwise it will always be useless for some.
Comment 4 Mickael Istria CLA 2017-03-08 12:24:21 EST
On 2nd thought, as usual, I agree with you Dani ;)
If there is a dedicated partition for "natural language", it's fine to enable spellcheck by default and shouldn't harm. However, I have the impression that currently the spellcheck applies on the Default partition type (which is not guaranteed to be natural language) so spellcheck applies on code. Is there an existing partition type in Platform Text for natural language that we could link to?
Comment 5 Dani Megert CLA 2017-03-08 12:28:39 EST
(In reply to Mickael Istria from comment #4)
> However, I have the
> impression that currently the spellcheck applies on the Default partition
> type (which is not guaranteed to be natural language) so spellcheck applies
> on code.

That depends on how it is set up. This can differ from editor to editor. As you can see in the Java editor the code (default partition) isn't spell checked.
Comment 6 Eclipse Genie CLA 2017-03-15 13:35:47 EDT
New Gerrit change created: https://git.eclipse.org/r/93144
Comment 7 Mickael Istria CLA 2017-03-16 02:18:51 EDT
A good example to add spell checking to the .project editor example, only on the "comment" element. This can be added to the example plugin and the template.
However, I'd rather work on it in separate commits and let https://git.eclipse.org/r/93144 move forward separately.
Comment 9 Eclipse Genie CLA 2017-03-21 14:34:20 EDT
New Gerrit change created: https://git.eclipse.org/r/93567
Comment 11 Mickael Istria CLA 2017-03-23 03:59:09 EDT
The example shows a possible way to enable spellcheck.
On the long run, it might be interesting to create a generic "natural language" document partition type that document listener or whatever other mechanism could set on some areas of the document, then we could consider enabling a generic spell checker that would run spellcheck only on those partitions, independently of the file content-type or of other language-specific stuff.
Comment 12 Eclipse Genie CLA 2017-03-25 03:48:49 EDT
New Gerrit change created: https://git.eclipse.org/r/93846