예제 #1
0
  /**
   * ************************************************************************* Center the table view
   * on the currently executed line.
   * ************************************************************************
   */
  public void showLastLine() {
    if (!m_autoScroll) return;

    int currentLine = m_procedure.getExecutionManager().getCurrentLineNo();

    Logger.debug("Show last line: " + currentLine, Level.GUI, this);

    showLine(currentLine, false);
  }
예제 #2
0
 public void setModel(IProcedure input) {
   Logger.debug("Set model", Level.GUI, this);
   m_input = input;
   m_renderers = new SourceRenderer[5];
   m_renderers[0] = new BpRenderer(input);
   m_renderers[1] = new LineRenderer(input);
   m_renderers[2] = new SourceRenderer(input);
   m_renderers[3] = new DataRenderer(input);
   m_renderers[4] = new StatusRenderer(input);
   for (CodeViewerColumn col : CodeViewerColumn.values()) {
     getGrid().getColumn(col.ordinal()).setCellRenderer(m_renderers[col.ordinal()]);
   }
   input.getExecutionManager().addListener(this);
   applyItemHeight();
   super.setInput(input);
   showLastLine();
 }
예제 #3
0
  public void forceRefresh() {
    GridVisibleRange range = getGrid().getVisibleRange();

    int visibleCount = range.getItems().length;

    GridItem first = range.getItems()[0];
    GridItem last = range.getItems()[visibleCount - 1];
    int firstIndex = getGrid().getIndexOfItem(first);
    int lastIndex = getGrid().getIndexOfItem(last);

    for (int index = firstIndex; index < lastIndex; index++) {
      ICodeLine line = m_input.getExecutionManager().getLine(index);
      if (line.hasNotifications()) {
        line.calculateSummary();
      }
      update(line, null);
    }
    showLastLine();
  }
예제 #4
0
 /**
  * ************************************************************************* Dispose resources
  * ************************************************************************
  */
 public void dispose() {
   m_input.getExecutionManager().removeListener(this);
   s_cfg.removePropertyChangeListener(this);
 }