+ fTimeGraphViewer.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 FlamegraphEvent) {
+ FlamegraphEvent event = (FlamegraphEvent) object;
+ long startTime = event.getTime();
+ long endTime = startTime + event.getDuration();
+ getTimeGraphViewer().setStartFinishTime(startTime, endTime);
+ break;
+ }
+ }
+ }
+ }
+ });