com.pvx.ooadide.launchers.debug.model
Class PVXThread

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.debug.core.model.DebugElement
          extended by com.pvx.ooadide.launchers.debug.model.PVXDebugElement
              extended by com.pvx.ooadide.launchers.debug.model.PVXThread
All Implemented Interfaces:
IPVXEventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IDebugElement, org.eclipse.debug.core.model.IStep, org.eclipse.debug.core.model.ISuspendResume, org.eclipse.debug.core.model.ITerminate, org.eclipse.debug.core.model.IThread

public class PVXThread
extends PVXDebugElement
implements org.eclipse.debug.core.model.IThread, IPVXEventListener

// * A y VM thread. A PVX VM is single threaded.


Constructor Summary
PVXThread(PVXDebugTarget target)
          Constructs a new thread for the given target
 
Method Summary
 boolean canPop()
          Returns whether this thread can pop the top stack frame.
 boolean canResume()
           
 boolean canStepInto()
           
 boolean canStepOver()
           
 boolean canStepReturn()
           
 boolean canSuspend()
           
 boolean canTerminate()
           
 org.eclipse.debug.core.model.IBreakpoint[] getBreakpoints()
           
 java.lang.Object getError()
          Returns the most revent error event encountered since the last suspend, or null if none.
 java.lang.String getName()
           
 int getPriority()
           
 org.eclipse.debug.core.model.IStackFrame[] getStackFrames()
           
 org.eclipse.debug.core.model.IStackFrame getTopStackFrame()
           
 void handleEvent(java.lang.String event)
          Notification the given event occurred in the target program being interpretted.
 boolean hasStackFrames()
           
 boolean isStepping()
           
 boolean isSuspended()
           
 boolean isTerminated()
           
 void pop()
          Pops the top frame off the callstack.
 void resume()
           
 void stepInto()
           
 void stepOver()
           
 void stepReturn()
           
 void suspend()
           
 void suspendedBy(org.eclipse.debug.core.model.IBreakpoint breakpoint)
          Notifies this thread it has been suspended by the given breakpoint.
 void terminate()
           
 
Methods inherited from class com.pvx.ooadide.launchers.debug.model.PVXDebugElement
getModelIdentifier, sendRequest
 
Methods inherited from class org.eclipse.debug.core.model.DebugElement
fireChangeEvent, fireCreationEvent, fireEvent, fireResumeEvent, fireSuspendEvent, fireTerminateEvent, getAdapter, getDebugTarget, getLaunch
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

PVXThread

public PVXThread(PVXDebugTarget target)
Constructs a new thread for the given target

Parameters:
target - VM
Method Detail

getStackFrames

public org.eclipse.debug.core.model.IStackFrame[] getStackFrames()
                                                          throws org.eclipse.debug.core.DebugException
Specified by:
getStackFrames in interface org.eclipse.debug.core.model.IThread
Throws:
org.eclipse.debug.core.DebugException

hasStackFrames

public boolean hasStackFrames()
                       throws org.eclipse.debug.core.DebugException
Specified by:
hasStackFrames in interface org.eclipse.debug.core.model.IThread
Throws:
org.eclipse.debug.core.DebugException

getPriority

public int getPriority()
                throws org.eclipse.debug.core.DebugException
Specified by:
getPriority in interface org.eclipse.debug.core.model.IThread
Throws:
org.eclipse.debug.core.DebugException

getTopStackFrame

public org.eclipse.debug.core.model.IStackFrame getTopStackFrame()
                                                          throws org.eclipse.debug.core.DebugException
Specified by:
getTopStackFrame in interface org.eclipse.debug.core.model.IThread
Throws:
org.eclipse.debug.core.DebugException

getName

public java.lang.String getName()
Specified by:
getName in interface org.eclipse.debug.core.model.IThread

getBreakpoints

public org.eclipse.debug.core.model.IBreakpoint[] getBreakpoints()
Specified by:
getBreakpoints in interface org.eclipse.debug.core.model.IThread

suspendedBy

public void suspendedBy(org.eclipse.debug.core.model.IBreakpoint breakpoint)
Notifies this thread it has been suspended by the given breakpoint.

Parameters:
breakpoint - breakpoint

canResume

public boolean canResume()
Specified by:
canResume in interface org.eclipse.debug.core.model.ISuspendResume

canSuspend

public boolean canSuspend()
Specified by:
canSuspend in interface org.eclipse.debug.core.model.ISuspendResume

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface org.eclipse.debug.core.model.ISuspendResume

resume

public void resume()
            throws org.eclipse.debug.core.DebugException
Specified by:
resume in interface org.eclipse.debug.core.model.ISuspendResume
Throws:
org.eclipse.debug.core.DebugException

suspend

public void suspend()
             throws org.eclipse.debug.core.DebugException
Specified by:
suspend in interface org.eclipse.debug.core.model.ISuspendResume
Throws:
org.eclipse.debug.core.DebugException

canStepInto

public boolean canStepInto()
Specified by:
canStepInto in interface org.eclipse.debug.core.model.IStep

canStepOver

public boolean canStepOver()
Specified by:
canStepOver in interface org.eclipse.debug.core.model.IStep

canStepReturn

public boolean canStepReturn()
Specified by:
canStepReturn in interface org.eclipse.debug.core.model.IStep

isStepping

public boolean isStepping()
Specified by:
isStepping in interface org.eclipse.debug.core.model.IStep

stepInto

public void stepInto()
              throws org.eclipse.debug.core.DebugException
Specified by:
stepInto in interface org.eclipse.debug.core.model.IStep
Throws:
org.eclipse.debug.core.DebugException

stepOver

public void stepOver()
              throws org.eclipse.debug.core.DebugException
Specified by:
stepOver in interface org.eclipse.debug.core.model.IStep
Throws:
org.eclipse.debug.core.DebugException

stepReturn

public void stepReturn()
                throws org.eclipse.debug.core.DebugException
Specified by:
stepReturn in interface org.eclipse.debug.core.model.IStep
Throws:
org.eclipse.debug.core.DebugException

canTerminate

public boolean canTerminate()
Specified by:
canTerminate in interface org.eclipse.debug.core.model.ITerminate

isTerminated

public boolean isTerminated()
Specified by:
isTerminated in interface org.eclipse.debug.core.model.ITerminate

terminate

public void terminate()
               throws org.eclipse.debug.core.DebugException
Specified by:
terminate in interface org.eclipse.debug.core.model.ITerminate
Throws:
org.eclipse.debug.core.DebugException

getError

public java.lang.Object getError()
Returns the most revent error event encountered since the last suspend, or null if none.

Returns:
the most revent error event encountered since the last suspend, or null if none

handleEvent

public void handleEvent(java.lang.String event)
Description copied from interface: IPVXEventListener
Notification the given event occurred in the target program being interpretted.

Specified by:
handleEvent in interface IPVXEventListener
Parameters:
event - the event

pop

public void pop()
         throws org.eclipse.debug.core.DebugException
Pops the top frame off the callstack.

Throws:
org.eclipse.debug.core.DebugException

canPop

public boolean canPop()
Returns whether this thread can pop the top stack frame.

Returns:
whether this thread can pop the top stack frame