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">
6 <meta.schema plugin="org.simantics.project" id="feature" name="Simantics Project Feature"/>
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.
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.
15 <element name="extension">
23 <element ref="feature" minOccurs="0" maxOccurs="unbounded"/>
25 <attribute name="point" type="string" use="required">
32 <attribute name="id" type="string">
39 <attribute name="name" type="string">
45 <meta.attribute translatable="true"/>
52 <element name="feature">
55 <element ref="requires" minOccurs="0" maxOccurs="unbounded"/>
56 <element ref="injectDependency" minOccurs="0" maxOccurs="unbounded"/>
57 <element ref="installGroup" minOccurs="0" maxOccurs="unbounded"/>
59 <attribute name="id" type="string" use="required">
66 <attribute name="class" type="string" use="required">
69 The IProjectFeature implementation for this extension.
72 <meta.attribute kind="java" basedOn="org.simantics.project.features.AbstractProjectFeature:org.simantics.project.features.IProjectFeature"/>
76 <attribute name="label" type="string">
79 A short description of project feature, a name.
83 <attribute name="description" type="string">
86 A description of the project feature, possibly verbose.
90 <attribute name="published" type="boolean">
93 Informs whether this project feature should be published to users in UI's that visualize user selectable project features in some manner.
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.
97 If a value is not given, <code>false</code> is assumed.
104 <element name="requires">
107 Attached to a project feature, tells that it requires the listed project features as its prerequisited in order to be properly initializable.
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.
113 <attribute name="id" type="string" use="required">
116 The ID of the referenced project feature extension.
119 <meta.attribute kind="identifier" basedOn="org.simantics.project.feature/feature/@id"/>
123 <attribute name="optional" type="boolean">
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.
133 <element name="injectDependency">
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.
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's can be no requires dependency either.
140 This is an inverse mechanism to the requires element.
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.
146 <attribute name="targetId" type="string" use="required">
149 The ID of the injection target project feature extension.
152 <meta.attribute kind="identifier" basedOn="org.simantics.project.feature/feature/@id"/>
159 <element name="installGroup">
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.
166 <attribute name="id" type="string" use="required">
169 A P2 Installable Unit (IU) ID of a. Most often the ID of a feature group IU.
173 <attribute name="version" type="string" use="default" value="1.0.0">
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.
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 "(\\d+).(\\d+).(\\d+).([a-zA-Z_0-9\\-]+)". 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.
187 <meta.section type="since"/>
196 <meta.section type="examples"/>
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.
202 point="org.simantics.project.feature">
204 description="System dynamics modelling project. Create system dynamics models and simulate them with OpenModelica."
205 class="org.simantics.sysdyn.ui.project.SysdynProject"
206 id="org.simantics.sysdyn.project"
207 label="System Dynamics Project"
208 published="true">
209 <requires id="org.simantics.sysdyn.dependencies"/>
210 <requires id="org.simantics.simulation.experimentManager"/>
211 <installGroup id="org.simantics.sysdyn" version="[1.0.0,2.0.0)"/>
214 class="org.simantics.project.features.DependencyValidationFeature:http://www.simantics.org/Sysdyn-1.1/ImportedOntologies"
215 id="org.simantics.sysdyn.dependencies"
216 label="System Dynamics ontology dependencies">
225 <meta.section type="apiinfo"/>
228 The main entry point to project feature facilities is <code>org.simantics.project.ProjectFeatures</code>. It is a facade for handling an<code> IProjectFeatureRegistry</code> and its <code>IProjectFeatureExtension</code>s.
231 See <code>org.simantics.project.Projects</code> for project life-cycle related utilities, such as creation, loading and removal from database. <code>org.simantics.project.IProject</code> serves as handle object for a loaded project. It is an <code>IHintContext</code> and can thus be used to store arbitrary keyed hints.
237 <meta.section type="implementation"/>
240 See <code>org.simantics.project.internal.ProjectFeatureRegistry</code>, <code>org.simantics.project.internal.ProjectFeatureExtension</code> and <code>org.simantics.project.impl.Project</code> for the supplied implementation for this extension point's API.
246 <meta.section type="copyright"/>
249 Copyright (c) 2007, 2010 Association for Decentralized Information Management in Industry THTH ry.<br/>
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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>