~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/ISpellCheckEngine.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2000, 2007 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
 *     Sergey Prigogin (Google)
 
11
 *******************************************************************************/
 
12
 
 
13
package org.eclipse.cdt.internal.ui.text.spelling.engine;
 
14
 
 
15
import java.util.Locale;
 
16
 
 
17
import org.eclipse.cdt.internal.ui.text.spelling.SpellingPreferences;
 
18
 
 
19
/**
 
20
 * Interface for a spell check engine.
 
21
 * <p>
 
22
 * This engine can be configured with multiple
 
23
 * dictionaries.
 
24
 * </p>
 
25
 */
 
26
public interface ISpellCheckEngine {
 
27
 
 
28
        /**
 
29
         * Returns a spell checker configured with the global
 
30
         * dictionaries and the locale dictionary that correspond to the current
 
31
         * {@linkplain SpellingPreferences#getSpellingLocale() locale preference}.
 
32
         * <p>
 
33
         * <strong>Note:</strong> Changes to the spelling engine dictionaries
 
34
         * are not propagated to this spell checker.</p>
 
35
         *
 
36
         * @return a configured instance of the spell checker or <code>null</code> if none
 
37
         * @throws IllegalStateException if called after being shut down
 
38
         */
 
39
        ISpellChecker getSpellChecker() throws IllegalStateException;
 
40
 
 
41
        /**
 
42
         * Returns the locale of the current spell check engine.
 
43
         *
 
44
         * @return the locale of the current spell check engine
 
45
         */
 
46
        Locale getLocale();
 
47
 
 
48
        /**
 
49
         * Registers a global dictionary.
 
50
         *
 
51
         * @param dictionary the global dictionary to register
 
52
         */
 
53
        void registerGlobalDictionary(ISpellDictionary dictionary);
 
54
 
 
55
        /**
 
56
         * Registers a dictionary tuned for the specified locale with this engine.
 
57
         *
 
58
         * @param locale
 
59
         *                   The locale to register the dictionary with
 
60
         * @param dictionary
 
61
         *                   The dictionary to register
 
62
         */
 
63
        void registerDictionary(Locale locale, ISpellDictionary dictionary);
 
64
 
 
65
        /**
 
66
         * Shuts down this spell check engine and its associated components.
 
67
         * <p>
 
68
         * Further calls to this engine result in exceptions.
 
69
         * </p>
 
70
         */
 
71
        void shutdown();
 
72
 
 
73
        /**
 
74
         * Unregisters a dictionary previously registered either by a call to
 
75
         * <code>registerDictionary(Locale,ISpellDictionary)</code> or <code>registerDictionary(ISpellDictionary)</code>.
 
76
         * <p>
 
77
         * If the dictionary was not registered before, nothing happens.</p>
 
78
         *
 
79
         * @param dictionary the dictionary to unregister
 
80
         */
 
81
        void unregisterDictionary(ISpellDictionary dictionary);
 
82
        
 
83
}