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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.internal.ui.text.spelling;
16 import net.sourceforge.phpdt.internal.ui.text.phpdoc.IHtmlTagConstants;
17 import net.sourceforge.phpdt.internal.ui.text.spelling.engine.AbstractSpellDictionary;
21 * Dictionary for html tags.
25 public class HtmlTagDictionary extends AbstractSpellDictionary implements IHtmlTagConstants {
28 * @see org.eclipse.jdt.internal.ui.text.spelling.engine.AbstractSpellDictionary#getName()
30 protected final URL getURL() {
35 * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary#isCorrect(java.lang.String)
37 public boolean isCorrect(final String word) {
39 if (word.charAt(0) == HTML_TAG_PREFIX)
40 return super.isCorrect(word);
46 * @see org.eclipse.jdt.ui.text.spelling.engine.AbstractSpellDictionary#load(java.net.URL)
48 protected boolean load(final URL url) {
52 for (int index= 0; index < HTML_GENERAL_TAGS.length; index++) {
54 hashWord(HTML_TAG_PREFIX + HTML_GENERAL_TAGS[index] + HTML_TAG_POSTFIX);
55 hashWord(HTML_CLOSE_PREFIX + HTML_GENERAL_TAGS[index] + HTML_TAG_POSTFIX);