| <?xml version='1.0' encoding='UTF-8'?>
|
| <!-- Schema file written by PDE -->
|
| <schema targetNamespace="com.ibm.wtp.common.ui">
|
| <annotation>
|
| <appInfo>
|
| <meta.schema plugin="com.ibm.wtp.common.ui" id="WTPUIOperation" name="WTP UI Operation"/>
|
| </appInfo>
|
| <documentation>
|
| This extension point is for WTP Operations which need to be tied to a generic UI action, such as CUT, COPY, PASTE, DELETE, and RENAME.
|
| </documentation>
|
| </annotation>
|
|
|
| <element name="extension">
|
| <complexType>
|
| <sequence>
|
| <choice>
|
| <element ref="masterOperation"/>
|
| <element ref="slaveOperation"/>
|
| </choice>
|
| </sequence>
|
| <attribute name="point" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="id" type="string">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="name" type="string">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| </complexType>
|
| </element>
|
|
|
| <element name="masterOperation">
|
| <annotation>
|
| <documentation>
|
| A masterOperation enables an existing WTP Operation to be used in a UI action. Generic Ids aggregate a set of masterOperations for the same Abstract action (like a "CUT" operation). WTP Operations are themselves extendible, so for any masterOperation defined, there may be any number of pre|post operations. These pre|post operation can have slaveOperation elements defined which indicate the pre|post operation may be run independently.
|
| </documentation>
|
| </annotation>
|
| <complexType>
|
| <sequence>
|
| <element ref="selectionEnablement"/>
|
| </sequence>
|
| <attribute name="extendedGenericId" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
| The ID of the Generic Action you would like to contribute to. (e.g. The id for CUT, COPY, PASTE, DELETE, RENAME).
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="operationClass" type="string">
|
| <annotation>
|
| <documentation>
|
| The fully qualified class of your operation. Your operation must extend com.ibm.wtp.common.operation.WTPOperation and must provide a no-arguments default constructor. If this attribute is not provided, the getDefaultOperation() returned by the dataModel will be used.
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="name" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
| A name to display in the dialog for your action (if the operation is optional). You can use the standard "%key" for translatable text stored in plugin.properties.
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="description" type="string">
|
| <annotation>
|
| <documentation>
|
| A description to display in the dialog for your action (if the operation is optional). You can use the standard "%key" for translatable text stored in plugin.properties.
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="populatorClass" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
| An implementation of com.ibm.wtp.common.operation.extension.ui.WTPOperationDataModelUICreator. The populatorClass knows how to provide a WTP Operation Data Model based on a given selection. The getDefaultOperation() method of the data model will be ignored if the operationClass is provided.
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="alwaysExecute" type="boolean">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="overrideId" type="string">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="id" type="string">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| </complexType>
|
| </element>
|
|
|
| <element name="selectionEnablement">
|
| <annotation>
|
| <documentation>
|
| The selectionEnablement element allows you to filter which kinds of selection your object is applicable to using Standard Eclipse Action Expresions.
|
| </documentation>
|
| </annotation>
|
| <complexType>
|
| <choice>
|
| <element ref="objectClass"/>
|
| <element ref="or"/>
|
| </choice>
|
| </complexType>
|
| </element>
|
|
|
| <element name="slaveOperation">
|
| <annotation>
|
| <documentation>
|
| The slaveOperation element defines display information for operations which extend a declared master operation. If a pre|post operation of a master does not have a corresponding slaveOperation element, then the pre|post operation will be consider required, and not be displayed to the user.
|
| </documentation>
|
| </annotation>
|
| <complexType>
|
| <attribute name="operationClass" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
| The fully qualified class of your operation. Your operation must extend com.ibm.wtp.common.operation.WTPOperation and must provide a no-arguments default constructor. For slave operations, the data model of the master operation will be provided. Therefore, slaves cannot override the data model using a seperate populatorClass.
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="name" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
| A name to display in the dialog for your action (if the operation is optional). You can use the standard "%key" for translatable text stored in plugin.properties.
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="description" type="string">
|
| <annotation>
|
| <documentation>
|
| A description to display in the dialog for your action (if the operation is optional). You can use the standard "%key" for translatable text stored in plugin.properties.
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| </complexType>
|
| </element>
|
|
|
| <element name="or">
|
| <complexType>
|
| <choice>
|
| <element ref="objectClass"/>
|
| <element ref="and"/>
|
| <element ref="objectState"/>
|
| </choice>
|
| </complexType>
|
| </element>
|
|
|
| <element name="objectClass">
|
| <complexType>
|
| <attribute name="name" type="string">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="adaptable" type="string">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| </complexType>
|
| </element>
|
|
|
| <element name="and">
|
| <complexType>
|
| <choice>
|
| <element ref="objectClass"/>
|
| <element ref="or"/>
|
| </choice>
|
| </complexType>
|
| </element>
|
|
|
| <element name="objectState">
|
| <complexType>
|
| <attribute name="value" type="string">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="name" type="string">
|
| <annotation>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| </complexType>
|
| </element>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="since"/>
|
| </appInfo>
|
| <documentation>
|
| 6.0.0
|
| </documentation>
|
| </annotation>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="examples"/>
|
| </appInfo>
|
| <documentation>
|
| The following example declares two Master Operations (<code>com.acme.ui.operation.MasterOperationA</code> and <code>com.acme.ui.operation.MasterOperationB</code>) which are attached to the Generic ID <code>com.acme.ui.WTPOptionalOperationTest</code>. |
| The scenario has Master A which has as a pre-operation of Slave A and a post-operation of Slave C. Slave A is made optional by the <code>slaveOperation</code> element, while Slave C will always be run (no <code>slaveOperation</code> is given to run it seperately). Slave A further has an optional pre-operation (Slave B) that can be executed indepently of either Slave A or Master A. |
| <pre> |
| <extension |
| point="com.ibm.wtp.common.ui.wtpuiAction"> |
| <masterOperation |
| populatorClass="com.acme.ui.operation.AcmeOperationPopulator" |
| name="%master_a_name" |
| operationClass="com.acme.ui.operation.MasterOperationA" |
| extendedGenericId="com.acme.ui.WTPOptionalOperationTest" |
| description="%master_a_description"> |
| </masterOperation> |
| <slaveOperation |
| name="Slave A" |
| operationClass="com.acme.ui.operation.SlaveOperationA"> |
| </slaveOperation> |
| <slaveOperation |
| name="Slave B" |
| operationClass="com.acme.ui.operation.SlaveOperationB"> |
| </slaveOperation> |
| <masterOperation |
| populatorClass="com.acme.ui.operation.AcmeOperationPopulator" |
| name="EAR Project Action" |
| operationClass="com.acme.ui.operation.MasterOperationB" |
| extendedGenericId="com.acme.ui.WTPOptionalOperationTest"> |
| <selectionEnablement> |
| <objectState name="projectNature" value="org.eclipse.jst.j2ee.EARNature" /> |
| </selectionEnablement> |
| </masterOperation> |
| </extension> |
| </pre> |
| |
| For each of the slaveOperations referenced above, you must have a corresponding WTP Operation Extension declared similar to the following: |
| |
| <pre> |
| <extension |
| id="wtpuiAciton.Acme.Extensions" |
| point="com.ibm.wtp.common.ExtendableOperation"> |
| <extendableOperation |
| class="com.acme.ui.operation.MasterOperationA" |
| id="com.acme.ui.operation.MasterOperationA"> |
| </extendableOperation> |
| <extendableOperation |
| class="com.acme.ui.operation.SlaveOperationA" |
| id="com.acme.ui.operation.SlaveOperationA"> |
| </extendableOperation> |
| </extension> |
| <extension |
| point="com.ibm.wtp.common.OperationExtension"> |
| <!-- Made optional by the above declaration --> |
| <operationExtension |
| preOperationClass="com.acme.ui.operation.SlaveOperationA" |
| id="com.acme.ui.operation.MasterOperationA"> |
| </operationExtension> |
| <!-- Made optional by the above declaration --> |
| <operationExtension |
| postOperationClass="com.acme.ui.operation.SlaveOperationB" |
| id="com.acme.ui.operation.SlaveOperationA"> |
| </operationExtension> |
| <!-- Non-optional operation, will always run --> |
| <operationExtension |
| postOperationClass="com.acme.ui.operation.SlaveOperationC" |
| id="com.acme.ui.operation.MasterOperationA"> |
| </operationExtension> |
| </extension> |
| </pre> |
| |
| In general, users extending existing actions only need to declare the following: |
| <pre> |
| <extension |
| point="com.ibm.wtp.common.OperationExtension"> |
| <!-- The action referenced must be declared as extensible by the com.ibm.wtp.common.ExtendableOperation extension point --> |
| <operationExtension |
| preOperationClass="...YOUR CLASS..." |
| id="...ID OF EXISTING OPERATION..."> |
| </operationExtension> |
| </extension> |
| </pre> |
| |
| And if your operation is optional declare the slaveOperation: |
| |
| <pre> |
| <extension |
| point="com.ibm.wtp.common.ui.wtpuiAction"> |
| <slaveOperation |
| name="..NAME OF YOUR OPERATION..." |
| description="...DESCRIPTION OF YOUR ACTION..." |
| operationClass="...YOUR CLASS..."> |
| </slaveOperation> |
| </extension> |
| </pre>
|
| </documentation>
|
| </annotation>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="apiInfo"/>
|
| </appInfo>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="implementation"/>
|
| </appInfo>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="copyright"/>
|
| </appInfo>
|
| <documentation>
|
|
|
| </documentation>
|
| </annotation>
|
|
|
| </schema>
|