|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.common.core.service.AbstractProvider
org.eclipse.gmf.runtime.common.core.service.Service
org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService
public class ContributionItemService
A service for contributing items into different IWorkbenchPart
's
contribution managers: ActionBars and ContextMenu(s).
IContributionItemProvider
,
AbstractContributionItemProvider
Nested Class Summary | |
---|---|
protected static class |
ContributionItemService.ProviderDescriptor
A descriptor for IContributionItemProvider defined
by a configuration element. |
Field Summary |
---|
Fields inherited from class org.eclipse.gmf.runtime.common.core.service.Service |
---|
INVALID_ELEMENT_MESSAGE_PATTERN |
Method Summary | |
---|---|
void |
contributeToActionBars(IActionBars actionBars,
IWorkbenchPart workbenchPart)
Makes contributions to the given actionBars that belong to the given part. |
void |
contributeToPopupMenu(IMenuManager popupMenu,
IWorkbenchPart workbenchPart)
Contributes to the given popup menu of the given part The popup menu id has to match the id used to register this menu with the part's site. |
void |
disposeContributions(IWorkbenchPartDescriptor workbenchPartDescriptor)
Gives the provider a chance to clean up and dispose any cached contributions previously targeted at a part described by the given descriptor. |
static ContributionItemService |
getInstance()
Returns the single instanceo of the ContributionItemService . |
protected Service.ProviderDescriptor |
newProviderDescriptor(IConfigurationElement element)
Creates a new provider descriptor for the specified configuration element . |
void |
updateActionBars(IActionBars actionBars,
IWorkbenchPartDescriptor workbenchPartDescriptor)
Contributes to the given action bars that belong to a part described with the given part descriptor ONLY IF this provider has not already contributed to this part. |
Methods inherited from class org.eclipse.gmf.runtime.common.core.service.Service |
---|
addProvider, clearCache, configureProviders, configureProviders, createPriorityCache, execute, executeUnique, getAllProviders, getCachingKey, getPriority, getProviders, isOptimistic, isOptimized, providerChanged, provides, provides, removeProvider |
Methods inherited from class org.eclipse.gmf.runtime.common.core.service.AbstractProvider |
---|
addProviderChangeListener, fireProviderChange, removeProviderChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.gmf.runtime.common.core.service.IProvider |
---|
addProviderChangeListener, provides, removeProviderChangeListener |
Method Detail |
---|
public static ContributionItemService getInstance()
ContributionItemService
.
ContributionItemService
protected Service.ProviderDescriptor newProviderDescriptor(IConfigurationElement element)
Service
element
.
newProviderDescriptor
in class Service
element
- The configuration element from which to create the descriptor.
public void contributeToActionBars(IActionBars actionBars, IWorkbenchPart workbenchPart)
actionBars
that belong to the given part.
contributeToActionBars
in interface org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider
actionBars
- the action barsworkbenchPart
- the workbench partIContributionItemProvider.contributeToActionBars(IActionBars, IWorkbenchPartDescriptor)
public void contributeToPopupMenu(IMenuManager popupMenu, IWorkbenchPart workbenchPart)
org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider
This API is usually called from menuAboutToShow()
method
of the main IMenuListener
to a given context menu.
contributeToPopupMenu
in interface org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider
popupMenu
- The target popup menu managerworkbenchPart
- The context workbench partpublic void disposeContributions(IWorkbenchPartDescriptor workbenchPartDescriptor)
org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider
This API is usually called when the part contributor is disposing. This
would be form the dispose
method of the
EditorActioBarContributor
for editors and the dispose
method of IViewPart
for views.
disposeContributions
in interface org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider
workbenchPartDescriptor
- The context workbench part descriptorpublic void updateActionBars(IActionBars actionBars, IWorkbenchPartDescriptor workbenchPartDescriptor)
org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider
This API is usually called when an event takes place such that new providers may now provide contributions to the actionbars. Only those new providers need to add their contributions.
updateActionBars
in interface org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider
actionBars
- The target action barsworkbenchPartDescriptor
- The context workbench part descriptor
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.