]>
Commit | Line | Data |
---|---|---|
1b2798f6 EK |
1 | <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
2 | <html> | |
3 | <head> | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
5 | <meta name="Author" content="IBM"> | |
6 | <meta name="GENERATOR" content="Mozilla/4.51 [en] (WinNT; I) [Netscape]"> | |
7 | <title>Package-level Javadoc</title> | |
8 | </head> | |
9 | <body> | |
10 | Provides facilities for spell-checking of comments and strings in Java source code. | |
11 | <h2> | |
12 | Package Specification</h2> | |
13 | The content of this package extends the base functionality of the spell-checking engine. | |
14 | <p> | |
15 | It contains a spell-check engine specialized in Javadoc comments. | |
16 | Several dictionaries with Java specific content like Javadoc keywords, HTML tags and Task tags | |
17 | are provided. | |
18 | Additionally, the engine contributes correction proposals to the QuickFix processor. | |
19 | For non Java specific content the engine also contributes | |
20 | word completion proposals to the content assist processor. | |
21 | <h3> | |
22 | Spell-check engine</h3> | |
23 | <tt>SpellCheckEngine</tt> is the default implementation of the interface <tt>ISpellCheckEngine</tt>. | |
24 | It provides a facade for dealing with the setup of a spell-checker. This class provides methods | |
25 | to retrieve the available dictionaries and is responsible for the registration of those with the spell-checker. | |
26 | <tt>SpellCheckEngine</tt> also has support for life-cycle management. Single dictionaries can be temporarily | |
27 | unloaded from memory or unregistered.<br> | |
28 | To contribute own dictionaries use the methods to register locale sensitive or insensitive dictionaries. A dictionary can | |
29 | be associated to a specified locale, but can also be available for spell-checking arbitrary text in arbitrary languages. | |
30 | The actual spell-checker for a specified language can then be obtained by calling <tt>createSpellChecker(Locale)</tt>. | |
31 | This is the central point to working with the spell-checker. When requesting a spell-checker for a specified locale, the | |
32 | engine looks up the corresponding dictionary and registers it with the spell-checker. Note that the dictionaries | |
33 | are lazily loaded and can be further optimized by prefiltering the queried words. | |
34 | <p> | |
35 | <b>Note:</b> Locale sensitive dictionaries must be located in the "dictionaries/" subdirectory of the JDT UI plugin install | |
36 | location. The dictionaries are newline-separated word lists having the filename "language_country.dictionary", where "language" and "country" are | |
37 | the lowercase ISO-3166 language and country codes, respectively. The default dictionary is "en_us.dictionary". For correct | |
38 | behavior of the spell-check engine, at least the default dictionary must be installed. The default dictionary corresponds to the default locale | |
39 | of the spell-check engine. | |
40 | <h3> | |
41 | Dictionaries</h3> | |
42 | This implementation for a Javadoc comment spell-checker provides the following read-only | |
43 | dictionaries: | |
44 | <ul> | |
45 | <li>A dictionary for Javadoc tags: This dictionary contains the most commonly used Javadoc tags. When | |
46 | spell-checking Javadoc comments, this dictionary contributes correction proposals to the QuickFix processor to correct misspelt Javadoc tags.</li> | |
47 | <li>A dictionary for HTML tags: This dictionary contains the most commonly used HTML tags for writing Javadoc comments. When spell-checking | |
48 | Javadoc- or multiline comments, this dictionary contributes correction proposals to the QuickFix processor as well as | |
49 | word completion proposals to the Content Assist processor.</li> | |
50 | <li>A dictionary for Task tags: This dictionary reflects the currently available Java Task tags. When spell-checking arbitrary text in Java files, | |
51 | this dictionary contributes proposals both to the QuickFix processor and the Content Assist processor.</li> | |
52 | </ul> | |
53 | <h3> | |
54 | QuickFix processor</h3> | |
55 | The comment spell-checker also contributes a quickfix processor as an extension. This implementation of a quickfix processor | |
56 | contributes the following correction proposals: | |
57 | <ul> | |
58 | <li>Proposals for correct spelling: A number of words considered most similar to the incorrectly spelt word.</li> | |
59 | <li>The proposal to correct the sentence capitalization: This proposal is offered on incorrectly spelt words at the beginning of a sentence. | |
60 | <li>The proposal to add the unrecognized word to the locale-insensitive dictionaries</li> | |
61 | <li>The proposal to ignore the word during the current editing session</li> | |
62 | </ul> | |
63 | <h3> | |
64 | Content Assist processor</h3> | |
65 | The last contribution of the spell-checker is the support for word completion. The spell-checker provides a custom | |
66 | content assist processor to produce word completion proposals.<br> | |
67 | Word completion works on all non Java code content types and delivers a number of proposals based on the current | |
68 | caret position. | |
69 | </body> | |
70 | </html> |