]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.project/schema/feature.exsd
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.project / schema / feature.exsd
1 <?xml version='1.0' encoding='UTF-8'?>
2 <!-- Schema file written by PDE -->
3 <schema targetNamespace="org.simantics.project" xmlns="http://www.w3.org/2001/XMLSchema">
4 <annotation>
5       <appInfo>
6          <meta.schema plugin="org.simantics.project" id="feature" name="Simantics Project Feature"/>
7       </appInfo>
8       <documentation>
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.
10
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.
12       </documentation>
13    </annotation>
14
15    <element name="extension">
16       <annotation>
17          <appInfo>
18             <meta.element />
19          </appInfo>
20       </annotation>
21       <complexType>
22          <sequence>
23             <element ref="feature" minOccurs="0" maxOccurs="unbounded"/>
24          </sequence>
25          <attribute name="point" type="string" use="required">
26             <annotation>
27                <documentation>
28                   
29                </documentation>
30             </annotation>
31          </attribute>
32          <attribute name="id" type="string">
33             <annotation>
34                <documentation>
35                   
36                </documentation>
37             </annotation>
38          </attribute>
39          <attribute name="name" type="string">
40             <annotation>
41                <documentation>
42                   
43                </documentation>
44                <appInfo>
45                   <meta.attribute translatable="true"/>
46                </appInfo>
47             </annotation>
48          </attribute>
49       </complexType>
50    </element>
51
52    <element name="feature">
53       <complexType>
54          <sequence>
55             <element ref="requires" minOccurs="0" maxOccurs="unbounded"/>
56             <element ref="injectDependency" minOccurs="0" maxOccurs="unbounded"/>
57             <element ref="installGroup" minOccurs="0" maxOccurs="unbounded"/>
58          </sequence>
59          <attribute name="id" type="string" use="required">
60             <annotation>
61                <documentation>
62                   
63                </documentation>
64             </annotation>
65          </attribute>
66          <attribute name="class" type="string" use="required">
67             <annotation>
68                <documentation>
69                   The IProjectFeature implementation for this extension.
70                </documentation>
71                <appInfo>
72                   <meta.attribute kind="java" basedOn="org.simantics.project.features.AbstractProjectFeature:org.simantics.project.features.IProjectFeature"/>
73                </appInfo>
74             </annotation>
75          </attribute>
76          <attribute name="label" type="string">
77             <annotation>
78                <documentation>
79                   A short description of project feature, a name.
80                </documentation>
81             </annotation>
82          </attribute>
83          <attribute name="description" type="string">
84             <annotation>
85                <documentation>
86                   A description of the project feature, possibly verbose.
87                </documentation>
88             </annotation>
89          </attribute>
90          <attribute name="published" type="boolean">
91             <annotation>
92                <documentation>
93                   Informs whether this project feature should be published to users in UI&apos;s that visualize user selectable project features in some manner.
94
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.
96
97 If a value is not given, &lt;code&gt;false&lt;/code&gt; is assumed.
98                </documentation>
99             </annotation>
100          </attribute>
101       </complexType>
102    </element>
103
104    <element name="requires">
105       <annotation>
106          <documentation>
107             Attached to a project feature, tells that it requires the listed project features as its prerequisited in order to be properly initializable.
108
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.
110          </documentation>
111       </annotation>
112       <complexType>
113          <attribute name="id" type="string" use="required">
114             <annotation>
115                <documentation>
116                   The ID of the referenced project feature extension.
117                </documentation>
118                <appInfo>
119                   <meta.attribute kind="identifier" basedOn="org.simantics.project.feature/feature/@id"/>
120                </appInfo>
121             </annotation>
122          </attribute>
123          <attribute name="optional" type="boolean">
124             <annotation>
125                <documentation>
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.
127                </documentation>
128             </annotation>
129          </attribute>
130       </complexType>
131    </element>
132
133    <element name="injectDependency">
134       <annotation>
135          <documentation>
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.
137
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.
139
140 This is an inverse mechanism to the requires element.
141
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.
143          </documentation>
144       </annotation>
145       <complexType>
146          <attribute name="targetId" type="string" use="required">
147             <annotation>
148                <documentation>
149                   The ID of the injection target project feature extension.
150                </documentation>
151                <appInfo>
152                   <meta.attribute kind="identifier" basedOn="org.simantics.project.feature/feature/@id"/>
153                </appInfo>
154             </annotation>
155          </attribute>
156       </complexType>
157    </element>
158
159    <element name="installGroup">
160       <annotation>
161          <documentation>
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.
163          </documentation>
164       </annotation>
165       <complexType>
166          <attribute name="id" type="string" use="required">
167             <annotation>
168                <documentation>
169                   A P2 Installable Unit (IU) ID of a. Most often the ID of a feature group IU.
170                </documentation>
171             </annotation>
172          </attribute>
173          <attribute name="version" type="string" use="default" value="1.0.0">
174             <annotation>
175                <documentation>
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.
177
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.
179                </documentation>
180             </annotation>
181          </attribute>
182       </complexType>
183    </element>
184
185    <annotation>
186       <appInfo>
187          <meta.section type="since"/>
188       </appInfo>
189       <documentation>
190          16.9.2010
191       </documentation>
192    </annotation>
193
194    <annotation>
195       <appInfo>
196          <meta.section type="examples"/>
197       </appInfo>
198       <documentation>
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.
200 &lt;pre&gt;
201 &lt;extension
202          point=&quot;org.simantics.project.feature&quot;&gt;
203       &lt;feature
204             description=&quot;System dynamics modelling project. Create system dynamics models and simulate them with OpenModelica.&quot;
205             class=&quot;org.simantics.sysdyn.ui.project.SysdynProject&quot;
206             id=&quot;org.simantics.sysdyn.project&quot;
207             label=&quot;System Dynamics Project&quot;
208             published=&quot;true&quot;&gt;
209          &lt;requires id=&quot;org.simantics.sysdyn.dependencies&quot;/&gt;
210          &lt;requires id=&quot;org.simantics.simulation.experimentManager&quot;/&gt;
211          &lt;installGroup id=&quot;org.simantics.sysdyn&quot; version=&quot;[1.0.0,2.0.0)&quot;/&gt;
212       &lt;/feature&gt;
213       &lt;feature
214             class=&quot;org.simantics.project.features.DependencyValidationFeature:http://www.simantics.org/Sysdyn-1.1/ImportedOntologies&quot;
215             id=&quot;org.simantics.sysdyn.dependencies&quot;
216             label=&quot;System Dynamics ontology dependencies&quot;&gt;
217       &lt;/feature&gt;
218    &lt;/extension&gt;
219 &lt;/pre&gt;
220       </documentation>
221    </annotation>
222
223    <annotation>
224       <appInfo>
225          <meta.section type="apiinfo"/>
226       </appInfo>
227       <documentation>
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.
229
230 &lt;p&gt;
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.
232       </documentation>
233    </annotation>
234
235    <annotation>
236       <appInfo>
237          <meta.section type="implementation"/>
238       </appInfo>
239       <documentation>
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.
241       </documentation>
242    </annotation>
243
244    <annotation>
245       <appInfo>
246          <meta.section type="copyright"/>
247       </appInfo>
248       <documentation>
249          Copyright (c) 2007, 2010 Association for Decentralized Information Management in Industry THTH ry.&lt;br/&gt;
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;
251       </documentation>
252    </annotation>
253
254 </schema>