1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 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 12 package org.eclipse.ui.texteditor.spelling; 13 14 /** 15 * A collector of {@link SpellingProblem}s. The {@link SpellingService} service 16 * will report its results to such a collector. 17 * <p> 18 * An implementer may specify if a collector is thread aware, i.e., if problems 19 * can be reported by any thread, potentially in parallel, and thus, multiple 20 * reporting sessions may be active at the same time. Clients of concrete 21 * collectors in turn must evaluate the usage of their collector and chose an 22 * appropriate implementation. 23 * </p> 24 * <p> 25 * This interface is intended to be implemented by clients. 26 * </p> 27 * 28 * @see SpellingService 29 * @since 3.1 30 */ 31 public interface ISpellingProblemCollector { 32 33 /** 34 * Notification of a spelling problem. 35 * 36 * @param problem the spelling problem 37 */ 38 public void accept(SpellingProblem problem); 39 40 /** 41 * Notification sent before starting to collect problems. This method 42 * will be called by the spelling infrastructure and is not intended 43 * to be called by clients. 44 */ 45 public void beginCollecting(); 46 47 /** 48 * Notification sent after completing to collect problems. This method 49 * will be called by the spelling infrastructure and is not intended 50 * to be called by clients. 51 */ 52 public void endCollecting(); 53 } 54