Search in sources :

Example 1 with ViewLabelProvider

use of org.mongodb.meclipse.views.objects.ViewLabelProvider in project meclipse by flaper87.

the class MeclipseView method createPartControl.

/**
	 * This is a callback that will allow us to create the viewer and initialize
	 * it.
	 */
public void createPartControl(Composite parent) {
    viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    // drillDownAdapter = new DrillDownAdapter(viewer);
    viewer.setContentProvider(content);
    viewer.setLabelProvider(new ViewLabelProvider());
    viewer.setSorter(new NameSorter());
    viewer.setInput(new Root(this));
    // Hook viewer up to the Eclipse selection provider:
    getSite().setSelectionProvider(viewer);
    // Create the help context id for the viewer's control
    PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "org.mongodb.meclipse.views");
    makeActions();
    hookContextMenu();
    hookDoubleClickAction();
    contributeToActionBars();
    MeclipsePlugin.getDefault().setMongoDbView(this);
}
Also used : Root(org.mongodb.meclipse.views.objects.Root) TreeViewer(org.eclipse.jface.viewers.TreeViewer) ViewLabelProvider(org.mongodb.meclipse.views.objects.ViewLabelProvider)

Aggregations

TreeViewer (org.eclipse.jface.viewers.TreeViewer)1 Root (org.mongodb.meclipse.views.objects.Root)1 ViewLabelProvider (org.mongodb.meclipse.views.objects.ViewLabelProvider)1