Source:
<code>public void createPartControl(Composite parent) { super.createPartControl(parent); getTimeGraphViewer().addTimeListener(event -> synchingToTime(event.getBeginTime())); getTimeGraphViewer().getTimeGraphControl().addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent event) { ITimeGraphEntry selection = getTimeGraphViewer().getSelection(); <START> ITimeGraphState function = fFunctions.get(((TimeGraphEntry) selection).getModel().getId()); <END> if (function != null) { long entryTime = function.getStartTime(); long exitTime = entryTime + function.getDuration(); TmfTimeRange range = new TmfTimeRange(TmfTimestamp.fromNanos(entryTime), TmfTimestamp.fromNanos(exitTime)); broadcast(new TmfWindowRangeUpdatedSignal(CallStackView.this, range, getTrace())); getTimeGraphViewer().setStartFinishTime(entryTime, exitTime); startZoomThread(entryTime, exitTime); } } }); getTimeGraphViewer().getTimeGraphControl().addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent e) { TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); ISelection selection = timeGraphControl.getSelection(); if (selection instanceof IStructuredSelection) { for (Object object : ((IStructuredSelection) selection).toList()) { if (object instanceof NamedTimeEvent) { NamedTimeEvent event = (NamedTimeEvent) object; long startTime = event.getTime(); long endTime = startTime + event.getDuration(); TmfTimeRange range = new TmfTimeRange(TmfTimestamp.fromNanos(startTime), TmfTimestamp.fromNanos(endTime)); broadcast(new TmfWindowRangeUpdatedSignal(CallStackView.this, range, getTrace())); getTimeGraphViewer().setStartFinishTime(startTime, endTime); startZoomThread(startTime, endTime); break; } } } } }); IEditorPart editor = getSite().getPage().getActiveEditor(); if (editor instanceof ITmfTraceEditor) { ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace(); if (trace != null) { traceSelected(new TmfTraceSelectedSignal(this, trace)); } } }</code><technical_language>fluke, I put a breakpoint test fix, I a NullPointerException selection null</technical_language>

Target:
public void createPartControl(Composite parent) { super.createPartControl(parent); getTimeGraphViewer().addTimeListener(event -> synchingToTime(event.getBeginTime())); getTimeGraphViewer().getTimeGraphControl().addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent event) { ITimeGraphEntry selection = getTimeGraphViewer().getSelection(); if (!(selection instanceof TimeGraphEntry)) { return; } ITimeGraphState function = fFunctions.get(((TimeGraphEntry) selection).getModel().getId()); if (function != null) { long entryTime = function.getStartTime(); long exitTime = entryTime + function.getDuration(); TmfTimeRange range = new TmfTimeRange(TmfTimestamp.fromNanos(entryTime), TmfTimestamp.fromNanos(exitTime)); broadcast(new TmfWindowRangeUpdatedSignal(CallStackView.this, range, getTrace())); getTimeGraphViewer().setStartFinishTime(entryTime, exitTime); startZoomThread(entryTime, exitTime); } } }); getTimeGraphViewer().getTimeGraphControl().addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent e) { TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); ISelection selection = timeGraphControl.getSelection(); if (selection instanceof IStructuredSelection) { for (Object object : ((IStructuredSelection) selection).toList()) { if (object instanceof NamedTimeEvent) { NamedTimeEvent event = (NamedTimeEvent) object; long startTime = event.getTime(); long endTime = startTime + event.getDuration(); TmfTimeRange range = new TmfTimeRange(TmfTimestamp.fromNanos(startTime), TmfTimestamp.fromNanos(endTime)); broadcast(new TmfWindowRangeUpdatedSignal(CallStackView.this, range, getTrace())); getTimeGraphViewer().setStartFinishTime(startTime, endTime); startZoomThread(startTime, endTime); break; } } } } }); IEditorPart editor = getSite().getPage().getActiveEditor(); if (editor instanceof ITmfTraceEditor) { ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace(); if (trace != null) { traceSelected(new TmfTraceSelectedSignal(this, trace)); } } }