Runtime

org.eclipse.gmf.runtime.common.ui.services.action.contributionitem
Class ContributionItemService

java.lang.Object
  extended by org.eclipse.gmf.runtime.common.core.service.AbstractProvider
      extended by org.eclipse.gmf.runtime.common.core.service.Service
          extended by org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService
All Implemented Interfaces:
java.util.EventListener, IProvider, IProviderChangeListener, org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider

public class ContributionItemService
extends Service
implements org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider

A service for contributing items into different IWorkbenchPart's contribution managers: ActionBars and ContextMenu(s).

See Also:
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 contributeToActionBars(IActionBars actionBars, org.eclipse.gmf.runtime.common.ui.util.IWorkbenchPartDescriptor workbenchPartDescriptor)
           
 void contributeToPopupMenu(IMenuManager popupMenu, IWorkbenchPart workbenchPart)
           
 void disposeContributions(IWorkbenchPart workbenchPart)
          Disposes of the contributions that have been made to the workbenchPart.
 void disposeContributions(org.eclipse.gmf.runtime.common.ui.util.IWorkbenchPartDescriptor workbenchPartDescriptor)
           
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, org.eclipse.gmf.runtime.common.ui.util.IWorkbenchPartDescriptor workbenchPartDescriptor)
           
 
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

getInstance

public static ContributionItemService getInstance()
Returns the single instanceo of the ContributionItemService.

Returns:
The single instance of the ContributionItemService

newProviderDescriptor

protected Service.ProviderDescriptor newProviderDescriptor(IConfigurationElement element)
Description copied from class: Service
Creates a new provider descriptor for the specified configuration element.

Overrides:
newProviderDescriptor in class Service
Parameters:
element - The configuration element from which to create the descriptor.
Returns:
A new provider descriptor.

contributeToActionBars

public void contributeToActionBars(IActionBars actionBars,
                                   IWorkbenchPart workbenchPart)
Makes contributions to the given actionBars that belong to the given part.

Parameters:
actionBars - the action bars
workbenchPart - the workbench part
See Also:
contributeToActionBars(IActionBars, IWorkbenchPartDescriptor)

contributeToActionBars

public void contributeToActionBars(IActionBars actionBars,
                                   org.eclipse.gmf.runtime.common.ui.util.IWorkbenchPartDescriptor workbenchPartDescriptor)
Specified by:
contributeToActionBars in interface org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider

contributeToPopupMenu

public void contributeToPopupMenu(IMenuManager popupMenu,
                                  IWorkbenchPart workbenchPart)
Specified by:
contributeToPopupMenu in interface org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider

disposeContributions

public void disposeContributions(org.eclipse.gmf.runtime.common.ui.util.IWorkbenchPartDescriptor workbenchPartDescriptor)
Specified by:
disposeContributions in interface org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider

updateActionBars

public void updateActionBars(IActionBars actionBars,
                             org.eclipse.gmf.runtime.common.ui.util.IWorkbenchPartDescriptor workbenchPartDescriptor)
Specified by:
updateActionBars in interface org.eclipse.gmf.runtime.common.ui.services.action.internal.contributionitem.IContributionItemProvider

disposeContributions

public void disposeContributions(IWorkbenchPart workbenchPart)
Disposes of the contributions that have been made to the workbenchPart.

Parameters:
workbenchPart - the workbench part

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.