eclipse-platform / eclipse.platform.ui

Eclipse Platform
https://projects.eclipse.org/projects/eclipse.platform
Eclipse Public License 2.0
78 stars 163 forks source link

Move DefaultSpellingEngine for text to eclipse.platform.ui #2227

Open DenisUngemach opened 2 weeks ago

DenisUngemach commented 2 weeks ago

I verified latest Integration Build of Eclipse SDK doesn't provide the feature:

image

Suggestion

It seems the spelling preferences are available with the text editor, but the default spelling handling of text happens in a jdt plugin: org.eclipse.jdt.ui with the class DefaultSpellingEngine .

This default spell checking for text is also very useful for other extensions, but it creates the dependency to jdt.

I would recommend to move the DefaultSpellingEngine only with the content type "org.eclipse.core.runtime.text" to the plugin org.eclipse.ui.workbench.texteditor next to the extension point org.eclipse.ui.workbench.texteditor.spellingEngine.

Then the text spelling feature can be easily used in the platform.

What do you think, do you agree to this feature or decline?

Then: I would like to analyze this further and if it is possible, i will provide a pull request with a recommended implementation. Of course this must not break the jdt implementation of the spelling engine. I will also open an issue in the jdt repo and ask them what they think about it.

Best regards, Denis Ungemach

mickaelistria commented 2 weeks ago

This would indeed be an enhancement. Fortunately, it looks like all that is internal, so there are no strong risk of breaking APIs. However, the tricky part in the migration would be to figure out: 1. what to migrate to platform UI and 2. What are the minimal API to expose so it's usage by JDT and others.

vogella commented 2 weeks ago

This was suggested multiple times over the last decade but nobody was found to do the actual migration work. CDT would also profit from this