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.jdt.core;
11:
12: import org.eclipse.jdt.core.compiler.IProblem;
13:
14: /**
15: * A callback interface for receiving java problem as they are discovered
16: * by some Java operation.
17: *
18: * @see IProblem
19: * @since 2.0
20: */
21: public interface IProblemRequestor {
22:
23: /**
24: * Notification of a Java problem.
25: *
26: * @param problem IProblem - The discovered Java problem.
27: */
28: void acceptProblem(IProblem problem);
29:
30: /**
31: * Notification sent before starting the problem detection process.
32: * Typically, this would tell a problem collector to clear previously recorded problems.
33: */
34: void beginReporting();
35:
36: /**
37: * Notification sent after having completed problem detection process.
38: * Typically, this would tell a problem collector that no more problems should be expected in this
39: * iteration.
40: */
41: void endReporting();
42:
43: /**
44: * Predicate allowing the problem requestor to signal whether or not it is currently
45: * interested by problem reports. When answering <code>false</code>, problem will
46: * not be discovered any more until the next iteration.
47: *
48: * This predicate will be invoked once prior to each problem detection iteration.
49: *
50: * @return boolean - indicates whether the requestor is currently interested by problems.
51: */
52: boolean isActive();
53: }
|