@Override
public void createPartControl(Composite parent) {
// Create tree viewer
- fTreeViewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
+ fTreeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
ColumnViewerToolTipSupport.enableFor(fTreeViewer);
fTreeViewer.setContentProvider(new TraceControlContentProvider());
}
});
}
+
+ /**
+ * Sets the selected component in the tree
+ * @param component - component to select
+ */
+ public void setSelection(ITraceControlComponent component) {
+ StructuredSelection selection = new StructuredSelection(component);
+ fTreeViewer.setSelection(selection);
+ }
+
+ /**
+ * Sets the selected components in the tree
+ * @param component - array of components to select
+ */
+ public void setSelection(ITraceControlComponent[] components) {
+ StructuredSelection selection = new StructuredSelection(components);
+ fTreeViewer.setSelection(selection);
+ }
+
+// public ITraceControlComponent getSelection() {
+// ISelection selection = fTreeViewer.getSelection();
+//
+// }
// ------------------------------------------------------------------------
// Helper methods