KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > text > spelling > SpellReconcileDictionary


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.internal.ui.text.spelling;
13
14 import java.net.URL JavaDoc;
15 import java.util.Locale JavaDoc;
16
17 import org.eclipse.jdt.internal.ui.text.spelling.engine.LocaleSensitiveSpellDictionary;
18
19 import org.eclipse.jdt.internal.ui.text.javadoc.IHtmlTagConstants;
20 import org.eclipse.jdt.internal.ui.text.javadoc.IJavaDocTagConstants;
21
22 /**
23  * Dictionary used by the spell reconciling strategy.
24  *
25  * @since 3.0
26  */

27 public class SpellReconcileDictionary extends LocaleSensitiveSpellDictionary implements IJavaDocTagConstants, IHtmlTagConstants {
28
29     /**
30      * Creates a new locale sensitive spell dictionary.
31      *
32      * @param locale
33      * The locale for this dictionary
34      * @param location
35      * The location of the locale sensitive dictionaries
36      */

37     public SpellReconcileDictionary(final Locale JavaDoc locale, final URL JavaDoc location) {
38         super(locale, location);
39     }
40
41     /*
42      * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary#isCorrect(java.lang.String)
43      */

44     public boolean isCorrect(final String JavaDoc word) {
45
46         final char character= word.charAt(0);
47         if (character != JAVADOC_TAG_PREFIX && character != HTML_TAG_PREFIX)
48             return super.isCorrect(word);
49
50         return false;
51     }
52 }
53
Popular Tags