Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Spelling engine status
Spelling engine status [message #505641] Mon, 04 January 2010 02:48 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi,
I did a bit of research, but I'm still confused.
It seems to me there *is* some support for Spell-checking in a generic
TextEditor (or an AbstractDecoratedTextEditor), but it is still packaged
into JDT, which means I will have to pull into my RCP app a lot of
unwanted code.

First and foremost:
Is this correct? Will this change soon (E4)?

Then:
Where can I find reasonably complete instructions on how to add the
current spell-checking to my app?
How do I produce additional "Platform dictionaries"? I know I can add
"custom dictionaries" (one word per line), but I would like to have a
standard (platform?) dictionary *and* let the user add a special-purpose
custom dict.

There is a set of slides floating around (Text Editor Recipes) that seem
to indicate this is not too complex, but slides alone are not very
informative :(

Can someone enlighten me, please?

Best Regards
Mauro
Re: Spelling engine status [message #505980 is a reply to message #505641] Tue, 05 January 2010 17:19 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Mauro Condarelli wrote:
> Hi,
> I did a bit of research, but I'm still confused.
> It seems to me there *is* some support for Spell-checking in a generic
> TextEditor (or an AbstractDecoratedTextEditor), but it is still
> packaged into JDT, which means I will have to pull into my RCP app a
> lot of unwanted code.
>
> First and foremost:
> Is this correct?
Yes, the general framework is in lower layers but JDT contributes the
engine for historical reasons.
> Will this change soon (E4)?
Not soon i.e. definitely not with this year's 3.x / e4 releases.
>
> Then:
> Where can I find reasonably complete instructions on how to add the
> current spell-checking to my app?
There's currently no easy way. You have to create your own spelling
engine which can either be a copy of the JDT one or your won.
> How do I produce additional "Platform dictionaries"?
Create a file <locale>.dictionary (e.g. de_CH.dictionary) with a word on
each line. Then ship it as fragment of org.eclipse.jdt.ui/dictionaries.
> I know I can add "custom dictionaries" (one word per line), but I
> would like to have a standard (platform?) dictionary *and* let the
> user add a special-purpose custom dict.
Look how the JDT spelling engine does it.

Dani
>
> There is a set of slides floating around (Text Editor Recipes) that
> seem to indicate this is not too complex, but slides alone are not
> very informative :(
>
> Can someone enlighten me, please?
>
> Best Regards
> Mauro
icon3.gif  Re: Spelling engine status [message #552608 is a reply to message #505980] Thu, 12 August 2010 19:24 Go to previous messageGo to next message
Petr Bodnar is currently offline Petr BodnarFriend
Messages: 4
Registered: July 2009
Junior Member
>> How do I produce additional "Platform dictionaries"?
>Create a file <locale>.dictionary (e.g. de_CH.dictionary) with a word on each line. Then ship it as fragment of org.eclipse.jdt.ui/dictionaries.

Well, I have tried what you have written and it really works - i. e. it is sufficient to put once custom dictionary into the "eclipse/plugins/org.eclipse.jdt.ui_VERSION.jar" - into the "dictionaries" folder and start Eclipse again.

BUT what can spare you some precious time is to know that the name of the dictionary file must be EXACTLY <language>_<country>.dictionary. The shortened form - <language>.dictionary - seems to be UNSUPPORTED: Although the dictionary does appear in the "Platform dictionary" combobox (in the Preferences dialog) and you can select it, the selection is in fact ignored and reverted to "none". Maybe a bug to report?

Best regards

Petr
Re: Spelling engine status [message #552681 is a reply to message #552608] Fri, 13 August 2010 07:35 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Petr Bodnar wrote:
>>> How do I produce additional "Platform dictionaries"?
>> Create a file <locale>.dictionary (e.g. de_CH.dictionary) with a word
>> on each line. Then ship it as fragment of
>> org.eclipse.jdt.ui/dictionaries.
>
> Well, I have tried what you have written and it really works - i. e.
> it is sufficient to put once custom dictionary into the
> "eclipse/plugins/org.eclipse.jdt.ui_VERSION.jar" - into the
> "dictionaries" folder and start Eclipse again.
>
> BUT what can spare you some precious time is to know that the name of
> the dictionary file must be EXACTLY <language>_<country>.dictionary.
> The shortened form - <language>.dictionary - seems to be UNSUPPORTED:
> Although the dictionary does appear in the "Platform dictionary"
> combobox (in the Preferences dialog) and you can select it, the
> selection is in fact ignored and reverted to "none". Maybe a bug to
> report?
Yes, please file one against JDT Text.

Dani
>
> Best regards
>
> Petr
Re: Spelling engine status [message #554938 is a reply to message #552681] Tue, 24 August 2010 19:53 Go to previous messageGo to next message
Petr Bodnar is currently offline Petr BodnarFriend
Messages: 4
Registered: July 2009
Junior Member
> Yes, please file one against JDT Text.
>
> Dani

Well, while searching for possible duplicates, I have found out that this problem was in fact already reported some year ago:

[spell checking] Locales without country code don't work

So I'm not sure about opening a new bug now. Maybe you could reopen the existing one, changing its severity to ENHANCEMENT?

Petr
Re: Spelling engine status [message #556017 is a reply to message #554938] Mon, 30 August 2010 14:34 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Petr Bodnar wrote:
>> Yes, please file one against JDT Text.
>>
>> Dani
>
> Well, while searching for possible duplicates, I have found out that
> this problem was in fact already reported some year ago:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=261498
>
> So I'm not sure about opening a new bug now. Maybe you could reopen
> the existing one, changing its severity to ENHANCEMENT?
I've fixed it for you.

Dani
>
> Petr
Re: Spelling engine status [message #556029 is a reply to message #556017] Mon, 30 August 2010 15:31 Go to previous message
Petr Bodnar is currently offline Petr BodnarFriend
Messages: 4
Registered: July 2009
Junior Member
Thanks a lot Smile
Previous Topic:How to add validation to XMLMultiPageEditorPart?
Next Topic:How to fix NoSuchMethodError in exported product
Goto Forum:
  


Current Time: Thu Mar 28 09:47:48 GMT 2024

Powered by FUDForum. Page generated in 0.03513 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top