org.eclipse.m2m.atl.adt.debug.core
Class AtlDebugTarget

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.m2m.atl.adt.debug.core.AtlDebugElement
          extended by org.eclipse.m2m.atl.adt.debug.core.AtlDebugTarget
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.IBreakpointListener, org.eclipse.debug.core.model.IDebugElement, org.eclipse.debug.core.model.IDebugTarget, org.eclipse.debug.core.model.IDisconnect, org.eclipse.debug.core.model.IMemoryBlockRetrieval, org.eclipse.debug.core.model.ISuspendResume, org.eclipse.debug.core.model.ITerminate

public class AtlDebugTarget
extends AtlDebugElement
implements org.eclipse.debug.core.model.IDebugTarget

A debug target is a debuggable execution context. It's the root of the element hierarchy. The AtlDebugTarget contains only one thread : the main thread. The thread contains the current stackframe


Field Summary
static int stateDisconnected
           
static int stateRunning
           
static int stateSuspended
           
static int stateTerminated
          constant state possible for the debugger
 
Fields inherited from class org.eclipse.m2m.atl.adt.debug.core.AtlDebugElement
fTarget, logger
 
Constructor Summary
AtlDebugTarget(org.eclipse.debug.core.ILaunch launch)
           
 
Method Summary
 void breakpointAdded(org.eclipse.debug.core.model.IBreakpoint breakpoint)
           
 void breakpointChanged(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta)
           
 void breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta)
           
 boolean canDisconnect()
          Return true if the debugger can be disconnected
 boolean canResume()
          Return true if the debugger can be resumed
 boolean canSuspend()
          Return true if the debugger can be suspended
 boolean canTerminate()
          Return true if the debugger can be terminated
 void disconnect()
          This method disconnect the debugger
 ADWPDebugger getDebugger()
           
 org.eclipse.debug.core.model.IDebugTarget getDebugTarget()
          Returns the debugTarget
 java.lang.String getHost()
           
 org.eclipse.debug.core.ILaunch getLaunch()
          Returns the launch
 org.eclipse.debug.core.model.IMemoryBlock getMemoryBlock(long startAddress, long length)
          Not use in ATL debugger
 java.lang.String getMessageFromDebuggee()
           
 java.lang.String getModelIdentifier()
          Returns the unique identifier of the plug-in
 java.lang.String getName()
          Returns the name of the process
 java.lang.String getPort()
           
 org.eclipse.debug.core.model.IProcess getProcess()
          Not use in ATL debugger
 int getState()
           
 org.eclipse.debug.core.model.IThread[] getThreads()
          This method returns the array of threads.
 void handleDebugEvents(org.eclipse.debug.core.DebugEvent[] events)
          This method allows to receive DebugEvent sent
 boolean hasThreads()
          This method allows to know if there is a thread in the debugTarget In ATL, there is always one and only one thread : the main thread
 boolean isDisassemblyMode()
           
 boolean isDisconnected()
          This method allows to know if the debugger is in a state "Disconnected"
 boolean isSuspended()
          This method allows to know if the debugger is in a state "Suspended"
 boolean isTerminated()
          This method allows to know if the debugger is in a state "Terminated"
 void resume()
          This method resume the debugger
 void setDisassemblyMode(boolean disassemblyMode)
           
 void setPrevLocation(java.lang.String prevLocation)
           
 void setState(int state)
          state corresponding to the state of the debugger (running, disconnected ...)
 void start()
           
 boolean supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint breakpoint)
           
 boolean supportsStorageRetrieval()
          Not use in our context
 void suspend()
          This method suspends the debugger
 void terminate()
          This method terminates the action of the debugger
 
Methods inherited from class org.eclipse.m2m.atl.adt.debug.core.AtlDebugElement
abort, getAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

stateTerminated

public static final int stateTerminated
constant state possible for the debugger

See Also:
Constant Field Values

stateRunning

public static final int stateRunning
See Also:
Constant Field Values

stateSuspended

public static final int stateSuspended
See Also:
Constant Field Values

stateDisconnected

