org.eclipse.wst.jsdt.chromium.debug.core.model

## Class DebugTargetImpl

- java.lang.Object
- - PlatformObject
  - - org.eclipse.wst.jsdt.chromium.debug.core.model.DebugElementImpl
    - - org.eclipse.wst.jsdt.chromium.debug.core.model.DebugTargetImpl

    public class DebugTargetImpl
    extends DebugElementImpl

An IDebugTarget implementation for remote JavaScript debugging. This class is essentially a thin wrapper that uses its internal state object as implementation. The at first target is in 'initialize' state, later it should transfer into 'normal' state.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.eclipse.wst.jsdt.chromium.debug.core.model.DebugElementImpl

`DebugElementImpl.WithConnected, DebugElementImpl.WithConnectedBase, DebugElementImpl.WithEvaluate, DebugElementImpl.WithEvaluateBase, DebugElementImpl.WithSuspended, DebugElementImpl.WithSuspendedBase`

### Constructor Summary

Constructors
Constructor and Description
`DebugTargetImpl(ILaunch launch, WorkspaceBridge.Factory workspaceBridgeFactory, SourceWrapSupport sourceWrapSupport, BreakpointSynchronizer.Direction presetSyncDirection)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static boolean` `attach(DebugTargetImpl debugTargetImpl, JavascriptVmEmbedder.ConnectionToRemote remoteServer, DestructingGuard destructingGuard, java.lang.Runnable attachCallback, IProgressMonitor monitor)` Loads browser tabs, consults the `selector` which of the tabs to attach to, and if any has been selected, requests an attachment to the tab.
`void` `breakpointAdded(IBreakpoint breakpoint)`
`void` `breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta)`
`void` `breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta)`
`boolean` `canDisconnect()`
`boolean` `canResume()`
`boolean` `canSuspend()`
`boolean` `canTerminate()`
`void` `disconnect()`
`static void` `fireDebugEvent(DebugEvent event)` Fires a debug event
`void` `fireTargetCreated()`
`java.lang.Object` `getAdapter(java.lang.Class adapter)`
`static java.util.List<ConnectedTargetData>` `getAllConnectedTargetDatas()`
`java.lang.String` `getChromiumModelIdentifier()`
`ConnectedTargetData` `getConnectedOrNull()`
`DebugTargetImpl` `getDebugTarget()`
`WorkspaceBridge.JsLabelProvider` `getLabelProvider()`
`ILaunch` `getLaunch()`
`IMemoryBlock` `getMemoryBlock(long startAddress, long length)`
`java.lang.String` `getName()`
`IProcess` `getProcess()`
`SourceWrapSupport` `getSourceWrapSupport()`
`IThread[]` `getThreads()`
`java.lang.String` `getVmStatus()`
`boolean` `hasThreads()`
`boolean` `isDisconnected()`
`boolean` `isSuspended()`
`boolean` `isTerminated()`
`void` `resume()`
`boolean` `supportsBreakpoint(IBreakpoint breakpoint)`
`boolean` `supportsStorageRetrieval()`
`void` `suspend()`
`void` `terminate()`

### Methods inherited from class org.eclipse.wst.jsdt.chromium.debug.core.model.DebugElementImpl

`getModelIdentifier`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DebugTargetImpl

    public DebugTargetImpl(ILaunch launch,
                           WorkspaceBridge.Factory workspaceBridgeFactory,
                           SourceWrapSupport sourceWrapSupport,
                           BreakpointSynchronizer.Direction presetSyncDirection)

### Method Detail

#### attach

    public static boolean attach(DebugTargetImpl debugTargetImpl,
                                 JavascriptVmEmbedder.ConnectionToRemote remoteServer,
                                 DestructingGuard destructingGuard,
                                 java.lang.Runnable attachCallback,
                                 IProgressMonitor monitor)
                          throws CoreException

Loads browser tabs, consults the `selector` which of the tabs to attach to, and if any has been selected, requests an attachment to the tab.

Parameters:
  `debugTargetImpl` - target that is attached
  `remoteServer` - embedding application we are connected with
  `destructingGuard` - guard that should gain any destructable value -- a caller will dispose everything if this method fails
  `attachCallback` - to invoke on successful attachment, can fail to be called
  `monitor` - to report the progress to
Returns:
  false if user canceled attach (via tab selection dialog) or true otherwise
Throws:
  `CoreException`

#### fireTargetCreated

    public void fireTargetCreated()

#### getDebugTarget

    public DebugTargetImpl getDebugTarget()

Specified by:
  `getDebugTarget` in class `DebugElementImpl`

#### getLaunch

    public ILaunch getLaunch()

Overrides:
  `getLaunch` in class `DebugElementImpl`

#### canTerminate

    public boolean canTerminate()

#### isTerminated

    public boolean isTerminated()

#### terminate

    public void terminate()
                   throws DebugException

Throws:
  `DebugException`

#### canResume

    public boolean canResume()

#### canSuspend

    public boolean canSuspend()

#### isSuspended

    public boolean isSuspended()

#### resume

    public void resume()
                throws DebugException

Throws:
  `DebugException`

#### suspend

    public void suspend()
                 throws DebugException

Throws:
  `DebugException`

#### breakpointAdded

    public void breakpointAdded(IBreakpoint breakpoint)

#### breakpointRemoved

    public void breakpointRemoved(IBreakpoint breakpoint,
                                  IMarkerDelta delta)

#### breakpointChanged

    public void breakpointChanged(IBreakpoint breakpoint,
                                  IMarkerDelta delta)

#### canDisconnect

    public boolean canDisconnect()

#### disconnect

    public void disconnect()
                    throws DebugException

Throws:
  `DebugException`

#### isDisconnected

    public boolean isDisconnected()

#### supportsStorageRetrieval

    public boolean supportsStorageRetrieval()

#### getMemoryBlock

    public IMemoryBlock getMemoryBlock(long startAddress,
                                       long length)
                                throws DebugException

Throws:
  `DebugException`

#### getProcess

    public IProcess getProcess()

#### getThreads

    public IThread[] getThreads()
                         throws DebugException

Throws:
  `DebugException`

#### hasThreads

    public boolean hasThreads()
                       throws DebugException

Throws:
  `DebugException`

#### getName

    public java.lang.String getName()

#### supportsBreakpoint

    public boolean supportsBreakpoint(IBreakpoint breakpoint)

#### getChromiumModelIdentifier

    public java.lang.String getChromiumModelIdentifier()

#### getLabelProvider

    public WorkspaceBridge.JsLabelProvider getLabelProvider()

#### getVmStatus

    public java.lang.String getVmStatus()

#### getConnectedOrNull

    public ConnectedTargetData getConnectedOrNull()

#### getSourceWrapSupport

    public SourceWrapSupport getSourceWrapSupport()

#### getAdapter

    public java.lang.Object getAdapter(java.lang.Class adapter)

Overrides:
  `getAdapter` in class `DebugElementImpl`

#### getAllConnectedTargetDatas

    public static java.util.List<ConnectedTargetData> getAllConnectedTargetDatas()

#### fireDebugEvent

    public static void fireDebugEvent(DebugEvent event)

Fires a debug event

Parameters:
  `event` - to be fired