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

## Class VProjectWorkspaceBridge

- java.lang.Object
- - org.eclipse.wst.jsdt.chromium.debug.core.model.VProjectWorkspaceBridge

All Implemented Interfaces:
  WorkspaceBridge

    public class VProjectWorkspaceBridge
    extends java.lang.Object
    implements WorkspaceBridge

Virtual project-supporting implementation of `WorkspaceBridge`.

### Nested Class Summary

Nested Classes
`static class` `VProjectWorkspaceBridge.FactoryImpl`

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

`WorkspaceBridge.BreakpointHandler, WorkspaceBridge.Factory, WorkspaceBridge.JsLabelProvider`

### Field Summary

Fields
`static java.lang.String` `DEBUG_MODEL_ID` The debug model ID.

### Constructor Summary

Constructors
Constructor and Description
`VProjectWorkspaceBridge(java.lang.String projectName, ConnectedTargetData connectedTargetData, JavascriptVm javascriptVm)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `beforeDetach()` Detach command is about to be sent to JavaScript VM.
`VmResource` `createTemporaryFile(VmResource.Metadata metadata, java.lang.String proposedFileName)` Creates a temporary file associated with the debug session.
`java.util.Collection<? extends VmResource>` `findVmResourcesFromWorkspaceFile(IFile resource)`
`WorkspaceBridge.BreakpointHandler` `getBreakpointHandler()` Returns instance of breakpoint handler.
`BreakpointSynchronizer` `getBreakpointSynchronizer()`
`ConnectedTargetData` `getConnectedTargetData()`
`VmResource` `getVProjectVmResource(IFile file)`
`void` `handleVmResetEvent()` Handles reset event in JavaScript VM (e.g.
`void` `launchRemoved()` Virtual project is expected to stay live until launch is removed from Launches view.
`void` `reloadScript(Script script)` Initiates script reloading from remote VM.
`void` `reloadScriptsAtStart()`
`void` `scriptCollected(Script script)` Reports about the script having been collected and disposed in JavaScript VM.
`void` `scriptLoaded(Script newScript)` Reports about new script loaded in JavaScript VM.
`void` `startInitialization()` Called after session has been started.
`void` `synchronizeBreakpoints(BreakpointSynchronizer.Direction direction, BreakpointSynchronizer.Callback callback)` Performs breakpoint synchronization between remote VM and Eclipse IDE.

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

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

### Field Detail

#### DEBUG_MODEL_ID

    public static final java.lang.String DEBUG_MODEL_ID

The debug model ID.

See Also:
  Constant Field Values

### Constructor Detail

#### VProjectWorkspaceBridge

    public VProjectWorkspaceBridge(java.lang.String projectName,
                                   ConnectedTargetData connectedTargetData,
                                   JavascriptVm javascriptVm)

### Method Detail

#### getBreakpointSynchronizer

    public BreakpointSynchronizer getBreakpointSynchronizer()

#### synchronizeBreakpoints

    public void synchronizeBreakpoints(BreakpointSynchronizer.Direction direction,
                                       BreakpointSynchronizer.Callback callback)

Description copied from interface: `WorkspaceBridge`
Performs breakpoint synchronization between remote VM and Eclipse IDE. This operation is partially asynchronous: it blocks for reading breakpoints, but returns before all remote changes are performed. When operations is fully complete, callback gets invoked.

Specified by:
  `synchronizeBreakpoints` in interface `WorkspaceBridge`

#### startInitialization

    public void startInitialization()

Description copied from interface: `WorkspaceBridge`
Called after session has been started. It should start process of debug session initialization (downloading scripts from remove, synchronizing breakpoints etc). This method should be non-blocking.

Specified by:
  `startInitialization` in interface `WorkspaceBridge`

#### launchRemoved

    public void launchRemoved()

Description copied from interface: `WorkspaceBridge`
Virtual project is expected to stay live until launch is removed from Launches view. Then it has to go.

Specified by:
  `launchRemoved` in interface `WorkspaceBridge`

#### beforeDetach

    public void beforeDetach()

Description copied from interface: `WorkspaceBridge`
Detach command is about to be sent to JavaScript VM.

Specified by:
  `beforeDetach` in interface `WorkspaceBridge`

#### handleVmResetEvent

    public void handleVmResetEvent()

Description copied from interface: `WorkspaceBridge`
Handles reset event in JavaScript VM (e.g. Chromium tab reload or navigate event). The whole context changes.

Specified by:
  `handleVmResetEvent` in interface `WorkspaceBridge`

#### scriptLoaded

    public void scriptLoaded(Script newScript)

Description copied from interface: `WorkspaceBridge`
Reports about new script loaded in JavaScript VM.

Specified by:
  `scriptLoaded` in interface `WorkspaceBridge`

#### scriptCollected

    public void scriptCollected(Script script)

Description copied from interface: `WorkspaceBridge`
Reports about the script having been collected and disposed in JavaScript VM.

Specified by:
  `scriptCollected` in interface `WorkspaceBridge`

#### reloadScriptsAtStart

    public void reloadScriptsAtStart()

#### findVmResourcesFromWorkspaceFile

    public java.util.Collection<? extends VmResource> findVmResourcesFromWorkspaceFile(IFile resource)
                                                                                throws CoreException

Specified by:
  `findVmResourcesFromWorkspaceFile` in interface `WorkspaceBridge`
Throws:
  `CoreException`

#### getVProjectVmResource

    public VmResource getVProjectVmResource(IFile file)

Specified by:
  `getVProjectVmResource` in interface `WorkspaceBridge`
Returns:
  `VmResource` representation of the file inside virtual project or null

#### createTemporaryFile

    public VmResource createTemporaryFile(VmResource.Metadata metadata,
                                          java.lang.String proposedFileName)

Description copied from interface: `WorkspaceBridge`
Creates a temporary file associated with the debug session. The created file should be represented as a `VmResource`.

Specified by:
  `createTemporaryFile` in interface `WorkspaceBridge`

#### reloadScript

    public void reloadScript(Script script)

Description copied from interface: `WorkspaceBridge`
Initiates script reloading from remote VM.

Specified by:
  `reloadScript` in interface `WorkspaceBridge`

#### getBreakpointHandler

    public WorkspaceBridge.BreakpointHandler getBreakpointHandler()

Description copied from interface: `WorkspaceBridge`
Returns instance of breakpoint handler. Should be a simple getter, caller may cache result value.

Specified by:
  `getBreakpointHandler` in interface `WorkspaceBridge`

#### getConnectedTargetData

    public ConnectedTargetData getConnectedTargetData()