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

## Interface WorkspaceBridge

All Known Implementing Classes:
  VProjectWorkspaceBridge

    public interface WorkspaceBridge

This interface draws a connection between V8 debug target and Eclipse workspace with its resources. Instance of this interface corresponds to a particular target. It is oriented to "virtual project" model, when all source files are virtual and downloaded right from running V8. "Native" model, when all source files are regular files of Eclipse workspace (and are only supposed to correspond to scripts that are actually running in remote V8) is also supported and assumes stub implementations for most of methods.

### Nested Class Summary

Nested Classes
`static interface` `WorkspaceBridge.BreakpointHandler` Breakpoint-related aspect of `WorkspaceBridge` interface.
`static interface` `WorkspaceBridge.Factory` A factory interface for `WorkspaceBridge`.
`static interface` `WorkspaceBridge.JsLabelProvider` Label provider for several debug elements.

### Method Summary

All Methods Instance Methods Abstract 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.
`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` `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.

### Method Detail

#### findVmResourcesFromWorkspaceFile

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

Throws:
  `CoreException`

#### startInitialization

    void startInitialization()

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.

#### reloadScript

    void reloadScript(Script script)

Initiates script reloading from remote VM.

#### scriptLoaded

    void scriptLoaded(Script newScript)

Reports about new script loaded in JavaScript VM.

#### scriptCollected

    void scriptCollected(Script script)

Reports about the script having been collected and disposed in JavaScript VM.

#### handleVmResetEvent

    void handleVmResetEvent()

Handles reset event in JavaScript VM (e.g. Chromium tab reload or navigate event). The whole context changes.

#### beforeDetach

    void beforeDetach()

Detach command is about to be sent to JavaScript VM.

#### launchRemoved

    void launchRemoved()

Virtual project is expected to stay live until launch is removed from Launches view. Then it has to go.

#### getBreakpointHandler

    WorkspaceBridge.BreakpointHandler getBreakpointHandler()

Returns instance of breakpoint handler. Should be a simple getter, caller may cache result value.

#### synchronizeBreakpoints

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

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.

#### getVProjectVmResource

    VmResource getVProjectVmResource(IFile file)

Returns:
  `VmResource` representation of the file inside virtual project or null

#### createTemporaryFile

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

Creates a temporary file associated with the debug session. The created file should be represented as a `VmResource`.