Change to openFileInTextEditor to fix ticket issue #650.
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.core / src / net / sourceforge / phpeclipse / xdebug / core / IDebugConnection.java
1 package net.sourceforge.phpeclipse.xdebug.core;
2
3 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugStackFrame;
4 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugThread;
5
6 import org.eclipse.core.runtime.IPath;
7 import org.eclipse.core.runtime.jobs.Job;
8 import org.eclipse.debug.core.DebugException;
9 import org.eclipse.debug.core.model.IBreakpoint;
10 import org.eclipse.debug.core.model.IStackFrame;
11 import org.eclipse.debug.core.model.IVariable;
12
13 import net.sourceforge.phpeclipse.xdebug.core.xdebug.ResponseListener.DebugResponse;
14
15 public interface IDebugConnection {
16         /**
17          * 
18          * @param featureName 
19          * @return true if debugger supports feature
20          */
21         DebugResponse featureGet(String featureName);
22
23         boolean featureSet(String featureName, String value);
24
25         DebugResponse sendRequestA(String command, String parameter);
26         
27         /**
28          * 
29          * @param breakpoint breakpoint to set
30          * @throws DebugException
31          */
32         void addBreakpoint(IBreakpoint breakpoint, IPath filePath) throws DebugException;
33         
34         /**
35          * 
36          * @param breakpoint breakpoint to remove
37          * @throws DebugException
38          */
39         void removeBreakpoint(IBreakpoint breakpoint) throws DebugException;
40         
41         /**
42          * 
43          * @param thread
44          * @return stackframes
45          * @throws DebugException
46          */
47         IStackFrame[] getStackFrames(XDebugThread thread) throws DebugException;
48         
49         /**
50          * Single stepOver the interpreter.
51          * 
52          * @throws DebugException if the request fails
53          */
54         void stepOver() throws DebugException;
55         
56         /**
57          * Single Stepinto the interpreter.
58          * 
59          * @throws DebugException if the request fails
60          * @throws  
61          */
62         void stepInto() throws DebugException;
63         
64         /**
65          * Single stepOut the interpreter.
66          * 
67          * @throws DebugException if the request fails
68          */
69         void stepOut() throws DebugException;
70         
71         /**
72          * Resume the debug process.
73          * 
74          * @throws DebugException if the request fails
75          */
76         void run() throws DebugException;
77         
78         /**
79          * Stops the debug process.
80          * 
81          * @throws DebugException if the request fails
82          */
83         void stop() throws DebugException;
84         
85         
86         boolean isClosed();
87         
88         /**
89          * 
90          * @param name variable name
91          * @param value value of the variable
92          * @return true if successfull
93          */
94         
95         public boolean setVarValue(String name, String value);
96         
97         boolean isInitialized();
98
99         /**
100          * Get the SessionID of the current Connection.
101          * 
102          * @throws DebugException if the request fails
103          */
104         String getSessionID();
105         
106         void setResponseListerner(Job listener);
107         
108         void startListener();
109         /**
110          * 
111          * @param frame 
112          * @param level context-level
113          * @return the variables for the context
114          */
115         public IVariable[] getVariables(XDebugStackFrame frame ,int level);     
116 }