X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/spelling/engine/ISpellDictionary.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/spelling/engine/ISpellDictionary.java
new file mode 100644
index 0000000..213b548
--- /dev/null
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/spelling/engine/ISpellDictionary.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package net.sourceforge.phpdt.internal.ui.text.spelling.engine;
+
+import java.util.Set;
+
+/**
+ * Interface of dictionaries to use for spell-checking.
+ *
+ * @since 3.0
+ */
+public interface ISpellDictionary {
+
+ /**
+ * Returns whether this dictionary accepts new words.
+ *
+ * @return true
if this dictionary accepts new words,
+ * false
otherwise
+ */
+ public boolean acceptsWords();
+
+ /**
+ * Externalizes the specified word.
+ *
+ * @param word
+ * The word to externalize in the dictionary
+ */
+ public void addWord(String word);
+
+ /**
+ * Returns the ranked word proposals for an incorrectly spelled word.
+ *
+ * @param word
+ * The word to retrieve the proposals for
+ * @param sentence
+ * true
iff the proposals start a new sentence,
+ * false
otherwise
+ * @return Array of ranked word proposals
+ */
+ public Set getProposals(String word, boolean sentence);
+
+ /**
+ * Is the specified word correctly spelled?
+ *
+ * @param word
+ * The word to spell-check
+ * @return true
iff this word is correctly spelled,
+ * false
otherwise.
+ */
+ public boolean isCorrect(String word);
+
+ /**
+ * Is the dictionary loaded?
+ *
+ * @return true
iff it is loaded, false
+ * otherwise
+ */
+ public boolean isLoaded();
+
+ /**
+ * Empties the dictionary.
+ */
+ public void unload();
+}