@@ -56,85 +56,86 @@ private NoDebuggerAvailable() { }
5656
5757 /** Attaches the debugger to the Interactions JVM to prepare for debugging. */
5858 public void startup () throws DebugException {
59- throw new IllegalStateException ("No debugger is available" );
59+ // throw new IllegalStateException("No debugger is available");
6060 }
6161
6262 /** Disconnects the debugger from the Interactions JVM and cleans up any state. */
6363 public void shutdown () {
64- throw new IllegalStateException ("No debugger is available" );
64+ // throw new IllegalStateException("No debugger is available");
6565 }
6666
6767 /** Returns the status of the debugger. */
6868 public boolean isReady () {
69- throw new IllegalStateException ("No debugger is available" );
69+ return false ;
70+ //throw new IllegalStateException("No debugger is available");
7071 }
7172
7273 public boolean inDebugMode () { return false ; }
7374
7475 /** Suspends execution of the currently. */
7576 public void suspend (DebugThreadData d ) {
76- throw new IllegalStateException ("No debugger is available" );
77+ // throw new IllegalStateException("No debugger is available");
7778 }
7879
7980 /** Suspends all the threads. */
8081 public void suspendAll () {
81- throw new IllegalStateException ("No debugger is available" );
82+ // throw new IllegalStateException("No debugger is available");
8283 }
8384
8485 /** Sets the current thread which is being debugged to the thread referenced by d. */
8586 public void setCurrentThread (DebugThreadData d ) {
86- throw new IllegalStateException ("No debugger is available" );
87+ // throw new IllegalStateException("No debugger is available");
8788 }
8889
8990 /** Resumes execution of the currently loaded document. */
9091 public void resume () {
91- throw new IllegalStateException ("No debugger is available" );
92+ // throw new IllegalStateException("No debugger is available");
9293 }
9394
9495 /** Resumes execution of the given thread.
9596 * @param data the DebugThreadData representing the thread to resume
9697 */
9798 public void resume (DebugThreadData data ) {
98- throw new IllegalStateException ("No debugger is available" );
99+ // throw new IllegalStateException("No debugger is available");
99100 }
100101
101102 /** Steps into the execution of the currently loaded document.
102103 * @param flag The flag denotes what kind of step to take. The following mark valid options:
103104 * StepRequest.STEP_INTO, StepRequest.STEP_OVER, StepRequest.STEP_OUT
104105 */
105106 public void step (int flag ) throws DebugException {
106- throw new IllegalStateException ("No debugger is available" );
107+ // throw new IllegalStateException("No debugger is available");
107108 }
108109
109110 /** Called from interactionsEnded in MainFrame in order to clear any current StepRequests that remain. */
110111 public void clearCurrentStepRequest () {
111- throw new IllegalStateException ("No debugger is available" );
112+ // throw new IllegalStateException("No debugger is available");
112113 }
113114
114115 /** Adds a watch on the given field or variable.
115116 * @param field the name of the field we will watch
116117 */
117118 public void addWatch (String field ) {
118- throw new IllegalStateException ("No debugger is available" );
119+ // throw new IllegalStateException("No debugger is available");
119120 }
120121
121122 /** Removes any watches on the given field or variable.
122123 * @param field the name of the field we will watch
123124 */
124125 public void removeWatch (String field ) {
125- throw new IllegalStateException ("No debugger is available" );
126+ // throw new IllegalStateException("No debugger is available");
126127 }
127128
128129 /** Removes the watch at the given index.
129130 * @param index Index of the watch to remove
130131 */
131132 public void removeWatch (int index ) {
132- throw new IllegalStateException ("No debugger is available" );
133+ // throw new IllegalStateException("No debugger is available");
133134 }
134135
135136 /** Removes all watches on existing fields and variables. */
136137 public void removeAllWatches () {
137- throw new IllegalStateException ("No debugger is available" );
138+ // throw new IllegalStateException("No debugger is available");
138139 }
139140
140141 /** Toggles whether a breakpoint is set at the given line in the given document.
@@ -143,11 +144,8 @@ public void removeAllWatches() {
143144 * @param lineNum Line on which to set or remove the breakpoint
144145 * @param enabled true if this breakpoint should be enabled
145146 */
146- public void toggleBreakpoint (OpenDefinitionsDocument doc ,
147- int offset , int lineNum , boolean isEnabled )
148- throws DebugException
149- {
150- throw new IllegalStateException ("No debugger is available" );
147+ public void toggleBreakpoint (OpenDefinitionsDocument doc , int offset , int lineNum , boolean isEnabled ) throws DebugException {
148+ // throw new IllegalStateException("No debugger is available");
151149 }
152150
153151 /**
@@ -156,7 +154,7 @@ public void toggleBreakpoint(OpenDefinitionsDocument doc,
156154 * @param breakpoint The new breakpoint to set
157155 */
158156 public void setBreakpoint (Breakpoint breakpoint ) {
159- throw new IllegalStateException ("No debugger is available" );
157+ // throw new IllegalStateException("No debugger is available");
160158 }
161159
162160 /**
@@ -165,106 +163,113 @@ public void setBreakpoint(Breakpoint breakpoint) {
165163 * @param breakpoint The breakpoint to remove.
166164 */
167165 public void removeBreakpoint (Breakpoint breakpoint ) {
168- throw new IllegalStateException ("No debugger is available" );
166+ // throw new IllegalStateException("No debugger is available");
169167 }
170168
171169 /**
172170 * Removes all the breakpoints from the manager's vector of breakpoints.
173171 */
174172 public void removeAllBreakpoints () {
175- throw new IllegalStateException ("No debugger is available" );
173+ // throw new IllegalStateException("No debugger is available");
176174 }
177175
178176 /**
179177 * Returns a Vector<Breakpoint> that contains all of the Breakpoint objects that
180178 * all open documents contain.
181179 */
182180 public Vector <Breakpoint > getBreakpoints () {
183- throw new IllegalStateException ("No debugger is available" );
181+ return new Vector <Breakpoint >();
182+ //throw new IllegalStateException("No debugger is available");
184183 }
185184
186185 /**
187186 * Prints the list of breakpoints in the current session of DrJava, both pending
188187 * resolved Breakpoints are listed
189188 */
190189 public void printBreakpoints () {
191- throw new IllegalStateException ("No debugger is available" );
190+ // throw new IllegalStateException("No debugger is available");
192191 }
193192
194193 /**
195194 * Returns all currently watched fields and variables.
196195 */
197196 public Vector <DebugWatchData > getWatches () {
198- throw new IllegalStateException ("No debugger is available" );
197+ return new Vector <DebugWatchData >();
198+ //throw new IllegalStateException("No debugger is available");
199199 }
200200
201201 /**
202202 * Returns a Vector of ThreadData or null if the vm is null
203203 */
204204 public Vector <DebugThreadData > getCurrentThreadData () {
205- throw new IllegalStateException ("No debugger is available" );
205+ return new Vector <DebugThreadData >();
206+ //throw new IllegalStateException("No debugger is available");
206207 }
207208
208209 /**
209210 * Returns a Vector of StackData for the current thread or null if the
210211 * current thread is null.
211212 */
212213 public Vector <DebugStackData > getCurrentStackFrameData () {
213- throw new IllegalStateException ("No debugger is available" );
214+ return new Vector <DebugStackData >();
215+ //throw new IllegalStateException("No debugger is available");
214216 }
215217
216218 /**
217219 * Adds a listener to this JPDADebugger.
218220 * @param listener a listener that reacts on events generated by the JPDADebugger
219221 */
220222 public void addListener (DebugListener listener ) {
221- throw new IllegalStateException ("No debugger is available" );
223+ // throw new IllegalStateException("No debugger is available");
222224 }
223225
224226 /**
225227 * Removes a listener to this JPDADebugger.
226228 * @param listener listener to remove
227229 */
228230 public void removeListener (DebugListener listener ) {
229- throw new IllegalStateException ("No debugger is available" );
231+ // throw new IllegalStateException("No debugger is available");
230232 }
231233
232234 /**
233235 * @return true if there are any threads in the program currently being
234236 * debugged which have been suspended (by the user or by hitting a breakpoint).
235237 */
236238 public boolean hasSuspendedThreads () {
237- throw new IllegalStateException ("No debugger is available" );
239+ return false ;
240+ //throw new IllegalStateException("No debugger is available");
238241 }
239242
240243 /**
241244 * Returns whether the thread the debugger is tracking is now running.
242245 */
243246 public boolean hasRunningThread () {
244- throw new IllegalStateException ("No Debugger is available" );
247+ return false ;
248+ //throw new IllegalStateException("No Debugger is available");
245249 }
246250
247251 /**
248252 * Returns whether the debugger's current thread is suspended.
249253 */
250254 public boolean isCurrentThreadSuspended () {
251- throw new IllegalStateException ("No debugger is available" );
255+ return false ;
256+ //throw new IllegalStateException("No debugger is available");
252257 }
253258
254259 /**
255260 * scrolls to the source indicated by the given DebugStackData
256261 * @param data the DebugStackData representing the source location
257262 */
258263 public void scrollToSource (DebugStackData data ) {
259- throw new IllegalStateException ("No debugger is available" );
264+ // throw new IllegalStateException("No debugger is available");
260265 }
261266
262267 /**
263268 * scrolls to the source indicated by the given Breakpoint
264269 * @param bp the Breakpoint representing the source location
265270 */
266271 public void scrollToSource (Breakpoint bp ) {
267- throw new IllegalStateException ("No debugger is available" );
272+ // throw new IllegalStateException("No debugger is available");
268273 }
269274
270275 /**
@@ -276,6 +281,7 @@ public void scrollToSource(Breakpoint bp) {
276281 * there is no such breakpoint.
277282 */
278283 public Breakpoint getBreakpoint (int line , String className ) {
279- throw new IllegalStateException ("No debugger is available" );
284+ return null ;
285+ //throw new IllegalStateException("No debugger is available");
280286 }
281287}
0 commit comments