Ejemplo n.º 1
0
  private boolean runApplication(SourceMapping sourceMapping, String absoluteResourceUri) {
    if (debuggerState.isDebuggerAvailable()) {
      debuggerState.runDebugger(sourceMapping, absoluteResourceUri);

      JsonArray<Breakpoint> allBreakpoints = debuggingModel.getBreakpoints();
      for (int i = 0; i < allBreakpoints.size(); ++i) {
        debuggerState.setBreakpoint(allBreakpoints.get(i));
      }

      debuggerState.setBreakpointsEnabled(debuggingModel.isBreakpointsEnabled());
      return true;
    } else {
      Window popup = createOrOpenPopup(appContext);
      if (popup != null) {
        popup.getLocation().assign(absoluteResourceUri);
        // Show the sidebar once to promote the Debugger Extension.
        maybeShowSidebar();
      }
      return false;
    }
  }