Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Global menu enablement


The build actions obtain the selection from the workbench window selection service. To make this work for your view, you just need to register the selection provider for your view via the IWorkbenchSite. The existing Navigator view does this in the same way:

public void createPartControl(Composite parent) {
        TreeViewer viewer = createViewer(parent);
        ...
        getSite().setSelectionProvider(viewer);
}

The build actions that operate on a selection will work for either a selection of IResource objects, or a selection of IAdaptable objects that can adapt to IResource.
--

Michael Elder wrote on 04/13/2004 02:32:42 PM:
> When a user selects a project, (contributed by a custom Content Provider),
> I'd like to update the selection and enablement of "Build Project" and
> other appropriate options under the Workbench Project menu.

Back to the top