Changes:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / IProblemRequestor.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.core;
12
13 import net.sourceforge.phpdt.core.compiler.IProblem;
14
15
16 /**
17  * A callback interface for receiving java problem as they are discovered
18  * by some Java operation.
19  * 
20  * @see IProblem
21  * @since 2.0
22  */
23 public interface IProblemRequestor {
24         
25         /**
26          * Notification of a Java problem.
27          * 
28          * @param problem IProblem - The discovered Java problem.
29          */     
30         void acceptProblem(IProblem problem);
31
32         /**
33          * Notification sent before starting the problem detection process.
34          * Typically, this would tell a problem collector to clear previously recorded problems.
35          */
36         void beginReporting();
37
38         /**
39          * Notification sent after having completed problem detection process.
40          * Typically, this would tell a problem collector that no more problems should be expected in this
41          * iteration.
42          */
43         void endReporting();
44
45         /**
46          * Predicate allowing the problem requestor to signal whether or not it is currently
47          * interested by problem reports. When answering <code>false</false>, problem will
48          * not be discovered any more until the next iteration.
49          * 
50          * This  predicate will be invoked once prior to each problem detection iteration.
51          * 
52          * @return boolean - indicates whether the requestor is currently interested by problems.
53          */
54         boolean isActive();
55 }