public static final int stateDisconnected
See Also:
Constant Field Values
Constructor Detail

AtlDebugTarget

public AtlDebugTarget(org.eclipse.debug.core.ILaunch launch)
Method Detail

start

public void start()

breakpointAdded

public void breakpointAdded(org.eclipse.debug.core.model.IBreakpoint breakpoint)
Specified by:
breakpointAdded in interface org.eclipse.debug.core.IBreakpointListener
See Also:
IBreakpointListener.breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)

breakpointChanged

public void breakpointChanged(org.eclipse.debug.core.model.IBreakpoint breakpoint,
                              org.eclipse.core.resources.IMarkerDelta delta)
Specified by:
breakpointChanged in interface org.eclipse.debug.core.IBreakpointListener
See Also:
IBreakpointListener.breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)

breakpointRemoved

public void breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint breakpoint,
                              org.eclipse.core.resources.IMarkerDelta delta)
Specified by:
breakpointRemoved in interface org.eclipse.debug.core.IBreakpointListener
See Also:
IBreakpointListener.breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)

canDisconnect

public boolean canDisconnect()
Return true if the debugger can be disconnected

Specified by:
canDisconnect in interface org.eclipse.debug.core.model.IDisconnect
See Also:
IDisconnect.canDisconnect()

canResume

public boolean canResume()
Return true if the debugger can be resumed

Specified by:
canResume in interface org.eclipse.debug.core.model.ISuspendResume
See Also:
ISuspendResume.canResume()

canSuspend

public boolean canSuspend()
Return true if the debugger can be suspended

Specified by:
canSuspend in interface org.eclipse.debug.core.model.ISuspendResume
See Also:
ISuspendResume.canSuspend()

canTerminate

public boolean canTerminate()
Return true if the debugger can be terminated

Specified by:
canTerminate in interface org.eclipse.debug.core.model.ITerminate
See Also:
ITerminate.canTerminate()

disconnect

public void disconnect()
                throws org.eclipse.debug.core.DebugException
This method disconnect the debugger

Specified by:
disconnect in interface org.eclipse.debug.core.model.IDisconnect
Throws:
org.eclipse.debug.core.DebugException
See Also:
IDisconnect.disconnect()

getDebugTarget

public org.eclipse.debug.core.model.IDebugTarget getDebugTarget()
Returns the debugTarget

Specified by:
getDebugTarget in interface org.eclipse.debug.core.model.IDebugElement
Overrides:
getDebugTarget in class AtlDebugElement
See Also:
IDebugElement.getDebugTarget()

getLaunch

public org.eclipse.debug.core.ILaunch getLaunch()
Returns the launch

Specified by:
getLaunch in interface org.eclipse.debug.core.model.IDebugElement
Overrides:
getLaunch in class AtlDebugElement
See Also:
IDebugElement.getLaunch()

getMemoryBlock

public org.eclipse.debug.core.model.IMemoryBlock getMemoryBlock(long startAddress,
                                                                long length)
                                                         throws org.eclipse.debug.core.DebugException
Not use in ATL debugger

Specified by:
getMemoryBlock in interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
Throws:
org.eclipse.debug.core.DebugException
See Also:
IMemoryBlockRetrieval.getMemoryBlock(long, long)

getModelIdentifier

public java.lang.String getModelIdentifier()
Returns the unique identifier of the plug-in

Specified by:
getModelIdentifier in interface org.eclipse.debug.core.model.IDebugElement
Overrides:
getModelIdentifier in class AtlDebugElement
See Also:
IDebugElement.getModelIdentifier()

getName

public java.lang.String getName()
                         throws org.eclipse.debug.core.DebugException
Returns the name of the process

Specified by:
getName in interface org.eclipse.debug.core.model.IDebugTarget
Throws:
org.eclipse.debug.core.DebugException
See Also:
IDebugTarget.getName()

getProcess

public org.eclipse.debug.core.model.IProcess getProcess()
Not use in ATL debugger

Specified by:
getProcess in interface org.eclipse.debug.core.model.IDebugTarget
See Also:
IDebugTarget.getProcess()

