Runtime

## org.eclipse.gmf.runtime.common.core.service
Interface IProvider

All Known Subinterfaces:
  DiagramEventBrokerProvider, IDragDropListenerProvider, IEditorProvider, IElementSelectionProvider, IGlobalActionHandlerProvider, IIconProvider, IModelingAssistantProvider, IParserProvider, IPropertiesModifier, IPropertiesProvider, IViewProvider

All Known Implementing Classes:
  AbstractActionFilterProvider, AbstractContributionItemProvider, AbstractDiagramEventBrokerProvider, AbstractDiagramMarkerNavigationProvider, AbstractDragDropListenerProvider, AbstractEditorProvider, AbstractElementSelectionProvider, AbstractGlobalActionHandlerProvider, org.eclipse.gmf.runtime.diagram.ui.services.layout.AbstractLayoutEditPartProvider, org.eclipse.gmf.runtime.diagram.ui.services.layout.AbstractLayoutNodeProvider, AbstractMarkerNavigationProvider, AbstractModelActionFilterProvider, AbstractModelMarkerNavigationProvider, AbstractProvider, AbstractTransferAdapterProvider, AbstractViewProvider, ActionFilterService, ActionFilterService.ProviderDescriptor, ActivityFilterProviderDescriptor, org.eclipse.gmf.runtime.diagram.ui.providers.internal.CompositeLayoutProvider, CompositeLeftRightProvider, CompositeTopDownProvider, ContributionItemService, ContributionItemService.ProviderDescriptor, DefaultPaletteProvider, org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider, DiagramContributionItemProvider, DiagramEventBrokerService, DiagramEventBrokerService.ProviderDescriptor, DiagramGlobalActionHandlerProvider, DiagramIDEGlobalActionHandlerProvider, DiagramWithPrintGlobalActionHandlerProvider, DragDropListenerService, DragDropListenerService.ProviderDescriptor, EditorGlobalActionHandlerProvider, EditorService, ElementSelectionService, GenericEMFPropertiesProvider, GlobalActionHandlerService, GlobalActionHandlerService.ProviderDescriptor, IconService, IconService.ProviderDescriptor, LeftRightProvider, MarkerNavigationService, MarkerNavigationService.MarkerNavigationProviderDescriptor, ModelingAssistantProvider, ModelingAssistantService, ModelingAssistantService.ProviderDescriptor, ParserService, PropertiesService, PropertiesService.PropertiesProviderDescriptor, ReadOnlyDiagramPropertiesModifier, Service, Service.ProviderDescriptor, TopDownProvider, TransferAdapterService, TransferAdapterService.ProviderDescriptor, ViewService, ViewService.ProviderDescriptor

    public interface IProvider

The interface for all service providers. Specifies a part of the contract between a service and its providers:

- A service can listen to its provider
- A service can request a provider whether it wants to support a given request

Service implementers are expected to expose service specific classes implementing this interface.

Service provider implementers never need to implement this interface directly, they instead derive their provider implementation from the service specific implementation of this interface.

Method Summary
`void` `addProviderChangeListener(IProviderChangeListener listener)` Adds the specified listener to the list of provider change listeners for this provider.
`boolean` `provides(IOperation operation)` Indicates whether this provider provides the specified operation.
`void` `removeProviderChangeListener(IProviderChangeListener listener)` Removes the specified listener from the list of provider change listeners for this provider.

Method Detail

### addProviderChangeListener

    void addProviderChangeListener(IProviderChangeListener listener)

  Adds the specified listener to the list of provider change listeners for this provider.

  Parameters:
    `listener` - The listener to be added.

### provides

    boolean provides(IOperation operation)

  Indicates whether this provider provides the specified operation.

  Providers generally cast the operation to a service specific `IOperation`-derived class in order to determine whether they support the request.

  Parameters:
    `operation` - The operation in question.
  Returns:
    `true` if this provider provides the operation; `false` otherwise.

### removeProviderChangeListener

    void removeProviderChangeListener(IProviderChangeListener listener)

  Removes the specified listener from the list of provider change listeners for this provider.

  Parameters:
    `listener` - The listener to be removed.

Runtime

Guidelines for using Eclipse APIs.

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