KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > texteditor > spelling > SpellingContext


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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 package org.eclipse.ui.texteditor.spelling;
12
13 import org.eclipse.core.runtime.content.IContentType;
14
15
16 /**
17  * A spelling context allows a {@link ISpellingEngine} to retrieve information
18  * about the spelling check it has to perform.
19  * <p>
20  * This class is not intended to be subclassed by clients. The amount of
21  * information provided in this context may grow over time.
22  * </p>
23  *
24  * @since 3.1
25  */

26 public class SpellingContext {
27
28     /** Content type of the document */
29     private IContentType fContentType;
30
31     /**
32      * Creates a new, un-initialized spelling context.
33      */

34     public SpellingContext() {
35     }
36
37     /**
38      * Sets the content type of the document.
39      *
40      * @param contentType the content type of the document or <code>null</code> if unknown
41      */

42     public void setContentType(IContentType contentType) {
43         fContentType= contentType;
44     }
45
46     /**
47      * Returns the content type of the document.
48      *
49      * @return the content type of the document or <code>null</code> if unknown
50      */

51     public IContentType getContentType() {
52         return fContentType;
53     }
54 }
55
Popular Tags