01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.texteditor.spelling;
11:
12: import org.eclipse.core.runtime.content.IContentType;
13:
14: /**
15: * A spelling context allows a {@link ISpellingEngine} to retrieve information
16: * about the spelling check it has to perform.
17: * <p>
18: * This class is not intended to be subclassed by clients. The amount of
19: * information provided in this context may grow over time.
20: * </p>
21: *
22: * @since 3.1
23: */
24: public class SpellingContext {
25:
26: /** Content type of the document */
27: private IContentType fContentType;
28:
29: /**
30: * Creates a new, un-initialized spelling context.
31: */
32: public SpellingContext() {
33: }
34:
35: /**
36: * Sets the content type of the document.
37: *
38: * @param contentType the content type of the document or <code>null</code> if unknown
39: */
40: public void setContentType(IContentType contentType) {
41: fContentType = contentType;
42: }
43:
44: /**
45: * Returns the content type of the document.
46: *
47: * @return the content type of the document or <code>null</code> if unknown
48: */
49: public IContentType getContentType() {
50: return fContentType;
51: }
52: }
|