getThreads

public org.eclipse.debug.core.model.IThread[] getThreads()
                                                  throws org.eclipse.debug.core.DebugException
This method returns the array of threads. In our context, this method returns an array with only the main thread

Specified by:
getThreads in interface org.eclipse.debug.core.model.IDebugTarget
Throws:
org.eclipse.debug.core.DebugException
See Also:
IDebugTarget.getThreads()

hasThreads

public boolean hasThreads()
                   throws org.eclipse.debug.core.DebugException
This method allows to know if there is a thread in the debugTarget In ATL, there is always one and only one thread : the main thread

Specified by:
hasThreads in interface org.eclipse.debug.core.model.IDebugTarget
Throws:
org.eclipse.debug.core.DebugException
See Also:
IDebugTarget.hasThreads()

isDisconnected

public boolean isDisconnected()
This method allows to know if the debugger is in a state "Disconnected"

Specified by:
isDisconnected in interface org.eclipse.debug.core.model.IDisconnect
See Also:
IDisconnect.isDisconnected()

isSuspended

public boolean isSuspended()
This method allows to know if the debugger is in a state "Suspended"

Specified by:
isSuspended in interface org.eclipse.debug.core.model.ISuspendResume
See Also:
ISuspendResume.isSuspended()

isTerminated

public boolean isTerminated()
This method allows to know if the debugger is in a state "Terminated"

Specified by:
isTerminated in interface org.eclipse.debug.core.model.ITerminate
See Also:
ITerminate.isTerminated()

resume

public void resume()
            throws org.eclipse.debug.core.DebugException
This method resume the debugger

Specified by:
resume in interface org.eclipse.debug.core.model.ISuspendResume
Throws:
org.eclipse.debug.core.DebugException
See Also:
ISuspendResume.resume()

supportsBreakpoint

public boolean supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint breakpoint)
Specified by:
supportsBreakpoint in interface org.eclipse.debug.core.model.IDebugTarget
See Also:
IDebugTarget.supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint)

supportsStorageRetrieval

public boolean supportsStorageRetrieval()
Not use in our context

Specified by:
supportsStorageRetrieval in interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
See Also:
IMemoryBlockRetrieval.supportsStorageRetrieval()

suspend

public void suspend()
             throws org.eclipse.debug.core.DebugException
This method suspends the debugger

Specified by:
suspend in interface org.eclipse.debug.core.model.ISuspendResume
Throws:
org.eclipse.debug.core.DebugException
See Also:
ISuspendResume.suspend()

terminate

public void terminate()
               throws org.eclipse.debug.core.DebugException
This method terminates the action of the debugger

Specified by:
terminate in interface org.eclipse.debug.core.model.ITerminate
Throws:
org.eclipse.debug.core.DebugException
See Also:
ITerminate.terminate()

getDebugger

public ADWPDebugger getDebugger()
Returns:
Returns the debugger.

getState

public int getState()
Returns:
Returns the state.

setState

public void setState(int state)
state corresponding to the state of the debugger (running, disconnected ...) This method allows to update state

Parameters:
state - The state to set.

handleDebugEvents

public void handleDebugEvents(org.eclipse.debug.core.DebugEvent[] events)
This method allows to receive DebugEvent sent

See Also:
IDebugEventSetListener.handleDebugEvents(org.eclipse.debug.core.DebugEvent[])

isDisassemblyMode

public boolean isDisassemblyMode()

setDisassemblyMode

public void setDisassemblyMode(boolean disassemblyMode)
Parameters:
disassemblyMode - The disassemblyMode to set.

setPrevLocation

public void setPrevLocation(java.lang.String prevLocation)
Parameters:
prevLocation - The prevLocation to set.

getHost

public java.lang.String getHost()
Returns:
Returns the host.

getPort

public java.lang.String getPort()
Returns:
Returns the port.

getMessageFromDebuggee

public java.lang.String getMessageFromDebuggee()
Returns:
Returns the messageFromDebuggee.

Copyright 2007 IBM Corporation and others.
All Rights Reserved.