Search in sources :

Example 6 with DrillDownAdapter

use of org.eclipse.ui.part.DrillDownAdapter in project yamcs-studio by yamcs.

the class DrillDownComposite method setChildTree.

/**
 * Sets the child viewer. This method should only be called once, after the
 * viewer has been created.
 *
 * @param aViewer
 *            the new child viewer
 */
public final void setChildTree(final TreeViewer aViewer) {
    // Save viewer.
    _fChildTree = aViewer;
    // Create adapter.
    _adapter = new DrillDownAdapter(_fChildTree);
    _adapter.addNavigationActions(_toolBarMgr);
    _toolBarMgr.update(true);
    // Set tree layout.
    _fChildTree.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    layout();
}
Also used : DrillDownAdapter(org.eclipse.ui.part.DrillDownAdapter) GridData(org.eclipse.swt.layout.GridData)

Example 7 with DrillDownAdapter

use of org.eclipse.ui.part.DrillDownAdapter in project yamcs-studio by yamcs.

the class DrillDownComposite method setChildTree.

/**
 * Sets the child viewer.  This method should only be called once, after the
 * viewer has been created.
 *
 * @param aViewer the new child viewer
 */
public final void setChildTree(final TreeViewer aViewer) {
    // Save viewer.
    _fChildTree = aViewer;
    // Create adapter.
    _adapter = new DrillDownAdapter(_fChildTree);
    _adapter.addNavigationActions(_toolBarMgr);
    _toolBarMgr.update(true);
    // Set tree layout.
    _fChildTree.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    layout();
}
Also used : DrillDownAdapter(org.eclipse.ui.part.DrillDownAdapter) GridData(org.eclipse.swt.layout.GridData)

Example 8 with DrillDownAdapter

use of org.eclipse.ui.part.DrillDownAdapter in project erlide_eclipse by erlang.

the class TraceLogView method createPartControl.

/**
 * This is a callback that will allow us to create the viewer and initialize it.
 */
@Override
public void createPartControl(final Composite parent) {
    viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    drillDownAdapter = new DrillDownAdapter(viewer);
    viewer.setContentProvider(new ViewContentProvider());
    viewer.setLabelProvider(new ViewLabelProvider());
    viewer.setComparator(new NameSorter());
    viewer.setInput(getViewSite());
    makeActions();
    hookContextMenu();
    hookDoubleClickAction();
    contributeToActionBars();
}
Also used : DrillDownAdapter(org.eclipse.ui.part.DrillDownAdapter) TreeViewer(org.eclipse.jface.viewers.TreeViewer)

Aggregations

DrillDownAdapter (org.eclipse.ui.part.DrillDownAdapter)8 TreeViewer (org.eclipse.jface.viewers.TreeViewer)6 GridData (org.eclipse.swt.layout.GridData)5 XSDTreeLabelProvider (com.amalto.workbench.providers.XSDTreeLabelProvider)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 TreeObject (com.amalto.workbench.models.TreeObject)1 XPathTreeContentProvider (com.amalto.workbench.providers.XPathTreeContentProvider)1 SchemaNameFilter (com.amalto.workbench.providers.datamodel.SchemaNameFilter)1 SchemaRoleAccessFilter (com.amalto.workbench.providers.datamodel.SchemaRoleAccessFilter)1 SchemaTreeContentProvider (com.amalto.workbench.providers.datamodel.SchemaTreeContentProvider)1 SchemaUniqueElementFilter (com.amalto.workbench.providers.datamodel.SchemaUniqueElementFilter)1 DescAnnotationComposite (com.amalto.workbench.widgets.DescAnnotationComposite)1 IElementComparer (org.eclipse.jface.viewers.IElementComparer)1 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1 Viewer (org.eclipse.jface.viewers.Viewer)1 ViewerSorter (org.eclipse.jface.viewers.ViewerSorter)1 KeyAdapter (org.eclipse.swt.events.KeyAdapter)1