Runtime

## org.eclipse.gmf.runtime.diagram.ui.providers
Class DefaultPaletteProvider

    java.lang.Object
      org.eclipse.gmf.runtime.common.core.service.AbstractProvider
          org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider

All Implemented Interfaces:
  IProvider, org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider

    public class DefaultPaletteProvider

extends AbstractProvider
implements org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider

The defaul palette provider. It reads XML palette contributions from the provider's extension point and contributes them to an editor's palette based on different contribution criteria The provider class should not be subclassed since it does its contribution totally from XML However, if programatic contribution is required, then the `IPaletteProvider` interface should be implemented directly instead

Constructor Summary
`DefaultPaletteProvider()`

Method Summary
`void` `contributeToPalette(IEditorPart editor, java.lang.Object content, PaletteRoot root, java.util.Map predefinedEntries)`
`boolean` `provides(IOperation operation)` Indicates whether this provider provides the specified operation.
`void` `setContributions(IConfigurationElement configElement)` Adds the configuration elements to the list of palette provider XML contributions

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, removeProviderChangeListener`

Constructor Detail

### DefaultPaletteProvider

    public DefaultPaletteProvider()

Method Detail

### setContributions

    public void setContributions(IConfigurationElement configElement)

  Adds the configuration elements to the list of palette provider XML contributions

  Specified by:
    `setContributions` in interface `org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider`
  Parameters:
    `configElement` -

### contributeToPalette

    public void contributeToPalette(IEditorPart editor,
                                    java.lang.Object content,
                                    PaletteRoot root,
                                    java.util.Map predefinedEntries)

  Specified by:
    `contributeToPalette` in interface `org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider`
  See Also:
    `org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider#contributeToPalette(org.eclipse.ui.IEditorPart, java.lang.Object)`

### provides

    public boolean provides(IOperation operation)

  Description copied from interface: `IProvider`
  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.

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

Runtime

Guidelines for using Eclipse APIs.

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