| org.eclipse.ui.menus.IMenuService
All known Subclasses: org.eclipse.ui.internal.menus.InternalMenuService,
IMenuService | public interface IMenuService extends IServiceWithSources(Code) | |
Provides services related to the menu architecture within the workbench. It
can be used to contribute additional items to the menu, tool bar and status
line.
This interface should not be implemented or extended by clients.
since: 3.3 |
addContributionFactory | public void addContributionFactory(AbstractContributionFactory factory)(Code) | | Contribute and initialize the contribution factory. This should only be
called once per factory. After the call, the factory should be treated as
an unmodifiable object.
Note: In 3.3M4, this will make the factory available for any
following calls to
IMenuService.populateContributionManager(ContributionManager,String) , but
it will not add those contributions to already populated managers.
Parameters: factory - the contribution factory. Must not be null |
getCurrentState | public IEvaluationContext getCurrentState()(Code) | | Get the current state of eclipse as seen by the menu service.
an IEvaluationContext containing state variables. See Also: org.eclipse.ui.ISources |
populateContributionManager | public void populateContributionManager(ContributionManager mgr, String location)(Code) | | Populate a ContributionManager at the specified starting
location with a set of IContributionItems s. It applies
AbstractContributionFactory s that are stored against the
provided location.
Parameters: mgr - The ContributionManager to populate Parameters: location - The starting location to begin populating this contributionmanager. The format is the Menu API URI format. See Also: IMenuService.releaseContributions(ContributionManager) |
releaseContributions | public void releaseContributions(ContributionManager mgr)(Code) | | Before calling dispose() on a ContributionManager populated by the menu
service, you must inform the menu service to release its contributions.
This takes care of unregistering any IContributionItems that have their
visibleWhen clause managed by this menu service.
Parameters: mgr - The manager that was populated by a call toIMenuService.populateContributionManager(ContributionManager,String) |
removeContributionFactory | public void removeContributionFactory(AbstractContributionFactory factory)(Code) | | Remove the contributed factory from the menu service. If the factory is
not contained by this service, this call does nothing.
Note:In 3.3M4, this factory will no longer be called during
IMenuService.populateContributionManager(ContributionManager,String) calls,
but outstanding contributions will not be removed from populated
contribution managers.
Parameters: factory - the contribution factory to remove. Must not benull . |
|
|