Creating a State Policy extension point
Creating a State Policy extension point
In order to Creating a State Policy Contribution, you must add a State Policy extension point to the plugin.
To create a State Policy extension point for a plugin, do the following:
- Open plugin.xml in Eclipse.
- In the Extension Points tab, click the Add button next to the All Extension Points list.
- In the New Extension Point dialog, enter the following:
Extension Point ID statePolicy Extension Point Name
State Policy
Extension Point Schema
Leave blank and make sure Edit extension point schema when done is selected
- In the Source tab of the statePolicy.exsd file, paste the following:
- <?xml version='1.0' encoding='UTF-8'?>
- <!-- Schema file written by PDE -->
- <schema targetNamespace="com.elasticpath.cmclient.admin.gc" xmlns="http://www.w3.org/2001/XMLSchema">
- <element name="extension">
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="statePolicyContribution"/commerce-legacy/>
- </sequence>
- <attribute name="point" type="string" use="required"/commerce-legacy/>
- </complexType>
- </element>
- <element name="statePolicyContribution">
- <complexType>
- <attribute name="targetId" type="string" use="required">
- <annotation>
...
Read more