blob: 805435cd95d6c4babb0ec55a2f04f53816eaab59 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* xored software, Inc. - Initial implementation
*******************************************************************************/
package org.eclipse.dltk.core;
import org.eclipse.dltk.compiler.problem.IProblem;
/**
* A callback interface for receiving problem as they are discovered by some
* script operation.
*
* @see IProblem
*/
public interface IProblemRequestor {
/**
* Notification of a script problem.
*
* @param problem
* IProblem - The discovered script problem.
*/
void acceptProblem(IProblem problem);
/**
* Notification sent before starting the problem detection process.
* Typically, this would tell a problem collector to clear previously
* recorded problems.
*/
void beginReporting();
/**
* Notification sent after having completed problem detection process.
* Typically, this would tell a problem collector that no more problems
* should be expected in this iteration.
*/
void endReporting();
/**
* Predicate allowing the problem requestor to signal whether or not it is
* currently interested by problem reports. When answering
* <code>false</false>, problem will
* not be discovered any more until the next iteration.
*
* This predicate will be invoked once prior to each problem detection iteration.
*
* @return boolean - indicates whether the requestor is currently interested
* by problems.
*/
boolean isActive();
}