#
Icon Providers Extension Point

###### Identifier:

org.eclipse.gmf.runtime.common.ui.services.iconProviders

###### Description:

This extension point is used to define icon providers for the icon service (`org.eclipse.gmf.runtime.common.ui.services.icon.IconService`).

The icon service supplies an icon for a given element.

###### Configuration Markup:

<!ELEMENT extension (IconProvider)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

- point - The identifier of the extension point, i.e. `org.eclipse.gmf.runtime.common.ui.services.iconProviders`.
- id - The identifier of the extension, e.g. `iconProviders`.
- name - The name of the extension, e.g. `%ext.iconProviders`.

<!ELEMENT IconProvider (Priority , Policy? , object* , context*)>

<!ATTLIST IconProvider

class CDATA #REQUIRED>

- class - The provider class.

<!ELEMENT Priority EMPTY>

<!ATTLIST Priority

name (Lowest|Low|Medium|High|Highest) >

- name - The name of the provider priority, i.e. Lowest, Low, Medium, High, or Highest.

<!ELEMENT Policy EMPTY>

<!ATTLIST Policy

class CDATA #REQUIRED>

- class - The provider policy class.

<!ELEMENT object (method*)>

<!ATTLIST object

id CDATA #REQUIRED

class CDATA #IMPLIED>

A descriptor of an object that is examined by this provider. The object descriptor can include an optional set of methods to call on the object.

- id - A unique (within the context of this provider definition) identifier for the object
- class - The fully qualified name of a class/interface that is assignable from or adaptable to the object. The name could be followed (between paranthesis "()") by the id of a plugin whose classloader is able to load that class. The finaly syntax is: className(plugin id)

<!ELEMENT method (value* , notValue*)>

<!ATTLIST method

name CDATA #REQUIRED

value CDATA #IMPLIED

notValue CDATA #IMPLIED>

A method to call by reflection on the object. The method has a name and a value. The value could be described by its string representation (value & notValue), or as an object "value" or "notValue". The rules of evaluation are as follows: 1- The return value string has to be in the "value" string set. 2- The return value string has to be not in the "notValue" string set. 3- The return value object has to be in the "value" object set. 4- The return value object has to be not in the "notValue" object set.

- name - The name of the method followed by an optional paramter set between paranthesis "()". The parameter set can contain any number of string parameters (literals). other param types are not supported. The method name could contain nested calling separated by "." The general format for this method name is : func(param[,param]*)
- value - A comma-separated (",") list of string representations of the method return value. The string representation of the value is expected to be "one" of those in the list. The syntax to use is the following: string[,string]* If (",") is expected to be in one of the strings, it has to be escaped by a forward slash ("\"). "null" is accepted as a string and it means (a null object).
- notValue - A comma-separated (",") list of string representations of the method return value that is not expected (the execulsion set). The string representation of the value is expected "not" to be "one" of those in the list. The syntax to use is the following: string[,string]* If (",") is expected to be in one of the strings, it has to be escaped by a forward slash ("\"). "null" is accepted as a string and it means (a null object).

<!ELEMENT value (method*)>

<!ATTLIST value

class CDATA #IMPLIED>

A descriptor of an object that represents a method's returned value. The descriptor can include an optional set of methods to call on the "value" object.

- class - The fully qualified name of a class/interface that is assignable from or adaptable to the "value" object. The name could be followed (between paranthesis "()") by the id of a plugin whose classloader is able to load that class. The finaly syntax is: className(plugin id)

<!ELEMENT context EMPTY>

<!ATTLIST context

elements CDATA #IMPLIED>

A context supported by the editpart provider.

- elements - A comma-separated list of element object ids (from the provider XML definition) that are supported by this provider in this context.

<!ELEMENT notValue (method*)>

<!ATTLIST notValue

class CDATA #IMPLIED>

A descriptor of an object that represents a method's returned value that is not required. The descriptor can include an optional set of methods to call on the "notValue" object.

- class - The fully qualified name of a class/interface that is assignable from or adaptable to the "value" object. The name could be followed (between paranthesis "()") by the id of a plugin whose classloader is able to load that class. The finaly syntax is: className(plugin id)

###### Examples:

Following is an example of an icon provider extension:

       <extension
            id="iconProviders"
            name="%ext.iconProviders"
            point="org.eclipse.gmf.runtime.common.ui.services.iconProviders">
          <IconProvider
            class="org.eclipse.test.project.providers.icon.MyIconProvider">
             <Priority name="Lowest"></Priority>
          </IconProvider>
       </extension>

###### API Information:

The value of the class attribute must be the fully qualified name of a class that implements `org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider`.

Copyright (c) 2003 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html