Source:
private Action getNextEventAction() { if (fNextEventAction == null) { fNextEventAction = new Action() { @Override public void run() { TimeGraphViewer viewer = getTimeGraphViewer(); ITimeGraphEntry entry = viewer.getSelection(); if (entry instanceof CallStackEntry) { try { CallStackEntry callStackEntry = (CallStackEntry) entry; ITmfStateSystem ss = callStackEntry.getStateSystem(); long time = Math.max(ss.getStartTime(), Math.min(ss.getCurrentEndTime(), viewer.getSelectionBegin())); ThreadEntry threadEntry = (ThreadEntry) callStackEntry.getParent(); int quark = ss.getParentAttributeQuark(callStackEntry.getQuark()); ITmfStateInterval stackInterval = ss.querySingleState(time, quark); long newTime = stackInterval.getEndTime() + 1; viewer.setSelectedTimeNotify(newTime, true); stackInterval = ss.querySingleState(Math.min(ss.getCurrentEndTime(), newTime), quark); int stackLevel = stackInterval.getStateValue().unboxInt(); ITimeGraphEntry selectedEntry = threadEntry.getChildren().get(Math.max(0, stackLevel - 1)); getTimeGraphCombo().setSelection(selectedEntry); viewer.getTimeGraphControl().fireSelectionChanged(); startZoomThread(viewer.getTime0(), viewer.getTime1()); } catch (TimeRangeException | StateSystemDisposedException | StateValueTypeException e) { Activator.getDefault().logError("Error querying state system", e); } } } }; fNextEventAction.setText(Messages.TmfTimeGraphViewer_NextStateChangeActionNameText); fNextEventAction.setToolTipText(Messages.TmfTimeGraphViewer_NextStateChangeActionToolTipText); fNextEventAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_EVENT)); } return fNextEventAction; }

Target:
private Action getNextEventAction() { if (fNextEventAction == null) { fNextEventAction = new Action() { @Override public void run() { TimeGraphViewer viewer = getTimeGraphViewer(); ITimeGraphEntry entry = viewer.getSelection(); if (entry instanceof CallStackEntry) { try { CallStackEntry callStackEntry = (CallStackEntry) entry; ITmfStateSystem ss = callStackEntry.getStateSystem(); long time = Math.max(ss.getStartTime(), Math.min(ss.getCurrentEndTime(), viewer.getSelectionBegin())); ThreadEntry threadEntry = (ThreadEntry) callStackEntry.getParent(); int quark = ss.getParentAttributeQuark(callStackEntry.getQuark()); ITmfStateInterval stackInterval = ss.querySingleState(time, quark); long newTime = stackInterval.getEndTime() + 1; viewer.setSelectedTimeNotify(newTime, true); stackInterval = ss.querySingleState(Math.min(ss.getCurrentEndTime(), newTime), quark); int stackLevel = stackInterval.getStateValue().unboxInt(); ITimeGraphEntry selectedEntry = threadEntry.getChildren().get(Math.max(0, stackLevel - 1)); getTimeGraphCombo().setSelection(selectedEntry); viewer.getTimeGraphControl().fireSelectionChanged(); startZoomThread(viewer.getTime0(), viewer.getTime1()); } catch (TimeRangeException | StateSystemDisposedException | StateValueTypeException e) { Activator.getDefault().logError("Error querying state system", e); } } } }; fNextEventAction.setText(Messages.TmfTimeGraphViewer_NextStateChangeActionNameText); fNextEventAction.setToolTipText(Messages.TmfTimeGraphViewer_NextStateChangeActionToolTipText); fNextEventAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_STATE_CHANGE)); } return fNextEventAction; }