parallel ip - initial checkin
Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/.artifactVersions b/.artifactVersions
new file mode 100644
index 0000000..9a17bde
--- /dev/null
+++ b/.artifactVersions
@@ -0,0 +1,4 @@
+version=0.9.1-SNAPSHOT
+relengVersion=0.12.5-SNAPSHOT
+relengP2Version=0.12.5-SNAPSHOT
+relengGroupId=org.lunifera.releng.maven
\ No newline at end of file
diff --git a/.depVersions b/.depVersions
new file mode 100644
index 0000000..549470f
--- /dev/null
+++ b/.depVersions
@@ -0,0 +1,9 @@
+org.eclipse.xtend;min=2.7.3;max=2.8.0
+org.eclipse.xtext;min=2.7.3;max=2.8.0
+org.semanticsoft;min=2.7.3;max=3.0.0
+org.lunifera.dsl;min=0.9.0;max=0.10.0
+org.lunifera;min=0.9.0;max=0.10.0
+com.google.guava;min=10.0.0;max=19.0.0
+com.vaadin.external.atmosphere.runtime;min=2.1.2;max=2.1.3
+com.vaadin.external.org.slf4j;min=1.6.1;max=1.6.2
+com.vaadin;min=7.3.8;max=7.3.9
diff --git a/.osbp.releng.root b/.osbp.releng.root
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.osbp.releng.root
diff --git a/.project b/.project
new file mode 100644
index 0000000..6175418
--- /dev/null
+++ b/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/README.md
diff --git a/about.html b/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/jenkins.build.config.xml b/jenkins.build.config.xml
new file mode 100644
index 0000000..32d535d
--- /dev/null
+++ b/jenkins.build.config.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2016 - Loetz GmbH&Co.KG -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation -->
+<!--#======================================================================= -->
+<!--# Module specific parameters for the Jenkins Job -->
+<!--#======================================================================= -->
+
+<jenkins>
+ <!-- DO NOT EDIT BELOW THIS LINE -->
+ <jenkins.build.dependencies>
+ <jenkins.build.dependency>org.eclipse.osbp.dsl</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.ecview.core</jenkins.build.dependency>
+ </jenkins.build.dependencies>
+</jenkins>
diff --git a/notice.html b/notice.html
new file mode 100644
index 0000000..c3d34c3
--- /dev/null
+++ b/notice.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.ide.core.api/.project b/org.eclipse.osbp.ide.core.api/.project
new file mode 100644
index 0000000..42bd436
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/.project
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.core.api</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.babel.editor.rbeNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.core.api/LICENSE.txt b/org.eclipse.osbp.ide.core.api/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.api/META-INF/MANIFEST.MF b/org.eclipse.osbp.ide.core.api/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..286c43b
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.ide.core.api
+Bundle-SymbolicName: org.eclipse.osbp.ide.core.api
+Bundle-Version: 0.9.0.qualifier
+Bundle-Vendor: Eclipse OSBP
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Import-Package: org.osgi.framework;version="1.3.0",
+ org.slf4j;version="1.7.2"
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.core.resources;bundle-version="3.9.0",
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ com.google.inject;bundle-version="3.0.0"
+Export-Package: org.eclipse.osbp.ide.core.api.i18n;
+ uses:="org.eclipse.core.runtime,
+ org.eclipse.core.resources";version="0.9.0"
diff --git a/org.eclipse.osbp.ide.core.api/about.html b/org.eclipse.osbp.ide.core.api/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.api/about.ini b/org.eclipse.osbp.ide.core.api/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/about.ini
@@ -0,0 +1,17 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+welcomePage=
diff --git a/org.eclipse.osbp.ide.core.api/about.mappings b/org.eclipse.osbp.ide.core.api/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=qualifier
diff --git a/org.eclipse.osbp.ide.core.api/about.properties b/org.eclipse.osbp.ide.core.api/about.properties
new file mode 100644
index 0000000..a0ba79c
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/about.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=org.eclipse.osbp.ide.core.api
+
+################ blurb property ####################################
+featureText=\
+Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Loetz GmbH&Co.KG - implementation\n
+################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.ide.core.api/build.properties b/org.eclipse.osbp.ide.core.api/build.properties
new file mode 100644
index 0000000..e184d66
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = target/classes/
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ LICENSE.txt,\
+ license.html
+src.includes = about.properties, about.mappings, about.ini, about.html, LICENSE.txt,\
+ license.html
diff --git a/org.eclipse.osbp.ide.core.api/license.html b/org.eclipse.osbp.ide.core.api/license.html
new file mode 100644
index 0000000..c33d45c
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/license.html
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.api/pom.xml b/org.eclipse.osbp.ide.core.api/pom.xml
new file mode 100644
index 0000000..aaa2227
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.ide.core.api</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>xtend-gen</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>xtend-gen</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.xtend</groupId>
+ <artifactId>xtend-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.osbp.ide.core.api/src/org/eclipse/osbp/ide/core/api/i18n/CoreUtil.java b/org.eclipse.osbp.ide.core.api/src/org/eclipse/osbp/ide/core/api/i18n/CoreUtil.java
new file mode 100644
index 0000000..7566d41
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/src/org/eclipse/osbp/ide/core/api/i18n/CoreUtil.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.api.i18n;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CoreUtil.
+ */
+public class CoreUtil {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(CoreUtil.class);
+
+ /** The nature id. */
+ public static String NATURE_ID = "org.eclipse.osbp.ide.core.ui.shared.OSBPNature";
+
+ /** The Constant BUILDER_MODEL_ENHANCING_ID. */
+ public static final String BUILDER_MODEL_ENHANCING_ID = "org.eclipse.osbp.ide.core.ui.shared.OSBPModelEnhancingBuilder";
+
+ /** The Constant BUILDER_I18N_ID. */
+ public static final String BUILDER_I18N_ID = "org.eclipse.osbp.ide.core.ui.shared.OSBPI18nBuilder";
+
+ /** The Constant EVENT_TOPIC__BUILDER. */
+ public static final String EVENT_TOPIC__BUILDER = "org/eclipse/osbp/ide/core/ui/builder";
+
+ /**
+ * Returns true, if the given project contains the OSBP Nature.
+ *
+ * @param project
+ * the project
+ * @return true, if successful
+ */
+ public static boolean hasNature(IProject project) {
+ try {
+ if (project.isAccessible()) {
+ return project.hasNature(NATURE_ID);
+ }
+ } catch (CoreException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core.api/src/org/eclipse/osbp/ide/core/api/i18n/II18nRegistry.java b/org.eclipse.osbp.ide.core.api/src/org/eclipse/osbp/ide/core/api/i18n/II18nRegistry.java
new file mode 100644
index 0000000..03badc5
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.api/src/org/eclipse/osbp/ide/core/api/i18n/II18nRegistry.java
@@ -0,0 +1,499 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.api.i18n;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Caches the I18n keys and their values based in {@link IProject workspace
+ * proejcts}.
+ */
+public interface II18nRegistry {
+
+ /**
+ * Returns the translated value for the given project, locale and key.
+ *
+ * @param project
+ * the project
+ * @param locale
+ * the locale
+ * @param key
+ * the key
+ * @return the text
+ */
+ String getText(IProject project, Locale locale, String key);
+
+ /**
+ * Returns a list of proposals. If the searchValue matches parts of the
+ * value or the key for an i18n record, it is added to the list of
+ * proposals. Must never return <code>null</code>.
+ *
+ * @param project
+ * - The project which should be searched for matching I18n
+ * values.
+ * @param locale
+ * - The locale which should be used to search for matching I18n
+ * values.
+ * @param packageName
+ * - The package name. It can be used to search for I18n values,
+ * if the searchValue starts with ".". For instance
+ * ".SalesOrder". Then the matcher only looks for I18n Values
+ * with a key starting with the given package name.<br>
+ * Wildcards are allowed. For instance ".*Order". The matcher
+ * tries to find any possible combination. A "*" wildcard at the
+ * end of the searchValue will be added automatically by the
+ * matcher.
+ * @param searchValue
+ * the search value
+ * @return proposal - a List never <code>null</code>
+ */
+ List<Proposal> findContentProposals(IProject project, Locale locale,
+ String packageName, String searchValue);
+
+ /**
+ * Returns a list of proposals. The searchValue must match the entire key
+ * for an i18n record.
+ *
+ * @param project
+ * - The project which should be searched for matching I18n
+ * values.
+ * @param locale
+ * - The locale which should be used to search for matching I18n
+ * values.
+ * @param packageName
+ * - The package name. It can be used to search for I18n values,
+ * if the searchValue starts with ".". For instance
+ * ".SalesOrder". Then the matcher only looks for I18n Values
+ * with a key starting with the given package name.<br>
+ * Wildcards are allowed. For instance ".*Order". The matcher
+ * tries to find any possible combination. A "*" wildcard at the
+ * end of the searchValue will be added automatically by the
+ * matcher.
+ * @param key
+ * - The key to look for.
+ * @return proposal - a List never <code>null</code>
+ */
+ List<Proposal> findStrictKeyMatchingProposals(IProject project,
+ Locale locale, String packageName, String key);
+
+ /**
+ * Returns the best matching proposal.
+ *
+ * @param project
+ * - The project which should be searched for matching I18n
+ * values.
+ * @param locale
+ * - The locale which should be used to search for matching I18n
+ * values.
+ * @param packageName
+ * - The package name. It can be used to search for I18n values,
+ * if the searchValue starts with ".". For instance
+ * ".SalesOrder". Then the matcher only looks for I18n Values
+ * with a key starting with the given package name.<br>
+ * Wildcards are allowed. For instance ".*Order". The matcher
+ * tries to find any possible combination. A "*" wildcard at the
+ * end of the searchValue will be added automatically by the
+ * matcher.
+ * @param key
+ * - The key to look for.
+ * @return proposal - a List never <code>null</code>
+ */
+ Proposal findBestMatch(IProject project, Locale locale, String packageName,
+ String key);
+
+ /**
+ * Caches the ProjectDescription.
+ *
+ * @param description
+ * the description
+ */
+ void cache(ProjectDescription description);
+
+ /**
+ * Caches the ResourceDescription.
+ *
+ * @param description
+ * the description
+ */
+ void cache(ResourceDescription description);
+
+ /**
+ * Removes the given resource from the project description.
+ *
+ * @param project
+ * the project
+ * @param locale
+ * the locale
+ * @param location
+ * the location
+ */
+ void removeResource(IProject project, Locale locale, IPath location);
+
+ /**
+ * Removes the project from the cache.
+ *
+ * @param project
+ * the project
+ */
+ void removeProject(IProject project);
+
+ /**
+ * Returns all project descriptions.
+ *
+ * @return the project descriptions
+ */
+ Set<ProjectDescription> getProjectDescriptions();
+
+ /**
+ * Contains all required information about a project. It contains all
+ * resources.
+ */
+ public static class ProjectDescription {
+
+ /** The resources. */
+ private final Map<Locale, Set<ResourceDescription>> resources = Collections
+ .synchronizedMap(new HashMap<Locale, Set<ResourceDescription>>());
+
+ /** The project. */
+ private final IProject project;
+
+ /**
+ * Instantiates a new project description.
+ *
+ * @param project
+ * the project
+ */
+ public ProjectDescription(IProject project) {
+ this.project = project;
+ }
+
+ /**
+ * Gets the project.
+ *
+ * @return the project
+ */
+ public IProject getProject() {
+ return project;
+ }
+
+ /**
+ * Returns all resource descriptions contained in the project for the
+ * given locale.
+ *
+ * @param locale
+ * the locale
+ * @return the resource descriptions
+ */
+ public List<ResourceDescription> getResourceDescriptions(Locale locale) {
+ List<ResourceDescription> result = new ArrayList<ResourceDescription>();
+ collectByLocale(locale, result);
+ return result;
+ }
+
+ /**
+ * Collect by locale.
+ *
+ * @param locale
+ * the locale
+ * @param result
+ * the result
+ * @return the resource description
+ */
+ private ResourceDescription collectByLocale(Locale locale,
+ List<ResourceDescription> result) {
+ Set<ResourceDescription> descs = resources.get(locale);
+ if (descs != null) {
+ result.addAll(descs);
+ }
+ return null;
+ }
+
+ /**
+ * Puts the list of resources into the resources map.
+ *
+ * @param key
+ * the key
+ * @param value
+ * the value
+ */
+ public void putResources(Locale key, Set<ResourceDescription> value) {
+ resources.put(key, value);
+ }
+
+ /**
+ * Puts a single resource into the resources map.
+ *
+ * @param value
+ * the value
+ */
+ public void putResource(ResourceDescription value) {
+
+ Set<ResourceDescription> descriptions = resources.get(value
+ .getLocale());
+ if (descriptions == null) {
+ descriptions = new HashSet<II18nRegistry.ResourceDescription>();
+ descriptions.add(value);
+ resources.put(value.getLocale(), descriptions);
+ } else {
+ // if the hash key of given value is contained in set, then
+ // remove it
+ descriptions.remove(value);
+ // and add it again
+ descriptions.add(value);
+ }
+ }
+
+ /**
+ * Removes the given resource from the internal list of resources.
+ *
+ * @param value
+ * the value
+ */
+ public void removeResource(ResourceDescription value) {
+ synchronized (resources) {
+ Locale locale = value.getLocale();
+ IPath path = value.getPath();
+
+ removeResource(locale, path);
+ }
+ }
+
+ /**
+ * Removes the resource for the given path.
+ *
+ * @param locale
+ * the locale
+ * @param location
+ * the location
+ */
+ public void removeResource(Locale locale, IPath location) {
+ Set<ResourceDescription> descriptions = resources.get(locale);
+ for (Iterator<ResourceDescription> iterator = descriptions
+ .iterator(); iterator.hasNext();) {
+ ResourceDescription resourceDescription = iterator.next();
+ if (resourceDescription.getPath().equals(location)) {
+ iterator.remove();
+ break;
+ }
+ }
+ }
+
+ /**
+ * Returns all resource descriptions.
+ *
+ * @return the resource descriptions
+ */
+ public Set<ResourceDescription> getResourceDescriptions() {
+ Set<II18nRegistry.ResourceDescription> result = new HashSet<II18nRegistry.ResourceDescription>();
+ for (Set<ResourceDescription> set : resources.values()) {
+ for (ResourceDescription desc : set) {
+ result.add(desc);
+ }
+ }
+ return result;
+ }
+ }
+
+ /**
+ * A resource is a file containing all translations for a file.
+ */
+ public static class ResourceDescription {
+
+ /** The project. */
+ private final IProject project;
+
+ /** The locale. */
+ private final Locale locale;
+
+ /** The path. */
+ private final IPath path;
+
+ /** The properties. */
+ private final Properties properties;
+
+ /**
+ * Instantiates a new resource description.
+ *
+ * @param project
+ * the project
+ * @param locale
+ * the locale
+ * @param path
+ * the path
+ * @param properties
+ * the properties
+ */
+ public ResourceDescription(IProject project, Locale locale, IPath path,
+ Properties properties) {
+ this.project = project;
+ this.locale = locale;
+ this.path = path;
+ this.properties = properties;
+ }
+
+ /**
+ * Gets the project.
+ *
+ * @return the project
+ */
+ public IProject getProject() {
+ return project;
+ }
+
+ /**
+ * Gets the locale.
+ *
+ * @return the locale
+ */
+ public Locale getLocale() {
+ return locale;
+ }
+
+ /**
+ * Gets the path.
+ *
+ * @return the path
+ */
+ public IPath getPath() {
+ return path;
+ }
+
+ /**
+ * Gets the properties.
+ *
+ * @return the properties
+ */
+ public Properties getProperties() {
+ return properties;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((path == null) ? 0 : path.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ResourceDescription other = (ResourceDescription) obj;
+ if (path == null) {
+ if (other.path != null)
+ return false;
+ } else if (!path.equals(other.path))
+ return false;
+ return true;
+ }
+ }
+
+ /**
+ * The Class Proposal.
+ */
+ public static class Proposal {
+
+ /** The i18n key. */
+ private final String i18nKey;
+
+ /** The i18n value. */
+ private final String i18nValue;
+
+ /** The resource description. */
+ private final ResourceDescription resourceDescription;
+
+ /** The priority. */
+ @SuppressWarnings("unused")
+ private final int priority;
+
+ /**
+ * Instantiates a new proposal.
+ *
+ * @param i18nKey
+ * the i18n key
+ * @param i18nValue
+ * the i18n value
+ * @param resourceDescription
+ * the resource description
+ * @param priority
+ * the priority
+ */
+ public Proposal(String i18nKey, String i18nValue,
+ ResourceDescription resourceDescription, int priority) {
+ super();
+ this.i18nKey = i18nKey;
+ this.i18nValue = i18nValue;
+ this.resourceDescription = resourceDescription;
+ this.priority = priority;
+ }
+
+ /**
+ * Returns the i18nKey.
+ *
+ * @return the i18n key
+ */
+ public String getI18nKey() {
+ return i18nKey;
+ }
+
+ /**
+ * Returns the i18nValue.
+ *
+ * @return the i18n value
+ */
+ public String getI18nValue() {
+ return i18nValue;
+ }
+
+ /**
+ * Returns the locale where key and value had been found.
+ *
+ * @return the locale
+ */
+ public Locale getLocale() {
+ return resourceDescription.getLocale();
+ }
+
+ /**
+ * Returns the resource description, where the i18n entry was contained.
+ *
+ * @return the resource description
+ */
+ public ResourceDescription getResourceDescription() {
+ return resourceDescription;
+ }
+
+ }
+}
diff --git a/org.eclipse.osbp.ide.core.ui.shared/.project b/org.eclipse.osbp.ide.core.ui.shared/.project
new file mode 100644
index 0000000..98be4c1
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/.project
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.core.ui.shared</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.babel.editor.rbeNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.core.ui.shared/LICENSE.txt b/org.eclipse.osbp.ide.core.ui.shared/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.ui.shared/META-INF/MANIFEST.MF b/org.eclipse.osbp.ide.core.ui.shared/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..70375b5
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.ide.core.ui.shared
+Bundle-SymbolicName: org.eclipse.osbp.ide.core.ui.shared;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.osbp.ide.core.ui.shared.internal.Activator
+Bundle-Vendor: Eclipse OSBP
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Import-Package: org.osgi.framework;version="1.3.0",
+ org.osgi.service.event;version="1.3.0",
+ org.slf4j;version="1.7.2"
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.core.resources;bundle-version="3.9.0",
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.eclipse.xtext.builder;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.ui.workbench,
+ org.eclipse.ui;bundle-version="3.106.0",
+ org.eclipse.osbp.ide.core;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.xtext.ui;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.xtext.ui.shared;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.osbp.ide.core.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.ide.core.ui;bundle-version="[0.9.0,0.10.0)"
+Export-Package: org.eclipse.osbp.ide.core.ui.shared;version="0.9.0",
+ org.eclipse.osbp.ide.core.ui.shared.internal;x-internal:=true;version="0.9.0"
diff --git a/org.eclipse.osbp.ide.core.ui.shared/about.html b/org.eclipse.osbp.ide.core.ui.shared/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.ui.shared/about.ini b/org.eclipse.osbp.ide.core.ui.shared/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/about.ini
@@ -0,0 +1,17 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+welcomePage=
diff --git a/org.eclipse.osbp.ide.core.ui.shared/about.mappings b/org.eclipse.osbp.ide.core.ui.shared/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=qualifier
diff --git a/org.eclipse.osbp.ide.core.ui.shared/about.properties b/org.eclipse.osbp.ide.core.ui.shared/about.properties
new file mode 100644
index 0000000..3030a14
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/about.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=org.eclipse.osbp.ide.core.ui.shared
+
+################ blurb property ####################################
+featureText=\
+Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Loetz GmbH&Co.KG - implementation\n
+################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.ide.core.ui.shared/build.properties b/org.eclipse.osbp.ide.core.ui.shared/build.properties
new file mode 100644
index 0000000..0a57295
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = target/classes/
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ .project,\
+ LICENSE.txt,\
+ license.html
+src.includes = about.properties, about.mappings, about.ini, about.html, license.html,\
+ LICENSE.txt
diff --git a/org.eclipse.osbp.ide.core.ui.shared/icons/Project.gif b/org.eclipse.osbp.ide.core.ui.shared/icons/Project.gif
new file mode 100644
index 0000000..dcc524e
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/icons/Project.gif
Binary files differ
diff --git a/org.eclipse.osbp.ide.core.ui.shared/icons/Property.gif b/org.eclipse.osbp.ide.core.ui.shared/icons/Property.gif
new file mode 100644
index 0000000..d2f257c
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/icons/Property.gif
Binary files differ
diff --git a/org.eclipse.osbp.ide.core.ui.shared/icons/Resource.gif b/org.eclipse.osbp.ide.core.ui.shared/icons/Resource.gif
new file mode 100644
index 0000000..c27fba4
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/icons/Resource.gif
Binary files differ
diff --git a/org.eclipse.osbp.ide.core.ui.shared/icons/newOSBPProject.png b/org.eclipse.osbp.ide.core.ui.shared/icons/newOSBPProject.png
new file mode 100644
index 0000000..4b26dbb
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/icons/newOSBPProject.png
Binary files differ
diff --git a/org.eclipse.osbp.ide.core.ui.shared/license.html b/org.eclipse.osbp.ide.core.ui.shared/license.html
new file mode 100644
index 0000000..c33d45c
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/license.html
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.ui.shared/plugin.xml b/org.eclipse.osbp.ide.core.ui.shared/plugin.xml
new file mode 100644
index 0000000..698919d
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/plugin.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+ <extension
+ id="OSBPNature"
+ point="org.eclipse.core.resources.natures">
+ <runtime>
+ <run
+ class="org.eclipse.osbp.ide.core.ui.nature.OSBPNature">
+ </run>
+ </runtime>
+ <builder
+ id="org.eclipse.osbp.ide.core.ui.shared.OSBPModelEnhancingBuilder">
+ </builder>
+ <builder
+ id="org.eclipse.osbp.ide.core.ui.shared.OSBPI18nBuilder">
+ </builder>
+ </extension>
+ <extension
+ id="OSBPModelEnhancingBuilder"
+ name="OSBP Model Enhancing Builder"
+ point="org.eclipse.core.resources.builders">
+ <builder
+ hasNature="true">
+ <run
+ class="org.eclipse.osbp.ide.core.ui.shared.internal.ExecutableExtensionFactory">
+ <parameter name="guicekey" value="org.eclipse.osbp.ide.core.ui.builder.OSBPModelEnhancingBuilder"/>
+ </run>
+ </builder>
+ </extension>
+ <extension
+ id="OSBPI18nBuilder"
+ name="OSBP I18n Builder"
+ point="org.eclipse.core.resources.builders">
+ <builder
+ hasNature="true">
+ <run
+ class="org.eclipse.osbp.ide.core.ui.shared.internal.ExecutableExtensionFactory">
+ <parameter name="guicekey" value="org.eclipse.osbp.ide.core.ui.builder.OSBPI18nBuilder"/>
+ </run>
+ </builder>
+ </extension>
+ <extension
+ id="XtextIndexView"
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.osbp.eclipse.ui.views.category.Resources"
+ class="org.eclipse.osbp.ide.core.ui.shared.internal.ExecutableExtensionFactory:org.eclipse.osbp.ide.core.ui.view.XtextIndexView"
+ icon="icons/osbp_xtextIndex.png"
+ id="org.eclipse.osbp.ide.core.ui.view.xtextindex"
+ name="Xtext-Index View"
+ restorable="true">
+ </view>
+ </extension>
+ <extension
+ id="I18nRegistryView"
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.osbp.eclipse.ui.views.category.Resources"
+ class="org.eclipse.osbp.ide.core.ui.shared.internal.ExecutableExtensionFactory:org.eclipse.osbp.ide.core.ui.i18n.I18nRegistryView"
+ icon="icons/osbp.png"
+ id="org.eclipse.osbp.ide.core.ui.i18nview"
+ name="I18nRegistry View"
+ restorable="true">
+ </view>
+ </extension>
+ <extension
+ id="ECViewBindingView"
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.osbp.eclipse.ui.views.category.Resources"
+ class="org.eclipse.osbp.ide.core.ui.shared.internal.ExecutableExtensionFactory:org.eclipse.osbp.ide.core.ui.view.ECViewModelBindingView"
+ icon="icons/osbp.png"
+ id="org.eclipse.osbp.ide.core.ui.ecviewbindingview"
+ name="ECView Binding View"
+ restorable="true">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.xtext.ui.shared.sharedStateContributingModule">
+ <module
+ class="org.eclipse.osbp.ide.core.ui.shared.internal.SharedStateContribution">
+ </module>
+ </extension>
+</plugin>
diff --git a/org.eclipse.osbp.ide.core.ui.shared/pom.xml b/org.eclipse.osbp.ide.core.ui.shared/pom.xml
new file mode 100644
index 0000000..528e8df
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.ide.core.ui.shared</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/Access.java b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/Access.java
new file mode 100644
index 0000000..5633597
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/Access.java
@@ -0,0 +1,22 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.shared;
+
+import org.eclipse.osbp.ide.core.api.i18n.II18nRegistry;
+
+import com.google.inject.Provider;
+
+public class Access extends org.eclipse.xtext.ui.shared.Access {
+
+ public static Provider<II18nRegistry> getII18nRegistry() {
+ return Access.<II18nRegistry> contributedProvider(II18nRegistry.class);
+ }
+}
diff --git a/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/OSBPSharedStateModule.java b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/OSBPSharedStateModule.java
new file mode 100644
index 0000000..b47e919
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/OSBPSharedStateModule.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.shared;
+
+import org.eclipse.xtext.builder.builderState.IBuilderState;
+import org.eclipse.xtext.resource.SynchronizedXtextResourceSet;
+import org.eclipse.xtext.resource.XtextResourceSet;
+import org.eclipse.xtext.service.AbstractGenericModule;
+import org.eclipse.osbp.ide.core.api.i18n.II18nRegistry;
+
+import com.google.inject.Binder;
+import com.google.inject.Provider;
+
+/**
+ * Shared state module defines the bindings for the injector of this bundle.
+ */
+public class OSBPSharedStateModule extends AbstractGenericModule {
+
+ public Provider<II18nRegistry> provideII18nRegistry() {
+ return Access.getII18nRegistry();
+ }
+
+ @SuppressWarnings("restriction")
+ public Provider<IBuilderState> provideIBuilderState() {
+ return Access.getIBuilderState();
+ }
+
+ public void configure(Binder binder) {
+ super.configure(binder);
+
+ binder.bind(XtextResourceSet.class).to(
+ SynchronizedXtextResourceSet.class);
+ }
+}
diff --git a/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/Activator.java b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/Activator.java
new file mode 100644
index 0000000..8268d0f
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/Activator.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.shared.internal;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
+import org.eclipse.osbp.ide.core.ui.shared.OSBPSharedStateModule;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.util.Modules;
+
+public class Activator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.osbp.ide.core.ui.shared"; //$NON-NLS-1$
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(Activator.class);
+ private static Activator plugin;
+
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ private Injector injector;
+
+ public Injector getInjector() {
+ if (injector == null) {
+ injector = Guice.createInjector(Modules.override(
+ new SharedStateModule()).with(
+ new OSBPSharedStateModule()));
+ }
+ return injector;
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ try {
+ super.start(context);
+ plugin = this;
+
+ } catch (Exception e) {
+ LOGGER.error(
+ "Error initializing " + PLUGIN_ID + ":" + e.getMessage(), e);
+ }
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ injector = null;
+ super.stop(context);
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/ExecutableExtensionFactory.java b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/ExecutableExtensionFactory.java
new file mode 100644
index 0000000..afc6c77
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/ExecutableExtensionFactory.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.shared.internal;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
+import org.osgi.framework.Bundle;
+
+import com.google.inject.Injector;
+
+public class ExecutableExtensionFactory extends
+ AbstractGuiceAwareExecutableExtensionFactory {
+
+ @Override
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+
+ @Override
+ protected Injector getInjector() {
+ return Activator.getDefault().getInjector();
+ }
+
+ public Object create() throws CoreException {
+ return super.create();
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/SharedStateContribution.java b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/SharedStateContribution.java
new file mode 100644
index 0000000..f981b4a
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui.shared/src/org/eclipse/osbp/ide/core/ui/shared/internal/SharedStateContribution.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.shared.internal;
+
+import org.eclipse.osbp.ide.core.api.i18n.II18nRegistry;
+import org.eclipse.osbp.ide.core.i18n.I18nRegistry;
+import org.eclipse.osbp.ide.core.ui.shared.Access;
+
+import com.google.inject.Binder;
+import com.google.inject.Module;
+
+/**
+ * Contributes bindings to the Xtext framework. This module is registered by
+ * plugin.xml. Xtext will use the bindings to create a child injector. <br>
+ * <br>
+ * Modules that want to use the singleton {@link II18nRegistry} needs to add
+ * {@link Access#getII18nRegistry()} in their module description. It will create
+ * a provider, that delegates to the extension cache. Then the
+ * {@link II18nRegistry} will automatically become injected.<br>
+ * <br>
+ * If II18nRegistry is requested, the injector will take a look into the
+ * extension registry. See
+ * {@link org.eclipse.xtext.ui.shared.Access#contributedProvider(Class)}. So
+ * only one instance is available at a time.
+ */
+public class SharedStateContribution implements Module {
+
+ public void configure(Binder binder) {
+ binder.bind(II18nRegistry.class).to(I18nRegistry.class);
+ }
+}
diff --git a/org.eclipse.osbp.ide.core.ui/.project b/org.eclipse.osbp.ide.core.ui/.project
new file mode 100644
index 0000000..8165b7a
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/.project
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.core.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.babel.editor.rbeNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.core.ui/LICENSE.txt b/org.eclipse.osbp.ide.core.ui/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.ui/META-INF/MANIFEST.MF b/org.eclipse.osbp.ide.core.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..acb945c
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,46 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.ide.core.ui
+Bundle-SymbolicName: org.eclipse.osbp.ide.core.ui;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.osbp.ide.core.ui.CoreUiActivator
+Bundle-Vendor: Eclipse OSBP
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: org.osgi.framework;version="1.3.0",
+ org.osgi.service.event;version="1.3.0",
+ org.slf4j;version="1.7.2"
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.core.resources;bundle-version="3.9.0",
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.eclipse.xtext.builder;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.ui.workbench,
+ org.eclipse.ui;bundle-version="3.106.0",
+ org.eclipse.osbp.ide.core;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.xtext.ui;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.xtext.ui.shared;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.osbp.ide.core.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.xtext.common.types.ui;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.jdt.core,
+ org.eclipse.osbp.xtext.builder.ui.access;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.ui.ide;bundle-version="3.10.0",
+ org.eclipse.jdt.ui,
+ org.eclipse.search,
+ org.eclipse.ui.console,
+ org.eclipse.jdt.launching,
+ org.eclipse.osbp.dsl.xtext.lazyresolver.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.ecview.core.common.model;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.ecview.core.extension.model;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.pde.ui,
+ org.eclipse.equinox.p2.metadata,
+ org.eclipse.osbp.dsl.entity.xtext;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.dsl.dto.xtext;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.dsl.services.xtext;bundle-version="[0.9.0,0.10.0)"
+Export-Package: org.eclipse.osbp.ide.core.ui;x-internal:=true;version="0.9.0",
+ org.eclipse.osbp.ide.core.ui.builder;x-internal:=true;version="0.9.0",
+ org.eclipse.osbp.ide.core.ui.i18n;x-internal:=true;version="0.9.0",
+ org.eclipse.osbp.ide.core.ui.nature;x-internal:=true;version="0.9.0",
+ org.eclipse.osbp.ide.core.ui.util;
+ uses:="org.eclipse.emf.ecore,
+ org.eclipse.jdt.core,
+ org.eclipse.core.resources";version="0.9.0",
+ org.eclipse.osbp.ide.core.ui.view;x-internal:=true;version="0.9.0"
diff --git a/org.eclipse.osbp.ide.core.ui/about.html b/org.eclipse.osbp.ide.core.ui/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.ui/about.ini b/org.eclipse.osbp.ide.core.ui/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/about.ini
@@ -0,0 +1,17 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+welcomePage=
diff --git a/org.eclipse.osbp.ide.core.ui/about.mappings b/org.eclipse.osbp.ide.core.ui/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=qualifier
diff --git a/org.eclipse.osbp.ide.core.ui/about.properties b/org.eclipse.osbp.ide.core.ui/about.properties
new file mode 100644
index 0000000..c693102
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/about.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=org.eclipse.osbp.ide.core.ui
+
+################ blurb property ####################################
+featureText=\
+Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Loetz GmbH&Co.KG - implementation\n
+################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.ide.core.ui/build.properties b/org.eclipse.osbp.ide.core.ui/build.properties
new file mode 100644
index 0000000..2b58a78
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/build.properties
@@ -0,0 +1,10 @@
+source.. = src
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ .project,\
+ LICENSE.txt,\
+ license.html
+output.. = target/classes/
+src.includes = about.properties, about.mappings, about.ini, about.html, license.html
diff --git a/org.eclipse.osbp.ide.core.ui/icons/Project.gif b/org.eclipse.osbp.ide.core.ui/icons/Project.gif
new file mode 100644
index 0000000..dcc524e
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/icons/Project.gif
Binary files differ
diff --git a/org.eclipse.osbp.ide.core.ui/icons/Property.gif b/org.eclipse.osbp.ide.core.ui/icons/Property.gif
new file mode 100644
index 0000000..d2f257c
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/icons/Property.gif
Binary files differ
diff --git a/org.eclipse.osbp.ide.core.ui/icons/Resource.gif b/org.eclipse.osbp.ide.core.ui/icons/Resource.gif
new file mode 100644
index 0000000..c27fba4
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/icons/Resource.gif
Binary files differ
diff --git a/org.eclipse.osbp.ide.core.ui/icons/nature_overlay.png b/org.eclipse.osbp.ide.core.ui/icons/nature_overlay.png
new file mode 100644
index 0000000..0098ea1
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/icons/nature_overlay.png
Binary files differ
diff --git a/org.eclipse.osbp.ide.core.ui/license.html b/org.eclipse.osbp.ide.core.ui/license.html
new file mode 100644
index 0000000..c33d45c
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/license.html
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.ui/plugin.xml b/org.eclipse.osbp.ide.core.ui/plugin.xml
new file mode 100644
index 0000000..a5871ce
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/plugin.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ adaptable="true"
+ id="org.eclipse.osbp.ide.core.ui.nature.addNature"
+ objectClass="org.eclipse.core.resources.IProject">
+ <action
+ class="org.eclipse.osbp.ide.core.ui.nature.ToggleOSBPNatureAction"
+ icon="icons/nature_overlay.png"
+ id="org.eclipse.osbp.ide.core.ui.nature.AddOSBPNatureAction"
+ label="Convert to OSBP project"
+ menubarPath="org.eclipse.ui.projectConfigure/additions">
+ </action>
+ <visibility>
+ <not>
+ <objectState
+ name="nature"
+ value="org.eclipse.osbp.ide.core.ui.shared.OSBPNature">
+ </objectState>
+ </not>
+ </visibility>
+ </objectContribution>
+ <objectContribution
+ adaptable="true"
+ id="org.eclipse.osbp.ide.core.ui.nature.removeNature"
+ objectClass="org.eclipse.core.resources.IProject">
+ <action
+ class="org.eclipse.osbp.ide.core.ui.nature.ToggleOSBPNatureAction"
+ icon="icons/nature_overlay.png"
+ id="org.eclipse.osbp.ide.core.ui.nature.RemoveOSBPNatureAction"
+ label="Remove OSBP Nature"
+ menubarPath="org.eclipse.ui.projectConfigure/additions">
+ </action>
+ <visibility>
+ <objectState
+ name="nature"
+ value="org.eclipse.osbp.ide.core.ui.shared.OSBPNature">
+ </objectState>
+ </visibility>
+ </objectContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.decorators">
+ <decorator
+ adaptable="true"
+ icon="icons/nature_overlay.png"
+ id="org.eclipse.osbp.ide.core.nature.overlay"
+ label="OSBP Nature"
+ lightweight="true"
+ location="TOP_LEFT"
+ state="true">
+ <enablement>
+ <and>
+ <objectClass
+ name="org.eclipse.core.resources.IProject"/>
+ <objectState
+ name="nature"
+ value="org.eclipse.osbp.ide.core.ui.shared.OSBPNature">
+ </objectState>
+ </and>
+ </enablement>
+ </decorator>
+ </extension>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ name="OSBP"
+ icon="/icons/osbpPerspective.png"
+ class="org.eclipse.osbp.ide.core.ui.perspective.OSBPPerspectiveFactory"
+ id="org.eclipse.osbp.ide.core.ui.OSBPPerspective">
+ <description>
+ Provides views for OSBP project
+ </description>
+ </perspective>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ id="org.eclipse.osbp.eclipse.ui.views.category.Resources"
+ name="OSBP Views">
+ </category>
+ </extension>
+
+
+</plugin>
diff --git a/org.eclipse.osbp.ide.core.ui/pom.xml b/org.eclipse.osbp.ide.core.ui/pom.xml
new file mode 100644
index 0000000..88095f5
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.ide.core.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>0.21.0</version>
+ <configuration>
+ <compilerVersion>1.8</compilerVersion>
+ <encoding>UTF-8</encoding>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.osbp.ide.core.ui/saveold/RunVaaclipseAction.java b/org.eclipse.osbp.ide.core.ui/saveold/RunVaaclipseAction.java
new file mode 100644
index 0000000..57598b4
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/saveold/RunVaaclipseAction.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.nature;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.equinox.region.Region;
+import org.eclipse.equinox.region.RegionDigraph;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Sven Efftinge - Initial contribution and API
+ */
+public class RunVaaclipseAction implements IObjectActionDelegate {
+
+ private static final org.slf4j.Logger log = LoggerFactory
+ .getLogger(RunVaaclipseAction.class);
+
+ private ISelection selection;
+
+ public void run(IAction action) {
+ try {
+ BundleContext bc = FrameworkUtil.getBundle(getClass())
+ .getBundleContext();
+ ServiceReference<RegionDigraph> ref = bc
+ .getServiceReference(RegionDigraph.class);
+ RegionDigraph digraph = bc.getService(ref);
+
+ Region vaaclipse = digraph.getRegion("vaaclipse");
+ if (vaaclipse != null) {
+ digraph.removeRegion(vaaclipse);
+ }
+ vaaclipse = digraph.createRegion("vaaclipse");
+
+ for (Bundle b : bc.getBundles()) {
+ Bundle newB = vaaclipse.installBundle(FileLocator
+ .getBundleFile(b).toURI().toURL().toExternalForm());
+ vaaclipse.addBundle(newB);
+ }
+ } catch (BundleException e) {
+ e.printStackTrace();
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/CoreUiActivator.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/CoreUiActivator.java
new file mode 100644
index 0000000..f5f6599
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/CoreUiActivator.java
@@ -0,0 +1,142 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.osbp.xtext.builder.ui.access.IXtextUtilService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.EventAdmin;
+import org.osgi.service.event.EventHandler;
+import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CoreUiActivator.
+ */
+public class CoreUiActivator extends AbstractUIPlugin {
+
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.osbp.ide.core.ui"; //$NON-NLS-1$
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(CoreUiActivator.class);
+
+ /** The plugin. */
+ private static CoreUiActivator plugin;
+
+ /**
+ * Gets the default.
+ *
+ * @return the default
+ */
+ public static CoreUiActivator getDefault() {
+ return plugin;
+ }
+
+ /** The event admin. */
+ private EventAdmin eventAdmin;
+
+ /** The util service tracker. */
+ private ServiceTracker<IXtextUtilService, IXtextUtilService> utilServiceTracker;
+
+ /** The util service. */
+ private IXtextUtilService utilService;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ try {
+ super.start(context);
+ plugin = this;
+
+ ServiceReference<EventAdmin> ref = context
+ .getServiceReference(EventAdmin.class);
+ eventAdmin = context.getService(ref);
+
+ } catch (Exception e) {
+ LOGGER.error(
+ "Error initializing " + PLUGIN_ID + ":" + e.getMessage(), e);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ if (utilServiceTracker != null) {
+ utilServiceTracker.close();
+ utilService = null;
+ }
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the event admin.
+ *
+ * @return the event admin
+ */
+ public EventAdmin getEventAdmin() {
+ return eventAdmin;
+ }
+
+ /**
+ * Registers a eventhandler at the event admin.
+ *
+ * @param handler
+ * the handler
+ * @param props
+ * the props
+ * @return the service registration
+ */
+ public ServiceRegistration<EventHandler> registerEventHandler(
+ EventHandler handler, Map<String, String> props) {
+ Hashtable<String, String> castedProps = new Hashtable<String, String>(
+ props);
+ return getBundle().getBundleContext().registerService(
+ EventHandler.class, handler, castedProps);
+ }
+
+ /**
+ * Provides the utilService.
+ *
+ * @return the util service
+ */
+ public IXtextUtilService getUtilService() {
+ if (utilService == null) {
+ utilServiceTracker = new ServiceTracker<IXtextUtilService, IXtextUtilService>(
+ getBundle().getBundleContext(), IXtextUtilService.class,
+ null);
+ utilServiceTracker.open();
+ try {
+ utilService = utilServiceTracker.waitForService(1000);
+ } catch (InterruptedException e) {
+ }
+ if (utilService == null) {
+ LOGGER.error("IXtextUtilService could not be found. Building DTOs and Services not possible.");
+ }
+ }
+
+ return utilService;
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/builder/OSBPI18nBuilder.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/builder/OSBPI18nBuilder.java
new file mode 100644
index 0000000..c80dea2
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/builder/OSBPI18nBuilder.java
@@ -0,0 +1,329 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.builder;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.ProgressMonitorWrapper;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.osbp.ide.core.api.i18n.CoreUtil;
+import org.eclipse.osbp.ide.core.api.i18n.II18nRegistry;
+import org.eclipse.osbp.ide.core.ui.CoreUiActivator;
+import org.osgi.service.event.Event;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.Inject;
+
+public class OSBPI18nBuilder extends IncrementalProjectBuilder {
+
+ public static final String BUILDER_ID = CoreUtil.BUILDER_I18N_ID;
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(OSBPI18nBuilder.class);
+
+ @Inject
+ private II18nRegistry i18nRegistry;
+
+ private boolean firstBuild;
+
+ public OSBPI18nBuilder() {
+
+ }
+
+ @Override
+ protected IProject[] build(int kind, Map<String, String> args,
+ IProgressMonitor monitor) throws CoreException {
+
+ long startTime = System.currentTimeMillis();
+ try {
+ if (monitor != null) {
+ final String taskName = "Building" + getProject().getName()
+ + ": "; //$NON-NLS-1$
+ monitor = new ProgressMonitorWrapper(monitor) {
+ @Override
+ public void subTask(String name) {
+ super.subTask(taskName + name);
+ }
+ };
+ }
+ SubMonitor progress = SubMonitor.convert(monitor, 8);
+ if (kind == FULL_BUILD || firstBuild) {
+ firstBuild = false;
+ fullBuildI18n(getProject());
+ } else {
+ IResourceDelta delta = getDelta(getProject());
+ if (delta == null || isOpened(delta)) {
+ fullBuildI18n(getProject());
+ } else {
+ incrementalBuild(delta, progress.newChild(1));
+ }
+ }
+ if (monitor != null) {
+ monitor.worked(8);
+ }
+ } catch (CoreException e) {
+ LOGGER.error(e.getMessage(), e);
+ throw e;
+ } catch (OperationCanceledException e) {
+ forgetLastBuiltState();
+ throw e;
+ } catch (Exception e) {
+ LOGGER.error(e.getMessage(), e);
+ } finally {
+ if (monitor != null) {
+ monitor.done();
+ }
+ LOGGER.info("Build " + getProject().getName() + " in "
+ + (System.currentTimeMillis() - startTime) + " ms");
+ }
+
+ sendBuildEvent();
+
+ return getProject().getReferencedProjects();
+ }
+
+ /**
+ * Sends an event that a build was done.
+ */
+ private void sendBuildEvent() {
+ Event event = new Event(CoreUtil.EVENT_TOPIC__BUILDER,
+ Collections.<String, String> emptyMap());
+ CoreUiActivator.getDefault().getEventAdmin().sendEvent(event);
+ }
+
+ /**
+ * @param monitor
+ * the progress monitor to use for reporting progress to the
+ * user. It is the caller's responsibility to call done() on the
+ * given monitor. Accepts null, indicating that no progress
+ * should be reported and that the operation cannot be cancelled.
+ */
+ private void incrementalBuild(IResourceDelta delta,
+ final IProgressMonitor monitor) throws CoreException {
+ final SubMonitor progress = SubMonitor.convert(monitor,
+ "Collection i18n", 4);
+ progress.subTask("Collecting i18n");
+ if (progress.isCanceled())
+ throw new OperationCanceledException();
+ progress.worked(2);
+
+ IProject project = getProject();
+ if (!project.getDescription().hasNature(CoreUtil.NATURE_ID)) {
+ return;
+ }
+
+ monitor.subTask("Building I18n");
+ incrementalBuildI18n(delta, progress);
+
+ if (progress.isCanceled())
+ throw new OperationCanceledException();
+ progress.worked(4);
+ }
+
+ /**
+ * Builds I18n.
+ *
+ * @param delta
+ * @param progress
+ * @throws CoreException
+ */
+ private void incrementalBuildI18n(IResourceDelta delta,
+ final SubMonitor progress) throws CoreException {
+ delta.accept(new IResourceDeltaVisitor() {
+ @Override
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ if (progress.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ if (delta.getResource() instanceof IProject) {
+ return delta.getResource() == getProject();
+ } else if (delta.getResource() instanceof IFile) {
+ IFile file = (IFile) delta.getResource();
+ if (file.getFileExtension().equals("properties")) {
+ String parentFolder = file.getParent().getName();
+ if (!parentFolder.equals("l10n")
+ && !parentFolder.equals("i18n")) {
+ return false;
+ }
+ String[] tokens = file.getName()
+ .replace(".properties", "").split("_");
+ StringBuilder builder = new StringBuilder();
+ if (tokens.length >= 2) {
+ for (int i = 1; i < tokens.length; i++) {
+ if (builder.length() > 0) {
+ builder.append("-");
+ }
+ builder.append(tokens[i]);
+ }
+ }
+ Locale locale = Locale.forLanguageTag(builder
+ .toString());
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ // remove the resource
+ i18nRegistry.removeResource(getProject(), locale,
+ file.getProjectRelativePath());
+ } else if (delta.getKind() == IResourceDelta.ADDED
+ || delta.getKind() == IResourceDelta.CHANGED) {
+ Properties properties = new Properties();
+ try {
+ properties.load(file.getContents());
+ II18nRegistry.ResourceDescription resourceDesc = new II18nRegistry.ResourceDescription(
+ getProject(), locale, file
+ .getProjectRelativePath(),
+ properties);
+ // cache the resource description
+ i18nRegistry.cache(resourceDesc);
+ } catch (IOException e) {
+ LOGGER.error("{}", e);
+ }
+ return false;
+ }
+ }
+ } else if (delta.getResource() instanceof IFolder) {
+ String foldername = delta.getResource().getName();
+ if (foldername.equals("OSGI-INF")) {
+ return true;
+ } else if (foldername.equals("l10n")) {
+ IFolder folder = (IFolder) delta.getResource();
+ if (folder.getParent().getName().equals("OSGI-INF")) {
+ return true;
+ }
+ } else if (foldername.equals("i18n")) {
+ return true;
+ }
+
+ }
+ return false;
+ }
+ });
+ }
+
+ /**
+ * Builds I18n stuff.
+ *
+ * @param project
+ * @return
+ * @throws CoreException
+ */
+ private void fullBuildI18n(IProject project) throws CoreException {
+ final II18nRegistry.ProjectDescription projectDescription = new II18nRegistry.ProjectDescription(
+ getProject());
+ project.accept(new IResourceVisitor() {
+ @Override
+ public boolean visit(IResource resource) throws CoreException {
+ if (resource == getProject()) {
+ return true;
+ } else if (resource instanceof IFile) {
+ IFile file = (IFile) resource;
+ if (file.getFileExtension().equals("properties")) {
+ String parentFolder = file.getParent().getName();
+ if (!parentFolder.equals("l10n")
+ && !parentFolder.equals("i18n")) {
+ return false;
+ }
+ String[] tokens = file.getName()
+ .replace(".properties", "").split("_");
+ StringBuilder builder = new StringBuilder();
+ if (tokens.length >= 2) {
+ for (int i = 1; i < tokens.length; i++) {
+ if (builder.length() > 0) {
+ builder.append("-");
+ }
+ builder.append(tokens[i]);
+ }
+ }
+ Locale locale = Locale.forLanguageTag(builder
+ .toString());
+ Properties properties = new Properties();
+ try {
+ properties.load(file.getContents());
+ II18nRegistry.ResourceDescription resourceDesc = new II18nRegistry.ResourceDescription(
+ getProject(), locale, file
+ .getProjectRelativePath(),
+ properties);
+ projectDescription.putResource(resourceDesc);
+
+ } catch (IOException e) {
+ LOGGER.error("{}", e);
+ }
+ return false;
+ }
+ } else if (resource instanceof IFolder) {
+ String foldername = resource.getName();
+ if (foldername.equals("OSGI-INF")) {
+ return true;
+ } else if (foldername.equals("l10n")) {
+ IFolder folder = (IFolder) resource;
+ if (folder.getParent().getName().equals("OSGI-INF")) {
+ return true;
+ }
+ } else if (foldername.equals("i18n")) {
+ return true;
+ }
+
+ }
+ return false;
+ }
+ });
+
+ i18nRegistry.cache(projectDescription);
+ }
+
+ // /**
+ // * This method touches UI models to ensure that the AutowireHelper is
+ // * executed.
+ // *
+ // * @param tempLEntityModel
+ // */
+ // private void buildUiModels(LEntityModel tempLEntityModel) {
+ // // find referencing dto model
+ // Set<URI> entityURIs = findEntityURIs(tempLEntityModel);
+ // final List<IReferenceDescription> targetDtoReferences =
+ // findTargetUiModelReferences(entityURIs);
+ // if (targetDtoReferences.isEmpty()) {
+ // return;
+ // }
+ // }
+
+ private boolean isOpened(IResourceDelta delta) {
+ return delta.getResource() instanceof IProject
+ && (delta.getFlags() & IResourceDelta.OPEN) != 0
+ && ((IProject) delta.getResource()).isOpen();
+ }
+
+ @Override
+ protected void clean(IProgressMonitor monitor) throws CoreException {
+ try {
+ i18nRegistry.removeProject(getProject());
+ } finally {
+ if (monitor != null) {
+ monitor.done();
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/builder/OSBPModelEnhancingBuilder.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/builder/OSBPModelEnhancingBuilder.java
new file mode 100644
index 0000000..f5ba1ac
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/builder/OSBPModelEnhancingBuilder.java
@@ -0,0 +1,2122 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.builder;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.osbp.dsl.semantic.common.types.LAttribute;
+import org.eclipse.osbp.dsl.semantic.common.types.LEnum;
+import org.eclipse.osbp.dsl.semantic.common.types.LEnumLiteral;
+import org.eclipse.osbp.dsl.semantic.common.types.LImport;
+import org.eclipse.osbp.dsl.semantic.common.types.LReference;
+import org.eclipse.osbp.dsl.semantic.common.types.LType;
+import org.eclipse.osbp.dsl.semantic.common.types.LTypedPackage;
+import org.eclipse.osbp.dsl.semantic.common.types.OSBPTypesFactory;
+import org.eclipse.osbp.dsl.semantic.dto.LAutoInheritDto;
+import org.eclipse.osbp.dsl.semantic.dto.LDto;
+import org.eclipse.osbp.dsl.semantic.dto.LDtoFeature;
+import org.eclipse.osbp.dsl.semantic.dto.LDtoInheritedAttribute;
+import org.eclipse.osbp.dsl.semantic.dto.LDtoInheritedReference;
+import org.eclipse.osbp.dsl.semantic.dto.LDtoModel;
+import org.eclipse.osbp.dsl.semantic.dto.OSBPDtoFactory;
+import org.eclipse.osbp.dsl.semantic.dto.OSBPDtoPackage;
+import org.eclipse.osbp.dsl.semantic.dto.util.NamingConventionsUtil;
+import org.eclipse.osbp.dsl.semantic.entity.LBean;
+import org.eclipse.osbp.dsl.semantic.entity.LBeanAttribute;
+import org.eclipse.osbp.dsl.semantic.entity.LBeanFeature;
+import org.eclipse.osbp.dsl.semantic.entity.LBeanReference;
+import org.eclipse.osbp.dsl.semantic.entity.LEntity;
+import org.eclipse.osbp.dsl.semantic.entity.LEntityAttribute;
+import org.eclipse.osbp.dsl.semantic.entity.LEntityFeature;
+import org.eclipse.osbp.dsl.semantic.entity.LEntityModel;
+import org.eclipse.osbp.dsl.semantic.entity.LEntityReference;
+import org.eclipse.osbp.dsl.semantic.service.LDTOService;
+import org.eclipse.osbp.dsl.semantic.service.LService;
+import org.eclipse.osbp.dsl.semantic.service.LServiceModel;
+import org.eclipse.osbp.dsl.semantic.service.OSBPServiceFactory;
+import org.eclipse.osbp.dsl.semantic.service.OSBPServicePackage;
+import org.eclipse.osbp.dsl.xtext.lazyresolver.api.ISemanticLoadingResource;
+import org.eclipse.osbp.dsl.xtext.lazyresolver.api.logger.TimeLogger;
+import org.eclipse.osbp.ide.core.api.i18n.CoreUtil;
+import org.eclipse.osbp.ide.core.ui.CoreUiActivator;
+import org.eclipse.osbp.ide.core.ui.nature.OSBPNature;
+import org.eclipse.osbp.xtext.builder.ui.access.IXtextUtilService;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.xtext.builder.builderState.IBuilderState;
+import org.eclipse.xtext.common.types.TypesPackage;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.resource.IReferenceDescription;
+import org.eclipse.xtext.resource.IResourceDescription;
+import org.eclipse.xtext.resource.IResourceDescription.Delta;
+import org.eclipse.xtext.resource.SaveOptions;
+import org.eclipse.xtext.resource.XtextResourceSet;
+import org.eclipse.xtext.ui.editor.findrefs.IReferenceFinder;
+import org.eclipse.xtext.ui.resource.IStorage2UriMapper;
+import org.eclipse.xtext.ui.resource.XtextResourceSetProvider;
+import org.eclipse.xtext.util.IAcceptor;
+import org.eclipse.xtext.util.Pair;
+import org.eclipse.xtext.util.concurrent.IUnitOfWork;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+
+// TODO: Auto-generated Javadoc
+/**
+ * This builder is aware about the Xtext index. If changes occurred there, we
+ * pend the {@link IResourceDescription} and do a model-enhancing-build later.
+ * See {@link #needRebuild()}. It reinvoked the build chain later. So we can
+ * ensure, that the index for our enhanced models is created too.
+ */
+@SuppressWarnings("restriction")
+public class OSBPModelEnhancingBuilder extends IncrementalProjectBuilder
+ implements IResourceDescription.Event.Listener {
+
+ /** The Constant BUILDER_ID. */
+ public static final String BUILDER_ID = CoreUtil.BUILDER_MODEL_ENHANCING_ID;
+
+ public final static String MODELS_BASE_SRC_DIRECTORY = "models";
+ public final static String SOURCE_BASE_SRC_DIRECTORY = "src";
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(OSBPModelEnhancingBuilder.class);
+
+ /** The state. */
+ @Inject
+ private IBuilderState state;
+
+ /** The injector. */
+ @Inject
+ private Injector injector;
+
+ /** The uri storage mapper. */
+ @Inject
+ private IStorage2UriMapper uriStorageMapper;
+
+ /** The dto builder. */
+ private DtoEnhancer dtoBuilder;
+
+ /** The service builder. */
+ private ServiceEnhancer serviceBuilder;
+
+ private List<Pending> pending = new ArrayList<Pending>();
+ private boolean firstBuild = true;
+
+ /**
+ * Instantiates a new OSBP model enhancing builder.
+ */
+ public OSBPModelEnhancingBuilder() {
+
+ }
+
+ /**
+ * Listens for changes of Xtext builder. If entity or dto are being changed,
+ * then we store the models for later.
+ *
+ * @param event
+ * the event
+ */
+ @Override
+ public void descriptionsChanged(
+ org.eclipse.xtext.resource.IResourceDescription.Event event) {
+ for (Delta delta : event.getDeltas()) {
+ // do not check for changes in the eobject description. Causes
+ // confusion for the user
+ if (delta.getNew() == null) {
+ continue;
+ }
+
+ if (shouldUse(delta.getUri())) {
+
+ String fileExtension = delta.getUri().fileExtension();
+ switch (fileExtension) {
+ case "entity":
+ if (!contains(delta.getUri())) {
+ pending.add(new Pending(delta.getNew()));
+ }
+ break;
+ case "dto":
+ if (!contains(delta.getUri())) {
+ pending.add(new Pending(delta.getNew()));
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Contains.
+ *
+ * @param uri
+ * the uri
+ * @return true, if successful
+ */
+ private boolean contains(URI uri) {
+ return pending.stream().filter(e -> e.uri.equals(uri)).count() > 0;
+ }
+
+ /**
+ * Should use.
+ *
+ * @param uri
+ * the uri
+ * @return true, if successful
+ */
+ private boolean shouldUse(URI uri) {
+ if (uri == null) {
+ return false;
+ }
+
+ String platformResourcePath = uri.toPlatformString(true);
+ if (platformResourcePath == null) {
+ return false;
+ }
+ IFile file = ResourcesPlugin.getWorkspace().getRoot()
+ .getFile(new Path(platformResourcePath));
+ if (file == null || !file.exists()) {
+ // if resource is not in workspace continue
+ return false;
+ }
+
+ Iterable<Pair<IStorage, IProject>> pairs = uriStorageMapper
+ .getStorages(uri);
+ if (pairs.iterator().hasNext()) {
+ Pair<IStorage, IProject> pair = pairs.iterator().next();
+ IProject dtoProject = pair.getSecond();
+ if (dtoProject != null && pair.getFirst() instanceof IFile) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.resources.IncrementalProjectBuilder#build(int,
+ * java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected IProject[] build(int kind, Map<String, String> args,
+ IProgressMonitor monitor) throws CoreException {
+ ensureParticipants();
+
+ if (kind == FULL_BUILD || firstBuild) {
+ firstBuild = false;
+ collectInitialPending();
+ }
+
+ if (!pending.isEmpty()) {
+ Collections.sort(pending, new Comparator<Pending>() {
+ @Override
+ public int compare(Pending o1, Pending o2) {
+ if (o1.uri.fileExtension().equals("entity")) {
+ return -1;
+ }
+ if (o1.uri.fileExtension().equals("dto")) {
+ return 1;
+ }
+ return 0;
+ }
+ });
+
+ boolean processed = false;
+ for (Iterator<Pending> iterator = pending.iterator(); iterator
+ .hasNext() && !processed;) {
+ Pending pending = iterator.next();
+ try {
+
+ // URI uri = pending.uri;
+ // if(uri.isPlatform()) {
+ // // String projectName = getProject().getName();
+ // // if(uri.device().equals(projectName))
+ // ResourcesPlugin.getWorkspace().getRoot().get
+ // }
+
+ String fileExtension = pending.uri.fileExtension();
+ switch (fileExtension) {
+ case "entity":
+ LEntityModel lentity = dtoBuilder
+ .loadSemanticModel(pending.uri);
+ if (lentity != null) {
+ dtoBuilder.buildDtos(lentity);
+ processed = true;
+ needRebuild();
+ }
+ break;
+ case "dto":
+ LDtoModel lDtoModel = serviceBuilder
+ .loadSemanticModel(pending.uri);
+ if (lDtoModel != null) {
+ // touch the ui and dialog models
+ try {
+ serviceBuilder
+ .buildUiAndDialogModels(lDtoModel);
+ } catch (Exception e) {
+ LOGGER.error("{}", e);
+ }
+ try {
+ serviceBuilder.buildServices(lDtoModel);
+ } catch (Exception e) {
+ LOGGER.error("{}", e);
+ }
+ processed = true;
+ needRebuild();
+ }
+ break;
+ }
+ } finally {
+ iterator.remove();
+ }
+ }
+ }
+
+ return getProject().getReferencedProjects();
+ }
+
+ /**
+ * Collects all resources that should be used for an initial build.
+ *
+ * @throws CoreException
+ */
+ private void collectInitialPending() throws CoreException {
+ IProject project = getProject();
+ if (!project.getDescription().hasNature(OSBPNature.NATURE_ID)) {
+ return;
+ }
+ project.accept(new IResourceVisitor() {
+ @Override
+ // NOSONAR - anonymous to lambda
+ public boolean visit(IResource resource) throws CoreException {
+ if (resource == getProject()) {
+ return true;
+ } else if (resource instanceof IFolder) {
+ return checkFolder((IFolder) resource);
+ } else if (resource instanceof IFile) {
+ IFile file = (IFile) resource;
+
+ org.eclipse.emf.common.util.URI uri = org.eclipse.emf.common.util.URI
+ .createPlatformResourceURI(file.getFullPath()
+ .toString(), false);
+ if (shouldUse(uri)) {
+ String fileExtension = uri.fileExtension();
+ switch (fileExtension) {
+ case "entity":
+ if (!contains(uri)) {
+ pending.add(new Pending(uri));
+ }
+ break;
+ case "dto":
+ if (!contains(uri)) {
+ pending.add(new Pending(uri));
+ }
+ break;
+ }
+ }
+
+ }
+ return false;
+ }
+ });
+ }
+
+ private boolean checkFolder(IFolder folder) { // NOSONAR - complexity
+ if (MODELS_BASE_SRC_DIRECTORY.equals(folder.getName())) {
+ return true;
+ }
+ if (SOURCE_BASE_SRC_DIRECTORY.equals(folder.getName())) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Ensure participants.
+ */
+ private void ensureParticipants() {
+ if (dtoBuilder == null) {
+ // on startup add the state listener
+ state.addListener(this);
+
+ dtoBuilder = new DtoEnhancer();
+ injector.injectMembers(dtoBuilder);
+ }
+
+ if (serviceBuilder == null) {
+ serviceBuilder = new ServiceEnhancer();
+ injector.injectMembers(serviceBuilder);
+ }
+ }
+
+ /**
+ * The Class DtoEnhancer.
+ */
+ public class DtoEnhancer {
+
+ /**
+ * The Class DtoEnhancerContext.
+ */
+ private class DtoEnhancerContext {
+
+ /** The dto resource. */
+ private ISemanticLoadingResource dtoResource;
+
+ /** The writeable resource set. */
+ private ResourceSet writeableResourceSet;
+ }
+
+ /** The rs provider. */
+ @Inject
+ private XtextResourceSetProvider rsProvider;
+
+ /** The reference finder. */
+ @Inject
+ private IReferenceFinder referenceFinder;
+
+ /** The uri storage mapper. */
+ @Inject
+ private IStorage2UriMapper uriStorageMapper;
+
+ /**
+ * Builds the dto.
+ *
+ * @param tempLEntityModel
+ * the temp l entity model
+ */
+ public void buildDtos(LEntityModel tempLEntityModel) {
+ IXtextUtilService service = CoreUiActivator.getDefault()
+ .getUtilService();
+ if (service == null) {
+ LOGGER.error("Skipping dto build since IXtextUtilService is not available!");
+ return;
+ }
+
+ TimeLogger timeLogger = TimeLogger.start(getClass());
+
+ //
+ // we need to prepare a dtoResource and a writeableResourceSet
+ //
+ // find referencing dto model
+ Set<URI> entityURIs = findEntityURIs(tempLEntityModel);
+ final List<IReferenceDescription> targetDtoReferences = findTargetDtoReferences(
+ entityURIs, tempLEntityModel.eResource().getResourceSet());
+
+ // ------- create the build context -------
+ DtoEnhancerContext context = createDtoBuildContext(
+ tempLEntityModel, targetDtoReferences);
+
+ ISemanticLoadingResource entityResource = (ISemanticLoadingResource) context.writeableResourceSet
+ .getResource(tempLEntityModel.eResource().getURI(), true);
+
+ List<LType> sourceArtifacts = collectEntities((LEntityModel) entityResource
+ .getSemanticElement());
+
+ List<LType> tempDtos = collectDtos((LDtoModel) context.dtoResource
+ .getSemanticElement());
+
+ List<SourceTypeStore> sourceTypeStores = new ArrayList<SourceTypeStore>();
+ List<LType> dtosToPersist = new ArrayList<LType>();
+
+ // create all dtos -> no linking
+ //
+ Set<LTypedPackage> touchedPackages = new HashSet<LTypedPackage>();
+ for (LType lType : sourceArtifacts) {
+ if (lType instanceof LEntity) {
+ LEntity lEntity = (LEntity) lType;
+ LDto lDto = (LDto) findDtoType(lEntity, tempDtos);
+ if (lDto == null) {
+ lDto = OSBPDtoFactory.eINSTANCE.createLAutoInheritDto();
+ lDto.setAnnotationInfo(OSBPDtoFactory.eINSTANCE
+ .createLDto());
+ tempDtos.add(lDto);
+ } else {
+ // remove from package for a while
+ LTypedPackage lPkg = (LTypedPackage) lDto.eContainer();
+ lPkg.getTypes().remove(lDto);
+ // collect all touched packages -> They need cleanup
+ // later
+ touchedPackages.add(lPkg);
+ }
+ lDto.setName(NamingConventionsUtil.toDtoName(lEntity));
+ lDto.setWrappedType(lEntity);
+
+ dtosToPersist.add(lDto);
+
+ // store the source type of the new enum
+ sourceTypeStores.add(new SourceTypeStore(lEntity, lDto));
+
+ } else if (lType instanceof LBean) {
+ LBean lBean = (LBean) lType;
+ LDto lDto = (LDto) findDtoType(lBean, tempDtos);
+ if (lDto == null) {
+ lDto = OSBPDtoFactory.eINSTANCE.createLAutoInheritDto();
+ lDto.setAnnotationInfo(OSBPDtoFactory.eINSTANCE
+ .createLDto());
+ tempDtos.add(lDto);
+ } else {
+ // remove from package for a while
+ LTypedPackage lPkg = (LTypedPackage) lDto.eContainer();
+ lPkg.getTypes().remove(lDto);
+
+ // collect all touched packages -> They need cleanup
+ // later
+ touchedPackages.add(lPkg);
+ }
+ lDto.setName(NamingConventionsUtil.toDtoName(lBean));
+ lDto.setWrappedType(lBean);
+
+ dtosToPersist.add(lDto);
+
+ // store the source type of the new enum
+ sourceTypeStores.add(new SourceTypeStore(lBean, lDto));
+ } else if (lType instanceof LEnum) {
+ LEnum lSourceType = (LEnum) lType;
+ LEnum lDtoType = (LEnum) findDtoType(lSourceType, tempDtos);
+ if (lDtoType == null) {
+ lDtoType = OSBPTypesFactory.eINSTANCE.createLEnum();
+ // lDtoType.setAnnotationInfo(OSBPTypesFactory.eINSTANCE
+ // .createLEnum());
+ tempDtos.add(lDtoType);
+ } else {
+ // remove from package for a while
+ LTypedPackage lPkg = (LTypedPackage) lDtoType
+ .eContainer();
+ lPkg.getTypes().remove(lDtoType);
+
+ // collect all touched packages -> They need cleanup
+ // later
+ touchedPackages.add(lPkg);
+ }
+ lDtoType.setName(NamingConventionsUtil
+ .toDtoName(lSourceType));
+
+ dtosToPersist.add(lDtoType);
+
+ // store the source type of the new enum
+ sourceTypeStores.add(new SourceTypeStore(lSourceType,
+ lDtoType));
+
+ }
+ }
+
+ // clean touched packages -> Also remove dtos that are not based on
+ // an
+ // entity anymore
+ for (LTypedPackage lPkg : touchedPackages) {
+ for (Iterator<LType> iterator = lPkg.getTypes().iterator(); iterator
+ .hasNext();) {
+ LType lType = (LType) iterator.next();
+ if (lType instanceof LAutoInheritDto) {
+ LDto lDto = (LDto) lType;
+ if (lDto.getWrappedType() == null
+ || lDto.getWrappedType().eIsProxy()) {
+ iterator.remove();
+ }
+ }
+ }
+ }
+
+ // remove all dtos having no wrapped type anymore
+ //
+ for (LType lType : new ArrayList<>(tempDtos)) {
+ if (lType instanceof LAutoInheritDto) {
+ LDto lDto = (LDto) lType;
+ if (lDto.getWrappedType() == null
+ || lDto.getWrappedType().eIsProxy()) {
+ tempDtos.remove(lDto);
+ }
+ }
+ }
+
+ // clean super types
+ //
+ for (LType lType : dtosToPersist) {
+ if (lType instanceof LAutoInheritDto) {
+ LDto lDto = (LDto) lType;
+ lDto.setSuperType(null);
+ }
+ }
+
+ // link super types
+ //
+ for (LType lType : sourceArtifacts) {
+ if (lType instanceof LEntity) {
+ LEntity lEntity = (LEntity) lType;
+ if (lEntity.getSuperType() != null
+ && !lEntity.getSuperType().eIsProxy()) {
+ LEntity lEntitySuperType = lEntity.getSuperType();
+ LDto lDto = (LDto) findDtoType(lEntity, tempDtos);
+ LDto lDtoSuperType = (LDto) findDtoType(
+ lEntitySuperType, tempDtos);
+ lDto.setSuperType(lDtoSuperType);
+ }
+ } else if (lType instanceof LBean) {
+ LBean lBean = (LBean) lType;
+ if (lBean.getSuperType() != null
+ && !lBean.getSuperType().eIsProxy()) {
+ LBean lBeanSuperType = lBean.getSuperType();
+ LDto lDto = (LDto) findDtoType(lBean, tempDtos);
+ LDto lDtoSuperType = (LDto) findDtoType(lBeanSuperType,
+ tempDtos);
+ lDto.setSuperType(lDtoSuperType);
+ }
+ }
+ }
+
+ // fix features
+ //
+ for (LType lType : dtosToPersist) {
+ if (lType instanceof LAutoInheritDto) {
+ LDto lDto = (LDto) lType;
+ fixFeatures(lDto, dtosToPersist);
+ } else if (lType instanceof LEnum) {
+ LEnum lDtoEnum = (LEnum) lType;
+ fixLiterals(lDtoEnum);
+ }
+ }
+
+ if (!dtosToPersist.isEmpty()) {
+ // add the dtos to the package in the proper order
+ //
+ Set<String> dtoNames = new HashSet<String>();
+ for (LType lType : dtosToPersist) {
+
+ if (lType instanceof LDto) {
+ LDto lDto = (LDto) lType;
+ // filter dtos
+ if (dtoNames.contains(lDto.getName())) {
+ // remove duplicate dtos
+ continue;
+ } else if (lDto.getWrappedType().eIsProxy()) {
+ // remove dto without a proper entity reference
+ continue;
+ }
+ dtoNames.add(lDto.getName());
+
+ LTypedPackage lSourceTypePkg = (LTypedPackage) lDto
+ .getWrappedType().eContainer();
+ addDtoToPackage(
+ NamingConventionsUtil
+ .toDtoPackage(lSourceTypePkg),
+ lDto, (LDtoModel) context.dtoResource
+ .getSemanticElement(), lSourceTypePkg
+ .getName());
+ } else if (lType instanceof LEnum) {
+ LEnum lEnum = (LEnum) lType;
+ // filter dtos
+ if (dtoNames.contains(lEnum.getName())) {
+ // remove duplicate enums
+ continue;
+ }
+ dtoNames.add(lEnum.getName());
+
+ LEnum sourceType = (LEnum) SourceTypeStore
+ .findSourceType(lEnum);
+ LTypedPackage lSourceTypePkg = (LTypedPackage) sourceType
+ .eContainer();
+ addDtoToPackage(
+ NamingConventionsUtil
+ .toDtoPackage(lSourceTypePkg),
+ lEnum, (LDtoModel) context.dtoResource
+ .getSemanticElement(), lSourceTypePkg
+ .getName());
+ }
+ }
+
+ // remove all added adapters
+ //
+ for (SourceTypeStore store : sourceTypeStores) {
+ store.dispose();
+ }
+
+ // save the dtos
+ //
+ try {
+ Diagnostic diagnostic = Diagnostician.INSTANCE
+ .validate(context.dtoResource.getSemanticElement());
+ int sev = diagnostic.getSeverity();
+ if (sev <= Diagnostic.WARNING) {
+ context.dtoResource.save(SaveOptions.newBuilder()
+ .format().getOptions().toOptionsMap());
+ } else {
+ if (!context.dtoResource.getErrors().isEmpty()) {
+ String message = context.dtoResource.getErrors()
+ .get(0).toString();
+ LOGGER.error(message);
+
+ IStatus status = new Status(IStatus.ERROR,
+ "org.eclipse.osbp.ide.core.ui", message);
+ Display.getDefault().asyncExec(
+ () -> {
+ ErrorDialog.openError(Display
+ .getDefault().getActiveShell(),
+ "Error", message, status);
+ });
+ } else {
+ String message = diagnostic.toString();
+ LOGGER.error(diagnostic.toString());
+
+ IStatus status = new Status(IStatus.ERROR,
+ "org.eclipse.osbp.ide.core.ui", message);
+ Display.getDefault().asyncExec(
+ () -> {
+ ErrorDialog.openError(Display
+ .getDefault().getActiveShell(),
+ "Error", message, status);
+ });
+ }
+ }
+ context.dtoResource.unload();
+
+ // invoke the incremental build
+ //
+ needRebuild();
+ } catch (IOException e) {
+ LOGGER.error("{}", e);
+ }
+
+ timeLogger.stop(LOGGER, "Finished OSBPBuilder#buildDtos in ");
+
+ }
+ }
+
+ /**
+ * Creates the dto build context.
+ *
+ * @param tempLEntityModel
+ * the temp l entity model
+ * @param targetDtoReferences
+ * the target dto references
+ * @return the dto enhancer context
+ */
+ private DtoEnhancerContext createDtoBuildContext(
+ LEntityModel tempLEntityModel,
+ final List<IReferenceDescription> targetDtoReferences) {
+ DtoEnhancerContext context = new DtoEnhancerContext();
+ if (!targetDtoReferences.isEmpty()) {
+ //
+ // if we could find referenced dtos, then we use this
+ // information to
+ // create dtoResource and writeableResourceSet
+ //
+
+ // access entity resource
+ ISemanticLoadingResource tempEntityResource = (ISemanticLoadingResource) tempLEntityModel
+ .eResource();
+ ResourceSet readonlyResourceSet = tempEntityResource
+ .getResourceSet();
+
+ // access dto resource based on entityResourceSet
+ IReferenceDescription firstDesc = targetDtoReferences.get(0);
+ LDto tempDto = (LDto) readonlyResourceSet.getEObject(
+ firstDesc.getSourceEObjectUri(), true);
+
+ // create the proper dto resourceSet to save the dto
+ context.writeableResourceSet = getProjectResourceSet(EcoreUtil
+ .getURI(tempDto));
+
+ // load the dtoResource based on the dto resourceSet
+ context.dtoResource = (ISemanticLoadingResource) context.writeableResourceSet
+ .getResource(EcoreUtil.getURI(tempDto).trimFragment(),
+ true);
+ } else {
+
+ URI entityURI = EcoreUtil.getURI(tempLEntityModel);
+ // create the proper dto resourceSet to save the dto
+ context.writeableResourceSet = getProjectResourceSet(entityURI);
+
+ // try to find a file with extension .dtos in same project
+ IResource member = findDtoFile(entityURI);
+ String dtoResourcePath = null;
+ if (member != null) {
+ dtoResourcePath = member.getFullPath().toString();
+ } else {
+ //
+ // if we could not find referenced dtos, then we use the
+ // folder
+ // of
+ // the entity and put the dtos in there
+ //
+
+ // convert a path from
+ // "org/my/foo/entity/MyEntity.entity"
+ // to
+ // "org/my/foo/entity/MyEntity.dtos"
+ dtoResourcePath = NamingConventionsUtil
+ .toDtoPackage(entityURI.path().replace("/resource",
+ ""));
+ }
+
+ // now create a dtoResource
+
+ URI dtoModelURI = URI.createPlatformResourceURI(
+ dtoResourcePath, true);
+ context.dtoResource = (ISemanticLoadingResource) context.writeableResourceSet
+ .createResource(dtoModelURI);
+ context.dtoResource.getContents().add(
+ OSBPDtoFactory.eINSTANCE.createLDtoModel());
+ }
+ return context;
+ }
+
+ private IResource findDtoFile(URI entityURI) {
+ String dtoFileName = entityURI.path()
+ .substring(entityURI.path().lastIndexOf("/") + 1)
+ .replace(".entity", ".dto");
+
+ IResource[] temp = new IResource[1];
+ try {
+ getProject().accept(new IResourceVisitor() {
+ public boolean visit(IResource res) {
+ if (res instanceof IFile) {
+ if (res.getName().equals(dtoFileName)) {
+ temp[0] = res;
+ }
+ return true;
+ } else if (res instanceof IFolder) {
+ if (res.getName().equals("bin")
+ || res.getName().equals("target")) {
+ return false;
+ }
+ return true;
+ } else if (res instanceof IProject) {
+ return true;
+ }
+ return false;
+ }
+ });
+ } catch (CoreException e) {
+ LOGGER.warn("{}", e);
+ }
+
+ IResource member = temp[0];
+ return member;
+ }
+
+ /**
+ * Find dto type.
+ *
+ * @param lSourceArtefact
+ * the l source artefact
+ * @param dtos
+ * the dtos
+ * @return the l type
+ */
+ private LType findDtoType(LType lSourceArtefact, List<LType> dtos) {
+ for (LType lType : dtos) {
+ if (lType instanceof LDto) {
+ LDto lDto = (LDto) lType;
+ if (lDto.getWrappedType() == lSourceArtefact) {
+ return lDto;
+ }
+ } else if (lType instanceof LEnum) {
+ LEnum lEnum = (LEnum) lType;
+ if (lEnum.getName().equals(lSourceArtefact.getName())) {
+ return lEnum;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Adds the dto to the package maching the packageName.
+ *
+ * @param packageName
+ * the package name
+ * @param newDto
+ * the new dto
+ * @param lDtoModel
+ * the l dto model
+ * @param entityPackage
+ * the entity package
+ */
+ private void addDtoToPackage(String packageName, LType newDto,
+ LDtoModel lDtoModel, String entityPackage) {
+
+ Optional<LTypedPackage> optPkg = lDtoModel.getPackages().stream()
+ .filter(p -> p.getName().equals(packageName)).findFirst();
+ LTypedPackage pkg = null;
+ if (optPkg.isPresent()) {
+ pkg = optPkg.get();
+ }
+ if (pkg == null) {
+ pkg = OSBPTypesFactory.eINSTANCE.createLTypedPackage();
+ pkg.setName(packageName);
+ lDtoModel.getPackages().add(pkg);
+ }
+
+ // check if entityPackage is imported
+ if (!containsImport(pkg, entityPackage + ".*")) {
+ LImport lImport = OSBPTypesFactory.eINSTANCE.createLImport();
+ lImport.setImportedNamespace(entityPackage + ".*");
+ pkg.getImports().add(lImport);
+ }
+
+ pkg.getTypes().add(newDto);
+ }
+
+ /**
+ * Contains import.
+ *
+ * @param pkg
+ * the pkg
+ * @param entityPackageImport
+ * the entity package import
+ * @return true, if successful
+ */
+ private boolean containsImport(LTypedPackage pkg,
+ String entityPackageImport) {
+ for (LImport lImport : pkg.getImports()) {
+ if (lImport.getImportedNamespace().equals(entityPackageImport)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Removes all inherited features and adds them again.
+ *
+ * @param lDto
+ * the l dto
+ * @param dtos
+ * the dtos
+ */
+ private void fixFeatures(LDto lDto, List<LType> dtos) {
+ removeAllInheritedFeatures(lDto);
+ addInheritedFeaturesFromEntity(lDto, dtos);
+ }
+
+ /**
+ * Removes all literals and add them again.
+ *
+ * @param lDtoEnum
+ * the l dto enum
+ */
+ private void fixLiterals(LEnum lDtoEnum) {
+ lDtoEnum.getLiterals().clear();
+
+ LEnum entityEnum = (LEnum) SourceTypeStore.findSourceType(lDtoEnum);
+ for (LEnumLiteral literal : entityEnum.getLiterals()) {
+ lDtoEnum.getLiterals().add(EcoreUtil.copy(literal));
+ }
+ }
+
+ /**
+ * Adds all inherited features from the entity or bean.
+ *
+ * @param lDto
+ * the l dto
+ * @param dtos
+ * the dtos
+ */
+ private void addInheritedFeaturesFromEntity(LDto lDto, List<LType> dtos) {
+ if (lDto.getWrappedType() instanceof LEntity) {
+ LEntity currentEntity = (LEntity) lDto.getWrappedType();
+ // now add all features from the entity as inherited
+ // feature
+
+ // also add features from supertype, if dto does not
+ // extend any dto.
+ List<LEntityFeature> features = lDto.getSuperType() == null ? currentEntity
+ .getAllFeatures() : currentEntity.getFeatures();
+ for (LEntityFeature lEntityFeature : features) {
+ if (lEntityFeature instanceof LEntityAttribute) {
+ LDtoInheritedAttribute lNewAtt = OSBPDtoFactory.eINSTANCE
+ .createLDtoInheritedAttribute();
+ lNewAtt.setInheritedFeature((LAttribute) lEntityFeature);
+ LDtoFeature lAnnTarget = OSBPDtoFactory.eINSTANCE
+ .createLDtoFeature();
+ lNewAtt.setAnnotationInfo(lAnnTarget);
+ lDto.getFeatures().add(lNewAtt);
+ } else if (lEntityFeature instanceof LEntityReference) {
+ // Mapped dto
+ LDto mapToDto = getMapToDto(
+ (LEntityReference) lEntityFeature, dtos);
+ if (mapToDto == null) {
+ LOGGER.error("No Mapping-DTO could be found for "
+ + lEntityFeature.getEntity());
+ continue;
+ }
+
+ LDtoInheritedReference lNewRef = OSBPDtoFactory.eINSTANCE
+ .createLDtoInheritedReference();
+ lNewRef.setInheritedFeature((LReference) lEntityFeature);
+ LDtoFeature lAnnTarget = OSBPDtoFactory.eINSTANCE
+ .createLDtoFeature();
+ lNewRef.setAnnotationInfo(lAnnTarget);
+ lDto.getFeatures().add(lNewRef);
+ lNewRef.setType(mapToDto);
+ }
+ }
+ } else if (lDto.getWrappedType() instanceof LBean) {
+ LBean currentBean = (LBean) lDto.getWrappedType();
+ // now add all features from the entity as inherited
+ // feature
+
+ // also add features from supertype, if dto does not
+ // extend any dto.
+ List<LBeanFeature> features = lDto.getSuperType() == null ? currentBean
+ .getAllFeatures() : currentBean.getFeatures();
+ for (LBeanFeature lBeanFeature : features) {
+ if (lBeanFeature instanceof LBeanAttribute) {
+ LDtoInheritedAttribute lNewAtt = OSBPDtoFactory.eINSTANCE
+ .createLDtoInheritedAttribute();
+ lNewAtt.setInheritedFeature((LAttribute) lBeanFeature);
+ LDtoFeature lAnnTarget = OSBPDtoFactory.eINSTANCE
+ .createLDtoFeature();
+ lNewAtt.setAnnotationInfo(lAnnTarget);
+ lDto.getFeatures().add(lNewAtt);
+ } else if (lBeanFeature instanceof LEntityReference) {
+ LDto mapToDto = getMapToDto(
+ (LEntityReference) lBeanFeature, dtos);
+ if (mapToDto == null) {
+ LOGGER.error("No Mapping-DTO could be found for "
+ + lBeanFeature.getBean());
+ continue;
+ }
+
+ LDtoInheritedReference lNewRef = OSBPDtoFactory.eINSTANCE
+ .createLDtoInheritedReference();
+ lNewRef.setInheritedFeature((LReference) lBeanFeature);
+ LDtoFeature lAnnTarget = OSBPDtoFactory.eINSTANCE
+ .createLDtoFeature();
+ lNewRef.setAnnotationInfo(lAnnTarget);
+ lDto.getFeatures().add(lNewRef);
+ lNewRef.setType(mapToDto);
+ } else if (lBeanFeature instanceof LBeanReference) {
+ LDto mapToDto = getMapToDto(
+ (LBeanReference) lBeanFeature, dtos);
+ if (mapToDto == null) {
+ LOGGER.error("No Mapping-DTO could be found for "
+ + lBeanFeature.getBean());
+ continue;
+ }
+
+ LDtoInheritedReference lNewRef = OSBPDtoFactory.eINSTANCE
+ .createLDtoInheritedReference();
+ lNewRef.setInheritedFeature((LReference) lBeanFeature);
+ LDtoFeature lAnnTarget = OSBPDtoFactory.eINSTANCE
+ .createLDtoFeature();
+ lNewRef.setAnnotationInfo(lAnnTarget);
+ lDto.getFeatures().add(lNewRef);
+ lNewRef.setType(mapToDto);
+ }
+ }
+ }
+ }
+
+ /**
+ * Removes all inherited features.
+ *
+ * @param lDto
+ * the l dto
+ */
+ private void removeAllInheritedFeatures(LDto lDto) {
+ for (Iterator<LDtoFeature> iterator = lDto.getFeatures().iterator(); iterator
+ .hasNext();) {
+ LDtoFeature lFeature = iterator.next();
+ if ((lFeature instanceof LDtoInheritedAttribute)
+ || (lFeature instanceof LDtoInheritedReference)) {
+ iterator.remove();
+ }
+ }
+ }
+
+ /**
+ * Gets the project resource set.
+ *
+ * @param uri
+ * the uri
+ * @return the project resource set
+ */
+ private XtextResourceSet getProjectResourceSet(URI uri) {
+ IProject dtoProject = null;
+ Iterable<Pair<IStorage, IProject>> pairs = uriStorageMapper
+ .getStorages(uri);
+ if (pairs.iterator().hasNext()) {
+ dtoProject = pairs.iterator().next().getSecond();
+ }
+
+ if (dtoProject == null) {
+ LOGGER.error("No project could be found for " + uri);
+ return null;
+ }
+
+ XtextResourceSet resourceSet = (XtextResourceSet) rsProvider
+ .get(dtoProject);
+ return resourceSet;
+ }
+
+ /**
+ * Find entity ur is.
+ *
+ * @param lEntityModel
+ * the l entity model
+ * @return the sets the
+ */
+ private Set<URI> findEntityURIs(LEntityModel lEntityModel) {
+ Set<URI> entityURIs = new HashSet<URI>();
+ for (LTypedPackage lPkg : lEntityModel.getPackages()) {
+ for (LType lType : lPkg.getTypes()) {
+ if (lType instanceof LEntity || lType instanceof LBean) {
+ entityURIs.add(EcoreUtil.getURI(lType));
+ }
+ }
+ }
+ return entityURIs;
+ }
+
+ /**
+ * Collect entities.
+ *
+ * @param lEntityModel
+ * the l entity model
+ * @return the list
+ */
+ private List<LType> collectEntities(LEntityModel lEntityModel) {
+ List<LType> entities = new ArrayList<LType>();
+ for (LTypedPackage lPkg : lEntityModel.getPackages()) {
+ for (LType lType : lPkg.getTypes()) {
+ if (lType instanceof LEntity || lType instanceof LBean
+ || lType instanceof LEnum) {
+ entities.add(lType);
+ }
+ }
+ }
+ return entities;
+ }
+
+ /**
+ * Collect dtos.
+ *
+ * @param lDtoModel
+ * the l dto model
+ * @return the list
+ */
+ private List<LType> collectDtos(LDtoModel lDtoModel) {
+ List<LType> dtos = new ArrayList<LType>();
+ for (LTypedPackage lPkg : lDtoModel.getPackages()) {
+ for (LType lType : lPkg.getTypes()) {
+ if (lType instanceof LDto) {
+ LDto lDto = (LDto) lType;
+ if (lDto.getWrappedType() != null) {
+ dtos.add(lType);
+ }
+ } else if (lType instanceof LEnum) {
+ dtos.add(lType);
+ }
+ }
+ }
+ return dtos;
+ }
+
+ /**
+ * Find target dto references.
+ *
+ * @param entityURIs
+ * the entity ur is
+ * @param resourceSet
+ * the resource set
+ * @return the list
+ */
+ private List<IReferenceDescription> findTargetDtoReferences(
+ Set<URI> entityURIs, ResourceSet resourceSet) {
+ final List<IReferenceDescription> targetDtoReferences = new ArrayList<IReferenceDescription>();
+ referenceFinder.findAllReferences(entityURIs,
+ new LocalResourceAccess(resourceSet),
+ new IAcceptor<IReferenceDescription>() {
+ @Override
+ public void accept(IReferenceDescription t) {
+ if (t.getEReference() == OSBPDtoPackage.Literals.LDTO__WRAPPED_TYPE) {
+ targetDtoReferences.add(t);
+ }
+ }
+ }, null);
+ return targetDtoReferences;
+ }
+
+ // @SuppressWarnings("restriction")
+ // private List<IReferenceDescription> findTargetUiModelReferences(
+ // Set<URI> entityURIs) {
+ // final List<IReferenceDescription> targetUiModelReferences = new
+ // ArrayList<IReferenceDescription>();
+ // referenceFinder.findAllReferences(entityURIs, null,
+ // new IAcceptor<IReferenceDescription>() {
+ // @Override
+ // public void accept(IReferenceDescription t) {
+ // if (t.getEReference() ==
+ // UiModelPackage.Literals.UI_BEAN_SLOT__JVM_TYPE)
+ // {
+ // targetUiModelReferences.add(t);
+ // }
+ // }
+ // }, null);
+ // return targetUiModelReferences;
+ // }
+
+ /**
+ * Returns the mapped DTO or <code>null</code>.
+ *
+ * @param lEntityFeature
+ * the l entity feature
+ * @param dtos
+ * the dtos
+ * @return the map to dto
+ */
+ private LDto getMapToDto(LEntityReference lEntityFeature,
+ List<LType> dtos) {
+ LEntity entity = lEntityFeature.getType();
+ return (LDto) findDtoType(entity, dtos);
+ }
+
+ /**
+ * Returns the mapped DTO or <code>null</code>.
+ *
+ * @param lEntityFeature
+ * the l entity feature
+ * @param dtos
+ * the dtos
+ * @return the map to dto
+ */
+ // private LDto getMapToDto(LBeanReference lEntityFeature, List<LType>
+ // dtos) {
+ // LEntity entity = (LEntity) lEntityFeature.getType();
+ // return (LDto) findDtoType(entity, dtos);
+ // }
+ private LDto getMapToDto(LBeanReference lEntityFeature, List<LType> dtos) {
+ LType entity = (LType) lEntityFeature.getType();
+ return (LDto) findDtoType(entity, dtos);
+ }
+
+ /**
+ * Load semantic model.
+ *
+ * @param <A>
+ * the generic type
+ * @param modelURI
+ * the model uri
+ * @return the a
+ */
+ @SuppressWarnings("unchecked")
+ private <A extends EObject> A loadSemanticModel(URI modelURI) {
+ // LOGGER.info("loading:" + file.getName());
+ // org.eclipse.emf.common.util.URI modelURI =
+ // org.eclipse.emf.common.util.URI
+ // .createPlatformResourceURI(file.getFullPath().toString(),
+ // false);
+ XtextResourceSet rs = (XtextResourceSet) rsProvider
+ .get(getProject());
+ Resource resource = rs.getResource(modelURI, true);
+ try {
+ resource.load(null);
+ } catch (IOException e) {
+ e.printStackTrace();
+ return null;
+ }
+ A semanticModel = null;
+ if (resource instanceof ISemanticLoadingResource) {
+ semanticModel = (A) ((ISemanticLoadingResource) resource)
+ .getSemanticElement();
+ } else {
+ semanticModel = (A) resource.getContents().get(0);
+ }
+
+ // LOGGER.info("finished loading:" + modelURI.getName());
+ return semanticModel;
+ }
+ }
+
+ /**
+ * The Class ServiceEnhancer.
+ */
+ public class ServiceEnhancer {
+
+ /**
+ * The Class ServiceEnhancerContext.
+ */
+ private class ServiceEnhancerContext {
+
+ /** The service resource. */
+ private ISemanticLoadingResource serviceResource;
+
+ /** The writeable resource set. */
+ private ResourceSet writeableResourceSet;
+ }
+
+ /** The rs provider. */
+ @Inject
+ private XtextResourceSetProvider rsProvider;
+
+ /** The reference finder. */
+ @Inject
+ private IReferenceFinder referenceFinder;
+
+ /** The uri storage mapper. */
+ @Inject
+ private IStorage2UriMapper uriStorageMapper;
+
+ /**
+ * Instantiates a new service enhancer.
+ */
+ public ServiceEnhancer() {
+
+ }
+
+ /**
+ * This method touches UI and dialog models to ensure that the
+ * AutowireHelper is executed.
+ *
+ * @param tempLDtoModel
+ * the temp l dto model
+ */
+ public void buildUiAndDialogModels(LDtoModel tempLDtoModel) {
+
+ TimeLogger timeLogger = TimeLogger.start(getClass());
+
+ // find referencing dto model
+ Set<URI> dtoURIs = findDtoJvmTypeURIs(tempLDtoModel);
+ final Set<URI> uiModelURIs = findTargetUiAndDialogModelReferences(
+ dtoURIs, tempLDtoModel.eResource().getResourceSet());
+ if (uiModelURIs.isEmpty()) {
+ return;
+ }
+
+ Map<URI, XtextResourceSet> resourceSets = getProjectResourceSetMap(uiModelURIs);
+ for (URI uiModelURI : uiModelURIs) {
+ // create the proper dto resourceSet to save the dto
+ ResourceSet writeableResourceSet = resourceSets.get(uiModelURI);
+ if (writeableResourceSet == null) {
+ LOGGER.error(
+ "Can not save {} since resource set not available",
+ uiModelURI);
+ continue;
+ }
+
+ Resource uiModelResource = (Resource) writeableResourceSet
+ .getResource(uiModelURI, true);
+ // ensures that the inferrer is invoked
+ uiModelResource.getContents();
+ try {
+ Diagnostic diagnostic = Diagnostician.INSTANCE
+ .validate(uiModelResource.getContents().get(0));
+ int sev = diagnostic.getSeverity();
+ if (sev <= Diagnostic.WARNING) {
+ uiModelResource.save(SaveOptions.newBuilder().format()
+ .getOptions().toOptionsMap());
+ } else {
+ LOGGER.error(uiModelResource.getErrors().get(0)
+ .toString());
+ }
+ uiModelResource.unload();
+ } catch (IOException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+
+ timeLogger.stop(LOGGER,
+ "Finished OSBPServiceBuilder#buildUiModels in ");
+ }
+
+ /**
+ * Finds all target ui models that have a reference to one of the given
+ * dto JvmTypes.
+ *
+ * @param dtoJvmTypeURIs
+ * the dto jvm type ur is
+ * @param resourceSet
+ * the resource set
+ * @return the sets the
+ */
+ private Set<URI> findTargetUiAndDialogModelReferences(
+ Set<URI> dtoJvmTypeURIs, ResourceSet resourceSet) {
+ final Set<URI> targetUiModelReferences = new HashSet<>();
+ referenceFinder.findAllReferences(dtoJvmTypeURIs,
+ new LocalResourceAccess(resourceSet),
+ new IAcceptor<IReferenceDescription>() {
+ @Override
+ public void accept(IReferenceDescription t) {
+ if (t.getSourceEObjectUri().fileExtension()
+ .equals("ui")
+ || t.getSourceEObjectUri().fileExtension()
+ .equals("dialog")) {
+ targetUiModelReferences.add(t
+ .getContainerEObjectURI()
+ .trimFragment());
+ }
+ }
+ }, null);
+ return targetUiModelReferences;
+ }
+
+ /**
+ * Builds the services.
+ *
+ * @param tempLDtoModel
+ * the temp l dto model
+ */
+ public void buildServices(LDtoModel tempLDtoModel) {
+ IXtextUtilService service = CoreUiActivator.getDefault()
+ .getUtilService();
+ if (service == null) {
+ LOGGER.error("Skipping dto build since IXtextUtilService is not available!");
+ return;
+ }
+
+ TimeLogger timeLogger = TimeLogger.start(getClass());
+
+ //
+ // we need to prepare a serviceResource and a writeableResourceSet
+ //
+ // find referencing service model
+ Set<URI> dtoURIs = findDtoURIs(tempLDtoModel);
+ final List<IReferenceDescription> targetServiceReferences = findTargetServiceReferences(
+ dtoURIs, tempLDtoModel.eResource().getResourceSet());
+
+ // ------- create the build context -------
+ ServiceEnhancerContext context = createServiceBuildContext(
+ tempLDtoModel, targetServiceReferences);
+
+ ISemanticLoadingResource dtoResource = (ISemanticLoadingResource) context.writeableResourceSet
+ .getResource(tempLDtoModel.eResource().getURI(), true);
+
+ List<LType> sourceArtifacts = collectDtos((LDtoModel) dtoResource
+ .getSemanticElement());
+
+ List<LType> tempServices = collectServices((LServiceModel) context.serviceResource
+ .getSemanticElement());
+
+ List<LType> servicesToPersist = new ArrayList<LType>();
+
+ // create all services -> no linking
+ //
+ Set<LTypedPackage> touchedPackages = new HashSet<LTypedPackage>();
+ for (LType lType : sourceArtifacts) {
+ if (lType instanceof LDto) {
+ LDto lDto = (LDto) lType;
+ if (!(lDto.getWrappedType() instanceof LEntity)) {
+ continue;
+ }
+
+ LEntity lEntity = (LEntity) lDto.getWrappedType();
+ if (lEntity.isAbstract() || lEntity.isMappedSuperclass()) {
+ continue;
+ }
+
+ LDTOService lService = findService(lDto, tempServices);
+ if (lService == null) {
+ lService = OSBPServiceFactory.eINSTANCE
+ .createLDTOService();
+ lService.setAnnotationInfo(OSBPServiceFactory.eINSTANCE
+ .createLDTOService());
+ lService.setInjectedServices(OSBPServiceFactory.eINSTANCE
+ .createLInjectedServices());
+ tempServices.add(lService);
+ } else {
+ // remove from package for a while
+ LTypedPackage lPkg = (LTypedPackage) lService
+ .eContainer();
+ lPkg.getTypes().remove(lService);
+ // collect all touched packages -> They need cleanup
+ // later
+ touchedPackages.add(lPkg);
+ }
+ lService.setName(getServiceName(lDto));
+ lService.setDto(lDto);
+
+ servicesToPersist.add(lService);
+ }
+ }
+
+ // clean touched packages -> Also remove services that are not based
+ // on
+ // an dto anymore
+ for (LTypedPackage lPkg : touchedPackages) {
+ for (Iterator<LType> iterator = lPkg.getTypes().iterator(); iterator
+ .hasNext();) {
+ LType lType = (LType) iterator.next();
+ if (lType instanceof LDTOService) {
+ LDTOService lService = (LDTOService) lType;
+ if (lService.getDto() == null
+ || lService.getDto().eIsProxy()
+ || !(lService.getDto().getWrappedType() instanceof LEntity)) {
+ iterator.remove();
+ }
+ }
+ }
+ }
+
+ // remove all services having no wrapped type anymore
+ //
+ for (LType lType : new ArrayList<>(servicesToPersist)) {
+ LDTOService lService = (LDTOService) lType;
+ if (lService.getDto() == null || lService.getDto().eIsProxy()) {
+ servicesToPersist.remove(lService);
+ }
+ }
+
+ // fix features
+ //
+ for (LType lType : servicesToPersist) {
+ LDTOService lService = (LDTOService) lType;
+ LDto lDto = lService.getDto();
+ // can never be a bean!
+ if (lDto.getWrappedType() instanceof LEntity) {
+ LEntity lEntity = (LEntity) lDto.getWrappedType();
+ String pu = lEntity.getPersistenceUnit();
+ if (pu != null && !pu.equals("")) {
+ lService.setMutablePersistenceId(true);
+ lService.setPersistenceId(pu);
+ }
+ }
+ }
+
+ if (!servicesToPersist.isEmpty()) {
+ // add the services to the package in the proper order
+ //
+ Set<String> serviceNames = new HashSet<String>();
+ for (LType lType : servicesToPersist) {
+ LDTOService lService = (LDTOService) lType;
+
+ // filter dtos
+ if (serviceNames.contains(lService.getName())) {
+ // remove duplicate dtos
+ continue;
+ } else if (lService.getDto().eIsProxy()) {
+ // remove dto without a proper entity reference
+ continue;
+ }
+ serviceNames.add(lService.getName());
+
+ LTypedPackage lSourceTypePkg = (LTypedPackage) lService
+ .getDto().eContainer();
+ addServicesToPackage(getServicePackageName(lSourceTypePkg),
+ lService,
+ (LServiceModel) context.serviceResource
+ .getSemanticElement(),
+ lSourceTypePkg.getName());
+ }
+
+ try {
+ Diagnostic diagnostic = Diagnostician.INSTANCE
+ .validate(context.serviceResource
+ .getSemanticElement());
+ int sev = diagnostic.getSeverity();
+ if (sev <= Diagnostic.WARNING) {
+ context.serviceResource.save(SaveOptions.newBuilder()
+ .format().getOptions().toOptionsMap());
+ } else {
+ LOGGER.error(context.serviceResource.getErrors().get(0)
+ .toString());
+ }
+ context.serviceResource.unload();
+
+ // invoke the incremental build
+ //
+ needRebuild();
+ } catch (IOException e) {
+ LOGGER.error("{}", e);
+ }
+
+ timeLogger.stop(LOGGER,
+ "Finished OSBPServiceBuilder#buildServices in ");
+ }
+ }
+
+ /**
+ * Creates the service build context.
+ *
+ * @param tempLDtoModel
+ * the temp l dto model
+ * @param targetServiceReferences
+ * the target service references
+ * @return the service enhancer context
+ */
+ private ServiceEnhancerContext createServiceBuildContext(
+ LDtoModel tempLDtoModel,
+ final List<IReferenceDescription> targetServiceReferences) {
+ ServiceEnhancerContext context = new ServiceEnhancerContext();
+ if (!targetServiceReferences.isEmpty()) {
+ //
+ // if we could find referenced dtos, then we use this
+ // information to
+ // create dtoResource and writeableResourceSet
+ //
+
+ // access entity resource
+ ISemanticLoadingResource tempDtoResource = (ISemanticLoadingResource) tempLDtoModel
+ .eResource();
+ ResourceSet readonlyResourceSet = tempDtoResource
+ .getResourceSet();
+
+ // access dto resource based on entityResourceSet
+ IReferenceDescription firstDesc = targetServiceReferences
+ .get(0);
+ LService tempService = (LService) readonlyResourceSet
+ .getEObject(firstDesc.getSourceEObjectUri(), true);
+
+ // create the proper dto resourceSet to save the dto
+ context.writeableResourceSet = getProjectResourceSet(EcoreUtil
+ .getURI(tempService));
+
+ // load the dtoResource based on the dto resourceSet
+ context.serviceResource = (ISemanticLoadingResource) context.writeableResourceSet
+ .getResource(EcoreUtil.getURI(tempService)
+ .trimFragment(), true);
+ } else {
+ URI dtoURI = EcoreUtil.getURI(tempLDtoModel);
+ // create the proper dto resourceSet to save the dto
+ context.writeableResourceSet = getProjectResourceSet(dtoURI);
+
+ // try to find a file with extension .services in same project
+ IResource member = findServiceFile(dtoURI);
+ String serviceResourcePath = null;
+ if (member != null) {
+ serviceResourcePath = member.getFullPath().toString();
+ } else {
+ //
+ // if we could not find referenced dtos, then we use the
+ // folder
+ // of
+ // the entity and put the dtos in there
+ //
+ // now create a dtoResource
+
+ serviceResourcePath = org.eclipse.osbp.dsl.semantic.service.util.NamingConventionsUtil
+ .toServicePackage(dtoURI.path().replace(
+ "/resource", ""));
+ }
+
+ URI serviceModelURI = URI.createPlatformResourceURI(
+ serviceResourcePath, true);
+ context.serviceResource = (ISemanticLoadingResource) context.writeableResourceSet
+ .createResource(serviceModelURI);
+ context.serviceResource.getContents().add(
+ OSBPServiceFactory.eINSTANCE.createLServiceModel());
+ }
+ return context;
+ }
+
+ private IResource findServiceFile(URI entityURI) {
+ String dtoFileName = entityURI.path()
+ .substring(entityURI.path().lastIndexOf("/") + 1)
+ .replace(".dto", ".service");
+
+ IResource[] temp = new IResource[1];
+ try {
+ getProject().accept(new IResourceVisitor() {
+ public boolean visit(IResource res) {
+ if (res instanceof IFile) {
+ if (res.getName().equals(dtoFileName)) {
+ temp[0] = res;
+ }
+ return true;
+ } else if (res instanceof IFolder) {
+ if (res.getName().equals("bin")
+ || res.getName().equals("target")) {
+ return false;
+ }
+ return true;
+ } else if (res instanceof IProject) {
+ return true;
+ }
+ return false;
+ }
+ });
+ } catch (CoreException e) {
+ LOGGER.warn("{}", e);
+ }
+
+ IResource member = temp[0];
+ return member;
+ }
+
+ /**
+ * Find service.
+ *
+ * @param lDto
+ * the l dto
+ * @param services
+ * the services
+ * @return the LDTO service
+ */
+ private LDTOService findService(LType lDto, List<LType> services) {
+ for (LType lType : services) {
+ if (lType instanceof LDTOService) {
+ LDTOService lService = (LDTOService) lType;
+ if (lService.getDto() == lDto) {
+ return lService;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the service package name.
+ *
+ * @param lTypePkg
+ * the l type pkg
+ * @return the service package name
+ */
+ private String getServicePackageName(LTypedPackage lTypePkg) {
+ return lTypePkg.getName() + ".service";
+ }
+
+ /**
+ * Adds the service to the package maching the packageName.
+ *
+ * @param packageName
+ * the package name
+ * @param newService
+ * the new service
+ * @param lModel
+ * the l model
+ * @param dtoPackage
+ * the dto package
+ */
+ private void addServicesToPackage(String packageName,
+ LService newService, LServiceModel lModel, String dtoPackage) {
+
+ Optional<LTypedPackage> optPkg = lModel.getPackages().stream()
+ .filter(p -> p.getName().equals(packageName)).findFirst();
+ LTypedPackage pkg = null;
+ if (optPkg.isPresent()) {
+ pkg = optPkg.get();
+ }
+ if (pkg == null) {
+ pkg = OSBPTypesFactory.eINSTANCE.createLTypedPackage();
+ pkg.setName(packageName);
+ lModel.getPackages().add(pkg);
+ }
+
+ // check if entityPackage is imported
+ if (!containsImport(pkg, dtoPackage + ".*")) {
+ LImport lImport = OSBPTypesFactory.eINSTANCE.createLImport();
+ lImport.setImportedNamespace(dtoPackage + ".*");
+ pkg.getImports().add(lImport);
+ }
+
+ pkg.getTypes().add(newService);
+ }
+
+ /**
+ * Contains import.
+ *
+ * @param pkg
+ * the pkg
+ * @param entityPackageImport
+ * the entity package import
+ * @return true, if successful
+ */
+ private boolean containsImport(LTypedPackage pkg,
+ String entityPackageImport) {
+ for (LImport lImport : pkg.getImports()) {
+ if (lImport.getImportedNamespace().equals(entityPackageImport)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the service name.
+ *
+ * @param lType
+ * the l type
+ * @return the service name
+ */
+ private String getServiceName(LDto lType) {
+ return org.eclipse.osbp.dsl.semantic.service.util.NamingConventionsUtil
+ .toServiceName(lType);
+ }
+
+ /**
+ * Gets the project resource set.
+ *
+ * @param uri
+ * the uri
+ * @return the project resource set
+ */
+ private XtextResourceSet getProjectResourceSet(URI uri) {
+ IProject dtoProject = null;
+ Iterable<Pair<IStorage, IProject>> pairs = uriStorageMapper
+ .getStorages(uri);
+ if (pairs.iterator().hasNext()) {
+ dtoProject = pairs.iterator().next().getSecond();
+ }
+
+ if (dtoProject == null) {
+ LOGGER.error("No project could be found for " + uri);
+ return null;
+ }
+
+ XtextResourceSet resourceSet = (XtextResourceSet) rsProvider
+ .get(dtoProject);
+ return resourceSet;
+ }
+
+ /**
+ * Creates a map with a resource set for each uri. Ensures, that
+ * resource sets are reused by project to enhance performance.
+ *
+ * @param uris
+ * the uris
+ * @return the project resource set map
+ */
+ private Map<URI, XtextResourceSet> getProjectResourceSetMap(
+ Set<URI> uris) {
+ IProject project = null;
+ Map<IProject, XtextResourceSet> byProject = new HashMap<>();
+ Map<URI, XtextResourceSet> result = new HashMap<>();
+ for (URI uri : uris) {
+ Iterable<Pair<IStorage, IProject>> pairs = uriStorageMapper
+ .getStorages(uri);
+ if (pairs.iterator().hasNext()) {
+ project = pairs.iterator().next().getSecond();
+ }
+
+ if (project == null) {
+ LOGGER.error("No project could be found for " + uri);
+ continue;
+ }
+
+ if (byProject.containsKey(project)) {
+ // same projects use shared resource set
+ result.put(uri, byProject.get(project));
+ } else {
+ XtextResourceSet resourceSet = (XtextResourceSet) rsProvider
+ .get(project);
+ byProject.put(project, resourceSet);
+ result.put(uri, resourceSet);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Find dto ur is.
+ *
+ * @param lDtoModel
+ * the l dto model
+ * @return the sets the
+ */
+ private Set<URI> findDtoURIs(LDtoModel lDtoModel) {
+ Set<URI> dtoURIs = new HashSet<URI>();
+ for (LTypedPackage lPkg : lDtoModel.getPackages()) {
+ for (LType lType : lPkg.getTypes()) {
+ if (lType instanceof LDto) {
+ dtoURIs.add(EcoreUtil.getURI(lType));
+ }
+ }
+ }
+ return dtoURIs;
+ }
+
+ /**
+ * Iterates all dtos in the model and creates the URIs for their
+ * JvmTypes.
+ *
+ * @param lDtoModel
+ * the l dto model
+ * @return the sets the
+ */
+ private Set<URI> findDtoJvmTypeURIs(LDtoModel lDtoModel) {
+ Set<URI> dtoURIs = new HashSet<URI>();
+
+ IXtextUtilService service = CoreUiActivator.getDefault()
+ .getUtilService();
+ for (LTypedPackage lPkg : lDtoModel.getPackages()) {
+ for (LType lType : lPkg.getTypes()) {
+ if (lType instanceof LDto) {
+ for (IEObjectDescription desc : service
+ .getEObjectDescriptions(
+ TypesPackage.Literals.JVM_TYPE,
+ toFqn(lType))) {
+ dtoURIs.add(desc.getEObjectURI());
+ }
+ }
+ }
+ }
+ return dtoURIs;
+ }
+
+ /**
+ * Returns the fully qualified name for the given type.
+ *
+ * @param lType
+ * the l type
+ * @return the string
+ */
+ private String toFqn(LType lType) {
+ LTypedPackage pkg = (LTypedPackage) lType.eContainer();
+ return pkg.getName() + "." + lType.getName();
+ }
+
+ /**
+ * Collect dtos.
+ *
+ * @param lDtoModel
+ * the l dto model
+ * @return the list
+ */
+ private List<LType> collectDtos(LDtoModel lDtoModel) {
+ List<LType> dtos = new ArrayList<LType>();
+ for (LTypedPackage lPkg : lDtoModel.getPackages()) {
+ for (LType lType : lPkg.getTypes()) {
+ if (lType instanceof LDto) {
+ LDto lDto = (LDto) lType;
+ if (lDto.getWrappedType() != null) {
+ dtos.add(lType);
+ }
+ }
+ }
+ }
+ return dtos;
+ }
+
+ /**
+ * Collect services.
+ *
+ * @param lServiceModel
+ * the l service model
+ * @return the list
+ */
+ private List<LType> collectServices(LServiceModel lServiceModel) {
+ List<LType> services = new ArrayList<LType>();
+ for (LTypedPackage lPkg : lServiceModel.getPackages()) {
+ for (LType lType : lPkg.getTypes()) {
+ if (lType instanceof LService) {
+ services.add(lType);
+ }
+ }
+ }
+ return services;
+ }
+
+ /**
+ * Find target service references.
+ *
+ * @param dtoURIs
+ * the dto ur is
+ * @param resourceSet
+ * the resource set
+ * @return the list
+ */
+ private List<IReferenceDescription> findTargetServiceReferences(
+ Set<URI> dtoURIs, ResourceSet resourceSet) {
+ final List<IReferenceDescription> targetServiceReferences = new ArrayList<IReferenceDescription>();
+ referenceFinder.findAllReferences(dtoURIs, new LocalResourceAccess(
+ resourceSet), new IAcceptor<IReferenceDescription>() {
+ @Override
+ public void accept(IReferenceDescription t) {
+ if (t.getEReference() == OSBPServicePackage.Literals.LDTO_SERVICE__DTO) {
+ targetServiceReferences.add(t);
+ }
+ }
+ }, null);
+ return targetServiceReferences;
+ }
+
+ /**
+ * Load semantic model.
+ *
+ * @param <A>
+ * the generic type
+ * @param modelURI
+ * the model uri
+ * @return the a
+ */
+ @SuppressWarnings("unchecked")
+ private <A extends EObject> A loadSemanticModel(URI modelURI) {
+ XtextResourceSet rs = (XtextResourceSet) rsProvider
+ .get(getProject());
+ Resource resource = rs.getResource(modelURI, true);
+ try {
+ resource.load(null);
+ } catch (IOException e) {
+ e.printStackTrace();
+ return null;
+ }
+ A semanticModel = null;
+ if (resource instanceof ISemanticLoadingResource) {
+ semanticModel = (A) ((ISemanticLoadingResource) resource)
+ .getSemanticElement();
+ } else {
+ semanticModel = (A) resource.getContents().get(0);
+ }
+
+ LOGGER.info("finished loading:" + modelURI);
+ return semanticModel;
+ }
+
+ /**
+ * Clean.
+ *
+ * @param monitor
+ * the monitor
+ * @throws CoreException
+ * the core exception
+ */
+ protected void clean(IProgressMonitor monitor) throws CoreException {
+ }
+ }
+
+ /**
+ * The Class SourceTypeStore.
+ */
+ private static class SourceTypeStore extends AdapterImpl {
+
+ /** The source type. */
+ private final LType sourceType;
+
+ /** The adapted. */
+ private final LType adapted;
+
+ /**
+ * Instantiates a new source type store.
+ *
+ * @param sourceType
+ * the source type
+ * @param adapted
+ * the adapted
+ */
+ public SourceTypeStore(LType sourceType, LType adapted) {
+ super();
+ this.sourceType = sourceType;
+ this.adapted = adapted;
+
+ adapted.eAdapters().add(this);
+ }
+
+ /**
+ * Dispose.
+ */
+ public void dispose() {
+ adapted.eAdapters().remove(this);
+ }
+
+ /**
+ * Find source type.
+ *
+ * @param adapted
+ * the adapted
+ * @return the l type
+ */
+ public static LType findSourceType(LType adapted) {
+ for (Adapter adapter : adapted.eAdapters()) {
+ if (adapter instanceof SourceTypeStore) {
+ SourceTypeStore store = (SourceTypeStore) adapter;
+ return store.sourceType;
+ }
+ }
+ return null;
+ }
+
+ }
+
+ /**
+ * The Class LocalResourceAccess.
+ */
+ public static class LocalResourceAccess implements
+ IReferenceFinder.ILocalResourceAccess {
+
+ /** The resource set. */
+ private ResourceSet resourceSet;
+
+ /**
+ * Instantiates a new local resource access.
+ *
+ * @param resourceSet
+ * the resource set
+ */
+ public LocalResourceAccess(ResourceSet resourceSet) {
+ this.resourceSet = resourceSet;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.xtext.findReferences.IReferenceFinder.IResourceAccess
+ * #readOnly(org.eclipse.emf.common.util.URI,
+ * org.eclipse.xtext.util.concurrent.IUnitOfWork)
+ */
+ public <R> R readOnly(URI targetURI, IUnitOfWork<R, ResourceSet> work) {
+ try {
+ return work.exec(resourceSet);
+ } catch (OperationCanceledException e) {
+ throw e;
+ } catch (Exception exc) {
+ throw new WrappedException(exc);
+ }
+ }
+
+ }
+
+ private static class Pending {
+
+ // if empty, then pending was triggered for initial build
+ public final IResourceDescription desc;
+
+ public final URI uri;
+
+ public Pending(IResourceDescription desc) {
+ this.desc = desc;
+ this.uri = desc.getURI();
+ }
+
+ public Pending(URI uri) {
+ this.desc = null;
+ this.uri = uri;
+ }
+
+ }
+}
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/i18n/I18nRegistryView.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/i18n/I18nRegistryView.java
new file mode 100644
index 0000000..5f83c05
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/i18n/I18nRegistryView.java
@@ -0,0 +1,193 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.i18n;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.osbp.ide.core.api.i18n.CoreUtil;
+import org.eclipse.osbp.ide.core.api.i18n.II18nRegistry;
+import org.eclipse.osbp.ide.core.api.i18n.II18nRegistry.ProjectDescription;
+import org.eclipse.osbp.ide.core.api.i18n.II18nRegistry.ResourceDescription;
+import org.eclipse.osbp.ide.core.ui.CoreUiActivator;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventConstants;
+import org.osgi.service.event.EventHandler;
+
+import com.google.inject.Inject;
+
+public class I18nRegistryView extends ViewPart {
+
+ public static final String ID = "org.eclipse.osbp.ide.core.ui.i18nview";
+
+ @Inject
+ private II18nRegistry registry;
+
+ private Image projectImage = CoreUiActivator.imageDescriptorFromPlugin(
+ CoreUiActivator.PLUGIN_ID, "icons/Project.gif").createImage();
+ private Image resourceImage = CoreUiActivator.imageDescriptorFromPlugin(
+ CoreUiActivator.PLUGIN_ID, "icons/Resource.gif").createImage();
+ private Image propertyImage = CoreUiActivator.imageDescriptorFromPlugin(
+ CoreUiActivator.PLUGIN_ID, "icons/Property.gif").createImage();
+
+ private TreeViewer treeViewer;
+
+ private ServiceRegistration<EventHandler> registration;
+
+ @Override
+ public void createPartControl(Composite parent) {
+
+ treeViewer = new TreeViewer(parent);
+ treeViewer.setContentProvider(new ContentProvider());
+ treeViewer.setLabelProvider(new LabelProvider() {
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof II18nRegistry.ProjectDescription) {
+ return projectImage;
+ } else if (element instanceof II18nRegistry.ResourceDescription) {
+ return resourceImage;
+ } else if (element instanceof Entry) {
+ return propertyImage;
+ }
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof II18nRegistry.ProjectDescription) {
+ II18nRegistry.ProjectDescription desc = (ProjectDescription) element;
+ return desc.getProject().getName();
+ } else if (element instanceof II18nRegistry.ResourceDescription) {
+
+ II18nRegistry.ResourceDescription desc = (II18nRegistry.ResourceDescription) element;
+
+ String languageTag = desc.getLocale().toLanguageTag();
+ if (desc.getLocale().toString().equals("")) {
+ languageTag = "empty";
+ }
+ return String.format("%s: %s", languageTag, desc.getPath()
+ .makeRelative().toString());
+ } else if (element instanceof Entry) {
+ @SuppressWarnings("unchecked")
+ Entry<String, String> entry = (Entry<String, String>) element;
+ return String.format("%s = %s", entry.getKey(),
+ entry.getValue());
+ }
+ return "";
+ }
+ });
+
+ treeViewer.setInput(registry);
+
+ registerEventAdmin();
+
+ }
+
+ /**
+ * Registers for notification about the build.
+ */
+ private void registerEventAdmin() {
+ EventHandler handler = new EventHandler() {
+ @Override
+ public void handleEvent(Event event) {
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ treeViewer.refresh();
+ }
+ });
+ }
+ };
+ Map<String, String> props = new HashMap<String, String>();
+ props.put(EventConstants.EVENT_TOPIC, CoreUtil.EVENT_TOPIC__BUILDER);
+ registration = CoreUiActivator.getDefault().registerEventHandler(
+ handler, props);
+ }
+
+ @Override
+ public void setFocus() {
+
+ }
+
+ @Override
+ public void dispose() {
+ projectImage.dispose();
+ resourceImage.dispose();
+ propertyImage.dispose();
+
+ registration.unregister();
+
+ super.dispose();
+ }
+
+ private class ContentProvider implements ITreeContentProvider {
+
+ @Override
+ public void dispose() {
+
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ Set<ProjectDescription> temp = registry.getProjectDescriptions();
+ return temp.toArray();
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof ProjectDescription) {
+ Set<ResourceDescription> descs = ((ProjectDescription) parentElement)
+ .getResourceDescriptions();
+ return descs.toArray();
+ } else if (parentElement instanceof ResourceDescription) {
+ Properties props = ((ResourceDescription) parentElement)
+ .getProperties();
+ return props.entrySet().toArray();
+ }
+ return null;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof ProjectDescription) {
+ Set<ResourceDescription> descs = ((ProjectDescription) element)
+ .getResourceDescriptions();
+ return !descs.isEmpty();
+ } else if (element instanceof ResourceDescription) {
+ Properties props = ((ResourceDescription) element)
+ .getProperties();
+ return !props.isEmpty();
+ }
+ return false;
+ }
+ }
+}
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/nature/OSBPNature.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/nature/OSBPNature.java
new file mode 100644
index 0000000..944f01f
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/nature/OSBPNature.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.nature;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osbp.ide.core.api.i18n.CoreUtil;
+import org.eclipse.osbp.ide.core.ui.builder.OSBPI18nBuilder;
+import org.eclipse.osbp.ide.core.ui.builder.OSBPModelEnhancingBuilder;
+
+public class OSBPNature implements IProjectNature {
+
+ public static String NATURE_ID = CoreUtil.NATURE_ID;
+
+ private IProject project;
+
+ public void configure() throws CoreException {
+ IProjectDescription desc = project.getDescription();
+ ICommand[] commands = desc.getBuildSpec();
+
+ List<ICommand> temp = new ArrayList<ICommand>(Arrays.asList(commands));
+ if (!contains(temp, OSBPModelEnhancingBuilder.BUILDER_ID)) {
+ ICommand command = desc.newCommand();
+ command.setBuilderName(OSBPModelEnhancingBuilder.BUILDER_ID);
+ temp.add(command);
+ }
+
+ if (!contains(temp, OSBPI18nBuilder.BUILDER_ID)) {
+ ICommand command = desc.newCommand();
+ command.setBuilderName(OSBPI18nBuilder.BUILDER_ID);
+ temp.add(command);
+ }
+
+ temp.sort(new Comparator<ICommand>() {
+ @Override
+ public int compare(ICommand o1, ICommand o2) {
+ return getIndex(o1.getBuilderName())
+ - getIndex(o2.getBuilderName());
+ }
+
+ private int getIndex(String bsn) {
+ if (bsn.equals("org.eclipse.xtext.ui.shared.xtextBuilder")) {
+ return 0;
+ } else if (bsn.startsWith("org.eclipse.osbp")) {
+ return 1;
+ } else if (bsn.equals("org.eclipse.jdt.core.javabuilder")) {
+ return 2;
+ }
+ return 3;
+ }
+
+ });
+
+ desc.setBuildSpec(temp.toArray(new ICommand[temp.size()]));
+ project.setDescription(desc, null);
+ }
+
+ private boolean contains(List<ICommand> temp, String builderId) {
+ for (ICommand cmd : temp) {
+ if (cmd.getBuilderName().equals(builderId)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private void remove(List<ICommand> temp, String builderId) {
+ for (Iterator<ICommand> iterator = temp.iterator(); iterator.hasNext();) {
+ ICommand iCommand = iterator.next();
+ if (iCommand.getBuilderName().equals(builderId)) {
+ iterator.remove();
+ return;
+ }
+ }
+ }
+
+ public void deconfigure() throws CoreException {
+ IProjectDescription description = getProject().getDescription();
+ ICommand[] commands = description.getBuildSpec();
+ List<ICommand> temp = new ArrayList<ICommand>(Arrays.asList(commands));
+
+ remove(temp, OSBPModelEnhancingBuilder.BUILDER_ID);
+ remove(temp, OSBPI18nBuilder.BUILDER_ID);
+
+ description.setBuildSpec(temp.toArray(new ICommand[temp.size()]));
+ project.setDescription(description, null);
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public void setProject(IProject project) {
+ this.project = project;
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/nature/ToggleOSBPNatureAction.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/nature/ToggleOSBPNatureAction.java
new file mode 100644
index 0000000..2b06035
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/nature/ToggleOSBPNatureAction.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.nature;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.osbp.ide.core.api.i18n.CoreUtil;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Sven Efftinge - Initial contribution and API
+ */
+public class ToggleOSBPNatureAction implements IObjectActionDelegate {
+
+ private static final org.slf4j.Logger log = LoggerFactory
+ .getLogger(ToggleOSBPNatureAction.class);
+
+ private ISelection selection;
+
+ public void run(IAction action) {
+ if (selection instanceof IStructuredSelection) {
+ for (Iterator<?> it = ((IStructuredSelection) selection).iterator(); it
+ .hasNext();) {
+ Object element = it.next();
+ IProject project = null;
+ if (element instanceof IProject) {
+ project = (IProject) element;
+ } else if (element instanceof IAdaptable) {
+ project = (IProject) ((IAdaptable) element)
+ .getAdapter(IProject.class);
+ }
+ if (project != null) {
+ toggleNature(project);
+ }
+ }
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void toggleNature(IProject project) {
+ try {
+ IProjectDescription description = project.getDescription();
+ String[] natures = description.getNatureIds();
+
+ for (int i = 0; i < natures.length; ++i) {
+ if (OSBPNature.NATURE_ID.equals(natures[i])) {
+ // Remove the nature
+ String[] newNatures = new String[natures.length - 1];
+ System.arraycopy(natures, 0, newNatures, 0, i);
+ System.arraycopy(natures, i + 1, newNatures, i,
+ natures.length - i - 1);
+ description.setNatureIds(newNatures);
+ project.setDescription(description, null);
+ return;
+ }
+ }
+
+ // Add the nature
+ String[] newNatures = new String[natures.length + 1];
+ System.arraycopy(natures, 0, newNatures, 0, natures.length);
+ newNatures[natures.length] = OSBPNature.NATURE_ID;
+ description.setNatureIds(newNatures);
+ project.setDescription(description, null);
+ } catch (CoreException e) {
+ log.error("{}", e);
+ }
+ }
+
+ public boolean hasNature(IProject project) {
+ return CoreUtil.hasNature(project);
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/perspective/OSBPPerspectiveFactory.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/perspective/OSBPPerspectiveFactory.java
new file mode 100644
index 0000000..65a0866
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/perspective/OSBPPerspectiveFactory.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.core.ui.perspective;
+
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.search.ui.NewSearchUI;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.osbp.ide.core.ui.i18n.I18nRegistryView;
+
+public class OSBPPerspectiveFactory implements IPerspectiveFactory {
+
+ public void createInitialLayout(IPageLayout layout) {
+ String editorArea = layout.getEditorArea();
+
+ IFolderLayout folder = layout.createFolder(
+ "left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
+ folder.addView(JavaUI.ID_PACKAGES);
+ folder.addView("org.eclipse.sirius.ui.tools.views.model.explorer");
+ folder.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
+ folder.addPlaceholder(JavaPlugin.ID_RES_NAV);
+ folder.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
+
+ IFolderLayout outputfolder = layout.createFolder(
+ "bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
+ outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
+ outputfolder.addView(JavaUI.ID_JAVADOC_VIEW);
+ outputfolder.addView(JavaUI.ID_SOURCE_VIEW);
+ outputfolder.addView("org.eclipse.osbp.ecview.ide.preview.vaadin.ide");
+ outputfolder.addView("org.eclipse.osbp.ecview.ide.preview.vaadin.mobile");
+ outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
+ outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
+ outputfolder.addPlaceholder(I18nRegistryView.ID);
+ outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
+ outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
+
+ IFolderLayout outlineFolder = layout.createFolder(
+ "right", IPageLayout.RIGHT, (float) 0.75, editorArea); //$NON-NLS-1$
+ outlineFolder.addView(IPageLayout.ID_OUTLINE);
+
+ layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
+ layout.addActionSet(JavaUI.ID_ACTION_SET);
+ layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
+ layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
+
+ // views - java
+ layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
+ layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY);
+ layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW);
+ layout.addShowViewShortcut(JavaUI.ID_JAVADOC_VIEW);
+
+ // views - search
+ layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
+
+ // views - debugging
+ layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
+
+ // views - standard workbench
+ layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
+ layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
+ layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV);
+ layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
+ layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
+ layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
+ layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
+
+ // new actions - Java project creation wizard
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
+
+ // 'Window' > 'Open Perspective' contributions
+ layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE);
+ layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
+
+ }
+}
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/util/CoreUiUtil.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/util/CoreUiUtil.java
new file mode 100644
index 0000000..9431e4a
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/util/CoreUiUtil.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.ui.util;
+
+import java.util.Locale;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.xtext.common.types.access.jdt.IJavaProjectProvider;
+
+import com.google.inject.Inject;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Util class that offers convenient methods.
+ */
+public class CoreUiUtil {
+
+ /** The project provider. */
+ @Inject
+ private IJavaProjectProvider projectProvider;
+
+ /**
+ * Returns the project where the xtextModel is located in.
+ *
+ * @param xtextElement
+ * the xtext element
+ * @return the project
+ */
+ public IProject getProject(EObject xtextElement) {
+ IJavaProject javaProject = getJavaProject(xtextElement);
+ if (javaProject == null) {
+ return null;
+ }
+ return javaProject.getProject();
+ }
+
+ /**
+ * Returns the javaProject where the xtextModel is located in.
+ *
+ * @param xtextElement
+ * the xtext element
+ * @return the java project
+ */
+ public IJavaProject getJavaProject(EObject xtextElement) {
+ return projectProvider.getJavaProject(xtextElement.eResource()
+ .getResourceSet());
+ }
+
+ /**
+ * Returns the current locale. For now {@link Locale#getDefault()} is used.
+ * Later maybe a value from preferences is returned.
+ *
+ * @return the locale
+ */
+ public Locale getLocale() {
+ return Locale.getDefault();
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/view/ECViewModelBindingView.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/view/ECViewModelBindingView.java
new file mode 100644
index 0000000..9b507a3
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/view/ECViewModelBindingView.java
@@ -0,0 +1,340 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.core.ui.view;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.xtext.builder.builderState.IBuilderState;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.ui.editor.XtextEditor;
+import org.eclipse.xtext.ui.editor.model.IXtextDocument;
+import org.eclipse.xtext.ui.editor.model.IXtextModelListener;
+import org.eclipse.xtext.util.concurrent.IUnitOfWork;
+import org.eclipse.osbp.ecview.core.common.model.binding.YBeanValueBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.binding.YBinding;
+import org.eclipse.osbp.ecview.core.common.model.binding.YBindingSet;
+import org.eclipse.osbp.ecview.core.common.model.binding.YDetailValueBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.binding.YECViewModelListBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.binding.YECViewModelValueBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.binding.YEnumListBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.binding.YVisibilityProcessorValueBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YActivatedEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YBeanSlotListBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YBeanSlotValueBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YContextValueBindingEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YElement;
+import org.eclipse.osbp.ecview.core.common.model.core.YEmbeddableCollectionEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YEmbeddableMultiSelectionEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YEmbeddableSelectionEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YEmbeddableValueEndpoint;
+import org.eclipse.osbp.ecview.core.common.model.core.YView;
+
+import com.google.inject.Inject;
+
+@SuppressWarnings("restriction")
+public class ECViewModelBindingView extends ViewPart implements IPartListener,
+ IXtextModelListener {
+
+ public static final String ID = "org.eclipse.osbp.ide.core.ui.view.xtextindex";
+
+ @Inject
+ private IBuilderState builderState;
+
+ // private Image indexImage = CoreUiActivator.imageDescriptorFromPlugin(
+ // CoreUiActivator.PLUGIN_ID, "icons/Index-Resource.gif")
+ // .createImage();
+ // private Image exportedContainerImage = CoreUiActivator
+ // .imageDescriptorFromPlugin(CoreUiActivator.PLUGIN_ID,
+ // "icons/Index-ExportedContainer.gif").createImage();
+ // private Image importedNameContainerImage = CoreUiActivator
+ // .imageDescriptorFromPlugin(CoreUiActivator.PLUGIN_ID,
+ // "icons/Index-ImportedNameContainer.gif").createImage();
+ // private Image referenceContainerImage = CoreUiActivator
+ // .imageDescriptorFromPlugin(CoreUiActivator.PLUGIN_ID,
+ // "icons/Index-ReferenceContainer.gif").createImage();
+ // private Image referenceImage = CoreUiActivator.imageDescriptorFromPlugin(
+ // CoreUiActivator.PLUGIN_ID, "icons/Index-ReferenceDescription.gif")
+ // .createImage();
+
+ private TreeViewer treeViewer;
+
+ private IXtextDocument lastActiveDocument;
+
+ private YBindingSet yBindingSet;
+
+ public ECViewModelBindingView() {
+
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+
+ treeViewer = new TreeViewer(parent);
+ treeViewer.setContentProvider(new ContentProvider());
+ treeViewer.setLabelProvider(new LabelProvider() {
+ @Override
+ public Image getImage(Object element) {
+ // if (element instanceof IResourceDescription) {
+ // return indexImage;
+ // } else if (element instanceof ExportedObjects) {
+ // return exportedContainerImage;
+ // } else if (element instanceof ImportedNames) {
+ // return importedNameContainerImage;
+ // } else if (element instanceof ReferenceDescriptions) {
+ // return referenceContainerImage;
+ // } else if (element instanceof IReferenceDescription) {
+ // return referenceImage;
+ // }
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element) {
+ try {
+ if (element instanceof String) {
+ return (String) element;
+ } else if (element instanceof YBinding) {
+ return element.getClass().getSimpleName();
+ } else if (element instanceof YActivatedEndpoint) {
+ YActivatedEndpoint ep = (YActivatedEndpoint) element;
+ return "ActivatedEndpoint: "
+ + ep.getElement().getClass().getSimpleName();
+ } else if (element instanceof YBeanSlotValueBindingEndpoint) {
+ YBeanSlotValueBindingEndpoint ep = (YBeanSlotValueBindingEndpoint) element;
+ return "YBeanSlotValueBindingEndpoint: "
+ + ep.getBeanSlot().getName() + ":"
+ + ep.getAttributePath();
+ } else if (element instanceof YBeanValueBindingEndpoint) {
+ YBeanValueBindingEndpoint ep = (YBeanValueBindingEndpoint) element;
+ return "YBeanValueBindingEndpoint: "
+ + ep.getPropertyPath();
+ } else if (element instanceof YContextValueBindingEndpoint) {
+ YContextValueBindingEndpoint ep = (YContextValueBindingEndpoint) element;
+ return "YContextValueBindingEndpoint: "
+ + ep.getUrlString();
+ } else if (element instanceof YContextValueBindingEndpoint) {
+ YDetailValueBindingEndpoint ep = (YDetailValueBindingEndpoint) element;
+ return "YDetailValueBindingEndpoint: ("
+ + getText(ep.getMasterObservable()) + ")."
+ + ep.getPropertyPath();
+ } else if (element instanceof YECViewModelValueBindingEndpoint) {
+ YECViewModelValueBindingEndpoint ep = (YECViewModelValueBindingEndpoint) element;
+ return "YECViewModelValueBindingEndpoint: "
+ + ep.getElement().getClass().getSimpleName()
+ + ":" + getId(ep.getElement()) + "."
+ + ep.getPropertyPath();
+ } else if (element instanceof YEmbeddableSelectionEndpoint) {
+ YEmbeddableSelectionEndpoint ep = (YEmbeddableSelectionEndpoint) element;
+ return "YEmbeddableSelectionEndpoint: "
+ + ep.getElement().getClass().getSimpleName()
+ + ":" + getId(ep.getElement()) + "."
+ + ep.getAttributePath();
+ } else if (element instanceof YEmbeddableValueEndpoint) {
+ YEmbeddableValueEndpoint ep = (YEmbeddableValueEndpoint) element;
+ return "YEmbeddableValueEndpoint: "
+ + ep.getElement().getClass().getSimpleName()
+ + ":" + getId(ep.getElement()) + ".value";
+ } else if (element instanceof YVisibilityProcessorValueBindingEndpoint) {
+ YVisibilityProcessorValueBindingEndpoint ep = (YVisibilityProcessorValueBindingEndpoint) element;
+ return "YVisibilityProcessorValueBindingEndpoint: "
+ + ep.getProcessorInstance().getClass()
+ .getSimpleName() + ":"
+ + ep.getProperty();
+ } else if (element instanceof YBeanSlotListBindingEndpoint) {
+ YBeanSlotListBindingEndpoint ep = (YBeanSlotListBindingEndpoint) element;
+ return "YBeanSlotListBindingEndpoint: "
+ + ep.getBeanSlot().getName() + ":"
+ + ep.getAttributePath();
+ } else if (element instanceof YECViewModelListBindingEndpoint) {
+ YECViewModelListBindingEndpoint ep = (YECViewModelListBindingEndpoint) element;
+ return "YECViewModelListBindingEndpoint: "
+ + ep.getElement().getClass().getSimpleName()
+ + ":" + getId(ep.getElement()) + "."
+ + ep.getPropertyPath();
+ } else if (element instanceof YEmbeddableCollectionEndpoint) {
+ YEmbeddableCollectionEndpoint ep = (YEmbeddableCollectionEndpoint) element;
+ return "YEmbeddableCollectionEndpoint: "
+ + ep.getElement().getClass().getSimpleName()
+ + ":" + getId(ep.getElement());
+ } else if (element instanceof YEmbeddableMultiSelectionEndpoint) {
+ YEmbeddableMultiSelectionEndpoint ep = (YEmbeddableMultiSelectionEndpoint) element;
+ return "YEmbeddableMultiSelectionEndpoint: "
+ + ep.getElement().getClass().getSimpleName()
+ + ":" + getId(ep.getElement());
+ } else if (element instanceof YEnumListBindingEndpoint) {
+ YEnumListBindingEndpoint ep = (YEnumListBindingEndpoint) element;
+ return "YEnumListBindingEndpoint: "
+ + ep.getEnum().getClass().getSimpleName();
+ }
+ } catch (Exception e) {
+ return "exception in this line.";
+ }
+ return "";
+ }
+
+ private String getId(EObject element) {
+ if (element instanceof YElement) {
+ return ((YElement) element).getId();
+ }
+ return "noId";
+ }
+ });
+
+ start(getViewSite());
+ }
+
+ @Override
+ public void setFocus() {
+
+ }
+
+ @Override
+ public void dispose() {
+
+ stop(getViewSite());
+
+ // exportedContainerImage.dispose();
+ // importedNameContainerImage.dispose();
+ // referenceContainerImage.dispose();
+ // referenceImage.dispose();
+ // indexImage.dispose();
+
+ super.dispose();
+ }
+
+ public void start(IWorkbenchPartSite site) {
+ updateView(site.getPage().getActiveEditor());
+ site.getWorkbenchWindow().getPartService().addPartListener(this);
+ }
+
+ public void stop(IWorkbenchPartSite site) {
+ site.getWorkbenchWindow().getPartService().removePartListener(this);
+ lastActiveDocument = null;
+ }
+
+ public void partActivated(IWorkbenchPart part) {
+ updateView(part);
+ }
+
+ private void updateView(IWorkbenchPart part) {
+ if (part instanceof XtextEditor) {
+ XtextEditor xtextEditor = (XtextEditor) part;
+ IXtextDocument xtextDocument = xtextEditor.getDocument();
+ if (xtextDocument != lastActiveDocument) {
+ if (lastActiveDocument != null) {
+ lastActiveDocument.removeModelListener(this);
+ }
+
+ lastActiveDocument = xtextDocument;
+ lastActiveDocument.addModelListener(this);
+ lastActiveDocument
+ .readOnly(new IUnitOfWork<Boolean, XtextResource>() {
+ @Override
+ public Boolean exec(XtextResource state)
+ throws Exception {
+ modelChanged(state);
+ return true;
+ }
+ });
+ }
+ }
+ }
+
+ public void partBroughtToTop(IWorkbenchPart part) {
+ }
+
+ public void partClosed(IWorkbenchPart part) {
+ }
+
+ public void partDeactivated(IWorkbenchPart part) {
+ }
+
+ public void partOpened(IWorkbenchPart part) {
+ }
+
+ public void modelChanged(final XtextResource resource) {
+ if (resource == null) {
+ return;
+ }
+ getSite().getWorkbenchWindow().getShell().getDisplay()
+ .asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (treeViewer != null && resource != null) {
+ if (resource.getURI().fileExtension()
+ .equals("uimodel")) {
+ YView yView = (YView) resource.getContents()
+ .get(1);
+ treeViewer.setInput(yView.getBindingSet());
+ }
+ }
+ }
+ });
+
+ }
+
+ private class ContentProvider implements ITreeContentProvider {
+
+ @Override
+ public void dispose() {
+
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ YBindingSet yBindingSet = (YBindingSet) inputElement;
+ return yBindingSet != null ? yBindingSet.getBindings().toArray()
+ : new Object[0];
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof YBinding) {
+ YBinding yBinding = (YBinding) parentElement;
+ List<Object> objects = new ArrayList<Object>();
+ objects.add(yBinding.getModelEndpoint());
+ objects.add(yBinding.getTargetEndpoint());
+ return objects.toArray();
+ }
+ return null;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof YBinding) {
+ return true;
+ }
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/view/XtextIndexView.java b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/view/XtextIndexView.java
new file mode 100644
index 0000000..2eaad7e
--- /dev/null
+++ b/org.eclipse.osbp.ide.core.ui/src/org/eclipse/osbp/ide/core/ui/view/XtextIndexView.java
@@ -0,0 +1,405 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.core.ui.view;
+
+import java.io.IOException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.SignatureException;
+import java.security.cert.CertificateException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.signedcontent.SignedContent;
+import org.eclipse.osgi.signedcontent.SignedContentEntry;
+import org.eclipse.osgi.signedcontent.SignedContentFactory;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.xtext.builder.builderState.IBuilderState;
+import org.eclipse.xtext.naming.QualifiedName;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.resource.IReferenceDescription;
+import org.eclipse.xtext.resource.IResourceDescription;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.ui.editor.XtextEditor;
+import org.eclipse.xtext.ui.editor.model.IXtextDocument;
+import org.eclipse.xtext.ui.editor.model.IXtextModelListener;
+import org.eclipse.xtext.util.concurrent.IUnitOfWork;
+import org.eclipse.xtext.xbase.lib.Functions;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+import org.eclipse.osbp.ide.core.ui.CoreUiActivator;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+
+import com.google.inject.Inject;
+
+@SuppressWarnings("restriction")
+public class XtextIndexView extends ViewPart implements IPartListener,
+ IXtextModelListener {
+
+ public static final String ID = "org.eclipse.osbp.ide.core.ui.view.xtextindex";
+
+ @Inject
+ private IBuilderState builderState;
+
+// private Image indexImage = CoreUiActivator.imageDescriptorFromPlugin(
+// CoreUiActivator.PLUGIN_ID, "icons/Index-Resource.gif")
+// .createImage();
+// private Image exportedContainerImage = CoreUiActivator
+// .imageDescriptorFromPlugin(CoreUiActivator.PLUGIN_ID,
+// "icons/Index-ExportedContainer.gif").createImage();
+// private Image importedNameContainerImage = CoreUiActivator
+// .imageDescriptorFromPlugin(CoreUiActivator.PLUGIN_ID,
+// "icons/Index-ImportedNameContainer.gif").createImage();
+// private Image referenceContainerImage = CoreUiActivator
+// .imageDescriptorFromPlugin(CoreUiActivator.PLUGIN_ID,
+// "icons/Index-ReferenceContainer.gif").createImage();
+// private Image referenceImage = CoreUiActivator.imageDescriptorFromPlugin(
+// CoreUiActivator.PLUGIN_ID, "icons/Index-ReferenceDescription.gif")
+// .createImage();
+
+ private TreeViewer treeViewer;
+
+ private IXtextDocument lastActiveDocument;
+
+ public XtextIndexView() {
+
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+
+ Bundle b = FrameworkUtil.getBundle(getClass());
+ ServiceReference<SignedContentFactory> ref = (ServiceReference<SignedContentFactory>) b.getBundleContext().getServiceReference(SignedContentFactory.class.getName());
+ SignedContentFactory service = b.getBundleContext().getService(ref);
+
+ for(Bundle t : b.getBundleContext().getBundles()){
+ if(t.getSymbolicName().equals("org.eclipse.equinox.preferences")){
+ SignedContent sc;
+ try {
+ sc = service.getSignedContent(t);
+ SignedContentEntry[] sce = sc.getSignedEntries();
+
+ for (SignedContentEntry signedContentEntry : sce) {
+ System.out.println(signedContentEntry);
+ }
+
+ sc.checkValidity(sc.getSignerInfos()[sc.getSignerInfos().length - 1]);
+
+ if(sce.length > 17) {
+ System.out.println("Test");
+ }
+
+ } catch (InvalidKeyException | SignatureException
+ | CertificateException | NoSuchAlgorithmException
+ | NoSuchProviderException | IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+
+
+
+ treeViewer = new TreeViewer(parent);
+ treeViewer.setContentProvider(new ContentProvider());
+ treeViewer.setLabelProvider(new LabelProvider() {
+ @Override
+ public Image getImage(Object element) {
+// if (element instanceof IResourceDescription) {
+// return indexImage;
+// } else if (element instanceof ExportedObjects) {
+// return exportedContainerImage;
+// } else if (element instanceof ImportedNames) {
+// return importedNameContainerImage;
+// } else if (element instanceof ReferenceDescriptions) {
+// return referenceContainerImage;
+// } else if (element instanceof IReferenceDescription) {
+// return referenceImage;
+// }
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof String) {
+ return (String) element;
+ } else if (element instanceof IResourceDescription) {
+ return ((IResourceDescription) element).getURI().toString();
+ } else if (element instanceof ExportedObjects) {
+ return "exported Objects";
+ } else if (element instanceof ImportedNames) {
+ return "imported Names";
+ } else if (element instanceof ReferenceDescriptions) {
+ return "reference Descriptions";
+ } else if (element instanceof IReferenceDescription) {
+ IReferenceDescription desc = (IReferenceDescription) element;
+ return desc.getEReference().getName() + "--"
+ + (desc.getContainerEObjectURI() != null ? desc.getContainerEObjectURI().toString() : "null");
+ } else if (element instanceof Entry) {
+ Entry entry = (Entry) element;
+ return entry.key + ": " + entry.value;
+ } else if (element instanceof IEObjectDescription) {
+ IEObjectDescription desc = (IEObjectDescription) element;
+ StringBuilder b = new StringBuilder();
+ b.append(" - ");
+ b.append(desc.getEClass().getName());
+ b.append("(");
+ b.append(desc.getName());
+ b.append(") --> ");
+ b.append(desc.getEObjectURI());
+ return b.toString();
+ } else if (element instanceof URI) {
+ return element.toString();
+ }
+ return "";
+ }
+ });
+
+ start(getViewSite());
+ }
+
+ @Override
+ public void setFocus() {
+
+ }
+
+ @Override
+ public void dispose() {
+
+ stop(getViewSite());
+
+// exportedContainerImage.dispose();
+// importedNameContainerImage.dispose();
+// referenceContainerImage.dispose();
+// referenceImage.dispose();
+// indexImage.dispose();
+
+ super.dispose();
+ }
+
+ public void start(IWorkbenchPartSite site) {
+ updateView(site.getPage().getActiveEditor());
+ site.getWorkbenchWindow().getPartService().addPartListener(this);
+ }
+
+ public void stop(IWorkbenchPartSite site) {
+ site.getWorkbenchWindow().getPartService().removePartListener(this);
+ lastActiveDocument = null;
+ }
+
+ public void partActivated(IWorkbenchPart part) {
+ updateView(part);
+ }
+
+ private void updateView(IWorkbenchPart part) {
+ if (part instanceof XtextEditor) {
+ XtextEditor xtextEditor = (XtextEditor) part;
+ IXtextDocument xtextDocument = xtextEditor.getDocument();
+ if (xtextDocument != lastActiveDocument) {
+ if (lastActiveDocument != null) {
+ lastActiveDocument.removeModelListener(this);
+ }
+
+ lastActiveDocument = xtextDocument;
+ lastActiveDocument.addModelListener(this);
+ lastActiveDocument
+ .readOnly(new IUnitOfWork<Boolean, XtextResource>() {
+ @Override
+ public Boolean exec(XtextResource state)
+ throws Exception {
+ modelChanged(state);
+ return true;
+ }
+ });
+ }
+ }
+ }
+
+ public void partBroughtToTop(IWorkbenchPart part) {
+ }
+
+ public void partClosed(IWorkbenchPart part) {
+ }
+
+ public void partDeactivated(IWorkbenchPart part) {
+ }
+
+ public void partOpened(IWorkbenchPart part) {
+ }
+
+ public void modelChanged(final XtextResource resource) {
+ if (resource == null) {
+ return;
+ }
+ getSite().getWorkbenchWindow().getShell().getDisplay()
+ .asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (treeViewer != null && resource != null) {
+ treeViewer.setInput(resource);
+ }
+ }
+ });
+
+ }
+
+ private class ContentProvider implements ITreeContentProvider {
+
+ @Override
+ public void dispose() {
+
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ Resource resource = (Resource) inputElement;
+ IResourceDescription desc = builderState
+ .getResourceDescription(resource.getURI());
+ return desc != null ? new Object[] { desc } : new Object[0];
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof IResourceDescription) {
+ IResourceDescription desc = (IResourceDescription) parentElement;
+ List<Object> objects = new ArrayList<Object>();
+ objects.add(new ExportedObjects(desc.getExportedObjects()));
+ objects.add(new ImportedNames(desc.getImportedNames()));
+ objects.add(new ReferenceDescriptions(desc
+ .getReferenceDescriptions()));
+ return objects.toArray();
+ } else if (parentElement instanceof ExportedObjects) {
+ ExportedObjects exportedObjects = (ExportedObjects) parentElement;
+ return exportedObjects.exported.toArray();
+ } else if (parentElement instanceof ImportedNames) {
+ ImportedNames names = (ImportedNames) parentElement;
+ return names.importedNames.toArray();
+ } else if (parentElement instanceof ReferenceDescriptions) {
+ ReferenceDescriptions resDescs = (ReferenceDescriptions) parentElement;
+ return resDescs.refDescs.toArray();
+ } else if (parentElement instanceof IReferenceDescription) {
+ IReferenceDescription desc = (IReferenceDescription) parentElement;
+ List<Object> elements = new ArrayList<Object>();
+ elements.add(new Entry(" - eReference", desc.getEReference()
+ .getName()));
+ elements.add(new Entry(" - index", Integer.toString(desc
+ .getIndexInList())));
+ elements.add(new Entry(" - container", desc
+ .getContainerEObjectURI() != null ? desc
+ .getContainerEObjectURI().toString() : "null"));
+ elements.add(new Entry(" - source", desc.getSourceEObjectUri()
+ .toString()));
+ elements.add(new Entry(" - target", desc.getTargetEObjectUri()
+ .toString()));
+ return elements.toArray();
+ } else if (parentElement instanceof IEObjectDescription) {
+ IEObjectDescription desc = (IEObjectDescription) parentElement;
+ List<String> userData = new ArrayList<String>();
+ for (String key : desc.getUserDataKeys()) {
+ String data = key + " : " + desc.getUserData(key);
+ userData.add(data);
+ }
+ return userData.toArray();
+ }
+ return null;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof IResourceDescription) {
+ return true;
+ } else if (element instanceof ExportedObjects) {
+ ExportedObjects exportedObjects = (ExportedObjects) element;
+ return !exportedObjects.exported.isEmpty();
+ } else if (element instanceof ImportedNames) {
+ ImportedNames names = (ImportedNames) element;
+ return !names.importedNames.isEmpty();
+ } else if (element instanceof ReferenceDescriptions) {
+ ReferenceDescriptions resDescs = (ReferenceDescriptions) element;
+ return !resDescs.refDescs.isEmpty();
+ } else if (element instanceof IReferenceDescription) {
+ return true;
+ } else if (element instanceof IEObjectDescription) {
+ return ((IEObjectDescription) element).getUserDataKeys().length > 0;
+ }
+ return false;
+ }
+ }
+
+ private static class ExportedObjects {
+
+ private List<IEObjectDescription> exported;
+
+ public ExportedObjects(Iterable<IEObjectDescription> exportedObjects) {
+ exported = IterableExtensions.toList(exportedObjects);
+ }
+
+ }
+
+ private static class ImportedNames {
+ private List<String> importedNames;
+
+ public ImportedNames(Iterable<QualifiedName> importedNames) {
+ Iterable<String> mapped = IterableExtensions
+ .<QualifiedName, String> map(importedNames,
+ new Functions.Function1<QualifiedName, String>() {
+ @Override
+ public String apply(QualifiedName input) {
+ return " - " + input.toString();
+ }
+ });
+ this.importedNames = IterableExtensions.toList(mapped);
+ }
+ }
+
+ private static class ReferenceDescriptions {
+
+ private List<IReferenceDescription> refDescs;
+
+ public ReferenceDescriptions(
+ Iterable<IReferenceDescription> referenceDescriptions) {
+ refDescs = IterableExtensions.toList(referenceDescriptions);
+ }
+ }
+
+ private static class Entry {
+ private String key;
+ private String value;
+
+ public Entry(String key, String value) {
+ this.key = key;
+ this.value = value;
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core/.project b/org.eclipse.osbp.ide.core/.project
new file mode 100644
index 0000000..8e4d267
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/.project
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.babel.editor.rbeNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.core/LICENSE.txt b/org.eclipse.osbp.ide.core/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core/META-INF/MANIFEST.MF b/org.eclipse.osbp.ide.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..2b3a2c8
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.ide.core
+Bundle-SymbolicName: org.eclipse.osbp.ide.core;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.osbp.ide.core.Activator
+Bundle-Vendor: Eclipse OSBP
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Import-Package: org.osgi.framework;version="1.3.0",
+ org.slf4j;version="1.7.2"
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.core.resources;bundle-version="3.9.0",
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.eclipse.osbp.ide.core.api;bundle-version="[0.9.0,0.10.0)",
+ com.google.inject;bundle-version="3.0.0"
+Export-Package: org.eclipse.osbp.ide.core;
+ uses:="org.osgi.framework";version="0.9.0",
+ org.eclipse.osbp.ide.core.i18n;
+ uses:="org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.osbp.ide.core.api.i18n";version="0.9.0"
diff --git a/org.eclipse.osbp.ide.core/about.html b/org.eclipse.osbp.ide.core/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core/about.ini b/org.eclipse.osbp.ide.core/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/about.ini
@@ -0,0 +1,17 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+welcomePage=
diff --git a/org.eclipse.osbp.ide.core/about.mappings b/org.eclipse.osbp.ide.core/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=qualifier
diff --git a/org.eclipse.osbp.ide.core/about.properties b/org.eclipse.osbp.ide.core/about.properties
new file mode 100644
index 0000000..944c31f
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/about.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=org.eclipse.osbp.ide.core
+
+################ blurb property ####################################
+featureText=\
+Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Loetz GmbH&Co.KG - implementation\n
+################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.ide.core/build.properties b/org.eclipse.osbp.ide.core/build.properties
new file mode 100644
index 0000000..aca39e9
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ plugin.xml,\
+ LICENSE.txt,\
+ license.html
+output.. = target/classes/
+src.includes = about.properties, about.mappings, about.ini, about.html, LICENSE.txt,\
+ license.html
diff --git a/org.eclipse.osbp.ide.core/license.html b/org.eclipse.osbp.ide.core/license.html
new file mode 100644
index 0000000..c33d45c
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/license.html
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.core/p2targets.properties b/org.eclipse.osbp.ide.core/p2targets.properties
new file mode 100644
index 0000000..402977f
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/p2targets.properties
@@ -0,0 +1,2 @@
+osbp.p2.runtimeServerURL=http://lun.osbp.org/downloads/p2/osbp/luna/latest/
+osbp.p2.runtimeServerURL.feature=org.eclipse.osbp.runtime.feature.allinone.testframework
diff --git a/org.eclipse.osbp.ide.core/plugin.xml b/org.eclipse.osbp.ide.core/plugin.xml
new file mode 100644
index 0000000..8e95e4d
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/plugin.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+</plugin>
diff --git a/org.eclipse.osbp.ide.core/pom.xml b/org.eclipse.osbp.ide.core/pom.xml
new file mode 100644
index 0000000..61211de
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.ide.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/org.eclipse.osbp.ide.core/src/org/eclipse/osbp/ide/core/Activator.java b/org.eclipse.osbp.ide.core/src/org/eclipse/osbp/ide/core/Activator.java
new file mode 100644
index 0000000..cb9b9fa
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/src/org/eclipse/osbp/ide/core/Activator.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.core/src/org/eclipse/osbp/ide/core/i18n/I18nRegistry.java b/org.eclipse.osbp.ide.core/src/org/eclipse/osbp/ide/core/i18n/I18nRegistry.java
new file mode 100644
index 0000000..c5ef6ec
--- /dev/null
+++ b/org.eclipse.osbp.ide.core/src/org/eclipse/osbp/ide/core/i18n/I18nRegistry.java
@@ -0,0 +1,498 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+package org.eclipse.osbp.ide.core.i18n;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.osbp.ide.core.api.i18n.CoreUtil;
+import org.eclipse.osbp.ide.core.api.i18n.II18nRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.Singleton;
+
+@Singleton
+public class I18nRegistry implements II18nRegistry {
+
+ private static final ProjectDescription EMPY_PROJECT_DESCRIPTION = new ProjectDescription(
+ null);
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(I18nRegistry.class);
+
+ private Map<IProject, ProjectDescription> cache = Collections
+ .synchronizedMap(new HashMap<IProject, ProjectDescription>());
+
+ public I18nRegistry() {
+
+ }
+
+ @Override
+ public String getText(IProject project, Locale locale, String key) {
+ String result = findTranslation(project, locale, key, locale);
+ return result;
+ }
+
+ @Override
+ public List<Proposal> findContentProposals(IProject project, Locale locale,
+ String packageName, String searchValue) {
+ AccessPath accessPath = computeAccessPath(project, locale, packageName,
+ searchValue);
+ return accessPath.getContentProposals();
+ }
+
+ @Override
+ public List<Proposal> findStrictKeyMatchingProposals(IProject project,
+ Locale locale, String packageName, String key) {
+ AccessPath accessPath = computeBestMatchAccessPath(project, locale,
+ packageName, key);
+ return accessPath.getStrictKeyMatchingProposals();
+ }
+
+ @Override
+ public Proposal findBestMatch(IProject project, Locale locale,
+ String packageName, String key) {
+ AccessPath accessPath = computeBestMatchAccessPath(project, locale,
+ packageName, key);
+ return accessPath.getBestMatch();
+ }
+
+ /**
+ * Computes the access path.
+ * <p>
+ * Following order will be used:
+ * <ol>
+ * <li>Find all entries in current project
+ * <ul>
+ * <li>Use given project and locale</li>
+ * <li>Create more specific locale and repeat until default locale is
+ * reached.</li>
+ * </ul>
+ * </li>
+ * <li>Iterate the referenced projects and start at 1) for each project with
+ * the requested locale.</li>
+ * </ol>
+ *
+ * @param project
+ * @param locale
+ * @param packageName
+ * @param searchValue
+ * @return
+ */
+ private AccessPath computeAccessPath(IProject project, Locale locale,
+ String packageName, String searchValue) {
+
+ String matchingPackage = null;
+ String valuePatternString = null;
+ // search in given package
+ if (searchValue.startsWith(".")) {
+ valuePatternString = searchValue.replaceFirst(".", "");
+ matchingPackage = packageName;
+ } else {
+ valuePatternString = searchValue;
+ }
+
+ Matcher valueMatcher = null;
+ if (valuePatternString != null && !valuePatternString.equals("")) {
+ valuePatternString = Pattern.quote(valuePatternString);
+ Pattern valuePattern = Pattern.compile(valuePatternString
+ .toString());
+ valueMatcher = valuePattern.matcher("");
+ valueMatcher.reset();
+ }
+
+ AccessPath path = new AccessPath();
+ int prio = 0;
+
+ // all locales for the given project
+ List<IProject> computedProjects = computeProjects(project);
+ List<Locale> computedLocales = computeLocales(locale);
+
+ for (IProject computedProject : computedProjects) {
+ for (Locale computedLocale : computedLocales) {
+ Accessor accessor = new Accessor(computedProject,
+ computedLocale, ++prio, searchValue, matchingPackage,
+ valueMatcher);
+ path.addAccessor(accessor);
+ }
+ }
+
+ return path;
+ }
+
+ /**
+ * Computes the access path to find the best matching element. See
+ * {@link #computeAccessPath(IProject, Locale, String, String)}.
+ *
+ * @param project
+ * @param locale
+ * @param packageName
+ * @param searchValue
+ * @return
+ */
+ private AccessPath computeBestMatchAccessPath(IProject project,
+ Locale locale, String packageName, String searchValue) {
+ return computeAccessPath(project, locale, packageName, searchValue);
+ }
+
+ /**
+ * Computes all projects that should be added to AccessPath
+ *
+ * @param project
+ * @return
+ */
+ private List<IProject> computeProjects(IProject project) {
+ List<IProject> projects = new LinkedList<IProject>();
+ // Add first root project
+ projects.add(project);
+
+ try {
+ for (IProject referenced : project.getReferencedProjects()) {
+ if (CoreUtil.hasNature(referenced)) {
+ projects.add(referenced);
+ }
+ }
+ } catch (CoreException e) {
+ LOGGER.error("{}", e);
+ }
+
+ return projects;
+ }
+
+ /**
+ * Computes all locales that should be added to AccessPath
+ *
+ * @param locale
+ * @return
+ */
+ private List<Locale> computeLocales(Locale locale) {
+ List<Locale> locales = new LinkedList<Locale>();
+
+ // Add first locale
+ locales.add(locale);
+
+ Locale temp = locale;
+ while (true) {
+ String tag = temp.toLanguageTag();
+ String[] segments = tag.split("-");
+ if (segments.length > 1) {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < segments.length - 1; i++) {
+ if (builder.length() != 0) {
+ builder.append("-");
+ }
+ builder.append(segments[i]);
+ }
+ Locale moreGeneral = Locale.forLanguageTag(builder.toString());
+ locales.add(moreGeneral);
+ temp = moreGeneral;
+ } else {
+ break;
+ }
+ }
+
+ locales.add(new Locale(""));
+
+ return locales;
+ }
+
+ /**
+ * Tries to find the translation key.
+ * <p>
+ * <ol>
+ * <li>Tries to find the translation in all resources in the given project.</li>
+ * <li>Creates a more general locale and continues 1</li>
+ * <li>If locale is most general, then all references projects are used to
+ * look for a translation. Continues 1</li>
+ * <ol>
+ *
+ * @param project
+ * @param locale
+ * @param key
+ * @param originalLocale
+ * @return
+ */
+ private String findTranslation(IProject project, Locale locale, String key,
+ Locale originalLocale) {
+ String result = null;
+ // first try to find a translation with the given locale in the project
+ //
+ ProjectDescription projectDescription = getProjectDescription(project);
+ List<ResourceDescription> descs = projectDescription
+ .getResourceDescriptions(locale);
+
+ for (ResourceDescription desc : descs) {
+ result = desc.getProperties().getProperty(key);
+ if (isValid(result)) {
+ return result;
+ }
+ }
+
+ // if no translation available, then try to use a more general one
+ //
+ String tag = locale.toLanguageTag();
+ String[] segments = tag.split("-");
+ if (segments.length > 1) {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < segments.length - 1; i++) {
+ if (builder.length() != 0) {
+ builder.append("-");
+ }
+ builder.append(segments[i]);
+ }
+
+ Locale moreGeneral = Locale.forLanguageTag(builder.toString());
+ result = findTranslation(project, moreGeneral, key, originalLocale);
+ if (isValid(result)) {
+ return result;
+ }
+ } else {
+ try {
+ for (IProject referenced : project.getReferencedProjects()) {
+ if (referenced.getDescription().hasNature(
+ CoreUtil.NATURE_ID)) {
+ result = getText(referenced, originalLocale, key);
+ if (isValid(result)) {
+ return result;
+ }
+ }
+ }
+ } catch (CoreException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ return result;
+ }
+
+ private boolean isValid(String result) {
+ return result != null && !result.equals("");
+ }
+
+ private ProjectDescription getProjectDescription(IProject project) {
+ ProjectDescription description = cache.get(project);
+ return description != null ? description : EMPY_PROJECT_DESCRIPTION;
+ }
+
+ @Override
+ public void cache(ProjectDescription description) {
+ cache.put(description.getProject(), description);
+ }
+
+ @Override
+ public void cache(ResourceDescription description) {
+ if (cache.containsKey(description.getProject())) {
+ ProjectDescription projectDesc = cache
+ .get(description.getProject());
+ if (projectDesc != null) {
+ projectDesc.putResource(description);
+ }
+ } else {
+ ProjectDescription projectDesc = new ProjectDescription(
+ description.getProject());
+ projectDesc.putResource(description);
+ cache(projectDesc);
+ }
+ }
+
+ @Override
+ public void removeResource(IProject project, Locale locale, IPath location) {
+ ProjectDescription def = getProjectDescription(project);
+ def.removeResource(locale, location);
+ }
+
+ @Override
+ public Set<ProjectDescription> getProjectDescriptions() {
+ Set<ProjectDescription> result = new HashSet<II18nRegistry.ProjectDescription>(
+ cache.values());
+ return Collections.unmodifiableSet(result);
+ }
+
+ @Override
+ public void removeProject(IProject project) {
+ cache.remove(project);
+ }
+
+ /**
+ * Defines how the registry should be searched. For instance the ordering of
+ * locales, the ordering of projects,...
+ *
+ * @author admin
+ *
+ */
+ private static class AccessPath {
+ private List<Accessor> accessors = new LinkedList<I18nRegistry.Accessor>();
+
+ public AccessPath() {
+ }
+
+ public void addAccessor(Accessor accessor) {
+ accessors.add(accessor);
+ }
+
+ /**
+ * Returns a list of proposals. If the searchValue matches parts of the
+ * value or the key for an i18n record, it is added to the list of
+ * proposals.
+ *
+ * @return
+ */
+ public List<Proposal> getContentProposals() {
+ List<Proposal> proposals = new LinkedList<II18nRegistry.Proposal>();
+ for (Accessor accessor : accessors) {
+ proposals.addAll(accessor.getProposals());
+ }
+
+ return proposals;
+ }
+
+ /**
+ * Returns a list of proposals. The searchValue matches the entire key
+ * for an i18n record.
+ *
+ * @return
+ */
+ public List<Proposal> getStrictKeyMatchingProposals() {
+ List<Proposal> proposals = new LinkedList<II18nRegistry.Proposal>();
+ for (Accessor accessor : accessors) {
+ proposals.addAll(accessor.getStrictKeyProposals());
+ }
+
+ return proposals;
+ }
+
+ /**
+ * Best match returns the first found translation. "Best" is ensured by
+ * the accessor order. If no proposal was found then <code>null</code>
+ * is returned.
+ *
+ * @return
+ */
+ public Proposal getBestMatch() {
+ for (Accessor accessor : accessors) {
+ List<Proposal> result = accessor.getStrictKeyProposals();
+ if (!result.isEmpty()) {
+ return result.get(0);
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * This class will access the registry.
+ */
+ private class Accessor {
+
+ private final IProject project;
+ private final Locale locale;
+ private final Matcher matcher;
+ @SuppressWarnings("unused")
+ private final String searchValue;
+ private final String keyPackage;
+ private final int prio;
+
+ public Accessor(IProject project, Locale locale, int prio,
+ String searchValue, String keyPackage, Matcher matcher) {
+ super();
+ this.project = project;
+ this.locale = locale;
+ this.searchValue = searchValue;
+ this.keyPackage = keyPackage;
+ this.matcher = matcher;
+ this.prio = prio;
+ }
+
+ /**
+ * Returns all proposals for the defined values. A result is added to
+ * the list of proposals, if parts of the key match the pattern. Must
+ * never return <code>null</code>.
+ *
+ * @return
+ */
+ public List<Proposal> getProposals() {
+ ProjectDescription projectDesc = getProjectDescription(project);
+ if (projectDesc == I18nRegistry.EMPY_PROJECT_DESCRIPTION) {
+ return Collections.emptyList();
+ }
+
+ List<Proposal> proposals = new LinkedList<II18nRegistry.Proposal>();
+ List<ResourceDescription> descs = projectDesc
+ .getResourceDescriptions(locale);
+ for (ResourceDescription desc : descs) {
+ for (Map.Entry<Object, Object> entry : desc.getProperties()
+ .entrySet()) {
+ if (keyPackage != null
+ && !((String) entry.getKey())
+ .startsWith(keyPackage)) {
+ continue;
+ }
+
+ if (matcher == null
+ || matcher.reset(((String) entry.getValue()))
+ .find()
+ || matcher.reset(((String) entry.getKey())).find()) {
+ proposals.add(new Proposal((String) entry.getKey(),
+ (String) entry.getValue(), desc, prio));
+ }
+ }
+ }
+ return proposals;
+ }
+
+ /**
+ * Returns all proposals for the defined values. The matcher must match
+ * the given key. Must never return <code>null</code>.
+ *
+ * @return
+ */
+ public List<Proposal> getStrictKeyProposals() {
+ ProjectDescription projectDesc = getProjectDescription(project);
+ if (projectDesc == I18nRegistry.EMPY_PROJECT_DESCRIPTION) {
+ return Collections.emptyList();
+ }
+
+ List<Proposal> proposals = new LinkedList<II18nRegistry.Proposal>();
+ List<ResourceDescription> descs = projectDesc
+ .getResourceDescriptions(locale);
+ for (ResourceDescription desc : descs) {
+ for (Map.Entry<Object, Object> entry : desc.getProperties()
+ .entrySet()) {
+ if (keyPackage != null
+ && !((String) entry.getKey())
+ .startsWith(keyPackage)) {
+ continue;
+ }
+
+ if (matcher == null
+ || matcher.reset(((String) entry.getKey()))
+ .matches()) {
+ proposals.add(new Proposal((String) entry.getKey(),
+ (String) entry.getValue(), desc, prio));
+ }
+ }
+ }
+ return proposals;
+ }
+ }
+}
diff --git a/org.eclipse.osbp.ide.feature.headless/.project b/org.eclipse.osbp.ide.feature.headless/.project
new file mode 100644
index 0000000..d14e178
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.feature.headless</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.feature.headless/LICENSE.txt b/org.eclipse.osbp.ide.feature.headless/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.headless/build.properties b/org.eclipse.osbp.ide.feature.headless/build.properties
new file mode 100644
index 0000000..bfb7f6b
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ LICENSE.txt,\
+ license.html
+src.includes = LICENSE.txt,\
+ license.html
diff --git a/org.eclipse.osbp.ide.feature.headless/epl-v10.html b/org.eclipse.osbp.ide.feature.headless/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/epl-v10.html
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor'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.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" 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.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">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.</p>
+
+<p class="list">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.</p>
+
+<p class="list">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's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">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.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">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;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">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.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>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.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>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
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+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.</p>
+
+<p>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'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.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" 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.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>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.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>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.</p>
+
+<p>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's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient'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's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>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.</p>
+
+<p>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.</p>
+
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.headless/feature.properties b/org.eclipse.osbp.ide.feature.headless/feature.properties
new file mode 100644
index 0000000..6a130a2
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/feature.properties
@@ -0,0 +1,169 @@
+###############################################################################
+# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany).
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Cristiano Gavião - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName =Headless Feature for OSBP IDE
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse OSBP
+
+# "description" property - description of the feature
+description=Installs all features required for OSBP into the IDE
+
+# "updateSiteName" property - label for the update site
+updateSiteName=
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/org.eclipse.osbp.ide.feature.headless/feature.xml b/org.eclipse.osbp.ide.feature.headless/feature.xml
new file mode 100644
index 0000000..3972901
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/feature.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<feature
+ id="org.eclipse.osbp.ide.feature.headless"
+ label="%featureName"
+ version="0.9.0.qualifier"
+ provider-name="%providerName">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.osbp.ide.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.ide.core.api"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/org.eclipse.osbp.ide.feature.headless/license.html b/org.eclipse.osbp.ide.feature.headless/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.headless/pom.xml b/org.eclipse.osbp.ide.feature.headless/pom.xml
new file mode 100644
index 0000000..3562a33
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.ide.feature.headless</artifactId>
+ <packaging>eclipse-feature</packaging>
+
+ <dependencies>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <labelSuffix> (source)</labelSuffix>
+ <excludes>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="org.apache.commons.cli"/>
+ <plugin id="com.google.guava"/>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- workaround while bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=398250
+ is not fixed -->
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.osbp.ide.feature.headless/src/main/javadoc/README.txt b/org.eclipse.osbp.ide.feature.headless/src/main/javadoc/README.txt
new file mode 100644
index 0000000..831da7e
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/src/main/javadoc/README.txt
@@ -0,0 +1 @@
+Resource folder for javadoc resources.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.headless/src/overview.html b/org.eclipse.osbp.ide.feature.headless/src/overview.html
new file mode 100644
index 0000000..78a1c6d
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.headless/src/overview.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>OSBP runtime web vaadin components feature Overview</title>
+</head>
+<body>
+<p>The <b>OSBP feature</b> contains all features required for OSBP into the IDE</p>
+
+<p> </p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.ide.feature.tools/.project b/org.eclipse.osbp.ide.feature.tools/.project
new file mode 100644
index 0000000..f3ba45e
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.feature.tools</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.feature.tools/LICENSE.txt b/org.eclipse.osbp.ide.feature.tools/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.tools/build.properties b/org.eclipse.osbp.ide.feature.tools/build.properties
new file mode 100644
index 0000000..bfb7f6b
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ LICENSE.txt,\
+ license.html
+src.includes = LICENSE.txt,\
+ license.html
diff --git a/org.eclipse.osbp.ide.feature.tools/epl-v10.html b/org.eclipse.osbp.ide.feature.tools/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/epl-v10.html
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor'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.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" 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.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">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.</p>
+
+<p class="list">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.</p>
+
+<p class="list">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's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">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.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">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;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">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.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>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.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>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
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+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.</p>
+
+<p>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'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.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" 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.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>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.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>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.</p>
+
+<p>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's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient'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's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>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.</p>
+
+<p>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.</p>
+
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.tools/feature.properties b/org.eclipse.osbp.ide.feature.tools/feature.properties
new file mode 100644
index 0000000..1467c24
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/feature.properties
@@ -0,0 +1,169 @@
+###############################################################################
+# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany).
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Cristiano Gavião - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName =Developer Tools Feature for OSBP IDE
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse OSBP
+
+# "description" property - description of the feature
+description=Installs developer tools for OSBP into the IDE
+
+# "updateSiteName" property - label for the update site
+updateSiteName=
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/org.eclipse.osbp.ide.feature.tools/feature.xml b/org.eclipse.osbp.ide.feature.tools/feature.xml
new file mode 100644
index 0000000..8bc43a3
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/feature.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<feature
+ id="org.eclipse.osbp.ide.feature.tools"
+ label="%featureName"
+ version="0.9.0.qualifier"
+ provider-name="%providerName">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.osbp.ide.tools.developer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/org.eclipse.osbp.ide.feature.tools/license.html b/org.eclipse.osbp.ide.feature.tools/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.tools/pom.xml b/org.eclipse.osbp.ide.feature.tools/pom.xml
new file mode 100644
index 0000000..9d17415
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.ide.feature.tools</artifactId>
+ <packaging>eclipse-feature</packaging>
+
+ <dependencies>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <labelSuffix> (source)</labelSuffix>
+ <excludes>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="org.apache.commons.cli"/>
+ <plugin id="com.google.guava"/>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- workaround while bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=398250
+ is not fixed -->
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.osbp.ide.feature.tools/src/main/javadoc/README.txt b/org.eclipse.osbp.ide.feature.tools/src/main/javadoc/README.txt
new file mode 100644
index 0000000..831da7e
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/src/main/javadoc/README.txt
@@ -0,0 +1 @@
+Resource folder for javadoc resources.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.tools/src/overview.html b/org.eclipse.osbp.ide.feature.tools/src/overview.html
new file mode 100644
index 0000000..cf517da
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.tools/src/overview.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>OSBP runtime web vaadin components feature Overview</title>
+</head>
+<body>
+<p>The <b>OSBP feature</b> contains developer tools for OSBP into the IDE.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.ide.feature.ui/.project b/org.eclipse.osbp.ide.feature.ui/.project
new file mode 100644
index 0000000..446a9f8
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.feature.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.feature.ui/LICENSE.txt b/org.eclipse.osbp.ide.feature.ui/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.ui/build.properties b/org.eclipse.osbp.ide.feature.ui/build.properties
new file mode 100644
index 0000000..dbd9c44
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ LICENSE.txt,\
+ license.html
+src.includes = license.html,\
+ LICENSE.txt
diff --git a/org.eclipse.osbp.ide.feature.ui/epl-v10.html b/org.eclipse.osbp.ide.feature.ui/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/epl-v10.html
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor'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.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" 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.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">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.</p>
+
+<p class="list">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.</p>
+
+<p class="list">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's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">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.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">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;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">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.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>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.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>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
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+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.</p>
+
+<p>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'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.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" 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.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>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.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>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.</p>
+
+<p>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's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient'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's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>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.</p>
+
+<p>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.</p>
+
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.ui/feature.properties b/org.eclipse.osbp.ide.feature.ui/feature.properties
new file mode 100644
index 0000000..7e84bbc
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/feature.properties
@@ -0,0 +1,169 @@
+###############################################################################
+# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany).
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Cristiano Gavião - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName =UI feature for OSBP IDE
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse OSBP
+
+# "description" property - description of the feature
+description=Installs all features required for OSBP into the IDE
+
+# "updateSiteName" property - label for the update site
+updateSiteName=
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/org.eclipse.osbp.ide.feature.ui/feature.xml b/org.eclipse.osbp.ide.feature.ui/feature.xml
new file mode 100644
index 0000000..b743200
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/feature.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<feature
+ id="org.eclipse.osbp.ide.feature.ui"
+ label="%featureName"
+ version="0.9.0.qualifier"
+ provider-name="%providerName">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import feature="org.eclipse.osbp.ide.feature.headless" version="0.9.0"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.osbp.ide.core.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.ide.core.ui.shared"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/org.eclipse.osbp.ide.feature.ui/license.html b/org.eclipse.osbp.ide.feature.ui/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.ui/pom.xml b/org.eclipse.osbp.ide.feature.ui/pom.xml
new file mode 100644
index 0000000..ebadee1
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.ide.feature.ui</artifactId>
+ <packaging>eclipse-feature</packaging>
+
+ <dependencies>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <labelSuffix> (source)</labelSuffix>
+ <excludes>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="org.apache.commons.cli"/>
+ <plugin id="com.google.guava"/>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- workaround while bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=398250
+ is not fixed -->
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.osbp.ide.feature.ui/src/main/javadoc/README.txt b/org.eclipse.osbp.ide.feature.ui/src/main/javadoc/README.txt
new file mode 100644
index 0000000..831da7e
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/src/main/javadoc/README.txt
@@ -0,0 +1 @@
+Resource folder for javadoc resources.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.feature.ui/src/overview.html b/org.eclipse.osbp.ide.feature.ui/src/overview.html
new file mode 100644
index 0000000..3cb7437
--- /dev/null
+++ b/org.eclipse.osbp.ide.feature.ui/src/overview.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>OSBP runtime web vaadin components feature Overview</title>
+</head>
+<body>
+<p>The <b>OSBP feature</b> installs all features required for OSBP into the IDE.</p>
+
+<p><strong>Attention: Read the copyright notice of CVAL3 license.</strong></p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.ide.tools.developer/.project b/org.eclipse.osbp.ide.tools.developer/.project
new file mode 100644
index 0000000..9f73e94
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/.project
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.tools.developer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.babel.editor.rbeNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.tools.developer/LICENSE.txt b/org.eclipse.osbp.ide.tools.developer/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.developer/META-INF/MANIFEST.MF b/org.eclipse.osbp.ide.tools.developer/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..01885bc
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.ide.tools.developer
+Bundle-SymbolicName: org.eclipse.osbp.ide.tools.developer;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.osbp.ide.tools.developer.Activator
+Bundle-Vendor: Eclipse OSBP
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources;bundle-version="3.9.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Import-Package: org.slf4j;version="1.7.2"
diff --git a/org.eclipse.osbp.ide.tools.developer/about.html b/org.eclipse.osbp.ide.tools.developer/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.developer/about.ini b/org.eclipse.osbp.ide.tools.developer/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/about.ini
@@ -0,0 +1,17 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+welcomePage=
diff --git a/org.eclipse.osbp.ide.tools.developer/about.mappings b/org.eclipse.osbp.ide.tools.developer/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=qualifier
diff --git a/org.eclipse.osbp.ide.tools.developer/about.properties b/org.eclipse.osbp.ide.tools.developer/about.properties
new file mode 100644
index 0000000..e060a94
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/about.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=org.eclipse.osbp.ide.tools.developer
+
+################ blurb property ####################################
+featureText=\
+Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Loetz GmbH&Co.KG - implementation\n
+################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.ide.tools.developer/build.properties b/org.eclipse.osbp.ide.tools.developer/build.properties
new file mode 100644
index 0000000..b8f5b07
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ plugin.xml,\
+ LICENSE.txt,\
+ license.html
+src.includes = about.properties, about.mappings, about.ini, about.html, LICENSE.txt,\
+ license.html
diff --git a/org.eclipse.osbp.ide.tools.developer/license.html b/org.eclipse.osbp.ide.tools.developer/license.html
new file mode 100644
index 0000000..c33d45c
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/license.html
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.developer/plugin.xml b/org.eclipse.osbp.ide.tools.developer/plugin.xml
new file mode 100644
index 0000000..d386057
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/plugin.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ adaptable="true"
+ id="org.eclipse.osbp.ide.tools.developer.updateDepVersion"
+ objectClass="org.eclipse.core.resources.IProject">
+ <action
+ class="org.eclipse.osbp.ide.tools.developer.UpdateDependencyVersions"
+ id="org.eclipse.osbp.ide.tools.developer.UpdateDepVersion"
+ label="Update dependency versions"
+ menubarPath="org.eclipse.ui.projectConfigure/additions">
+ </action>
+ </objectContribution>
+ <objectContribution
+ adaptable="true"
+ id="org.eclipse.osbp.ide.tools.developer.updateArtifactVersion"
+ objectClass="org.eclipse.core.resources.IProject">
+ <action
+ class="org.eclipse.osbp.ide.tools.developer.UpdateArtifactVersions"
+ id="org.eclipse.osbp.ide.tools.developer.UpdateArtifactVersion"
+ label="Update artifact versions"
+ menubarPath="org.eclipse.ui.projectConfigure/additions">
+ </action>
+ </objectContribution>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.osbp.ide.tools.developer/pom.xml b/org.eclipse.osbp.ide.tools.developer/pom.xml
new file mode 100644
index 0000000..6d8cc99
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.ide.tools.developer</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/Activator.java b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/Activator.java
new file mode 100644
index 0000000..e9fb916
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/Activator.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.developer;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.osbp.ide.tools.developer"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/ArtifactVersionUpdate.java b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/ArtifactVersionUpdate.java
new file mode 100644
index 0000000..8317f67
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/ArtifactVersionUpdate.java
@@ -0,0 +1,323 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.developer;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class ArtifactVersionUpdate {
+
+ private static final String FILENAME = "/.artifactVersions";
+ private static final String VERSION_OLD_VERSION_REGEX = "Bundle-Version: [\\w\\.]*";
+ private static final String VERSION_NEW_VERSION = "Bundle-Version: %s";
+ private static final String EXPORTPACKAGE_OLD_VERSION_REGEX = "version=\"[\\w\\.]*\"";
+ private static final String EXPORTPACKAGE_NEW_VERSION = "version=\"%s\"";
+ private static final String POM_ARTIFACT_OLD_VERSION_REGEX = "<version>[\\w\\.-]*</version>";
+ private static final String POM_ARTIFACT_NEW_VERSION = "<version>%s</version>";
+ private static final String FEATURE_OLD_VERSION_REGEX = "version=\"[\\w\\.]*\"";
+ private static final String FEATURE_NEW_VERSION = "version=\"%s\"";
+
+ private String pomArtifactVersion;
+ private String pomRelengVersion;
+ private String pomRelengP2Version;
+ private String pomRelengGroupId;
+
+ public void execute(IProject aggregator) throws Exception {
+ IFile file = aggregator.getFile(FILENAME);
+ if (!file.exists()) {
+ return;
+ }
+
+ Properties properties = new Properties();
+ properties.load(file.getContents());
+
+ pomArtifactVersion = properties.getProperty("version");
+ pomRelengVersion = properties.getProperty("relengVersion");
+ pomRelengP2Version = properties.getProperty("relengP2Version");
+ pomRelengGroupId = properties.getProperty("relengGroupId");
+
+ processProject(aggregator);
+
+ }
+
+ private boolean isSnapshot(String version) {
+ return version.endsWith("SNAPSHOT");
+ }
+
+ private void processProject(IContainer project) throws CoreException,
+ IOException {
+
+ IResource manifest = project.getFile(new Path("/META-INF/MANIFEST.MF"));
+ if (manifest != null && manifest.exists()) {
+ processManifest((IFile) manifest);
+ }
+
+ IResource pom = project.getFile(new Path("/pom.xml"));
+ if (pom != null && pom.exists()) {
+ processPom((IFile) pom);
+ }
+
+ IResource featureXml = project.getFile(new Path("/feature.xml"));
+ if (featureXml != null && featureXml.exists()) {
+ processFeatureXml((IFile) featureXml);
+ }
+
+ for (IResource member : project.members()) {
+ if (member instanceof IContainer) {
+ if (isChildProject((IContainer) member)) {
+ // process children recursively
+ processProject((IContainer) member);
+ }
+ }
+ }
+
+ }
+
+ private boolean isChildProject(IContainer member) {
+ IResource projectFile = member.getFile(new Path("/.project"));
+ return projectFile != null && projectFile.exists();
+ }
+
+ private void processManifest(IFile manifest) throws CoreException,
+ IOException {
+
+ StringBuilder fileContent = generateManifest(manifest);
+
+ manifest.setContents(new ByteArrayInputStream(fileContent.toString()
+ .getBytes()), true, true, new NullProgressMonitor());
+ }
+
+ private void processPom(IFile pom) throws CoreException, IOException {
+
+ StringBuilder fileContent = generatePom(pom);
+
+ pom.setContents(new ByteArrayInputStream(fileContent.toString()
+ .getBytes()), true, true, new NullProgressMonitor());
+ }
+
+ private void processFeatureXml(IFile featureXml) throws CoreException,
+ IOException {
+
+ StringBuilder fileContent = generateFeatureXml(featureXml);
+
+ featureXml.setContents(new ByteArrayInputStream(fileContent.toString()
+ .getBytes()), true, true, new NullProgressMonitor());
+ }
+
+ private StringBuilder generateManifest(IFile manifest)
+ throws CoreException, IOException {
+ // Open the file
+ InputStream inputStream = manifest.getContents();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ inputStream));
+ String line = null;
+ String newLine = null;
+ StringBuilder fileContent = new StringBuilder();
+ boolean inEP = false;
+
+ String symbolicName = null;
+ // Read file line by line
+ while ((line = reader.readLine()) != null) {
+ newLine = line;
+
+ if (line.startsWith("Bundle-SymbolicName")) {
+ symbolicName = (String) line.subSequence(line.indexOf(" ") + 1,
+ line.contains(";") ? line.indexOf(";") : line.length());
+ inEP = false;
+ } else if (line.startsWith("Bundle-Version")) {
+ newLine = line.replaceFirst(VERSION_OLD_VERSION_REGEX,
+ String.format(VERSION_NEW_VERSION, getOSGiVersion()));
+ inEP = false;
+ } else if (line.startsWith("Export-Package")) {
+ inEP = true;
+ } else if (!line.startsWith(" ")) {
+ newLine = line;
+ inEP = false;
+ }
+
+ if (inEP) {
+ if (symbolicName == null) {
+ throw new IllegalStateException(
+ "Symbolic name must be located before export packages.");
+ }
+ String tokens[] = line.split(" ");
+ if (tokens.length > 0) {
+ if (tokens[1].startsWith(symbolicName)) {
+ newLine = line.replaceFirst(
+ EXPORTPACKAGE_OLD_VERSION_REGEX, String.format(
+ EXPORTPACKAGE_NEW_VERSION,
+ getOSGiEPVersion()));
+ } else {
+ newLine = line;
+ }
+ }
+ }
+
+ // update content as it is
+ fileContent.append(newLine);
+ fileContent.append("\n");
+ }
+ return fileContent;
+ }
+
+ private StringBuilder generatePom(IFile pom) throws CoreException,
+ IOException {
+ // Open the file
+ InputStream inputStream = pom.getContents();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ inputStream));
+ String line = null;
+ String newLine = null;
+ StringBuilder fileContent = new StringBuilder();
+ boolean isParentCoordinate = false;
+ boolean isPluginDef = false;
+ boolean isProfileDef = false;
+ boolean isDependencyDef = false;
+ boolean parentIsReleng = false;
+
+ // Read file line by line
+ while ((line = reader.readLine()) != null) {
+ newLine = line;
+
+ // Remember if we are inside certain tags
+ if (line.contains("<parent>")) {
+ isParentCoordinate = true;
+ } else if (line.contains("</parent>")) {
+ isParentCoordinate = false;
+ parentIsReleng = false;
+ } else if (line.contains("<profile>")) {
+ isProfileDef = true;
+ } else if (line.contains("</profile>")) {
+ isProfileDef = false;
+ } else if (line.contains("<plugin>")) {
+ isPluginDef = true;
+ } else if (line.contains("</plugin>")) {
+ isPluginDef = false;
+ } else if (line.contains("<dependency>")) {
+ isDependencyDef = true;
+ } else if (line.contains("</dependency>")) {
+ isDependencyDef = false;
+ }
+
+ // Remember if parent is an external releng project
+ if (isParentCoordinate && line.contains("groupId")
+ && line.contains(pomRelengGroupId)) {
+ parentIsReleng = true;
+ }
+
+ // Changes are necessary only for <version> tags outside of plugin,
+ // dependency or profile definitions
+ if (!isProfileDef && !isPluginDef && !isDependencyDef
+ && line.contains("<version>")) {
+
+ // Definitions of a parent POM version
+ if (isParentCoordinate) {
+
+ // Parent is P2
+ if (pom.getFullPath().toString().endsWith("p2")) {
+ newLine = line.replaceFirst(
+ POM_ARTIFACT_OLD_VERSION_REGEX, String.format(
+ POM_ARTIFACT_NEW_VERSION,
+ pomRelengP2Version));
+ } else {
+ // Parent is external releng project
+ if (parentIsReleng) {
+ newLine = line.replaceFirst(
+ POM_ARTIFACT_OLD_VERSION_REGEX, String
+ .format(POM_ARTIFACT_NEW_VERSION,
+ pomRelengVersion));
+ // Parent is within same repo
+ } else {
+ newLine = line.replaceFirst(
+ POM_ARTIFACT_OLD_VERSION_REGEX, String
+ .format(POM_ARTIFACT_NEW_VERSION,
+ pomArtifactVersion));
+ }
+ }
+
+ // Version of this POM (outside <parent> tags)
+ } else {
+ newLine = line.replaceFirst(POM_ARTIFACT_OLD_VERSION_REGEX,
+ String.format(POM_ARTIFACT_NEW_VERSION,
+ pomArtifactVersion));
+ }
+ }
+
+ // write changes to file
+ fileContent.append(newLine);
+ fileContent.append("\n");
+ }
+ return fileContent;
+ }
+
+ private StringBuilder generateFeatureXml(IFile featureXml)
+ throws CoreException, IOException {
+ // Open the file
+ InputStream inputStream = featureXml.getContents();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ inputStream));
+ String line = null;
+ String newLine = null;
+ StringBuilder fileContent = new StringBuilder();
+ boolean inRequire = false;
+ boolean inPlugin = false;
+
+ String symbolicName = null;
+ // Read file line by line
+ while ((line = reader.readLine()) != null) {
+ newLine = line;
+
+ // remember which section we are in
+ if (line.contains("<requires>")) {
+ inRequire = true;
+ } else if (line.contains("</requires>")) {
+ inRequire = false;
+ } else if (line.contains("<plugin")) {
+ inPlugin = true;
+ } else if (inPlugin && line.contains("/>")) {
+ inPlugin = false;
+ }
+
+ // only change version of feature itself
+ if (!inRequire && !inPlugin && !line.contains("<?xml")) {
+ newLine = line.replaceFirst(FEATURE_OLD_VERSION_REGEX,
+ String.format(FEATURE_NEW_VERSION, getOSGiVersion()));
+ }
+
+ // update content as it is
+ fileContent.append(newLine);
+ fileContent.append("\n");
+ }
+ return fileContent;
+ }
+
+ private Object getOSGiVersion() {
+ return pomArtifactVersion.replace("-SNAPSHOT", ".qualifier");
+ }
+
+ private Object getOSGiEPVersion() {
+ return pomArtifactVersion.replace("-SNAPSHOT", "");
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/DependencyVersionUpdate.java b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/DependencyVersionUpdate.java
new file mode 100644
index 0000000..8fc0ae7
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/DependencyVersionUpdate.java
@@ -0,0 +1,317 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.developer;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class DependencyVersionUpdate {
+
+ private static final String FILENAME = "/.depVersions";
+ private static final String REQUIREBUNDLE_OLD_VERSION_REGEX = "bundle-version=\"[\\w\\.\\[\\),]*\"";
+ private static final String REQUIREBUNDLE_NEW_VERSION = "bundle-version=\"%s\"";
+
+ private static final String IMPORTPACKAGE_OLD_VERSION_REGEX = "version=\"[\\w\\.\\[\\),]*\"";
+ private static final String IMPORTPACKAGE_NEW_VERSION = "version=\"%s\"";
+
+ private static final String FEATURE_OLD_VERSION_REGEX = "version=\"[\\w\\.]*\"";
+ private static final String FEATURE_NEW_VERSION = "version=\"%s\"";
+
+ private List<VersionDef> defs;
+
+ public void execute(IProject aggregator) throws Exception {
+ IFile file = aggregator.getFile(FILENAME);
+ if (!file.exists()) {
+ return;
+ }
+
+ defs = parseDefs(file);
+
+ processProject(aggregator);
+ }
+
+ private void processProject(IContainer project) throws CoreException,
+ IOException {
+
+ IResource manifest = project.getFile(new Path("/META-INF/MANIFEST.MF"));
+ if (manifest != null && manifest.exists()) {
+ processManifest((IFile) manifest);
+ }
+
+ IResource featureXml = project.getFile(new Path("/feature.xml"));
+ if (featureXml != null && featureXml.exists()) {
+ processFeatureXml((IFile) featureXml);
+ }
+
+ for (IResource member : project.members()) {
+ if (member instanceof IContainer) {
+ if (isChildProject((IContainer) member)) {
+ // also process childs
+ processProject((IContainer) member);
+ }
+ }
+ }
+
+ }
+
+ private boolean isChildProject(IContainer member) {
+ IResource projectFile = member.getFile(new Path("/.project"));
+ return projectFile != null && projectFile.exists();
+ }
+
+ private void processManifest(IFile manifest) throws CoreException,
+ IOException {
+
+ StringBuilder fileContent = generateManifest(manifest);
+
+ manifest.setContents(new ByteArrayInputStream(fileContent.toString()
+ .getBytes()), true, true, new NullProgressMonitor());
+
+ }
+
+ private StringBuilder generateManifest(IFile manifest)
+ throws CoreException, IOException {
+ // Open the file
+ InputStream inputStream = manifest.getContents();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ inputStream));
+ String line = null;
+ String newLine = null;
+ StringBuilder fileContent = new StringBuilder();
+ String header = "";
+
+ // Read file line by line
+ while ((line = reader.readLine()) != null) {
+ newLine = line;
+
+ // Find out in which section we are, store this info
+ if (line.startsWith("Import-Package")) {
+ header = "ip";
+ } else if (line.startsWith("Require-Bundle")) {
+ header = "rb";
+ } else if (!line.startsWith(" ")) { // any other section >>> no
+ // changes
+ header = "";
+ fileContent.append(line);
+ fileContent.append("\n");
+ continue;
+ }
+
+ // Changes necessary only in Import or Require sections
+ if (!header.equals("")) {
+
+ // Get bundle name (after first space)
+ String tokens[] = line.split(" ");
+ if (tokens.length > 1) {
+ String name = tokens[1];
+
+ // Replace version with version in .depVersions file
+ VersionDef def = findVersionDef(name);
+ if (def != null) {
+ if (header.equals("ip")) {
+ newLine = def.createImportPackage(line);
+ } else if (header.equals("rb")) {
+ newLine = def.createRequireBundle(line);
+ } else {
+ throw new IllegalStateException();
+ }
+ }
+ }
+ }
+
+ // write result to file
+ fileContent.append(newLine);
+ fileContent.append("\n");
+ }
+ return fileContent;
+ }
+
+ private void processFeatureXml(IFile featureXml) throws CoreException,
+ IOException {
+
+ StringBuilder fileContent = generateFeatureXml(featureXml);
+
+ featureXml.setContents(new ByteArrayInputStream(fileContent.toString()
+ .getBytes()), true, true, new NullProgressMonitor());
+
+ }
+
+ private StringBuilder generateFeatureXml(IFile featureXml)
+ throws CoreException, IOException {
+ // Open the file
+ InputStream inputStream = featureXml.getContents();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ inputStream));
+ String line = null;
+ String newLine = null;
+ StringBuilder fileContent = new StringBuilder();
+ boolean inRequire = false;
+ boolean inPlugin = false;
+
+ String symbolicName = null;
+ // Read file line by line
+ while ((line = reader.readLine()) != null) {
+ newLine = line;
+
+ // remember which section we are in
+ if (line.contains("<requires>")) {
+ inRequire = true;
+ } else if (line.contains("</requires>")) {
+ inRequire = false;
+ } else if (line.contains("<plugin")) {
+ inPlugin = true;
+ } else if (line.contains("</plugin>")) {
+ inPlugin = false;
+ }
+
+ // change versions of dependencies in "requires"
+ if (inRequire && !inPlugin) {
+
+ // Get bundle name (after first space)
+ String[] tokens = line.split("\"");
+ if (tokens.length > 1) {
+ String name = tokens[1];
+
+ // Replace version with version in .depVersions file
+ VersionDef def = findVersionDef(name);
+ if(def != null) {
+ newLine = def.createFeatureRequires(line);
+ }
+ }
+ }
+
+ // write result to file
+ fileContent.append(newLine);
+ fileContent.append("\n");
+ }
+ return fileContent;
+ }
+
+ private VersionDef findVersionDef(String name) {
+
+ for (VersionDef def : defs) {
+ if (name.startsWith(def.getName())) {
+ return def;
+ }
+ }
+
+ return null;
+ }
+
+ private List<VersionDef> parseDefs(IFile file) throws CoreException,
+ IOException {
+
+ List<VersionDef> defs = new ArrayList<VersionDef>();
+
+ // Open the file
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ file.getContents()));
+ String line = null;
+ // Read file line by line
+ while ((line = reader.readLine()) != null) {
+ VersionDef def = new VersionDef(line);
+ defs.add(def);
+ }
+
+ return defs;
+ }
+
+ private static class VersionDef {
+ private String name;
+ private String minVersion;
+ private String maxVersion;
+
+ public VersionDef(String line) {
+ String[] tokens = line.split(";");
+ for (int i = 0; i < tokens.length; i++) {
+ String token = tokens[i];
+ if (i == 0) {
+ name = token;
+ } else if (token.startsWith("min")) {
+ minVersion = token.replace("min=", "");
+ } else if (token.startsWith("max")) {
+ maxVersion = token.replace("max=", "");
+ }
+ }
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getMinVersion() {
+ return minVersion;
+ }
+
+ public String getMaxVersion() {
+ return maxVersion;
+ }
+
+ public String createImportPackage(String input) {
+ String newLine = input.replaceFirst(
+ IMPORTPACKAGE_OLD_VERSION_REGEX, String.format(
+ IMPORTPACKAGE_NEW_VERSION, createVersionRange()));
+ return newLine;
+ }
+
+ public String createRequireBundle(String input) {
+ String newLine = input.replaceFirst(
+ REQUIREBUNDLE_OLD_VERSION_REGEX, String.format(
+ REQUIREBUNDLE_NEW_VERSION, createVersionRange()));
+ return newLine;
+ }
+
+ public String createFeatureRequires(String input) {
+ String newLine = input.replaceFirst(FEATURE_OLD_VERSION_REGEX,
+ String.format(FEATURE_NEW_VERSION, minVersion));
+ return newLine;
+ }
+
+ private String createVersionRange() {
+ StringBuilder sb = new StringBuilder();
+ if (useMaxVersion()) {
+ sb.append("[");
+ }
+
+ sb.append(minVersion);
+
+ if (useMaxVersion()) {
+ sb.append(",");
+ sb.append(maxVersion);
+ }
+
+ if (useMaxVersion()) {
+ sb.append(")");
+ }
+
+ return sb.toString();
+ }
+
+ private boolean useMaxVersion() {
+ return maxVersion != null;
+ }
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/UpdateArtifactVersions.java b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/UpdateArtifactVersions.java
new file mode 100644
index 0000000..db7e162
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/UpdateArtifactVersions.java
@@ -0,0 +1,79 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.developer;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.slf4j.LoggerFactory;
+
+public class UpdateArtifactVersions implements IObjectActionDelegate {
+
+ private static final org.slf4j.Logger log = LoggerFactory
+ .getLogger(UpdateArtifactVersions.class);
+
+ private ISelection selection;
+
+ public void run(IAction action) {
+ if (selection instanceof IStructuredSelection) {
+ for (Iterator<?> it = ((IStructuredSelection) selection).iterator(); it
+ .hasNext();) {
+ Object element = it.next();
+ IProject project = null;
+ if (element instanceof IProject) {
+ project = (IProject) element;
+ } else if (element instanceof IAdaptable) {
+ project = (IProject) ((IAdaptable) element)
+ .getAdapter(IProject.class);
+ }
+ if (project != null) {
+ executeUpdate(project);
+ }
+ }
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void executeUpdate(IProject project) {
+ try {
+ new ArtifactVersionUpdate().execute(project);
+ } catch (Exception e) {
+ log.error("{}", e);
+
+ ErrorDialog
+ .openError(
+ Display.getCurrent().getActiveShell(),
+ "Error",
+ e.toString(),
+ new Status(IStatus.ERROR,
+ "org.eclipse.osbp.ide.tools.developer", e
+ .toString(), e));
+ }
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/UpdateDependencyVersions.java b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/UpdateDependencyVersions.java
new file mode 100644
index 0000000..8bb888b
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.developer/src/org/eclipse/osbp/ide/tools/developer/UpdateDependencyVersions.java
@@ -0,0 +1,79 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.developer;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.slf4j.LoggerFactory;
+
+public class UpdateDependencyVersions implements IObjectActionDelegate {
+
+ private static final org.slf4j.Logger log = LoggerFactory
+ .getLogger(UpdateDependencyVersions.class);
+
+ private ISelection selection;
+
+ public void run(IAction action) {
+ if (selection instanceof IStructuredSelection) {
+ for (Iterator<?> it = ((IStructuredSelection) selection).iterator(); it
+ .hasNext();) {
+ Object element = it.next();
+ IProject project = null;
+ if (element instanceof IProject) {
+ project = (IProject) element;
+ } else if (element instanceof IAdaptable) {
+ project = (IProject) ((IAdaptable) element)
+ .getAdapter(IProject.class);
+ }
+ if (project != null) {
+ executeUpdate(project);
+ }
+ }
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void executeUpdate(IProject project) {
+ try {
+ new DependencyVersionUpdate().execute(project);
+ } catch (Exception e) {
+ log.error("{}", e);
+
+ ErrorDialog
+ .openError(
+ Display.getCurrent().getActiveShell(),
+ "Error",
+ e.toString(),
+ new Status(IStatus.ERROR,
+ "org.eclipse.osbp.ide.tools.developer", e
+ .toString(), e));
+ }
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/.project b/org.eclipse.osbp.ide.tools.p2.mirror.product/.project
new file mode 100644
index 0000000..5bf3d9a
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/.project
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.tools.p2.mirror.product</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/LICENSE.txt b/org.eclipse.osbp.ide.tools.p2.mirror.product/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/META-INF/MANIFEST.MF b/org.eclipse.osbp.ide.tools.p2.mirror.product/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..0597636
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.ide.tools.p2.mirror.product
+Bundle-SymbolicName: org.eclipse.osbp.ide.tools.p2.mirror.product;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Vendor: Eclipse OSBP
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.equinox.p2.artifact.repository;bundle-version="1.1.300",
+ org.eclipse.equinox.p2.repository.tools;bundle-version="2.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Import-Package: org.osgi.service.component;version="1.2.2",
+ org.osgi.service.component.annotations;version="1.2.0",
+ org.slf4j;version="1.7.2"
+Service-Component: OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml b/org.eclipse.osbp.ide.tools.p2.mirror.product/OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml
new file mode 100644
index 0000000..106f7e5
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="activate" deactivate="deactivate" name="org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands">
+ <implementation class="org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands"/>
+ <service>
+ <provide interface="org.eclipse.osgi.framework.console.CommandProvider"/>
+ </service>
+ <reference bind="bindArtifacts" cardinality="1..1" interface="org.osgi.service.application.ApplicationDescriptor" name="Artifacts" policy="static" target="(service.pid=org.eclipse.equinox.p2.artifact.repository.mirrorApplication)"/>
+ <reference bind="bindMetadata" cardinality="1..1" interface="org.osgi.service.application.ApplicationDescriptor" name="Metadata" policy="static" target="(service.pid=org.eclipse.equinox.p2.metadata.repository.mirrorApplication)"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/build.properties b/org.eclipse.osbp.ide.tools.p2.mirror.product/build.properties
new file mode 100644
index 0000000..c314b12
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/build.properties
@@ -0,0 +1,10 @@
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml,\
+ LICENSE.txt,\
+ license.html
+source.. = src/
+src.includes = LICENSE.txt,\
+ license.html
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/license.html b/org.eclipse.osbp.ide.tools.p2.mirror.product/license.html
new file mode 100644
index 0000000..c33d45c
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/license.html
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/plugin.xml b/org.eclipse.osbp.ide.tools.p2.mirror.product/plugin.xml
new file mode 100644
index 0000000..5535690
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/plugin.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+</plugin>
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/pom.xml b/org.eclipse.osbp.ide.tools.p2.mirror.product/pom.xml
new file mode 100644
index 0000000..3fc650b
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/pom.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.ide.tools.p2.mirror.product</artifactId>
+ <packaging>eclipse-repository</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-director-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>materialize-products</id>
+ <goals>
+ <goal>materialize-products</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>archive-products</id>
+ <goals>
+ <goal>archive-products</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/product.product b/org.eclipse.osbp.ide.tools.p2.mirror.product/product.product
new file mode 100644
index 0000000..3a8b7ed
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/product.product
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product uid="org.eclipse.osbp.ide.tools.p2.mirror.product" application="org.eclipse.osbp.ide.tools.p2.mirror.app" version="0.7.5.qualifier" useFeatures="false" includeLaunchers="true">
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <programArgs>-consoleLog -console
+ </programArgs>
+ <vmArgs>-Dosgi.requiredJavaVersion=1.6 -XX:MaxPermSize=256m -Xms40m -Xmx512m
+ </vmArgs>
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
+ </vmArgsMac>
+ </launcherArgs>
+
+ <vm>
+ <linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</linux>
+ </vm>
+
+ <plugins>
+ <plugin id="javax.xml"/>
+ <plugin id="org.apache.felix.gogo.command" version="0.10.0.v201209301215"/>
+ <plugin id="org.apache.felix.gogo.runtime" version="0.10.0.v201209301036"/>
+ <plugin id="org.apache.felix.gogo.shell" version="0.10.0.v201212101605"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.net"/>
+ <plugin id="org.eclipse.core.net.linux.x86_64" fragment="true"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.ecf"/>
+ <plugin id="org.eclipse.ecf.filetransfer"/>
+ <plugin id="org.eclipse.ecf.identity"/>
+ <plugin id="org.eclipse.ecf.provider.filetransfer"/>
+ <plugin id="org.eclipse.equinox.app"/>
+ <plugin id="org.eclipse.equinox.common"/>
+ <plugin id="org.eclipse.equinox.console"/>
+ <plugin id="org.eclipse.equinox.ds"/>
+ <plugin id="org.eclipse.equinox.frameworkadmin"/>
+ <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
+ <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
+ <plugin id="org.eclipse.equinox.p2.core"/>
+ <plugin id="org.eclipse.equinox.p2.director"/>
+ <plugin id="org.eclipse.equinox.p2.director.app"/>
+ <plugin id="org.eclipse.equinox.p2.engine"/>
+ <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
+ <plugin id="org.eclipse.equinox.p2.metadata"/>
+ <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
+ <plugin id="org.eclipse.equinox.p2.publisher"/>
+ <plugin id="org.eclipse.equinox.p2.publisher.eclipse"/>
+ <plugin id="org.eclipse.equinox.p2.repository"/>
+ <plugin id="org.eclipse.equinox.p2.repository.tools"/>
+ <plugin id="org.eclipse.equinox.p2.transport.ecf"/>
+ <plugin id="org.eclipse.equinox.preferences"/>
+ <plugin id="org.eclipse.equinox.registry"/>
+ <plugin id="org.eclipse.equinox.security"/>
+ <plugin id="org.eclipse.equinox.simpleconfigurator"/>
+ <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
+ <plugin id="org.eclipse.equinox.util"/>
+ <plugin id="org.eclipse.osgi"/>
+ <plugin id="org.eclipse.osgi.services"/>
+ <plugin id="org.eclipse.osgi.util"/>
+ <plugin id="org.eclipse.osbp.ide.tools.p2.mirror"/>
+ <plugin id="org.sat4j.core"/>
+ <plugin id="org.sat4j.pb"/>
+ <plugin id="org.slf4j.api"/>
+ </plugins>
+
+ <configurations>
+ <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
+ <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+ <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="1" />
+ <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
+ <plugin id="org.eclipse.osgi" autoStart="true" startLevel="-1" />
+ </configurations>
+
+</product>
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror.product/src/org/eclipse/osbp/ide/tools/p2/mirror/ConsoleCommands.java b/org.eclipse.osbp.ide.tools.p2.mirror.product/src/org/eclipse/osbp/ide/tools/p2/mirror/ConsoleCommands.java
new file mode 100644
index 0000000..1c022bc
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror.product/src/org/eclipse/osbp/ide/tools/p2/mirror/ConsoleCommands.java
@@ -0,0 +1,248 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.p2.mirror;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.osgi.framework.console.CommandInterpreter;
+import org.osgi.service.application.ApplicationDescriptor;
+import org.osgi.service.application.ApplicationHandle;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+
+@Component
+public class ConsoleCommands implements
+ org.eclipse.osgi.framework.console.CommandProvider {
+
+ private ComponentContext context;
+ private Set<Mirror> mirrors = new HashSet<ConsoleCommands.Mirror>();
+ private ApplicationDescriptor artifactsDesc;
+ private ApplicationDescriptor metadataDesc;
+
+ @Override
+ public String getHelp() {
+ return "OSBP P2 mirror commands";
+ }
+
+ @Activate
+ protected void activate(ComponentContext context) {
+ this.context = context;
+
+ loadMirrors(context);
+ }
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY, target = "(service.pid=org.eclipse.equinox.p2.metadata.repository.mirrorApplication)")
+ protected void bindMetadata(ApplicationDescriptor metadataDesc) {
+ this.metadataDesc = metadataDesc;
+ }
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY, target = "(service.pid=org.eclipse.equinox.p2.artifact.repository.mirrorApplication)")
+ protected void bindArtifacts(ApplicationDescriptor artifactsDesc) {
+ this.artifactsDesc = artifactsDesc;
+ }
+
+ /**
+ * Loads all mirrors.
+ *
+ * @param context
+ */
+ private void loadMirrors(ComponentContext context) {
+ try {
+ File settings = context.getBundleContext().getDataFile(
+ "lunp2mirrors");
+ if (!settings.exists()) {
+ settings.createNewFile();
+ }
+
+ InputStream inputStream = new FileInputStream(settings);
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ inputStream));
+ String line = null;
+ // Read file line by line
+ while ((line = reader.readLine()) != null) {
+ mirrors.add(Mirror.parse(line));
+ }
+ reader.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Deactivate
+ protected void deactivate(ComponentContext context) {
+ this.context = null;
+ }
+
+ public void _lunp2mirror(final CommandInterpreter ci) throws Exception {
+ String argument = ci.nextArgument();
+ if (argument == null) {
+ ci.println(getHelp());
+ } else if (argument.equals("ls")) {
+ printMirrors(ci);
+ } else if (argument.equals("add")) {
+ addMirror(ci);
+ } else if (argument.equals("update")) {
+ update(ci);
+ } else {
+ ci.println("ERROR - not a valid command!");
+ ci.println(getHelp());
+ }
+ }
+
+ // lunp2mirror add osbpP2 http://....com
+ private void addMirror(CommandInterpreter ci) {
+
+ String id = ci.nextArgument();
+ if (id == null) {
+ ci.println("\tERROR: No id specified!");
+ return;
+ }
+
+ String url = ci.nextArgument();
+ if (url == null) {
+ ci.println("\tERROR: No URL specified!");
+ return;
+ }
+
+ String destination = ci.nextArgument();
+ if (destination == null) {
+ ci.println("\tERROR: No destination specified!");
+ return;
+ }
+
+ Mirror newMirror = new Mirror(id, url, destination);
+ mirrors.add(newMirror);
+
+ saveFile();
+
+ }
+
+ private void saveFile() {
+ StringBuilder b = new StringBuilder();
+ for (Mirror mirror : mirrors) {
+ b.append(mirror.toString());
+ b.append("\n");
+ }
+
+ try {
+ File settings = context.getBundleContext().getDataFile(
+ "lunp2mirrors");
+ FileWriter writer = new FileWriter(settings);
+ writer.append(b.toString());
+ writer.flush();
+ writer.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void update(CommandInterpreter ci) {
+ String id = ci.nextArgument();
+ if (id == null) {
+ ci.println("\tERROR: No id specified!");
+ return;
+ }
+
+ for (Mirror mirror : mirrors) {
+ if (mirror.id.equals(id)) {
+ try {
+ run(ci, mirror);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ break;
+ }
+ }
+
+ }
+
+ private void printMirrors(CommandInterpreter ci) {
+
+ StringBuilder b = new StringBuilder();
+ for (Mirror mirror : mirrors) {
+ b.append("\tId: ");
+ b.append(mirror.id);
+ b.append("\tURL: ");
+ b.append(mirror.url);
+ b.append("\tDestination: ");
+ b.append(mirror.destination);
+ b.append("\n");
+ }
+
+ ci.println("\t---- Available mirrors ----\n");
+ ci.println(b.toString());
+ }
+
+ public void run(CommandInterpreter ci, Mirror mirror) throws Exception {
+ try {
+ Map<String, Object> launchArgs = new HashMap<>(1);
+ Map<String, Object> appArgs = new HashMap<>();
+ launchArgs.put(IApplicationContext.APPLICATION_ARGS, appArgs);
+
+ appArgs.put("-source", mirror.url);
+ appArgs.put("-destination", mirror.destination);
+
+ ApplicationHandle metadataHandle = metadataDesc.launch(launchArgs);
+ ci.println("Launched application instance: " + metadataHandle.getInstanceId()); //$NON-NLS-1$
+ ApplicationHandle artifactsHandle = artifactsDesc
+ .launch(launchArgs);
+ ci.println("Launched application instance: " + artifactsHandle.getInstanceId()); //$NON-NLS-1$
+
+ } finally {
+ }
+ return;
+ }
+
+ private static class Mirror {
+ public final String id;
+ public final String url;
+ public final String destination;
+
+ public Mirror(String id, String url, String destination) {
+ super();
+ this.id = id;
+ this.url = url;
+ this.destination = destination;
+ }
+
+ public static Mirror parse(String line) {
+ String[] tokens = line.split(";");
+ return new Mirror(tokens[0], tokens[1], tokens[2]);
+ }
+
+ public String toString() {
+ return String.format("%s;%s;%s", id, url, destination);
+ }
+
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/.project b/org.eclipse.osbp.ide.tools.p2.mirror/.project
new file mode 100644
index 0000000..cd6a24c
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/.project
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.ide.tools.p2.mirror</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/LICENSE.txt b/org.eclipse.osbp.ide.tools.p2.mirror/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor'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.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " 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.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+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.
+
+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.
+
+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's responsibility to acquire that license before distributing the Program.
+
+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.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+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;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+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.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+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.
+
+4. COMMERCIAL DISTRIBUTION
+
+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
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") 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.
+
+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'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.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" 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.
+
+6. DISCLAIMER OF LIABILITY
+
+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.
+
+7. GENERAL
+
+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.
+
+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's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient'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's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+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.
+
+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.
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/META-INF/MANIFEST.MF b/org.eclipse.osbp.ide.tools.p2.mirror/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..95bdd1f
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.ide.tools.p2.mirror
+Bundle-SymbolicName: org.eclipse.osbp.ide.tools.p2.mirror;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Vendor: Eclipse OSBP
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.equinox.p2.artifact.repository;bundle-version="1.1.300",
+ org.eclipse.equinox.p2.repository.tools;bundle-version="2.1.0",
+ org.eclipse.equinox.p2.repository
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Import-Package: org.osgi.service.component;version="1.2.2",
+ org.osgi.service.component.annotations;version="1.2.0",
+ org.slf4j;version="1.7.2"
+Service-Component: OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml b/org.eclipse.osbp.ide.tools.p2.mirror/OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml
new file mode 100644
index 0000000..106f7e5
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="activate" deactivate="deactivate" name="org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands">
+ <implementation class="org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands"/>
+ <service>
+ <provide interface="org.eclipse.osgi.framework.console.CommandProvider"/>
+ </service>
+ <reference bind="bindArtifacts" cardinality="1..1" interface="org.osgi.service.application.ApplicationDescriptor" name="Artifacts" policy="static" target="(service.pid=org.eclipse.equinox.p2.artifact.repository.mirrorApplication)"/>
+ <reference bind="bindMetadata" cardinality="1..1" interface="org.osgi.service.application.ApplicationDescriptor" name="Metadata" policy="static" target="(service.pid=org.eclipse.equinox.p2.metadata.repository.mirrorApplication)"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/about.html b/org.eclipse.osbp.ide.tools.p2.mirror/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/about.ini b/org.eclipse.osbp.ide.tools.p2.mirror/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/about.ini
@@ -0,0 +1,17 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+welcomePage=
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/about.mappings b/org.eclipse.osbp.ide.tools.p2.mirror/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=qualifier
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/about.properties b/org.eclipse.osbp.ide.tools.p2.mirror/about.properties
new file mode 100644
index 0000000..8e84cc7
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/about.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=org.eclipse.osbp.ide.tools.p2.mirror
+
+################ blurb property ####################################
+featureText=\
+Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Loetz GmbH&Co.KG - implementation\n
+################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/build.properties b/org.eclipse.osbp.ide.tools.p2.mirror/build.properties
new file mode 100644
index 0000000..f52da18
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/build.properties
@@ -0,0 +1,10 @@
+output.. = bin/
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ plugin.xml,\
+ OSGI-INF/org.eclipse.osbp.ide.tools.p2.mirror.ConsoleCommands.xml,\
+ LICENSE.txt,\
+ license.html
+source.. = src/
+src.includes = about.properties, about.mappings, about.ini, about.html, license.html,\
+ LICENSE.txt
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/license.html b/org.eclipse.osbp.ide.tools.p2.mirror/license.html
new file mode 100644
index 0000000..c33d45c
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/license.html
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/plugin.xml b/org.eclipse.osbp.ide.tools.p2.mirror/plugin.xml
new file mode 100644
index 0000000..80e8502
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ id="app"
+ point="org.eclipse.core.runtime.applications">
+ <application
+ cardinality="*"
+ thread="any"
+ visible="true">
+ <run
+ class="org.eclipse.osbp.ide.tools.p2.mirror.P2MirrorApplication">
+ </run>
+ </application>
+ </extension>
+ <extension
+ id="org.eclipse.osbp.ide.tools.p2.mirror.product"
+ point="org.eclipse.core.runtime.products">
+ <product
+ application="org.eclipse.osbp.ide.tools.p2.mirror.app"
+ name="mirrorProduct">
+ </product>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/pom.xml b/org.eclipse.osbp.ide.tools.p2.mirror/pom.xml
new file mode 100644
index 0000000..5713a8f
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.ide.tools.p2.mirror</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/ConsoleCommands.java b/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/ConsoleCommands.java
new file mode 100644
index 0000000..cce1c90
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/ConsoleCommands.java
@@ -0,0 +1,260 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.p2.mirror;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication;
+import org.eclipse.osgi.framework.console.CommandInterpreter;
+import org.osgi.service.application.ApplicationDescriptor;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+
+@Component
+public class ConsoleCommands implements
+ org.eclipse.osgi.framework.console.CommandProvider {
+
+ private ComponentContext context;
+ private Set<Mirror> mirrors = new HashSet<ConsoleCommands.Mirror>();
+ private ApplicationDescriptor artifactsDesc;
+ private ApplicationDescriptor metadataDesc;
+
+ @Override
+ public String getHelp() {
+ return "OSBP P2 mirror commands";
+ }
+
+ @Activate
+ protected void activate(ComponentContext context) {
+ this.context = context;
+
+ loadMirrors(context);
+ }
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY, target = "(service.pid=org.eclipse.equinox.p2.metadata.repository.mirrorApplication)")
+ protected void bindMetadata(ApplicationDescriptor metadataDesc) {
+ this.metadataDesc = metadataDesc;
+ }
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY, target = "(service.pid=org.eclipse.equinox.p2.artifact.repository.mirrorApplication)")
+ protected void bindArtifacts(ApplicationDescriptor artifactsDesc) {
+ this.artifactsDesc = artifactsDesc;
+ }
+
+ /**
+ * Loads all mirrors.
+ *
+ * @param context
+ */
+ private void loadMirrors(ComponentContext context) {
+ try {
+ File settings = context.getBundleContext().getDataFile(
+ "lunp2mirrors");
+ if (!settings.exists()) {
+ settings.createNewFile();
+ }
+
+ InputStream inputStream = new FileInputStream(settings);
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ inputStream));
+ String line = null;
+ // Read file line by line
+ while ((line = reader.readLine()) != null) {
+ mirrors.add(Mirror.parse(line));
+ }
+ reader.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Deactivate
+ protected void deactivate(ComponentContext context) {
+ this.context = null;
+ }
+
+ public void _lunp2mirror(final CommandInterpreter ci) throws Exception {
+ String argument = ci.nextArgument();
+ if (argument == null) {
+ ci.println(getHelp());
+ } else if (argument.equals("ls")) {
+ printMirrors(ci);
+ } else if (argument.equals("add")) {
+ addMirror(ci);
+ } else if (argument.equals("update")) {
+ update(ci);
+ } else {
+ ci.println("ERROR - not a valid command!");
+ ci.println(getHelp());
+ }
+ }
+
+ // lunp2mirror add osbpP2 http://....com
+ private void addMirror(CommandInterpreter ci) {
+
+ String id = ci.nextArgument();
+ if (id == null) {
+ ci.println("\tERROR: No id specified!");
+ return;
+ }
+
+ String url = ci.nextArgument();
+ if (url == null) {
+ ci.println("\tERROR: No URL specified!");
+ return;
+ }
+
+ String destination = ci.nextArgument();
+ if (destination == null) {
+ ci.println("\tERROR: No destination specified!");
+ return;
+ }
+
+ Mirror newMirror = new Mirror(id, url, destination);
+ mirrors.add(newMirror);
+
+ saveFile();
+
+ }
+
+ private void saveFile() {
+ StringBuilder b = new StringBuilder();
+ for (Mirror mirror : mirrors) {
+ b.append(mirror.toString());
+ b.append("\n");
+ }
+
+ try {
+ File settings = context.getBundleContext().getDataFile(
+ "lunp2mirrors");
+ FileWriter writer = new FileWriter(settings);
+ writer.append(b.toString());
+ writer.flush();
+ writer.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void update(CommandInterpreter ci) {
+ String id = ci.nextArgument();
+ if (id == null) {
+ ci.println("\tERROR: No id specified!");
+ return;
+ }
+
+ for (Mirror mirror : mirrors) {
+ if (mirror.id.equals(id)) {
+ try {
+ run(ci, mirror);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ break;
+ }
+ }
+
+ }
+
+ private void printMirrors(CommandInterpreter ci) {
+
+ StringBuilder b = new StringBuilder();
+ for (Mirror mirror : mirrors) {
+ b.append("\tId: ");
+ b.append(mirror.id);
+ b.append("\tURL: ");
+ b.append(mirror.url);
+ b.append("\tDestination: ");
+ b.append(mirror.destination);
+ b.append("\n");
+ }
+
+ ci.println("\t---- Available mirrors ----\n");
+ ci.println(b.toString());
+ }
+
+ @SuppressWarnings("restriction")
+ public void run(CommandInterpreter ci, Mirror mirror) throws Exception {
+ try {
+ // Map<String, Object> launchArgs = new HashMap<>(1);
+
+ String[] args = new String[] { "-source", mirror.url,
+ "-destination", mirror.destination, "-writeMode", "clean", "-references", "false" };
+ // launchArgs.put(IApplicationContext.APPLICATION_ARGS, args);
+
+ DummyApplicationContext context = new DummyApplicationContext();
+ context.getArguments().put(IApplicationContext.APPLICATION_ARGS,
+ args);
+ MirrorApplication metadataApplication = new MirrorApplication();
+ Map<String, String> initArgs = new HashMap<String, String>(1);
+ initArgs.put("metadataOrArtifacts", "metadata");
+ metadataApplication.setInitializationData(null, null, initArgs);
+ MirrorLog log = new MirrorLog(ci);
+ metadataApplication.setLog(log);
+ metadataApplication.start(context);
+
+ MirrorApplication artifactsApplication = new MirrorApplication();
+ initArgs = new HashMap<String, String>(1);
+ initArgs.put("metadataOrArtifacts", "artifacts");
+ artifactsApplication.setInitializationData(null, null, initArgs);
+ artifactsApplication.setLog(log);
+ artifactsApplication.start(context);
+
+ } finally {
+ }
+ return;
+ }
+
+ private static class Mirror {
+ public final String id;
+ public final String url;
+ public final String destination;
+
+ public Mirror(String id, String url, String destination) {
+ super();
+ this.id = id;
+ this.url = url;
+ this.destination = destination;
+ }
+
+ public static Mirror parse(String line) {
+ String[] tokens = line.split(";");
+ return new Mirror(tokens[0], tokens[1], tokens[2]);
+ }
+
+ public String toString() {
+ return String.format("%s;%s;%s", id, url, destination);
+ }
+
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/DummyApplicationContext.java b/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/DummyApplicationContext.java
new file mode 100644
index 0000000..2c7652c
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/DummyApplicationContext.java
@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.p2.mirror;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.osgi.framework.Bundle;
+
+public class DummyApplicationContext implements IApplicationContext {
+
+ private Map<String, Object> args = new HashMap<String, Object>();
+
+ @Override
+ public Map<String, Object> getArguments() {
+ return args;
+ }
+
+ @Override
+ public void applicationRunning() {
+
+ }
+
+ @Override
+ public String getBrandingApplication() {
+ return null;
+ }
+
+ @Override
+ public String getBrandingName() {
+ return null;
+ }
+
+ @Override
+ public String getBrandingDescription() {
+ return null;
+ }
+
+ @Override
+ public String getBrandingId() {
+ return null;
+ }
+
+ @Override
+ public String getBrandingProperty(String key) {
+ return null;
+ }
+
+ @Override
+ public Bundle getBrandingBundle() {
+ return null;
+ }
+
+ @Override
+ public void setResult(Object result, IApplication application) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/MirrorLog.java b/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/MirrorLog.java
new file mode 100644
index 0000000..0eefc5f
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/MirrorLog.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.p2.mirror;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.internal.repository.mirroring.IArtifactMirrorLog;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.osgi.framework.console.CommandInterpreter;
+
+public class MirrorLog implements IArtifactMirrorLog {
+
+ private static final String INDENT = "\t"; //$NON-NLS-1$
+ private static final String SEPARATOR = System
+ .getProperty("line.separator"); //$NON-NLS-1$
+ private boolean consoleMessage = false;
+ private int minSeverity = IStatus.OK;
+ private boolean hasRoot = false;
+ private CommandInterpreter ci;
+
+ public MirrorLog(CommandInterpreter ci) {
+ this.minSeverity = minSeverity;
+ this.ci = ci;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log
+ * (org.eclipse.equinox.internal.provisional.p2.artifact.repository.
+ * IArtifactDescriptor, org.eclipse.core.runtime.IStatus)
+ */
+ public void log(IArtifactDescriptor descriptor, IStatus status) {
+ if (status.getSeverity() >= minSeverity) {
+ log(descriptor.toString());
+ log(status, INDENT);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log
+ * (org.eclipse.core.runtime.IStatus)
+ */
+ public void log(IStatus status) {
+ log(status, ""); //$NON-NLS-1$
+ }
+
+ /*
+ * Write a status to the log, indenting it based on status depth.
+ *
+ * @param status the status to log
+ *
+ * @param depth the depth of the status
+ */
+ private void log(IStatus status, String prefix) {
+ if (status.getSeverity() >= minSeverity) {
+ // Write status to log
+ log(prefix + status.getMessage());
+
+ // Write exception to log if applicable
+ String exceptionMessage = status.getException() != null ? status
+ .getException().getMessage() : null;
+ if (exceptionMessage != null)
+ log(prefix + exceptionMessage);
+
+ // Write the children of the status to the log
+ IStatus[] nestedStatus = status.getChildren();
+ if (nestedStatus != null)
+ for (int i = 0; i < nestedStatus.length; i++)
+ log(nestedStatus[i], prefix + INDENT);
+ }
+ }
+
+ /*
+ * Write a message to the log
+ *
+ * @param message the message to write
+ */
+ private void log(String message) {
+ ci.print((hasRoot ? INDENT : "") + message + SEPARATOR); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#close
+ * ()
+ */
+ public void close() {
+ }
+}
diff --git a/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/P2MirrorApplication.java b/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/P2MirrorApplication.java
new file mode 100644
index 0000000..40abf00
--- /dev/null
+++ b/org.eclipse.osbp.ide.tools.p2.mirror/src/org/eclipse/osbp/ide/tools/p2/mirror/P2MirrorApplication.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Pirchner - Initial implementation
+ */
+
+package org.eclipse.osbp.ide.tools.p2.mirror;
+
+import java.util.concurrent.ArrayBlockingQueue;
+
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+
+public class P2MirrorApplication implements IApplication {
+
+ private ArrayBlockingQueue<String> queue;
+
+ @Override
+ public Object start(IApplicationContext context) throws Exception {
+ queue = new ArrayBlockingQueue<String>(10);
+
+ String msg;
+ while (!(msg = queue.take()).equals("exit")) {
+ System.out.println("Application shutdowned");
+ }
+
+ return EXIT_OK;
+ }
+
+ @Override
+ public void stop() {
+
+ }
+
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..e2e3c5d
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Klemens Edler (Lunifera GmbH) - initial API and implementation -->
+<!--#======================================================================= -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.eclipse.osbp.ide</groupId>
+ <artifactId>org.eclipse.osbp.ide</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.eclipse.osbp.releng.maven</groupId>
+ <artifactId>org.eclipse.osbp.releng.maven.parent.tycho</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <url>${osbp.site.repository.url}</url>
+ <scm>
+ <url>${osbp.scm.url}</url>
+ <connection>${osbp.scm.connection}</connection>
+ <developerConnection>${osbp.scm.connection.dev}</developerConnection>
+ <tag>HEAD</tag>
+ </scm>
+ <distributionManagement>
+ <site>
+ <id>gh-pages</id>
+ <name>OSBP GitHub Pages</name>
+ <url>${distribution.site.url}</url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+ <osbp.gitrepo.name>${project.groupId}</osbp.gitrepo.name>
+ <xtext.version>2.7.3</xtext.version>
+ </properties>
+
+ <modules>
+ <module>org.eclipse.osbp.ide.core</module>
+ <module>org.eclipse.osbp.ide.core.api</module>
+ <module>org.eclipse.osbp.ide.core.ui</module>
+ <module>org.eclipse.osbp.ide.core.ui.shared</module>
+ <module>org.eclipse.osbp.ide.tools.developer</module>
+ <module>org.eclipse.osbp.ide.tools.p2.mirror</module>
+ <module>org.eclipse.osbp.ide.tools.p2.mirror.product</module>
+ <!--<module>org.eclipse.osbp.ide.p2</module>-->
+ <module>org.eclipse.osbp.ide.feature.ui</module>
+ <module>org.eclipse.osbp.ide.feature.headless</module>
+ <module>org.eclipse.osbp.ide.feature.tools</module>
+ </modules>
+
+ <profiles>
+ <!--<profile>
+ <id>build.p2</id>
+ <activation>
+ <property>
+ <name>osbp.build.p2</name>
+ </property>
+ </activation>
+ <modules>
+ <module>org.eclipse.osbp.ide.p2</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>build.product</id>
+ <activation>
+ <property>
+ <name>osbp.build.product</name>
+ </property>
+ </activation>
+ <modules>
+ <module>org.eclipse.osbp.ide.tools.p2.mirror</module>
+ <module>org.eclipse.osbp.ide.tools.p2.mirror.product</module>
+ </modules>
+ </profile>-->
+ </profiles>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src-gen</source>
+ <source>xtend-gen</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>plugin-source</id>
+ <goals>
+ <goal>plugin-source</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.xtend</groupId>
+ <artifactId>xtend-maven-plugin</artifactId>
+ <version>${xtext.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ <goal>xtend-install-debug-info</goal>
+ <goal>testCompile</goal>
+ <goal>xtend-test-install-debug-info</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <outputDirectory>xtend-gen</outputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>xtend-gen</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.xtend</groupId>
+ <artifactId>xtend-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ <goal>testCompile</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>xtend-gen</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>