]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.project/schema/feature.exsd
Merge commit '728147df5d63a3333daff3d8c0e9bfd4f5597e3a'
[simantics/platform.git] / bundles / org.simantics.project / schema / feature.exsd
1 <?xml version='1.0' encoding='UTF-8'?>\r
2 <!-- Schema file written by PDE -->\r
3 <schema targetNamespace="org.simantics.project" xmlns="http://www.w3.org/2001/XMLSchema">\r
4 <annotation>\r
5       <appInfo>\r
6          <meta.schema plugin="org.simantics.project" id="feature" name="Simantics Project Feature"/>\r
7       </appInfo>\r
8       <documentation>\r
9          This is an extension point for programmatical contribution of Simantics project framework features. Project features are used to incorporate custom logic into the loading/activation and deactivation of a project.\r
10 \r
11 Projects can be loaded, activated and deactivated also headlessly (without UI) and thus project features should not depend on being able to access Workbench UI.\r
12       </documentation>\r
13    </annotation>\r
14 \r
15    <element name="extension">\r
16       <annotation>\r
17          <appInfo>\r
18             <meta.element />\r
19          </appInfo>\r
20       </annotation>\r
21       <complexType>\r
22          <sequence>\r
23             <element ref="feature" minOccurs="0" maxOccurs="unbounded"/>\r
24          </sequence>\r
25          <attribute name="point" type="string" use="required">\r
26             <annotation>\r
27                <documentation>\r
28                   \r
29                </documentation>\r
30             </annotation>\r
31          </attribute>\r
32          <attribute name="id" type="string">\r
33             <annotation>\r
34                <documentation>\r
35                   \r
36                </documentation>\r
37             </annotation>\r
38          </attribute>\r
39          <attribute name="name" type="string">\r
40             <annotation>\r
41                <documentation>\r
42                   \r
43                </documentation>\r
44                <appInfo>\r
45                   <meta.attribute translatable="true"/>\r
46                </appInfo>\r
47             </annotation>\r
48          </attribute>\r
49       </complexType>\r
50    </element>\r
51 \r
52    <element name="feature">\r
53       <complexType>\r
54          <sequence>\r
55             <element ref="requires" minOccurs="0" maxOccurs="unbounded"/>\r
56             <element ref="injectDependency" minOccurs="0" maxOccurs="unbounded"/>\r
57             <element ref="installGroup" minOccurs="0" maxOccurs="unbounded"/>\r
58          </sequence>\r
59          <attribute name="id" type="string" use="required">\r
60             <annotation>\r
61                <documentation>\r
62                   \r
63                </documentation>\r
64             </annotation>\r
65          </attribute>\r
66          <attribute name="class" type="string" use="required">\r
67             <annotation>\r
68                <documentation>\r
69                   The IProjectFeature implementation for this extension.\r
70                </documentation>\r
71                <appInfo>\r
72                   <meta.attribute kind="java" basedOn="org.simantics.project.features.AbstractProjectFeature:org.simantics.project.features.IProjectFeature"/>\r
73                </appInfo>\r
74             </annotation>\r
75          </attribute>\r
76          <attribute name="label" type="string">\r
77             <annotation>\r
78                <documentation>\r
79                   A short description of project feature, a name.\r
80                </documentation>\r
81             </annotation>\r
82          </attribute>\r
83          <attribute name="description" type="string">\r
84             <annotation>\r
85                <documentation>\r
86                   A description of the project feature, possibly verbose.\r
87                </documentation>\r
88             </annotation>\r
89          </attribute>\r
90          <attribute name="published" type="boolean">\r
91             <annotation>\r
92                <documentation>\r
93                   Informs whether this project feature should be published to users in UI&apos;s that visualize user selectable project features in some manner.\r
94 \r
95 For example top level project features should always be published in order to give Simantics Project Manager users the possibility to select the feature to be used in their project.\r
96 \r
97 If a value is not given, &lt;code&gt;false&lt;/code&gt; is assumed.\r
98                </documentation>\r
99             </annotation>\r
100          </attribute>\r
101       </complexType>\r
102    </element>\r
103 \r
104    <element name="requires">\r
105       <annotation>\r
106          <documentation>\r
107             Attached to a project feature, tells that it requires the listed project features as its prerequisited in order to be properly initializable.\r
108 \r
109 These requirements are used to determine the initialization order of project features through topological sorting. The dependency network formed by the requires-definitions must be acyclic.\r
110          </documentation>\r
111       </annotation>\r
112       <complexType>\r
113          <attribute name="id" type="string" use="required">\r
114             <annotation>\r
115                <documentation>\r
116                   The ID of the referenced project feature extension.\r
117                </documentation>\r
118                <appInfo>\r
119                   <meta.attribute kind="identifier" basedOn="org.simantics.project.feature/feature/@id"/>\r
120                </appInfo>\r
121             </annotation>\r
122          </attribute>\r
123          <attribute name="optional" type="boolean">\r
124             <annotation>\r
125                <documentation>\r
126                   Set to true to signify that this project feature requirement is optional and that no error/warning should be issued if it does not exist. Defaults to false.\r
127                </documentation>\r
128             </annotation>\r
129          </attribute>\r
130       </complexType>\r
131    </element>\r
132 \r
133    <element name="injectDependency">\r
134       <annotation>\r
135          <documentation>\r
136             Indicates to the project feature subsystem that the parent project feature is to be injected as a requirement of the injection target project feature. It will thus become a required prerequisite of the identified feature.\r
137 \r
138 Logically this dependency injection only creates a requires relationship from targetId to id. If the injection target project feature does not exist, nothing happens since there&apos;s can be no requires dependency either.\r
139 \r
140 This is an inverse mechanism to the requires element.\r
141 \r
142 These requirements are used to determine the initialization order of project features through topological sorting. The dependency network formed by the requires-definitions must be acyclic.\r
143          </documentation>\r
144       </annotation>\r
145       <complexType>\r
146          <attribute name="targetId" type="string" use="required">\r
147             <annotation>\r
148                <documentation>\r
149                   The ID of the injection target project feature extension.\r
150                </documentation>\r
151                <appInfo>\r
152                   <meta.attribute kind="identifier" basedOn="org.simantics.project.feature/feature/@id"/>\r
153                </appInfo>\r
154             </annotation>\r
155          </attribute>\r
156       </complexType>\r
157    </element>\r
158 \r
159    <element name="installGroup">\r
160       <annotation>\r
161          <documentation>\r
162             A project feature can be tagged with any number of platform P2 Installable Unit (IU) IDs, feature group IDs in particular. If any of those IU IDs match what is marked as installed in the project, the feature will be included in project loading. The version specifier must also be an inclusive match if one is specified.\r
163          </documentation>\r
164       </annotation>\r
165       <complexType>\r
166          <attribute name="id" type="string" use="required">\r
167             <annotation>\r
168                <documentation>\r
169                   A P2 Installable Unit (IU) ID of a. Most often the ID of a feature group IU.\r
170                </documentation>\r
171             </annotation>\r
172          </attribute>\r
173          <attribute name="version" type="string" use="default" value="1.0.0">\r
174             <annotation>\r
175                <documentation>\r
176                   Version specifier for a feature bundle reference. This attribute is not mandatory. Leaving it empty means that the project feature can be used with any version of the specified feature.\r
177 \r
178 Version is specified as a single version or a version range, such as [1.0.0,2.0.0). Versions shall respect the pattern &quot;(\\d+).(\\d+).(\\d+).([a-zA-Z_0-9\\-]+)&quot;. Defining only a single version instead of a version range means that any version greater than or equal to the specified one will be accepted.\r
179                </documentation>\r
180             </annotation>\r
181          </attribute>\r
182       </complexType>\r
183    </element>\r
184 \r
185    <annotation>\r
186       <appInfo>\r
187          <meta.section type="since"/>\r
188       </appInfo>\r
189       <documentation>\r
190          16.9.2010\r
191       </documentation>\r
192    </annotation>\r
193 \r
194    <annotation>\r
195       <appInfo>\r
196          <meta.section type="examples"/>\r
197       </appInfo>\r
198       <documentation>\r
199          This example is taken from the Simantics System Dynamic package. It demonstrates the use of all current features of the extension point, namely project features, dependencies between project features and bindings between project features and platform features.\r
200 &lt;pre&gt;\r
201 &lt;extension\r
202          point=&quot;org.simantics.project.feature&quot;&gt;\r
203       &lt;feature\r
204             description=&quot;System dynamics modelling project. Create system dynamics models and simulate them with OpenModelica.&quot;\r
205             class=&quot;org.simantics.sysdyn.ui.project.SysdynProject&quot;\r
206             id=&quot;org.simantics.sysdyn.project&quot;\r
207             label=&quot;System Dynamics Project&quot;\r
208             published=&quot;true&quot;&gt;\r
209          &lt;requires id=&quot;org.simantics.sysdyn.dependencies&quot;/&gt;\r
210          &lt;requires id=&quot;org.simantics.simulation.experimentManager&quot;/&gt;\r
211          &lt;installGroup id=&quot;org.simantics.sysdyn&quot; version=&quot;[1.0.0,2.0.0)&quot;/&gt;\r
212       &lt;/feature&gt;\r
213       &lt;feature\r
214             class=&quot;org.simantics.project.features.DependencyValidationFeature:http://www.simantics.org/Sysdyn-1.1/ImportedOntologies&quot;\r
215             id=&quot;org.simantics.sysdyn.dependencies&quot;\r
216             label=&quot;System Dynamics ontology dependencies&quot;&gt;\r
217       &lt;/feature&gt;\r
218    &lt;/extension&gt;\r
219 &lt;/pre&gt;\r
220       </documentation>\r
221    </annotation>\r
222 \r
223    <annotation>\r
224       <appInfo>\r
225          <meta.section type="apiinfo"/>\r
226       </appInfo>\r
227       <documentation>\r
228          The main entry point to project feature facilities is &lt;code&gt;org.simantics.project.ProjectFeatures&lt;/code&gt;. It is a facade for handling an&lt;code&gt; IProjectFeatureRegistry&lt;/code&gt; and its &lt;code&gt;IProjectFeatureExtension&lt;/code&gt;s.\r
229 \r
230 &lt;p&gt;\r
231 See &lt;code&gt;org.simantics.project.Projects&lt;/code&gt; for project life-cycle related utilities, such as creation, loading and removal from database. &lt;code&gt;org.simantics.project.IProject&lt;/code&gt; serves as handle object for a loaded project. It is an &lt;code&gt;IHintContext&lt;/code&gt; and can thus be used to store arbitrary keyed hints.\r
232       </documentation>\r
233    </annotation>\r
234 \r
235    <annotation>\r
236       <appInfo>\r
237          <meta.section type="implementation"/>\r
238       </appInfo>\r
239       <documentation>\r
240          See &lt;code&gt;org.simantics.project.internal.ProjectFeatureRegistry&lt;/code&gt;, &lt;code&gt;org.simantics.project.internal.ProjectFeatureExtension&lt;/code&gt; and &lt;code&gt;org.simantics.project.impl.Project&lt;/code&gt; for the supplied implementation for this extension point&apos;s API.\r
241       </documentation>\r
242    </annotation>\r
243 \r
244    <annotation>\r
245       <appInfo>\r
246          <meta.section type="copyright"/>\r
247       </appInfo>\r
248       <documentation>\r
249          Copyright (c) 2007, 2010 Association for Decentralized Information Management in Industry THTH ry.&lt;br/&gt;\r
250 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;\r
251       </documentation>\r
252    </annotation>\r
253 \r
254 </schema>\r