KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > model > IStep


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 package org.eclipse.debug.core.model;
12
13
14 import org.eclipse.debug.core.DebugException;
15
16 /**
17  * Provides the ability to step into, over, and return
18  * from the current execution location. Implementations
19  * must be non-blocking.
20  * <p>
21  * Implementations should honor step filter settings in their
22  * associated debug target, as defined by <code>IStepFilters</code>.
23  * </p>
24  * <p>
25  * Clients may implement this interface.
26  * </p>
27  * @see org.eclipse.debug.core.model.IStepFilters
28  */

29 public interface IStep {
30     /**
31      * Returns whether this element can currently perform a step into.
32      *
33      * @return whether this element can currently perform a step into
34      */

35     public boolean canStepInto();
36     /**
37      * Returns whether this element can currently perform a step over.
38      *
39      * @return whether this element can currently perform a step over
40      */

41     public boolean canStepOver();
42     /**
43      * Returns whether this element can currently perform a step return.
44      *
45      * @return whether this element can currently perform a step return
46      */

47     public boolean canStepReturn();
48     /**
49      * Returns whether this element is currently stepping.
50      * <p>
51      * For example, a thread is considered to be stepping
52      * after the <code>stepOver</code> call until the step over is completed,
53      * a breakpoint is reached, an exception is thrown, or the thread or debug target is
54      * terminated.
55      * </p>
56      *
57      * @return whether this element is currently stepping
58      */

59     public boolean isStepping();
60     /**
61      * Steps into the current statement, generating <code>RESUME</code>
62      * and <code>SUSPEND</code> events for the associated thread. Can only be called
63      * when the associated thread is suspended. Implementations must implement
64      * stepping as non-blocking.
65      *
66      * @exception DebugException on failure. Reasons include:<ul>
67      * <li>TARGET_REQUEST_FAILED - The request failed in the target</li>
68      * <li>NOT_SUPPORTED - The capability is not supported by the target</li>
69      * </ul>
70      */

71     public void stepInto() throws DebugException;
72     /**
73      * Steps over the current statement, generating <code>RESUME</code>
74      * and <code>SUSPEND</code> events for the associated thread. Can only be called
75      * when the associated thread is suspended. Implementations must implement
76      * stepping as non-blocking.
77      *
78      * @exception DebugException on failure. Reasons include:<ul>
79      * <li>TARGET_REQUEST_FAILED - The request failed in the target</li>
80      * <li>NOT_SUPPORTED - The capability is not supported by the target</li>
81      * </ul>
82      */

83     public void stepOver() throws DebugException;
84     /**
85      * Steps to the next return statement in the current scope,
86      * generating <code>RESUME</code> and <code>SUSPEND</code> events for
87      * the associated thread. Can only be called when the associated thread is suspended.
88      * Implementations must implement stepping as non-blocking.
89      *
90      * @exception DebugException on failure. Reasons include:<ul>
91      * <li>TARGET_REQUEST_FAILED - The request failed in the target</li>
92      * <li>NOT_SUPPORTED - The capability is not supported by the target</li>
93      * </ul>
94      */

95     public void stepReturn() throws DebugException;
96 }
97
Popular Tags