org.chromium.debug.core/src/org/chromium/debug/core/model/WorkspaceBridge.java
changeset 355 8726e95bcbba
parent 276 f2f4a1259de8
equal deleted inserted replaced
354:0bceeb415e7f 355:8726e95bcbba
     5 package org.chromium.debug.core.model;
     5 package org.chromium.debug.core.model;
     6 
     6 
     7 import java.util.Collection;
     7 import java.util.Collection;
     8 
     8 
     9 import org.chromium.sdk.Breakpoint;
     9 import org.chromium.sdk.Breakpoint;
    10 import org.chromium.sdk.CallFrame;
       
    11 import org.chromium.sdk.JavascriptVm;
    10 import org.chromium.sdk.JavascriptVm;
    12 import org.chromium.sdk.Script;
    11 import org.chromium.sdk.Script;
    13 import org.eclipse.core.resources.IFile;
    12 import org.eclipse.core.resources.IFile;
       
    13 import org.eclipse.core.runtime.CoreException;
    14 import org.eclipse.debug.core.DebugException;
    14 import org.eclipse.debug.core.DebugException;
    15 import org.eclipse.debug.core.IBreakpointListener;
    15 import org.eclipse.debug.core.IBreakpointListener;
    16 import org.eclipse.debug.core.model.IBreakpoint;
    16 import org.eclipse.debug.core.model.IBreakpoint;
    17 
    17 
    18 
    18 
    46      * User may cache value of this method.
    46      * User may cache value of this method.
    47      */
    47      */
    48     JsLabelProvider getLabelProvider();
    48     JsLabelProvider getLabelProvider();
    49   }
    49   }
    50 
    50 
       
    51   VmResource findVmResourceFromWorkspaceFile(IFile resource) throws CoreException;
       
    52 
    51   /**
    53   /**
    52    * Helps UI actions to map from script to resource.
    54    * Initiates script reloading from remote VM.
    53    */
    55    */
    54   IFile getScriptResource(Script script);
    56   void reloadScript(Script script);
    55 
    57 
    56   /**
    58   /**
    57    * Called at starting period of time, requires all scripts to be (re)loaded.
    59    * Called at starting period of time, requires all scripts to be (re)loaded.
    58    */
    60    */
    59   void reloadScriptsAtStart();
    61   void reloadScriptsAtStart();
    85    * value.
    87    * value.
    86    */
    88    */
    87   BreakpointHandler getBreakpointHandler();
    89   BreakpointHandler getBreakpointHandler();
    88 
    90 
    89   /**
    91   /**
    90    * Returns editor line number for the provided call stack frame applying all required 
       
    91    * editor-specific translations.
       
    92    */
       
    93   int getLineNumber(CallFrame stackFrame);
       
    94 
       
    95   /**
       
    96    * Breakpoint-related aspect of {@link WorkspaceBridge} interface.
    92    * Breakpoint-related aspect of {@link WorkspaceBridge} interface.
    97    */
    93    */
    98   interface BreakpointHandler extends IBreakpointListener {
    94   interface BreakpointHandler extends IBreakpointListener {
    99     boolean supportsBreakpoint(IBreakpoint breakpoint);
    95     boolean supportsBreakpoint(IBreakpoint breakpoint);
   100     void breakpointsHit(Collection<? extends Breakpoint> breakpointsHit);
    96     void breakpointsHit(Collection<? extends Breakpoint> breakpointsHit);
   117     /**
   113     /**
   118      * Label for stack frame to be shown in the Debug view.
   114      * Label for stack frame to be shown in the Debug view.
   119      */
   115      */
   120     String getStackFrameLabel(StackFrame stackFrame) throws DebugException;
   116     String getStackFrameLabel(StackFrame stackFrame) throws DebugException;
   121   }
   117   }
       
   118 
       
   119   /**
       
   120    * Performs breakpoint synchronization between remote VM and Eclipse IDE. This operation is
       
   121    * partially asynchronous: it blocks for reading breakpoints, but returns before all remote
       
   122    * changes are performed. When operations is fully complete, callback gets invoked.
       
   123    */
       
   124   void synchronizeBreakpoints(BreakpointSynchronizer.Direction direction,
       
   125       BreakpointSynchronizer.Callback callback);
   122 }
   126 }