|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| NoDebuggerAvailable.java | - | 8.3% | 6.1% | 6.7% |
|
||||||||||||||
| 1 | /*BEGIN_COPYRIGHT_BLOCK | |
| 2 | * | |
| 3 | * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu) | |
| 4 | * All rights reserved. | |
| 5 | * | |
| 6 | * Redistribution and use in source and binary forms, with or without | |
| 7 | * modification, are permitted provided that the following conditions are met: | |
| 8 | * * Redistributions of source code must retain the above copyright | |
| 9 | * notice, this list of conditions and the following disclaimer. | |
| 10 | * * Redistributions in binary form must reproduce the above copyright | |
| 11 | * notice, this list of conditions and the following disclaimer in the | |
| 12 | * documentation and/or other materials provided with the distribution. | |
| 13 | * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the | |
| 14 | * names of its contributors may be used to endorse or promote products | |
| 15 | * derived from this software without specific prior written permission. | |
| 16 | * | |
| 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 18 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 19 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | |
| 21 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
| 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
| 23 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
| 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
| 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
| 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 28 | * | |
| 29 | * This software is Open Source Initiative approved Open Source Software. | |
| 30 | * Open Source Initative Approved is a trademark of the Open Source Initiative. | |
| 31 | * | |
| 32 | * This file is part of DrJava. Download the current version of this project | |
| 33 | * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/ | |
| 34 | * | |
| 35 | * END_COPYRIGHT_BLOCK*/ | |
| 36 | ||
| 37 | package edu.rice.cs.drjava.model.debug; | |
| 38 | ||
| 39 | import java.util.ArrayList; | |
| 40 | import edu.rice.cs.drjava.model.OpenDefinitionsDocument; | |
| 41 | ||
| 42 | /** | |
| 43 | * Placeholder class indicating that no debugger is available to DrJava. | |
| 44 | * This class follows the Singleton pattern. | |
| 45 | * @version $Id: NoDebuggerAvailable.java 5175 2010-01-20 08:46:32Z mgricken $ | |
| 46 | */ | |
| 47 | public class NoDebuggerAvailable implements Debugger { | |
| 48 | ||
| 49 | /** Singleton instance of this class. */ | |
| 50 | public static final NoDebuggerAvailable ONLY = new NoDebuggerAvailable(); | |
| 51 | ||
| 52 | /** Private constructor: use the ONLY field. */ | |
| 53 | 21 | private NoDebuggerAvailable() { } |
| 54 | ||
| 55 | /** Returns whether the debugger is currently available in this JVM. This does not indicate whether it is ready to | |
| 56 | * be used. | |
| 57 | */ | |
| 58 | 1099 | public boolean isAvailable() { return false; } |
| 59 | ||
| 60 | 0 | public DebugModelCallback callback() { return new DebugModelCallback() { }; } |
| 61 | ||
| 62 | /** Attaches the debugger to the Interactions JVM to prepare for debugging. */ | |
| 63 | 0 | public void startUp() throws DebugException { } |
| 64 | ||
| 65 | /** Disconnects the debugger from the Interactions JVM and cleans up any state. */ | |
| 66 | 0 | public void shutdown() { } |
| 67 | ||
| 68 | /** Returns the status of the debugger. */ | |
| 69 | 0 | public boolean isReady() { return false; } |
| 70 | ||
| 71 | /** Suspends execution of the currently. */ | |
| 72 | 0 | public void suspend(DebugThreadData d) { } |
| 73 | ||
| 74 | /** Suspends all the threads. */ | |
| 75 | 0 | public void suspendAll() { } |
| 76 | ||
| 77 | /** Sets the current thread which is being debugged to the thread referenced by d. */ | |
| 78 | 0 | public void setCurrentThread(DebugThreadData d) { } |
| 79 | ||
| 80 | /** Enables automatic trace*/ | |
| 81 | 0 | public void setAutomaticTraceEnabled(boolean e) { } |
| 82 | ||
| 83 | /** Returns whether automatic trace has been enabled within the debugger*/ | |
| 84 | 0 | public boolean isAutomaticTraceEnabled() { return false; } |
| 85 | ||
| 86 | /** Resumes execution of the currently loaded document. */ | |
| 87 | 0 | public void resume() { } |
| 88 | ||
| 89 | /** Resumes execution of the given thread. | |
| 90 | * @param data the DebugThreadData representing the thread to resume | |
| 91 | */ | |
| 92 | 0 | public void resume(DebugThreadData data) { } |
| 93 | ||
| 94 | /** Steps the execution of the currently loaded document. */ | |
| 95 | 0 | public void step(StepType type) throws DebugException { } |
| 96 | ||
| 97 | /** Called from interactionsEnded in MainFrame in order to clear any current StepRequests that remain. */ | |
| 98 | 0 | public void clearCurrentStepRequest() { } |
| 99 | ||
| 100 | /** Adds a watch on the given field or variable. | |
| 101 | * @param field the name of the field we will watch | |
| 102 | */ | |
| 103 | 0 | public void addWatch(String field) { } |
| 104 | ||
| 105 | /** Removes any watches on the given field or variable. | |
| 106 | * @param field the name of the field we will watch | |
| 107 | */ | |
| 108 | 0 | public void removeWatch(String field) { } |
| 109 | ||
| 110 | /** Removes the watch at the given index. | |
| 111 | * @param index Index of the watch to remove | |
| 112 | */ | |
| 113 | 0 | public void removeWatch(int index) { } |
| 114 | ||
| 115 | /** Removes all watches on existing fields and variables. */ | |
| 116 | 0 | public void removeAllWatches() { } |
| 117 | ||
| 118 | /** Toggles whether a breakpoint is set at the given line in the given document. */ | |
| 119 | 0 | public boolean toggleBreakpoint(OpenDefinitionsDocument doc, int offset, boolean isEnabled) |
| 120 | 0 | throws DebugException { return false; } |
| 121 | ||
| 122 | /** Sets a breakpoint. */ | |
| 123 | 0 | public void setBreakpoint(Breakpoint breakpoint) { } |
| 124 | ||
| 125 | /** Removes a breakpoint. */ | |
| 126 | 0 | public void removeBreakpoint(Breakpoint breakpoint) { } |
| 127 | ||
| 128 | /** Returns all currently watched fields and variables. */ | |
| 129 | 0 | public ArrayList<DebugWatchData> getWatches() { return new ArrayList<DebugWatchData>(); } |
| 130 | ||
| 131 | /** Returns a Vector of ThreadData or null if the vm is null. */ | |
| 132 | 0 | public ArrayList<DebugThreadData> getCurrentThreadData() { return new ArrayList<DebugThreadData>(); } |
| 133 | ||
| 134 | /** Returns a Vector of StackData for the current thread or null if the current thread is null. */ | |
| 135 | 0 | public ArrayList<DebugStackData> getCurrentStackFrameData() { return new ArrayList<DebugStackData>(); } |
| 136 | ||
| 137 | /** Adds a listener to this Debugger. */ | |
| 138 | 0 | public void addListener(DebugListener listener) { } |
| 139 | ||
| 140 | /** Removes a listener to this JPDADebugger. */ | |
| 141 | 0 | public void removeListener(DebugListener listener) { } |
| 142 | ||
| 143 | /** @return true if there are any threads in the program currently being | |
| 144 | * debugged which have been suspended (by the user or by hitting a breakpoint). | |
| 145 | */ | |
| 146 | 0 | public boolean hasSuspendedThreads() { return false; } |
| 147 | ||
| 148 | /** Returns whether the thread the debugger is tracking is now running. */ | |
| 149 | 0 | public boolean hasRunningThread() { return false; } |
| 150 | ||
| 151 | /** Returns whether the debugger's current thread is suspended. */ | |
| 152 | 0 | public boolean isCurrentThreadSuspended() { return false; } |
| 153 | ||
| 154 | /** Scrolls to the source indicated by the given DebugStackData */ | |
| 155 | 0 | public void scrollToSource(DebugStackData data) { } |
| 156 | ||
| 157 | /** Scrolls to the source indicated by the given Breakpoint */ | |
| 158 | 0 | public void scrollToSource(Breakpoint bp) { } |
| 159 | ||
| 160 | /** Gets the Breakpoint object at the specified line in the given class. */ | |
| 161 | 0 | public Breakpoint getBreakpoint(int line, String className) { return null; } |
| 162 | } |
|
||||||||||