Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to use JDT spell checking in more than one text field?
How to use JDT spell checking in more than one text field? [message #1235126] Thu, 23 January 2014 16:19
Johannes Konstantinidis is currently offline Johannes KonstantinidisFriend
Messages: 1
Registered: January 2014
Junior Member
Hi all,

I would like to use the spell checking mechanism of JDT UI within some text fields (as opposed to one single text editor).

I use Eclipse 4.3. So far I have installed the JDT plugin with the spell check engine. The spell checking is enabled within the preferences.

While searching I found the following examples for spell checking (not allowed to post links here)

  1. eclipsesource.com/blogs/2008/10/03/tip-spellchecking-in-eclipse/
  2. blog.ankursharma.org/2009/08/adding-spellchecking-to-custom-editors_19.html

From the examples, it seems to be easy to add spell checking and other features when using a SourceViewer. Just configure the SourceViewer with the current preferences, that's it. But...

We have a custom org.eclipse.ui.editors.text.TextEditor for our own file types. This editor does not show only one single text field, but splits the input into several text fields and hides the original SourceViewer. The spell checking works out-of-the-box on the original document of the TextEditor's SourceViewer, but no one can see it (due to the splitting and hiding).

So I created a custom component (extends Composite) with its own SourceViewer and configured it as described in the examples (with all defaults, no custom subclasses, etc). Each SourceViewer has its own IDocument instance that only contains a part of the whole file content.

To me it seems that there is no listener (maybe org.eclipse.jface.text.ITextListener) on the source viewer that triggers the spell check.

Where is my mistake?

Thanks a lot in advance.

Johannes
Previous Topic:Accessing "Configure-"-> "Converting toMaven Project" from plugin
Next Topic:New to programming/Eclipse. How do I create a standalone program?
Goto Forum:
  


Current Time: Fri Apr 26 19:47:42 GMT 2024

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

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

Back to the top