Runtime

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

java.lang.Object
  extended by org.eclipse.gmf.runtime.common.core.service.AbstractProvider
      extended by org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider
All Implemented Interfaces:
IProvider

public class DefaultPaletteProvider
extends AbstractProvider

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
 

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

Parameters:
configElement -

contributeToPalette

public void contributeToPalette(IEditorPart editor,
                                java.lang.Object content,
                                PaletteRoot root,
                                java.util.Map predefinedEntries)
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.

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.