/** * ************************************************************************* 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); }
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(); }
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(); }
/** * ************************************************************************* Dispose resources * ************************************************************************ */ public void dispose() { m_input.getExecutionManager().removeListener(this); s_cfg.removePropertyChangeListener(this); }