fix #774 infinite loop in net.sourceforge.phpeclipse.builder.IdentifierIndexManager...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / spelling / SpellReconcileDictionary.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11
12 package net.sourceforge.phpdt.internal.ui.text.spelling;
13
14 import java.net.URL;
15 import java.util.Locale;
16
17 import net.sourceforge.phpdt.internal.ui.text.phpdoc.IHtmlTagConstants;
18 import net.sourceforge.phpdt.internal.ui.text.phpdoc.IJavaDocTagConstants;
19 import net.sourceforge.phpdt.internal.ui.text.spelling.engine.LocaleSensitiveSpellDictionary;
20
21 /**
22  * Dictionary used by the spell reconciling strategy.
23  * 
24  * @since 3.0
25  */
26 public class SpellReconcileDictionary extends LocaleSensitiveSpellDictionary
27                 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 locale, final URL location) {
38                 super(locale, location);
39         }
40
41         /*
42          * @see net.sourceforge.phpdt.internal.ui.text.spelling.engine.ISpellDictionary#isCorrect(java.lang.String)
43          */
44         public boolean isCorrect(final String 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 }