<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dev.simantics.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hannu+Niemisto</id>
	<title>Developer Documents - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dev.simantics.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hannu+Niemisto"/>
	<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php/Special:Contributions/Hannu_Niemisto"/>
	<updated>2026-04-05T19:41:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3344</id>
		<title>Quick Development Environment Setup</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3344"/>
		<updated>2017-06-05T05:26:06Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Install Java JDK and Eclipse, and Setup the IDE for Simantics Development ==&lt;br /&gt;
&lt;br /&gt;
# Get and install the latest 64-bit &#039;&#039;Java SE Development Kit 8&#039;&#039; (JDK 8). You can download the package from [http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html]. Follow the installation instructions for your operating system. It is recommended to always use the latest JDK update.&lt;br /&gt;
# Get and install the latest 64-bit &#039;&#039;Eclipse Classic IDE&#039;&#039; release build. You can find the package from [http://download.eclipse.org/eclipse/downloads/ http://download.eclipse.org/eclipse/downloads/]. You can select freely the installation location for the package, e.g. under your home directory. Just unzip the package to install Eclipse. Alternatively, there is also an [http://www.eclipse.org/downloads/ installer] available.&lt;br /&gt;
# After the installation of Eclipse, check that your Eclipse is set to use the right Java Runtime Environment (JRE):&lt;br /&gt;
#* In Eclipse platform, open &amp;quot;Window - Preferences&amp;quot;.&lt;br /&gt;
#* Open page “Java / Installed JREs”.&lt;br /&gt;
#* Set the JRE to point to the previously installed JDK 8.&lt;br /&gt;
# Install the Simantics Graph Compiler:&lt;br /&gt;
#* In Eclipse platform, open “Help / Install New Software...”.&lt;br /&gt;
#* Set the installation site to &amp;quot;http://www.simantics.org/update/utils&amp;quot; in the “Work with” field and press “Add...”. Give the installation site link a name when asked.&lt;br /&gt;
#* Select from the list the latest &amp;quot;Ontology development / Graph feature&amp;quot; and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# Install the Subversive plug-in to the Eclipse platform:&lt;br /&gt;
#* In Eclipse platform, open &#039;&#039;“Help / Install New Software...”&#039;&#039;.&lt;br /&gt;
#* Select installation site &amp;quot;Neon - http://download.eclipse.org/releases/neon&amp;quot; to the “Work with” field from the preset list.&lt;br /&gt;
#* Click open the &amp;quot;Collaboration&amp;quot; folder and select from the list:&lt;br /&gt;
#** &#039;&#039;Subversive SVN Team Provider&#039;&#039;&lt;br /&gt;
#** &#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&lt;br /&gt;
#: and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# After restarting Eclipse, open the SVN Repository Exploring perspective:&lt;br /&gt;
#* In Eclipse platform, open “Window / Open Perspective / Other...”.&lt;br /&gt;
#* Select &#039;&#039;SVN Repository Exploring&#039;&#039; and press “OK”. Eclipse should open the “Install Connectors” dialog.&lt;br /&gt;
#* Select latest “SVN Kit 1.x.y” and press “Finish”, and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
&lt;br /&gt;
== Install Latest Simantics Target Platform ==&lt;br /&gt;
&lt;br /&gt;
# In Eclipse platform, activate the &#039;&#039;Plug-in Development&#039;&#039; perspective, either from the tab on the upper right corner of the Eclipse platform or from the “Window / Open Perspective / Other...” menu, and select &#039;&#039;Plug-in Development&#039;&#039;.&lt;br /&gt;
# Create a new general project in Eclipse by:&lt;br /&gt;
#* Selecting “File / New / Project...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select a wizard&amp;quot;, select “General / Project” and press “Next”.&lt;br /&gt;
#* Give the project a name, e.g. &amp;quot;Simantics_target&amp;quot; and press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Copy one of the following files into your system to some temporary location:&lt;br /&gt;
#* [http://www.simantics.org/download/latest/simantics.target http://www.simantics.org/download/latest/simantics.target] (for application development on Simantics platform)&lt;br /&gt;
#: The Simantics platform source code is available for [https://www.simantics.org/simantics/about-simantics/thth-simantics THTH/Simantics Division] registered members through these alternative target definitions (user name and password are asked during the installation, these are available at the [https://www.simantics.org/members/index.php/Main_Page THTH/Simantics Member Wiki]):&lt;br /&gt;
#* [http://www.simantics.org/download/latest/simantics-sdk.target http://www.simantics.org/download/latest/simantics-sdk.target] (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
# In Eclipse &#039;&#039;Package Explorer&#039;&#039; (the view on left side of the Eclipse platform):&lt;br /&gt;
#* Right-click your previously created project and select &amp;quot;Import...&amp;quot; from the context menu.&lt;br /&gt;
#* In &#039;&#039;Select wizard&#039;&#039;, select “General / File System”, and press &amp;quot;Next&amp;quot;.&lt;br /&gt;
#* Select in the “From directory” the folder where the previously downloaded file(s) are located, and select the downloaded file(s) in the file list below. Press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Set the target platform for the development with Simantics:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* The new target definitions should be available in the list. Activate one of the following:&lt;br /&gt;
#** “Simantics x.y” (for application development on Simantics platform)&lt;br /&gt;
#** “Simantics SDK x.y” (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
#: and confirm the target platform definition by pressing &amp;quot;Apply&amp;quot; and/or &amp;quot;OK&amp;quot;. If you defined a &#039;&#039;Simantics SDK x.y&#039;&#039; target, you are asked for the username and the password.&lt;br /&gt;
#* Wait until Eclipse finishes downloading, this may take a while. After the download is completed, there should be several plug-ins starting with &amp;quot;org.simantics.*&amp;quot; in the Eclipse &#039;&#039;Plug-ins&#039;&#039; view (the view on the left side of Eclipse).&lt;br /&gt;
# &#039;&#039;&#039;Keep your platform up-to-date!&#039;&#039;&#039; Updating is as easy as reloading the target platform from &#039;&#039;Target Platform&#039;&#039; preference page:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* Select the active target platform, e.g. &#039;&#039;Simantics SDK x.y&#039;&#039;, from the list and press &amp;quot;Reload&amp;quot;.&lt;br /&gt;
#* Wait until the platform is updated.&lt;br /&gt;
&lt;br /&gt;
== Test Your Installation ==&lt;br /&gt;
&lt;br /&gt;
Test your installation with the [http://dev.simantics.org/index.php/Tutorial:_Ontology_Development Simantics movie tutorial]:&lt;br /&gt;
&lt;br /&gt;
# Download &#039;&#039;Simantics movie tutorial&#039;&#039; plug-ins into your Eclipse workspace:&lt;br /&gt;
#* Get [https://www.simantics.org/jenkins/job/Tutorials/job/package-movie-tutorial-head/lastSuccessfulBuild/artifact/movie-tutorial.zip]&lt;br /&gt;
#* In Eclipse platform, select  “File / Import...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select&amp;quot; dialog, select “General / Existing Projects into Workspace” and press “Next”.&lt;br /&gt;
#* Select the “Select archive file:” radio button and press “Browse” to find the downloaded movie-tutorial.zip.&lt;br /&gt;
#* Press “Select All” and “Finish”.&lt;br /&gt;
# Run movie.product:&lt;br /&gt;
#* From the &#039;&#039;Package Explorer&#039;&#039; view, open “org.simantics.movie.ui&#039;&#039; / Movie.product”.&lt;br /&gt;
#* From the &#039;&#039;Overview&#039;&#039; page of the opened product editor, press “Launch an Eclipse application”. &lt;br /&gt;
&lt;br /&gt;
If you managed to start the &#039;&#039;movie&#039;&#039; product, your development platform should be operational.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Happy developing with Simantics!&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3343</id>
		<title>Quick Development Environment Setup</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3343"/>
		<updated>2017-06-05T05:24:41Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Install Java JDK and Eclipse, and Setup the IDE for Simantics Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Install Java JDK and Eclipse, and Setup the IDE for Simantics Development ==&lt;br /&gt;
&lt;br /&gt;
# Get and install the latest 64-bit &#039;&#039;Java SE Development Kit 8&#039;&#039; (JDK 8). You can download the package from [http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html]. Follow the installation instructions for your operating system. It is recommended to always use the latest JDK update.&lt;br /&gt;
# Get and install the latest 64-bit &#039;&#039;Eclipse Classic IDE&#039;&#039; release build. You can find the package from [http://download.eclipse.org/eclipse/downloads/ http://download.eclipse.org/eclipse/downloads/]. You can select freely the installation location for the package, e.g. under your home directory. Just unzip the package to install Eclipse. Alternatively, there is also an [http://www.eclipse.org/downloads/ installer] available.&lt;br /&gt;
# After the installation of Eclipse, check that your Eclipse is set to use the right Java Runtime Environment (JRE):&lt;br /&gt;
#* In Eclipse platform, open &amp;quot;Window - Preferences&amp;quot;.&lt;br /&gt;
#* Open page “Java / Installed JREs”.&lt;br /&gt;
#* Set the JRE to point to the previously installed JDK 8.&lt;br /&gt;
# Install the Simantics Graph Compiler:&lt;br /&gt;
#* In Eclipse platform, open “Help / Install New Software...”.&lt;br /&gt;
#* Set the installation site to &amp;quot;http://www.simantics.org/update/utils&amp;quot; in the “Work with” field and press “Add...”. Give the installation site link a name when asked.&lt;br /&gt;
#* Select from the list the latest &amp;quot;Ontology development / Graph feature&amp;quot; and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# Install the Subversive plug-in to the Eclipse platform:&lt;br /&gt;
#* In Eclipse platform, open &#039;&#039;“Help / Install New Software...”&#039;&#039;.&lt;br /&gt;
#* Select installation site &amp;quot;Mars - http://download.eclipse.org/releases/mars&amp;quot; to the “Work with” field from the preset list.&lt;br /&gt;
#* Click open the &amp;quot;Collaboration&amp;quot; folder and select from the list:&lt;br /&gt;
#** &#039;&#039;Subversive SVN Team Provider&#039;&#039;&lt;br /&gt;
#** &#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&lt;br /&gt;
#: and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# After restarting Eclipse, open the SVN Repository Exploring perspective:&lt;br /&gt;
#* In Eclipse platform, open “Window / Open Perspective / Other...”.&lt;br /&gt;
#* Select &#039;&#039;SVN Repository Exploring&#039;&#039; and press “OK”. Eclipse should open the “Install Connectors” dialog.&lt;br /&gt;
#* Select latest “SVN Kit 1.x.y” and press “Finish”, and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
&lt;br /&gt;
== Install Latest Simantics Target Platform ==&lt;br /&gt;
&lt;br /&gt;
# In Eclipse platform, activate the &#039;&#039;Plug-in Development&#039;&#039; perspective, either from the tab on the upper right corner of the Eclipse platform or from the “Window / Open Perspective / Other...” menu, and select &#039;&#039;Plug-in Development&#039;&#039;.&lt;br /&gt;
# Create a new general project in Eclipse by:&lt;br /&gt;
#* Selecting “File / New / Project...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select a wizard&amp;quot;, select “General / Project” and press “Next”.&lt;br /&gt;
#* Give the project a name, e.g. &amp;quot;Simantics_target&amp;quot; and press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Copy one of the following files into your system to some temporary location:&lt;br /&gt;
#* [http://www.simantics.org/download/latest/simantics.target http://www.simantics.org/download/latest/simantics.target] (for application development on Simantics platform)&lt;br /&gt;
#: The Simantics platform source code is available for [https://www.simantics.org/simantics/about-simantics/thth-simantics THTH/Simantics Division] registered members through these alternative target definitions (user name and password are asked during the installation, these are available at the [https://www.simantics.org/members/index.php/Main_Page THTH/Simantics Member Wiki]):&lt;br /&gt;
#* [http://www.simantics.org/download/latest/simantics-sdk.target http://www.simantics.org/download/latest/simantics-sdk.target] (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
# In Eclipse &#039;&#039;Package Explorer&#039;&#039; (the view on left side of the Eclipse platform):&lt;br /&gt;
#* Right-click your previously created project and select &amp;quot;Import...&amp;quot; from the context menu.&lt;br /&gt;
#* In &#039;&#039;Select wizard&#039;&#039;, select “General / File System”, and press &amp;quot;Next&amp;quot;.&lt;br /&gt;
#* Select in the “From directory” the folder where the previously downloaded file(s) are located, and select the downloaded file(s) in the file list below. Press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Set the target platform for the development with Simantics:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* The new target definitions should be available in the list. Activate one of the following:&lt;br /&gt;
#** “Simantics x.y” (for application development on Simantics platform)&lt;br /&gt;
#** “Simantics SDK x.y” (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
#: and confirm the target platform definition by pressing &amp;quot;Apply&amp;quot; and/or &amp;quot;OK&amp;quot;. If you defined a &#039;&#039;Simantics SDK x.y&#039;&#039; target, you are asked for the username and the password.&lt;br /&gt;
#* Wait until Eclipse finishes downloading, this may take a while. After the download is completed, there should be several plug-ins starting with &amp;quot;org.simantics.*&amp;quot; in the Eclipse &#039;&#039;Plug-ins&#039;&#039; view (the view on the left side of Eclipse).&lt;br /&gt;
# &#039;&#039;&#039;Keep your platform up-to-date!&#039;&#039;&#039; Updating is as easy as reloading the target platform from &#039;&#039;Target Platform&#039;&#039; preference page:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* Select the active target platform, e.g. &#039;&#039;Simantics SDK x.y&#039;&#039;, from the list and press &amp;quot;Reload&amp;quot;.&lt;br /&gt;
#* Wait until the platform is updated.&lt;br /&gt;
&lt;br /&gt;
== Test Your Installation ==&lt;br /&gt;
&lt;br /&gt;
Test your installation with the [http://dev.simantics.org/index.php/Tutorial:_Ontology_Development Simantics movie tutorial]:&lt;br /&gt;
&lt;br /&gt;
# Download &#039;&#039;Simantics movie tutorial&#039;&#039; plug-ins into your Eclipse workspace:&lt;br /&gt;
#* Get [https://www.simantics.org/jenkins/job/Tutorials/job/package-movie-tutorial-head/lastSuccessfulBuild/artifact/movie-tutorial.zip]&lt;br /&gt;
#* In Eclipse platform, select  “File / Import...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select&amp;quot; dialog, select “General / Existing Projects into Workspace” and press “Next”.&lt;br /&gt;
#* Select the “Select archive file:” radio button and press “Browse” to find the downloaded movie-tutorial.zip.&lt;br /&gt;
#* Press “Select All” and “Finish”.&lt;br /&gt;
# Run movie.product:&lt;br /&gt;
#* From the &#039;&#039;Package Explorer&#039;&#039; view, open “org.simantics.movie.ui&#039;&#039; / Movie.product”.&lt;br /&gt;
#* From the &#039;&#039;Overview&#039;&#039; page of the opened product editor, press “Launch an Eclipse application”. &lt;br /&gt;
&lt;br /&gt;
If you managed to start the &#039;&#039;movie&#039;&#039; product, your development platform should be operational.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Happy developing with Simantics!&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3342</id>
		<title>Quick Development Environment Setup</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3342"/>
		<updated>2017-06-05T05:24:24Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Install Java JDK and Eclipse, and Setup the IDE for Simantics Development ==&lt;br /&gt;
&lt;br /&gt;
# Get and install &#039;&#039;Java SE Development Kit 8&#039;&#039; (JDK 8). You can download the package from [http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html]. Follow the installation instructions for your operating system. It is recommended to always use the latest JDK update.&lt;br /&gt;
# Get and install the latest 64-bit &#039;&#039;Eclipse Classic IDE&#039;&#039; release build. You can find the package from [http://download.eclipse.org/eclipse/downloads/ http://download.eclipse.org/eclipse/downloads/]. You can select freely the installation location for the package, e.g. under your home directory. Just unzip the package to install Eclipse. Alternatively, there is also an [http://www.eclipse.org/downloads/ installer] available.&lt;br /&gt;
# After the installation of Eclipse, check that your Eclipse is set to use the right Java Runtime Environment (JRE):&lt;br /&gt;
#* In Eclipse platform, open &amp;quot;Window - Preferences&amp;quot;.&lt;br /&gt;
#* Open page “Java / Installed JREs”.&lt;br /&gt;
#* Set the JRE to point to the previously installed JDK 8.&lt;br /&gt;
# Install the Simantics Graph Compiler:&lt;br /&gt;
#* In Eclipse platform, open “Help / Install New Software...”.&lt;br /&gt;
#* Set the installation site to &amp;quot;http://www.simantics.org/update/utils&amp;quot; in the “Work with” field and press “Add...”. Give the installation site link a name when asked.&lt;br /&gt;
#* Select from the list the latest &amp;quot;Ontology development / Graph feature&amp;quot; and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# Install the Subversive plug-in to the Eclipse platform:&lt;br /&gt;
#* In Eclipse platform, open &#039;&#039;“Help / Install New Software...”&#039;&#039;.&lt;br /&gt;
#* Select installation site &amp;quot;Mars - http://download.eclipse.org/releases/mars&amp;quot; to the “Work with” field from the preset list.&lt;br /&gt;
#* Click open the &amp;quot;Collaboration&amp;quot; folder and select from the list:&lt;br /&gt;
#** &#039;&#039;Subversive SVN Team Provider&#039;&#039;&lt;br /&gt;
#** &#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&lt;br /&gt;
#: and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# After restarting Eclipse, open the SVN Repository Exploring perspective:&lt;br /&gt;
#* In Eclipse platform, open “Window / Open Perspective / Other...”.&lt;br /&gt;
#* Select &#039;&#039;SVN Repository Exploring&#039;&#039; and press “OK”. Eclipse should open the “Install Connectors” dialog.&lt;br /&gt;
#* Select latest “SVN Kit 1.x.y” and press “Finish”, and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
&lt;br /&gt;
== Install Latest Simantics Target Platform ==&lt;br /&gt;
&lt;br /&gt;
# In Eclipse platform, activate the &#039;&#039;Plug-in Development&#039;&#039; perspective, either from the tab on the upper right corner of the Eclipse platform or from the “Window / Open Perspective / Other...” menu, and select &#039;&#039;Plug-in Development&#039;&#039;.&lt;br /&gt;
# Create a new general project in Eclipse by:&lt;br /&gt;
#* Selecting “File / New / Project...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select a wizard&amp;quot;, select “General / Project” and press “Next”.&lt;br /&gt;
#* Give the project a name, e.g. &amp;quot;Simantics_target&amp;quot; and press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Copy one of the following files into your system to some temporary location:&lt;br /&gt;
#* [http://www.simantics.org/download/latest/simantics.target http://www.simantics.org/download/latest/simantics.target] (for application development on Simantics platform)&lt;br /&gt;
#: The Simantics platform source code is available for [https://www.simantics.org/simantics/about-simantics/thth-simantics THTH/Simantics Division] registered members through these alternative target definitions (user name and password are asked during the installation, these are available at the [https://www.simantics.org/members/index.php/Main_Page THTH/Simantics Member Wiki]):&lt;br /&gt;
#* [http://www.simantics.org/download/latest/simantics-sdk.target http://www.simantics.org/download/latest/simantics-sdk.target] (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
# In Eclipse &#039;&#039;Package Explorer&#039;&#039; (the view on left side of the Eclipse platform):&lt;br /&gt;
#* Right-click your previously created project and select &amp;quot;Import...&amp;quot; from the context menu.&lt;br /&gt;
#* In &#039;&#039;Select wizard&#039;&#039;, select “General / File System”, and press &amp;quot;Next&amp;quot;.&lt;br /&gt;
#* Select in the “From directory” the folder where the previously downloaded file(s) are located, and select the downloaded file(s) in the file list below. Press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Set the target platform for the development with Simantics:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* The new target definitions should be available in the list. Activate one of the following:&lt;br /&gt;
#** “Simantics x.y” (for application development on Simantics platform)&lt;br /&gt;
#** “Simantics SDK x.y” (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
#: and confirm the target platform definition by pressing &amp;quot;Apply&amp;quot; and/or &amp;quot;OK&amp;quot;. If you defined a &#039;&#039;Simantics SDK x.y&#039;&#039; target, you are asked for the username and the password.&lt;br /&gt;
#* Wait until Eclipse finishes downloading, this may take a while. After the download is completed, there should be several plug-ins starting with &amp;quot;org.simantics.*&amp;quot; in the Eclipse &#039;&#039;Plug-ins&#039;&#039; view (the view on the left side of Eclipse).&lt;br /&gt;
# &#039;&#039;&#039;Keep your platform up-to-date!&#039;&#039;&#039; Updating is as easy as reloading the target platform from &#039;&#039;Target Platform&#039;&#039; preference page:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* Select the active target platform, e.g. &#039;&#039;Simantics SDK x.y&#039;&#039;, from the list and press &amp;quot;Reload&amp;quot;.&lt;br /&gt;
#* Wait until the platform is updated.&lt;br /&gt;
&lt;br /&gt;
== Test Your Installation ==&lt;br /&gt;
&lt;br /&gt;
Test your installation with the [http://dev.simantics.org/index.php/Tutorial:_Ontology_Development Simantics movie tutorial]:&lt;br /&gt;
&lt;br /&gt;
# Download &#039;&#039;Simantics movie tutorial&#039;&#039; plug-ins into your Eclipse workspace:&lt;br /&gt;
#* Get [https://www.simantics.org/jenkins/job/Tutorials/job/package-movie-tutorial-head/lastSuccessfulBuild/artifact/movie-tutorial.zip]&lt;br /&gt;
#* In Eclipse platform, select  “File / Import...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select&amp;quot; dialog, select “General / Existing Projects into Workspace” and press “Next”.&lt;br /&gt;
#* Select the “Select archive file:” radio button and press “Browse” to find the downloaded movie-tutorial.zip.&lt;br /&gt;
#* Press “Select All” and “Finish”.&lt;br /&gt;
# Run movie.product:&lt;br /&gt;
#* From the &#039;&#039;Package Explorer&#039;&#039; view, open “org.simantics.movie.ui&#039;&#039; / Movie.product”.&lt;br /&gt;
#* From the &#039;&#039;Overview&#039;&#039; page of the opened product editor, press “Launch an Eclipse application”. &lt;br /&gt;
&lt;br /&gt;
If you managed to start the &#039;&#039;movie&#039;&#039; product, your development platform should be operational.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Happy developing with Simantics!&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3341</id>
		<title>Quick Development Environment Setup</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3341"/>
		<updated>2017-06-05T05:23:52Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Install Java JDK and Eclipse, and Setup the IDE for Simantics Development ==&lt;br /&gt;
&lt;br /&gt;
# Get and install &#039;&#039;Java SE Development Kit 8&#039;&#039; (JDK 8). You can download the package from [http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html]. Follow the installation instructions for your operating system. It is recommended to always use the latest JDK update.&lt;br /&gt;
# Get and install the latest &#039;&#039;Eclipse Classic IDE&#039;&#039; release build. You can find the package from [http://download.eclipse.org/eclipse/downloads/ http://download.eclipse.org/eclipse/downloads/]. You can select freely the installation location for the package, e.g. under your home directory. Just unzip the package to install Eclipse. Alternatively, there is also an [http://www.eclipse.org/downloads/ installer] available.&lt;br /&gt;
# After the installation of Eclipse, check that your Eclipse is set to use the right Java Runtime Environment (JRE):&lt;br /&gt;
#* In Eclipse platform, open &amp;quot;Window - Preferences&amp;quot;.&lt;br /&gt;
#* Open page “Java / Installed JREs”.&lt;br /&gt;
#* Set the JRE to point to the previously installed JDK 8.&lt;br /&gt;
# Install the Simantics Graph Compiler:&lt;br /&gt;
#* In Eclipse platform, open “Help / Install New Software...”.&lt;br /&gt;
#* Set the installation site to &amp;quot;http://www.simantics.org/update/utils&amp;quot; in the “Work with” field and press “Add...”. Give the installation site link a name when asked.&lt;br /&gt;
#* Select from the list the latest &amp;quot;Ontology development / Graph feature&amp;quot; and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# Install the Subversive plug-in to the Eclipse platform:&lt;br /&gt;
#* In Eclipse platform, open &#039;&#039;“Help / Install New Software...”&#039;&#039;.&lt;br /&gt;
#* Select installation site &amp;quot;Mars - http://download.eclipse.org/releases/mars&amp;quot; to the “Work with” field from the preset list.&lt;br /&gt;
#* Click open the &amp;quot;Collaboration&amp;quot; folder and select from the list:&lt;br /&gt;
#** &#039;&#039;Subversive SVN Team Provider&#039;&#039;&lt;br /&gt;
#** &#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&lt;br /&gt;
#: and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# After restarting Eclipse, open the SVN Repository Exploring perspective:&lt;br /&gt;
#* In Eclipse platform, open “Window / Open Perspective / Other...”.&lt;br /&gt;
#* Select &#039;&#039;SVN Repository Exploring&#039;&#039; and press “OK”. Eclipse should open the “Install Connectors” dialog.&lt;br /&gt;
#* Select latest “SVN Kit 1.x.y” and press “Finish”, and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
&lt;br /&gt;
== Install Latest Simantics Target Platform ==&lt;br /&gt;
&lt;br /&gt;
# In Eclipse platform, activate the &#039;&#039;Plug-in Development&#039;&#039; perspective, either from the tab on the upper right corner of the Eclipse platform or from the “Window / Open Perspective / Other...” menu, and select &#039;&#039;Plug-in Development&#039;&#039;.&lt;br /&gt;
# Create a new general project in Eclipse by:&lt;br /&gt;
#* Selecting “File / New / Project...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select a wizard&amp;quot;, select “General / Project” and press “Next”.&lt;br /&gt;
#* Give the project a name, e.g. &amp;quot;Simantics_target&amp;quot; and press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Copy one of the following files into your system to some temporary location:&lt;br /&gt;
#* [http://www.simantics.org/download/latest/simantics.target http://www.simantics.org/download/latest/simantics.target] (for application development on Simantics platform)&lt;br /&gt;
#: The Simantics platform source code is available for [https://www.simantics.org/simantics/about-simantics/thth-simantics THTH/Simantics Division] registered members through these alternative target definitions (user name and password are asked during the installation, these are available at the [https://www.simantics.org/members/index.php/Main_Page THTH/Simantics Member Wiki]):&lt;br /&gt;
#* [http://www.simantics.org/download/latest/simantics-sdk.target http://www.simantics.org/download/latest/simantics-sdk.target] (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
# In Eclipse &#039;&#039;Package Explorer&#039;&#039; (the view on left side of the Eclipse platform):&lt;br /&gt;
#* Right-click your previously created project and select &amp;quot;Import...&amp;quot; from the context menu.&lt;br /&gt;
#* In &#039;&#039;Select wizard&#039;&#039;, select “General / File System”, and press &amp;quot;Next&amp;quot;.&lt;br /&gt;
#* Select in the “From directory” the folder where the previously downloaded file(s) are located, and select the downloaded file(s) in the file list below. Press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Set the target platform for the development with Simantics:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* The new target definitions should be available in the list. Activate one of the following:&lt;br /&gt;
#** “Simantics x.y” (for application development on Simantics platform)&lt;br /&gt;
#** “Simantics SDK x.y” (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
#: and confirm the target platform definition by pressing &amp;quot;Apply&amp;quot; and/or &amp;quot;OK&amp;quot;. If you defined a &#039;&#039;Simantics SDK x.y&#039;&#039; target, you are asked for the username and the password.&lt;br /&gt;
#* Wait until Eclipse finishes downloading, this may take a while. After the download is completed, there should be several plug-ins starting with &amp;quot;org.simantics.*&amp;quot; in the Eclipse &#039;&#039;Plug-ins&#039;&#039; view (the view on the left side of Eclipse).&lt;br /&gt;
# &#039;&#039;&#039;Keep your platform up-to-date!&#039;&#039;&#039; Updating is as easy as reloading the target platform from &#039;&#039;Target Platform&#039;&#039; preference page:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* Select the active target platform, e.g. &#039;&#039;Simantics SDK x.y&#039;&#039;, from the list and press &amp;quot;Reload&amp;quot;.&lt;br /&gt;
#* Wait until the platform is updated.&lt;br /&gt;
&lt;br /&gt;
== Test Your Installation ==&lt;br /&gt;
&lt;br /&gt;
Test your installation with the [http://dev.simantics.org/index.php/Tutorial:_Ontology_Development Simantics movie tutorial]:&lt;br /&gt;
&lt;br /&gt;
# Download &#039;&#039;Simantics movie tutorial&#039;&#039; plug-ins into your Eclipse workspace:&lt;br /&gt;
#* Get [https://www.simantics.org/jenkins/job/Tutorials/job/package-movie-tutorial-head/lastSuccessfulBuild/artifact/movie-tutorial.zip]&lt;br /&gt;
#* In Eclipse platform, select  “File / Import...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select&amp;quot; dialog, select “General / Existing Projects into Workspace” and press “Next”.&lt;br /&gt;
#* Select the “Select archive file:” radio button and press “Browse” to find the downloaded movie-tutorial.zip.&lt;br /&gt;
#* Press “Select All” and “Finish”.&lt;br /&gt;
# Run movie.product:&lt;br /&gt;
#* From the &#039;&#039;Package Explorer&#039;&#039; view, open “org.simantics.movie.ui&#039;&#039; / Movie.product”.&lt;br /&gt;
#* From the &#039;&#039;Overview&#039;&#039; page of the opened product editor, press “Launch an Eclipse application”. &lt;br /&gt;
&lt;br /&gt;
If you managed to start the &#039;&#039;movie&#039;&#039; product, your development platform should be operational.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Happy developing with Simantics!&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Development_Environment_Setup_Guide&amp;diff=3340</id>
		<title>Development Environment Setup Guide</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Development_Environment_Setup_Guide&amp;diff=3340"/>
		<updated>2017-06-05T05:17:10Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Install Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install Prerequisites ==&lt;br /&gt;
=== Register to access source code ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Simantics is an open source software platform, licensed under Eclipse Public License EPL (more information in section [https://www.simantics.org/about/licensing Licensing]). The source code for both semantic database engine Simantics Core and the client Simantics Workbench is available to &#039;&#039;&#039;registered users&#039;&#039;&#039;. To gain access to the complete Simantics SDK source code, go to the [https://www.simantics.org/members/index.php Simantics Members Wiki] and [https://www.simantics.org/members/index.php/Special:RequestAccount request an account].}}&lt;br /&gt;
&lt;br /&gt;
=== JDK ===&lt;br /&gt;
* 64-bit JDK 8.0 (= Java Standard Edition Development Kit) is required. The latest update should always work. Get it [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html here].&lt;br /&gt;
&lt;br /&gt;
=== Eclipse IDE ===&lt;br /&gt;
&lt;br /&gt;
* Get the latest 64-bit Eclipse (currently Neon): http://www.eclipse.org/downloads/&lt;br /&gt;
* In the installer, choose  &#039;&#039;Eclipse for RCP and RAP Developers&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Start Eclipse with a new empty workspace. The program will query you for the workspace location.&lt;br /&gt;
&lt;br /&gt;
[[Image:InstalledJREs.png|right|100px|thumb|Java VM selection preference page]]&lt;br /&gt;
&lt;br /&gt;
* If you have multiple JRE/JDK versions installed, check that your Eclipse is using the the right one from &#039;&#039;Window/Preferences&#039;&#039;: &#039;&#039;Java/Installed JREs&#039;&#039; as shown below. For example in Windows the active JRE and JDK locations should be something like:&lt;br /&gt;
** &#039;&#039;&#039;C:\Program Files\Java\jre8_&amp;amp;lt;update number&amp;amp;gt;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;C:\Program Files\Java\jdk1.8.0_&amp;amp;lt;update number&amp;amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== IMPORTANT: HTTP proxy ===&lt;br /&gt;
If you are on a network where the only way to access the internet via HTTP is through an HTTP proxy you need to make sure that Eclipse also uses this proxy. Corporate networks tend to be like this. If you do not do this, you cannot install anything using Eclipse&#039;s own plug-in installer.&lt;br /&gt;
&lt;br /&gt;
Open the preferences dialog from main menu &#039;&#039;&#039;Window/Preferences&#039;&#039;&#039;. From the tree on the left go to &#039;&#039;&#039;General/Network Connections&#039;&#039;&#039; and modify the settings so that HTTP connections are checked to have a proxy.&lt;br /&gt;
&lt;br /&gt;
=== Simantics Tooling ===&lt;br /&gt;
&lt;br /&gt;
Select menu &#039;&#039;&#039;Help/Install New Software&#039;&#039;&#039; and write http://www.simantics.org/update/utils into the &#039;&#039;Work with&#039;&#039; text field. Install the latest &#039;&#039;Ontology Development/Graph Feature&#039;&#039;. This provides the possibility to create &#039;&#039;Simantics Ontology Projects&#039;&#039;, i.e. allows IDE integrated development of the ontologies (data models) used in the Simantics application you are developing.&lt;br /&gt;
&lt;br /&gt;
See [[org.simantics.graph]] for the component&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
=== Eclipse plug-in for Subversion ===&lt;br /&gt;
&lt;br /&gt;
{{tip|With Simantics 1.4 and future releases this step is optional.}}&lt;br /&gt;
&lt;br /&gt;
Simantics uses Subversion ([http://subversion.apache.org/ SVN]) as a version control system ([http://en.wikipedia.org/wiki/Revision_control VCS]) for storing all of our source code. To access this data from neatly from Eclipse, you need to install some plug-ins into it. To install the plug-in, follow these instructions:&lt;br /&gt;
&lt;br /&gt;
* Install Subversion plug-in: [http://www.eclipse.org/subversive/ Eclipse Subversive]. Update Site is a part of Helios Update Site. From the main menu, open Help &amp;gt; Install New Software...&lt;br /&gt;
*#  [[Image:Install_connectors.png|right|100px|thumb|SVN connector installation dialog]] From the &#039;&#039;Work with&#039;&#039; selector, select Helios - http://download.eclipse.org/releases/helios&lt;br /&gt;
*#* From the &#039;&#039;Collaboration&#039;&#039; folder, select the following items:&lt;br /&gt;
*#** &#039;&#039;&#039;Subversive SVN Team Provider&#039;&#039;&#039;&lt;br /&gt;
*#** &#039;&#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&#039;&lt;br /&gt;
*#* Select Finish and watch the installation proceed&lt;br /&gt;
*#* Click &#039;&#039;Restart Now&#039;&#039; after the installation completes&lt;br /&gt;
*# After restarting, open the &#039;&#039;&#039;SVN Repository Exploring&#039;&#039;&#039; perspective and Eclipse should open a dialog called &#039;&#039;&#039;Install Connectors&#039;&#039;&#039;. Select &#039;&#039;&#039;SVN Kit 1.3.x&#039;&#039;&#039; and press finish.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span style=&amp;quot;font-size:x-small&amp;quot;&amp;gt;NOTE: if this installation process fails, this means that Eclipse is offering broken/incompatible packages at the moment. In this case you probably need to install the latest &#039;&#039;early access&#039;&#039; versions using http://www.eclipse.org/subversive/downloads.php#early_access&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span style=&amp;quot;font-size:x-small&amp;quot;&amp;gt;Be warned that there has been a bug in Subversive which causes it to use the HTTP proxy for HTTPS addresses too. In order to get your SVN connection to www.simantics.org working, you may need to use direct connection proxy settings after installing the SVN plug-ins.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup IDE ==&lt;br /&gt;
&lt;br /&gt;
* Import Simantics  Java formatting rules into your Eclipse: [[Media:Simantics-Java-Formatting.xml | save this XML file]]&lt;br /&gt;
** In Eclipse: &#039;&#039;Window/Preferences&#039;&#039; and the &#039;&#039;Java/Code Style/Formatter&#039;&#039; folder, select &#039;&#039;Import...&#039;&#039; and find the XML file you just downloaded.&lt;br /&gt;
* From the same preferences dialog also make sure that JDK 6.0 (or JRE 1.6) compliance is enabled:&lt;br /&gt;
*: [[Image:java_compiler_preferences.png|400px]]&lt;br /&gt;
* Optionally enable Save Actions: &#039;&#039;Java/Editor/Save Actions&#039;&#039;:&lt;br /&gt;
** enable &#039;&#039;Organize imports&#039;&#039;&lt;br /&gt;
** enable &#039;&#039;Additional actions&#039;&#039;&lt;br /&gt;
** enable &#039;&#039;Format source code&#039;&#039; (not always recommendable)&lt;br /&gt;
** &#039;&#039;Configure&#039;&#039;: &#039;&#039;Code Organizing&#039;&#039;: Enable &#039;&#039;Remove trailing whitespace&#039;&#039; and &#039;&#039;Correct indentation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download Simantics ==&lt;br /&gt;
&lt;br /&gt;
=== Simantics 1.4+ Instructions ===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions on the [[Target Platform#Simantics 1.4|Target Platform page]] to set the Simantics 1.4 target platform up for your workspace.&lt;br /&gt;
&lt;br /&gt;
=== Pre-Simantics 1.4 Instructions ===&lt;br /&gt;
&lt;br /&gt;
==== Install Simantics target platform ====&lt;br /&gt;
The target platform is a set of Simantics and Eclipse features and plug-ins that constitute the components you can build your Simantics/Eclipse-based software out of. These are needed as base to get working on your own contributions on top of the Simantics platform.&lt;br /&gt;
&lt;br /&gt;
To get the platform one must perform a [http://svnbook.red-bean.com/en/1.5/svn.tour.initial.html&#039;&#039;checkout&#039;&#039;] from the SVN repository. You can use Eclipse&#039;s &#039;&#039;&#039;SVN Repository Exploring perspective&#039;&#039;&#039; for this task. You can also use other tools,  such as [http://tortoisesvn.net TortoiseSVN] or the [http://subversion.tigris.org/getting.html#binary-packages SVN command line client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
{{questionanswer|&#039;&#039;&#039;How do I &#039;&#039;check out&#039;&#039; from SVN in Eclipse in general?&#039;&#039;&#039;|&lt;br /&gt;
[[Image:new_repository_location.png|right|100px]]&lt;br /&gt;
* Switch to the &#039;&#039;&#039;SVN Repository Exploring&#039;&#039;&#039; perspective.&lt;br /&gt;
* In the &#039;&#039;SVN Repositories&#039;&#039; view, from the context menu, select &#039;&#039;New &amp;amp;rarr; Repository Location&#039;&#039;.&lt;br /&gt;
* Enter the SVN repository location in the URL field and enter your repository credentials in the authentication fields.&lt;br /&gt;
* Browse the added repository tree, select the directory/project you want to access and edit, and select &#039;&#039;&#039;Check out&#039;&#039;&#039; from the context menu.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Checkout the target platform&#039;&#039;&#039; for your version into a directory of your choice. See [[Target Platform]] for available versions. &lt;br /&gt;
#* Updating your target platform is now a matter of updating your target platform working copy.&lt;br /&gt;
#* Upgrading to newer versions of the target platform requires switching to/checking out another branch of the target platform.&lt;br /&gt;
# &#039;&#039;&#039;Import the target platform into your eclipse IDE&#039;&#039;&#039;:&lt;br /&gt;
#* If you checked out the target platform using another tool besides Eclipse, first import the target platform into your workspace:&lt;br /&gt;
#** &#039;&#039;File/Import&#039;&#039;: &#039;&#039;General/Existing Project into Workspace&#039;&#039;: Select target platform location as &#039;&#039;root directory&#039;&#039;. &#039;&#039;&#039;Deselect&#039;&#039;&#039; &#039;&#039;Copy projects into workspace&#039;&#039; if selected. Press &#039;&#039;Finish&#039;&#039;.&lt;br /&gt;
#* Select menu item &#039;&#039;Window/Preferences&#039;&#039; from your Eclipse IDE.&lt;br /&gt;
#* Open the preference page Plug-in Development/Target Platform.&lt;br /&gt;
#* Activate your target platform definition by checking it and press OK.&lt;br /&gt;
&lt;br /&gt;
==== Download Simantics Components ====&lt;br /&gt;
&lt;br /&gt;
===== Add Simantics repositories =====&lt;br /&gt;
* Switch to &#039;&#039;SVN Repository Exploring&#039;&#039; perspective in Eclipse.&lt;br /&gt;
* Add the main Simantics repository location in the SVN Repository view:&lt;br /&gt;
** General tab:&lt;br /&gt;
*** URL = https://www.simantics.org/svn/simantics/&lt;br /&gt;
*** Authentication =&lt;br /&gt;
**** &#039;&#039;&#039;Committers:&#039;&#039;&#039; your username and password&lt;br /&gt;
&lt;br /&gt;
===== Checkout Simantics sources =====&lt;br /&gt;
* Checkout the proper project sets into your workspace. Eclipse will check it out as &#039;&#039;ProjectSets&#039;&#039;:&lt;br /&gt;
** &#039;&#039;&#039;Simantics development version&#039;&#039;&#039;: &#039;&#039;project-set/trunk&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Switch to &#039;&#039;Java perspective&#039;&#039;.&lt;br /&gt;
* To speed up the download, disable automatic building from menu toggle &#039;&#039;Project/Build Automatically&#039;&#039;.&lt;br /&gt;
* From the &#039;&#039;Package Explorer&#039;&#039; view, pick &#039;&#039;&#039;simantics.psf&#039;&#039;&#039; file from the ProjectSets folder and select &#039;&#039;Import Project Set&#039;&#039; from the popup menu.&lt;br /&gt;
* Re-enable automatic building&lt;br /&gt;
* &#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: If checked out code does not compile/work, consult the [[Plugins|maintainers of the non-working module]].&lt;br /&gt;
&lt;br /&gt;
===== Troubleshooting =====&lt;br /&gt;
&lt;br /&gt;
* If the project set import fails or does not do anything, please update your SVN plug-ins to the latest versions available.&lt;br /&gt;
&lt;br /&gt;
=== Start Development ===&lt;br /&gt;
&lt;br /&gt;
To get started on development, continue to &#039;&#039;&#039;[[Tutorial: Ontology Development]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Basic IDE Usage ==&lt;br /&gt;
=== Running Products from the IDE ===&lt;br /&gt;
&lt;br /&gt;
* Create a &#039;&#039;&#039;Product Configuration&#039;&#039;&#039; (.product) for your own product.&lt;br /&gt;
** You can use &#039;&#039;&#039;[https://www.simulationsite.net/trac/simantics/browser/sysdyn/trunk/org.simantics.sysdyn.ui/sysdyn.product sysdyn.product]&#039;&#039;&#039; as a starting point for your own product configuration. To get &#039;&#039;&#039;sysdyn.product&#039;&#039;&#039;, import the &#039;&#039;&#039;sysdyn.psf&#039;&#039;&#039; project-set.&lt;br /&gt;
** Be sure to only include the components that you want to have in your product, nothing more.&lt;br /&gt;
&lt;br /&gt;
: [[Image:SimanticsWorkbenchProduct.png|500px]]&lt;br /&gt;
* Launch the product from the links under the &#039;&#039;Testing&#039;&#039; section&lt;br /&gt;
&lt;br /&gt;
* When launching the Simantics Workbench application from the IDE, i.e. in development mode, the application will make sure that your application workspace will contain a Simantics database that contains the transferable graphs contained by the ontology project bundles that are included in your product&#039;s plug-in configuration.&lt;br /&gt;
** Be warned that the application can&#039;t handle all cases of modified database contents. This means that sometimes the easiest way to get your application running is clearing your application&#039;s workspace and starting with a fresh database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; IMPORTANT DEVELOPER NOTICE&lt;br /&gt;
&lt;br /&gt;
Remember to always launch your application using the .product configuration editor as described above when you want to make sure that your IDE&#039;s application launcher configuration is up-to-date. The launcher configurations contain the set of plug-ins that are installed into the launched application which means which is not updated when the application is launched through the menu or (Ctrl+)F11.&lt;br /&gt;
&lt;br /&gt;
The launcher configurations will most likely require updating when you&lt;br /&gt;
# take new plug-ins into use (add them to features included by the product)&lt;br /&gt;
# remove plug-ins from use&lt;br /&gt;
# plug-ins are moved from the workspace to the target platform or vice versa&lt;br /&gt;
# the target platform is updated&lt;br /&gt;
&lt;br /&gt;
=== Testing your own contributions with Simantics ===&lt;br /&gt;
&lt;br /&gt;
; Scenario - Testing a set of new plug-ins&lt;br /&gt;
&lt;br /&gt;
Prerequisites:&lt;br /&gt;
# Some of the added plug-ins may contain ontologies.&lt;br /&gt;
# You&#039;ve created your own set of plug-ins based on the Simantics SDK.&lt;br /&gt;
# You&#039;ve defined &#039;&#039;features&#039;&#039; that include your plug-ins.&lt;br /&gt;
# You&#039;ve followed the instructions at [[#Building]]&lt;br /&gt;
&lt;br /&gt;
Steps to follow:&lt;br /&gt;
# If you have not already created a product definition for yourself:&lt;br /&gt;
## Optionally create a new plug-in project with the name &#039;&#039;product&#039;&#039; in it&lt;br /&gt;
## Add a new &#039;&#039;Product Configuration&#039;&#039; to an existing or a new plug-in with basic settings&lt;br /&gt;
## Open the new .product file with &#039;&#039;Product Configuration Editor&#039;&#039;&lt;br /&gt;
## From the &#039;&#039;Overview&#039;&#039; tab, &#039;&#039;Product Definition&#039;&#039; section, select &#039;&#039;&#039;org.simantics.workbench.application&#039;&#039;&#039; as the application and create a new product extension with the &#039;&#039;New&#039;&#039; button beside the product selector. Also mark the product definition &#039;&#039;feature based&#039;&#039;.&lt;br /&gt;
# Configure the product to your liking, i.e. add the features you need to it&lt;br /&gt;
# Launch your product from the product configuration editor &#039;&#039;Overview&#039;&#039; tab&lt;br /&gt;
&lt;br /&gt;
=== Product Deployment ===&lt;br /&gt;
&lt;br /&gt;
Deploying a product in this context means taking a certain set of features and plug-ins and packaging into an installable and executable application.&lt;br /&gt;
&lt;br /&gt;
; Things to ensure before deploying your product:&lt;br /&gt;
# &#039;&#039;&#039;Ensure correctness of your build.properties files&#039;&#039;&#039;&lt;br /&gt;
#* For each of your own bundles (plug-ins and features), check that their &#039;&#039;build.properties&#039;&#039; files contain all the necessary files within each bundle. For example &#039;&#039;&#039;adapters.xml&#039;&#039;&#039; is often forgotten from the build since there is currently no automation that  would add it to the build.&lt;br /&gt;
# &#039;&#039;&#039;Ensure validity of .product definition:&#039;&#039;&#039;&lt;br /&gt;
#* Open your .product file in the Eclipse IDE (use Ctrl-Shift-R for searching)&lt;br /&gt;
#* On the &#039;&#039;Launching&#039;&#039; page:&lt;br /&gt;
#** Set &#039;&#039;&#039;Launcher Name&#039;&#039;&#039; to set the name of your product executable.&lt;br /&gt;
#** Under &#039;&#039;&#039;Program Arguments:&#039;&#039;&#039;, add -fixerrors. This ensures that your product will initialize all new workspaces with a database instead of assuming that a database must already pre-exist.&lt;br /&gt;
#** Under &#039;&#039;&#039;VM Arguments:&#039;&#039;&#039; add at least &#039;&#039;&#039;-ea&#039;&#039;&#039; to enable VM assertions.&lt;br /&gt;
&lt;br /&gt;
; Deploying Executable Product&lt;br /&gt;
* Open .product file in the Eclipse IDE (use Ctrl-Shift-R for searching)&lt;br /&gt;
* On the &#039;&#039;Overview&#039;&#039; page of the product editor, select &#039;&#039;Eclipse Product export wizard&#039;&#039; from under &#039;&#039;&#039;Exporting&#039;&#039;&#039;&lt;br /&gt;
* Fill in any missing details in the dialog and select Finish.&lt;br /&gt;
** To create a directly executable product, you need to deselect &#039;&#039;&#039;Generate metadata repository&#039;&#039;&#039;.&lt;br /&gt;
** To create a product deployable with [http://wiki.eclipse.org/Equinox/p2/Director_application P2 director] (and in the future [[SPM]]), you need to select &#039;&#039;&#039;Generate metadata repository&#039;&#039;&#039;. This will generate an [http://wiki.eclipse.org/Equinox/p2 Eclipse P2] repository.&lt;br /&gt;
&lt;br /&gt;
[[Category: Miscellaneous Documents]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Development_Environment_Setup_Guide&amp;diff=3339</id>
		<title>Development Environment Setup Guide</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Development_Environment_Setup_Guide&amp;diff=3339"/>
		<updated>2017-06-05T05:15:53Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Install Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install Prerequisites ==&lt;br /&gt;
=== Register to access source code ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Simantics is an open source software platform, licensed under Eclipse Public License EPL (more information in section [https://www.simantics.org/about/licensing Licensing]). The source code for both semantic database engine Simantics Core and the client Simantics Workbench is available to &#039;&#039;&#039;registered users&#039;&#039;&#039;. To gain access to the complete Simantics SDK source code, go to the [https://www.simantics.org/members/index.php Simantics Members Wiki] and [https://www.simantics.org/members/index.php/Special:RequestAccount request an account].}}&lt;br /&gt;
&lt;br /&gt;
=== JDK ===&lt;br /&gt;
* 64-bit JDK 8.0 (= Java Standard Edition Development Kit) is required. The latest update should always work. Get it [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html here].&lt;br /&gt;
&lt;br /&gt;
=== Eclipse IDE ===&lt;br /&gt;
&lt;br /&gt;
* Get the latest 64-bit Eclipse (currently Neon): http://www.eclipse.org/downloads/&lt;br /&gt;
* In the installer, choose  &#039;&#039;Eclipse for RCP and RAP Developers&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Start Eclipse with a new empty workspace by launching the executable within the package. The program will query you for the workspace location.&lt;br /&gt;
&lt;br /&gt;
[[Image:InstalledJREs.png|right|100px|thumb|Java VM selection preference page]]&lt;br /&gt;
&lt;br /&gt;
* If you have multiple JRE/JDK versions installed, check that your Eclipse is using the the right one from &#039;&#039;Window/Preferences&#039;&#039;: &#039;&#039;Java/Installed JREs&#039;&#039; as shown below. For example in Windows the active JRE and JDK locations should be something like:&lt;br /&gt;
** &#039;&#039;&#039;C:\Program Files\Java\jre8_&amp;amp;lt;update number&amp;amp;gt;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;C:\Program Files\Java\jdk1.8.0_&amp;amp;lt;update number&amp;amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== IMPORTANT: HTTP proxy ===&lt;br /&gt;
If you are on a network where the only way to access the internet via HTTP is through an HTTP proxy you need to make sure that Eclipse also uses this proxy. Corporate networks tend to be like this. If you do not do this, you cannot install anything using Eclipse&#039;s own plug-in installer.&lt;br /&gt;
&lt;br /&gt;
Open the preferences dialog from main menu &#039;&#039;&#039;Window/Preferences&#039;&#039;&#039;. From the tree on the left go to &#039;&#039;&#039;General/Network Connections&#039;&#039;&#039; and modify the settings so that HTTP connections are checked to have a proxy.&lt;br /&gt;
&lt;br /&gt;
=== Simantics Tooling ===&lt;br /&gt;
&lt;br /&gt;
Select menu &#039;&#039;&#039;Help/Install New Software&#039;&#039;&#039; and write http://www.simantics.org/update/utils into the &#039;&#039;Work with&#039;&#039; text field. Install the latest &#039;&#039;Ontology Development/Graph Feature&#039;&#039;. This provides the possibility to create &#039;&#039;Simantics Ontology Projects&#039;&#039;, i.e. allows IDE integrated development of the ontologies (data models) used in the Simantics application you are developing.&lt;br /&gt;
&lt;br /&gt;
See [[org.simantics.graph]] for the component&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
=== Eclipse plug-in for Subversion ===&lt;br /&gt;
&lt;br /&gt;
{{tip|With Simantics 1.4 and future releases this step is optional.}}&lt;br /&gt;
&lt;br /&gt;
Simantics uses Subversion ([http://subversion.apache.org/ SVN]) as a version control system ([http://en.wikipedia.org/wiki/Revision_control VCS]) for storing all of our source code. To access this data from neatly from Eclipse, you need to install some plug-ins into it. To install the plug-in, follow these instructions:&lt;br /&gt;
&lt;br /&gt;
* Install Subversion plug-in: [http://www.eclipse.org/subversive/ Eclipse Subversive]. Update Site is a part of Helios Update Site. From the main menu, open Help &amp;gt; Install New Software...&lt;br /&gt;
*#  [[Image:Install_connectors.png|right|100px|thumb|SVN connector installation dialog]] From the &#039;&#039;Work with&#039;&#039; selector, select Helios - http://download.eclipse.org/releases/helios&lt;br /&gt;
*#* From the &#039;&#039;Collaboration&#039;&#039; folder, select the following items:&lt;br /&gt;
*#** &#039;&#039;&#039;Subversive SVN Team Provider&#039;&#039;&#039;&lt;br /&gt;
*#** &#039;&#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&#039;&lt;br /&gt;
*#* Select Finish and watch the installation proceed&lt;br /&gt;
*#* Click &#039;&#039;Restart Now&#039;&#039; after the installation completes&lt;br /&gt;
*# After restarting, open the &#039;&#039;&#039;SVN Repository Exploring&#039;&#039;&#039; perspective and Eclipse should open a dialog called &#039;&#039;&#039;Install Connectors&#039;&#039;&#039;. Select &#039;&#039;&#039;SVN Kit 1.3.x&#039;&#039;&#039; and press finish.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span style=&amp;quot;font-size:x-small&amp;quot;&amp;gt;NOTE: if this installation process fails, this means that Eclipse is offering broken/incompatible packages at the moment. In this case you probably need to install the latest &#039;&#039;early access&#039;&#039; versions using http://www.eclipse.org/subversive/downloads.php#early_access&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span style=&amp;quot;font-size:x-small&amp;quot;&amp;gt;Be warned that there has been a bug in Subversive which causes it to use the HTTP proxy for HTTPS addresses too. In order to get your SVN connection to www.simantics.org working, you may need to use direct connection proxy settings after installing the SVN plug-ins.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup IDE ==&lt;br /&gt;
&lt;br /&gt;
* Import Simantics  Java formatting rules into your Eclipse: [[Media:Simantics-Java-Formatting.xml | save this XML file]]&lt;br /&gt;
** In Eclipse: &#039;&#039;Window/Preferences&#039;&#039; and the &#039;&#039;Java/Code Style/Formatter&#039;&#039; folder, select &#039;&#039;Import...&#039;&#039; and find the XML file you just downloaded.&lt;br /&gt;
* From the same preferences dialog also make sure that JDK 6.0 (or JRE 1.6) compliance is enabled:&lt;br /&gt;
*: [[Image:java_compiler_preferences.png|400px]]&lt;br /&gt;
* Optionally enable Save Actions: &#039;&#039;Java/Editor/Save Actions&#039;&#039;:&lt;br /&gt;
** enable &#039;&#039;Organize imports&#039;&#039;&lt;br /&gt;
** enable &#039;&#039;Additional actions&#039;&#039;&lt;br /&gt;
** enable &#039;&#039;Format source code&#039;&#039; (not always recommendable)&lt;br /&gt;
** &#039;&#039;Configure&#039;&#039;: &#039;&#039;Code Organizing&#039;&#039;: Enable &#039;&#039;Remove trailing whitespace&#039;&#039; and &#039;&#039;Correct indentation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download Simantics ==&lt;br /&gt;
&lt;br /&gt;
=== Simantics 1.4+ Instructions ===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions on the [[Target Platform#Simantics 1.4|Target Platform page]] to set the Simantics 1.4 target platform up for your workspace.&lt;br /&gt;
&lt;br /&gt;
=== Pre-Simantics 1.4 Instructions ===&lt;br /&gt;
&lt;br /&gt;
==== Install Simantics target platform ====&lt;br /&gt;
The target platform is a set of Simantics and Eclipse features and plug-ins that constitute the components you can build your Simantics/Eclipse-based software out of. These are needed as base to get working on your own contributions on top of the Simantics platform.&lt;br /&gt;
&lt;br /&gt;
To get the platform one must perform a [http://svnbook.red-bean.com/en/1.5/svn.tour.initial.html&#039;&#039;checkout&#039;&#039;] from the SVN repository. You can use Eclipse&#039;s &#039;&#039;&#039;SVN Repository Exploring perspective&#039;&#039;&#039; for this task. You can also use other tools,  such as [http://tortoisesvn.net TortoiseSVN] or the [http://subversion.tigris.org/getting.html#binary-packages SVN command line client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
{{questionanswer|&#039;&#039;&#039;How do I &#039;&#039;check out&#039;&#039; from SVN in Eclipse in general?&#039;&#039;&#039;|&lt;br /&gt;
[[Image:new_repository_location.png|right|100px]]&lt;br /&gt;
* Switch to the &#039;&#039;&#039;SVN Repository Exploring&#039;&#039;&#039; perspective.&lt;br /&gt;
* In the &#039;&#039;SVN Repositories&#039;&#039; view, from the context menu, select &#039;&#039;New &amp;amp;rarr; Repository Location&#039;&#039;.&lt;br /&gt;
* Enter the SVN repository location in the URL field and enter your repository credentials in the authentication fields.&lt;br /&gt;
* Browse the added repository tree, select the directory/project you want to access and edit, and select &#039;&#039;&#039;Check out&#039;&#039;&#039; from the context menu.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Checkout the target platform&#039;&#039;&#039; for your version into a directory of your choice. See [[Target Platform]] for available versions. &lt;br /&gt;
#* Updating your target platform is now a matter of updating your target platform working copy.&lt;br /&gt;
#* Upgrading to newer versions of the target platform requires switching to/checking out another branch of the target platform.&lt;br /&gt;
# &#039;&#039;&#039;Import the target platform into your eclipse IDE&#039;&#039;&#039;:&lt;br /&gt;
#* If you checked out the target platform using another tool besides Eclipse, first import the target platform into your workspace:&lt;br /&gt;
#** &#039;&#039;File/Import&#039;&#039;: &#039;&#039;General/Existing Project into Workspace&#039;&#039;: Select target platform location as &#039;&#039;root directory&#039;&#039;. &#039;&#039;&#039;Deselect&#039;&#039;&#039; &#039;&#039;Copy projects into workspace&#039;&#039; if selected. Press &#039;&#039;Finish&#039;&#039;.&lt;br /&gt;
#* Select menu item &#039;&#039;Window/Preferences&#039;&#039; from your Eclipse IDE.&lt;br /&gt;
#* Open the preference page Plug-in Development/Target Platform.&lt;br /&gt;
#* Activate your target platform definition by checking it and press OK.&lt;br /&gt;
&lt;br /&gt;
==== Download Simantics Components ====&lt;br /&gt;
&lt;br /&gt;
===== Add Simantics repositories =====&lt;br /&gt;
* Switch to &#039;&#039;SVN Repository Exploring&#039;&#039; perspective in Eclipse.&lt;br /&gt;
* Add the main Simantics repository location in the SVN Repository view:&lt;br /&gt;
** General tab:&lt;br /&gt;
*** URL = https://www.simantics.org/svn/simantics/&lt;br /&gt;
*** Authentication =&lt;br /&gt;
**** &#039;&#039;&#039;Committers:&#039;&#039;&#039; your username and password&lt;br /&gt;
&lt;br /&gt;
===== Checkout Simantics sources =====&lt;br /&gt;
* Checkout the proper project sets into your workspace. Eclipse will check it out as &#039;&#039;ProjectSets&#039;&#039;:&lt;br /&gt;
** &#039;&#039;&#039;Simantics development version&#039;&#039;&#039;: &#039;&#039;project-set/trunk&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Switch to &#039;&#039;Java perspective&#039;&#039;.&lt;br /&gt;
* To speed up the download, disable automatic building from menu toggle &#039;&#039;Project/Build Automatically&#039;&#039;.&lt;br /&gt;
* From the &#039;&#039;Package Explorer&#039;&#039; view, pick &#039;&#039;&#039;simantics.psf&#039;&#039;&#039; file from the ProjectSets folder and select &#039;&#039;Import Project Set&#039;&#039; from the popup menu.&lt;br /&gt;
* Re-enable automatic building&lt;br /&gt;
* &#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: If checked out code does not compile/work, consult the [[Plugins|maintainers of the non-working module]].&lt;br /&gt;
&lt;br /&gt;
===== Troubleshooting =====&lt;br /&gt;
&lt;br /&gt;
* If the project set import fails or does not do anything, please update your SVN plug-ins to the latest versions available.&lt;br /&gt;
&lt;br /&gt;
=== Start Development ===&lt;br /&gt;
&lt;br /&gt;
To get started on development, continue to &#039;&#039;&#039;[[Tutorial: Ontology Development]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Basic IDE Usage ==&lt;br /&gt;
=== Running Products from the IDE ===&lt;br /&gt;
&lt;br /&gt;
* Create a &#039;&#039;&#039;Product Configuration&#039;&#039;&#039; (.product) for your own product.&lt;br /&gt;
** You can use &#039;&#039;&#039;[https://www.simulationsite.net/trac/simantics/browser/sysdyn/trunk/org.simantics.sysdyn.ui/sysdyn.product sysdyn.product]&#039;&#039;&#039; as a starting point for your own product configuration. To get &#039;&#039;&#039;sysdyn.product&#039;&#039;&#039;, import the &#039;&#039;&#039;sysdyn.psf&#039;&#039;&#039; project-set.&lt;br /&gt;
** Be sure to only include the components that you want to have in your product, nothing more.&lt;br /&gt;
&lt;br /&gt;
: [[Image:SimanticsWorkbenchProduct.png|500px]]&lt;br /&gt;
* Launch the product from the links under the &#039;&#039;Testing&#039;&#039; section&lt;br /&gt;
&lt;br /&gt;
* When launching the Simantics Workbench application from the IDE, i.e. in development mode, the application will make sure that your application workspace will contain a Simantics database that contains the transferable graphs contained by the ontology project bundles that are included in your product&#039;s plug-in configuration.&lt;br /&gt;
** Be warned that the application can&#039;t handle all cases of modified database contents. This means that sometimes the easiest way to get your application running is clearing your application&#039;s workspace and starting with a fresh database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; IMPORTANT DEVELOPER NOTICE&lt;br /&gt;
&lt;br /&gt;
Remember to always launch your application using the .product configuration editor as described above when you want to make sure that your IDE&#039;s application launcher configuration is up-to-date. The launcher configurations contain the set of plug-ins that are installed into the launched application which means which is not updated when the application is launched through the menu or (Ctrl+)F11.&lt;br /&gt;
&lt;br /&gt;
The launcher configurations will most likely require updating when you&lt;br /&gt;
# take new plug-ins into use (add them to features included by the product)&lt;br /&gt;
# remove plug-ins from use&lt;br /&gt;
# plug-ins are moved from the workspace to the target platform or vice versa&lt;br /&gt;
# the target platform is updated&lt;br /&gt;
&lt;br /&gt;
=== Testing your own contributions with Simantics ===&lt;br /&gt;
&lt;br /&gt;
; Scenario - Testing a set of new plug-ins&lt;br /&gt;
&lt;br /&gt;
Prerequisites:&lt;br /&gt;
# Some of the added plug-ins may contain ontologies.&lt;br /&gt;
# You&#039;ve created your own set of plug-ins based on the Simantics SDK.&lt;br /&gt;
# You&#039;ve defined &#039;&#039;features&#039;&#039; that include your plug-ins.&lt;br /&gt;
# You&#039;ve followed the instructions at [[#Building]]&lt;br /&gt;
&lt;br /&gt;
Steps to follow:&lt;br /&gt;
# If you have not already created a product definition for yourself:&lt;br /&gt;
## Optionally create a new plug-in project with the name &#039;&#039;product&#039;&#039; in it&lt;br /&gt;
## Add a new &#039;&#039;Product Configuration&#039;&#039; to an existing or a new plug-in with basic settings&lt;br /&gt;
## Open the new .product file with &#039;&#039;Product Configuration Editor&#039;&#039;&lt;br /&gt;
## From the &#039;&#039;Overview&#039;&#039; tab, &#039;&#039;Product Definition&#039;&#039; section, select &#039;&#039;&#039;org.simantics.workbench.application&#039;&#039;&#039; as the application and create a new product extension with the &#039;&#039;New&#039;&#039; button beside the product selector. Also mark the product definition &#039;&#039;feature based&#039;&#039;.&lt;br /&gt;
# Configure the product to your liking, i.e. add the features you need to it&lt;br /&gt;
# Launch your product from the product configuration editor &#039;&#039;Overview&#039;&#039; tab&lt;br /&gt;
&lt;br /&gt;
=== Product Deployment ===&lt;br /&gt;
&lt;br /&gt;
Deploying a product in this context means taking a certain set of features and plug-ins and packaging into an installable and executable application.&lt;br /&gt;
&lt;br /&gt;
; Things to ensure before deploying your product:&lt;br /&gt;
# &#039;&#039;&#039;Ensure correctness of your build.properties files&#039;&#039;&#039;&lt;br /&gt;
#* For each of your own bundles (plug-ins and features), check that their &#039;&#039;build.properties&#039;&#039; files contain all the necessary files within each bundle. For example &#039;&#039;&#039;adapters.xml&#039;&#039;&#039; is often forgotten from the build since there is currently no automation that  would add it to the build.&lt;br /&gt;
# &#039;&#039;&#039;Ensure validity of .product definition:&#039;&#039;&#039;&lt;br /&gt;
#* Open your .product file in the Eclipse IDE (use Ctrl-Shift-R for searching)&lt;br /&gt;
#* On the &#039;&#039;Launching&#039;&#039; page:&lt;br /&gt;
#** Set &#039;&#039;&#039;Launcher Name&#039;&#039;&#039; to set the name of your product executable.&lt;br /&gt;
#** Under &#039;&#039;&#039;Program Arguments:&#039;&#039;&#039;, add -fixerrors. This ensures that your product will initialize all new workspaces with a database instead of assuming that a database must already pre-exist.&lt;br /&gt;
#** Under &#039;&#039;&#039;VM Arguments:&#039;&#039;&#039; add at least &#039;&#039;&#039;-ea&#039;&#039;&#039; to enable VM assertions.&lt;br /&gt;
&lt;br /&gt;
; Deploying Executable Product&lt;br /&gt;
* Open .product file in the Eclipse IDE (use Ctrl-Shift-R for searching)&lt;br /&gt;
* On the &#039;&#039;Overview&#039;&#039; page of the product editor, select &#039;&#039;Eclipse Product export wizard&#039;&#039; from under &#039;&#039;&#039;Exporting&#039;&#039;&#039;&lt;br /&gt;
* Fill in any missing details in the dialog and select Finish.&lt;br /&gt;
** To create a directly executable product, you need to deselect &#039;&#039;&#039;Generate metadata repository&#039;&#039;&#039;.&lt;br /&gt;
** To create a product deployable with [http://wiki.eclipse.org/Equinox/p2/Director_application P2 director] (and in the future [[SPM]]), you need to select &#039;&#039;&#039;Generate metadata repository&#039;&#039;&#039;. This will generate an [http://wiki.eclipse.org/Equinox/p2 Eclipse P2] repository.&lt;br /&gt;
&lt;br /&gt;
[[Category: Miscellaneous Documents]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=File:InstalledJREs.png&amp;diff=3338</id>
		<title>File:InstalledJREs.png</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=File:InstalledJREs.png&amp;diff=3338"/>
		<updated>2017-06-05T05:09:25Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: Hannu Niemisto uploaded a new version of &amp;amp;quot;File:InstalledJREs.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Development_Environment_Setup_Guide&amp;diff=3337</id>
		<title>Development Environment Setup Guide</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Development_Environment_Setup_Guide&amp;diff=3337"/>
		<updated>2017-06-05T05:04:08Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Install Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install Prerequisites ==&lt;br /&gt;
=== Register to access source code ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Simantics is an open source software platform, licensed under Eclipse Public License EPL (more information in section [https://www.simantics.org/simantics/about-simantics/licensing Licensing]). The source code for both semantic database engine Simantics Core and the client Simantics Workbench is available to &#039;&#039;&#039;registered users&#039;&#039;&#039;. To gain access to the complete Simantics SDK source code, go to the [https://www.simantics.org/members/index.php Simantics Members Wiki] and [https://www.simantics.org/members/index.php/Special:RequestAccount request an account].}}&lt;br /&gt;
&lt;br /&gt;
=== JDK ===&lt;br /&gt;
* 64-bit JDK 8.0 (= Java Standard Edition Development Kit) is required. The latest update should always work. Get it [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html here].&lt;br /&gt;
&lt;br /&gt;
=== Eclipse IDE ===&lt;br /&gt;
&lt;br /&gt;
* Get the latest 64-bit Eclipse (currently Neon): http://www.eclipse.org/downloads/&lt;br /&gt;
* In the installer, choose  &#039;&#039;Eclipse for RCP and RAP Developers&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Start Eclipse with a new empty workspace by launching the executable within the package. The program will query you for the workspace location.&lt;br /&gt;
&lt;br /&gt;
[[Image:InstalledJREs.png|right|100px|thumb|Java VM selection preference page]]&lt;br /&gt;
&lt;br /&gt;
* If you have multiple JRE/JDK versions installed, check that your Eclipse is using the the right one from &#039;&#039;Window/Preferences&#039;&#039;: &#039;&#039;Java/Installed JREs&#039;&#039; as shown below. For example in Windows the active JRE and JDK locations should be something like:&lt;br /&gt;
** &#039;&#039;&#039;C:\Program Files\Java\jre8_&amp;amp;lt;update number&amp;amp;gt;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;C:\Program Files\Java\jdk1.8.0_&amp;amp;lt;update number&amp;amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== IMPORTANT: HTTP proxy ===&lt;br /&gt;
If you are on a network where the only way to access the internet via HTTP is through an HTTP proxy you need to make sure that Eclipse also uses this proxy. Corporate networks tend to be like this. If you do not do this, you cannot install anything using Eclipse&#039;s own plug-in installer.&lt;br /&gt;
&lt;br /&gt;
Open the preferences dialog from main menu &#039;&#039;&#039;Window/Preferences&#039;&#039;&#039;. From the tree on the left go to &#039;&#039;&#039;General/Network Connections&#039;&#039;&#039; and modify the settings so that HTTP connections are checked to have a proxy.&lt;br /&gt;
&lt;br /&gt;
=== Simantics Tooling ===&lt;br /&gt;
&lt;br /&gt;
Select menu &#039;&#039;&#039;Help/Install New Software&#039;&#039;&#039; and write http://www.simantics.org/update/utils into the &#039;&#039;Work with&#039;&#039; text field. Install the latest &#039;&#039;Ontology Development/Graph Feature&#039;&#039;. This provides the possibility to create &#039;&#039;Simantics Ontology Projects&#039;&#039;, i.e. allows IDE integrated development of the ontologies (data models) used in the Simantics application you are developing.&lt;br /&gt;
&lt;br /&gt;
See [[org.simantics.graph]] for the component&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
=== Eclipse plug-in for Subversion ===&lt;br /&gt;
&lt;br /&gt;
{{tip|With Simantics 1.4 and future releases this step is optional.}}&lt;br /&gt;
&lt;br /&gt;
Simantics uses Subversion ([http://subversion.apache.org/ SVN]) as a version control system ([http://en.wikipedia.org/wiki/Revision_control VCS]) for storing all of our source code. To access this data from neatly from Eclipse, you need to install some plug-ins into it. To install the plug-in, follow these instructions:&lt;br /&gt;
&lt;br /&gt;
* Install Subversion plug-in: [http://www.eclipse.org/subversive/ Eclipse Subversive]. Update Site is a part of Helios Update Site. From the main menu, open Help &amp;gt; Install New Software...&lt;br /&gt;
*#  [[Image:Install_connectors.png|right|100px|thumb|SVN connector installation dialog]] From the &#039;&#039;Work with&#039;&#039; selector, select Helios - http://download.eclipse.org/releases/helios&lt;br /&gt;
*#* From the &#039;&#039;Collaboration&#039;&#039; folder, select the following items:&lt;br /&gt;
*#** &#039;&#039;&#039;Subversive SVN Team Provider&#039;&#039;&#039;&lt;br /&gt;
*#** &#039;&#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&#039;&lt;br /&gt;
*#* Select Finish and watch the installation proceed&lt;br /&gt;
*#* Click &#039;&#039;Restart Now&#039;&#039; after the installation completes&lt;br /&gt;
*# After restarting, open the &#039;&#039;&#039;SVN Repository Exploring&#039;&#039;&#039; perspective and Eclipse should open a dialog called &#039;&#039;&#039;Install Connectors&#039;&#039;&#039;. Select &#039;&#039;&#039;SVN Kit 1.3.x&#039;&#039;&#039; and press finish.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span style=&amp;quot;font-size:x-small&amp;quot;&amp;gt;NOTE: if this installation process fails, this means that Eclipse is offering broken/incompatible packages at the moment. In this case you probably need to install the latest &#039;&#039;early access&#039;&#039; versions using http://www.eclipse.org/subversive/downloads.php#early_access&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span style=&amp;quot;font-size:x-small&amp;quot;&amp;gt;Be warned that there has been a bug in Subversive which causes it to use the HTTP proxy for HTTPS addresses too. In order to get your SVN connection to www.simantics.org working, you may need to use direct connection proxy settings after installing the SVN plug-ins.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup IDE ==&lt;br /&gt;
&lt;br /&gt;
* Import Simantics  Java formatting rules into your Eclipse: [[Media:Simantics-Java-Formatting.xml | save this XML file]]&lt;br /&gt;
** In Eclipse: &#039;&#039;Window/Preferences&#039;&#039; and the &#039;&#039;Java/Code Style/Formatter&#039;&#039; folder, select &#039;&#039;Import...&#039;&#039; and find the XML file you just downloaded.&lt;br /&gt;
* From the same preferences dialog also make sure that JDK 6.0 (or JRE 1.6) compliance is enabled:&lt;br /&gt;
*: [[Image:java_compiler_preferences.png|400px]]&lt;br /&gt;
* Optionally enable Save Actions: &#039;&#039;Java/Editor/Save Actions&#039;&#039;:&lt;br /&gt;
** enable &#039;&#039;Organize imports&#039;&#039;&lt;br /&gt;
** enable &#039;&#039;Additional actions&#039;&#039;&lt;br /&gt;
** enable &#039;&#039;Format source code&#039;&#039; (not always recommendable)&lt;br /&gt;
** &#039;&#039;Configure&#039;&#039;: &#039;&#039;Code Organizing&#039;&#039;: Enable &#039;&#039;Remove trailing whitespace&#039;&#039; and &#039;&#039;Correct indentation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download Simantics ==&lt;br /&gt;
&lt;br /&gt;
=== Simantics 1.4+ Instructions ===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions on the [[Target Platform#Simantics 1.4|Target Platform page]] to set the Simantics 1.4 target platform up for your workspace.&lt;br /&gt;
&lt;br /&gt;
=== Pre-Simantics 1.4 Instructions ===&lt;br /&gt;
&lt;br /&gt;
==== Install Simantics target platform ====&lt;br /&gt;
The target platform is a set of Simantics and Eclipse features and plug-ins that constitute the components you can build your Simantics/Eclipse-based software out of. These are needed as base to get working on your own contributions on top of the Simantics platform.&lt;br /&gt;
&lt;br /&gt;
To get the platform one must perform a [http://svnbook.red-bean.com/en/1.5/svn.tour.initial.html&#039;&#039;checkout&#039;&#039;] from the SVN repository. You can use Eclipse&#039;s &#039;&#039;&#039;SVN Repository Exploring perspective&#039;&#039;&#039; for this task. You can also use other tools,  such as [http://tortoisesvn.net TortoiseSVN] or the [http://subversion.tigris.org/getting.html#binary-packages SVN command line client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
{{questionanswer|&#039;&#039;&#039;How do I &#039;&#039;check out&#039;&#039; from SVN in Eclipse in general?&#039;&#039;&#039;|&lt;br /&gt;
[[Image:new_repository_location.png|right|100px]]&lt;br /&gt;
* Switch to the &#039;&#039;&#039;SVN Repository Exploring&#039;&#039;&#039; perspective.&lt;br /&gt;
* In the &#039;&#039;SVN Repositories&#039;&#039; view, from the context menu, select &#039;&#039;New &amp;amp;rarr; Repository Location&#039;&#039;.&lt;br /&gt;
* Enter the SVN repository location in the URL field and enter your repository credentials in the authentication fields.&lt;br /&gt;
* Browse the added repository tree, select the directory/project you want to access and edit, and select &#039;&#039;&#039;Check out&#039;&#039;&#039; from the context menu.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Checkout the target platform&#039;&#039;&#039; for your version into a directory of your choice. See [[Target Platform]] for available versions. &lt;br /&gt;
#* Updating your target platform is now a matter of updating your target platform working copy.&lt;br /&gt;
#* Upgrading to newer versions of the target platform requires switching to/checking out another branch of the target platform.&lt;br /&gt;
# &#039;&#039;&#039;Import the target platform into your eclipse IDE&#039;&#039;&#039;:&lt;br /&gt;
#* If you checked out the target platform using another tool besides Eclipse, first import the target platform into your workspace:&lt;br /&gt;
#** &#039;&#039;File/Import&#039;&#039;: &#039;&#039;General/Existing Project into Workspace&#039;&#039;: Select target platform location as &#039;&#039;root directory&#039;&#039;. &#039;&#039;&#039;Deselect&#039;&#039;&#039; &#039;&#039;Copy projects into workspace&#039;&#039; if selected. Press &#039;&#039;Finish&#039;&#039;.&lt;br /&gt;
#* Select menu item &#039;&#039;Window/Preferences&#039;&#039; from your Eclipse IDE.&lt;br /&gt;
#* Open the preference page Plug-in Development/Target Platform.&lt;br /&gt;
#* Activate your target platform definition by checking it and press OK.&lt;br /&gt;
&lt;br /&gt;
==== Download Simantics Components ====&lt;br /&gt;
&lt;br /&gt;
===== Add Simantics repositories =====&lt;br /&gt;
* Switch to &#039;&#039;SVN Repository Exploring&#039;&#039; perspective in Eclipse.&lt;br /&gt;
* Add the main Simantics repository location in the SVN Repository view:&lt;br /&gt;
** General tab:&lt;br /&gt;
*** URL = https://www.simantics.org/svn/simantics/&lt;br /&gt;
*** Authentication =&lt;br /&gt;
**** &#039;&#039;&#039;Committers:&#039;&#039;&#039; your username and password&lt;br /&gt;
&lt;br /&gt;
===== Checkout Simantics sources =====&lt;br /&gt;
* Checkout the proper project sets into your workspace. Eclipse will check it out as &#039;&#039;ProjectSets&#039;&#039;:&lt;br /&gt;
** &#039;&#039;&#039;Simantics development version&#039;&#039;&#039;: &#039;&#039;project-set/trunk&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Switch to &#039;&#039;Java perspective&#039;&#039;.&lt;br /&gt;
* To speed up the download, disable automatic building from menu toggle &#039;&#039;Project/Build Automatically&#039;&#039;.&lt;br /&gt;
* From the &#039;&#039;Package Explorer&#039;&#039; view, pick &#039;&#039;&#039;simantics.psf&#039;&#039;&#039; file from the ProjectSets folder and select &#039;&#039;Import Project Set&#039;&#039; from the popup menu.&lt;br /&gt;
* Re-enable automatic building&lt;br /&gt;
* &#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: If checked out code does not compile/work, consult the [[Plugins|maintainers of the non-working module]].&lt;br /&gt;
&lt;br /&gt;
===== Troubleshooting =====&lt;br /&gt;
&lt;br /&gt;
* If the project set import fails or does not do anything, please update your SVN plug-ins to the latest versions available.&lt;br /&gt;
&lt;br /&gt;
=== Start Development ===&lt;br /&gt;
&lt;br /&gt;
To get started on development, continue to &#039;&#039;&#039;[[Tutorial: Ontology Development]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Basic IDE Usage ==&lt;br /&gt;
=== Running Products from the IDE ===&lt;br /&gt;
&lt;br /&gt;
* Create a &#039;&#039;&#039;Product Configuration&#039;&#039;&#039; (.product) for your own product.&lt;br /&gt;
** You can use &#039;&#039;&#039;[https://www.simulationsite.net/trac/simantics/browser/sysdyn/trunk/org.simantics.sysdyn.ui/sysdyn.product sysdyn.product]&#039;&#039;&#039; as a starting point for your own product configuration. To get &#039;&#039;&#039;sysdyn.product&#039;&#039;&#039;, import the &#039;&#039;&#039;sysdyn.psf&#039;&#039;&#039; project-set.&lt;br /&gt;
** Be sure to only include the components that you want to have in your product, nothing more.&lt;br /&gt;
&lt;br /&gt;
: [[Image:SimanticsWorkbenchProduct.png|500px]]&lt;br /&gt;
* Launch the product from the links under the &#039;&#039;Testing&#039;&#039; section&lt;br /&gt;
&lt;br /&gt;
* When launching the Simantics Workbench application from the IDE, i.e. in development mode, the application will make sure that your application workspace will contain a Simantics database that contains the transferable graphs contained by the ontology project bundles that are included in your product&#039;s plug-in configuration.&lt;br /&gt;
** Be warned that the application can&#039;t handle all cases of modified database contents. This means that sometimes the easiest way to get your application running is clearing your application&#039;s workspace and starting with a fresh database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; IMPORTANT DEVELOPER NOTICE&lt;br /&gt;
&lt;br /&gt;
Remember to always launch your application using the .product configuration editor as described above when you want to make sure that your IDE&#039;s application launcher configuration is up-to-date. The launcher configurations contain the set of plug-ins that are installed into the launched application which means which is not updated when the application is launched through the menu or (Ctrl+)F11.&lt;br /&gt;
&lt;br /&gt;
The launcher configurations will most likely require updating when you&lt;br /&gt;
# take new plug-ins into use (add them to features included by the product)&lt;br /&gt;
# remove plug-ins from use&lt;br /&gt;
# plug-ins are moved from the workspace to the target platform or vice versa&lt;br /&gt;
# the target platform is updated&lt;br /&gt;
&lt;br /&gt;
=== Testing your own contributions with Simantics ===&lt;br /&gt;
&lt;br /&gt;
; Scenario - Testing a set of new plug-ins&lt;br /&gt;
&lt;br /&gt;
Prerequisites:&lt;br /&gt;
# Some of the added plug-ins may contain ontologies.&lt;br /&gt;
# You&#039;ve created your own set of plug-ins based on the Simantics SDK.&lt;br /&gt;
# You&#039;ve defined &#039;&#039;features&#039;&#039; that include your plug-ins.&lt;br /&gt;
# You&#039;ve followed the instructions at [[#Building]]&lt;br /&gt;
&lt;br /&gt;
Steps to follow:&lt;br /&gt;
# If you have not already created a product definition for yourself:&lt;br /&gt;
## Optionally create a new plug-in project with the name &#039;&#039;product&#039;&#039; in it&lt;br /&gt;
## Add a new &#039;&#039;Product Configuration&#039;&#039; to an existing or a new plug-in with basic settings&lt;br /&gt;
## Open the new .product file with &#039;&#039;Product Configuration Editor&#039;&#039;&lt;br /&gt;
## From the &#039;&#039;Overview&#039;&#039; tab, &#039;&#039;Product Definition&#039;&#039; section, select &#039;&#039;&#039;org.simantics.workbench.application&#039;&#039;&#039; as the application and create a new product extension with the &#039;&#039;New&#039;&#039; button beside the product selector. Also mark the product definition &#039;&#039;feature based&#039;&#039;.&lt;br /&gt;
# Configure the product to your liking, i.e. add the features you need to it&lt;br /&gt;
# Launch your product from the product configuration editor &#039;&#039;Overview&#039;&#039; tab&lt;br /&gt;
&lt;br /&gt;
=== Product Deployment ===&lt;br /&gt;
&lt;br /&gt;
Deploying a product in this context means taking a certain set of features and plug-ins and packaging into an installable and executable application.&lt;br /&gt;
&lt;br /&gt;
; Things to ensure before deploying your product:&lt;br /&gt;
# &#039;&#039;&#039;Ensure correctness of your build.properties files&#039;&#039;&#039;&lt;br /&gt;
#* For each of your own bundles (plug-ins and features), check that their &#039;&#039;build.properties&#039;&#039; files contain all the necessary files within each bundle. For example &#039;&#039;&#039;adapters.xml&#039;&#039;&#039; is often forgotten from the build since there is currently no automation that  would add it to the build.&lt;br /&gt;
# &#039;&#039;&#039;Ensure validity of .product definition:&#039;&#039;&#039;&lt;br /&gt;
#* Open your .product file in the Eclipse IDE (use Ctrl-Shift-R for searching)&lt;br /&gt;
#* On the &#039;&#039;Launching&#039;&#039; page:&lt;br /&gt;
#** Set &#039;&#039;&#039;Launcher Name&#039;&#039;&#039; to set the name of your product executable.&lt;br /&gt;
#** Under &#039;&#039;&#039;Program Arguments:&#039;&#039;&#039;, add -fixerrors. This ensures that your product will initialize all new workspaces with a database instead of assuming that a database must already pre-exist.&lt;br /&gt;
#** Under &#039;&#039;&#039;VM Arguments:&#039;&#039;&#039; add at least &#039;&#039;&#039;-ea&#039;&#039;&#039; to enable VM assertions.&lt;br /&gt;
&lt;br /&gt;
; Deploying Executable Product&lt;br /&gt;
* Open .product file in the Eclipse IDE (use Ctrl-Shift-R for searching)&lt;br /&gt;
* On the &#039;&#039;Overview&#039;&#039; page of the product editor, select &#039;&#039;Eclipse Product export wizard&#039;&#039; from under &#039;&#039;&#039;Exporting&#039;&#039;&#039;&lt;br /&gt;
* Fill in any missing details in the dialog and select Finish.&lt;br /&gt;
** To create a directly executable product, you need to deselect &#039;&#039;&#039;Generate metadata repository&#039;&#039;&#039;.&lt;br /&gt;
** To create a product deployable with [http://wiki.eclipse.org/Equinox/p2/Director_application P2 director] (and in the future [[SPM]]), you need to select &#039;&#039;&#039;Generate metadata repository&#039;&#039;&#039;. This will generate an [http://wiki.eclipse.org/Equinox/p2 Eclipse P2] repository.&lt;br /&gt;
&lt;br /&gt;
[[Category: Miscellaneous Documents]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Development_Environment_Setup_Guide&amp;diff=3336</id>
		<title>Development Environment Setup Guide</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Development_Environment_Setup_Guide&amp;diff=3336"/>
		<updated>2017-06-05T04:44:29Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install Prerequisites ==&lt;br /&gt;
=== Register to access source code ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Simantics is an open source software platform, licensed under Eclipse Public License EPL (more information in section [https://www.simantics.org/simantics/about-simantics/licensing Licensing]). The source code for both semantic database engine Simantics Core and the client Simantics Workbench is available to &#039;&#039;&#039;registered users&#039;&#039;&#039;. To gain access to the complete Simantics SDK source code, go to the [https://www.simantics.org/members/index.php Simantics Members Wiki] and [https://www.simantics.org/members/index.php/Special:RequestAccount request an account].}}&lt;br /&gt;
&lt;br /&gt;
=== JDK ===&lt;br /&gt;
* 64-bit JDK 8.0 (= Java Standard Edition Development Kit) is required. The latest update should always work. Get it [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html here].&lt;br /&gt;
&lt;br /&gt;
=== Eclipse IDE ===&lt;br /&gt;
&lt;br /&gt;
* Get the latest 64-bit Eclipse (currently Neon): http://www.eclipse.org/downloads/&lt;br /&gt;
* In the installer, choose  &#039;&#039;Eclipse for RCP and RAP Developers&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Start Eclipse with a new empty workspace by launching the executable within the package. The program will query you for the workspace location.&lt;br /&gt;
&lt;br /&gt;
[[Image:InstalledJREs.png|right|100px|thumb|Java VM selection preference page]]&lt;br /&gt;
&lt;br /&gt;
* If you have multiple JRE/JDK versions installed, check that your Eclipse is using the the right one from &#039;&#039;Window/Preferences&#039;&#039;: &#039;&#039;Java/Installed JREs&#039;&#039; as shown below. For example in windows the active JRE and JDK locations should be something like:&lt;br /&gt;
** &#039;&#039;&#039;C:\Program Files\Java\jre6&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;C:\Program Files\Java\jdk1.6.0_&amp;amp;lt;update number&amp;amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== IMPORTANT: HTTP proxy ===&lt;br /&gt;
If you are on a network where the only way to access the internet via HTTP is through an HTTP proxy you need to make sure that Eclipse also uses this proxy. Corporate networks tend to be like this. If you do not do this, you cannot install anything using Eclipse&#039;s own plug-in installer.&lt;br /&gt;
&lt;br /&gt;
Open the preferences dialog from main menu &#039;&#039;&#039;Window/Preferences&#039;&#039;&#039;. From the tree on the left go to &#039;&#039;&#039;General/Network Connections&#039;&#039;&#039; and modify the settings so that HTTP connections are checked to have a proxy.&lt;br /&gt;
&lt;br /&gt;
=== Simantics Tooling ===&lt;br /&gt;
&lt;br /&gt;
Select menu &#039;&#039;&#039;Help/Install New Software&#039;&#039;&#039; and write http://www.simantics.org/update/utils into the &#039;&#039;Work with&#039;&#039; text field. Install the latest &#039;&#039;Ontology Development/Graph Feature&#039;&#039;. This provides the possibility to create &#039;&#039;Simantics Ontology Projects&#039;&#039;, i.e. allows IDE integrated development of the ontologies (data models) used in the Simantics application you are developing.&lt;br /&gt;
&lt;br /&gt;
See [[org.simantics.graph]] for the component&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
=== Eclipse plug-in for Subversion ===&lt;br /&gt;
&lt;br /&gt;
{{tip|With Simantics 1.4 and future releases this step is optional.}}&lt;br /&gt;
&lt;br /&gt;
Simantics uses Subversion ([http://subversion.apache.org/ SVN]) as a version control system ([http://en.wikipedia.org/wiki/Revision_control VCS]) for storing all of our source code. To access this data from neatly from Eclipse, you need to install some plug-ins into it. To install the plug-in, follow these instructions:&lt;br /&gt;
&lt;br /&gt;
* Install Subversion plug-in: [http://www.eclipse.org/subversive/ Eclipse Subversive]. Update Site is a part of Helios Update Site. From the main menu, open Help &amp;gt; Install New Software...&lt;br /&gt;
*#  [[Image:Install_connectors.png|right|100px|thumb|SVN connector installation dialog]] From the &#039;&#039;Work with&#039;&#039; selector, select Helios - http://download.eclipse.org/releases/helios&lt;br /&gt;
*#* From the &#039;&#039;Collaboration&#039;&#039; folder, select the following items:&lt;br /&gt;
*#** &#039;&#039;&#039;Subversive SVN Team Provider&#039;&#039;&#039;&lt;br /&gt;
*#** &#039;&#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&#039;&lt;br /&gt;
*#* Select Finish and watch the installation proceed&lt;br /&gt;
*#* Click &#039;&#039;Restart Now&#039;&#039; after the installation completes&lt;br /&gt;
*# After restarting, open the &#039;&#039;&#039;SVN Repository Exploring&#039;&#039;&#039; perspective and Eclipse should open a dialog called &#039;&#039;&#039;Install Connectors&#039;&#039;&#039;. Select &#039;&#039;&#039;SVN Kit 1.3.x&#039;&#039;&#039; and press finish.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span style=&amp;quot;font-size:x-small&amp;quot;&amp;gt;NOTE: if this installation process fails, this means that Eclipse is offering broken/incompatible packages at the moment. In this case you probably need to install the latest &#039;&#039;early access&#039;&#039; versions using http://www.eclipse.org/subversive/downloads.php#early_access&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span style=&amp;quot;font-size:x-small&amp;quot;&amp;gt;Be warned that there has been a bug in Subversive which causes it to use the HTTP proxy for HTTPS addresses too. In order to get your SVN connection to www.simantics.org working, you may need to use direct connection proxy settings after installing the SVN plug-ins.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup IDE ==&lt;br /&gt;
&lt;br /&gt;
* Import Simantics  Java formatting rules into your Eclipse: [[Media:Simantics-Java-Formatting.xml | save this XML file]]&lt;br /&gt;
** In Eclipse: &#039;&#039;Window/Preferences&#039;&#039; and the &#039;&#039;Java/Code Style/Formatter&#039;&#039; folder, select &#039;&#039;Import...&#039;&#039; and find the XML file you just downloaded.&lt;br /&gt;
* From the same preferences dialog also make sure that JDK 6.0 (or JRE 1.6) compliance is enabled:&lt;br /&gt;
*: [[Image:java_compiler_preferences.png|400px]]&lt;br /&gt;
* Optionally enable Save Actions: &#039;&#039;Java/Editor/Save Actions&#039;&#039;:&lt;br /&gt;
** enable &#039;&#039;Organize imports&#039;&#039;&lt;br /&gt;
** enable &#039;&#039;Additional actions&#039;&#039;&lt;br /&gt;
** enable &#039;&#039;Format source code&#039;&#039; (not always recommendable)&lt;br /&gt;
** &#039;&#039;Configure&#039;&#039;: &#039;&#039;Code Organizing&#039;&#039;: Enable &#039;&#039;Remove trailing whitespace&#039;&#039; and &#039;&#039;Correct indentation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download Simantics ==&lt;br /&gt;
&lt;br /&gt;
=== Simantics 1.4+ Instructions ===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions on the [[Target Platform#Simantics 1.4|Target Platform page]] to set the Simantics 1.4 target platform up for your workspace.&lt;br /&gt;
&lt;br /&gt;
=== Pre-Simantics 1.4 Instructions ===&lt;br /&gt;
&lt;br /&gt;
==== Install Simantics target platform ====&lt;br /&gt;
The target platform is a set of Simantics and Eclipse features and plug-ins that constitute the components you can build your Simantics/Eclipse-based software out of. These are needed as base to get working on your own contributions on top of the Simantics platform.&lt;br /&gt;
&lt;br /&gt;
To get the platform one must perform a [http://svnbook.red-bean.com/en/1.5/svn.tour.initial.html&#039;&#039;checkout&#039;&#039;] from the SVN repository. You can use Eclipse&#039;s &#039;&#039;&#039;SVN Repository Exploring perspective&#039;&#039;&#039; for this task. You can also use other tools,  such as [http://tortoisesvn.net TortoiseSVN] or the [http://subversion.tigris.org/getting.html#binary-packages SVN command line client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
{{questionanswer|&#039;&#039;&#039;How do I &#039;&#039;check out&#039;&#039; from SVN in Eclipse in general?&#039;&#039;&#039;|&lt;br /&gt;
[[Image:new_repository_location.png|right|100px]]&lt;br /&gt;
* Switch to the &#039;&#039;&#039;SVN Repository Exploring&#039;&#039;&#039; perspective.&lt;br /&gt;
* In the &#039;&#039;SVN Repositories&#039;&#039; view, from the context menu, select &#039;&#039;New &amp;amp;rarr; Repository Location&#039;&#039;.&lt;br /&gt;
* Enter the SVN repository location in the URL field and enter your repository credentials in the authentication fields.&lt;br /&gt;
* Browse the added repository tree, select the directory/project you want to access and edit, and select &#039;&#039;&#039;Check out&#039;&#039;&#039; from the context menu.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Checkout the target platform&#039;&#039;&#039; for your version into a directory of your choice. See [[Target Platform]] for available versions. &lt;br /&gt;
#* Updating your target platform is now a matter of updating your target platform working copy.&lt;br /&gt;
#* Upgrading to newer versions of the target platform requires switching to/checking out another branch of the target platform.&lt;br /&gt;
# &#039;&#039;&#039;Import the target platform into your eclipse IDE&#039;&#039;&#039;:&lt;br /&gt;
#* If you checked out the target platform using another tool besides Eclipse, first import the target platform into your workspace:&lt;br /&gt;
#** &#039;&#039;File/Import&#039;&#039;: &#039;&#039;General/Existing Project into Workspace&#039;&#039;: Select target platform location as &#039;&#039;root directory&#039;&#039;. &#039;&#039;&#039;Deselect&#039;&#039;&#039; &#039;&#039;Copy projects into workspace&#039;&#039; if selected. Press &#039;&#039;Finish&#039;&#039;.&lt;br /&gt;
#* Select menu item &#039;&#039;Window/Preferences&#039;&#039; from your Eclipse IDE.&lt;br /&gt;
#* Open the preference page Plug-in Development/Target Platform.&lt;br /&gt;
#* Activate your target platform definition by checking it and press OK.&lt;br /&gt;
&lt;br /&gt;
==== Download Simantics Components ====&lt;br /&gt;
&lt;br /&gt;
===== Add Simantics repositories =====&lt;br /&gt;
* Switch to &#039;&#039;SVN Repository Exploring&#039;&#039; perspective in Eclipse.&lt;br /&gt;
* Add the main Simantics repository location in the SVN Repository view:&lt;br /&gt;
** General tab:&lt;br /&gt;
*** URL = https://www.simantics.org/svn/simantics/&lt;br /&gt;
*** Authentication =&lt;br /&gt;
**** &#039;&#039;&#039;Committers:&#039;&#039;&#039; your username and password&lt;br /&gt;
&lt;br /&gt;
===== Checkout Simantics sources =====&lt;br /&gt;
* Checkout the proper project sets into your workspace. Eclipse will check it out as &#039;&#039;ProjectSets&#039;&#039;:&lt;br /&gt;
** &#039;&#039;&#039;Simantics development version&#039;&#039;&#039;: &#039;&#039;project-set/trunk&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Switch to &#039;&#039;Java perspective&#039;&#039;.&lt;br /&gt;
* To speed up the download, disable automatic building from menu toggle &#039;&#039;Project/Build Automatically&#039;&#039;.&lt;br /&gt;
* From the &#039;&#039;Package Explorer&#039;&#039; view, pick &#039;&#039;&#039;simantics.psf&#039;&#039;&#039; file from the ProjectSets folder and select &#039;&#039;Import Project Set&#039;&#039; from the popup menu.&lt;br /&gt;
* Re-enable automatic building&lt;br /&gt;
* &#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: If checked out code does not compile/work, consult the [[Plugins|maintainers of the non-working module]].&lt;br /&gt;
&lt;br /&gt;
===== Troubleshooting =====&lt;br /&gt;
&lt;br /&gt;
* If the project set import fails or does not do anything, please update your SVN plug-ins to the latest versions available.&lt;br /&gt;
&lt;br /&gt;
=== Start Development ===&lt;br /&gt;
&lt;br /&gt;
To get started on development, continue to &#039;&#039;&#039;[[Tutorial: Ontology Development]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Basic IDE Usage ==&lt;br /&gt;
=== Running Products from the IDE ===&lt;br /&gt;
&lt;br /&gt;
* Create a &#039;&#039;&#039;Product Configuration&#039;&#039;&#039; (.product) for your own product.&lt;br /&gt;
** You can use &#039;&#039;&#039;[https://www.simulationsite.net/trac/simantics/browser/sysdyn/trunk/org.simantics.sysdyn.ui/sysdyn.product sysdyn.product]&#039;&#039;&#039; as a starting point for your own product configuration. To get &#039;&#039;&#039;sysdyn.product&#039;&#039;&#039;, import the &#039;&#039;&#039;sysdyn.psf&#039;&#039;&#039; project-set.&lt;br /&gt;
** Be sure to only include the components that you want to have in your product, nothing more.&lt;br /&gt;
&lt;br /&gt;
: [[Image:SimanticsWorkbenchProduct.png|500px]]&lt;br /&gt;
* Launch the product from the links under the &#039;&#039;Testing&#039;&#039; section&lt;br /&gt;
&lt;br /&gt;
* When launching the Simantics Workbench application from the IDE, i.e. in development mode, the application will make sure that your application workspace will contain a Simantics database that contains the transferable graphs contained by the ontology project bundles that are included in your product&#039;s plug-in configuration.&lt;br /&gt;
** Be warned that the application can&#039;t handle all cases of modified database contents. This means that sometimes the easiest way to get your application running is clearing your application&#039;s workspace and starting with a fresh database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; IMPORTANT DEVELOPER NOTICE&lt;br /&gt;
&lt;br /&gt;
Remember to always launch your application using the .product configuration editor as described above when you want to make sure that your IDE&#039;s application launcher configuration is up-to-date. The launcher configurations contain the set of plug-ins that are installed into the launched application which means which is not updated when the application is launched through the menu or (Ctrl+)F11.&lt;br /&gt;
&lt;br /&gt;
The launcher configurations will most likely require updating when you&lt;br /&gt;
# take new plug-ins into use (add them to features included by the product)&lt;br /&gt;
# remove plug-ins from use&lt;br /&gt;
# plug-ins are moved from the workspace to the target platform or vice versa&lt;br /&gt;
# the target platform is updated&lt;br /&gt;
&lt;br /&gt;
=== Testing your own contributions with Simantics ===&lt;br /&gt;
&lt;br /&gt;
; Scenario - Testing a set of new plug-ins&lt;br /&gt;
&lt;br /&gt;
Prerequisites:&lt;br /&gt;
# Some of the added plug-ins may contain ontologies.&lt;br /&gt;
# You&#039;ve created your own set of plug-ins based on the Simantics SDK.&lt;br /&gt;
# You&#039;ve defined &#039;&#039;features&#039;&#039; that include your plug-ins.&lt;br /&gt;
# You&#039;ve followed the instructions at [[#Building]]&lt;br /&gt;
&lt;br /&gt;
Steps to follow:&lt;br /&gt;
# If you have not already created a product definition for yourself:&lt;br /&gt;
## Optionally create a new plug-in project with the name &#039;&#039;product&#039;&#039; in it&lt;br /&gt;
## Add a new &#039;&#039;Product Configuration&#039;&#039; to an existing or a new plug-in with basic settings&lt;br /&gt;
## Open the new .product file with &#039;&#039;Product Configuration Editor&#039;&#039;&lt;br /&gt;
## From the &#039;&#039;Overview&#039;&#039; tab, &#039;&#039;Product Definition&#039;&#039; section, select &#039;&#039;&#039;org.simantics.workbench.application&#039;&#039;&#039; as the application and create a new product extension with the &#039;&#039;New&#039;&#039; button beside the product selector. Also mark the product definition &#039;&#039;feature based&#039;&#039;.&lt;br /&gt;
# Configure the product to your liking, i.e. add the features you need to it&lt;br /&gt;
# Launch your product from the product configuration editor &#039;&#039;Overview&#039;&#039; tab&lt;br /&gt;
&lt;br /&gt;
=== Product Deployment ===&lt;br /&gt;
&lt;br /&gt;
Deploying a product in this context means taking a certain set of features and plug-ins and packaging into an installable and executable application.&lt;br /&gt;
&lt;br /&gt;
; Things to ensure before deploying your product:&lt;br /&gt;
# &#039;&#039;&#039;Ensure correctness of your build.properties files&#039;&#039;&#039;&lt;br /&gt;
#* For each of your own bundles (plug-ins and features), check that their &#039;&#039;build.properties&#039;&#039; files contain all the necessary files within each bundle. For example &#039;&#039;&#039;adapters.xml&#039;&#039;&#039; is often forgotten from the build since there is currently no automation that  would add it to the build.&lt;br /&gt;
# &#039;&#039;&#039;Ensure validity of .product definition:&#039;&#039;&#039;&lt;br /&gt;
#* Open your .product file in the Eclipse IDE (use Ctrl-Shift-R for searching)&lt;br /&gt;
#* On the &#039;&#039;Launching&#039;&#039; page:&lt;br /&gt;
#** Set &#039;&#039;&#039;Launcher Name&#039;&#039;&#039; to set the name of your product executable.&lt;br /&gt;
#** Under &#039;&#039;&#039;Program Arguments:&#039;&#039;&#039;, add -fixerrors. This ensures that your product will initialize all new workspaces with a database instead of assuming that a database must already pre-exist.&lt;br /&gt;
#** Under &#039;&#039;&#039;VM Arguments:&#039;&#039;&#039; add at least &#039;&#039;&#039;-ea&#039;&#039;&#039; to enable VM assertions.&lt;br /&gt;
&lt;br /&gt;
; Deploying Executable Product&lt;br /&gt;
* Open .product file in the Eclipse IDE (use Ctrl-Shift-R for searching)&lt;br /&gt;
* On the &#039;&#039;Overview&#039;&#039; page of the product editor, select &#039;&#039;Eclipse Product export wizard&#039;&#039; from under &#039;&#039;&#039;Exporting&#039;&#039;&#039;&lt;br /&gt;
* Fill in any missing details in the dialog and select Finish.&lt;br /&gt;
** To create a directly executable product, you need to deselect &#039;&#039;&#039;Generate metadata repository&#039;&#039;&#039;.&lt;br /&gt;
** To create a product deployable with [http://wiki.eclipse.org/Equinox/p2/Director_application P2 director] (and in the future [[SPM]]), you need to select &#039;&#039;&#039;Generate metadata repository&#039;&#039;&#039;. This will generate an [http://wiki.eclipse.org/Equinox/p2 Eclipse P2] repository.&lt;br /&gt;
&lt;br /&gt;
[[Category: Miscellaneous Documents]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Simantics_Developer_Documentation&amp;diff=3325</id>
		<title>Simantics Developer Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Simantics_Developer_Documentation&amp;diff=3325"/>
		<updated>2017-02-20T11:29:57Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Simantics Constraint Language */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
[[image:Simantics_logo_pile_01.png|right|border|400px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Simantics&#039;&#039;&#039; is a software platform for modelling and simulation. The system has client-server architecture with a semantic ontology-based modelling database and Eclipse framework -based client software with plug-in interface. The Simantics platform and many of its components are open source under [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License (EPL)].&lt;br /&gt;
&lt;br /&gt;
The philosophy of the Simantics platform is to offer an open, high level application platform on which different computational tools can be easily integrated to form a common environment for modelling and simulation. The platform includes several modelling tools, so-called editors, for e.g. 2D graph-like hierarchical model composition and semantic graph browsing.&lt;br /&gt;
&lt;br /&gt;
One of the biggest innovations in the Simantics platform is the semantic modelling approach itself and high-level ontology tools. The semantic database, i.e. triplestore, on the server side enables high performance data management and arbitrary mappings of data. This enables e.g. efficient mapping of simulation and measurement data to the model configuration and its visualisation.&lt;br /&gt;
&lt;br /&gt;
The Simantics development and maintenance process is built to be solid and scalable from the very beginning. The objective is to aim far to the future what comes to requirements for scalability, usability, and reliability.&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;Simantics Developer Documentation&#039;&#039; is targeted to programmers and software developers developing either the platform itself or additional plug-ins to be used with or on the platform. The [[userwiki:Main_Page|Simantics End User Documentation]] complements to documentation for the Simantics platform offering overview and detailed information about the platform from the user&#039;s point of view. The [https://www.simantics.org/simantics Simantics] website is the source of information for the Simantics project and related subjects[[Tutorials|.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:white;&amp;quot;&amp;gt;Disclaimer Warning: This site may cause narcolepsia in some readers. Consult your doctor if sensitive to boredom.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;75%&amp;quot;&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
* [[Glossary]]&lt;br /&gt;
* [[Introduction to Simantics Architecture]]&lt;br /&gt;
* [[Roadmap]]&lt;br /&gt;
* [[Data View]]&lt;br /&gt;
* [[Component View]]&lt;br /&gt;
* [[Licensing|Licensing]]&lt;br /&gt;
* [[Useful Links]]&lt;br /&gt;
&amp;lt;!--* [[Simantics Specifications|Specifications]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Documents ===&lt;br /&gt;
&lt;br /&gt;
* [[Quick Development Environment Setup|Quick Development Environment Setup Guide]]&lt;br /&gt;
* [[Target Platform]]&lt;br /&gt;
* [[Development Practices]]&lt;br /&gt;
* [[Internalization]]&lt;br /&gt;
* [[Update Site]]&lt;br /&gt;
* [[Coding Convention]]&lt;br /&gt;
* [[Tools]]&lt;br /&gt;
* [[Testing]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Migration To Git]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Ontology Development ===&lt;br /&gt;
&lt;br /&gt;
* [[:Media:Layer0.pdf|Layer0.pdf]] ([[:File:Layer0.pdf|log]])&lt;br /&gt;
* [[Graph Compiler]]&lt;br /&gt;
* [[Transferable Graph]]&lt;br /&gt;
* [[Binary Container Format]]&lt;br /&gt;
* [[Graph File Format]]&lt;br /&gt;
* [[Version Migration]]&lt;br /&gt;
* [[Tutorial: Ontology Development]]&lt;br /&gt;
* [[XML Schema Conversion]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Database Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Interface summary]]&lt;br /&gt;
* [[Tutorial: Quickstart]]&lt;br /&gt;
* [[Tutorial: Database Development]]&lt;br /&gt;
* [[Resource Adaptation]]&lt;br /&gt;
* [[Resource Serialization]]&lt;br /&gt;
* [[Inverse Relations]]&lt;br /&gt;
* [[Virtual Graphs]]&lt;br /&gt;
* [[Functions]]&lt;br /&gt;
* [[Procedural Values]]&lt;br /&gt;
* [[Variable]]&lt;br /&gt;
* [[Undo Mechanism]]&lt;br /&gt;
* [[Team Features]]&lt;br /&gt;
* [[Subgraph Extents]]&lt;br /&gt;
* [[Database Testing]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Data management &amp;amp; Experiment Control ===&lt;br /&gt;
&lt;br /&gt;
* [[Databoard Specification]]&lt;br /&gt;
* [[Databoard Developer Manual|Databoard Java Manual]]&lt;br /&gt;
* [[Experiment Control]]&lt;br /&gt;
* [[Dataflows]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== UI Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Org.simantics.browsing.ui_Manual|Browser Manual]]&lt;br /&gt;
* [[org.simantics.browsing.ui.feature|Browser Component]]&lt;br /&gt;
* [[Org.simantics.scenegraph.loader|Scene Graph Loader]]&lt;br /&gt;
* [[Org.simantics.message|Messages]]&lt;br /&gt;
* [[Org.simantics.views|Modelled Views]]&lt;br /&gt;
* [[Org.simantics.document|Documents]]&lt;br /&gt;
* [[Selection View]]&lt;br /&gt;
|}&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Simantics Constraint Language===&lt;br /&gt;
&lt;br /&gt;
* [http://www.simantics.org/~niemisto/Introduction%20to%20SCL.pptx Introduction to SCL]&lt;br /&gt;
* [[SCL Compiler]]&lt;br /&gt;
* [[SCL Tutorial]]&lt;br /&gt;
* [[SCL Types]]&lt;br /&gt;
&amp;lt;!--* [[SCL_Language|SCL Language]] --&amp;gt;&lt;br /&gt;
&amp;lt;!--* [https://www.simantics.org/wiki/index.php/Org.simantics.scl_Compiler SCL Compiler]--&amp;gt;&lt;br /&gt;
* [[Org.simantics.objmap_Manual|Object Map Manual]]&lt;br /&gt;
* [[SCL Registry]]&lt;br /&gt;
* [http://www.simantics.org/SCLDocumentation/StandardLibrary/Prelude.html SCL Reference]&lt;br /&gt;
* [http://www.simantics.org/~niemisto/Transformations.pdf Transformation language specification]&lt;br /&gt;
* [http://www.simantics.org/~niemisto/CHRGuide.html CHR Guide]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Model Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Structural Ontology]]&lt;br /&gt;
* [[Users and Roles]]&lt;br /&gt;
* [[Models]]&lt;br /&gt;
* [[Concept Versioning]]&lt;br /&gt;
* [[Component Identification]]&lt;br /&gt;
* [[Tutorial: Model Development]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Project Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Project Management Conceptual Model]]&lt;br /&gt;
* [[Project Development]]&lt;br /&gt;
* [[Tutorial: Project Development]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Diagram Development ===&lt;br /&gt;
&lt;br /&gt;
* [[2D Ontologies]]&lt;br /&gt;
* [[org.simantics.diagram|Diagram]]&lt;br /&gt;
* [[org.simantics.scenegraph|Scene graph]]&lt;br /&gt;
* [[Diagram connections]]&lt;br /&gt;
* [[Tutorial: Diagram Development]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Issue Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Issue subsystem general description]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
&lt;br /&gt;
* [[Simantics Generic File Import]]&lt;br /&gt;
* [[Logging in Simantics Platform]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
-----&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Licensing&amp;diff=3318</id>
		<title>Licensing</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Licensing&amp;diff=3318"/>
		<updated>2017-02-01T12:34:46Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Simantics Licenses */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simantics Licenses ==&lt;br /&gt;
&lt;br /&gt;
Simantics Platform is licensed under [[#Eclipse Public License]]. The license does not have to apply to 3rd party applications and plug-ins that are integrated with Simantics. That means, an application built on Simantics can be e.g. a commercial, closed code. Or it can be an open source product. In any case, the application and plug-in licensing have to respect Simantics licensing. E.g. if a plug-in component uses a so-called &amp;quot;Strict GPL&amp;quot;, the integration with Simantics has to be done with extra care; the GPL licensed software can&#039;t influence the licensing of Simantics platform. For a commercial products, the application or plug-in has to be clearly separated from the platform and all the integration code needed in the Simantics platform side has to be licensed under Eclipse Public License (EPL).&lt;br /&gt;
&lt;br /&gt;
On [http://www.gnu.org/philosophy/license-list.html GNU Operating System] website there is an excellent description of different free and open source licenses and their differences in a nut shell. Another website worth mentioning is [http://www.opensource.org/ Open Source Initiative]. From this side you can find information about open source software development and licensing.&lt;br /&gt;
&lt;br /&gt;
Simantics depends on a few third party components which have license other than EPL. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; &amp;quot;style=&amp;quot;background:transparent; text-align:left;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot;|Component &lt;br /&gt;
! align=&amp;quot;left&amp;quot; style=&amp;quot;width: 20em&amp;quot;|License&lt;br /&gt;
! align=&amp;quot;left&amp;quot;|Notes&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [https://www.simantics.org/simantics Simantics Platform]&lt;br /&gt;
| [[#Eclipse Public License|EPL]]&lt;br /&gt;
| All Simantics plugins&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [http://www.eclipse.org/ Eclipse Platform]&lt;br /&gt;
| [[#Eclipse Public License|EPL]]&lt;br /&gt;
| All Eclipse plugins&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [http://www.cs.wustl.edu/~schmidt/ACE.html ACE - Adaptive Communications Environment]&lt;br /&gt;
| [[#ACE license|ACE License]]&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [http://www.jcraft.com/jzlib/ JZlib]&lt;br /&gt;
| [[#JZLib License|JZLib License]]&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [http://xmlgraphics.apache.org/batik/ Batik] (org.apache.batik)&lt;br /&gt;
| [[#Apache Software License 2.0|Apache Software License 2.0]]&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [http://logging.apache.org/log4j/index.html Log4j] (org.apache.log4j)&lt;br /&gt;
| [[#Apache Software License 2.0|Apache Software License 2.0]]&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [http://www.json.org/ JSON] (JSON_libraries)&lt;br /&gt;
| [[#Apache Software License 2.0|Apache Software License 2.0]]&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [http://cglib.sourceforge.net/ cglib]&lt;br /&gt;
| [[#Apache Software License 2.0|Apache Software License 2.0]]&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [http://itextpdf.com/ iText] (com.lowagie.text)&lt;br /&gt;
| [[#LGPL|LGPL]]&lt;br /&gt;
| The 2.1 series allows using either LGPL [http://www.lowagie.com/iText/lgpl.txt] or MPL [http://www.lowagie.com/iText/MPL-1.1.txt]. We use the library with the LGPL. According to the [http://www.lowagie.com/iText/download.html iText license agreement] we must mention that iText has the possibility to use MPL as an alternative license.&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [https://svgsalamander.dev.java.net/ SVG Salamander]&lt;br /&gt;
| [[#LGPL|LGPL]]&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [http://lobobrowser.org/cobra.jsp Cobra]&lt;br /&gt;
| [[#LGPL|LGPL]]&lt;br /&gt;
| Cobra itself is LGPL 3. Cobra uses Rhino as its Javascript interpreter. Rhino can be used as either MPL or GPL. We currently have no need for Javascript so were not using Rhino. Although the author&#039;s opinion is to go with GPL when using Rhino, we would have to go with MPL to keep EPL compatible if we used it.&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [http://www.jfree.org/jcommon/ JCommon], [http://www.jfree.org/jfreechart/ JFreeChart]&lt;br /&gt;
| [[#LGPL|LGPL]]&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | [http://trove4j.sourceforge.net/ GNU Trove] (gnu.trove2, gnu.trove3)&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | [[#LGPL|LGPL]]&lt;br /&gt;
| [http://trove4j.sourceforge.net/html/license.html Original license text]. &lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
The source code for GNU Trove is licensed under the Lesser GNU Public License (LGPL). &lt;br /&gt;
Copyright (c) 2001, Eric D. Friedman All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two classes (HashFunctions and PrimeFinder) included in Trove are licensed under the following terms:&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 1999 CERN - European Organization for Nuclear Research. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. CERN makes no representations about the suitability of this software for any purpose. It is provided &amp;quot;as is&amp;quot; without expressed or implied warranty.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [http://www.fastlz.org/ FastLZ]&lt;br /&gt;
| [[#FastLZ License|MIT License]]&lt;br /&gt;
| SVN revision 12&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [http://code.google.com/p/lz4/ LZ4 - Extremely Fast Compression algorithm]&lt;br /&gt;
| [[#LZ4 License|BSD 2-Clause License]]&lt;br /&gt;
| SVN revision 68&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [https://github.com/jpountz/lz4-java LZ4 compression for Java]&lt;br /&gt;
| [[#Apache Software License 2.0|Apache Software License 2.0]]&lt;br /&gt;
| 1.3.0&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [http://www.famfamfam.com/lab/icons/silk/ FamFamFam Silk Icons by Mark James]&lt;br /&gt;
| [[#Creative Commons Attribution 2.5 License|Creative Commons Attribution 2.5 License]]&lt;br /&gt;
| 1.3&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeff;&amp;quot;&lt;br /&gt;
| [http://damieng.com/creative/icons/silk-companion-1-icons Silk Companion 1 (more Silk icons) by Damien Guard]&lt;br /&gt;
| [[#Creative Commons Attribution 2.5 License|Creative Commons Attribution 2.5 License]]&lt;br /&gt;
| -&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| [http://fastutil.di.unimi.it/ fastutil: Fast &amp;amp; compact type-specific collections for Java]&lt;br /&gt;
| [[#Apache Software License 2.0|Apache Software License 2.0]]&lt;br /&gt;
| 7.0.6&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | [http://asm.ow2.org/ ASM]&lt;br /&gt;
| [http://asm.ow2.org/license.html]&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | [https://eclipse.org/jetty/ Jetty]&lt;br /&gt;
| [[#Eclipse Public License|EPL]]&lt;br /&gt;
|- style=&amp;quot;background-color: #f4f4ff;&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | [http://www.graphviz.org/ Graphviz]&lt;br /&gt;
| [[#Eclipse Public License|EPL]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Eclipse Public License ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ================================================================== --&amp;gt;&lt;br /&gt;
&amp;lt;!-- THIS TEXT IS COPIED AS IS FROM THE ECLIPSE WEBSITE ON SEP 28, 2010 --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ================================================================== --&amp;gt;&lt;br /&gt;
[http://www.eclipse.org/org/documents/epl-v10.html http://www.eclipse.org/org/documents/epl-v10.html]&lt;br /&gt;
&lt;br /&gt;
Eclipse Public License - v 1.0. &lt;br /&gt;
&lt;br /&gt;
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&amp;quot;AGREEMENT&amp;quot;). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT&#039;S ACCEPTANCE OF THIS AGREEMENT.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. DEFINITIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Contribution&amp;quot; means:&lt;br /&gt;
&lt;br /&gt;
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and&lt;br /&gt;
&lt;br /&gt;
b) in the case of each subsequent Contributor:&lt;br /&gt;
&lt;br /&gt;
i) changes to the Program, and&lt;br /&gt;
&lt;br /&gt;
ii) additions to the Program;&lt;br /&gt;
&lt;br /&gt;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution &#039;originates&#039; from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor&#039;s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Contributor&amp;quot; means any person or entity that distributes the Program.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Licensed Patents&amp;quot; mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Program&amp;quot; means the Contributions distributed in accordance with this Agreement.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Recipient&amp;quot; means anyone who receives the Program under this Agreement, including all Contributors.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. GRANT OF RIGHTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.&lt;br /&gt;
&lt;br /&gt;
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.&lt;br /&gt;
&lt;br /&gt;
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient&#039;s responsibility to acquire that license before distributing the Program.&lt;br /&gt;
&lt;br /&gt;
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. REQUIREMENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:&lt;br /&gt;
&lt;br /&gt;
a) it complies with the terms and conditions of this Agreement; and&lt;br /&gt;
&lt;br /&gt;
b) its license agreement:&lt;br /&gt;
&lt;br /&gt;
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;&lt;br /&gt;
&lt;br /&gt;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;&lt;br /&gt;
&lt;br /&gt;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and&lt;br /&gt;
&lt;br /&gt;
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.&lt;br /&gt;
&lt;br /&gt;
When the Program is made available in source code form:&lt;br /&gt;
&lt;br /&gt;
a) it must be made available under this Agreement; and&lt;br /&gt;
&lt;br /&gt;
b) a copy of this Agreement must be included with each copy of the Program.&lt;br /&gt;
&lt;br /&gt;
Contributors may not remove or alter any copyright notices contained within the Program.&lt;br /&gt;
&lt;br /&gt;
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. COMMERCIAL DISTRIBUTION&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (&amp;quot;Commercial Contributor&amp;quot;) hereby agrees to defend and indemnify every other Contributor (&amp;quot;Indemnified Contributor&amp;quot;) against any losses, damages and costs (collectively &amp;quot;Losses&amp;quot;) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.&lt;br /&gt;
&lt;br /&gt;
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor&#039;s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. NO WARRANTY&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN &amp;quot;AS IS&amp;quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6. DISCLAIMER OF LIABILITY&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;7. GENERAL&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.&lt;br /&gt;
&lt;br /&gt;
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient&#039;s patent(s), then such Recipient&#039;s rights granted under Section 2(b) shall terminate as of the date such litigation is filed.&lt;br /&gt;
&lt;br /&gt;
All Recipient&#039;s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient&#039;s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient&#039;s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.&lt;br /&gt;
&lt;br /&gt;
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.&lt;br /&gt;
&lt;br /&gt;
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.&lt;br /&gt;
&lt;br /&gt;
== LGPL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/copyleft/lesser.html http://www.gnu.org/copyleft/lesser.html]&lt;br /&gt;
&lt;br /&gt;
GNU LESSER GENERAL PUBLIC LICENSE&lt;br /&gt;
&lt;br /&gt;
Version 3, 29 June 2007&lt;br /&gt;
&lt;br /&gt;
Copyright © 2007 Free Software Foundation, Inc. &amp;lt;http://fsf.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.&lt;br /&gt;
&lt;br /&gt;
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.&lt;br /&gt;
&#039;&#039;&#039;0. Additional Definitions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License.&lt;br /&gt;
&lt;br /&gt;
“The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.&lt;br /&gt;
&lt;br /&gt;
An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.&lt;br /&gt;
&lt;br /&gt;
A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”.&lt;br /&gt;
&lt;br /&gt;
The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.&lt;br /&gt;
&lt;br /&gt;
The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Exception to Section 3 of the GNU GPL.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Conveying Modified Versions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:&lt;br /&gt;
&lt;br /&gt;
* a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or&lt;br /&gt;
* b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Object Code Incorporating Material from Library Header Files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:&lt;br /&gt;
&lt;br /&gt;
* a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.&lt;br /&gt;
* b) Accompany the object code with a copy of the GNU GPL and this license document.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Combined Works.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:&lt;br /&gt;
&lt;br /&gt;
* a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.&lt;br /&gt;
* b) Accompany the Combined Work with a copy of the GNU GPL and this license document.&lt;br /&gt;
* c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.&lt;br /&gt;
* d) Do one of the following:&lt;br /&gt;
** 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.&lt;br /&gt;
** 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user&#039;s computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.&lt;br /&gt;
* e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Combined Libraries.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:&lt;br /&gt;
&lt;br /&gt;
* a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.&lt;br /&gt;
* b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6. Revised Versions of the GNU Lesser General Public License.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.&lt;br /&gt;
&lt;br /&gt;
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.&lt;br /&gt;
&lt;br /&gt;
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy&#039;s public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.&lt;br /&gt;
&lt;br /&gt;
== JZLib License ==&lt;br /&gt;
&lt;br /&gt;
[http://www.jcraft.com/jzlib/LICENSE.txt http://www.jcraft.com/jzlib/LICENSE.txt]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
JZlib 0.0.* were released under the GNU LGPL license.  Later, we have switched &lt;br /&gt;
over to a BSD-style license. &lt;br /&gt;
&lt;br /&gt;
------------------------------------------------------------------------------&lt;br /&gt;
Copyright (c) 2000,2001,2002,2003,2004 ymnk, JCraft,Inc. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without&lt;br /&gt;
modification, are permitted provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
  1. Redistributions of source code must retain the above copyright notice,&lt;br /&gt;
     this list of conditions and the following disclaimer.&lt;br /&gt;
&lt;br /&gt;
  2. Redistributions in binary form must reproduce the above copyright &lt;br /&gt;
     notice, this list of conditions and the following disclaimer in &lt;br /&gt;
     the documentation and/or other materials provided with the distribution.&lt;br /&gt;
&lt;br /&gt;
  3. The names of the authors may not be used to endorse or promote products&lt;br /&gt;
     derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED ``AS IS&#039;&#039; AND ANY EXPRESSED OR IMPLIED WARRANTIES,&lt;br /&gt;
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND&lt;br /&gt;
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,&lt;br /&gt;
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,&lt;br /&gt;
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT&lt;br /&gt;
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,&lt;br /&gt;
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF&lt;br /&gt;
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING&lt;br /&gt;
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,&lt;br /&gt;
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Software License 2.0  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.apache.org/licenses/LICENSE-2.0.txt http://www.apache.org/licenses/LICENSE-2.0.txt]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                                 Apache License&lt;br /&gt;
                           Version 2.0, January 2004&lt;br /&gt;
                        http://www.apache.org/licenses/&lt;br /&gt;
&lt;br /&gt;
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION&lt;br /&gt;
&lt;br /&gt;
   1. Definitions.&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;License&amp;quot; shall mean the terms and conditions for use, reproduction,&lt;br /&gt;
      and distribution as defined by Sections 1 through 9 of this document.&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;Licensor&amp;quot; shall mean the copyright owner or entity authorized by&lt;br /&gt;
      the copyright owner that is granting the License.&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;Legal Entity&amp;quot; shall mean the union of the acting entity and all&lt;br /&gt;
      other entities that control, are controlled by, or are under common&lt;br /&gt;
      control with that entity. For the purposes of this definition,&lt;br /&gt;
      &amp;quot;control&amp;quot; means (i) the power, direct or indirect, to cause the&lt;br /&gt;
      direction or management of such entity, whether by contract or&lt;br /&gt;
      otherwise, or (ii) ownership of fifty percent (50%) or more of the&lt;br /&gt;
      outstanding shares, or (iii) beneficial ownership of such entity.&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;You&amp;quot; (or &amp;quot;Your&amp;quot;) shall mean an individual or Legal Entity&lt;br /&gt;
      exercising permissions granted by this License.&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;Source&amp;quot; form shall mean the preferred form for making modifications,&lt;br /&gt;
      including but not limited to software source code, documentation&lt;br /&gt;
      source, and configuration files.&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;Object&amp;quot; form shall mean any form resulting from mechanical&lt;br /&gt;
      transformation or translation of a Source form, including but&lt;br /&gt;
      not limited to compiled object code, generated documentation,&lt;br /&gt;
      and conversions to other media types.&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;Work&amp;quot; shall mean the work of authorship, whether in Source or&lt;br /&gt;
      Object form, made available under the License, as indicated by a&lt;br /&gt;
      copyright notice that is included in or attached to the work&lt;br /&gt;
      (an example is provided in the Appendix below).&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;Derivative Works&amp;quot; shall mean any work, whether in Source or Object&lt;br /&gt;
      form, that is based on (or derived from) the Work and for which the&lt;br /&gt;
      editorial revisions, annotations, elaborations, or other modifications&lt;br /&gt;
      represent, as a whole, an original work of authorship. For the purposes&lt;br /&gt;
      of this License, Derivative Works shall not include works that remain&lt;br /&gt;
      separable from, or merely link (or bind by name) to the interfaces of,&lt;br /&gt;
      the Work and Derivative Works thereof.&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;Contribution&amp;quot; shall mean any work of authorship, including&lt;br /&gt;
      the original version of the Work and any modifications or additions&lt;br /&gt;
      to that Work or Derivative Works thereof, that is intentionally&lt;br /&gt;
      submitted to Licensor for inclusion in the Work by the copyright owner&lt;br /&gt;
      or by an individual or Legal Entity authorized to submit on behalf of&lt;br /&gt;
      the copyright owner. For the purposes of this definition, &amp;quot;submitted&amp;quot;&lt;br /&gt;
      means any form of electronic, verbal, or written communication sent&lt;br /&gt;
      to the Licensor or its representatives, including but not limited to&lt;br /&gt;
      communication on electronic mailing lists, source code control systems,&lt;br /&gt;
      and issue tracking systems that are managed by, or on behalf of, the&lt;br /&gt;
      Licensor for the purpose of discussing and improving the Work, but&lt;br /&gt;
      excluding communication that is conspicuously marked or otherwise&lt;br /&gt;
      designated in writing by the copyright owner as &amp;quot;Not a Contribution.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;Contributor&amp;quot; shall mean Licensor and any individual or Legal Entity&lt;br /&gt;
      on behalf of whom a Contribution has been received by Licensor and&lt;br /&gt;
      subsequently incorporated within the Work.&lt;br /&gt;
&lt;br /&gt;
   2. Grant of Copyright License. Subject to the terms and conditions of&lt;br /&gt;
      this License, each Contributor hereby grants to You a perpetual,&lt;br /&gt;
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable&lt;br /&gt;
      copyright license to reproduce, prepare Derivative Works of,&lt;br /&gt;
      publicly display, publicly perform, sublicense, and distribute the&lt;br /&gt;
      Work and such Derivative Works in Source or Object form.&lt;br /&gt;
&lt;br /&gt;
   3. Grant of Patent License. Subject to the terms and conditions of&lt;br /&gt;
      this License, each Contributor hereby grants to You a perpetual,&lt;br /&gt;
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable&lt;br /&gt;
      (except as stated in this section) patent license to make, have made,&lt;br /&gt;
      use, offer to sell, sell, import, and otherwise transfer the Work,&lt;br /&gt;
      where such license applies only to those patent claims licensable&lt;br /&gt;
      by such Contributor that are necessarily infringed by their&lt;br /&gt;
      Contribution(s) alone or by combination of their Contribution(s)&lt;br /&gt;
      with the Work to which such Contribution(s) was submitted. If You&lt;br /&gt;
      institute patent litigation against any entity (including a&lt;br /&gt;
      cross-claim or counterclaim in a lawsuit) alleging that the Work&lt;br /&gt;
      or a Contribution incorporated within the Work constitutes direct&lt;br /&gt;
      or contributory patent infringement, then any patent licenses&lt;br /&gt;
      granted to You under this License for that Work shall terminate&lt;br /&gt;
      as of the date such litigation is filed.&lt;br /&gt;
&lt;br /&gt;
   4. Redistribution. You may reproduce and distribute copies of the&lt;br /&gt;
      Work or Derivative Works thereof in any medium, with or without&lt;br /&gt;
      modifications, and in Source or Object form, provided that You&lt;br /&gt;
      meet the following conditions:&lt;br /&gt;
&lt;br /&gt;
      (a) You must give any other recipients of the Work or&lt;br /&gt;
          Derivative Works a copy of this License; and&lt;br /&gt;
&lt;br /&gt;
      (b) You must cause any modified files to carry prominent notices&lt;br /&gt;
          stating that You changed the files; and&lt;br /&gt;
&lt;br /&gt;
      (c) You must retain, in the Source form of any Derivative Works&lt;br /&gt;
          that You distribute, all copyright, patent, trademark, and&lt;br /&gt;
          attribution notices from the Source form of the Work,&lt;br /&gt;
          excluding those notices that do not pertain to any part of&lt;br /&gt;
          the Derivative Works; and&lt;br /&gt;
&lt;br /&gt;
      (d) If the Work includes a &amp;quot;NOTICE&amp;quot; text file as part of its&lt;br /&gt;
          distribution, then any Derivative Works that You distribute must&lt;br /&gt;
          include a readable copy of the attribution notices contained&lt;br /&gt;
          within such NOTICE file, excluding those notices that do not&lt;br /&gt;
          pertain to any part of the Derivative Works, in at least one&lt;br /&gt;
          of the following places: within a NOTICE text file distributed&lt;br /&gt;
          as part of the Derivative Works; within the Source form or&lt;br /&gt;
          documentation, if provided along with the Derivative Works; or,&lt;br /&gt;
          within a display generated by the Derivative Works, if and&lt;br /&gt;
          wherever such third-party notices normally appear. The contents&lt;br /&gt;
          of the NOTICE file are for informational purposes only and&lt;br /&gt;
          do not modify the License. You may add Your own attribution&lt;br /&gt;
          notices within Derivative Works that You distribute, alongside&lt;br /&gt;
          or as an addendum to the NOTICE text from the Work, provided&lt;br /&gt;
          that such additional attribution notices cannot be construed&lt;br /&gt;
          as modifying the License.&lt;br /&gt;
&lt;br /&gt;
      You may add Your own copyright statement to Your modifications and&lt;br /&gt;
      may provide additional or different license terms and conditions&lt;br /&gt;
      for use, reproduction, or distribution of Your modifications, or&lt;br /&gt;
      for any such Derivative Works as a whole, provided Your use,&lt;br /&gt;
      reproduction, and distribution of the Work otherwise complies with&lt;br /&gt;
      the conditions stated in this License.&lt;br /&gt;
&lt;br /&gt;
   5. Submission of Contributions. Unless You explicitly state otherwise,&lt;br /&gt;
      any Contribution intentionally submitted for inclusion in the Work&lt;br /&gt;
      by You to the Licensor shall be under the terms and conditions of&lt;br /&gt;
      this License, without any additional terms or conditions.&lt;br /&gt;
      Notwithstanding the above, nothing herein shall supersede or modify&lt;br /&gt;
      the terms of any separate license agreement you may have executed&lt;br /&gt;
      with Licensor regarding such Contributions.&lt;br /&gt;
&lt;br /&gt;
   6. Trademarks. This License does not grant permission to use the trade&lt;br /&gt;
      names, trademarks, service marks, or product names of the Licensor,&lt;br /&gt;
      except as required for reasonable and customary use in describing the&lt;br /&gt;
      origin of the Work and reproducing the content of the NOTICE file.&lt;br /&gt;
&lt;br /&gt;
   7. Disclaimer of Warranty. Unless required by applicable law or&lt;br /&gt;
      agreed to in writing, Licensor provides the Work (and each&lt;br /&gt;
      Contributor provides its Contributions) on an &amp;quot;AS IS&amp;quot; BASIS,&lt;br /&gt;
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or&lt;br /&gt;
      implied, including, without limitation, any warranties or conditions&lt;br /&gt;
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A&lt;br /&gt;
      PARTICULAR PURPOSE. You are solely responsible for determining the&lt;br /&gt;
      appropriateness of using or redistributing the Work and assume any&lt;br /&gt;
      risks associated with Your exercise of permissions under this License.&lt;br /&gt;
&lt;br /&gt;
   8. Limitation of Liability. In no event and under no legal theory,&lt;br /&gt;
      whether in tort (including negligence), contract, or otherwise,&lt;br /&gt;
      unless required by applicable law (such as deliberate and grossly&lt;br /&gt;
      negligent acts) or agreed to in writing, shall any Contributor be&lt;br /&gt;
      liable to You for damages, including any direct, indirect, special,&lt;br /&gt;
      incidental, or consequential damages of any character arising as a&lt;br /&gt;
      result of this License or out of the use or inability to use the&lt;br /&gt;
      Work (including but not limited to damages for loss of goodwill,&lt;br /&gt;
      work stoppage, computer failure or malfunction, or any and all&lt;br /&gt;
      other commercial damages or losses), even if such Contributor&lt;br /&gt;
      has been advised of the possibility of such damages.&lt;br /&gt;
&lt;br /&gt;
   9. Accepting Warranty or Additional Liability. While redistributing&lt;br /&gt;
      the Work or Derivative Works thereof, You may choose to offer,&lt;br /&gt;
      and charge a fee for, acceptance of support, warranty, indemnity,&lt;br /&gt;
      or other liability obligations and/or rights consistent with this&lt;br /&gt;
      License. However, in accepting such obligations, You may act only&lt;br /&gt;
      on Your own behalf and on Your sole responsibility, not on behalf&lt;br /&gt;
      of any other Contributor, and only if You agree to indemnify,&lt;br /&gt;
      defend, and hold each Contributor harmless for any liability&lt;br /&gt;
      incurred by, or claims asserted against, such Contributor by reason&lt;br /&gt;
      of your accepting any such warranty or additional liability.&lt;br /&gt;
&lt;br /&gt;
   END OF TERMS AND CONDITIONS&lt;br /&gt;
&lt;br /&gt;
   APPENDIX: How to apply the Apache License to your work.&lt;br /&gt;
&lt;br /&gt;
      To apply the Apache License to your work, attach the following&lt;br /&gt;
      boilerplate notice, with the fields enclosed by brackets &amp;quot;[]&amp;quot;&lt;br /&gt;
      replaced with your own identifying information. (Don&#039;t include&lt;br /&gt;
      the brackets!)  The text should be enclosed in the appropriate&lt;br /&gt;
      comment syntax for the file format. We also recommend that a&lt;br /&gt;
      file or class name and description of purpose be included on the&lt;br /&gt;
      same &amp;quot;printed page&amp;quot; as the copyright notice for easier&lt;br /&gt;
      identification within third-party archives.&lt;br /&gt;
&lt;br /&gt;
   Copyright [yyyy] [name of copyright owner]&lt;br /&gt;
&lt;br /&gt;
   Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;);&lt;br /&gt;
   you may not use this file except in compliance with the License.&lt;br /&gt;
   You may obtain a copy of the License at&lt;br /&gt;
&lt;br /&gt;
       http://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
&lt;br /&gt;
   Unless required by applicable law or agreed to in writing, software&lt;br /&gt;
   distributed under the License is distributed on an &amp;quot;AS IS&amp;quot; BASIS,&lt;br /&gt;
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&lt;br /&gt;
   See the License for the specific language governing permissions and&lt;br /&gt;
   limitations under the License.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ACE License ==&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.wustl.edu/~schmidt/ACE-copying.html http://www.cs.wustl.edu/~schmidt/ACE-copying.html]&lt;br /&gt;
 Copyright (c) 2000-2005 INRIA, France Telecom&lt;br /&gt;
 All rights reserved. &lt;br /&gt;
 &lt;br /&gt;
 Redistribution and use in source and binary forms, with or without&lt;br /&gt;
 modification, are permitted provided that the following conditions&lt;br /&gt;
 are met: &lt;br /&gt;
 &lt;br /&gt;
 1. Redistributions of source code must retain the above copyright&lt;br /&gt;
    notice, this list of conditions and the following disclaimer. &lt;br /&gt;
 &lt;br /&gt;
 2. Redistributions in binary form must reproduce the above copyright&lt;br /&gt;
    notice, this list of conditions and the following disclaimer in the&lt;br /&gt;
    documentation and/or other materials provided with the distribution.&lt;br /&gt;
 &lt;br /&gt;
 3. Neither the name of the copyright holders nor the names of its&lt;br /&gt;
    contributors may be used to endorse or promote products derived from&lt;br /&gt;
    this software without specific prior written permission. &lt;br /&gt;
 &lt;br /&gt;
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;&lt;br /&gt;
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;br /&gt;
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE&lt;br /&gt;
 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE&lt;br /&gt;
 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR&lt;br /&gt;
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF&lt;br /&gt;
 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS&lt;br /&gt;
 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN&lt;br /&gt;
 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)&lt;br /&gt;
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF&lt;br /&gt;
&lt;br /&gt;
== FastLZ License ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FastLZ - lightning-fast lossless compression library&lt;br /&gt;
&lt;br /&gt;
Copyright (C) 2007 Ariya Hidayat (ariya@kde.org)&lt;br /&gt;
Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)&lt;br /&gt;
Copyright (C) 2005 Ariya Hidayat (ariya@kde.org)&lt;br /&gt;
&lt;br /&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy&lt;br /&gt;
of this software and associated documentation files (the &amp;quot;Software&amp;quot;), to deal&lt;br /&gt;
in the Software without restriction, including without limitation the rights&lt;br /&gt;
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell&lt;br /&gt;
copies of the Software, and to permit persons to whom the Software is&lt;br /&gt;
furnished to do so, subject to the following conditions:&lt;br /&gt;
&lt;br /&gt;
The above copyright notice and this permission notice shall be included in&lt;br /&gt;
all copies or substantial portions of the Software.&lt;br /&gt;
&lt;br /&gt;
THE SOFTWARE IS PROVIDED &amp;quot;AS IS&amp;quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&lt;br /&gt;
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&lt;br /&gt;
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&lt;br /&gt;
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&lt;br /&gt;
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,&lt;br /&gt;
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN&lt;br /&gt;
THE SOFTWARE.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LZ4 License ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   LZ4 - Fast LZ compression algorithm&lt;br /&gt;
   Copyright (C) 2011-2012, Yann Collet.&lt;br /&gt;
   BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)&lt;br /&gt;
&lt;br /&gt;
   Redistribution and use in source and binary forms, with or without&lt;br /&gt;
   modification, are permitted provided that the following conditions are&lt;br /&gt;
   met:&lt;br /&gt;
&lt;br /&gt;
       * Redistributions of source code must retain the above copyright&lt;br /&gt;
   notice, this list of conditions and the following disclaimer.&lt;br /&gt;
       * Redistributions in binary form must reproduce the above&lt;br /&gt;
   copyright notice, this list of conditions and the following disclaimer&lt;br /&gt;
   in the documentation and/or other materials provided with the&lt;br /&gt;
   distribution.&lt;br /&gt;
&lt;br /&gt;
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS&lt;br /&gt;
   &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT&lt;br /&gt;
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR&lt;br /&gt;
   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT&lt;br /&gt;
   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT&lt;br /&gt;
   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,&lt;br /&gt;
   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY&lt;br /&gt;
   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT&lt;br /&gt;
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE&lt;br /&gt;
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
   You can contact the author at :&lt;br /&gt;
   - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html&lt;br /&gt;
   - LZ4 source repository : http://code.google.com/p/lz4/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creative Commons Attribution 2.5 License ==&lt;br /&gt;
&lt;br /&gt;
http://creativecommons.org/licenses/by/2.5/&amp;lt;br/&amp;gt;&lt;br /&gt;
http://creativecommons.org/licenses/by/2.5/legalcode&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&#039;&#039;&#039;Creative Commons Legal Code&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&#039;&#039;&#039;Attribution 2.5&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN &amp;quot;AS-IS&amp;quot; BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;License&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (&amp;quot;CCPL&amp;quot; OR &amp;quot;LICENSE&amp;quot;). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.&lt;br /&gt;
&lt;br /&gt;
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Definitions&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
a. &#039;&#039;&#039;&amp;quot;Collective Work&amp;quot;&#039;&#039;&#039; means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.&lt;br /&gt;
&lt;br /&gt;
b. &#039;&#039;&#039;&amp;quot;Derivative Work&amp;quot;&#039;&#039;&#039; means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image (&amp;quot;synching&amp;quot;) will be considered a Derivative Work for the purpose of this License.&lt;br /&gt;
&lt;br /&gt;
c. &#039;&#039;&#039;&amp;quot;Licensor&amp;quot;&#039;&#039;&#039; means the individual or entity that offers the Work under the terms of this License.&lt;br /&gt;
&lt;br /&gt;
d. &#039;&#039;&#039;&amp;quot;Original Author&amp;quot;&#039;&#039;&#039; means the individual or entity who created the Work.&lt;br /&gt;
&lt;br /&gt;
e. &#039;&#039;&#039;&amp;quot;Work&amp;quot;&#039;&#039;&#039; means the copyrightable work of authorship offered under the terms of this License.&lt;br /&gt;
&lt;br /&gt;
f. &#039;&#039;&#039;&amp;quot;You&amp;quot;&#039;&#039;&#039; means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Fair Use Rights.&#039;&#039;&#039; Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. License Grant.&#039;&#039;&#039; Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;&lt;br /&gt;
&lt;br /&gt;
b. to create and reproduce Derivative Works;&lt;br /&gt;
&lt;br /&gt;
c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;&lt;br /&gt;
&lt;br /&gt;
d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.&lt;br /&gt;
&lt;br /&gt;
e. For the avoidance of doubt, where the work is a musical composition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.&lt;br /&gt;
&lt;br /&gt;
ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work (&amp;quot;cover version&amp;quot;) and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f. &#039;&#039;&#039;Webcasting Rights and Statutory Royalties.&#039;&#039;&#039; For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Restrictions.&#039;&#039;&#039; The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients&#039; exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(b), as requested.&lt;br /&gt;
&lt;br /&gt;
b. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor&#039;s copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., &amp;quot;French translation of the Work by Original Author,&amp;quot; or &amp;quot;Screenplay based on original Work by Original Author&amp;quot;). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. Representations, Warranties and Disclaimer&lt;br /&gt;
&lt;br /&gt;
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.&lt;br /&gt;
&lt;br /&gt;
7. Termination&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.&lt;br /&gt;
&lt;br /&gt;
b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
8. Miscellaneous&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.&lt;br /&gt;
&lt;br /&gt;
b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.&lt;br /&gt;
&lt;br /&gt;
c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.&lt;br /&gt;
&lt;br /&gt;
d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.&lt;br /&gt;
&lt;br /&gt;
e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.&lt;br /&gt;
&lt;br /&gt;
Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark &amp;quot;Creative Commons&amp;quot; or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons&#039; then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.&lt;br /&gt;
&lt;br /&gt;
Creative Commons may be contacted at http://creativecommons.org/.&lt;br /&gt;
&lt;br /&gt;
[[Category:Introduction]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3313</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3313"/>
		<updated>2016-12-29T14:38:43Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Eclipse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Recommended Reading ==&lt;br /&gt;
&lt;br /&gt;
* Official Gerrit introduction: https://gerrit-review.googlesource.com/Documentation/intro-quick.html.&lt;br /&gt;
* Gerrit tutorial: http://www.vogella.com/tutorials/Gerrit/article.html&lt;br /&gt;
&lt;br /&gt;
== Instructions for Simantics Developers ==&lt;br /&gt;
&lt;br /&gt;
=== Gerrit ===&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account. If you already have a SVN account, it should work also in Gerrit.&lt;br /&gt;
# Generate SSH Public/Private key. If you already have one available, skip this step&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** For Type of key to generate, select &#039;&#039;&#039;SSH-2 RSA&#039;&#039;&#039;&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys in &amp;lt;code&amp;gt;C:\Users\{username}\.ssh&amp;lt;/code&amp;gt; as follows:&lt;br /&gt;
#**** Start cmd.exe and create the target directory using &amp;lt;code&amp;gt;mkdir .ssh&amp;lt;/code&amp;gt;&lt;br /&gt;
#**** Save private key using &#039;&#039;&#039;Conversions -&amp;gt; Export OpenSSH Key&#039;&#039;&#039;. The name &amp;lt;code&amp;gt;id_rsa&amp;lt;/code&amp;gt; is preferred because it will work out of the box with all tools.&lt;br /&gt;
#**** At the top of the window, there is a text field labeled &#039;&#039;&#039;Public key for pasting into OpenSSH authorized_keys&#039;&#039;&#039;. Copy the public key from there and save it into a text file at &amp;lt;code&amp;gt;C:\Users\{username}\.ssh\id_rsa.pub&amp;lt;/code&amp;gt;&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using &amp;lt;code&amp;gt;ssh-keygen -t rsa&amp;lt;/code&amp;gt;&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press &#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;&lt;br /&gt;
# Open the file containing the generated public key in a text editor and copy-paste its contents to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
# Add and verify your contact information (name + e-mail). This will allow administrators to add you to the necessary groups to get commit access:&lt;br /&gt;
#* Go to section &#039;&#039;&#039;Contact Information&#039;&#039;&#039; and enter your &#039;&#039;&#039;Full Name&#039;&#039;&#039; there&lt;br /&gt;
#* Add a &#039;&#039;&#039;Preferred Email&#039;&#039;&#039; address using the button &#039;&#039;&#039;Register New Email&#039;&#039;&#039;&lt;br /&gt;
#* Wait for the authorization mail to arrive. It will look something like the following and contain a longish link that tends to end with == characters. Note that outlook tends to leave the trailing == characters out of the link it generates automatically. That&#039;s why it is recommended to copy the full URL from the mail into your browser to verify your e-mail address.&lt;br /&gt;
&amp;lt;pre&amp;gt;Subject:  [Gerrit Code Review] Email Verification&lt;br /&gt;
&lt;br /&gt;
Welcome to Gerrit Code Review at www.simantics.org.&lt;br /&gt;
&lt;br /&gt;
To add a verified email address to your user account, please&lt;br /&gt;
click on the following link while signed in as .....:&lt;br /&gt;
&lt;br /&gt;
http://www.simantics.org:8088/r/#/../...............................................................................==&lt;br /&gt;
&lt;br /&gt;
If you have received this mail in error, you do not need to take any&lt;br /&gt;
action to cancel the account.  The address will not be activated, and&lt;br /&gt;
you will not receive any further emails.&lt;br /&gt;
&lt;br /&gt;
If clicking the link above does not work, copy and paste the URL in a&lt;br /&gt;
new browser window instead.&lt;br /&gt;
&lt;br /&gt;
This is a send-only email address.  Replies to this message will not&lt;br /&gt;
be read or answered.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, ask [[User:Tuukka Lehtonen]] to add you to the necessary groups and wait for this to happen.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Eclipse ===&lt;br /&gt;
&lt;br /&gt;
The following instructions are written for Eclipse Neon. There might be some differences if you are using Mars.&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you saved the private key.&lt;br /&gt;
# Go to preferences (Team / Git / Configuration) and ensure that the tab &#039;&#039;&#039;User Settings&#039;&#039;&#039; has the following two setting: &amp;lt;code&amp;gt;user.name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;user.email&amp;lt;/code&amp;gt;. The specified name and email must match the values you&#039;ve put in Gerrit to be able to push changes.&amp;lt;br/&amp;gt;[[image:git-global-config.png|400px]]&lt;br /&gt;
#* Also, git has a setting called &amp;lt;code&amp;gt;core.autocrlf&amp;lt;/code&amp;gt; which is used for controlling the way git enforces line feeds to be encoded in a certain way in commits. Read [https://git-scm.com/book/tr/v2/Customizing-Git-Git-Configuration#idp31554304 the documentation] to learn more. We recommend to set it &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; in Windows in order to avoid committing CRLFs to repostory.&lt;br /&gt;
#* If you have a git command line client installed you can use the command &amp;lt;code&amp;gt;git config --list --show-origin&amp;lt;/code&amp;gt; to see your current global settings and find out exactly where your settings are coming from.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.&lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects but &#039;&#039;&#039;org.simantics.root&#039;&#039;&#039; and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox and press &#039;&#039;&#039;Ok&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The repository you cloned contains the target platform definition that needs to be set in order for the imported Simantics codebase to compile. You can find the required target platform definition file from &#039;&#039;&#039;org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target&#039;&#039;&#039;. Open it in the target definition editor and set it as the active target platform by pressing the link &#039;&#039;&#039;Set as Target Platform&#039;&#039;&#039; at the top right corner of the editor.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you&#039;ve now set up your workspace for developing the Simantics codebase in Eclipse!&lt;br /&gt;
&lt;br /&gt;
=== Updating your local repository and working space ===&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Committing your changes back to shared repository ===&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a [[#Commit message format|commit message]]&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;.&lt;br /&gt;
#* This is required by Gerrit to be able to bind commits to specific reviews. Gerrit will replace the default zero-valued Id with a generated one when the change is pushed for review.&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
#* Example of a topic: http://www.simantics.org:8088/r/#/q/topic:svn&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# If you need to make modifications to your changes based on reviews, you&#039;ll need to &#039;&#039;Amend&#039;&#039; the earlier changes to send a new patch set to Gerrit. In this case, ensure that the &#039;&#039;Amend (Edit Previous Commit)&#039;&#039; button is toggled down and you should be able to modify the earlier commit message and push the amended changes.&lt;br /&gt;
# When somebody has reviewed and accepted the change with +2, the review page will contain a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;br /&gt;
&lt;br /&gt;
==== Commit message format ====&lt;br /&gt;
&lt;br /&gt;
In Git, the first row of the commit message is used for &#039;&#039;shortlog&#039;&#039; and generating patch file names so keep it short, concise and as descriptive as possible. The commit box in the UI shows a vertical line marking the maximum length of a commit message line and the view will inform you if you&#039;re exceeding limits. Note that the commit message box will automatically break long lines of text into separate lines to help you write a cleanly formatted commit message.&lt;br /&gt;
&lt;br /&gt;
To keep commits attached to [https://www.simantics.org/redmine/ Redmine] issues, use &amp;lt;code&amp;gt;refs #nnn&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;nnn&amp;lt;/code&amp;gt; is the issue number. This must be specified before &#039;&#039;Change-Id:&#039;&#039;. The Simantics platform Gerrit is configured to show &amp;lt;code&amp;gt;refs #nnn&amp;lt;/code&amp;gt; lines as hyperlinks to platform Redmine issues, i.e. to URL &amp;lt;code&amp;gt;https://www.simantics.org/redmine/issues/nnn&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Often platform commits are also related to some issue or issues from other projects built on top of the platform. In order to retain some information about this association in the commit messages we recommend using separate rows in commit messages in form&amp;lt;code&amp;gt;[PRIVATE-mmm]&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;mmm&amp;lt;/code&amp;gt; is the issue number in the other project.&lt;br /&gt;
&lt;br /&gt;
Gerrit reviews require a row starting &#039;&#039;Change-Id:&#039;&#039; as the last row of the commit message (excluding Signed-off-by rows). This allows Gerrit to bind commits to specific reviews. Gerrit will replace the default zero-valued Id with a generated one when the change is pushed for review.&lt;br /&gt;
&lt;br /&gt;
All in all, a typical commit message should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Short description of my change in under 65 characters&lt;br /&gt;
 &lt;br /&gt;
A longer description of my changes&lt;br /&gt;
that can span multiple lines.&lt;br /&gt;
 &lt;br /&gt;
refs #nnn&lt;br /&gt;
[PRIVATE-mmm] (optional, use this if the commit relates to another project)&lt;br /&gt;
&lt;br /&gt;
Change-Id: I0000000000000000000000000000000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simantics Member Read-only Git Access ==&lt;br /&gt;
&lt;br /&gt;
# Register to member wiki at https://www.simantics.org/members/index.php&lt;br /&gt;
# Log into [http://www.simantics.org:8088/r/# Gerrit] using the credentials found at https://www.simantics.org/members/index.php/Code_Repository_Access&lt;br /&gt;
# Clone http://member@www.simantics.org:8088/r/p/simantics/platform.git using the HTTP password found at http://www.simantics.org:8088/r/#/settings/http-password&lt;br /&gt;
&lt;br /&gt;
The [[#Eclipse|instructions for using Eclipse]] with this git repository apply also for the generic member account. Just remember to replace the cloned SSH repository address with the HTTP address shown above.&lt;br /&gt;
&lt;br /&gt;
== Testing Reviewed Changes ==&lt;br /&gt;
&lt;br /&gt;
To test reviewed code changes locally, first you must have an Eclipse IDE setup according to the instructions in [[#Instructions for Simantics Developers]] or [[#Simantics Member Read-only Git Access]].&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s say for example we wish to grab a patch set from a review, such as review #72 (http://www.simantics.org:8088/r/72).&lt;br /&gt;
&lt;br /&gt;
# Open &#039;&#039;&#039;Git&#039;&#039;&#039; perspective&lt;br /&gt;
# Select root node of the cloned simantics-platform repository from the &#039;&#039;&#039;Git Repositories&#039;&#039;&#039; view&lt;br /&gt;
# From the context menu of the repository, select &#039;&#039;&#039;Fetch from Gerrit...&#039;&#039;&#039;&lt;br /&gt;
# In the &#039;&#039;&#039;Change&#039;&#039;&#039; field, type the change number 72 and press CTRL+SPACE to start content assist. Content assist will provide you with the selections &#039;&#039;&#039;72 - 1&#039;&#039;&#039;, and &#039;&#039;&#039;72 - 2&#039;&#039;&#039;, i.e. patch sets 1 and 2 of change 72. After selecting a patch set, the field will be filled with the value &#039;&#039;&#039;refs/changes/72/72/1&#039;&#039;&#039; or &#039;&#039;&#039;refs/changes/72/72/2&#039;&#039;&#039; depending on the patch set you selected.&lt;br /&gt;
# The default settings are otherwise recommended, i.e. &#039;&#039;&#039;Create a Local Branch&#039;&#039;&#039; and &#039;&#039;Checkout new branch&#039;&#039; to switch to the new branch immediately.&lt;br /&gt;
&lt;br /&gt;
There you have it, a local branch that has exactly the same repository state as in the code to be reviewed. Start testing!&lt;br /&gt;
&lt;br /&gt;
== Platform Git Branching Model ==&lt;br /&gt;
&lt;br /&gt;
Branch naming conventions:&lt;br /&gt;
* features: &amp;lt;code&amp;gt;feature/&amp;lt;PROJECT-NAME&amp;gt;-&amp;lt;issuenumber&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
** Use these for developing a single feature. To keep the version history of feature branches cleaner, merge commit pushing is limited to project owners only. This means that feature branches should be used for implementing a particular thing and then merged back to master or some other branch. They should not be used as locations for eternal development and never ending try-outs.&lt;br /&gt;
* releases: &amp;lt;code&amp;gt;release/x.y.z&amp;lt;/code&amp;gt;, where x, y and z are major, minor and service version numbers respectively.&lt;br /&gt;
** Only for release stabilization branches.&lt;br /&gt;
* private work branches: &amp;lt;code&amp;gt;private/*&amp;lt;/code&amp;gt;.&lt;br /&gt;
** Should be used for personal work, trials and possibly even user or project specific custom branches that need to be kept. Gerrit is not configured enforce any rules on how these branches are used.&lt;br /&gt;
* hotfixes: &amp;lt;code&amp;gt;hotfix/x.y.z.&amp;lt;hotfix number&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic access rights:&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|&#039;&#039;&#039;action&#039;&#039;&#039; \ &#039;&#039;&#039;head&#039;&#039;&#039;||&#039;&#039;&#039;master&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;release/*&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;hotfix/*&#039;&#039;&#039;||&#039;&#039;&#039;feature/*&#039;&#039;&#039;||&#039;&#039;&#039;private/*&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Code Review -/+2&#039;&#039;||Simantics developers||Simantics developers||Simantics developers&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Submit&#039;&#039;||Owners only||Simantics developers||Simantics developers&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Push&#039;&#039;||Owners only||Simantics developers||Simantics developers&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Push Merge Commits&#039;&#039;||Owners only||Owners Only||Simantics developers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The current plan is to loosely follow [http://nvie.com/posts/a-successful-git-branching-model/ GitFlow] rules but we&#039;ve decided to go without a separate &amp;lt;tt&amp;gt;develop&amp;lt;/tt&amp;gt; branch. This means that we treat master as a development version instead of a production version. The actual &amp;lt;tt&amp;gt;release/*&amp;lt;/tt&amp;gt; branches and tags are used to produce production versions. The rationale behind this is that we do not have a continuously evolving production version. Instead we produce new releases and products pick them up as they see fit.&lt;br /&gt;
&lt;br /&gt;
Related reading:&lt;br /&gt;
* [http://nvie.com/posts/a-successful-git-branching-model/ Git Flow branching model] by Vincent Driessen&lt;br /&gt;
* http://endoflineblog.com/gitflow-considered-harmful&lt;br /&gt;
&lt;br /&gt;
== Transferred Projects ==&lt;br /&gt;
&lt;br /&gt;
The following table lists the Git repositories that have been created so far and where their content is from in the SVN repositories.&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|&#039;&#039;&#039;SVN Location&#039;&#039;&#039;||&#039;&#039;&#039;Gerrit project&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|All over https://www.simantics.org/svn/simantics/||https://www.simantics.org:8088/r/#/admin/projects/simantics/platform&lt;br /&gt;
|-&lt;br /&gt;
|https://www.simantics.org/svn/simantics/3d||https://www.simantics.org:8088/r/#/admin/projects/simantics/3d&lt;br /&gt;
|-&lt;br /&gt;
|https://www.simantics.org/svn/simantics/fmi||https://www.simantics.org:8088/r/#/admin/projects/simantics/fmil&lt;br /&gt;
|-&lt;br /&gt;
|https://www.simantics.org/svn/simantics/r||https://www.simantics.org:8088/r/#/admin/projects/simantics/r&lt;br /&gt;
|-&lt;br /&gt;
|Everything except OpenModelica bundles from&amp;lt;br/&amp;gt;https://www.simantics.org/svn/simantics/sysdyn||https://www.simantics.org:8088/r/#/admin/projects/simantics/sysdyn&lt;br /&gt;
|-&lt;br /&gt;
|Parts of https://www.simantics.org/svn/simantics/third-party/trunk||https://www.simantics.org:8088/r/#/admin/projects/simantics/third-party&lt;br /&gt;
|-&lt;br /&gt;
|https://www.simantics.org/svn/members/fmi||https://www.simantics.org:8088/r/#/admin/projects/members/fmi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Still Untransferred Project Locations ===&lt;br /&gt;
&lt;br /&gt;
* https://www.simantics.org/svn/simantics/interoperability&lt;br /&gt;
* https://www.simantics.org/svn/simantics/modelica&lt;br /&gt;
* https://www.simantics.org/svn/simantics/sysdyn: OpenModelica parts need to be put in a separate repository due to the huge size of OM. Preferable this repository should support LFS&lt;br /&gt;
* https://www.simantics.org/svn/simantics/tutorials&lt;br /&gt;
&lt;br /&gt;
== Q &amp;amp; A ==&lt;br /&gt;
&lt;br /&gt;
=== Will the complete SVN history be transferred to Git? ===&lt;br /&gt;
&lt;br /&gt;
Sadly, no it will not, at least for everything that is considered part of the current SVN Simantics SDK (see revisions list on page https://www.simantics.org/jenkins/job/target-simantics-head-sdk/lastStableBuild/).&lt;br /&gt;
&lt;br /&gt;
The reason for not attempting to salvage the full history into git is in the Simantics SVN repository&#039;s structure. In SVN a &amp;quot;project structure&amp;quot; is a single combination of the folders &#039;&#039;trunk&#039;&#039;, &#039;&#039;branches&#039;&#039; and &#039;&#039;tags&#039;&#039;. In git branches and tags do not exist like this as separate directories in the repository itself. The [https://git-scm.com/docs/git-svn git-svn] tool is perfectly capable of transforming a single project structure into git repository with all its history, branches and tags. At some point in the past we for decided to split the SVN repository contents into multiple project structures in the hope of modularizing the platform SDK. That hope never quite realized and what&#039;s worse, that structure has made platform release engineering much more laborous and complex than it would be with a single project structure. Now in this move to Git we decided to simplify things and just put the platform SDK projects back in a single monolithic structure of bundles, features, tests and release engineering projects. All in all, we just didn&#039;t have enough git expertise to be able to transfer all the history scattered in these multiple project structures into a single git repository and moving the current SVN project structures each into its own git repository was not an enticing option either.&lt;br /&gt;
&lt;br /&gt;
So how are we doing it right now? We have a separate migration git repository that contains a python script that simply exports all listed projects from SVN into the simantics-platform git repository structure. Our simantics-platform git repository contains a branch called &#039;svn&#039;. The SVN exporting python script was originally used to initially populate the git repository, back when we were first testing the migration. Another python script is then used to bring in changes from SVN by exporting on top of the existing simantics-platform git repository. These changes are then committed into the svn branch and merged into master from there. We are not using git svn fetch because we&#039;re just not proficient enough with git-svn to be able to use it separately for each and every project that has moved location in git already. The git master branch has already been developed onwards, but merging changes from the svn branch to it is still very easy.&lt;br /&gt;
&lt;br /&gt;
Note that the SVN repository will remain in place to keep all old versions of the platform that are still needed for maintaining existing products. We will not be moving these old branches/versions into git.&lt;br /&gt;
&lt;br /&gt;
Note that in general if you have a single SVN project structure to transfer to git it is recommended to use &amp;lt;code&amp;gt;git svn&amp;lt;/code&amp;gt; to transfer the complete history to Git.&lt;br /&gt;
&lt;br /&gt;
=== How do I convert my SVN repository into a Gerrit/git project &amp;amp; repository? ===&lt;br /&gt;
&lt;br /&gt;
The following is an example of converting a single SVN project location (&amp;lt;code&amp;gt;trunk/,branches/,tags/&amp;lt;/code&amp;gt;) into a Gerrit-hosted git repository. The instructions assume you are working on a Linux installation which has the git command line tools installed.&lt;br /&gt;
&lt;br /&gt;
SVN project structure location to be converted: https://www.simantics.org/svn/simantics/3d/&lt;br /&gt;
&lt;br /&gt;
Firstly, create a new project in Gerrit ([https://www.simantics.org:8088/r/#/admin/create-project/]). Create the project without an empty initial commit because the initial commits will come from the SVN repository anyway. In this example the project name &amp;lt;code&amp;gt;simantics/3d&amp;lt;/code&amp;gt; is used.&lt;br /&gt;
&lt;br /&gt;
Next clone the newly created git repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone ssh://&amp;lt;your-username&amp;gt;@www.simantics.org:29418/simantics/3d.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step into the cloned repository directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd 3d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;git svn&amp;lt;/code&amp;gt; with the correct SVN repository location:&lt;br /&gt;
&amp;lt;pre&amp;gt;git svn init https://www.simantics.org/svn/simantics/3d --stdlayout --prefix=svn/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start fetching commits from the SVN repository into the empty git repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;git svn fetch | tee fetch.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, due to the way in which &amp;lt;code&amp;gt;git svn&amp;lt;/code&amp;gt; converts branches and tags, we want to do a bit of cleanup to convert the branches into local branches before pushing them to the Gerrit&#039;s repository. Download [[Media:git-svn-convert-branches.sh|this shell script]] and execute it in the repository&#039;s root directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;sh Git-svn-convert-branches.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, download [[Media:git-svn-convert-tags.sh|this shell script]] and run it to convert all the tag branches created by &amp;lt;code&amp;gt;git svn&amp;lt;/code&amp;gt; into proper git tags:&lt;br /&gt;
&amp;lt;pre&amp;gt;sh Git-svn-convert-tags.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, check &amp;lt;code&amp;gt;git log --graph --oneline --all --decorate=full&amp;lt;/code&amp;gt; to see whether the conversion turned out to your liking. Also, check how large the repository became. If it turned out larger than you would expect it is probably caused by smaller or larger binary artifacts that have been committed into the SVN repository. If it turns out you want to leave certain projects outside the git svn conversion, you can use the &amp;lt;code&amp;gt;--ignore-paths&amp;lt;/code&amp;gt; argument with &amp;lt;code&amp;gt;git svn init&amp;lt;/code&amp;gt;. For example you could use &amp;lt;code&amp;gt;--ignore-paths &#039;org.simantics.openmodelica|org.simantics.om&#039;&amp;lt;/code&amp;gt; to leave out all projects starting with &amp;lt;code&amp;gt;org.simantics.openmodelica&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;org.simantics.om&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are satisfied, push all the commits and tags to remote &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push --all&lt;br /&gt;
$ git push --tags&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The branch/tag conversion scripts are heavily inspired by the script available at http://timepit.eu/~frank/blog/2008/08/converting_git-svn_tags/.&lt;br /&gt;
&lt;br /&gt;
=== Why are there .keep files in Git repository folders? ===&lt;br /&gt;
&lt;br /&gt;
* https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F&lt;br /&gt;
* http://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository&lt;br /&gt;
&lt;br /&gt;
Our recommendation is to add an empty file named &#039;&#039;.keep&#039;&#039; to the empty folder to ensure it is kept in git.&lt;br /&gt;
&lt;br /&gt;
=== How can I make gerrit check X? ===&lt;br /&gt;
&lt;br /&gt;
Gerrit integrates a prolog based submit rule system that seems to be the ultimate measure for configuring how reviews work. The prolog rules can be used, among other things, to achieve the following:&lt;br /&gt;
* Example 8: Make change submittable only if Code-Review+2 is given by a non author&lt;br /&gt;
* Example 13: 1+1=2 Code-Review&lt;br /&gt;
* Example 15: Only allow Author to submit change&lt;br /&gt;
&lt;br /&gt;
See the cookbook at: https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
We have set 16th December 2016 as the date when the Simantics SVN repository project locations trunks will be made read-only.&lt;br /&gt;
&lt;br /&gt;
Only those locations that have been indicated as transferred to git in [[#Transferred Projects]] have been marked read-only.&lt;br /&gt;
&lt;br /&gt;
== SVN to Git Transition TODO ==&lt;br /&gt;
&lt;br /&gt;
* Test and migrate all products trunk versions on top of the simantics-platform git master branch.&lt;br /&gt;
* &amp;lt;strike&amp;gt;Fix the SDK org.simantics.root build to produce source bundles. It should work already but it just doesn&#039;t at the moment. Perhaps something needs to defined in org.simantics.sdk.repository/pom.xml.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Set a date for when SVN trunks will be changed to read-only (16.12.2016)&amp;lt;/strike&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;E-mail simantics-developers with instructions or links to instructions about the change.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Double check all instructions:&amp;lt;/strike&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Basic Eclipse IDE installation with Simantics graph compiler&amp;lt;/strike&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Git instructions and platform development workflow&amp;lt;/strike&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Gerrit instructions and practices. Only project owners shall have the right for direct push to git repositories. Others must always go through gerrit review. This is enforced via Gerrit access rights.&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Organize brief training and feedback session the current developers (26.10.2016)&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to start thinking about moving your project/product over to Gerrit!&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3312</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3312"/>
		<updated>2016-12-29T14:38:06Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Eclipse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Recommended Reading ==&lt;br /&gt;
&lt;br /&gt;
* Official Gerrit introduction: https://gerrit-review.googlesource.com/Documentation/intro-quick.html.&lt;br /&gt;
* Gerrit tutorial: http://www.vogella.com/tutorials/Gerrit/article.html&lt;br /&gt;
&lt;br /&gt;
== Instructions for Simantics Developers ==&lt;br /&gt;
&lt;br /&gt;
=== Gerrit ===&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account. If you already have a SVN account, it should work also in Gerrit.&lt;br /&gt;
# Generate SSH Public/Private key. If you already have one available, skip this step&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** For Type of key to generate, select &#039;&#039;&#039;SSH-2 RSA&#039;&#039;&#039;&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys in &amp;lt;code&amp;gt;C:\Users\{username}\.ssh&amp;lt;/code&amp;gt; as follows:&lt;br /&gt;
#**** Start cmd.exe and create the target directory using &amp;lt;code&amp;gt;mkdir .ssh&amp;lt;/code&amp;gt;&lt;br /&gt;
#**** Save private key using &#039;&#039;&#039;Conversions -&amp;gt; Export OpenSSH Key&#039;&#039;&#039;. The name &amp;lt;code&amp;gt;id_rsa&amp;lt;/code&amp;gt; is preferred because it will work out of the box with all tools.&lt;br /&gt;
#**** At the top of the window, there is a text field labeled &#039;&#039;&#039;Public key for pasting into OpenSSH authorized_keys&#039;&#039;&#039;. Copy the public key from there and save it into a text file at &amp;lt;code&amp;gt;C:\Users\{username}\.ssh\id_rsa.pub&amp;lt;/code&amp;gt;&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using &amp;lt;code&amp;gt;ssh-keygen -t rsa&amp;lt;/code&amp;gt;&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press &#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;&lt;br /&gt;
# Open the file containing the generated public key in a text editor and copy-paste its contents to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
# Add and verify your contact information (name + e-mail). This will allow administrators to add you to the necessary groups to get commit access:&lt;br /&gt;
#* Go to section &#039;&#039;&#039;Contact Information&#039;&#039;&#039; and enter your &#039;&#039;&#039;Full Name&#039;&#039;&#039; there&lt;br /&gt;
#* Add a &#039;&#039;&#039;Preferred Email&#039;&#039;&#039; address using the button &#039;&#039;&#039;Register New Email&#039;&#039;&#039;&lt;br /&gt;
#* Wait for the authorization mail to arrive. It will look something like the following and contain a longish link that tends to end with == characters. Note that outlook tends to leave the trailing == characters out of the link it generates automatically. That&#039;s why it is recommended to copy the full URL from the mail into your browser to verify your e-mail address.&lt;br /&gt;
&amp;lt;pre&amp;gt;Subject:  [Gerrit Code Review] Email Verification&lt;br /&gt;
&lt;br /&gt;
Welcome to Gerrit Code Review at www.simantics.org.&lt;br /&gt;
&lt;br /&gt;
To add a verified email address to your user account, please&lt;br /&gt;
click on the following link while signed in as .....:&lt;br /&gt;
&lt;br /&gt;
http://www.simantics.org:8088/r/#/../...............................................................................==&lt;br /&gt;
&lt;br /&gt;
If you have received this mail in error, you do not need to take any&lt;br /&gt;
action to cancel the account.  The address will not be activated, and&lt;br /&gt;
you will not receive any further emails.&lt;br /&gt;
&lt;br /&gt;
If clicking the link above does not work, copy and paste the URL in a&lt;br /&gt;
new browser window instead.&lt;br /&gt;
&lt;br /&gt;
This is a send-only email address.  Replies to this message will not&lt;br /&gt;
be read or answered.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, ask [[User:Tuukka Lehtonen]] to add you to the necessary groups and wait for this to happen.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Eclipse ===&lt;br /&gt;
&lt;br /&gt;
The following instructions are written for Eclipse Neon. There might be some differences if you are using Mars.&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you saved the private key.&lt;br /&gt;
# Go to preferences (Team / Git / Configuration) and ensure that the tab &#039;&#039;&#039;User Settings&#039;&#039;&#039; has the following two setting: &amp;lt;code&amp;gt;user.name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;user.email&amp;lt;/code&amp;gt;. The specified name and email must match the values you&#039;ve put in Gerrit to be able to push changes.&amp;lt;br/&amp;gt;[[image:git-global-config.png|400px]]&lt;br /&gt;
#* Also, git has a setting called &amp;lt;code&amp;gt;core.autocrlf&amp;lt;/code&amp;gt; which is used for controlling the way git enforces line feeds to be encoded in a certain way in commits. Read [https://git-scm.com/book/tr/v2/Customizing-Git-Git-Configuration#idp31554304 the documentation] to learn more. We recommend to set it &amp;lt;code&amp;gt;true&amp;lt;/true&amp;gt; in Windows in order to avoid committing CRLFs to repostory.&lt;br /&gt;
#* If you have a git command line client installed you can use the command &amp;lt;code&amp;gt;git config --list --show-origin&amp;lt;/code&amp;gt; to see your current global settings and find out exactly where your settings are coming from.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.&lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects but &#039;&#039;&#039;org.simantics.root&#039;&#039;&#039; and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox and press &#039;&#039;&#039;Ok&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The repository you cloned contains the target platform definition that needs to be set in order for the imported Simantics codebase to compile. You can find the required target platform definition file from &#039;&#039;&#039;org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target&#039;&#039;&#039;. Open it in the target definition editor and set it as the active target platform by pressing the link &#039;&#039;&#039;Set as Target Platform&#039;&#039;&#039; at the top right corner of the editor.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you&#039;ve now set up your workspace for developing the Simantics codebase in Eclipse!&lt;br /&gt;
&lt;br /&gt;
=== Updating your local repository and working space ===&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Committing your changes back to shared repository ===&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a [[#Commit message format|commit message]]&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;.&lt;br /&gt;
#* This is required by Gerrit to be able to bind commits to specific reviews. Gerrit will replace the default zero-valued Id with a generated one when the change is pushed for review.&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
#* Example of a topic: http://www.simantics.org:8088/r/#/q/topic:svn&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# If you need to make modifications to your changes based on reviews, you&#039;ll need to &#039;&#039;Amend&#039;&#039; the earlier changes to send a new patch set to Gerrit. In this case, ensure that the &#039;&#039;Amend (Edit Previous Commit)&#039;&#039; button is toggled down and you should be able to modify the earlier commit message and push the amended changes.&lt;br /&gt;
# When somebody has reviewed and accepted the change with +2, the review page will contain a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;br /&gt;
&lt;br /&gt;
==== Commit message format ====&lt;br /&gt;
&lt;br /&gt;
In Git, the first row of the commit message is used for &#039;&#039;shortlog&#039;&#039; and generating patch file names so keep it short, concise and as descriptive as possible. The commit box in the UI shows a vertical line marking the maximum length of a commit message line and the view will inform you if you&#039;re exceeding limits. Note that the commit message box will automatically break long lines of text into separate lines to help you write a cleanly formatted commit message.&lt;br /&gt;
&lt;br /&gt;
To keep commits attached to [https://www.simantics.org/redmine/ Redmine] issues, use &amp;lt;code&amp;gt;refs #nnn&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;nnn&amp;lt;/code&amp;gt; is the issue number. This must be specified before &#039;&#039;Change-Id:&#039;&#039;. The Simantics platform Gerrit is configured to show &amp;lt;code&amp;gt;refs #nnn&amp;lt;/code&amp;gt; lines as hyperlinks to platform Redmine issues, i.e. to URL &amp;lt;code&amp;gt;https://www.simantics.org/redmine/issues/nnn&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Often platform commits are also related to some issue or issues from other projects built on top of the platform. In order to retain some information about this association in the commit messages we recommend using separate rows in commit messages in form&amp;lt;code&amp;gt;[PRIVATE-mmm]&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;mmm&amp;lt;/code&amp;gt; is the issue number in the other project.&lt;br /&gt;
&lt;br /&gt;
Gerrit reviews require a row starting &#039;&#039;Change-Id:&#039;&#039; as the last row of the commit message (excluding Signed-off-by rows). This allows Gerrit to bind commits to specific reviews. Gerrit will replace the default zero-valued Id with a generated one when the change is pushed for review.&lt;br /&gt;
&lt;br /&gt;
All in all, a typical commit message should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Short description of my change in under 65 characters&lt;br /&gt;
 &lt;br /&gt;
A longer description of my changes&lt;br /&gt;
that can span multiple lines.&lt;br /&gt;
 &lt;br /&gt;
refs #nnn&lt;br /&gt;
[PRIVATE-mmm] (optional, use this if the commit relates to another project)&lt;br /&gt;
&lt;br /&gt;
Change-Id: I0000000000000000000000000000000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simantics Member Read-only Git Access ==&lt;br /&gt;
&lt;br /&gt;
# Register to member wiki at https://www.simantics.org/members/index.php&lt;br /&gt;
# Log into [http://www.simantics.org:8088/r/# Gerrit] using the credentials found at https://www.simantics.org/members/index.php/Code_Repository_Access&lt;br /&gt;
# Clone http://member@www.simantics.org:8088/r/p/simantics/platform.git using the HTTP password found at http://www.simantics.org:8088/r/#/settings/http-password&lt;br /&gt;
&lt;br /&gt;
The [[#Eclipse|instructions for using Eclipse]] with this git repository apply also for the generic member account. Just remember to replace the cloned SSH repository address with the HTTP address shown above.&lt;br /&gt;
&lt;br /&gt;
== Testing Reviewed Changes ==&lt;br /&gt;
&lt;br /&gt;
To test reviewed code changes locally, first you must have an Eclipse IDE setup according to the instructions in [[#Instructions for Simantics Developers]] or [[#Simantics Member Read-only Git Access]].&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s say for example we wish to grab a patch set from a review, such as review #72 (http://www.simantics.org:8088/r/72).&lt;br /&gt;
&lt;br /&gt;
# Open &#039;&#039;&#039;Git&#039;&#039;&#039; perspective&lt;br /&gt;
# Select root node of the cloned simantics-platform repository from the &#039;&#039;&#039;Git Repositories&#039;&#039;&#039; view&lt;br /&gt;
# From the context menu of the repository, select &#039;&#039;&#039;Fetch from Gerrit...&#039;&#039;&#039;&lt;br /&gt;
# In the &#039;&#039;&#039;Change&#039;&#039;&#039; field, type the change number 72 and press CTRL+SPACE to start content assist. Content assist will provide you with the selections &#039;&#039;&#039;72 - 1&#039;&#039;&#039;, and &#039;&#039;&#039;72 - 2&#039;&#039;&#039;, i.e. patch sets 1 and 2 of change 72. After selecting a patch set, the field will be filled with the value &#039;&#039;&#039;refs/changes/72/72/1&#039;&#039;&#039; or &#039;&#039;&#039;refs/changes/72/72/2&#039;&#039;&#039; depending on the patch set you selected.&lt;br /&gt;
# The default settings are otherwise recommended, i.e. &#039;&#039;&#039;Create a Local Branch&#039;&#039;&#039; and &#039;&#039;Checkout new branch&#039;&#039; to switch to the new branch immediately.&lt;br /&gt;
&lt;br /&gt;
There you have it, a local branch that has exactly the same repository state as in the code to be reviewed. Start testing!&lt;br /&gt;
&lt;br /&gt;
== Platform Git Branching Model ==&lt;br /&gt;
&lt;br /&gt;
Branch naming conventions:&lt;br /&gt;
* features: &amp;lt;code&amp;gt;feature/&amp;lt;PROJECT-NAME&amp;gt;-&amp;lt;issuenumber&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
** Use these for developing a single feature. To keep the version history of feature branches cleaner, merge commit pushing is limited to project owners only. This means that feature branches should be used for implementing a particular thing and then merged back to master or some other branch. They should not be used as locations for eternal development and never ending try-outs.&lt;br /&gt;
* releases: &amp;lt;code&amp;gt;release/x.y.z&amp;lt;/code&amp;gt;, where x, y and z are major, minor and service version numbers respectively.&lt;br /&gt;
** Only for release stabilization branches.&lt;br /&gt;
* private work branches: &amp;lt;code&amp;gt;private/*&amp;lt;/code&amp;gt;.&lt;br /&gt;
** Should be used for personal work, trials and possibly even user or project specific custom branches that need to be kept. Gerrit is not configured enforce any rules on how these branches are used.&lt;br /&gt;
* hotfixes: &amp;lt;code&amp;gt;hotfix/x.y.z.&amp;lt;hotfix number&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic access rights:&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|&#039;&#039;&#039;action&#039;&#039;&#039; \ &#039;&#039;&#039;head&#039;&#039;&#039;||&#039;&#039;&#039;master&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;release/*&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;hotfix/*&#039;&#039;&#039;||&#039;&#039;&#039;feature/*&#039;&#039;&#039;||&#039;&#039;&#039;private/*&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Code Review -/+2&#039;&#039;||Simantics developers||Simantics developers||Simantics developers&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Submit&#039;&#039;||Owners only||Simantics developers||Simantics developers&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Push&#039;&#039;||Owners only||Simantics developers||Simantics developers&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Push Merge Commits&#039;&#039;||Owners only||Owners Only||Simantics developers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The current plan is to loosely follow [http://nvie.com/posts/a-successful-git-branching-model/ GitFlow] rules but we&#039;ve decided to go without a separate &amp;lt;tt&amp;gt;develop&amp;lt;/tt&amp;gt; branch. This means that we treat master as a development version instead of a production version. The actual &amp;lt;tt&amp;gt;release/*&amp;lt;/tt&amp;gt; branches and tags are used to produce production versions. The rationale behind this is that we do not have a continuously evolving production version. Instead we produce new releases and products pick them up as they see fit.&lt;br /&gt;
&lt;br /&gt;
Related reading:&lt;br /&gt;
* [http://nvie.com/posts/a-successful-git-branching-model/ Git Flow branching model] by Vincent Driessen&lt;br /&gt;
* http://endoflineblog.com/gitflow-considered-harmful&lt;br /&gt;
&lt;br /&gt;
== Transferred Projects ==&lt;br /&gt;
&lt;br /&gt;
The following table lists the Git repositories that have been created so far and where their content is from in the SVN repositories.&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|&#039;&#039;&#039;SVN Location&#039;&#039;&#039;||&#039;&#039;&#039;Gerrit project&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|All over https://www.simantics.org/svn/simantics/||https://www.simantics.org:8088/r/#/admin/projects/simantics/platform&lt;br /&gt;
|-&lt;br /&gt;
|https://www.simantics.org/svn/simantics/3d||https://www.simantics.org:8088/r/#/admin/projects/simantics/3d&lt;br /&gt;
|-&lt;br /&gt;
|https://www.simantics.org/svn/simantics/fmi||https://www.simantics.org:8088/r/#/admin/projects/simantics/fmil&lt;br /&gt;
|-&lt;br /&gt;
|https://www.simantics.org/svn/simantics/r||https://www.simantics.org:8088/r/#/admin/projects/simantics/r&lt;br /&gt;
|-&lt;br /&gt;
|Everything except OpenModelica bundles from&amp;lt;br/&amp;gt;https://www.simantics.org/svn/simantics/sysdyn||https://www.simantics.org:8088/r/#/admin/projects/simantics/sysdyn&lt;br /&gt;
|-&lt;br /&gt;
|Parts of https://www.simantics.org/svn/simantics/third-party/trunk||https://www.simantics.org:8088/r/#/admin/projects/simantics/third-party&lt;br /&gt;
|-&lt;br /&gt;
|https://www.simantics.org/svn/members/fmi||https://www.simantics.org:8088/r/#/admin/projects/members/fmi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Still Untransferred Project Locations ===&lt;br /&gt;
&lt;br /&gt;
* https://www.simantics.org/svn/simantics/interoperability&lt;br /&gt;
* https://www.simantics.org/svn/simantics/modelica&lt;br /&gt;
* https://www.simantics.org/svn/simantics/sysdyn: OpenModelica parts need to be put in a separate repository due to the huge size of OM. Preferable this repository should support LFS&lt;br /&gt;
* https://www.simantics.org/svn/simantics/tutorials&lt;br /&gt;
&lt;br /&gt;
== Q &amp;amp; A ==&lt;br /&gt;
&lt;br /&gt;
=== Will the complete SVN history be transferred to Git? ===&lt;br /&gt;
&lt;br /&gt;
Sadly, no it will not, at least for everything that is considered part of the current SVN Simantics SDK (see revisions list on page https://www.simantics.org/jenkins/job/target-simantics-head-sdk/lastStableBuild/).&lt;br /&gt;
&lt;br /&gt;
The reason for not attempting to salvage the full history into git is in the Simantics SVN repository&#039;s structure. In SVN a &amp;quot;project structure&amp;quot; is a single combination of the folders &#039;&#039;trunk&#039;&#039;, &#039;&#039;branches&#039;&#039; and &#039;&#039;tags&#039;&#039;. In git branches and tags do not exist like this as separate directories in the repository itself. The [https://git-scm.com/docs/git-svn git-svn] tool is perfectly capable of transforming a single project structure into git repository with all its history, branches and tags. At some point in the past we for decided to split the SVN repository contents into multiple project structures in the hope of modularizing the platform SDK. That hope never quite realized and what&#039;s worse, that structure has made platform release engineering much more laborous and complex than it would be with a single project structure. Now in this move to Git we decided to simplify things and just put the platform SDK projects back in a single monolithic structure of bundles, features, tests and release engineering projects. All in all, we just didn&#039;t have enough git expertise to be able to transfer all the history scattered in these multiple project structures into a single git repository and moving the current SVN project structures each into its own git repository was not an enticing option either.&lt;br /&gt;
&lt;br /&gt;
So how are we doing it right now? We have a separate migration git repository that contains a python script that simply exports all listed projects from SVN into the simantics-platform git repository structure. Our simantics-platform git repository contains a branch called &#039;svn&#039;. The SVN exporting python script was originally used to initially populate the git repository, back when we were first testing the migration. Another python script is then used to bring in changes from SVN by exporting on top of the existing simantics-platform git repository. These changes are then committed into the svn branch and merged into master from there. We are not using git svn fetch because we&#039;re just not proficient enough with git-svn to be able to use it separately for each and every project that has moved location in git already. The git master branch has already been developed onwards, but merging changes from the svn branch to it is still very easy.&lt;br /&gt;
&lt;br /&gt;
Note that the SVN repository will remain in place to keep all old versions of the platform that are still needed for maintaining existing products. We will not be moving these old branches/versions into git.&lt;br /&gt;
&lt;br /&gt;
Note that in general if you have a single SVN project structure to transfer to git it is recommended to use &amp;lt;code&amp;gt;git svn&amp;lt;/code&amp;gt; to transfer the complete history to Git.&lt;br /&gt;
&lt;br /&gt;
=== How do I convert my SVN repository into a Gerrit/git project &amp;amp; repository? ===&lt;br /&gt;
&lt;br /&gt;
The following is an example of converting a single SVN project location (&amp;lt;code&amp;gt;trunk/,branches/,tags/&amp;lt;/code&amp;gt;) into a Gerrit-hosted git repository. The instructions assume you are working on a Linux installation which has the git command line tools installed.&lt;br /&gt;
&lt;br /&gt;
SVN project structure location to be converted: https://www.simantics.org/svn/simantics/3d/&lt;br /&gt;
&lt;br /&gt;
Firstly, create a new project in Gerrit ([https://www.simantics.org:8088/r/#/admin/create-project/]). Create the project without an empty initial commit because the initial commits will come from the SVN repository anyway. In this example the project name &amp;lt;code&amp;gt;simantics/3d&amp;lt;/code&amp;gt; is used.&lt;br /&gt;
&lt;br /&gt;
Next clone the newly created git repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone ssh://&amp;lt;your-username&amp;gt;@www.simantics.org:29418/simantics/3d.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step into the cloned repository directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd 3d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initialize &amp;lt;code&amp;gt;git svn&amp;lt;/code&amp;gt; with the correct SVN repository location:&lt;br /&gt;
&amp;lt;pre&amp;gt;git svn init https://www.simantics.org/svn/simantics/3d --stdlayout --prefix=svn/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start fetching commits from the SVN repository into the empty git repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;git svn fetch | tee fetch.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, due to the way in which &amp;lt;code&amp;gt;git svn&amp;lt;/code&amp;gt; converts branches and tags, we want to do a bit of cleanup to convert the branches into local branches before pushing them to the Gerrit&#039;s repository. Download [[Media:git-svn-convert-branches.sh|this shell script]] and execute it in the repository&#039;s root directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;sh Git-svn-convert-branches.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, download [[Media:git-svn-convert-tags.sh|this shell script]] and run it to convert all the tag branches created by &amp;lt;code&amp;gt;git svn&amp;lt;/code&amp;gt; into proper git tags:&lt;br /&gt;
&amp;lt;pre&amp;gt;sh Git-svn-convert-tags.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, check &amp;lt;code&amp;gt;git log --graph --oneline --all --decorate=full&amp;lt;/code&amp;gt; to see whether the conversion turned out to your liking. Also, check how large the repository became. If it turned out larger than you would expect it is probably caused by smaller or larger binary artifacts that have been committed into the SVN repository. If it turns out you want to leave certain projects outside the git svn conversion, you can use the &amp;lt;code&amp;gt;--ignore-paths&amp;lt;/code&amp;gt; argument with &amp;lt;code&amp;gt;git svn init&amp;lt;/code&amp;gt;. For example you could use &amp;lt;code&amp;gt;--ignore-paths &#039;org.simantics.openmodelica|org.simantics.om&#039;&amp;lt;/code&amp;gt; to leave out all projects starting with &amp;lt;code&amp;gt;org.simantics.openmodelica&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;org.simantics.om&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are satisfied, push all the commits and tags to remote &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push --all&lt;br /&gt;
$ git push --tags&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The branch/tag conversion scripts are heavily inspired by the script available at http://timepit.eu/~frank/blog/2008/08/converting_git-svn_tags/.&lt;br /&gt;
&lt;br /&gt;
=== Why are there .keep files in Git repository folders? ===&lt;br /&gt;
&lt;br /&gt;
* https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F&lt;br /&gt;
* http://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository&lt;br /&gt;
&lt;br /&gt;
Our recommendation is to add an empty file named &#039;&#039;.keep&#039;&#039; to the empty folder to ensure it is kept in git.&lt;br /&gt;
&lt;br /&gt;
=== How can I make gerrit check X? ===&lt;br /&gt;
&lt;br /&gt;
Gerrit integrates a prolog based submit rule system that seems to be the ultimate measure for configuring how reviews work. The prolog rules can be used, among other things, to achieve the following:&lt;br /&gt;
* Example 8: Make change submittable only if Code-Review+2 is given by a non author&lt;br /&gt;
* Example 13: 1+1=2 Code-Review&lt;br /&gt;
* Example 15: Only allow Author to submit change&lt;br /&gt;
&lt;br /&gt;
See the cookbook at: https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
We have set 16th December 2016 as the date when the Simantics SVN repository project locations trunks will be made read-only.&lt;br /&gt;
&lt;br /&gt;
Only those locations that have been indicated as transferred to git in [[#Transferred Projects]] have been marked read-only.&lt;br /&gt;
&lt;br /&gt;
== SVN to Git Transition TODO ==&lt;br /&gt;
&lt;br /&gt;
* Test and migrate all products trunk versions on top of the simantics-platform git master branch.&lt;br /&gt;
* &amp;lt;strike&amp;gt;Fix the SDK org.simantics.root build to produce source bundles. It should work already but it just doesn&#039;t at the moment. Perhaps something needs to defined in org.simantics.sdk.repository/pom.xml.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Set a date for when SVN trunks will be changed to read-only (16.12.2016)&amp;lt;/strike&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;E-mail simantics-developers with instructions or links to instructions about the change.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Double check all instructions:&amp;lt;/strike&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Basic Eclipse IDE installation with Simantics graph compiler&amp;lt;/strike&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Git instructions and platform development workflow&amp;lt;/strike&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Gerrit instructions and practices. Only project owners shall have the right for direct push to git repositories. Others must always go through gerrit review. This is enforced via Gerrit access rights.&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Organize brief training and feedback session the current developers (26.10.2016)&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to start thinking about moving your project/product over to Gerrit!&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=SCL_Tutorial&amp;diff=3294</id>
		<title>SCL Tutorial</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=SCL_Tutorial&amp;diff=3294"/>
		<updated>2016-11-22T15:21:52Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Importing functionality from Java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Simantics Constraint Language]]&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
The easiest way of getting started with SCL is to use SCL console that is included in almost all Simantics-based products. You can open the console by pressing ALT-SHIFT-q and then q and choosing &amp;quot;SCL Console&amp;quot; from the list of views.&lt;br /&gt;
&lt;br /&gt;
SCL console works by executing commands you write into the input box in the bottom of the view. After the command has been written, it can be executed by pressing ENTER. However, this works only if the command contains no syntactic errors. Possible errors are highlighted in the input box and a description of the error is shown when you move mouse on top of the highlighted text.&lt;br /&gt;
&lt;br /&gt;
Multiline commands can be written by pressing CTRL-ENTER (or just ENTER when the current command text contains errors). The command history can be browsed with CTRL-UP and CTRL-DOWN.&lt;br /&gt;
&lt;br /&gt;
If the command you write into console results as an ordinary value, it is just printed to the console. Here are couple of examples you can try:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; 13&lt;br /&gt;
13&lt;br /&gt;
&amp;gt; 1+2&lt;br /&gt;
3&lt;br /&gt;
&amp;gt; sin 1&lt;br /&gt;
0.8414709848078965&lt;br /&gt;
&amp;gt; &amp;quot;Hello &amp;quot; + &amp;quot;world!&amp;quot;&lt;br /&gt;
Hello world!&lt;br /&gt;
&amp;gt; [1,3,5]&lt;br /&gt;
[1, 3, 5]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also declare local variables to be used in the commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; x = 35&lt;br /&gt;
&amp;gt; y = 40&lt;br /&gt;
&amp;gt; x + y&lt;br /&gt;
75&lt;br /&gt;
&amp;gt; x * y&lt;br /&gt;
1400&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also new functions can be defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; f x = x * x&lt;br /&gt;
&amp;gt; f 123&lt;br /&gt;
15129&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you write a command that has side-effects, it is executed in the console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; print &amp;quot;Hello&amp;quot; ; print &amp;quot;world!&amp;quot;&lt;br /&gt;
Hello&lt;br /&gt;
world!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SCL is a dialect of Haskell and tutorials written for Haskell can be used for learning the details of the language. The main differences between the languages are the strict evaluation strategy used in SCL and somewhat different standard library. Some Haskell tutorials can be found at [http://www.haskell.org/haskellwiki/Learning_Haskell http://www.haskell.org/haskellwiki/Learning_Haskell].&lt;br /&gt;
&lt;br /&gt;
== Extending SCL environment ==&lt;br /&gt;
&lt;br /&gt;
The SCL values, data types etc. that are available in expressions and commands are defined in SCL modules. Currently all SCL modules must be part of the product plugins (in the future, you can also write modules inside the models). Each module is identified by a URI.&lt;br /&gt;
&lt;br /&gt;
SCL module is a text file ending with extension &amp;quot;.scl&amp;quot;. The recommended place for modules is scl/ folder under plugin root, but also other directories can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;scl/Test1.scl:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fib :: Integer -&amp;gt; Integer&lt;br /&gt;
fib x | x &amp;lt;= 1    = 1&lt;br /&gt;
      | otherwise = fib (x-1) + fib (x-2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A directory is declared as a SCL package with the following kind of extension points defined in org.simantics.scl.runtime:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   &amp;lt;extension point=&amp;quot;org.simantics.scl.runtime.package&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;package URI=&amp;quot;http://www.simantics.org/Tests&amp;quot;&lt;br /&gt;
               directory=&amp;quot;scl&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/extension&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module is not automatically available in the console, but you must run an import declaration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; import &amp;quot;http://www.simantics.org/Tests/Test1&amp;quot; as Test1&lt;br /&gt;
&amp;gt; Test1.fib 13&lt;br /&gt;
377&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Import declaration can also be used in modules to refer other modules. Cyclic module dependencies are not allowed.&lt;br /&gt;
&lt;br /&gt;
== Importing functionality from Java ==&lt;br /&gt;
&lt;br /&gt;
Java interfaces and classes can be imported from Java by declaring them inside importJava block:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
importJava &amp;quot;java.util.regex.Pattern&amp;quot; where&lt;br /&gt;
    data Pattern&lt;br /&gt;
&lt;br /&gt;
importJava &amp;quot;java.util.List&amp;quot; where&lt;br /&gt;
    data List a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Java methods, constructors and fields can be similarly imported by giving&lt;br /&gt;
their type annotations in importJava block:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
importJava &amp;quot;java.util.regex.Pattern&amp;quot; where&lt;br /&gt;
    @JavaName compile&lt;br /&gt;
    compilePattern :: String -&amp;gt; Pattern&lt;br /&gt;
&lt;br /&gt;
    @JavaName matcher&lt;br /&gt;
    createMatcher :: Pattern -&amp;gt; String -&amp;gt; &amp;lt;Proc&amp;gt; Matcher&lt;br /&gt;
&lt;br /&gt;
importJava &amp;quot;java.util.regex.Matcher&amp;quot; where&lt;br /&gt;
    data Matcher&lt;br /&gt;
&lt;br /&gt;
    @JavaName matches&lt;br /&gt;
    matcherMatches :: Matcher -&amp;gt; &amp;lt;Proc&amp;gt; Boolean&lt;br /&gt;
&lt;br /&gt;
matches : Pattern -&amp;gt; String -&amp;gt; &amp;lt;Proc&amp;gt; Boolean&lt;br /&gt;
matches pattern text = do&lt;br /&gt;
    matcherMatches (createMatcher pattern text)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
importJava &amp;quot;java.util.ArrayList&amp;quot; where&lt;br /&gt;
    @JavaName &amp;quot;&amp;lt;init&amp;gt;&amp;quot;&lt;br /&gt;
    createArrayList :: () -&amp;gt; &amp;lt;Proc&amp;gt; List a&lt;br /&gt;
&lt;br /&gt;
    @JavaName &amp;quot;&amp;lt;init&amp;gt;&amp;quot;&lt;br /&gt;
    createArrayListWithCapacity :: Integer -&amp;gt; &amp;lt;Proc&amp;gt; List a&lt;br /&gt;
&lt;br /&gt;
    @JavaName size&lt;br /&gt;
    sizeList :: List a -&amp;gt; &amp;lt;Proc&amp;gt; Integer&lt;br /&gt;
&lt;br /&gt;
    @JavaName get&lt;br /&gt;
    getList :: List a -&amp;gt; Integer -&amp;gt; &amp;lt;Proc&amp;gt; a&lt;br /&gt;
&lt;br /&gt;
    @JavaName set&lt;br /&gt;
    setList :: List a -&amp;gt; Integer -&amp;gt; a -&amp;gt; &amp;lt;Proc&amp;gt; ()&lt;br /&gt;
&lt;br /&gt;
    @JavaName add&lt;br /&gt;
    addList :: List a -&amp;gt; a -&amp;gt; &amp;lt;Proc&amp;gt; Boolean&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Java constructor is referred with &amp;quot;&amp;lt;init&amp;gt;&amp;quot;. If Java method name and SCL name matches the annotation @JavaName can be left out. Java import mechanism tries to be quite flexible. It provides some arguments based on the effects the function has. It also ignores the return value of the Java method if return type is () in SCL. &lt;br /&gt;
&lt;br /&gt;
A major functionality currently still missing is the ability to create new implementations of existing Java interfaces in SCL code or extend an existing class. This can be worked around currently by writing new implementations in Java.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3274</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3274"/>
		<updated>2016-09-30T13:38:12Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Instructions for Simantics Developers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Recommended Reading ==&lt;br /&gt;
&lt;br /&gt;
* Official Gerrit introduction: https://gerrit-review.googlesource.com/Documentation/intro-quick.html.&lt;br /&gt;
* Gerrit tutorial: http://www.vogella.com/tutorials/Gerrit/article.html&lt;br /&gt;
&lt;br /&gt;
== Instructions for Simantics Developers ==&lt;br /&gt;
&lt;br /&gt;
=== Gerrit ===&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account. If you already have a SVN account, it should work also in Gerrit.&lt;br /&gt;
# Generate SSH Public/Private key. If you already have one available, skip this step&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** For Type of key to generate, select &#039;&#039;&#039;SSH-2 RSA&#039;&#039;&#039;&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys in &amp;lt;code&amp;gt;C:\Users\{username}\.ssh&amp;lt;/code&amp;gt; as follows:&lt;br /&gt;
#**** Start cmd.exe and create the target directory using &amp;lt;code&amp;gt;mkdir .ssh&amp;lt;/code&amp;gt;&lt;br /&gt;
#**** Save private key using &#039;&#039;&#039;Conversions -&amp;gt; Export OpenSSH Key&#039;&#039;&#039;. The name &amp;lt;code&amp;gt;id_rsa&amp;lt;/code&amp;gt; is preferred because it will work out of the box with all tools.&lt;br /&gt;
#**** At the top of the window, there is a text field labeled &#039;&#039;&#039;Public key for pasting into OpenSSH authorized_keys&#039;&#039;&#039;. Copy the public key from there and save it into a text file at &amp;lt;code&amp;gt;C:\Users\{username}\.ssh\id_rsa.pub&amp;lt;/code&amp;gt;&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using &amp;lt;code&amp;gt;ssh-keygen -t rsa&amp;lt;/code&amp;gt;&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press &#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;&lt;br /&gt;
# Open the file containing the generated public key in a text editor and copy-paste its contents to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
# Add and verify your contact information (name + e-mail). This will allow administrators to add you to the necessary groups to get commit access:&lt;br /&gt;
#* Go to section &#039;&#039;&#039;Contact Information&#039;&#039;&#039; and enter your &#039;&#039;&#039;Full Name&#039;&#039;&#039; there&lt;br /&gt;
#* Add a &#039;&#039;&#039;Preferred Email&#039;&#039;&#039; address using the button &#039;&#039;&#039;Register New Email&#039;&#039;&#039;&lt;br /&gt;
#* Wait for the authorization mail to arrive. It will look something like the following and contain a longish link that tends to end with == characters. Note that outlook tends to leave the trailing == characters out of the link it generates automatically. That&#039;s why it is recommended to copy the full URL from the mail into your browser to verify your e-mail address.&lt;br /&gt;
&amp;lt;pre&amp;gt;Subject:  [Gerrit Code Review] Email Verification&lt;br /&gt;
&lt;br /&gt;
Welcome to Gerrit Code Review at www.simantics.org.&lt;br /&gt;
&lt;br /&gt;
To add a verified email address to your user account, please&lt;br /&gt;
click on the following link while signed in as .....:&lt;br /&gt;
&lt;br /&gt;
http://www.simantics.org:8088/r/#/../...............................................................................==&lt;br /&gt;
&lt;br /&gt;
If you have received this mail in error, you do not need to take any&lt;br /&gt;
action to cancel the account.  The address will not be activated, and&lt;br /&gt;
you will not receive any further emails.&lt;br /&gt;
&lt;br /&gt;
If clicking the link above does not work, copy and paste the URL in a&lt;br /&gt;
new browser window instead.&lt;br /&gt;
&lt;br /&gt;
This is a send-only email address.  Replies to this message will not&lt;br /&gt;
be read or answered.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, ask [[User:Tuukka Lehtonen]] to add you to the necessary groups and wait for this to happen.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Eclipse ===&lt;br /&gt;
&lt;br /&gt;
The following instructions are written for Eclipse Neon. There might be some differences if you are using Mars.&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you saved the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.&lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects but &#039;&#039;&#039;org.simantics.root&#039;&#039;&#039; and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox and press &#039;&#039;&#039;Ok&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The repository you cloned contains the target platform definition that needs to be set in order for the imported Simantics codebase to compile. You can find the required target platform definition file from &#039;&#039;&#039;org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target&#039;&#039;&#039;. Open it in the target definition editor and set it as the active target platform by pressing the link &#039;&#039;&#039;Set as Target Platform&#039;&#039;&#039; at the top right corner of the editor.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you&#039;ve now set up your workspace for developing the Simantics codebase in Eclipse!&lt;br /&gt;
&lt;br /&gt;
=== Updating your local repository and working space ===&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Committing your changes back to shared repository ===&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a [[#Commit message format|commit message]]&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;.&lt;br /&gt;
#* This is required by Gerrit to be able to bind commits to specific reviews. Gerrit will replace the default zero-valued Id with a generated one when the change is pushed for review.&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
#* Example of a topic: http://www.simantics.org:8088/r/#/q/topic:svn&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# If you need to make modifications to your changes based on reviews, you&#039;ll need to &#039;&#039;Amend&#039;&#039; the earlier changes to send a new patch set to Gerrit. In this case, ensure that the &#039;&#039;Amend (Edit Previous Commit)&#039;&#039; button is toggled down and you should be able to modify the earlier commit message and push the amended changes.&lt;br /&gt;
# When somebody has reviewed and accepted the change with +2, the review page will contain a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;br /&gt;
&lt;br /&gt;
==== Commit message format ====&lt;br /&gt;
&lt;br /&gt;
In Git, the first row of the commit message is used for &#039;&#039;shortlog&#039;&#039; and generating patch file names so keep it short, concise and as descriptive as possible. The commit box in the UI shows a vertical line marking the maximum length of a commit message line and the view will inform you if you&#039;re exceeding limits. Note that the commit message box will automatically break long lines of text into separate lines to help you write a cleanly formatted commit message.&lt;br /&gt;
&lt;br /&gt;
To keep commits attached to [https://www.simantics.org/redmine/ Redmine] issues, use &amp;lt;code&amp;gt;refs #nnn&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;nnn&amp;lt;/code&amp;gt; is the issue number. This must be specified before &#039;&#039;Change-Id:&#039;&#039;. The Simantics platform Gerrit is configured to show &amp;lt;code&amp;gt;refs #nnn&amp;lt;/code&amp;gt; lines as hyperlinks to platform Redmine issues, i.e. to URL &amp;lt;code&amp;gt;https://www.simantics.org/redmine/issues/nnn&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Gerrit reviews require a row starting &#039;&#039;Change-Id:&#039;&#039; as the last row of the commit message (excluding Signed-off-by rows). This allows Gerrit to bind commits to specific reviews. Gerrit will replace the default zero-valued Id with a generated one when the change is pushed for review.&lt;br /&gt;
&lt;br /&gt;
All in all, a typical commit message should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Short description of my change&lt;br /&gt;
 &lt;br /&gt;
A longer description of my changes&lt;br /&gt;
that can span multiple lines.&lt;br /&gt;
 &lt;br /&gt;
refs #nnn&lt;br /&gt;
&lt;br /&gt;
Change-Id: I0000000000000000000000000000000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simantics Member Read-only Git Access ==&lt;br /&gt;
&lt;br /&gt;
# Register to member wiki at https://www.simantics.org/members/index.php&lt;br /&gt;
# Log into [http://www.simantics.org:8088/r/# Gerrit] using the credentials found at https://www.simantics.org/members/index.php/Code_Repository_Access&lt;br /&gt;
# Clone http://member@www.simantics.org:8088/r/p/simantics/platform.git using the HTTP password found at http://www.simantics.org:8088/r/#/settings/http-password&lt;br /&gt;
&lt;br /&gt;
The [[#Eclipse|instructions for using Eclipse]] with this git repository apply also for the generic member account. Just remember to replace the cloned SSH repository address with the HTTP address shown above.&lt;br /&gt;
&lt;br /&gt;
== Testing Reviewed Changes ==&lt;br /&gt;
&lt;br /&gt;
To test reviewed code changes locally, first you must have an Eclipse IDE setup according to the instructions in [[#Instructions for Simantics Developers]] or [[#Simantics Member Read-only Git Access]].&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s say for example we wish to grab a patch set from a review, such as review #72 (http://www.simantics.org:8088/r/72).&lt;br /&gt;
&lt;br /&gt;
# Open &#039;&#039;&#039;Git&#039;&#039;&#039; perspective&lt;br /&gt;
# Select root node of the cloned simantics-platform repository from the &#039;&#039;&#039;Git Repositories&#039;&#039;&#039; view&lt;br /&gt;
# From the context menu of the repository, select &#039;&#039;&#039;Fetch from Gerrit...&#039;&#039;&#039;&lt;br /&gt;
# In the &#039;&#039;&#039;Change&#039;&#039;&#039; field, type the change number 72 and press CTRL+SPACE to start content assist. Content assist will provide you with the selections &#039;&#039;&#039;72 - 1&#039;&#039;&#039;, and &#039;&#039;&#039;72 - 2&#039;&#039;&#039;, i.e. patch sets 1 and 2 of change 72. After selecting a patch set, the field will be filled with the value &#039;&#039;&#039;refs/changes/72/72/1&#039;&#039;&#039; or &#039;&#039;&#039;refs/changes/72/72/2&#039;&#039;&#039; depending on the patch set you selected.&lt;br /&gt;
# The default settings are otherwise recommended, i.e. &#039;&#039;&#039;Create a Local Branch&#039;&#039;&#039; and &#039;&#039;Checkout new branch&#039;&#039; to switch to the new branch immediately.&lt;br /&gt;
&lt;br /&gt;
There you have it, a local branch that has exactly the same repository state as in the code to be reviewed. Start testing!&lt;br /&gt;
&lt;br /&gt;
== Platform Git Branching Model ==&lt;br /&gt;
&lt;br /&gt;
The current plan is to follow the [http://nvie.com/posts/a-successful-git-branching-model/ Git Flow branching model] by Vincent Driessen. Vincent&#039;s original post explains the model better than we can.&lt;br /&gt;
&lt;br /&gt;
Branch naming conventions:&lt;br /&gt;
* features: &amp;lt;code&amp;gt;feature/&amp;lt;PROJECT-NAME&amp;gt;-&amp;lt;issuenumber&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* releases: &amp;lt;code&amp;gt;release/x.y.z&amp;lt;/code&amp;gt;, where x, y and z are major, minor and service version numbers respectively.&lt;br /&gt;
* hotfixes: &amp;lt;code&amp;gt;hotfix/x.y.z.&amp;lt;hotfix number&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Eclipse has a separate plug-in called &#039;&#039;&#039;Eclipse Git Team Provider - Gitflow support&#039;&#039;&#039; to simplify the gitflow process in Eclipse. You can install it from the Eclipse release train update site for Eclipse Mars and Neon.&lt;br /&gt;
&lt;br /&gt;
== Q &amp;amp; A ==&lt;br /&gt;
&lt;br /&gt;
=== Will the complete SVN history be transferred to Git? ===&lt;br /&gt;
&lt;br /&gt;
Sadly, no it will not, at least for everything that is considered part of the current SVN Simantics SDK (see revisions list on page https://www.simantics.org/jenkins/job/target-simantics-head-sdk/lastStableBuild/).&lt;br /&gt;
&lt;br /&gt;
The reason for not attempting to salvage the full history into git is in the Simantics SVN repository&#039;s structure. In SVN a &amp;quot;project structure&amp;quot; is a single combination of the folders &#039;&#039;trunk&#039;&#039;, &#039;&#039;branches&#039;&#039; and &#039;&#039;tags&#039;&#039;. In git branches and tags do not exist like this as separate directories in the repository itself. The [https://git-scm.com/docs/git-svn git-svn] tool is perfectly capable of transforming a single project structure into git repository with all its history, branches and tags. At some point in the past we for decided to split the SVN repository contents into multiple project structures in the hope of modularizing the platform SDK. That hope never quite realized and what&#039;s worse, that structure has made platform release engineering much more laborous and complex than it would be with a single project structure. Now in this move to Git we decided to simplify things and just put the platform SDK projects back in a single monolithic structure of bundles, features, tests and release engineering projects. All in all, we just didn&#039;t have enough git expertise to be able to transfer all the history scattered in these multiple project structures into a single git repository and moving the current SVN project structures each into its own git repository was not an enticing option either.&lt;br /&gt;
&lt;br /&gt;
So how are we doing it right now? We have a separate migration git repository that contains a python script that simply exports all listed projects from SVN into the simantics-platform git repository structure. Our simantics-platform git repository contains a branch called &#039;svn&#039;. The SVN exporting python script was originally used to initially populate the git repository, back when we were first testing the migration. Another python script is then used to bring in changes from SVN by exporting on top of the existing simantics-platform git repository. These changes are then committed into the svn branch and merged into master from there. We are not using git svn fetch because we&#039;re just not proficient enough with git-svn to be able to use it separately for each and every project that has moved location in git already. The git master branch has already been developed onwards, but merging changes from the svn branch to it is still very easy.&lt;br /&gt;
&lt;br /&gt;
Note that the SVN repository will remain in place to keep all old versions of the platform that are still needed for maintaining existing products. We will not be moving these old branches/versions into git.&lt;br /&gt;
&lt;br /&gt;
=== Why are there .keep files in Git repository folders? ===&lt;br /&gt;
&lt;br /&gt;
* https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F&lt;br /&gt;
* http://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository&lt;br /&gt;
&lt;br /&gt;
Our recommendation is to add an empty file named &#039;&#039;.keep&#039;&#039; to the empty folder to ensure it is kept in git.&lt;br /&gt;
&lt;br /&gt;
== SVN to Git Transition TODO ==&lt;br /&gt;
&lt;br /&gt;
* Fix the SDK org.simantics.root build to produce source bundles. It should work already but it just doesn&#039;t at the moment. Perhaps something needs to defined in org.simantics.sdk.repository/pom.xml.&lt;br /&gt;
* Set a date for when SVN trunks will be changed to read-only&lt;br /&gt;
* Double check all instructions:&lt;br /&gt;
** Basic Eclipse IDE installation with Simantics graph compiler&lt;br /&gt;
** Git instructions and platform development workflow&lt;br /&gt;
** Gerrit instructions and practices&lt;br /&gt;
*** Only project owners shall have the right for direct push to git repositories. Others must always go through gerrit review. This is enforced via Gerrit access rights.&lt;br /&gt;
* Test and migrate all products trunk versions on top of the simantics-platform git master branch.&lt;br /&gt;
* E-mail developers with instructions or links to instructions about the change.&lt;br /&gt;
&lt;br /&gt;
The next step is to start thinking about moving your project/product over to Gerrit!&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3232</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3232"/>
		<updated>2016-08-18T11:31:16Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Eclipse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Recommended Reading ==&lt;br /&gt;
&lt;br /&gt;
* Gerrit introduction: https://gerrit-review.googlesource.com/Documentation/intro-quick.html.&lt;br /&gt;
&lt;br /&gt;
== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account. If your already have a SVN account, it should work also in Gerrit.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press &#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are written for Eclipse Neon. There might be some differences if you are using Mars.&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you saved the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.&lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects but &#039;&#039;&#039;org.simantics.root&#039;&#039;&#039; and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
== Updating your local repository and working space ==&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Committing your changes back to shared repository ==&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a commit message.&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
#* Example of a topic: http://www.simantics.org:8088/r/#/q/topic:svnMerge&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# When somebody has reviewed the change, the review page contains a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3231</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3231"/>
		<updated>2016-08-18T11:30:58Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Eclipse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Recommended Reading ==&lt;br /&gt;
&lt;br /&gt;
* Gerrit introduction: https://gerrit-review.googlesource.com/Documentation/intro-quick.html.&lt;br /&gt;
&lt;br /&gt;
== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account. If your already have a SVN account, it should work also in Gerrit.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press &#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are written for Eclipse Neon. There might be some differences if you are using Mars.&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you saved the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.&lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects but org.simantics.root and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
== Updating your local repository and working space ==&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Committing your changes back to shared repository ==&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a commit message.&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
#* Example of a topic: http://www.simantics.org:8088/r/#/q/topic:svnMerge&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# When somebody has reviewed the change, the review page contains a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3229</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3229"/>
		<updated>2016-08-17T07:11:22Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account. If your already have a SVN account, it should work also in Gerrit.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press &#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are written for Eclipse Neon. There might be some differences if you are using Mars.&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you saved the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.&lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects (default) and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
== Updating your local repository and working space ==&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Committing your changes back to shared repository ==&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a commit message.&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
#* Example of a topic: http://www.simantics.org:8088/r/#/q/topic:svnMerge&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# When somebody has reviewed the change, the review page contains a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3226</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3226"/>
		<updated>2016-08-16T07:54:52Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account. If your already have a SVN account, it should work also in Gerrit.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press &#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you saved the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.Repositories &lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects (default) and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
== Updating your local repository and working space ==&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Committing your changes back to shared repository ==&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a commit message.&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# When somebody has reviewed the change, the review page contains a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3224</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3224"/>
		<updated>2016-08-16T07:52:47Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account. If your already have a SVN account, it should work also in Gerrit.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press&#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you generated the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.Repositories &lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects (default) and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
== Updating your local repository and working space ==&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Committing your changes back to shared repository ==&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a commit message.&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# When somebody has reviewed the change, the review page contains a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3223</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3223"/>
		<updated>2016-08-16T07:51:21Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press&#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you generated the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.Repositories &lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects (default) and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
== Updating your local repository and working space ==&lt;br /&gt;
&lt;br /&gt;
# Open context menu on &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and select &#039;&#039;&#039;Pull&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Committing your changes back to shared repository ==&lt;br /&gt;
&lt;br /&gt;
# Select &#039;&#039;&#039;platform&#039;&#039;&#039; in the Git perspective and open &#039;&#039;&#039;Git Staging&#039;&#039;&#039; view.&lt;br /&gt;
# &#039;&#039;&#039;Unstaged Changes&#039;&#039;&#039; shows all files you have modified.&lt;br /&gt;
# Drag&amp;amp;drop those changes you want to commit to the box &#039;&#039;&#039;Staged Changes&#039;&#039;&#039;.&lt;br /&gt;
# Write a commit message.&lt;br /&gt;
# Ensure that &#039;&#039;&#039;Add Change-Id&#039;&#039;&#039; button is toggled down and the commit message contains a row starting &#039;&#039;Change-Id:&#039;&#039;&lt;br /&gt;
# Press &#039;&#039;&#039;Commit and Push...&#039;&#039;&#039;&lt;br /&gt;
# This opens a dialog that asks the Gerrit Branch and a Topic. Topic can be added optionally to tie multiple changes together.&lt;br /&gt;
# Go to Gerrit. In the top-left menu select &#039;&#039;&#039;My&#039;&#039;&#039; and select &#039;&#039;&#039;Changes&#039;&#039;&#039;.&lt;br /&gt;
# Your change can be seen now in the section &#039;&#039;&#039;Outgoing reviews&#039;&#039;&#039;.&lt;br /&gt;
# Click the change. This opens a review page.&lt;br /&gt;
# Ask someone to review your change. This can be done also in Gerrit by pressing &#039;&#039;&#039;Add...&#039;&#039;&#039; button in the right of the &#039;&#039;&#039;Reviewers&#039;&#039;&#039; field.&lt;br /&gt;
# When somebody has reviewed the change, the review page contains a &#039;&#039;&#039;Submit&#039;&#039;&#039; button that can be used to merge the change to the master branch.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3222</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3222"/>
		<updated>2016-08-16T07:39:50Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press&#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you generated the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.Repositories &lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects (default) and press Finish.&lt;br /&gt;
# Expand the tree view of &#039;&#039;&#039;platform&#039;&#039;&#039;, expand &#039;&#039;&#039;Branches&#039;&#039;&#039; under it and &#039;&#039;&#039;Local&#039;&#039;&#039; under it. Open context menu on &#039;&#039;&#039;master&#039;&#039;&#039; branch and select &#039;&#039;&#039;Configure Branch...&#039;&#039;&#039;. Select &#039;&#039;&#039;Rebase&#039;&#039;&#039; checkbox.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3221</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3221"/>
		<updated>2016-08-16T07:37:51Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#*** Press &#039;&#039;&#039;Generate&#039;&#039;&#039; button&lt;br /&gt;
#*** Move your mouse over the window until the progress bar is finished&lt;br /&gt;
#*** Write a &#039;&#039;&#039;Key passphrase&#039;&#039;&#039; to protect your private key in case your local machine is compromised. &lt;br /&gt;
#*** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press&#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you generated the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.Repositories &lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects (default) and press Finish.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3220</id>
		<title>Migration To Git</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Migration_To_Git&amp;diff=3220"/>
		<updated>2016-08-16T07:31:02Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: Created page with &amp;quot;== Gerrit ==  # Request a Gerrit account. # Generate SSH Public/Private key #* Windows #** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org....&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Gerrit ==&lt;br /&gt;
&lt;br /&gt;
# Request a Gerrit account.&lt;br /&gt;
# Generate SSH Public/Private key&lt;br /&gt;
#* Windows&lt;br /&gt;
#** Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)&lt;br /&gt;
#** Run PuTTYgen and generate a key&lt;br /&gt;
#** It is recommended to add a passphrase to your private key so that it cannot be used even if your local machine is compromised&lt;br /&gt;
#** Save the generated public and private keys to C:\Users\{username}\.ssh.&lt;br /&gt;
#* Linux&lt;br /&gt;
#** Generate public and private keys using ssh-keygen.&lt;br /&gt;
# Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password&lt;br /&gt;
# Select your name in the top-right corner and press&#039;&#039;Settings&#039;&#039;&lt;br /&gt;
# Go to section &#039;&#039;&#039;SSH Public Keys&#039;&#039;&#039;, select &#039;&#039;&#039;Add Key ...&#039;&#039;&#039;. &lt;br /&gt;
# Paste the generated public key to the box and and press &#039;&#039;&#039;Add&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Eclipse ==&lt;br /&gt;
&lt;br /&gt;
# Go to preferences (General / Network Connections / SSH2) and ensure that &#039;&#039;&#039;SSH2 home&#039;&#039;&#039; points to the directory where you generated the private key.&lt;br /&gt;
# Open &#039;&#039;Git&#039;&#039; perspective&lt;br /&gt;
# Press button &#039;&#039;&#039;Clone a Git Repository and add the clone to this view&#039;&#039;&#039; (third button in the toolbar of Git view)&lt;br /&gt;
# Select &#039;&#039;&#039;Clone URI&#039;&#039;&#039; (Don&#039;t select Gerrit, it doesn&#039;t work very well at the moment)&lt;br /&gt;
# Go back to Gerrit. Press &#039;&#039;&#039;Projects&#039;&#039;&#039; in the top-left menu and &#039;&#039;&#039;List&#039;&#039;&#039; in the submenu.Repositories &lt;br /&gt;
# Find a row named &#039;&#039;&#039;simantics/platform&#039;&#039;&#039; and press &#039;&#039;&#039;(gitweb)&#039;&#039;&#039; link at the last column.&lt;br /&gt;
# Copy the URI starting with &#039;&#039;ssh:&#039;&#039; (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to &#039;&#039;&#039;URI&#039;&#039;&#039; field in &#039;&#039;&#039;Clone Git Repository dialog&#039;&#039;&#039;.&lt;br /&gt;
# This should automatically fill the other fields.&lt;br /&gt;
# Press Next. If your private key has a passphrase, Eclipse now asks it.&lt;br /&gt;
# Select all branches to be cloned (default) and press Next.&lt;br /&gt;
# Give a local directory where the repository is cloned to and press Finish.&lt;br /&gt;
# After the cloning is finished, select the &#039;&#039;&#039;platform&#039;&#039;&#039; repository in the Git Repositories view and select &#039;&#039;&#039;Import Projects...&#039;&#039;&#039; from context menu.&lt;br /&gt;
# Press Next, select all projects (default) and press Finish.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3195</id>
		<title>Quick Development Environment Setup</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3195"/>
		<updated>2015-12-01T07:25:35Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Install Java JDK and Eclipse, and Setup the IDE for Simantics Development ==&lt;br /&gt;
&lt;br /&gt;
# Get and install &#039;&#039;Java SE Development Kit 8&#039;&#039; (JDK 8). You can download the package from [http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html]. Follow the installation instructions for your operating system. It is recommended to always use the latest JDK update.&lt;br /&gt;
# Get and install the latest &#039;&#039;Eclipse Classic IDE&#039;&#039; release build. You can find the package from [http://download.eclipse.org/eclipse/downloads/ http://download.eclipse.org/eclipse/downloads/]. You can select freely the installation location for the package, e.g. under your home directory. Just unzip the package to install Eclipse.&lt;br /&gt;
# After the installation of Eclipse, check that your Eclipse is set to use the right Java Runtime Environment (JRE):&lt;br /&gt;
#* In Eclipse platform, open &amp;quot;Window - Preferences&amp;quot;.&lt;br /&gt;
#* Open page “Java / Installed JREs”.&lt;br /&gt;
#* Set the JRE to point to the previously installed JDK 8.&lt;br /&gt;
# Install the Simantics Graph Compiler:&lt;br /&gt;
#* In Eclipse platform, open “Help / Install New Software...”.&lt;br /&gt;
#* Set the installation site to &amp;quot;http://www.simantics.org/update/utils&amp;quot; in the “Work with” field and press “Add...”. Give the installation site link a name when asked.&lt;br /&gt;
#* Select from the list the latest &amp;quot;Ontology development / Graph feature&amp;quot; and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# Install the Subversive plug-in to the Eclipse platform:&lt;br /&gt;
#* In Eclipse platform, open &#039;&#039;“Help / Install New Software...”&#039;&#039;.&lt;br /&gt;
#* Select installation site &amp;quot;Luna - http://download.eclipse.org/releases/luna&amp;quot; to the “Work with” field from the preset list.&lt;br /&gt;
#* Click open the &amp;quot;Collaboration&amp;quot; folder and select from the list:&lt;br /&gt;
#** &#039;&#039;Subversive SVN Team Provider&#039;&#039;&lt;br /&gt;
#** &#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&lt;br /&gt;
#: and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# After restarting Eclipse, open the SVN Repository Exploring perspective:&lt;br /&gt;
#* In Eclipse platform, open “Window / Open Perspective / Other...”.&lt;br /&gt;
#* Select &#039;&#039;SVN Repository Exploring&#039;&#039; and press “OK”. Eclipse should open the “Install Connectors” dialog.&lt;br /&gt;
#* Select latest “SVN Kit 1.x.y” and press “Finish”, and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
&lt;br /&gt;
== Install Simantics 1.17 Target Platform ==&lt;br /&gt;
&lt;br /&gt;
# In Eclipse platform, activate the &#039;&#039;Plug-in Development&#039;&#039; perspective, either from the tab on the upper right corner of the Eclipse platform or from the “Window / Open Perspective / Other...” menu, and select &#039;&#039;Plug-in Development&#039;&#039;.&lt;br /&gt;
# Create a new general project in Eclipse by:&lt;br /&gt;
#* Selecting “File / New / Project...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select a wizard&amp;quot;, select “General / Project” and press “Next”.&lt;br /&gt;
#* Give the project a name, e.g. &amp;quot;Simantics_target&amp;quot; and press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Copy one of the following files into your system to some temporary location:&lt;br /&gt;
#* [http://www.simantics.org/download/1.17/simantics.target http://www.simantics.org/download/1.17/simantics.target] (for application development on Simantics platform)&lt;br /&gt;
#: The Simantics platform source code is available for [https://www.simantics.org/simantics/about-simantics/thth-simantics THTH/Simantics Division] registered members through these alternative target definitions (user name and password are asked during the installation, these are available at the [https://www.simantics.org/members/index.php/Main_Page THTH/Simantics Member Wiki]):&lt;br /&gt;
#* [http://www.simantics.org/download/1.17/simantics-sdk.target http://www.simantics.org/download/1.17/simantics-sdk.target] (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
# In Eclipse &#039;&#039;Package Explorer&#039;&#039; (the view on left side of the Eclipse platform):&lt;br /&gt;
#* Right-click your previously created project and select &amp;quot;Import...&amp;quot; from the context menu.&lt;br /&gt;
#* In &#039;&#039;Select wizard&#039;&#039;, select “General / File System”, and press &amp;quot;Next&amp;quot;.&lt;br /&gt;
#* Select in the “From directory” the folder where the previously downloaded file(s) are located, and select the downloaded file(s) in the file list below. Press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Set the target platform for the development with Simantics:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* The new target definitions should be available in the list. Activate one of the following:&lt;br /&gt;
#** “Simantics 1.17” (for application development on Simantics platform)&lt;br /&gt;
#** “Simantics SDK 1.17” (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
#: and confirm the target platform definition by pressing &amp;quot;Apply&amp;quot; and/or &amp;quot;OK&amp;quot;. If you defined a &#039;&#039;Simantics SDK 1.17&#039;&#039; target, you are asked for the username and the password.&lt;br /&gt;
#* Wait until Eclipse finishes downloading, this may take a while. After the download is completed, there should be several plug-ins starting with &amp;quot;org.simantics.*&amp;quot; in the Eclipse &#039;&#039;Plug-ins&#039;&#039; view (the view on the left side of Eclipse).&lt;br /&gt;
# &#039;&#039;&#039;Keep your platform up-to-date!&#039;&#039;&#039; Updating is as easy as reloading the target platform from &#039;&#039;Target Platform&#039;&#039; preference page:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* Select the active target platform, e.g. &#039;&#039;Simantics SDK 1.17&#039;&#039;, from the list and press &amp;quot;Reload&amp;quot;.&lt;br /&gt;
#* Wait until the platform is updated.&lt;br /&gt;
&lt;br /&gt;
== Test Your Installation ==&lt;br /&gt;
&lt;br /&gt;
Test your installation with the [http://dev.simantics.org/index.php/Tutorial:_Ontology_Development Simantics movie tutorial]:&lt;br /&gt;
&lt;br /&gt;
# Download &#039;&#039;Simantics movie tutorial&#039;&#039; plug-ins into your Eclipse workspace:&lt;br /&gt;
#* Get [https://www.simantics.org/jenkins/job/package-movie-tutorial-head/lastSuccessfulBuild/artifact/movie-tutorial.zip movie-tutorial.zip]&lt;br /&gt;
#* In Eclipse platform, select  “File / Import...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select&amp;quot; dialog, select “General / Existing Projects into Workspace” and press “Next”.&lt;br /&gt;
#* Select the “Select archive file:” radio button and press “Browse” to find the downloaded movie-tutorial.zip.&lt;br /&gt;
#* Press “Select All” and “Finish”.&lt;br /&gt;
# Run movie.product:&lt;br /&gt;
#* From the &#039;&#039;Package Explorer&#039;&#039; view, open “org.simantics.movie.ui&#039;&#039; / Movie.product”.&lt;br /&gt;
#* From the &#039;&#039;Overview&#039;&#039; page of the opened product editor, press “Launch an Eclipse application”. &lt;br /&gt;
&lt;br /&gt;
If you managed to start the &#039;&#039;movie&#039;&#039; product, your development platform should be operational.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Happy developing with Simantics!&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3194</id>
		<title>Quick Development Environment Setup</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Quick_Development_Environment_Setup&amp;diff=3194"/>
		<updated>2015-12-01T07:23:22Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Install Java JDK and Eclipse, and Setup the IDE for Simantics Development ==&lt;br /&gt;
&lt;br /&gt;
# Get and install &#039;&#039;Java SE Development Kit 8&#039;&#039; (JDK 8). You can download the package from [http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html]. Follow the installation instructions for your operating system. It is recommended to always use the latest JDK update.&lt;br /&gt;
# Get and install the latest &#039;&#039;Eclipse Classic IDE&#039;&#039; 4.4.1 (Luna SR1) release build. You can find the package from [http://download.eclipse.org/eclipse/downloads/ http://download.eclipse.org/eclipse/downloads/]. You can select freely the installation location for the package, e.g. under your home directory. Just unzip the package to install Eclipse.&lt;br /&gt;
# After the installation of Eclipse, check that your Eclipse is set to use the right Java Runtime Environment (JRE):&lt;br /&gt;
#* In Eclipse platform, open &amp;quot;Window - Preferences&amp;quot;.&lt;br /&gt;
#* Open page “Java / Installed JREs”.&lt;br /&gt;
#* Set the JRE to point to the previously installed JDK 8.&lt;br /&gt;
# Install the Simantics Graph Compiler:&lt;br /&gt;
#* In Eclipse platform, open “Help / Install New Software...”.&lt;br /&gt;
#* Set the installation site to &amp;quot;http://www.simantics.org/update/utils&amp;quot; in the “Work with” field and press “Add...”. Give the installation site link a name when asked.&lt;br /&gt;
#* Select from the list the latest &amp;quot;Ontology development / Graph feature&amp;quot; and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# Install the Subversive plug-in to the Eclipse platform:&lt;br /&gt;
#* In Eclipse platform, open &#039;&#039;“Help / Install New Software...”&#039;&#039;.&lt;br /&gt;
#* Select installation site &amp;quot;Luna - http://download.eclipse.org/releases/luna&amp;quot; to the “Work with” field from the preset list.&lt;br /&gt;
#* Click open the &amp;quot;Collaboration&amp;quot; folder and select from the list:&lt;br /&gt;
#** &#039;&#039;Subversive SVN Team Provider&#039;&#039;&lt;br /&gt;
#** &#039;&#039;Subversive SVN JDT Ignore Extensions&#039;&#039;&lt;br /&gt;
#: and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
# After restarting Eclipse, open the SVN Repository Exploring perspective:&lt;br /&gt;
#* In Eclipse platform, open “Window / Open Perspective / Other...”.&lt;br /&gt;
#* Select &#039;&#039;SVN Repository Exploring&#039;&#039; and press “OK”. Eclipse should open the “Install Connectors” dialog.&lt;br /&gt;
#* Select latest “SVN Kit 1.x.y” and press “Finish”, and proceed with the installation. Restart Eclipse after the installation.&lt;br /&gt;
&lt;br /&gt;
== Install Simantics 1.17 Target Platform ==&lt;br /&gt;
&lt;br /&gt;
# In Eclipse platform, activate the &#039;&#039;Plug-in Development&#039;&#039; perspective, either from the tab on the upper right corner of the Eclipse platform or from the “Window / Open Perspective / Other...” menu, and select &#039;&#039;Plug-in Development&#039;&#039;.&lt;br /&gt;
# Create a new general project in Eclipse by:&lt;br /&gt;
#* Selecting “File / New / Project...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select a wizard&amp;quot;, select “General / Project” and press “Next”.&lt;br /&gt;
#* Give the project a name, e.g. &amp;quot;Simantics_target&amp;quot; and press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Copy one of the following files into your system to some temporary location:&lt;br /&gt;
#* [http://www.simantics.org/download/1.17/simantics.target http://www.simantics.org/download/1.17/simantics.target] (for application development on Simantics platform)&lt;br /&gt;
#: The Simantics platform source code is available for [https://www.simantics.org/simantics/about-simantics/thth-simantics THTH/Simantics Division] registered members through these alternative target definitions (user name and password are asked during the installation, these are available at the [https://www.simantics.org/members/index.php/Main_Page THTH/Simantics Member Wiki]):&lt;br /&gt;
#* [http://www.simantics.org/download/1.17/simantics-sdk.target http://www.simantics.org/download/1.17/simantics-sdk.target] (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
# In Eclipse &#039;&#039;Package Explorer&#039;&#039; (the view on left side of the Eclipse platform):&lt;br /&gt;
#* Right-click your previously created project and select &amp;quot;Import...&amp;quot; from the context menu.&lt;br /&gt;
#* In &#039;&#039;Select wizard&#039;&#039;, select “General / File System”, and press &amp;quot;Next&amp;quot;.&lt;br /&gt;
#* Select in the “From directory” the folder where the previously downloaded file(s) are located, and select the downloaded file(s) in the file list below. Press &amp;quot;Finish&amp;quot;.&lt;br /&gt;
# Set the target platform for the development with Simantics:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* The new target definitions should be available in the list. Activate one of the following:&lt;br /&gt;
#** “Simantics 1.17” (for application development on Simantics platform)&lt;br /&gt;
#** “Simantics SDK 1.17” (for Simantics platform development and application development on Simantics platform)&lt;br /&gt;
#: and confirm the target platform definition by pressing &amp;quot;Apply&amp;quot; and/or &amp;quot;OK&amp;quot;. If you defined a &#039;&#039;Simantics SDK 1.17&#039;&#039; target, you are asked for the username and the password.&lt;br /&gt;
#* Wait until Eclipse finishes downloading, this may take a while. After the download is completed, there should be several plug-ins starting with &amp;quot;org.simantics.*&amp;quot; in the Eclipse &#039;&#039;Plug-ins&#039;&#039; view (the view on the left side of Eclipse).&lt;br /&gt;
# &#039;&#039;&#039;Keep your platform up-to-date!&#039;&#039;&#039; Updating is as easy as reloading the target platform from &#039;&#039;Target Platform&#039;&#039; preference page:&lt;br /&gt;
#* In Eclipse platform, open “Window / Preferences”, and from there the “Plug-in Development / Target Platform” folder.&lt;br /&gt;
#* Select the active target platform, e.g. &#039;&#039;Simantics SDK 1.17&#039;&#039;, from the list and press &amp;quot;Reload&amp;quot;.&lt;br /&gt;
#* Wait until the platform is updated.&lt;br /&gt;
&lt;br /&gt;
== Test Your Installation ==&lt;br /&gt;
&lt;br /&gt;
Test your installation with the [http://dev.simantics.org/index.php/Tutorial:_Ontology_Development Simantics movie tutorial]:&lt;br /&gt;
&lt;br /&gt;
# Download &#039;&#039;Simantics movie tutorial&#039;&#039; plug-ins into your Eclipse workspace:&lt;br /&gt;
#* Get [https://www.simantics.org/jenkins/job/package-movie-tutorial-head/lastSuccessfulBuild/artifact/movie-tutorial.zip movie-tutorial.zip]&lt;br /&gt;
#* In Eclipse platform, select  “File / Import...” menu item.&lt;br /&gt;
#* In the &amp;quot;Select&amp;quot; dialog, select “General / Existing Projects into Workspace” and press “Next”.&lt;br /&gt;
#* Select the “Select archive file:” radio button and press “Browse” to find the downloaded movie-tutorial.zip.&lt;br /&gt;
#* Press “Select All” and “Finish”.&lt;br /&gt;
# Run movie.product:&lt;br /&gt;
#* From the &#039;&#039;Package Explorer&#039;&#039; view, open “org.simantics.movie.ui&#039;&#039; / Movie.product”.&lt;br /&gt;
#* From the &#039;&#039;Overview&#039;&#039; page of the opened product editor, press “Launch an Eclipse application”. &lt;br /&gt;
&lt;br /&gt;
If you managed to start the &#039;&#039;movie&#039;&#039; product, your development platform should be operational.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Happy developing with Simantics!&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Simantics_Developer_Documentation&amp;diff=3193</id>
		<title>Simantics Developer Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Simantics_Developer_Documentation&amp;diff=3193"/>
		<updated>2015-11-26T07:47:24Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Simantics Constraint Language */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
[[image:Simantics_logo_pile_01.png|right|border|400px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Simantics&#039;&#039;&#039; is a software platform for modelling and simulation. The system has client-server architecture with a semantic ontology-based modelling database and Eclipse framework -based client software with plug-in interface. The Simantics platform and many of its components are open source under [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License (EPL)].&lt;br /&gt;
&lt;br /&gt;
The philosophy of the Simantics platform is to offer an open, high level application platform on which different computational tools can be easily integrated to form a common environment for modelling and simulation. The platform includes several modelling tools, so-called editors, for e.g. 2D graph-like hierarchical model composition and semantic graph browsing.&lt;br /&gt;
&lt;br /&gt;
One of the biggest innovations in the Simantics platform is the semantic modelling approach itself and high-level ontology tools. The semantic database, i.e. triplestore, on the server side enables high performance data management and arbitrary mappings of data. This enables e.g. efficient mapping of simulation and measurement data to the model configuration and its visualisation.&lt;br /&gt;
&lt;br /&gt;
The Simantics development and maintenance process is built to be solid and scalable from the very beginning. The objective is to aim far to the future what comes to requirements for scalability, usability, and reliability.&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;Simantics Developer Documentation&#039;&#039; is targeted to programmers and software developers developing either the platform itself or additional plug-ins to be used with or on the platform. The [[userwiki:Main_Page|Simantics End User Documentation]] complements to documentation for the Simantics platform offering overview and detailed information about the platform from the user&#039;s point of view. The [https://www.simantics.org/simantics Simantics] website is the source of information for the Simantics project and related subjects[[Tutorials|.]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:white;&amp;quot;&amp;gt;Disclaimer Warning: This site may cause narcolepsia in some readers. Consult your doctor if sensitive to boredom.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;75%&amp;quot;&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
* [[Glossary]]&lt;br /&gt;
* [[Introduction to Simantics Architecture]]&lt;br /&gt;
* [[Roadmap]]&lt;br /&gt;
* [[Data View]]&lt;br /&gt;
* [[Component View]]&lt;br /&gt;
* [[Licensing|Licensing]]&lt;br /&gt;
* [[Useful Links]]&lt;br /&gt;
&amp;lt;!--* [[Simantics Specifications|Specifications]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Documents ===&lt;br /&gt;
&lt;br /&gt;
* [[Quick Development Environment Setup|Quick Development Environment Setup Guide]]&lt;br /&gt;
* [[Target Platform]]&lt;br /&gt;
* [[Development Practices]]&lt;br /&gt;
* [[Internalization]]&lt;br /&gt;
* [[Update Site]]&lt;br /&gt;
* [[Coding Convention]]&lt;br /&gt;
* [[Tools]]&lt;br /&gt;
* [[Testing]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Ontology Development ===&lt;br /&gt;
&lt;br /&gt;
* [[:Media:Layer0.pdf|Layer0.pdf]] ([[:File:Layer0.pdf|log]])&lt;br /&gt;
* [[Graph Compiler]]&lt;br /&gt;
* [[Transferable Graph]]&lt;br /&gt;
* [[Binary Container Format]]&lt;br /&gt;
* [[Graph File Format]]&lt;br /&gt;
* [[Version Migration]]&lt;br /&gt;
* [[Tutorial: Ontology Development]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Database Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Interface summary]]&lt;br /&gt;
* [[Tutorial: Quickstart]]&lt;br /&gt;
* [[Tutorial: Database Development]]&lt;br /&gt;
* [[Resource Adaptation]]&lt;br /&gt;
* [[Resource Serialization]]&lt;br /&gt;
* [[Inverse Relations]]&lt;br /&gt;
* [[Virtual Graphs]]&lt;br /&gt;
* [[Functions]]&lt;br /&gt;
* [[Procedural Values]]&lt;br /&gt;
* [[Variable]]&lt;br /&gt;
* [[Undo Mechanism]]&lt;br /&gt;
* [[Team Features]]&lt;br /&gt;
* [[Subgraph Extents]]&lt;br /&gt;
* [[Database Testing]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Data management &amp;amp; Experiment Control ===&lt;br /&gt;
&lt;br /&gt;
* [[Databoard Specification]]&lt;br /&gt;
* [[Databoard Developer Manual|Databoard Java Manual]]&lt;br /&gt;
* [[Experiment Control]]&lt;br /&gt;
* [[Dataflows]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== UI Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Org.simantics.browsing.ui_Manual|Browser Manual]]&lt;br /&gt;
* [[org.simantics.browsing.ui.feature|Browser Component]]&lt;br /&gt;
* [[Org.simantics.scenegraph.loader|Scene Graph Loader]]&lt;br /&gt;
* [[Org.simantics.message|Messages]]&lt;br /&gt;
* [[Org.simantics.views|Modelled Views]]&lt;br /&gt;
* [[Org.simantics.document|Documents]]&lt;br /&gt;
* [[Selection View]]&lt;br /&gt;
|}&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Simantics Constraint Language===&lt;br /&gt;
&lt;br /&gt;
* [http://www.simantics.org/~niemisto/Introduction%20to%20SCL.pptx Introduction to SCL]&lt;br /&gt;
* [[SCL Compiler]]&lt;br /&gt;
* [[SCL Tutorial]]&lt;br /&gt;
* [[SCL Types]]&lt;br /&gt;
&amp;lt;!--* [[SCL_Language|SCL Language]] --&amp;gt;&lt;br /&gt;
&amp;lt;!--* [https://www.simantics.org/wiki/index.php/Org.simantics.scl_Compiler SCL Compiler]--&amp;gt;&lt;br /&gt;
* [[Org.simantics.objmap_Manual|Object Map Manual]]&lt;br /&gt;
* [[SCL Registry]]&lt;br /&gt;
* [http://www.simantics.org/SCLDocumentation/StandardLibrary/Prelude.html SCL Reference]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Model Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Structural Ontology]]&lt;br /&gt;
* [[Users and Roles]]&lt;br /&gt;
* [[Models]]&lt;br /&gt;
* [[Concept Versioning]]&lt;br /&gt;
* [[Component Identification]]&lt;br /&gt;
* [[Tutorial: Model Development]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Project Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Project Management Conceptual Model]]&lt;br /&gt;
* [[Project Development]]&lt;br /&gt;
* [[Tutorial: Project Development]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Diagram Development ===&lt;br /&gt;
&lt;br /&gt;
* [[2D Ontologies]]&lt;br /&gt;
* [[org.simantics.diagram|Diagram]]&lt;br /&gt;
* [[org.simantics.scenegraph|Scene graph]]&lt;br /&gt;
* [[Diagram connections]]&lt;br /&gt;
* [[Tutorial: Diagram Development]]&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;25%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=== Issue Development ===&lt;br /&gt;
&lt;br /&gt;
* [[Issue subsystem general description]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
-----&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=File:Mapping5.png&amp;diff=3190</id>
		<title>File:Mapping5.png</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=File:Mapping5.png&amp;diff=3190"/>
		<updated>2015-10-14T11:19:02Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Mapping&amp;diff=3189</id>
		<title>Mapping</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Mapping&amp;diff=3189"/>
		<updated>2015-10-14T11:18:47Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Calculation level reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Simplest possible connection ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping.png]]&lt;br /&gt;
&lt;br /&gt;
== Connection flags ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping2.png]]&lt;br /&gt;
&lt;br /&gt;
== Signal connection ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping3.png]]&lt;br /&gt;
&lt;br /&gt;
== Calculation level reference ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping4.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping5.png]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=File:Mapping4.png&amp;diff=3171</id>
		<title>File:Mapping4.png</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=File:Mapping4.png&amp;diff=3171"/>
		<updated>2015-02-04T14:43:44Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Mapping&amp;diff=3170</id>
		<title>Mapping</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Mapping&amp;diff=3170"/>
		<updated>2015-02-04T14:43:30Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Simplest possible connection ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping.png]]&lt;br /&gt;
&lt;br /&gt;
== Connection flags ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping2.png]]&lt;br /&gt;
&lt;br /&gt;
== Signal connection ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping3.png]]&lt;br /&gt;
&lt;br /&gt;
== Calculation level reference ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping4.png]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=File:Mapping3.png&amp;diff=3168</id>
		<title>File:Mapping3.png</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=File:Mapping3.png&amp;diff=3168"/>
		<updated>2014-12-22T12:12:11Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: Hannu Niemisto uploaded a new version of &amp;amp;quot;File:Mapping3.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Mapping&amp;diff=3167</id>
		<title>Mapping</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Mapping&amp;diff=3167"/>
		<updated>2014-12-22T11:53:16Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Simplest possible connection ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping.png]]&lt;br /&gt;
&lt;br /&gt;
== Connection flags ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping2.png]]&lt;br /&gt;
&lt;br /&gt;
== Signal connection ==&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping3.png]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=File:Mapping3.png&amp;diff=3166</id>
		<title>File:Mapping3.png</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=File:Mapping3.png&amp;diff=3166"/>
		<updated>2014-12-22T11:52:21Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=File:Mapping2.png&amp;diff=3165</id>
		<title>File:Mapping2.png</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=File:Mapping2.png&amp;diff=3165"/>
		<updated>2014-12-22T11:51:52Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=File:Mapping.png&amp;diff=3164</id>
		<title>File:Mapping.png</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=File:Mapping.png&amp;diff=3164"/>
		<updated>2014-12-22T11:51:26Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Mapping&amp;diff=3163</id>
		<title>Mapping</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Mapping&amp;diff=3163"/>
		<updated>2014-12-22T11:50:33Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: Created page with &amp;quot;File:Mapping.png  File:Mapping2.png  File:Mapping3.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Mapping.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping2.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mapping3.png]]&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3105</id>
		<title>Subgraph operations</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3105"/>
		<updated>2013-11-12T21:22:40Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Baseline behavior */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page discusses three common operations that handle some subgraph of the whole Simantics database.&lt;br /&gt;
They all have very similar issues:&lt;br /&gt;
* Export/import&lt;br /&gt;
** What is exported?&lt;br /&gt;
** How are references from the exported part to the unexported part handled?&lt;br /&gt;
* Copy/paste&lt;br /&gt;
** What is copied?&lt;br /&gt;
** How are references from the copied part to the uncopied part handled?&lt;br /&gt;
* Removal&lt;br /&gt;
** What is removed?&lt;br /&gt;
** How are references between the removed and the unremoved resources handled?&lt;br /&gt;
Moreover in many cases copy/paste should behave similarly to export/import&lt;br /&gt;
and immediate removal of an imported object should usually restore the database to the &lt;br /&gt;
state before import.&lt;br /&gt;
&lt;br /&gt;
== Baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
First, it should be made clear, that in some cases there are more than one reasonable behaviour &lt;br /&gt;
for the operations. For example, consider an applications where graphical and semantic objects are&lt;br /&gt;
separated and the same semantic object can be represented by multiple graphical objects.&lt;br /&gt;
When the user removes a graphical object, it is possible to remove also the corresponding semantic object,&lt;br /&gt;
but it is also sensible to remove only the graphical object. Sometimes the desired behaviour can &lt;br /&gt;
be asked from the user.&lt;br /&gt;
&lt;br /&gt;
This means that the &amp;quot;correct&amp;quot; behaviour of each operation cannot be based purely on the shape of the&lt;br /&gt;
data but it should be customizable in each case separately. However, the customization cannot be &lt;br /&gt;
based solely on the type of the resource selected when the operation is requested. For example, a removal&lt;br /&gt;
of a library has a very simple behavior: its children should also be removed. However the children&lt;br /&gt;
of the library may each require different removal customization.&lt;br /&gt;
&lt;br /&gt;
In order to collect all requirements for the customizable export/import, copy/paste and removal operations,&lt;br /&gt;
we first define the &#039;&#039;baseline behaviour&#039;&#039; for the operations. The idea is that we can then collect all current cases where&lt;br /&gt;
the operations should behave differently from the baseline and this helps for choosing the right customization&lt;br /&gt;
hooks.&lt;br /&gt;
&lt;br /&gt;
Every operation targets some resource C. In some cases there can be more than one target,&lt;br /&gt;
but definitions should be easily generalizable for that case.&lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;external to C&#039;&#039; if&lt;br /&gt;
there is a PartOf-path leading from the resource to the root library such&lt;br /&gt;
that the path does not include C. In other words, the set of resources external&lt;br /&gt;
to C are the resources that are reachable by ConsistsOf from root library without&lt;br /&gt;
going through C. &lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;in the context of C&#039;&#039; if it reachable from C by statements&lt;br /&gt;
without going through any external resources.&lt;br /&gt;
&lt;br /&gt;
[[Image:Extent.png]]&lt;br /&gt;
&lt;br /&gt;
Now, we can define baseline behaviors:&lt;br /&gt;
* Export writes all resources in the context of C as internal resources to the transferable graph, together with all their statements excluding PartOf-statements from C. Resources external to C are referred by URI. C is marked the root of TG.&lt;br /&gt;
* Import creates all internal resources in TG file as new resources and adds all the statements in TG. The references to external resources are resolved by URI and if the resource does not exist a dummy resource is created. The root of the TG is attached by ConsistsOf to the target of the import operation.&lt;br /&gt;
* Copy/paste behaves just like export/import.&lt;br /&gt;
* Removal unlinks all the resource in the context of C from the external resources.&lt;br /&gt;
&lt;br /&gt;
== Exceptions to baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
=== Export/import ===&lt;br /&gt;
&lt;br /&gt;
=== Copy/paste ===&lt;br /&gt;
&lt;br /&gt;
=== Removal ===&lt;br /&gt;
&lt;br /&gt;
* Component types (and other types)&lt;br /&gt;
** If the type has instances the operation must be cancelled or all the instances must be removed&lt;br /&gt;
* Connection points, properties (and other relations)&lt;br /&gt;
** If the relation is used somewhere the operation must be cancelled or the corresponding statement must be removed.&lt;br /&gt;
* Components&lt;br /&gt;
** If component is created by mapping from a diagram the corresponding diagram elements should also be removed&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3100</id>
		<title>Subgraph operations</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3100"/>
		<updated>2013-11-12T13:48:01Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Baseline behavior */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page discusses about three common operations that handle some subgraph of the whole Simantics database.&lt;br /&gt;
They all have very similar issues:&lt;br /&gt;
* Export/import&lt;br /&gt;
** What is exported?&lt;br /&gt;
** How the references from the exported part to the unexported part are handled?&lt;br /&gt;
* Copy/paste&lt;br /&gt;
** What is copied?&lt;br /&gt;
** How the references from the copied part to the uncopied part are handled?&lt;br /&gt;
* Removal&lt;br /&gt;
** What is removed?&lt;br /&gt;
** How the references between the removed and the unremoved resources are handled?&lt;br /&gt;
Moreover in many cases copy/paste should behave similarly to export/import&lt;br /&gt;
and immediate removal of an imported object should usually restore the database to the &lt;br /&gt;
state before import.&lt;br /&gt;
&lt;br /&gt;
== Baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
First, it should be made clear, that in some cases there are more than one reasonable behaviour &lt;br /&gt;
for the operations. For example, consider an applications where graphical and semantic objects are&lt;br /&gt;
separated and the same semantic object can be represented by multiple graphical objects.&lt;br /&gt;
When the user removes a graphical object, it is possible to remove also the corresponding semantic object,&lt;br /&gt;
but it is also sensible to remove only the graphical object. Sometimes the desired behaviour can &lt;br /&gt;
be asked from the user.&lt;br /&gt;
&lt;br /&gt;
This means that the &amp;quot;correct&amp;quot; behaviour of each operation cannot be based purely on the shape of the&lt;br /&gt;
data but it should be customizable in each case separately. However, the customization cannot be &lt;br /&gt;
based solely on the type of the resource selected when the operation is requested. For example, a removal&lt;br /&gt;
of a library has a very simple behavior: its children should also be removed. However the children&lt;br /&gt;
of the library may each require different removal customization.&lt;br /&gt;
&lt;br /&gt;
In order to collect all requirements for the customizable export/import, copy/paste and removal operations,&lt;br /&gt;
we first define the &#039;&#039;baseline behaviour&#039;&#039; for the operations. The idea is that we can then collect all current cases where&lt;br /&gt;
the operations should behave differently from the baseline and this helps for choosing the right customization&lt;br /&gt;
hooks.&lt;br /&gt;
&lt;br /&gt;
Every operation targets some resource C. In some cases there can be more than one target,&lt;br /&gt;
but definitions should be easily generalizable for that case.&lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;external to C&#039;&#039; if&lt;br /&gt;
there is a PartOf-path leading from the resource to the root library such&lt;br /&gt;
that the path does not include C. In other words, the set of resources external&lt;br /&gt;
to C are the resources that are reachable by ConsistsOf from root library without&lt;br /&gt;
going through C. &lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;in the context of C&#039;&#039; if it reachable from C by statements&lt;br /&gt;
without going through any external resources.&lt;br /&gt;
&lt;br /&gt;
[[Image:Extent.png]]&lt;br /&gt;
&lt;br /&gt;
Now, we can define baseline behaviors:&lt;br /&gt;
* Export writes all resources in the context of C as internal resources to the transferable graph, together with all their statements excluding a PartOf-statements from C. Resources external to C are referred by URI. C is marked the root of TG.&lt;br /&gt;
* Import creates all internal resources in TG file as new resources and adds all the statements in TG. The references to external resources are resolved by URI and if the resource does not exist a dummy resource is created. The root of the TG is attached by ConsistsOf to the target of the import operation.&lt;br /&gt;
* Copy/paste behaves just like export/import.&lt;br /&gt;
* Removal removes all the resource in the context of C.&lt;br /&gt;
&lt;br /&gt;
== Exceptions to baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
=== Export/import ===&lt;br /&gt;
&lt;br /&gt;
=== Copy/paste ===&lt;br /&gt;
&lt;br /&gt;
=== Removal ===&lt;br /&gt;
&lt;br /&gt;
* Component types (and other types)&lt;br /&gt;
** If the type has instances the operation must be cancelled or all the instances must be removed&lt;br /&gt;
* Connection points, properties (and other relations)&lt;br /&gt;
** If the relation is used somewhere the operation must be cancelled or the corresponding statement must be removed.&lt;br /&gt;
* Components&lt;br /&gt;
** If component is created by mapping from a diagram the corresponding diagram elements should also be removed&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3099</id>
		<title>Subgraph operations</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3099"/>
		<updated>2013-11-12T13:46:58Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Baseline behavior */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page discusses about three common operations that handle some subgraph of the whole Simantics database.&lt;br /&gt;
They all have very similar issues:&lt;br /&gt;
* Export/import&lt;br /&gt;
** What is exported?&lt;br /&gt;
** How the references from the exported part to the unexported part are handled?&lt;br /&gt;
* Copy/paste&lt;br /&gt;
** What is copied?&lt;br /&gt;
** How the references from the copied part to the uncopied part are handled?&lt;br /&gt;
* Removal&lt;br /&gt;
** What is removed?&lt;br /&gt;
** How the references between the removed and the unremoved resources are handled?&lt;br /&gt;
Moreover in many cases copy/paste should behave similarly to export/import&lt;br /&gt;
and immediate removal of an imported object should usually restore the database to the &lt;br /&gt;
state before import.&lt;br /&gt;
&lt;br /&gt;
== Baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
First, it should be made clear, that in some cases there are more than one reasonable behaviour &lt;br /&gt;
for the operations. For example, consider an applications where graphical and semantic objects are&lt;br /&gt;
separated and the same semantic object can be represented by multiple graphical objects.&lt;br /&gt;
When the user removes a graphical object, it is possible to remove also the corresponding semantic object,&lt;br /&gt;
but it is also sensible to remove only the graphical object. Sometimes the desired behaviour can &lt;br /&gt;
be asked from the user.&lt;br /&gt;
&lt;br /&gt;
This means that the &amp;quot;correct&amp;quot; behaviour of each operation cannot be based purely on the shape of the&lt;br /&gt;
data but it should be customizable in each case separately. However, the customization cannot be &lt;br /&gt;
based solely on the type of the resource selected when the operation is requested. For example, a removal&lt;br /&gt;
of a library has a very simple behavior: its children should also be removed. However the children&lt;br /&gt;
of the library may each require different removal customization.&lt;br /&gt;
&lt;br /&gt;
In order to collect all requirements for the customizable export/import, copy/paste and removal operations,&lt;br /&gt;
we first define the &#039;&#039;baseline behaviour&#039;&#039; for the operations. The idea is that we can then collect all current cases where&lt;br /&gt;
the operations should behave differently from the baseline and this helps for choosing the right customization&lt;br /&gt;
hooks.&lt;br /&gt;
&lt;br /&gt;
Every operation targets some resource C. In some cases there can be more than one target,&lt;br /&gt;
but definitions should be easily generalizable for that case.&lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;external to C&#039;&#039; if&lt;br /&gt;
there is a PartOf-path leading from the resource to the root library such&lt;br /&gt;
that the path does not include C. In other words, the set of resources external&lt;br /&gt;
to C are the resources that are reachable by ConsistsOf from root library without&lt;br /&gt;
going through C. &lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;in the context of C&#039;&#039; if it reachable from C by statements&lt;br /&gt;
without going through any external resources.&lt;br /&gt;
&lt;br /&gt;
[[Image:Extent.png]]&lt;br /&gt;
&lt;br /&gt;
Now, we can define baseline behaviors:&lt;br /&gt;
* Export writes all resources in the context of C as internal resources to the transferable graph, together with all their statements excluding a PartOf-statements from C. Resources external to C are referred by URI. C is marked the root of TG.&lt;br /&gt;
* Import creates all internal resources in TG file as new resources and add all the statements in TG. The references to external resources are resolved by URI and if the resource does not exist a dummy resource is created. The root of the TG is attached by ConsistsOf to the target of the import operation.&lt;br /&gt;
* Copy/paste behaves just like export/import.&lt;br /&gt;
* Removal removes all the resource in the context of C.&lt;br /&gt;
&lt;br /&gt;
== Exceptions to baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
=== Export/import ===&lt;br /&gt;
&lt;br /&gt;
=== Copy/paste ===&lt;br /&gt;
&lt;br /&gt;
=== Removal ===&lt;br /&gt;
&lt;br /&gt;
* Component types (and other types)&lt;br /&gt;
** If the type has instances the operation must be cancelled or all the instances must be removed&lt;br /&gt;
* Connection points, properties (and other relations)&lt;br /&gt;
** If the relation is used somewhere the operation must be cancelled or the corresponding statement must be removed.&lt;br /&gt;
* Components&lt;br /&gt;
** If component is created by mapping from a diagram the corresponding diagram elements should also be removed&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3098</id>
		<title>Subgraph operations</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3098"/>
		<updated>2013-11-12T13:45:25Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Baseline behavior */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page discusses about three common operations that handle some subgraph of the whole Simantics database.&lt;br /&gt;
They all have very similar issues:&lt;br /&gt;
* Export/import&lt;br /&gt;
** What is exported?&lt;br /&gt;
** How the references from the exported part to the unexported part are handled?&lt;br /&gt;
* Copy/paste&lt;br /&gt;
** What is copied?&lt;br /&gt;
** How the references from the copied part to the uncopied part are handled?&lt;br /&gt;
* Removal&lt;br /&gt;
** What is removed?&lt;br /&gt;
** How the references between the removed and the unremoved resources are handled?&lt;br /&gt;
Moreover in many cases copy/paste should behave similarly to export/import&lt;br /&gt;
and immediate removal of an imported object should usually restore the database to the &lt;br /&gt;
state before import.&lt;br /&gt;
&lt;br /&gt;
== Baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
First, it should be made clear, that in some cases there are more than one reasonable behaviour &lt;br /&gt;
for the operations. For example, consider an applications where graphical and semantic objects are&lt;br /&gt;
separated and the same semantic object can be represented by multiple graphical objects.&lt;br /&gt;
When the user removes a graphical object, it is possible to remove also the corresponding semantic object,&lt;br /&gt;
but it is also sensible to remove only the graphical object. Sometimes the desired behaviour can &lt;br /&gt;
be asked from the user.&lt;br /&gt;
&lt;br /&gt;
This means that the &amp;quot;correct&amp;quot; behaviour of each operation cannot be based purely on the shape of the&lt;br /&gt;
data but it should be customizable in each case separately. However, the customization cannot be &lt;br /&gt;
based solely on the type of the resource selected when the operation is requested. For example, a removal&lt;br /&gt;
of a library has a very simple behavior: its children should also be removed. However the children&lt;br /&gt;
of the library may each require different removal customization.&lt;br /&gt;
&lt;br /&gt;
In order to collect all requirements for the customizable export/import, copy/paste and removal operations,&lt;br /&gt;
we first define the &#039;&#039;baseline behaviour&#039;&#039; for operations. Idea is that we then collect all current cases where&lt;br /&gt;
the operations should behave differently from the baseline and this helps for choosing the right customization&lt;br /&gt;
hooks.&lt;br /&gt;
&lt;br /&gt;
Each of the operations targets some resource C. In some cases there can be more than one target,&lt;br /&gt;
but definitions should be easily generalizable for that case.&lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;external to C&#039;&#039; if&lt;br /&gt;
there is a PartOf-path leading from the resource to the root library such&lt;br /&gt;
that the path does not include C. In other words, the set of resources external&lt;br /&gt;
to C are the resources that are reachable by ConsistsOf from root library without&lt;br /&gt;
going through C. &lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;in the context of C&#039;&#039; if it reachable from C by statements&lt;br /&gt;
without going through any external resources.&lt;br /&gt;
&lt;br /&gt;
[[Image:Extent.png]]&lt;br /&gt;
&lt;br /&gt;
Now, we can define baseline behaviors:&lt;br /&gt;
* Export writes all resources in the context of C as internal resources to the transferable graph, together with all their statements excluding a PartOf-statements from C. Resources external to C are referred by URI. C is marked the root of TG.&lt;br /&gt;
* Import creates all internal resources in TG file as new resources and add all the statements in TG. The references to external resources are resolved by URI and if the resource does not exist a dummy resource is created. The root of the TG is attached by ConsistsOf to the target of the import operation.&lt;br /&gt;
* Copy/paste behaves just like export/import.&lt;br /&gt;
* Removal removes all the resource in the context of C.&lt;br /&gt;
&lt;br /&gt;
== Exceptions to baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
=== Export/import ===&lt;br /&gt;
&lt;br /&gt;
=== Copy/paste ===&lt;br /&gt;
&lt;br /&gt;
=== Removal ===&lt;br /&gt;
&lt;br /&gt;
* Component types (and other types)&lt;br /&gt;
** If the type has instances the operation must be cancelled or all the instances must be removed&lt;br /&gt;
* Connection points, properties (and other relations)&lt;br /&gt;
** If the relation is used somewhere the operation must be cancelled or the corresponding statement must be removed.&lt;br /&gt;
* Components&lt;br /&gt;
** If component is created by mapping from a diagram the corresponding diagram elements should also be removed&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3097</id>
		<title>Subgraph operations</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3097"/>
		<updated>2013-11-12T13:43:45Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page discusses about three common operations that handle some subgraph of the whole Simantics database.&lt;br /&gt;
They all have very similar issues:&lt;br /&gt;
* Export/import&lt;br /&gt;
** What is exported?&lt;br /&gt;
** How the references from the exported part to the unexported part are handled?&lt;br /&gt;
* Copy/paste&lt;br /&gt;
** What is copied?&lt;br /&gt;
** How the references from the copied part to the uncopied part are handled?&lt;br /&gt;
* Removal&lt;br /&gt;
** What is removed?&lt;br /&gt;
** How the references between the removed and the unremoved resources are handled?&lt;br /&gt;
Moreover in many cases copy/paste should behave similarly to export/import&lt;br /&gt;
and immediate removal of an imported object should usually restore the database to the &lt;br /&gt;
state before import.&lt;br /&gt;
&lt;br /&gt;
== Baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
First, it should be made clear, that in some cases there are more than one reasonable behaviour &lt;br /&gt;
for the operations. For example, consider an applications where graphical and semantic objects are&lt;br /&gt;
separated and the same semantic object can be represented by multiple graphical objects.&lt;br /&gt;
When the user removes a graphical object, it is possible to remove also the corresponding semantic object,&lt;br /&gt;
but it is also sensible to remove only the graphical object. Sometimes the desired behaviour can &lt;br /&gt;
be asked from the user.&lt;br /&gt;
&lt;br /&gt;
This means that the &amp;quot;correct&amp;quot; behaviour of each operation cannot be based purely on the shape of the&lt;br /&gt;
data but it should be customizable in each case separately. However, the customization cannot be &lt;br /&gt;
based solely on the type of the resource selected when the operation is requested. For example, a removal&lt;br /&gt;
of a library has a very simple behavior: its children should also be removed. However the children&lt;br /&gt;
of the library may each require different removal customization.&lt;br /&gt;
&lt;br /&gt;
In order to collect all requirements for the customizable export/import, copy/paste and removal operations,&lt;br /&gt;
we first define &#039;&#039;baseline behaviour&#039;&#039; for operations. Idea is that we then collect all current cases where&lt;br /&gt;
the operations should behave differently from the baseline and this helps for choosing the right customization&lt;br /&gt;
hooks.&lt;br /&gt;
&lt;br /&gt;
Each of the operations targets some resource C. In some cases there can be more than one target,&lt;br /&gt;
but definitions should be easily generalizable for that case.&lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;external to C&#039;&#039; if&lt;br /&gt;
there is a PartOf-path leading from the resource to the root library such&lt;br /&gt;
that the path does not include C. In other words, the set of resources external&lt;br /&gt;
to C are the resources that are reachable by ConsistsOf from root library without&lt;br /&gt;
going through C. &lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;in the context of C&#039;&#039; if it reachable from C by statements&lt;br /&gt;
without going through any external resources.&lt;br /&gt;
&lt;br /&gt;
[[Image:Extent.png]]&lt;br /&gt;
&lt;br /&gt;
Now, we can define baseline behaviors:&lt;br /&gt;
* Export writes all resources in the context of C as internal resources to the transferable graph, together with all their statements excluding a PartOf-statements from C. Resources external to C are referred by URI. C is marked the root of TG.&lt;br /&gt;
* Import creates all internal resources in TG file as new resources and add all the statements in TG. The references to external resources are resolved by URI and if the resource does not exist a dummy resource is created. The root of the TG is attached by ConsistsOf to the target of the import operation.&lt;br /&gt;
* Copy/paste behaves just like export/import.&lt;br /&gt;
* Removal removes all the resource in the context of C.&lt;br /&gt;
&lt;br /&gt;
== Exceptions to baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
=== Export/import ===&lt;br /&gt;
&lt;br /&gt;
=== Copy/paste ===&lt;br /&gt;
&lt;br /&gt;
=== Removal ===&lt;br /&gt;
&lt;br /&gt;
* Component types (and other types)&lt;br /&gt;
** If the type has instances the operation must be cancelled or all the instances must be removed&lt;br /&gt;
* Connection points, properties (and other relations)&lt;br /&gt;
** If the relation is used somewhere the operation must be cancelled or the corresponding statement must be removed.&lt;br /&gt;
* Components&lt;br /&gt;
** If component is created by mapping from a diagram the corresponding diagram elements should also be removed&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=File:Extent.png&amp;diff=3096</id>
		<title>File:Extent.png</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=File:Extent.png&amp;diff=3096"/>
		<updated>2013-11-12T13:43:09Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3095</id>
		<title>Subgraph operations</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Subgraph_operations&amp;diff=3095"/>
		<updated>2013-11-12T13:42:40Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: Created page with &amp;quot;Topic: Subgraph_operations  This page discusses about three common operations that handle some subgraph of the whole Simantics database. They all have very similar issues: * Expo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Topic: Subgraph_operations&lt;br /&gt;
&lt;br /&gt;
This page discusses about three common operations that handle some subgraph of the whole Simantics database.&lt;br /&gt;
They all have very similar issues:&lt;br /&gt;
* Export/import&lt;br /&gt;
** What is exported?&lt;br /&gt;
** How the references from the exported part to the unexported part are handled?&lt;br /&gt;
* Copy/paste&lt;br /&gt;
** What is copied?&lt;br /&gt;
** How the references from the copied part to the uncopied part are handled?&lt;br /&gt;
* Removal&lt;br /&gt;
** What is removed?&lt;br /&gt;
** How the references between the removed and the unremoved resources are handled?&lt;br /&gt;
Moreover in many cases copy/paste should behave similarly to export/import&lt;br /&gt;
and immediate removal of an imported object should usually restore the database to the &lt;br /&gt;
state before import.&lt;br /&gt;
&lt;br /&gt;
== Baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
First, it should be made clear, that in some cases there are more than one reasonable behaviour &lt;br /&gt;
for the operations. For example, consider an applications where graphical and semantic objects are&lt;br /&gt;
separated and the same semantic object can be represented by multiple graphical objects.&lt;br /&gt;
When the user removes a graphical object, it is possible to remove also the corresponding semantic object,&lt;br /&gt;
but it is also sensible to remove only the graphical object. Sometimes the desired behaviour can &lt;br /&gt;
be asked from the user.&lt;br /&gt;
&lt;br /&gt;
This means that the &amp;quot;correct&amp;quot; behaviour of each operation cannot be based purely on the shape of the&lt;br /&gt;
data but it should be customizable in each case separately. However, the customization cannot be &lt;br /&gt;
based solely on the type of the resource selected when the operation is requested. For example, a removal&lt;br /&gt;
of a library has a very simple behavior: its children should also be removed. However the children&lt;br /&gt;
of the library may each require different removal customization.&lt;br /&gt;
&lt;br /&gt;
In order to collect all requirements for the customizable export/import, copy/paste and removal operations,&lt;br /&gt;
we first define &#039;&#039;baseline behaviour&#039;&#039; for operations. Idea is that we then collect all current cases where&lt;br /&gt;
the operations should behave differently from the baseline and this helps for choosing the right customization&lt;br /&gt;
hooks.&lt;br /&gt;
&lt;br /&gt;
Each of the operations targets some resource C. In some cases there can be more than one target,&lt;br /&gt;
but definitions should be easily generalizable for that case.&lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;external to C&#039;&#039; if&lt;br /&gt;
there is a PartOf-path leading from the resource to the root library such&lt;br /&gt;
that the path does not include C. In other words, the set of resources external&lt;br /&gt;
to C are the resources that are reachable by ConsistsOf from root library without&lt;br /&gt;
going through C. &lt;br /&gt;
&lt;br /&gt;
A resource is &#039;&#039;in the context of C&#039;&#039; if it reachable from C by statements&lt;br /&gt;
without going through any external resources.&lt;br /&gt;
&lt;br /&gt;
[[Image:Extent.png]]&lt;br /&gt;
&lt;br /&gt;
Now, we can define baseline behaviors:&lt;br /&gt;
* Export writes all resources in the context of C as internal resources to the transferable graph, together with all their statements excluding a PartOf-statements from C. Resources external to C are referred by URI. C is marked the root of TG.&lt;br /&gt;
* Import creates all internal resources in TG file as new resources and add all the statements in TG. The references to external resources are resolved by URI and if the resource does not exist a dummy resource is created. The root of the TG is attached by ConsistsOf to the target of the import operation.&lt;br /&gt;
* Copy/paste behaves just like export/import.&lt;br /&gt;
* Removal removes all the resource in the context of C.&lt;br /&gt;
&lt;br /&gt;
== Exceptions to baseline behavior ==&lt;br /&gt;
&lt;br /&gt;
=== Export/import ===&lt;br /&gt;
&lt;br /&gt;
=== Copy/paste ===&lt;br /&gt;
&lt;br /&gt;
=== Removal ===&lt;br /&gt;
&lt;br /&gt;
* Component types (and other types)&lt;br /&gt;
** If the type has instances the operation must be cancelled or all the instances must be removed&lt;br /&gt;
* Connection points, properties (and other relations)&lt;br /&gt;
** If the relation is used somewhere the operation must be cancelled or the corresponding statement must be removed.&lt;br /&gt;
* Components&lt;br /&gt;
** If component is created by mapping from a diagram the corresponding diagram elements should also be removed&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Commands&amp;diff=3062</id>
		<title>Commands</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Commands&amp;diff=3062"/>
		<updated>2013-10-22T12:28:36Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Recording */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Requirements =&lt;br /&gt;
&lt;br /&gt;
The core idea of Simantics command system is to have all user interface&lt;br /&gt;
operations go through SCL function calls. This ensures they are all&lt;br /&gt;
available in SCL for writing scripts and regression tests.&lt;br /&gt;
The direct user need driving the development is recording of the&lt;br /&gt;
commands for later replaying.&lt;br /&gt;
&lt;br /&gt;
Because recording and scripting are the main applications,&lt;br /&gt;
the commands are defined to be operations that make modifications&lt;br /&gt;
to the persistent state of the application without any user &lt;br /&gt;
interaction. Thus for example a function that opens a wizard&lt;br /&gt;
is not a command, but the modification to a model that is&lt;br /&gt;
executed when the wizard is finished is a command. There are&lt;br /&gt;
probably cases where the difference is not so clear &lt;br /&gt;
(is changing of profiles a command?).&lt;br /&gt;
&lt;br /&gt;
For command recording, each command must have a context where&lt;br /&gt;
it is executed. Particularly when making modifications to &lt;br /&gt;
two models in the same workspace, the commands should be recorded&lt;br /&gt;
to two separate command logs. This may cause problems, when&lt;br /&gt;
the command affects the existence of the model (creating new model,&lt;br /&gt;
importing model, removing model), the command affects multiple&lt;br /&gt;
models (moving stuff between models) or the command causes a persistent&lt;br /&gt;
effect outside of models (changing preferences, importing ontologies).&lt;br /&gt;
&lt;br /&gt;
The command system should specify how commands are executed from&lt;br /&gt;
Java code, how they are referred in modelled user inteface actions&lt;br /&gt;
(such as modelled context view or selection view) and how new commands&lt;br /&gt;
are contributed.&lt;br /&gt;
&lt;br /&gt;
The main challenge of the system is the difference between two modes&lt;br /&gt;
of execution. When writing a script, the state of the application at&lt;br /&gt;
execution time is unknown and all commands should be available. Each &lt;br /&gt;
command is executed atomically and they either succeed or fail with&lt;br /&gt;
an error message that is either written to the console, if the execution&lt;br /&gt;
is initiated there, or otherwise shown in a dialog.&lt;br /&gt;
On the other hand, when executing commands from UI, the user expects that UI hides&lt;br /&gt;
or disables the actions that are not allowed in the current operating&lt;br /&gt;
context or will surely fail.&lt;br /&gt;
&lt;br /&gt;
The second challenge is the serialization of the commands for recording&lt;br /&gt;
so that commands would be valid with maximal probability when replaying&lt;br /&gt;
in an application context with possible minor differences.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The most important thing of the command is the modification it&lt;br /&gt;
makes to the model. However, for use in UI, some additional information&lt;br /&gt;
is needed such as which roles are allowed to execute the command and&lt;br /&gt;
a function to check is the command execution possible. &lt;br /&gt;
&lt;br /&gt;
The following approaches were consided for bundling this information together:&lt;br /&gt;
# Commands are SCL functions returning a value of type &amp;lt;code&amp;gt;Command a&amp;lt;/code&amp;gt; that can be checked and executed&lt;br /&gt;
# Commands are concepts in ontologies that define different properties containing SCL functions for checking and execution&lt;br /&gt;
# Commands are specified as separate SCL functions that are tied together by naming conventions&lt;br /&gt;
&lt;br /&gt;
The first approach has some drawbacks. First, it is not possible to know the allowed roles&lt;br /&gt;
without first giving all parameters to the function. Second, without adding some new syntactic&lt;br /&gt;
sugar, the &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type complicates writing of scripts. Either every command&lt;br /&gt;
has to be wrapped like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec (newDiagram ...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or written in monadic style. A benefit of &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type might be the ability to create&lt;br /&gt;
new commands by combinators. &lt;br /&gt;
&lt;br /&gt;
The second approach makes possible to define arbitrary properties for the commands, so it&lt;br /&gt;
is extensible. Its drawback is the need for a read transaction for obtaining information about&lt;br /&gt;
commands. It makes it also heavier to define new commands. A command contribution might&lt;br /&gt;
involve additions in three places: Java code implementing the operation, SCL code importing&lt;br /&gt;
the Java code and ontology referring to SCL.&lt;br /&gt;
&lt;br /&gt;
The third approach has the flexibility of the ontology approach, but is lighterweight. &lt;br /&gt;
Role and checking may have some defaults (allowed for any role, no checking), which&lt;br /&gt;
makes it possible to consider any SCL function as a command. For these benefits we&lt;br /&gt;
choose this approach.&lt;br /&gt;
&lt;br /&gt;
== Defining commands ==&lt;br /&gt;
&lt;br /&gt;
Commands are defined as ordinary SCL-functions. The name of the command (and thus the defining function)&lt;br /&gt;
should be in imperative mood (createDiagram, not newDiagram). The command is executed in a write transaction,&lt;br /&gt;
thus WriteGraph and Proc effects are allowed in the signature.&lt;br /&gt;
&lt;br /&gt;
Additional SCL-functions &amp;lt;code&amp;gt;command_check&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;command_role&amp;lt;/code&amp;gt; specify the related&lt;br /&gt;
checking function and role. Although we follow camel case naming convention in SCL, in this case&lt;br /&gt;
the suffixes are separated by &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;. Role function should return the role name (string). &lt;br /&gt;
The parameters of the role function are some prefix of the parameters of the command, typically&lt;br /&gt;
role function does not have parameters at all. &lt;br /&gt;
&lt;br /&gt;
The signature of the checking function is related to the signature of the command in a more complicated&lt;br /&gt;
way in order to make checking of partial parameters possible. Basically some suffix of the signature&lt;br /&gt;
is replaced by &amp;lt;code&amp;gt;Boolean&amp;lt;/code&amp;gt; and any right subtype may be enclosed in &amp;lt;code&amp;gt;Maybe&amp;lt;/code&amp;gt;. &lt;br /&gt;
The checking function may have ReadGraph effect and if it has the command system ensures that it is&lt;br /&gt;
executed in the read transaction.&lt;br /&gt;
So, if the signature of the command is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;WriteGraph&amp;gt; C&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, the signature of the checking function can be for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; Boolean)&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the final Boolean value is false or any of the intermediate Maybe value is&lt;br /&gt;
Nothing, then the command may not be executed.&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setPropertyAsString :: Variable -&amp;gt; String -&amp;gt; &amp;lt;WriteGraph&amp;gt; ()&lt;br /&gt;
setPropertyAsString_check :: Variable -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (String -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
setPropertyAsString_role :: String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command takes a variable and a value in a string form as a parameter. &lt;br /&gt;
The checking function first checks if the variable is writable. The second&lt;br /&gt;
part of the checking tests that the string value is valid.&lt;br /&gt;
&lt;br /&gt;
== Java API ==&lt;br /&gt;
&lt;br /&gt;
Java API for executing commands is meant to be used during execution of&lt;br /&gt;
UI operations. A command is obtained with the following method:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class Commands {&lt;br /&gt;
    public static Command get(ReadGraph graph, String name);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The parameter &#039;name&#039; is the full name of the SCL-function (such as &amp;lt;code&amp;gt;Simantics/Diagram/setTransformation&amp;lt;/code&amp;gt;).&lt;br /&gt;
The method never fails but returns a dummy Command-object if the command is not found.&lt;br /&gt;
&lt;br /&gt;
Command interface contains a method for checking if the command is applicable with the given parameters. It may be given less than all parameters of the command. The command can be executed synchronously or asynchronously. &lt;br /&gt;
All methods need a context resource (usually a model) that must be first obtained. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public interface Command {&lt;br /&gt;
    boolean check(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException;&lt;br /&gt;
    Object execute(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException;&lt;br /&gt;
    void asyncExecute(RequestProcessor processor, Resource model, Object[] parameters,&lt;br /&gt;
            Procedure&amp;lt;Object&amp;gt; procedure);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The interface handles roles automatically. When the current user has no&lt;br /&gt;
privileges to execute the command, check method always fails.&lt;br /&gt;
&lt;br /&gt;
== Recording ==&lt;br /&gt;
&lt;br /&gt;
When a command is executed, the textual form of the command is written &lt;br /&gt;
to the metadata of the change set. The command metadata is associated with a &lt;br /&gt;
certain context (usually a model). Although the metadata is enough to reconstruct&lt;br /&gt;
the whole command history, a snapshot of the history is periodically written to&lt;br /&gt;
a separate file to save information in the case the whole database corrupts.&lt;br /&gt;
&lt;br /&gt;
The writing of command metadata happens in the commit-method of the Command interface&lt;br /&gt;
after the change is successfully made the the database and no exception is&lt;br /&gt;
thrown. Each command is written in a form readily suitable for execution in a script&lt;br /&gt;
with two exceptions: Command begins with the full name of the command function so that&lt;br /&gt;
no imports are not expected to be available. It is assumed that a resource &lt;br /&gt;
named &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; is defined.&lt;br /&gt;
&lt;br /&gt;
Command parameters are serialized with a function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gshow :: GShow a =&amp;gt; Resource -&amp;gt; a -&amp;gt; &amp;lt;Proc,ReadGraph&amp;gt; String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first parameter is the current context resource. All references are made relative&lt;br /&gt;
to that resource so that commands can later executed in some other context. The method&lt;br /&gt;
&amp;lt;code&amp;gt;gshow&amp;lt;/code&amp;gt; works much like &amp;lt;code&amp;gt;show&amp;lt;/code&amp;gt; in Prelude, but&lt;br /&gt;
is also able to write expressions for finding resources in ontologies and under&lt;br /&gt;
the context resource. It is defined in the module &amp;lt;code&amp;gt;Simantics/GShow&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Commands&amp;diff=3061</id>
		<title>Commands</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Commands&amp;diff=3061"/>
		<updated>2013-10-22T12:28:09Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Recording */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Requirements =&lt;br /&gt;
&lt;br /&gt;
The core idea of Simantics command system is to have all user interface&lt;br /&gt;
operations go through SCL function calls. This ensures they are all&lt;br /&gt;
available in SCL for writing scripts and regression tests.&lt;br /&gt;
The direct user need driving the development is recording of the&lt;br /&gt;
commands for later replaying.&lt;br /&gt;
&lt;br /&gt;
Because recording and scripting are the main applications,&lt;br /&gt;
the commands are defined to be operations that make modifications&lt;br /&gt;
to the persistent state of the application without any user &lt;br /&gt;
interaction. Thus for example a function that opens a wizard&lt;br /&gt;
is not a command, but the modification to a model that is&lt;br /&gt;
executed when the wizard is finished is a command. There are&lt;br /&gt;
probably cases where the difference is not so clear &lt;br /&gt;
(is changing of profiles a command?).&lt;br /&gt;
&lt;br /&gt;
For command recording, each command must have a context where&lt;br /&gt;
it is executed. Particularly when making modifications to &lt;br /&gt;
two models in the same workspace, the commands should be recorded&lt;br /&gt;
to two separate command logs. This may cause problems, when&lt;br /&gt;
the command affects the existence of the model (creating new model,&lt;br /&gt;
importing model, removing model), the command affects multiple&lt;br /&gt;
models (moving stuff between models) or the command causes a persistent&lt;br /&gt;
effect outside of models (changing preferences, importing ontologies).&lt;br /&gt;
&lt;br /&gt;
The command system should specify how commands are executed from&lt;br /&gt;
Java code, how they are referred in modelled user inteface actions&lt;br /&gt;
(such as modelled context view or selection view) and how new commands&lt;br /&gt;
are contributed.&lt;br /&gt;
&lt;br /&gt;
The main challenge of the system is the difference between two modes&lt;br /&gt;
of execution. When writing a script, the state of the application at&lt;br /&gt;
execution time is unknown and all commands should be available. Each &lt;br /&gt;
command is executed atomically and they either succeed or fail with&lt;br /&gt;
an error message that is either written to the console, if the execution&lt;br /&gt;
is initiated there, or otherwise shown in a dialog.&lt;br /&gt;
On the other hand, when executing commands from UI, the user expects that UI hides&lt;br /&gt;
or disables the actions that are not allowed in the current operating&lt;br /&gt;
context or will surely fail.&lt;br /&gt;
&lt;br /&gt;
The second challenge is the serialization of the commands for recording&lt;br /&gt;
so that commands would be valid with maximal probability when replaying&lt;br /&gt;
in an application context with possible minor differences.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The most important thing of the command is the modification it&lt;br /&gt;
makes to the model. However, for use in UI, some additional information&lt;br /&gt;
is needed such as which roles are allowed to execute the command and&lt;br /&gt;
a function to check is the command execution possible. &lt;br /&gt;
&lt;br /&gt;
The following approaches were consided for bundling this information together:&lt;br /&gt;
# Commands are SCL functions returning a value of type &amp;lt;code&amp;gt;Command a&amp;lt;/code&amp;gt; that can be checked and executed&lt;br /&gt;
# Commands are concepts in ontologies that define different properties containing SCL functions for checking and execution&lt;br /&gt;
# Commands are specified as separate SCL functions that are tied together by naming conventions&lt;br /&gt;
&lt;br /&gt;
The first approach has some drawbacks. First, it is not possible to know the allowed roles&lt;br /&gt;
without first giving all parameters to the function. Second, without adding some new syntactic&lt;br /&gt;
sugar, the &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type complicates writing of scripts. Either every command&lt;br /&gt;
has to be wrapped like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec (newDiagram ...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or written in monadic style. A benefit of &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type might be the ability to create&lt;br /&gt;
new commands by combinators. &lt;br /&gt;
&lt;br /&gt;
The second approach makes possible to define arbitrary properties for the commands, so it&lt;br /&gt;
is extensible. Its drawback is the need for a read transaction for obtaining information about&lt;br /&gt;
commands. It makes it also heavier to define new commands. A command contribution might&lt;br /&gt;
involve additions in three places: Java code implementing the operation, SCL code importing&lt;br /&gt;
the Java code and ontology referring to SCL.&lt;br /&gt;
&lt;br /&gt;
The third approach has the flexibility of the ontology approach, but is lighterweight. &lt;br /&gt;
Role and checking may have some defaults (allowed for any role, no checking), which&lt;br /&gt;
makes it possible to consider any SCL function as a command. For these benefits we&lt;br /&gt;
choose this approach.&lt;br /&gt;
&lt;br /&gt;
== Defining commands ==&lt;br /&gt;
&lt;br /&gt;
Commands are defined as ordinary SCL-functions. The name of the command (and thus the defining function)&lt;br /&gt;
should be in imperative mood (createDiagram, not newDiagram). The command is executed in a write transaction,&lt;br /&gt;
thus WriteGraph and Proc effects are allowed in the signature.&lt;br /&gt;
&lt;br /&gt;
Additional SCL-functions &amp;lt;code&amp;gt;command_check&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;command_role&amp;lt;/code&amp;gt; specify the related&lt;br /&gt;
checking function and role. Although we follow camel case naming convention in SCL, in this case&lt;br /&gt;
the suffixes are separated by &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;. Role function should return the role name (string). &lt;br /&gt;
The parameters of the role function are some prefix of the parameters of the command, typically&lt;br /&gt;
role function does not have parameters at all. &lt;br /&gt;
&lt;br /&gt;
The signature of the checking function is related to the signature of the command in a more complicated&lt;br /&gt;
way in order to make checking of partial parameters possible. Basically some suffix of the signature&lt;br /&gt;
is replaced by &amp;lt;code&amp;gt;Boolean&amp;lt;/code&amp;gt; and any right subtype may be enclosed in &amp;lt;code&amp;gt;Maybe&amp;lt;/code&amp;gt;. &lt;br /&gt;
The checking function may have ReadGraph effect and if it has the command system ensures that it is&lt;br /&gt;
executed in the read transaction.&lt;br /&gt;
So, if the signature of the command is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;WriteGraph&amp;gt; C&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, the signature of the checking function can be for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; Boolean)&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the final Boolean value is false or any of the intermediate Maybe value is&lt;br /&gt;
Nothing, then the command may not be executed.&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setPropertyAsString :: Variable -&amp;gt; String -&amp;gt; &amp;lt;WriteGraph&amp;gt; ()&lt;br /&gt;
setPropertyAsString_check :: Variable -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (String -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
setPropertyAsString_role :: String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command takes a variable and a value in a string form as a parameter. &lt;br /&gt;
The checking function first checks if the variable is writable. The second&lt;br /&gt;
part of the checking tests that the string value is valid.&lt;br /&gt;
&lt;br /&gt;
== Java API ==&lt;br /&gt;
&lt;br /&gt;
Java API for executing commands is meant to be used during execution of&lt;br /&gt;
UI operations. A command is obtained with the following method:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class Commands {&lt;br /&gt;
    public static Command get(ReadGraph graph, String name);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The parameter &#039;name&#039; is the full name of the SCL-function (such as &amp;lt;code&amp;gt;Simantics/Diagram/setTransformation&amp;lt;/code&amp;gt;).&lt;br /&gt;
The method never fails but returns a dummy Command-object if the command is not found.&lt;br /&gt;
&lt;br /&gt;
Command interface contains a method for checking if the command is applicable with the given parameters. It may be given less than all parameters of the command. The command can be executed synchronously or asynchronously. &lt;br /&gt;
All methods need a context resource (usually a model) that must be first obtained. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public interface Command {&lt;br /&gt;
    boolean check(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException;&lt;br /&gt;
    Object execute(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException;&lt;br /&gt;
    void asyncExecute(RequestProcessor processor, Resource model, Object[] parameters,&lt;br /&gt;
            Procedure&amp;lt;Object&amp;gt; procedure);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The interface handles roles automatically. When the current user has no&lt;br /&gt;
privileges to execute the command, check method always fails.&lt;br /&gt;
&lt;br /&gt;
== Recording ==&lt;br /&gt;
&lt;br /&gt;
When a command is executed, the textual form of the command is written &lt;br /&gt;
to the metadata of the change set. The command metadata is associated with a &lt;br /&gt;
certain context (usually a model). Although the metadata is enough to reconstruct&lt;br /&gt;
the whole command history, a snapshot of the history is periodically written to&lt;br /&gt;
a separate file to save information in the case the whole database corrupts.&lt;br /&gt;
&lt;br /&gt;
The writing of command metadata happens in the commit-method of the Command interface&lt;br /&gt;
after the change is successfully made the the database and no exception is&lt;br /&gt;
thrown. Each command is written in a form readily suitable for execution in a script&lt;br /&gt;
with two exceptions: Command begins with the full name of the command function so that&lt;br /&gt;
no imports are not expected to be available. It is assumed that a resource &lt;br /&gt;
named &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; is defined.&lt;br /&gt;
&lt;br /&gt;
Command parameters are serialized with a function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gshow :: GShow a =&amp;gt; Resource -&amp;gt; a -&amp;gt; &amp;lt;Proc,ReadGraph&amp;gt; String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first parameter is the current context resource. All references are made relative&lt;br /&gt;
to that resource that commands can later executed in some other context. The method&lt;br /&gt;
&amp;lt;code&amp;gt;gshow&amp;lt;/code&amp;gt; works much like &amp;lt;code&amp;gt;show&amp;lt;/code&amp;gt; in Prelude, but&lt;br /&gt;
is also able to write expressions for finding resources in ontologies and under&lt;br /&gt;
the context resource. It is defined in the module &amp;lt;code&amp;gt;Simantics/GShow&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Commands&amp;diff=3060</id>
		<title>Commands</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Commands&amp;diff=3060"/>
		<updated>2013-10-22T12:26:31Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Java API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Requirements =&lt;br /&gt;
&lt;br /&gt;
The core idea of Simantics command system is to have all user interface&lt;br /&gt;
operations go through SCL function calls. This ensures they are all&lt;br /&gt;
available in SCL for writing scripts and regression tests.&lt;br /&gt;
The direct user need driving the development is recording of the&lt;br /&gt;
commands for later replaying.&lt;br /&gt;
&lt;br /&gt;
Because recording and scripting are the main applications,&lt;br /&gt;
the commands are defined to be operations that make modifications&lt;br /&gt;
to the persistent state of the application without any user &lt;br /&gt;
interaction. Thus for example a function that opens a wizard&lt;br /&gt;
is not a command, but the modification to a model that is&lt;br /&gt;
executed when the wizard is finished is a command. There are&lt;br /&gt;
probably cases where the difference is not so clear &lt;br /&gt;
(is changing of profiles a command?).&lt;br /&gt;
&lt;br /&gt;
For command recording, each command must have a context where&lt;br /&gt;
it is executed. Particularly when making modifications to &lt;br /&gt;
two models in the same workspace, the commands should be recorded&lt;br /&gt;
to two separate command logs. This may cause problems, when&lt;br /&gt;
the command affects the existence of the model (creating new model,&lt;br /&gt;
importing model, removing model), the command affects multiple&lt;br /&gt;
models (moving stuff between models) or the command causes a persistent&lt;br /&gt;
effect outside of models (changing preferences, importing ontologies).&lt;br /&gt;
&lt;br /&gt;
The command system should specify how commands are executed from&lt;br /&gt;
Java code, how they are referred in modelled user inteface actions&lt;br /&gt;
(such as modelled context view or selection view) and how new commands&lt;br /&gt;
are contributed.&lt;br /&gt;
&lt;br /&gt;
The main challenge of the system is the difference between two modes&lt;br /&gt;
of execution. When writing a script, the state of the application at&lt;br /&gt;
execution time is unknown and all commands should be available. Each &lt;br /&gt;
command is executed atomically and they either succeed or fail with&lt;br /&gt;
an error message that is either written to the console, if the execution&lt;br /&gt;
is initiated there, or otherwise shown in a dialog.&lt;br /&gt;
On the other hand, when executing commands from UI, the user expects that UI hides&lt;br /&gt;
or disables the actions that are not allowed in the current operating&lt;br /&gt;
context or will surely fail.&lt;br /&gt;
&lt;br /&gt;
The second challenge is the serialization of the commands for recording&lt;br /&gt;
so that commands would be valid with maximal probability when replaying&lt;br /&gt;
in an application context with possible minor differences.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The most important thing of the command is the modification it&lt;br /&gt;
makes to the model. However, for use in UI, some additional information&lt;br /&gt;
is needed such as which roles are allowed to execute the command and&lt;br /&gt;
a function to check is the command execution possible. &lt;br /&gt;
&lt;br /&gt;
The following approaches were consided for bundling this information together:&lt;br /&gt;
# Commands are SCL functions returning a value of type &amp;lt;code&amp;gt;Command a&amp;lt;/code&amp;gt; that can be checked and executed&lt;br /&gt;
# Commands are concepts in ontologies that define different properties containing SCL functions for checking and execution&lt;br /&gt;
# Commands are specified as separate SCL functions that are tied together by naming conventions&lt;br /&gt;
&lt;br /&gt;
The first approach has some drawbacks. First, it is not possible to know the allowed roles&lt;br /&gt;
without first giving all parameters to the function. Second, without adding some new syntactic&lt;br /&gt;
sugar, the &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type complicates writing of scripts. Either every command&lt;br /&gt;
has to be wrapped like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec (newDiagram ...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or written in monadic style. A benefit of &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type might be the ability to create&lt;br /&gt;
new commands by combinators. &lt;br /&gt;
&lt;br /&gt;
The second approach makes possible to define arbitrary properties for the commands, so it&lt;br /&gt;
is extensible. Its drawback is the need for a read transaction for obtaining information about&lt;br /&gt;
commands. It makes it also heavier to define new commands. A command contribution might&lt;br /&gt;
involve additions in three places: Java code implementing the operation, SCL code importing&lt;br /&gt;
the Java code and ontology referring to SCL.&lt;br /&gt;
&lt;br /&gt;
The third approach has the flexibility of the ontology approach, but is lighterweight. &lt;br /&gt;
Role and checking may have some defaults (allowed for any role, no checking), which&lt;br /&gt;
makes it possible to consider any SCL function as a command. For these benefits we&lt;br /&gt;
choose this approach.&lt;br /&gt;
&lt;br /&gt;
== Defining commands ==&lt;br /&gt;
&lt;br /&gt;
Commands are defined as ordinary SCL-functions. The name of the command (and thus the defining function)&lt;br /&gt;
should be in imperative mood (createDiagram, not newDiagram). The command is executed in a write transaction,&lt;br /&gt;
thus WriteGraph and Proc effects are allowed in the signature.&lt;br /&gt;
&lt;br /&gt;
Additional SCL-functions &amp;lt;code&amp;gt;command_check&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;command_role&amp;lt;/code&amp;gt; specify the related&lt;br /&gt;
checking function and role. Although we follow camel case naming convention in SCL, in this case&lt;br /&gt;
the suffixes are separated by &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;. Role function should return the role name (string). &lt;br /&gt;
The parameters of the role function are some prefix of the parameters of the command, typically&lt;br /&gt;
role function does not have parameters at all. &lt;br /&gt;
&lt;br /&gt;
The signature of the checking function is related to the signature of the command in a more complicated&lt;br /&gt;
way in order to make checking of partial parameters possible. Basically some suffix of the signature&lt;br /&gt;
is replaced by &amp;lt;code&amp;gt;Boolean&amp;lt;/code&amp;gt; and any right subtype may be enclosed in &amp;lt;code&amp;gt;Maybe&amp;lt;/code&amp;gt;. &lt;br /&gt;
The checking function may have ReadGraph effect and if it has the command system ensures that it is&lt;br /&gt;
executed in the read transaction.&lt;br /&gt;
So, if the signature of the command is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;WriteGraph&amp;gt; C&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, the signature of the checking function can be for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; Boolean)&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the final Boolean value is false or any of the intermediate Maybe value is&lt;br /&gt;
Nothing, then the command may not be executed.&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setPropertyAsString :: Variable -&amp;gt; String -&amp;gt; &amp;lt;WriteGraph&amp;gt; ()&lt;br /&gt;
setPropertyAsString_check :: Variable -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (String -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
setPropertyAsString_role :: String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command takes a variable and a value in a string form as a parameter. &lt;br /&gt;
The checking function first checks if the variable is writable. The second&lt;br /&gt;
part of the checking tests that the string value is valid.&lt;br /&gt;
&lt;br /&gt;
== Java API ==&lt;br /&gt;
&lt;br /&gt;
Java API for executing commands is meant to be used during execution of&lt;br /&gt;
UI operations. A command is obtained with the following method:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class Commands {&lt;br /&gt;
    public static Command get(ReadGraph graph, String name);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The parameter &#039;name&#039; is the full name of the SCL-function (such as &amp;lt;code&amp;gt;Simantics/Diagram/setTransformation&amp;lt;/code&amp;gt;).&lt;br /&gt;
The method never fails but returns a dummy Command-object if the command is not found.&lt;br /&gt;
&lt;br /&gt;
Command interface contains a method for checking if the command is applicable with the given parameters. It may be given less than all parameters of the command. The command can be executed synchronously or asynchronously. &lt;br /&gt;
All methods need a context resource (usually a model) that must be first obtained. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public interface Command {&lt;br /&gt;
    boolean check(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException;&lt;br /&gt;
    Object execute(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException;&lt;br /&gt;
    void asyncExecute(RequestProcessor processor, Resource model, Object[] parameters,&lt;br /&gt;
            Procedure&amp;lt;Object&amp;gt; procedure);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The interface handles roles automatically. When the current user has no&lt;br /&gt;
privileges to execute the command, check method always fails.&lt;br /&gt;
&lt;br /&gt;
== Recording ==&lt;br /&gt;
&lt;br /&gt;
When a command is executed, the textual form of the command is written &lt;br /&gt;
to the metadata of the change set. The command metadata is associated with a &lt;br /&gt;
certain context (usually a model). Although the metadata is enough to reconstruct&lt;br /&gt;
the whole command history, a snapshot of the history is periodically written to&lt;br /&gt;
a separate file to save information in the case the whole database corrupts.&lt;br /&gt;
&lt;br /&gt;
The writing of command metadata happens in the commit-method of the Command interface&lt;br /&gt;
after the change is successfully made the the database and no exception is&lt;br /&gt;
thrown. Each command is written in a form readily suitable for execution in a script&lt;br /&gt;
with two exceptions: Command begins with the full name of the command function so that&lt;br /&gt;
no imports are not expected to be available. It is assumed that a resource &lt;br /&gt;
named &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; is defined.&lt;br /&gt;
&lt;br /&gt;
Command parameters are serialized with a type class:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class RepresentableParameter a where&lt;br /&gt;
    representParameter :: Resource -&amp;gt; a -&amp;gt; &amp;lt;ReadGraph&amp;gt; String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first parameter is the current context resource. All references are made relative&lt;br /&gt;
to that resource that commands can later executed in some other context. The method&lt;br /&gt;
&amp;lt;code&amp;gt;representParameter&amp;lt;/code&amp;gt; works much like &amp;lt;code&amp;gt;show&amp;lt;/code&amp;gt; in Prelude, but&lt;br /&gt;
is also able to write expressions for finding resources in ontologies and under&lt;br /&gt;
the context resource.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Commands&amp;diff=3042</id>
		<title>Commands</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Commands&amp;diff=3042"/>
		<updated>2013-09-26T10:49:10Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Recording */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Requirements =&lt;br /&gt;
&lt;br /&gt;
The core idea of Simantics command system is to have all user interface&lt;br /&gt;
operations go through SCL function calls. This ensures they are all&lt;br /&gt;
available in SCL for writing scripts and regression tests.&lt;br /&gt;
The direct user need driving the development is recording of the&lt;br /&gt;
commands for later replaying.&lt;br /&gt;
&lt;br /&gt;
Because recording and scripting are the main applications,&lt;br /&gt;
the commands are defined to be operations that make modifications&lt;br /&gt;
to the persistent state of the application without any user &lt;br /&gt;
interaction. Thus for example a function that opens a wizard&lt;br /&gt;
is not a command, but the modification to a model that is&lt;br /&gt;
executed when the wizard is finished is a command. There are&lt;br /&gt;
probably cases where the difference is not so clear &lt;br /&gt;
(is changing of profiles a command?).&lt;br /&gt;
&lt;br /&gt;
For command recording, each command must have a context where&lt;br /&gt;
it is executed. Particularly when making modifications to &lt;br /&gt;
two models in the same workspace, the commands should be recorded&lt;br /&gt;
to two separate command logs. This may cause problems, when&lt;br /&gt;
the command affects the existence of the model (creating new model,&lt;br /&gt;
importing model, removing model), the command affects multiple&lt;br /&gt;
models (moving stuff between models) or the command causes a persistent&lt;br /&gt;
effect outside of models (changing preferences, importing ontologies).&lt;br /&gt;
&lt;br /&gt;
The command system should specify how commands are executed from&lt;br /&gt;
Java code, how they are referred in modelled user inteface actions&lt;br /&gt;
(such as modelled context view or selection view) and how new commands&lt;br /&gt;
are contributed.&lt;br /&gt;
&lt;br /&gt;
The main challenge of the system is the difference between two modes&lt;br /&gt;
of execution. When writing a script, the state of the application at&lt;br /&gt;
execution time is unknown and all commands should be available. Each &lt;br /&gt;
command is executed atomically and they either succeed or fail with&lt;br /&gt;
an error message that is either written to the console, if the execution&lt;br /&gt;
is initiated there, or otherwise shown in a dialog.&lt;br /&gt;
On the other hand, when executing commands from UI, the user expects that UI hides&lt;br /&gt;
or disables the actions that are not allowed in the current operating&lt;br /&gt;
context or will surely fail.&lt;br /&gt;
&lt;br /&gt;
The second challenge is the serialization of the commands for recording&lt;br /&gt;
so that commands would be valid with maximal probability when replaying&lt;br /&gt;
in possible little different application context.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The most important thing of the command is the modification it&lt;br /&gt;
makes to the model. However, for use in UI, some additional information&lt;br /&gt;
is needed such as which roles are allowed to execute the command and&lt;br /&gt;
a function to check is the command execution possible. &lt;br /&gt;
&lt;br /&gt;
The following approaches were consided for bundling this information together:&lt;br /&gt;
# Commands are SCL functions returning a value of type &amp;lt;code&amp;gt;Command a&amp;lt;/code&amp;gt; that can be checked and executed&lt;br /&gt;
# Commands are concepts in ontologies that define different properties containing SCL functions for checking and execution&lt;br /&gt;
# Commands are specified as separate SCL functions that are tied together by naming conventions&lt;br /&gt;
&lt;br /&gt;
The first approach has some drawbacks. First, it is not possible to know the allowed roles&lt;br /&gt;
without first giving all parameters to the function. Second, without adding some new syntactic&lt;br /&gt;
sugar, the &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type complicated writing of scripts. Either every command&lt;br /&gt;
has to be wrapped like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec (newDiagram ...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or written in monadic style. A benefit of &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type might be the ability to create&lt;br /&gt;
new commands by combinators. &lt;br /&gt;
&lt;br /&gt;
The second approach makes possible to define arbitrary properties for the commands, so it&lt;br /&gt;
is extensible. Its drawback is need for a read transaction for obtaining information about&lt;br /&gt;
commands. It makes it also heavier to define new commands. A command contribution might&lt;br /&gt;
involve additions in three places: Java code implementing the operation, SCL code importing&lt;br /&gt;
the Java code and ontology referring to SCL.&lt;br /&gt;
&lt;br /&gt;
The third approach has the flexibility of the ontology approach, but is lighterweight. &lt;br /&gt;
Role and checking may have some defaults (allowed for any role, no checking), which&lt;br /&gt;
makes it possible to consider any SCL function as a command. For these benefits we&lt;br /&gt;
choose this approach.&lt;br /&gt;
&lt;br /&gt;
== Defining commands ==&lt;br /&gt;
&lt;br /&gt;
Commands are defined as ordinary SCL-functions. The name of the command (and thus the defining function)&lt;br /&gt;
should be in imperative mood (createDiagram, not newDiagram). The command is executed in a write transaction,&lt;br /&gt;
thus WriteGraph and Proc effects are allowed in the signature.&lt;br /&gt;
&lt;br /&gt;
Additional SCL-functions &amp;lt;code&amp;gt;command_check&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;command_role&amp;lt;/code&amp;gt; specify the related&lt;br /&gt;
checking function and role. Although we follow camel case naming convention in SCL, in this case&lt;br /&gt;
the suffixes are separated by &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;. Role function should return the role name (string). &lt;br /&gt;
The parameters of the role function are some prefix of the parameters of the command, typically&lt;br /&gt;
role function does not have parameters at all. &lt;br /&gt;
&lt;br /&gt;
The signature of the checking function is related to the signature of the command in more complicated&lt;br /&gt;
way in order to make checking of partial parameters possible. Basically some suffix of the signature&lt;br /&gt;
is replaced by &amp;lt;code&amp;gt;Boolean&amp;lt;/code&amp;gt; and any right subtype may be enclosed in &amp;lt;code&amp;gt;Maybe&amp;lt;/code&amp;gt;. &lt;br /&gt;
The checking function may have ReadGraph event and if it has the command system ensures that it is&lt;br /&gt;
executed in the read transaction.&lt;br /&gt;
So, if the signature of the command is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;WriteGraph&amp;gt; C&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, the signature of the checking function can be for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; Boolean)&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the final Boolean value is false or any of the intermediate Maybe value is&lt;br /&gt;
Nothing, then the command may not be executed.&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setPropertyAsString :: Variable -&amp;gt; String -&amp;gt; &amp;lt;WriteGraph&amp;gt; ()&lt;br /&gt;
setPropertyAsString_check :: Variable -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (String -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
setPropertyAsString_role :: String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command takes a variable and a value in a string form as a parameter. &lt;br /&gt;
The checking function first check, if the variable is writable. The second&lt;br /&gt;
part of the checking tests that the string value is valid.&lt;br /&gt;
&lt;br /&gt;
== Java API ==&lt;br /&gt;
&lt;br /&gt;
Java API for executing commands is meant to be used from during execution of&lt;br /&gt;
UI operations. Commands are executed in contexts (usually models) that&lt;br /&gt;
must be first obtained. New command can be created with &amp;lt;code&amp;gt;newCommand&amp;lt;/code&amp;gt;&lt;br /&gt;
method in the context. Parameter &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; is a full path of the&lt;br /&gt;
SCL-function implementing the command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class CommandContext {&lt;br /&gt;
    public static CommandContext getContext(Resource resource);&lt;br /&gt;
    public static CommandContext getContext(RequestProcessor graph, Resource resource);&lt;br /&gt;
    public Command newCommand(String name);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command interface has methods for adding and removing parameters, checking&lt;br /&gt;
that command is eligible for exectution and committing the command.&lt;br /&gt;
Even if checking accepts the parameter, the command may fail in commit. &lt;br /&gt;
On failure, an exception is thrown (currently no special exception is specified).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public interface Command {&lt;br /&gt;
    Command addParameters(Object ... parameters);&lt;br /&gt;
    Command removeParameters(int count);&lt;br /&gt;
    boolean check();&lt;br /&gt;
    boolean check(RequestProcessor graph);&lt;br /&gt;
    void commit();&lt;br /&gt;
    void commit(RequestProcessor graph);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(TODO async methods?)&lt;br /&gt;
&lt;br /&gt;
The interface handles roles automatically. When the current user has no&lt;br /&gt;
privileges to execute the command, check method always fails.&lt;br /&gt;
&lt;br /&gt;
Example (fictional):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public Runnable renameContribution(Resource target) {&lt;br /&gt;
    final Command command = CommandContext.getContext(target)&lt;br /&gt;
                .newCommand(&amp;quot;Simantics/FictionalModule/rename&amp;quot;, target);&lt;br /&gt;
    if(!command.check())&lt;br /&gt;
        return null; // Cannot rename the target&lt;br /&gt;
    else &lt;br /&gt;
        return new Runnable() {&lt;br /&gt;
            public void run() {&lt;br /&gt;
                new RenameWidget(command).start();&lt;br /&gt;
            }&lt;br /&gt;
        };&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class RenameWidget {&lt;br /&gt;
    Command command;&lt;br /&gt;
    public RenameWidget(Command command) { this.command = command; }&lt;br /&gt;
	&lt;br /&gt;
    public boolean validate(String name) {&lt;br /&gt;
        boolean result = command.addParameters(name).check();&lt;br /&gt;
        command.removeParameters(1);&lt;br /&gt;
        return result;&lt;br /&gt;
    }&lt;br /&gt;
	&lt;br /&gt;
    public void finish() {&lt;br /&gt;
        try {&lt;br /&gt;
            command.addParameters(getName()).commit();&lt;br /&gt;
        } catch(Exception e) {&lt;br /&gt;
            show error to user&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Recording ==&lt;br /&gt;
&lt;br /&gt;
When a command is executed, the textual form of the command is written &lt;br /&gt;
to the metadata of the change set. The command metadata is associated with a &lt;br /&gt;
certain context (usually a model). Although the metadata is enough to reconstruct&lt;br /&gt;
the whole command history, a snapshot of the history is periodically written to&lt;br /&gt;
a separate file to save information in the case the whole database corrupts.&lt;br /&gt;
&lt;br /&gt;
The writing of command metadata happens in the commit-method of the Command interface&lt;br /&gt;
after the change is successfully made the the database and no exception is&lt;br /&gt;
thrown. Each command is written in a form readily suitable for execution in a script&lt;br /&gt;
with two exceptions: Command begins with the full name of the command function so that&lt;br /&gt;
no imports are not expected to be available. It is assumed that a resource &lt;br /&gt;
named &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; is defined.&lt;br /&gt;
&lt;br /&gt;
Command parameters are serialized with a type class:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class RepresentableParameter a where&lt;br /&gt;
    representParameter :: Resource -&amp;gt; a -&amp;gt; &amp;lt;ReadGraph&amp;gt; String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first parameter is the current context resource. All references are made relative&lt;br /&gt;
to that resource that commands can later executed in some other context. The method&lt;br /&gt;
&amp;lt;code&amp;gt;representParameter&amp;lt;/code&amp;gt; works much like &amp;lt;code&amp;gt;show&amp;lt;/code&amp;gt; in Prelude, but&lt;br /&gt;
is also able to write expressions for finding resources in ontologies and under&lt;br /&gt;
the context resource.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Commands&amp;diff=3041</id>
		<title>Commands</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Commands&amp;diff=3041"/>
		<updated>2013-09-26T10:48:12Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Java API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Requirements =&lt;br /&gt;
&lt;br /&gt;
The core idea of Simantics command system is to have all user interface&lt;br /&gt;
operations go through SCL function calls. This ensures they are all&lt;br /&gt;
available in SCL for writing scripts and regression tests.&lt;br /&gt;
The direct user need driving the development is recording of the&lt;br /&gt;
commands for later replaying.&lt;br /&gt;
&lt;br /&gt;
Because recording and scripting are the main applications,&lt;br /&gt;
the commands are defined to be operations that make modifications&lt;br /&gt;
to the persistent state of the application without any user &lt;br /&gt;
interaction. Thus for example a function that opens a wizard&lt;br /&gt;
is not a command, but the modification to a model that is&lt;br /&gt;
executed when the wizard is finished is a command. There are&lt;br /&gt;
probably cases where the difference is not so clear &lt;br /&gt;
(is changing of profiles a command?).&lt;br /&gt;
&lt;br /&gt;
For command recording, each command must have a context where&lt;br /&gt;
it is executed. Particularly when making modifications to &lt;br /&gt;
two models in the same workspace, the commands should be recorded&lt;br /&gt;
to two separate command logs. This may cause problems, when&lt;br /&gt;
the command affects the existence of the model (creating new model,&lt;br /&gt;
importing model, removing model), the command affects multiple&lt;br /&gt;
models (moving stuff between models) or the command causes a persistent&lt;br /&gt;
effect outside of models (changing preferences, importing ontologies).&lt;br /&gt;
&lt;br /&gt;
The command system should specify how commands are executed from&lt;br /&gt;
Java code, how they are referred in modelled user inteface actions&lt;br /&gt;
(such as modelled context view or selection view) and how new commands&lt;br /&gt;
are contributed.&lt;br /&gt;
&lt;br /&gt;
The main challenge of the system is the difference between two modes&lt;br /&gt;
of execution. When writing a script, the state of the application at&lt;br /&gt;
execution time is unknown and all commands should be available. Each &lt;br /&gt;
command is executed atomically and they either succeed or fail with&lt;br /&gt;
an error message that is either written to the console, if the execution&lt;br /&gt;
is initiated there, or otherwise shown in a dialog.&lt;br /&gt;
On the other hand, when executing commands from UI, the user expects that UI hides&lt;br /&gt;
or disables the actions that are not allowed in the current operating&lt;br /&gt;
context or will surely fail.&lt;br /&gt;
&lt;br /&gt;
The second challenge is the serialization of the commands for recording&lt;br /&gt;
so that commands would be valid with maximal probability when replaying&lt;br /&gt;
in possible little different application context.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The most important thing of the command is the modification it&lt;br /&gt;
makes to the model. However, for use in UI, some additional information&lt;br /&gt;
is needed such as which roles are allowed to execute the command and&lt;br /&gt;
a function to check is the command execution possible. &lt;br /&gt;
&lt;br /&gt;
The following approaches were consided for bundling this information together:&lt;br /&gt;
# Commands are SCL functions returning a value of type &amp;lt;code&amp;gt;Command a&amp;lt;/code&amp;gt; that can be checked and executed&lt;br /&gt;
# Commands are concepts in ontologies that define different properties containing SCL functions for checking and execution&lt;br /&gt;
# Commands are specified as separate SCL functions that are tied together by naming conventions&lt;br /&gt;
&lt;br /&gt;
The first approach has some drawbacks. First, it is not possible to know the allowed roles&lt;br /&gt;
without first giving all parameters to the function. Second, without adding some new syntactic&lt;br /&gt;
sugar, the &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type complicated writing of scripts. Either every command&lt;br /&gt;
has to be wrapped like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec (newDiagram ...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or written in monadic style. A benefit of &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type might be the ability to create&lt;br /&gt;
new commands by combinators. &lt;br /&gt;
&lt;br /&gt;
The second approach makes possible to define arbitrary properties for the commands, so it&lt;br /&gt;
is extensible. Its drawback is need for a read transaction for obtaining information about&lt;br /&gt;
commands. It makes it also heavier to define new commands. A command contribution might&lt;br /&gt;
involve additions in three places: Java code implementing the operation, SCL code importing&lt;br /&gt;
the Java code and ontology referring to SCL.&lt;br /&gt;
&lt;br /&gt;
The third approach has the flexibility of the ontology approach, but is lighterweight. &lt;br /&gt;
Role and checking may have some defaults (allowed for any role, no checking), which&lt;br /&gt;
makes it possible to consider any SCL function as a command. For these benefits we&lt;br /&gt;
choose this approach.&lt;br /&gt;
&lt;br /&gt;
== Defining commands ==&lt;br /&gt;
&lt;br /&gt;
Commands are defined as ordinary SCL-functions. The name of the command (and thus the defining function)&lt;br /&gt;
should be in imperative mood (createDiagram, not newDiagram). The command is executed in a write transaction,&lt;br /&gt;
thus WriteGraph and Proc effects are allowed in the signature.&lt;br /&gt;
&lt;br /&gt;
Additional SCL-functions &amp;lt;code&amp;gt;command_check&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;command_role&amp;lt;/code&amp;gt; specify the related&lt;br /&gt;
checking function and role. Although we follow camel case naming convention in SCL, in this case&lt;br /&gt;
the suffixes are separated by &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;. Role function should return the role name (string). &lt;br /&gt;
The parameters of the role function are some prefix of the parameters of the command, typically&lt;br /&gt;
role function does not have parameters at all. &lt;br /&gt;
&lt;br /&gt;
The signature of the checking function is related to the signature of the command in more complicated&lt;br /&gt;
way in order to make checking of partial parameters possible. Basically some suffix of the signature&lt;br /&gt;
is replaced by &amp;lt;code&amp;gt;Boolean&amp;lt;/code&amp;gt; and any right subtype may be enclosed in &amp;lt;code&amp;gt;Maybe&amp;lt;/code&amp;gt;. &lt;br /&gt;
The checking function may have ReadGraph event and if it has the command system ensures that it is&lt;br /&gt;
executed in the read transaction.&lt;br /&gt;
So, if the signature of the command is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;WriteGraph&amp;gt; C&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, the signature of the checking function can be for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; Boolean)&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the final Boolean value is false or any of the intermediate Maybe value is&lt;br /&gt;
Nothing, then the command may not be executed.&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setPropertyAsString :: Variable -&amp;gt; String -&amp;gt; &amp;lt;WriteGraph&amp;gt; ()&lt;br /&gt;
setPropertyAsString_check :: Variable -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (String -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
setPropertyAsString_role :: String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command takes a variable and a value in a string form as a parameter. &lt;br /&gt;
The checking function first check, if the variable is writable. The second&lt;br /&gt;
part of the checking tests that the string value is valid.&lt;br /&gt;
&lt;br /&gt;
== Java API ==&lt;br /&gt;
&lt;br /&gt;
Java API for executing commands is meant to be used from during execution of&lt;br /&gt;
UI operations. Commands are executed in contexts (usually models) that&lt;br /&gt;
must be first obtained. New command can be created with &amp;lt;code&amp;gt;newCommand&amp;lt;/code&amp;gt;&lt;br /&gt;
method in the context. Parameter &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; is a full path of the&lt;br /&gt;
SCL-function implementing the command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class CommandContext {&lt;br /&gt;
    public static CommandContext getContext(Resource resource);&lt;br /&gt;
    public static CommandContext getContext(RequestProcessor graph, Resource resource);&lt;br /&gt;
    public Command newCommand(String name);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command interface has methods for adding and removing parameters, checking&lt;br /&gt;
that command is eligible for exectution and committing the command.&lt;br /&gt;
Even if checking accepts the parameter, the command may fail in commit. &lt;br /&gt;
On failure, an exception is thrown (currently no special exception is specified).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public interface Command {&lt;br /&gt;
    Command addParameters(Object ... parameters);&lt;br /&gt;
    Command removeParameters(int count);&lt;br /&gt;
    boolean check();&lt;br /&gt;
    boolean check(RequestProcessor graph);&lt;br /&gt;
    void commit();&lt;br /&gt;
    void commit(RequestProcessor graph);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(TODO async methods?)&lt;br /&gt;
&lt;br /&gt;
The interface handles roles automatically. When the current user has no&lt;br /&gt;
privileges to execute the command, check method always fails.&lt;br /&gt;
&lt;br /&gt;
Example (fictional):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public Runnable renameContribution(Resource target) {&lt;br /&gt;
    final Command command = CommandContext.getContext(target)&lt;br /&gt;
                .newCommand(&amp;quot;Simantics/FictionalModule/rename&amp;quot;, target);&lt;br /&gt;
    if(!command.check())&lt;br /&gt;
        return null; // Cannot rename the target&lt;br /&gt;
    else &lt;br /&gt;
        return new Runnable() {&lt;br /&gt;
            public void run() {&lt;br /&gt;
                new RenameWidget(command).start();&lt;br /&gt;
            }&lt;br /&gt;
        };&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class RenameWidget {&lt;br /&gt;
    Command command;&lt;br /&gt;
    public RenameWidget(Command command) { this.command = command; }&lt;br /&gt;
	&lt;br /&gt;
    public boolean validate(String name) {&lt;br /&gt;
        boolean result = command.addParameters(name).check();&lt;br /&gt;
        command.removeParameters(1);&lt;br /&gt;
        return result;&lt;br /&gt;
    }&lt;br /&gt;
	&lt;br /&gt;
    public void finish() {&lt;br /&gt;
        try {&lt;br /&gt;
            command.addParameters(getName()).commit();&lt;br /&gt;
        } catch(Exception e) {&lt;br /&gt;
            show error to user&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Recording ==&lt;br /&gt;
&lt;br /&gt;
When a command is executed, the textual form of the command is written &lt;br /&gt;
to the metadata of the change set. The command metadata is associated with a &lt;br /&gt;
certain context (usually a model). Although the metadata is enough to reconstruct&lt;br /&gt;
the whole command history, a snapshot of the history is periodically written to&lt;br /&gt;
a separate file to save information in the case the whole database corrupts.&lt;br /&gt;
&lt;br /&gt;
The writing of command metadata happens in the commit-method of the Command interface&lt;br /&gt;
after the change is successfully made the the database and no exception is&lt;br /&gt;
thrown. Each command is written in a form readily suitable for execution in a script&lt;br /&gt;
with two exceptions: Command begins with the full name of the command function so that&lt;br /&gt;
no imports are not expected to be available. It is assumed that a resource &lt;br /&gt;
named &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; is defined.&lt;br /&gt;
&lt;br /&gt;
Command parameters are serialized with a type class:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class RepresentableParameter a where&lt;br /&gt;
     representParameter :: Resource -&amp;gt; a -&amp;gt; &amp;lt;ReadGraph&amp;gt; String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first parameter is the current context resource. All references are made relative&lt;br /&gt;
to that resource that commands can later executed in some other context. The method&lt;br /&gt;
&amp;lt;code&amp;gt;representParameter&amp;lt;/code&amp;gt; works much like &amp;lt;code&amp;gt;show&amp;lt;/code&amp;gt; in Prelude, but&lt;br /&gt;
is also able to write expressions for finding resources in ontologies and under&lt;br /&gt;
the context resource.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
	<entry>
		<id>https://dev.simantics.org/index.php?title=Commands&amp;diff=3040</id>
		<title>Commands</title>
		<link rel="alternate" type="text/html" href="https://dev.simantics.org/index.php?title=Commands&amp;diff=3040"/>
		<updated>2013-09-26T10:47:50Z</updated>

		<summary type="html">&lt;p&gt;Hannu Niemisto: /* Java API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Requirements =&lt;br /&gt;
&lt;br /&gt;
The core idea of Simantics command system is to have all user interface&lt;br /&gt;
operations go through SCL function calls. This ensures they are all&lt;br /&gt;
available in SCL for writing scripts and regression tests.&lt;br /&gt;
The direct user need driving the development is recording of the&lt;br /&gt;
commands for later replaying.&lt;br /&gt;
&lt;br /&gt;
Because recording and scripting are the main applications,&lt;br /&gt;
the commands are defined to be operations that make modifications&lt;br /&gt;
to the persistent state of the application without any user &lt;br /&gt;
interaction. Thus for example a function that opens a wizard&lt;br /&gt;
is not a command, but the modification to a model that is&lt;br /&gt;
executed when the wizard is finished is a command. There are&lt;br /&gt;
probably cases where the difference is not so clear &lt;br /&gt;
(is changing of profiles a command?).&lt;br /&gt;
&lt;br /&gt;
For command recording, each command must have a context where&lt;br /&gt;
it is executed. Particularly when making modifications to &lt;br /&gt;
two models in the same workspace, the commands should be recorded&lt;br /&gt;
to two separate command logs. This may cause problems, when&lt;br /&gt;
the command affects the existence of the model (creating new model,&lt;br /&gt;
importing model, removing model), the command affects multiple&lt;br /&gt;
models (moving stuff between models) or the command causes a persistent&lt;br /&gt;
effect outside of models (changing preferences, importing ontologies).&lt;br /&gt;
&lt;br /&gt;
The command system should specify how commands are executed from&lt;br /&gt;
Java code, how they are referred in modelled user inteface actions&lt;br /&gt;
(such as modelled context view or selection view) and how new commands&lt;br /&gt;
are contributed.&lt;br /&gt;
&lt;br /&gt;
The main challenge of the system is the difference between two modes&lt;br /&gt;
of execution. When writing a script, the state of the application at&lt;br /&gt;
execution time is unknown and all commands should be available. Each &lt;br /&gt;
command is executed atomically and they either succeed or fail with&lt;br /&gt;
an error message that is either written to the console, if the execution&lt;br /&gt;
is initiated there, or otherwise shown in a dialog.&lt;br /&gt;
On the other hand, when executing commands from UI, the user expects that UI hides&lt;br /&gt;
or disables the actions that are not allowed in the current operating&lt;br /&gt;
context or will surely fail.&lt;br /&gt;
&lt;br /&gt;
The second challenge is the serialization of the commands for recording&lt;br /&gt;
so that commands would be valid with maximal probability when replaying&lt;br /&gt;
in possible little different application context.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The most important thing of the command is the modification it&lt;br /&gt;
makes to the model. However, for use in UI, some additional information&lt;br /&gt;
is needed such as which roles are allowed to execute the command and&lt;br /&gt;
a function to check is the command execution possible. &lt;br /&gt;
&lt;br /&gt;
The following approaches were consided for bundling this information together:&lt;br /&gt;
# Commands are SCL functions returning a value of type &amp;lt;code&amp;gt;Command a&amp;lt;/code&amp;gt; that can be checked and executed&lt;br /&gt;
# Commands are concepts in ontologies that define different properties containing SCL functions for checking and execution&lt;br /&gt;
# Commands are specified as separate SCL functions that are tied together by naming conventions&lt;br /&gt;
&lt;br /&gt;
The first approach has some drawbacks. First, it is not possible to know the allowed roles&lt;br /&gt;
without first giving all parameters to the function. Second, without adding some new syntactic&lt;br /&gt;
sugar, the &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type complicated writing of scripts. Either every command&lt;br /&gt;
has to be wrapped like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec (newDiagram ...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or written in monadic style. A benefit of &amp;lt;code&amp;gt;Command&amp;lt;/code&amp;gt; -type might be the ability to create&lt;br /&gt;
new commands by combinators. &lt;br /&gt;
&lt;br /&gt;
The second approach makes possible to define arbitrary properties for the commands, so it&lt;br /&gt;
is extensible. Its drawback is need for a read transaction for obtaining information about&lt;br /&gt;
commands. It makes it also heavier to define new commands. A command contribution might&lt;br /&gt;
involve additions in three places: Java code implementing the operation, SCL code importing&lt;br /&gt;
the Java code and ontology referring to SCL.&lt;br /&gt;
&lt;br /&gt;
The third approach has the flexibility of the ontology approach, but is lighterweight. &lt;br /&gt;
Role and checking may have some defaults (allowed for any role, no checking), which&lt;br /&gt;
makes it possible to consider any SCL function as a command. For these benefits we&lt;br /&gt;
choose this approach.&lt;br /&gt;
&lt;br /&gt;
== Defining commands ==&lt;br /&gt;
&lt;br /&gt;
Commands are defined as ordinary SCL-functions. The name of the command (and thus the defining function)&lt;br /&gt;
should be in imperative mood (createDiagram, not newDiagram). The command is executed in a write transaction,&lt;br /&gt;
thus WriteGraph and Proc effects are allowed in the signature.&lt;br /&gt;
&lt;br /&gt;
Additional SCL-functions &amp;lt;code&amp;gt;command_check&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;command_role&amp;lt;/code&amp;gt; specify the related&lt;br /&gt;
checking function and role. Although we follow camel case naming convention in SCL, in this case&lt;br /&gt;
the suffixes are separated by &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;. Role function should return the role name (string). &lt;br /&gt;
The parameters of the role function are some prefix of the parameters of the command, typically&lt;br /&gt;
role function does not have parameters at all. &lt;br /&gt;
&lt;br /&gt;
The signature of the checking function is related to the signature of the command in more complicated&lt;br /&gt;
way in order to make checking of partial parameters possible. Basically some suffix of the signature&lt;br /&gt;
is replaced by &amp;lt;code&amp;gt;Boolean&amp;lt;/code&amp;gt; and any right subtype may be enclosed in &amp;lt;code&amp;gt;Maybe&amp;lt;/code&amp;gt;. &lt;br /&gt;
The checking function may have ReadGraph event and if it has the command system ensures that it is&lt;br /&gt;
executed in the read transaction.&lt;br /&gt;
So, if the signature of the command is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;WriteGraph&amp;gt; C&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then, the signature of the checking function can be for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; Boolean)&lt;br /&gt;
A -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (B -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the final Boolean value is false or any of the intermediate Maybe value is&lt;br /&gt;
Nothing, then the command may not be executed.&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setPropertyAsString :: Variable -&amp;gt; String -&amp;gt; &amp;lt;WriteGraph&amp;gt; ()&lt;br /&gt;
setPropertyAsString_check :: Variable -&amp;gt; &amp;lt;ReadGraph&amp;gt; Maybe (String -&amp;gt; &amp;lt;ReadGraph&amp;gt; Boolean)&lt;br /&gt;
setPropertyAsString_role :: String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command takes a variable and a value in a string form as a parameter. &lt;br /&gt;
The checking function first check, if the variable is writable. The second&lt;br /&gt;
part of the checking tests that the string value is valid.&lt;br /&gt;
&lt;br /&gt;
== Java API ==&lt;br /&gt;
&lt;br /&gt;
Java API for executing commands is meant to be used from during execution of&lt;br /&gt;
UI operations. Commands are executed in contexts (usually models) that&lt;br /&gt;
must be first obtained. New command can be created with &amp;lt;code&amp;gt;newCommand&amp;lt;/code&amp;gt;&lt;br /&gt;
method in the context. Parameter &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; is a full path of the&lt;br /&gt;
SCL-function implementing the command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class CommandContext {&lt;br /&gt;
    public static CommandContext getContext(Resource resource);&lt;br /&gt;
	public static CommandContext getContext(RequestProcessor graph, Resource resource);&lt;br /&gt;
    public Command newCommand(String name);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command interface has methods for adding and removing parameters, checking&lt;br /&gt;
that command is eligible for exectution and committing the command.&lt;br /&gt;
Even if checking accepts the parameter, the command may fail in commit. &lt;br /&gt;
On failure, an exception is thrown (currently no special exception is specified).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public interface Command {&lt;br /&gt;
    Command addParameters(Object ... parameters);&lt;br /&gt;
	Command removeParameters(int count);&lt;br /&gt;
    boolean check();&lt;br /&gt;
    boolean check(RequestProcessor graph);&lt;br /&gt;
    void commit();&lt;br /&gt;
    void commit(RequestProcessor graph);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(TODO async methods?)&lt;br /&gt;
&lt;br /&gt;
The interface handles roles automatically. When the current user has no&lt;br /&gt;
privileges to execute the command, check method always fails.&lt;br /&gt;
&lt;br /&gt;
Example (fictional):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public Runnable renameContribution(Resource target) {&lt;br /&gt;
    final Command command = CommandContext.getContext(target)&lt;br /&gt;
                .newCommand(&amp;quot;Simantics/FictionalModule/rename&amp;quot;, target);&lt;br /&gt;
    if(!command.check())&lt;br /&gt;
        return null; // Cannot rename the target&lt;br /&gt;
    else &lt;br /&gt;
        return new Runnable() {&lt;br /&gt;
            public void run() {&lt;br /&gt;
                new RenameWidget(command).start();&lt;br /&gt;
            }&lt;br /&gt;
        };&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class RenameWidget {&lt;br /&gt;
    Command command;&lt;br /&gt;
    public RenameWidget(Command command) { this.command = command; }&lt;br /&gt;
	&lt;br /&gt;
    public boolean validate(String name) {&lt;br /&gt;
        boolean result = command.addParameters(name).check();&lt;br /&gt;
        command.removeParameters(1);&lt;br /&gt;
        return result;&lt;br /&gt;
    }&lt;br /&gt;
	&lt;br /&gt;
    public void finish() {&lt;br /&gt;
        try {&lt;br /&gt;
            command.addParameters(getName()).commit();&lt;br /&gt;
        } catch(Exception e) {&lt;br /&gt;
            show error to user&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Recording ==&lt;br /&gt;
&lt;br /&gt;
When a command is executed, the textual form of the command is written &lt;br /&gt;
to the metadata of the change set. The command metadata is associated with a &lt;br /&gt;
certain context (usually a model). Although the metadata is enough to reconstruct&lt;br /&gt;
the whole command history, a snapshot of the history is periodically written to&lt;br /&gt;
a separate file to save information in the case the whole database corrupts.&lt;br /&gt;
&lt;br /&gt;
The writing of command metadata happens in the commit-method of the Command interface&lt;br /&gt;
after the change is successfully made the the database and no exception is&lt;br /&gt;
thrown. Each command is written in a form readily suitable for execution in a script&lt;br /&gt;
with two exceptions: Command begins with the full name of the command function so that&lt;br /&gt;
no imports are not expected to be available. It is assumed that a resource &lt;br /&gt;
named &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; is defined.&lt;br /&gt;
&lt;br /&gt;
Command parameters are serialized with a type class:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class RepresentableParameter a where&lt;br /&gt;
     representParameter :: Resource -&amp;gt; a -&amp;gt; &amp;lt;ReadGraph&amp;gt; String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first parameter is the current context resource. All references are made relative&lt;br /&gt;
to that resource that commands can later executed in some other context. The method&lt;br /&gt;
&amp;lt;code&amp;gt;representParameter&amp;lt;/code&amp;gt; works much like &amp;lt;code&amp;gt;show&amp;lt;/code&amp;gt; in Prelude, but&lt;br /&gt;
is also able to write expressions for finding resources in ontologies and under&lt;br /&gt;
the context resource.&lt;/div&gt;</summary>
		<author><name>Hannu Niemisto</name></author>
	</entry>
</feed>