01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 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.IProgressMonitor;
13:
14: import org.eclipse.jface.text.IDocument;
15: import org.eclipse.jface.text.IRegion;
16:
17: /**
18: * A spelling engine that can be contributed to the
19: * <code>org.eclipse.ui.workbench.texteditor.spellingEngine</code> extension
20: * point. The <code>SpellingContext</code> provides information about the
21: * content type to be checked. In general a spelling engine should at least
22: * support the text {@link org.eclipse.core.runtime.content.IContentType content type}.
23: * <p>
24: * This interface is intended to be implemented by clients.
25: * </p>
26: *
27: * @since 3.1
28: */
29: public interface ISpellingEngine {
30:
31: /**
32: * Checks the given regions in the given document. Reports all found
33: * spelling problems to the collector.
34: *
35: * @param document the document to check
36: * @param regions the regions to check
37: * @param context the context
38: * @param collector the problem collector
39: * @param monitor the progress monitor, can be <code>null</code>
40: */
41: public void check(IDocument document, IRegion[] regions,
42: SpellingContext context,
43: ISpellingProblemCollector collector,
44: IProgressMonitor monitor);
45: }
|