<?xml version='1.0' encoding='UTF-8'?> | |
<!-- Schema file written by PDE --> | |
<schema targetNamespace="org.eclipse.wst.common.frameworks.ui"> | |
<annotation> | |
<appInfo> | |
<meta.schema plugin="org.eclipse.wst.common.frameworks.ui" id="wtpuiAction" name="WTP UI Action"/> | |
</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> | |
a fully qualified identifier of the target extension point | |
</documentation> | |
</annotation> | |
</attribute> | |
<attribute name="id" type="string"> | |
<annotation> | |
<documentation> | |
an optional identifier of the extension instance | |
</documentation> | |
</annotation> | |
</attribute> | |
<attribute name="name" type="string"> | |
<annotation> | |
<documentation> | |
an optional name of the extension instance | |
</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 be a 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> | |
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> | |
optional setting to determine execution context | |
</documentation> | |
</annotation> | |
</attribute> | |
<attribute name="overrideId" type="string"> | |
<annotation> | |
<documentation> | |
optional setting to define an overridable id | |
</documentation> | |
</annotation> | |
</attribute> | |
<attribute name="id" type="string"> | |
<annotation> | |
<documentation> | |
optional identification for operation instance | |
</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 be a 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> | |
fully qualified name of the object class | |
</documentation> | |
</annotation> | |
</attribute> | |
<attribute name="adaptable" type="string"> | |
<annotation> | |
<documentation> | |
optional setting to specify the object class as adaptable | |
</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> | |
optional setting for the value of a specific object state | |
</documentation> | |
</annotation> | |
</attribute> | |
<attribute name="name" type="string"> | |
<annotation> | |
<documentation> | |
optional setting for an object state name to check the selected object's value is matching with | |
</documentation> | |
</annotation> | |
</attribute> | |
</complexType> | |
</element> | |
<annotation> | |
<appInfo> | |
<meta.section type="since"/> | |
</appInfo> | |
<documentation> | |
1.0 | |
</documentation> | |
</annotation> | |
<annotation> | |
<appInfo> | |
<meta.section type="examples"/> | |
</appInfo> | |
<documentation> | |
<!-- The examples in this section have been commented out because they reference only extension point IDs. These examples must be corrected before being included in the 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="org.eclipse.wst.common.frameworks.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="org.eclipse.wst.common.frameworks.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="org.eclipse.wst.common.frameworks.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="org.eclipse.wst.common.frameworks.OperationExtension">--> | |
<!-- The action referenced must be declared as extensible by the org.eclipse.wst.common.frameworks.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="org.eclipse.wst.common.frameworks.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> | |
Copyright (c) 2005 IBM Corporation and others.<br> | |
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 <a | |
href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> | |
</documentation> | |
</annotation> | |
</schema> |