- // ------------------------------------------------------------------------
- // ViewPart
- // ------------------------------------------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.TmfView#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- @Override
- public void createPartControl(Composite parent) {
- fTimeGraphCombo = new TimeGraphCombo(parent, SWT.NONE);
-
- fTimeGraphCombo.setTreeContentProvider(new TreeContentProvider());
-
- fTimeGraphCombo.setTreeLabelProvider(new TreeLabelProvider());
-
- fTimeGraphCombo.setTimeGraphProvider(new ControlFlowPresentationProvider());
-
- fTimeGraphCombo.setTreeColumns(COLUMN_NAMES);
-
- fTimeGraphCombo.setFilterContentProvider(new TreeContentProvider());
-
- fTimeGraphCombo.setFilterLabelProvider(new TreeLabelProvider());
-
- fTimeGraphCombo.setFilterColumns(FILTER_COLUMN_NAMES);
-
- fTimeGraphCombo.getTimeGraphViewer().addRangeListener(new ITimeGraphRangeListener() {
- @Override
- public void timeRangeUpdated(TimeGraphRangeUpdateEvent event) {
- final long startTime = event.getStartTime();
- final long endTime = event.getEndTime();
- TmfTimeRange range = new TmfTimeRange(new CtfTmfTimestamp(startTime), new CtfTmfTimestamp(endTime));
- TmfTimestamp time = new CtfTmfTimestamp(fTimeGraphCombo.getTimeGraphViewer().getSelectedTime());
- broadcast(new TmfRangeSynchSignal(ControlFlowView.this, range, time));
- if (fZoomThread != null) {
- fZoomThread.cancel();
- }
- startZoomThread(startTime, endTime);
- }
- });
-
- fTimeGraphCombo.getTimeGraphViewer().addTimeListener(new ITimeGraphTimeListener() {
- @Override
- public void timeSelected(TimeGraphTimeEvent event) {
- long time = event.getTime();
- broadcast(new TmfTimeSynchSignal(ControlFlowView.this, new CtfTmfTimestamp(time)));
- }
- });
-
- fTimeGraphCombo.addSelectionListener(new ITimeGraphSelectionListener() {
- @Override
- public void selectionChanged(TimeGraphSelectionEvent event) {
- //ITimeGraphEntry selection = event.getSelection();
- }
- });
-
- fTimeGraphCombo.getTimeGraphViewer().setTimeFormat(TimeFormat.CALENDAR);