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..90b0f6b
--- /dev/null
+++ b/.depVersions
@@ -0,0 +1,14 @@
+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.dependencies.feature.assert-utilities;min=1.2.2.2;max=1.2.3
+org.lunifera.dependencies.feature.jetty.websockets;min=8.1.15;max=8.1.16
+org.lunifera.dependencies.feature.atmosphere;min=2.1.2.vaadin6;max=2.1.3
+org.lunifera.dependencies.feature.transaction;min=0.3.1;max=0.3.2
+org.lunifera.dependencies.feature.vaadin;min=7.3.8;max=7.3.9
+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..4039733
--- /dev/null
+++ b/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons</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 b/LICENSE
new file mode 100644
index 0000000..3260e4f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,204 @@
+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.
+
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..c8ac9b7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,4 @@
+lunifera-vaaclipse-addons
+===============
+
+Contains useful addons for Vaaclipse.
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..e0ee0e9
--- /dev/null
+++ b/jenkins.build.config.xml
@@ -0,0 +1,28 @@
+<?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.addons</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.ecview.core</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.runtime</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.runtime.web</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.ui.api</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.vaaclipse</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.vaaclipse.addons.common.api</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.vaaclipse.addons.softwarefactory</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.vaaclipse.addons.app/.project b/org.eclipse.osbp.vaaclipse.addons.app/.project
new file mode 100644
index 0000000..bf376bd
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/.project
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.app</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.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.vaadin.integration.eclipse.addonStylesBuilder</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.vaaclipse.addons.app/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.app/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/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.vaaclipse.addons.app/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.app/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6fda93e
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/META-INF/MANIFEST.MF
@@ -0,0 +1,51 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.app
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.app;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.osbp.vaaclipse.addons.app.Activator
+Bundle-Vendor: Eclipse OSBP
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.2,1.3.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.4.0)",
+ org.eclipse.e4.core.services;bundle-version="1.0.0",
+ org.eclipse.e4.core.di;bundle-version="1.1.0",
+ org.eclipse.e4.ui.services;bundle-version="0.10.1",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.core.commands;bundle-version="3.6.1",
+ org.eclipse.e4.core.commands;bundle-version="0.10.1",
+ org.eclipse.equinox.http.registry;bundle-version="1.1.200",
+ org.eclipse.osgi.services;bundle-version="3.3.100",
+ org.eclipse.e4.ui.di;bundle-version="0.10.1",
+ org.eclipse.osbp.vaaclipse.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.publicapi;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="0.11.0",
+ com.vaadin.server;bundle-version="[7.5.7,7.7.0)",
+ com.vaadin.shared;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.osbp.vaaclipse.widgetset.default;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.ui.model.workbench,
+ org.eclipse.emf.ecore;bundle-version="2.9.0",
+ org.eclipse.osbp.ecview.jetty.manager;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.web.vaadin.databinding;bundle-version="[0.9.0,0.10.0)",
+ com.vaadin.external.atmosphere.runtime;bundle-version="2.2.7.vaadin1",
+ org.eclipse.emf.ecore.xmi;bundle-version="2.10.2",
+ org.eclipse.osbp.vaaclipse.addons.common.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.addons.common;bundle-version="[0.9.0,0.10.0)",
+ org.jsoup;bundle-version="1.7.2",
+ org.slf4j.api;bundle-version="1.7.2",
+ org.eclipse.osbp.vaaclipse.addons.softwarefactory
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.osbp.vaaclipse.addons.app;x-internal:=true;version="0.9.0",
+ org.eclipse.osbp.vaaclipse.addons.app.common;version="0.9.0",
+ org.eclipse.osbp.vaaclipse.addons.app.servlet;x-internal:=true;version="0.9.0",
+ org.eclipse.osbp.vaaclipse.addons.app.webapp;x-internal:=true;version="0.9.0"
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject;version="1.0.0",
+ javax.servlet;version="2.6.0",
+ javax.servlet.http;version="2.6.0",
+ org.eclipse.equinox.http.servlet;version="1.1.0",
+ org.eclipse.osbp.ui.api.user;version="0.9.0"
+Service-Component: OSGI-INF/*.xml
+Bundle-ClassPath: .
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.app.resources.StaticResources.xml
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.app.resources.StaticResources.xml b/org.eclipse.osbp.vaaclipse.addons.app/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.app.resources.StaticResources.xml
new file mode 100644
index 0000000..161c06e
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.app.resources.StaticResources.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" enabled="true" immediate="true" name="org.eclipse.osbp.vaaclipse.addons.app.resources.StaticResources">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.app.resources.StaticResources"/>
+ <property name="http.alias" value="/VAADIN"/>
+ <reference bind="bind" cardinality="1..1" interface="org.osgi.service.http.HttpService" name="bindHttpService" policy="static" target="(org.eclipse.osbp.ecview.jetty.serviceType=application)" unbind="unbind"/>
+ <reference bind="bindResourceInfoProvider" cardinality="1..1" interface="org.eclipse.osbp.vaaclipse.api.ResourceInfoProvider" name="bindResourceInfoProvider" policy="static" unbind="unbindResourceInfoProvider"/>
+ <reference bind="bindThemeEngine" cardinality="1..1" interface="org.eclipse.osbp.vaaclipse.publicapi.theme.ThemeEngine" name="bindThemeEngine" policy="static" unbind="unbindThemeEngine"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/about.html b/org.eclipse.osbp.vaaclipse.addons.app/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/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.vaaclipse.addons.app/about.ini b/org.eclipse.osbp.vaaclipse.addons.app/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/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.vaaclipse.addons.app/about.mappings b/org.eclipse.osbp.vaaclipse.addons.app/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/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.vaaclipse.addons.app/about.properties b/org.eclipse.osbp.vaaclipse.addons.app/about.properties
new file mode 100644
index 0000000..790bf9e
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/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.vaaclipse.addons.app
+
+################ 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.vaaclipse.addons.app/build.properties b/org.eclipse.osbp.vaaclipse.addons.app/build.properties
new file mode 100644
index 0000000..fffc0d2
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/build.properties
@@ -0,0 +1,11 @@
+output.. = target/classes/
+bin.includes = about.properties, about.mappings, about.ini, about.html, plugin.xml,\
+ META-INF/,\
+ .,\
+ css/,\
+ OSGI-INF/,\
+ .classpath,\
+ .project,\
+ LICENSE.txt
+source.. = src/
+src.includes = about.properties, about.mappings, about.ini, about.html, LICENSE.txt
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/css/default_user_css.css b/org.eclipse.osbp.vaaclipse.addons.app/css/default_user_css.css
new file mode 100644
index 0000000..fb75b7c
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/css/default_user_css.css
@@ -0,0 +1,2 @@
+@import "../reindeer/styles.css";
+@import "../vaaclipse_default_theme/styles.css";
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/plugin.xml b/org.eclipse.osbp.vaaclipse.addons.app/plugin.xml
new file mode 100644
index 0000000..f382deb
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/plugin.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ id="application"
+ point="org.eclipse.core.runtime.applications">
+ <application
+ cardinality="*"
+ thread="any">
+ <run
+ class="org.eclipse.osbp.vaaclipse.addons.app.VaadinE4Application">
+ </run>
+ </application>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/pom.xml b/org.eclipse.osbp.vaaclipse.addons.app/pom.xml
new file mode 100644
index 0000000..020638a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.app</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-server</artifactId>
+ <scope>provided</scope>
+ <version>${vaadin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-client</artifactId>
+ <scope>provided</scope>
+ <version>${vaadin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-client-compiled</artifactId>
+ <scope>provided</scope>
+ <version>${vaadin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-shared</artifactId>
+ <scope>provided</scope>
+ <version>${vaadin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-shared-deps</artifactId>
+ <scope>provided</scope>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-client-compiler</artifactId>
+ <scope>provided</scope>
+ <version>${vaadin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-themes</artifactId>
+ <version>${vaadin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/Activator.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/Activator.java
new file mode 100644
index 0000000..18956c8
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/Activator.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Rushan R. Gilmullin and others.
+ * 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:
+ * Rushan R. Gilmullin - initial API and implementation
+ * Florian Pirchner - adjustings for osbp implementation
+ *******************************************************************************/
+
+package org.eclipse.osbp.vaaclipse.addons.app;
+
+import org.eclipse.osgi.service.datalocation.Location;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Filter;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The Class Activator.
+ */
+public class Activator implements BundleActivator {
+
+ /** The context. */
+ private BundleContext context;
+
+ /** The location tracker. */
+ private ServiceTracker<Location, Location> locationTracker;
+
+ /** The activator. */
+ private static Activator activator;
+
+ /**
+ * Gets the default.
+ *
+ * @return the default
+ */
+ public static Activator getDefault() {
+ return activator;
+ }
+
+ /**
+ * Gets the context.
+ *
+ * @return the context
+ */
+ public BundleContext getContext() {
+ return context;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ activator = this;
+ this.context = context;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ VaadinE4Application instance = VaadinE4Application.getInstance();
+
+ if (instance != null)
+ instance.shutdown();
+
+ if (locationTracker != null) {
+ locationTracker.close();
+ locationTracker = null;
+ }
+ }
+
+ /**
+ * Gets the bundle.
+ *
+ * @return the bundle
+ */
+ public Bundle getBundle() {
+ if (context == null) {
+ return null;
+ }
+ return context.getBundle();
+ }
+
+ /**
+ * Gets the instance location.
+ *
+ * @return the instance Location service
+ */
+ public Location getInstanceLocation() {
+ if (locationTracker == null) {
+ Filter filter = null;
+ try {
+ filter = context.createFilter(Location.INSTANCE_FILTER);
+ } catch (InvalidSyntaxException e) {
+ // ignore this. It should never happen as we have tested the
+ // above format.
+ }
+ locationTracker = new ServiceTracker<Location, Location>(context,
+ filter, null);
+ locationTracker.open();
+ }
+ return locationTracker.getService();
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/VaadinE4Application.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/VaadinE4Application.java
new file mode 100644
index 0000000..7881924
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/VaadinE4Application.java
@@ -0,0 +1,452 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Rushan R. Gilmullin and others.
+ * 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:
+ * Rushan R. Gilmullin - initial API and implementation
+ * Florian Pirchner - adjustings for osbp implementation
+ *******************************************************************************/
+
+package org.eclipse.osbp.vaaclipse.addons.app;
+
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.concurrent.ArrayBlockingQueue;
+
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+
+import org.eclipse.e4.core.services.log.Logger;
+import org.eclipse.e4.ui.internal.workbench.WorkbenchLogger;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.osbp.vaaclipse.addons.app.webapp.VaadinWebApplication;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.HttpService;
+import org.eclipse.osbp.vaaclipse.api.ResourceInfoProvider;
+
+import com.vaadin.ui.themes.Reindeer;
+
+/**
+ * The Class VaadinE4Application.
+ */
+@SuppressWarnings("restriction")
+public class VaadinE4Application implements IApplication, ResourceInfoProvider {
+
+ /** The queue. */
+ private ArrayBlockingQueue<String> queue;
+
+ /** The logger. */
+ private Logger logger = new WorkbenchLogger(
+ "org.eclipse.osbp.vaaclipse.app");
+
+ /** The app context. */
+ private IApplicationContext appContext;
+
+ /** The instance. */
+ private static VaadinE4Application instance;
+
+ /** The web application. */
+ private VaadinWebApplication webApplication;
+
+ /** The Constant EXIT. */
+ public static final String EXIT = "EXIT";
+
+ /** The frame. */
+ JFrame frame;
+
+ /** The context path. */
+ private String contextPath = "/";
+
+ /** The app widgetset. */
+ private String appWidgetset;
+
+ /** The app auth provider. */
+ private String appAuthProvider;
+
+ /**
+ * Gets the single instance of VaadinE4Application.
+ *
+ * @return single instance of VaadinE4Application
+ */
+ public static VaadinE4Application getInstance() {
+ return instance;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.ResourceInfoProvider#getCssTheme()
+ */
+ @Override
+ public String getCssTheme() {
+ return webApplication.getThemeId();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.ResourceInfoProvider#getApplicationtWidgetset()
+ */
+ @Override
+ public String getApplicationtWidgetset() {
+ return appWidgetset;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.ResourceInfoProvider#getApplicationtWidgetsetName()
+ */
+ @Override
+ public String getApplicationtWidgetsetName() {
+ return webApplication.getWidgetsetName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.ResourceInfoProvider#getApplicationHeaderIcon()
+ */
+ @Override
+ public String getApplicationHeaderIcon() {
+ String uri = webApplication.getHeaderIconURI();
+ if (uri == null)
+ uri = "org.eclipse.osbp.vaaclipse.resources/VAADIN/themes/vaaclipse_default_theme/img/vaaclipse.png";
+ return uri;
+ }
+
+ /**
+ * Gets the application authentication provider.
+ *
+ * @return the application authentication provider
+ */
+ public String getApplicationAuthenticationProvider() {
+ return appAuthProvider;
+ }
+
+ /**
+ * Gets the instance location.
+ *
+ * @return the instance location
+ */
+ public Location getInstanceLocation() {
+ return Activator.getDefault().getInstanceLocation();
+ }
+
+ /**
+ * Gets the app context.
+ *
+ * @return the app context
+ */
+ public IApplicationContext getAppContext() {
+ return appContext;
+ }
+
+ /**
+ * Gets the logger.
+ *
+ * @return the logger
+ */
+ public Logger getLogger() {
+ return logger;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
+ */
+ @Override
+ public Object start(IApplicationContext context) throws Exception {
+ instance = this;
+ appContext = context;
+
+ registerServices();
+
+ logger.debug("VaadinE4Application.start()");
+ context.applicationRunning();
+
+ queue = new ArrayBlockingQueue<String>(10);
+
+ startVaadinWebApplication();
+
+ String showFrame = appContext.getBrandingProperty("showFrame");
+
+ if ("true".equalsIgnoreCase(showFrame))
+ showFrame();
+
+ String msg;
+ while (!(msg = queue.take()).equals(EXIT)) {
+ System.out.println("Vaaclipse Application shutdowned");
+ }
+
+ if (frame != null) {
+ frame.setVisible(false);
+ frame.dispose();
+ }
+
+ return EXIT_OK;
+ }
+
+ /**
+ * Register services.
+ */
+ private void registerServices() {
+ Activator
+ .getDefault()
+ .getBundle()
+ .getBundleContext()
+ .registerService(ResourceInfoProvider.class.getName(), this,
+ null);
+ }
+
+ /**
+ * Read path property.
+ *
+ * @param propName
+ * the prop name
+ * @return the string
+ */
+ private String readPathProperty(String propName) {
+ String propValue = appContext.getBrandingProperty(propName);
+ if (propValue == null)
+ return propValue;
+ propValue = propValue.trim();
+ if (!propValue.startsWith("platform:/plugin/")) {
+ propValue = "platform:/plugin/" + propValue;
+ }
+ return propValue;
+ }
+
+ /**
+ * Read class property.
+ *
+ * @param propName
+ * the prop name
+ * @return the string
+ */
+ private String readClassProperty(String propName) {
+ String propValue = appContext.getBrandingProperty(propName);
+ if (propValue == null)
+ return propValue;
+ propValue = propValue.trim();
+ String pathStart = "bundleclass://";
+ if (!propValue.startsWith(pathStart)) {
+ propValue = pathStart + propValue;
+ }
+ return propValue;
+ }
+
+ /**
+ * Start vaadin web application.
+ *
+ * @throws Exception
+ * the exception
+ */
+ private void startVaadinWebApplication() throws Exception {
+ String port = System.getProperty("org.eclipse.osbp.ecview.jetty.port");
+ if (port == null)
+ port = "8080";
+
+ contextPath = System
+ .getProperty("org.eclipse.osbp.ecview.jetty.contextpath");
+
+ if (contextPath == null)
+ contextPath = "/";
+
+ String cssTheme = appContext.getBrandingProperty("cssTheme");
+
+ if (cssTheme == null)
+ cssTheme = Reindeer.THEME_NAME;
+
+ appWidgetset = readPathProperty("applicationWidgetset");
+ if (appWidgetset == null || appWidgetset.trim().isEmpty()) {
+ appWidgetset = "platform:/plugin/org.eclipse.osbp.vaaclipse.widgetset.default/resources/org.eclipse.osbp.vaaclipse.widgetset.DefaultWidgetset";
+ // appWidgetset =
+ // "platform:/plugin/org.eclipse.osbp.vaaclipse.resources/VAADIN/widgetsets/vaaclipse_widgetset.widgetset.Vaaclipse_widgetsetWidgetset";
+ } else
+ appWidgetset = appWidgetset.trim();
+
+ int index = appWidgetset.lastIndexOf("/");
+ if (index < 0)
+ throw new IllegalStateException(
+ "applicationWidgetset property has wrong value");
+
+ if (index == appWidgetset.length() - 1) {
+ appWidgetset = appWidgetset.substring(0, appWidgetset.length() - 1);
+ index = appWidgetset.lastIndexOf("/");
+ if (index < 0)
+ throw new IllegalStateException(
+ "applicationWidgetset property has wrong value");
+ }
+
+ String appWidgetsetName = appWidgetset.substring(index + 1);
+
+ String appHeaderIcon = readPathProperty("applicationHeaderIcon");
+
+ if (appHeaderIcon == null || appHeaderIcon.trim().isEmpty())
+ appHeaderIcon = "platform:/plugin/com.vaadin.themes/VAADIN/themes/reindeer/favicon.ico";
+
+ appAuthProvider = readClassProperty("applicationAuthenticationProvider");
+
+ String productionMode = appContext
+ .getBrandingProperty("vaadin.productionMode");
+ String disableXsrfProtection = appContext
+ .getBrandingProperty("vaadin.disable-xsrf-protection");
+ String pushmode = appContext.getBrandingProperty("vaadin.pushmode");
+
+ if ("true".equals(disableXsrfProtection)) {
+ System.out.println("Warning: XSRF protection is OFF!");
+ }
+
+ final BundleContext bundleContext = Activator.getDefault().getBundle()
+ .getBundleContext();
+ ServiceReference<?> httpServiceRef = bundleContext
+ .getServiceReference(HttpService.class.getName());
+ if (httpServiceRef == null) {
+ JOptionPane
+ .showMessageDialog(null, "HttpService is not accessible");
+ throw new Exception();
+ }
+
+ webApplication = new VaadinWebApplication(bundleContext.getBundle());
+ webApplication.setContextPath(contextPath);
+ webApplication.setWidgetsetName(appWidgetsetName);
+ webApplication.setProductionMode(Boolean
+ .valueOf(productionMode != null ? productionMode : "true"));
+ webApplication
+ .setInitProperty("disable-xsrf-protection",
+ disableXsrfProtection != null ? disableXsrfProtection
+ : "false");
+ if (pushmode != null) {
+ System.out.println("Push Enabled");
+ webApplication.setInitProperty("pushmode", pushmode);
+ }
+ webApplication.setPort(Integer.valueOf(port));
+ webApplication.setHeaderIconURI(appHeaderIcon);
+ webApplication.setThemeId(cssTheme);
+
+ // start the vaadin application
+ webApplication.activate();
+ }
+
+ /**
+ * Show frame.
+ */
+ private void showFrame() {
+ frame = new JFrame();
+ frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+ frame.setSize(500, 115);
+ frame.setResizable(false);
+ frame.setTitle("Vaaclipse server");
+ final Container contentPane = frame.getContentPane();
+ contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
+
+ String host;
+ try {
+ InetAddress thisIp = InetAddress.getLocalHost();
+ host = thisIp.getHostAddress().toString();
+ } catch (UnknownHostException e1) {
+ host = "localhost";
+ }
+
+ final JLabel label = new JLabel(String.format(
+ "Vaaclipse server started at http://%s:%s%s", host,
+ webApplication.getPort(), contextPath));
+ label.setAlignmentX(Component.CENTER_ALIGNMENT);
+ contentPane.add(label);
+
+ contentPane.add(Box.createVerticalStrut(5));
+
+ final JLabel productionModeLabel = new JLabel("ProductionMode: "
+ + webApplication.isProductionMode());
+ productionModeLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
+ contentPane.add(productionModeLabel);
+
+ contentPane.add(Box.createVerticalStrut(20));
+
+ JButton exitButton = new JButton("Shutdown");
+ exitButton.setAlignmentX(Component.CENTER_ALIGNMENT);
+ exitButton.addActionListener(new ActionListener() {
+
+ @Override
+ public void actionPerformed(ActionEvent arg0) {
+ shutdown(true);
+ return;
+ }
+ });
+ contentPane.add(exitButton);
+
+ frame.addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ super.windowClosing(e);
+
+ shutdown(true);
+ return;
+ }
+ });
+
+ // centering frame
+ Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
+ int x = (screenDimension.width - frame.getSize().width) / 2;
+ int y = (screenDimension.height - frame.getSize().height) / 2;
+
+ // Move the window
+ frame.setLocation(x, y);
+
+ frame.setVisible(true);
+ }
+
+ /**
+ * Shutdown.
+ *
+ * @param confirm
+ * the confirm
+ * @return true, if successful
+ */
+ private boolean shutdown(boolean confirm) {
+ boolean exit = true;
+ if (confirm) {
+ exit = JOptionPane.OK_OPTION == JOptionPane.showOptionDialog(frame,
+ "Are you really want shutdown server?", "Warning",
+ JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
+ null, null, JOptionPane.CANCEL_OPTION);
+ }
+
+ if (exit) {
+ shutdown();
+ }
+ return exit;
+ }
+
+ /**
+ * Shutdown.
+ */
+ public void shutdown() {
+ System.out.println("Vaaclipse Application will shutdown");
+ try {
+ queue.put(EXIT);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.app.IApplication#stop()
+ */
+ @Override
+ public void stop() {
+ // will never be invoked
+ webApplication.deactivate();
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/Constants.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/Constants.java
new file mode 100644
index 0000000..f7a903b
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/Constants.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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 API and implementation
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.common;
+
+/**
+ * The Class Constants.
+ */
+public class Constants {
+
+ /**
+ * Theproperty for specifying the widgetset.
+ */
+ public static final String PROP_WIDGETSET = "widgetset";
+
+ /**
+ * The property for specifying the widgetset.
+ */
+ public static final String PROP_PRODUCTION_MODE = "productionMode";
+
+ /**
+ * The property value that should be used as alias to register the servlet.
+ */
+ public static final String PROP_WEBAPP__ALIAS = "alias";
+
+ /**
+ * The prefix for the CM managed service PID.
+ */
+ public static final String PROP_MANAGED_SERVICE_PREFIX = "vaaclipse.app.webapp";
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/OSGiUI.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/OSGiUI.java
new file mode 100644
index 0000000..7d9739b
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/OSGiUI.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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 API and implementation
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.common;
+
+import org.osgi.service.component.ComponentInstance;
+
+import com.vaadin.server.SessionDestroyEvent;
+import com.vaadin.server.SessionDestroyListener;
+import com.vaadin.ui.UI;
+
+/**
+ * The Class OSGiUI.
+ */
+@SuppressWarnings("serial")
+public abstract class OSGiUI extends UI implements SessionDestroyListener {
+
+ /** The instance. */
+ private ComponentInstance instance;
+
+ /**
+ * Sets the component instance that can be used to dispose the instance of
+ * that UI.
+ *
+ * @param instance
+ * the new component instance
+ */
+ public void setComponentInstance(ComponentInstance instance) {
+ if (this.instance != null) {
+ throw new IllegalArgumentException(
+ "Component instance may only be set onece!");
+ }
+ this.instance = instance;
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.ui.UI#attach()
+ */
+ @Override
+ public void attach() {
+ super.attach();
+
+ getSession().getService().addSessionDestroyListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.server.SessionDestroyListener#sessionDestroy(com.vaadin.server.SessionDestroyEvent)
+ */
+ public void sessionDestroy(SessionDestroyEvent event) {
+ dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.ui.UI#detach()
+ */
+ @Override
+ public void detach() {
+ getSession().getService().removeSessionDestroyListener(this);
+
+ super.detach();
+
+ dispose();
+ }
+
+ /**
+ * Is called to remove the instance as an OSGi service and to cleanup the
+ * OSGi runtime.
+ */
+ protected void dispose() {
+ if (instance != null) {
+ instance.dispose();
+ instance = null;
+ }
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/OSGiUIProvider.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/OSGiUIProvider.java
new file mode 100644
index 0000000..94b6ea5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/common/OSGiUIProvider.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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 API and implementation
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.common;
+
+import org.eclipse.osbp.vaaclipse.addons.app.VaadinE4Application;
+import org.eclipse.osbp.vaaclipse.addons.app.webapp.VaadinUI;
+
+import com.vaadin.server.UIClassSelectionEvent;
+import com.vaadin.server.UICreateEvent;
+import com.vaadin.server.UIProvider;
+import com.vaadin.ui.UI;
+
+/**
+ * The Class OSGiUIProvider.
+ */
+@SuppressWarnings("serial")
+public class OSGiUIProvider extends UIProvider {
+
+ /**
+ * Instantiates a new OS gi ui provider.
+ */
+ public OSGiUIProvider() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.server.UIProvider#getUIClass(com.vaadin.server.UIClassSelectionEvent)
+ */
+ @Override
+ public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
+ return VaadinUI.class;
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.server.UIProvider#createInstance(com.vaadin.server.UICreateEvent)
+ */
+ @Override
+ public UI createInstance(UICreateEvent event) {
+ return new VaadinUI();
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.server.UIProvider#getTheme(com.vaadin.server.UICreateEvent)
+ */
+ @Override
+ public String getTheme(UICreateEvent event) {
+ return VaadinE4Application.getInstance().getCssTheme();
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/resources/StaticResources.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/resources/StaticResources.java
new file mode 100644
index 0000000..1b2d977
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/resources/StaticResources.java
@@ -0,0 +1,368 @@
+/**
+ * Copyright (c) 2011, 2014 - Lunifera GmbH (Gross Enzersdorf)
+ * 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.vaaclipse.addons.app.resources;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.osbp.vaaclipse.api.ResourceInfoProvider;
+import org.eclipse.osbp.vaaclipse.publicapi.theme.Theme;
+import org.eclipse.osbp.vaaclipse.publicapi.theme.ThemeContribution;
+import org.eclipse.osbp.vaaclipse.publicapi.theme.ThemeEngine;
+import org.osgi.framework.BundleContext;
+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;
+import org.osgi.service.http.HttpService;
+
+/**
+ * This class runs as an OSGi component and serves the themes and widgetsets
+ * directly from the core Vaadin bundle.
+ * <p/>
+ *
+ * To add your own theme or widget set create a fragment which contains your
+ * theme/widgetset files and export those as packages. The
+ * <code>Fragment-Host</code> should be set to the Vaadin core bundle. The
+ * fragment containing your theme/widgetset resources will be added to the core
+ * Vaadin bundle dynamically.
+ * <p/>
+ *
+ * Of course static resources should really be deployed separately to a web
+ * server that proxies servlet requests on to the container.
+ *
+ * @author brindy
+ */
+@SuppressWarnings("serial")
+@Component(immediate = true, enabled = true, property = { "http.alias=/VAADIN" })
+public class StaticResources extends HttpServlet {
+
+ /** The http service. */
+ private HttpService httpService;
+
+ /** The resource info provider. */
+ private ResourceInfoProvider resourceInfoProvider;
+
+ /** The theme engine. */
+ private ThemeEngine themeEngine;
+
+ /** The alias. */
+ private String alias;
+
+ /**
+ * Instantiates a new static resources.
+ */
+ public StaticResources() {
+
+ }
+
+ /**
+ * Bind.
+ *
+ * @param httpService
+ * the http service
+ */
+ @Reference(name = "bindHttpService", service = HttpService.class, target = "(org.eclipse.osbp.ecview.jetty.serviceType=application)", cardinality = ReferenceCardinality.MANDATORY)
+ public void bind(HttpService httpService) {
+ this.httpService = httpService;
+ }
+
+ /**
+ * Unbind.
+ *
+ * @param httpService
+ * the http service
+ */
+ public void unbind(HttpService httpService) {
+ this.httpService = null;
+ }
+
+ /**
+ * Bind resource info provider.
+ *
+ * @param provider
+ * the provider
+ */
+ @Reference(name = "bindResourceInfoProvider", service = ResourceInfoProvider.class, cardinality = ReferenceCardinality.MANDATORY)
+ public void bindResourceInfoProvider(ResourceInfoProvider provider) {
+ this.resourceInfoProvider = provider;
+ }
+
+ /**
+ * Unbind resource info provider.
+ *
+ * @param provider
+ * the provider
+ */
+ public void unbindResourceInfoProvider(ResourceInfoProvider provider) {
+ this.resourceInfoProvider = null;
+ }
+
+ /**
+ * Bind theme engine.
+ *
+ * @param themeEngine
+ * the theme engine
+ */
+ @Reference(name = "bindThemeEngine", service = ThemeEngine.class, cardinality = ReferenceCardinality.MANDATORY)
+ public void bindThemeEngine(ThemeEngine themeEngine) {
+ this.themeEngine = themeEngine;
+ }
+
+ /**
+ * Unbind theme engine.
+ *
+ * @param themeEngine
+ * the theme engine
+ */
+ public void unbindThemeEngine(ThemeEngine themeEngine) {
+ this.themeEngine = null;
+ }
+
+ /**
+ * Start.
+ *
+ * @param ctx
+ * the ctx
+ * @param properties
+ * the properties
+ * @throws Exception
+ * the exception
+ */
+ @Activate
+ public void start(BundleContext ctx, Map<String, String> properties)
+ throws Exception {
+ alias = properties.get("http.alias");
+ httpService.registerServlet(alias, this, null, null);
+ }
+
+ /**
+ * Stop.
+ */
+ @Deactivate
+ public void stop() {
+ httpService.unregister(alias);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest
+ * , javax.servlet.http.HttpServletResponse)
+ */
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ if (this.resourceInfoProvider == null)
+ resp.sendError(HttpServletResponse.SC_CONFLICT);
+
+ String path = req.getPathInfo();
+
+ if (path.endsWith("css")) {
+ resp.setContentType("text/css");
+ }
+
+ String resourcePath = alias + path;
+
+ String themeId = null;
+ if (path.startsWith("/themes")) {
+ themeId = path.split("/")[2];
+ }
+ if (themeId == null || themeId.isEmpty()) {
+ themeId = resourceInfoProvider.getCssTheme();
+ }
+ InputStream in = getInputStream(resourcePath,
+ themeEngine.getTheme(themeId),
+ resourceInfoProvider.getApplicationtWidgetset(),
+ resourceInfoProvider.getApplicationtWidgetsetName(),
+ resourceInfoProvider.getApplicationHeaderIcon());
+
+ if (in == null) {
+ resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+ return;
+ }
+
+ try {
+ OutputStream out = resp.getOutputStream();
+
+ byte[] buffer = new byte[1024];
+ int read = 0;
+
+ try {
+ while (-1 != (read = in.read(buffer))) {
+ out.write(buffer, 0, read);
+ }
+ } finally {
+ out.close();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+ } finally {
+ in.close();
+ }
+ }
+
+ /**
+ * Gets the input stream.
+ *
+ * @param url
+ * the url
+ * @param theme
+ * the theme
+ * @param e4WidgetsetUri
+ * the e4 widgetset uri
+ * @param e4WidgetsetName
+ * the e4 widgetset name
+ * @param headerIconUri
+ * the header icon uri
+ * @return the input stream
+ */
+ public InputStream getInputStream(String url, Theme theme,
+ String e4WidgetsetUri, String e4WidgetsetName, String headerIconUri) {
+ String path = null;
+
+ if (url.endsWith("favicon.ico")) {
+ path = headerIconUri;
+ } else {
+ StringBuffer urlString = new StringBuffer(url);
+ urlString.trimToSize();
+ if (urlString.length() == 0)
+ throw new IllegalArgumentException();
+ if (urlString.charAt(0) != '/')
+ throw new IllegalArgumentException();
+ String processedUrl = urlString.substring(1);
+ String[] segments = processedUrl.split("/");
+
+ if (segments.length < 2)
+ throw new IllegalArgumentException();
+
+ if (!"VAADIN".equals(segments[0]))
+ throw new IllegalArgumentException();
+
+ if (segments[1].equals("widgetsets")) {
+ // return
+ // "platform:/plugin/org.eclipse.osbp.vaaclipse.resources" +
+ // url;
+ String widgetSetName = segments[2];
+ if (e4WidgetsetName.equals(widgetSetName)) {
+ String restPath = buildSegments(segments, 3);
+ path = e4WidgetsetUri + "/" + restPath;
+ } else {
+ path = "platform:/plugin/com.vaadin.client-compiled" + url;
+ }
+ } else if (segments[1].equals("themes")) {
+ String themeName = segments[2];
+
+ if (theme.getWebId().equals(themeName)) {
+ if ("styles.css".equals(segments[3])) {
+ return theme.getCssAsStream();
+ } else if ("original_styles.css".equals(segments[3])) {
+ path = theme.getCssUri();
+ } else {
+ if ("plugin".equals(segments[3])) // this is absolute
+ // bundle path
+ {
+ String bundleName = segments[4];
+ path = "platform:/plugin/" + bundleName + "/"
+ + buildSegments(segments, 5);
+ } else {// this is relative theme path
+ if (url.endsWith("css")) {
+ String cssFileName = url.substring(url
+ .lastIndexOf('/') + 1);
+ cssFileName = cssFileName.substring(0,
+ cssFileName.lastIndexOf('.'));
+ ThemeContribution themeContribution = themeEngine
+ .getThemeContributionByWebId(cssFileName);
+ if (themeContribution != null)
+ path = themeContribution.getCssUri();
+ else {
+ for (String cssUri : theme.getAllCssURIs()) {
+ String relPath = buildSegments(
+ segments, 3);
+ String cssPath = cssUri.substring(0,
+ cssUri.lastIndexOf('/'))
+ + "/"
+ + relPath;
+ try {
+ URL cssUrl = new URL(cssPath);
+ return cssUrl.openStream();
+ } catch (Exception e) {
+ }
+ }
+ }
+ } else {
+ String relPath = buildSegments(segments, 3);
+ return theme.getThemeResourceAsStream(relPath);
+ }
+ }
+ }
+ } else // any theme
+ {
+ if ("styles.css".equals(segments[3])) {
+ Theme inheritedTheme = themeEngine.getTheme(themeName);
+ path = inheritedTheme.getCssUri();
+ } else {
+ path = "platform:/plugin/com.vaadin.themes" + url;
+ }
+ }
+ } else if ("vaadinBootstrap.js".equals(segments[1])) {
+ path = "platform:/plugin/com.vaadin.server" + url;
+ } else if ("vaadinPush.debug.js".equals(segments[1])) {
+ path = "platform:/plugin/com.vaadin.push" + url;
+ } else if ("vaadinPush.js".equals(segments[1])) {
+ path = "platform:/plugin/com.vaadin.push" + url;
+ } else {
+ return null;
+ }
+ }
+
+ try {
+ URL u = new URL(path);
+ return u.openStream();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * Builds the segments.
+ *
+ * @param segments
+ * the segments
+ * @param start
+ * the start
+ * @return the string
+ */
+ private static String buildSegments(String[] segments, int start) {
+ StringBuffer b = new StringBuffer();
+ for (int i = start; i < segments.length; i++) {
+ b.append(segments[i]);
+ b.append('/');
+ }
+ if (b.length() > 0)
+ return b.substring(0, b.length() - 1);
+ else
+ return "";
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/OSGiServletService.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/OSGiServletService.java
new file mode 100644
index 0000000..4a577a6
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/OSGiServletService.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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 API and implementation
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.servlet;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.eclipse.osbp.runtime.web.vaadin.databinding.VaadinObservables;
+
+import com.vaadin.server.DeploymentConfiguration;
+import com.vaadin.server.ServiceException;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinServlet;
+import com.vaadin.server.VaadinServletService;
+import com.vaadin.server.VaadinSession;
+import com.vaadin.ui.UI;
+
+/**
+ * The Class OSGiServletService.
+ */
+@SuppressWarnings("serial")
+public class OSGiServletService extends VaadinServletService {
+
+ /** The factory. */
+ private final IVaadinSessionFactory factory;
+
+ /**
+ * Instantiates a new OS gi servlet service.
+ *
+ * @param servlet
+ * the servlet
+ * @param deploymentConfiguration
+ * the deployment configuration
+ * @param factory
+ * the factory
+ * @throws ServiceException
+ * the service exception
+ */
+ public OSGiServletService(VaadinServlet servlet,
+ DeploymentConfiguration deploymentConfiguration,
+ IVaadinSessionFactory factory) throws ServiceException {
+ super(servlet, deploymentConfiguration);
+
+ this.factory = factory;
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.server.VaadinServletService#getConfiguredWidgetset(com.vaadin.server.VaadinRequest)
+ */
+ @Override
+ public String getConfiguredWidgetset(VaadinRequest request) {
+ return super.getConfiguredWidgetset(request);
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.server.VaadinService#createVaadinSession(com.vaadin.server.VaadinRequest)
+ */
+ @Override
+ protected VaadinSession createVaadinSession(VaadinRequest request)
+ throws ServiceException {
+ return factory.createSession(request, getCurrentServletRequest());
+ }
+
+ // @Override
+ // protected List<RequestHandler> createRequestHandlers()
+ // throws ServiceException {
+ // List<RequestHandler> handlers = super.createRequestHandlers();
+ // for (RequestHandler h : handlers) {
+ // if (h instanceof UidlRequestHandler) {
+ // Field rpcField = null;
+ // try {
+ // rpcField = h.getClass().getDeclaredField("rpcHandler");
+ // rpcField.setAccessible(true);
+ // vaaclipseServerRpcHandler = new VaaclipseServerRpcHandler();
+ // rpcField.set(h, vaaclipseServerRpcHandler);
+ // } catch (Exception e) {
+ // e.printStackTrace();
+ // } finally {
+ // if (rpcField != null)
+ // rpcField.setAccessible(false);
+ // }
+ //
+ // break;
+ // }
+ // }
+ // return handlers;
+ // }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.server.VaadinService#findUI(com.vaadin.server.VaadinRequest)
+ */
+ public UI findUI(VaadinRequest request) {
+ UI instance = super.findUI(request);
+
+ // activate the realm for the current ui and thread
+ VaadinObservables.activateRealm(instance);
+
+ return instance;
+ }
+
+ /**
+ * Creates new instances of vaadin sessions.
+ */
+ public interface IVaadinSessionFactory {
+
+ /**
+ * Returns a new instance of a vaadin session.
+ *
+ * @param request
+ * the request
+ * @param httpServletRequest
+ * the http servlet request
+ * @return the vaadin session
+ */
+ VaadinSession createSession(VaadinRequest request,
+ HttpServletRequest httpServletRequest);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/ServletContextListenerServletAdaptor.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/ServletContextListenerServletAdaptor.java
new file mode 100644
index 0000000..392f652
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/ServletContextListenerServletAdaptor.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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
+ *
+ * Information:
+ * Based on original sources of
+ * - com.c4biz.osgiutils.vaadin.equinox.shiro.ServletContextListenerServletAdaptor from Cristiano Gaviao
+ *
+ * Contributors:
+ * Florian Pirchner - migrated to vaadin 7 and copied into org.eclipse.osbp namespace
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.servlet;
+
+import java.io.IOException;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+/**
+ * The Class ServletContextListenerServletAdaptor.
+ */
+public class ServletContextListenerServletAdaptor implements Servlet {
+
+ /** The config. */
+ private ServletConfig config;
+
+ /** The listener. */
+ private ServletContextListener listener;
+
+ /** The delegate. */
+ private Servlet delegate;
+
+ /**
+ * Instantiates a new servlet context listener servlet adaptor.
+ *
+ * @param listener
+ * the listener
+ * @param delegate
+ * the delegate
+ */
+ public ServletContextListenerServletAdaptor(
+ ServletContextListener listener, Servlet delegate) {
+ this.listener = listener;
+ this.delegate = delegate;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
+ */
+ public void init(ServletConfig config) throws ServletException {
+ this.config = config;
+ listener.contextInitialized(new ServletContextEvent(config
+ .getServletContext()));
+ delegate.init(config);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.Servlet#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
+ */
+ public void service(ServletRequest req, ServletResponse resp)
+ throws ServletException, IOException {
+ delegate.service(req, resp);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.Servlet#destroy()
+ */
+ public void destroy() {
+ delegate.destroy();
+ listener.contextDestroyed(new ServletContextEvent(config
+ .getServletContext()));
+ config = null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.Servlet#getServletConfig()
+ */
+ public ServletConfig getServletConfig() {
+ return config;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.Servlet#getServletInfo()
+ */
+ public String getServletInfo() {
+ return "";
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/VaadinExecutorServiceImpl.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/VaadinExecutorServiceImpl.java
new file mode 100644
index 0000000..3d2ca08
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/VaadinExecutorServiceImpl.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Rushan R. Gilmullin and others.
+ * 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:
+ * Rushan R. Gilmullin - initial API and implementation
+ * Florian Pirchner - adjustings for osbp implementation
+ *******************************************************************************/
+
+package org.eclipse.osbp.vaaclipse.addons.app.servlet;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+
+import org.eclipse.osbp.vaaclipse.api.VaadinExecutorService;
+
+/**
+ * The Class VaadinExecutorServiceImpl.
+ */
+public class VaadinExecutorServiceImpl implements VaadinExecutorService {
+
+ /** The runnables. */
+ private Queue<Runnable> runnables = new LinkedList<Runnable>();
+
+ /** The keys. */
+ private Set<Object> keys = new HashSet<Object>();
+
+ /** The runnable2 key. */
+ private Map<Runnable, Object> runnable2Key = new HashMap<Runnable, Object>();
+
+ /** The runnables2. */
+ private Queue<Runnable> runnables2 = new LinkedList<Runnable>();
+
+ /**
+ * Exec.
+ */
+ public synchronized void exec() {
+ // System.out.println("exec called!");
+ Runnable runnable;
+ while ((runnable = runnables.poll()) != null) {
+ try {
+ // System.out.println("Runnable 1");
+ runnable.run();
+ Object key = runnable2Key.remove(runnable);
+ keys.remove(key);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ for (Runnable runnable2 : runnables2) {
+ try {
+ // System.out.println("Runnable 2");
+ runnable2.run();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ // clean runnables that may added during runnables2 execution
+ runnables.clear();
+ runnable2Key.clear();
+ keys.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.VaadinExecutorService#invokeLater(java.lang.Runnable)
+ */
+ public synchronized void invokeLater(Runnable runnable) {
+ this.runnables.add(runnable);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.VaadinExecutorService#invokeLater(java.lang.Object, java.lang.Runnable)
+ */
+ @Override
+ public void invokeLater(Object key, Runnable runnable) {
+ if (!this.keys.contains(key)) {
+ this.keys.add(key);
+ this.runnable2Key.put(runnable, key);
+ this.runnables.add(runnable);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.VaadinExecutorService#containsKey(java.lang.Object)
+ */
+ @Override
+ public boolean containsKey(Object key) {
+ return this.keys.contains(key);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.VaadinExecutorService#invokeLaterAlways(java.lang.Runnable)
+ */
+ public synchronized void invokeLaterAlways(Runnable runnable) {
+ this.runnables2.add(runnable);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.VaadinExecutorService#removeAlwaysRunnable(java.lang.Runnable)
+ */
+ @Override
+ public synchronized void removeAlwaysRunnable(Runnable runnable) {
+ this.runnables2.remove(runnable);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.VaadinExecutorService#removeAllAlwaysRunnables()
+ */
+ @Override
+ public void removeAllAlwaysRunnables() {
+ runnables2.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.VaadinExecutorService#removeAllInvokeLater()
+ */
+ @Override
+ public void removeAllInvokeLater() {
+ this.runnables.clear();
+ this.keys.clear();
+ this.runnable2Key.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.api.VaadinExecutorService#dispose()
+ */
+ @Override
+ public void dispose() {
+ removeAllAlwaysRunnables();
+ removeAllInvokeLater();
+
+ runnables = null;
+ runnables2 = null;
+ keys = null;
+ runnable2Key = null;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/VaadinOSGiServlet.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/VaadinOSGiServlet.java
new file mode 100644
index 0000000..73923ac
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/VaadinOSGiServlet.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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
+ *
+ * Information:
+ * Based on original sources of
+ * - org.vaadin.artur.icepush.ICEPushServlet from Arthur Signell
+ *
+ * Contributors:
+ * Florian Pirchner - implementation
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.servlet;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.eclipse.osbp.vaaclipse.addons.app.common.OSGiUIProvider;
+
+import com.vaadin.server.DeploymentConfiguration;
+import com.vaadin.server.ServiceException;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinServlet;
+import com.vaadin.server.VaadinSession;
+
+/**
+ * Used to create instances of applications that have been registered with the
+ * container via a component factory.
+ *
+ */
+public class VaadinOSGiServlet extends VaadinServlet {
+
+ /** The Constant serialVersionUID. */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Default constructor.
+ */
+ public VaadinOSGiServlet() {
+
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.server.VaadinServlet#createServletService(com.vaadin.server.DeploymentConfiguration)
+ */
+ @Override
+ protected OSGiServletService createServletService(
+ DeploymentConfiguration deploymentConfiguration)
+ throws ServiceException {
+
+ // create the servlet service initialized with the ui provider
+ OSGiServletService service = new OSGiServletService(this,
+ deploymentConfiguration,
+ new OSGiServletService.IVaadinSessionFactory() {
+ @Override
+ public VaadinSession createSession(VaadinRequest request,
+ HttpServletRequest httpServletRequest) {
+ VaadinSession session = new VaadinSession(
+ request.getService());
+ session.addUIProvider(new OSGiUIProvider());
+ return session;
+ }
+ });
+ service.init();
+ return service;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/WebResourcesHttpContext.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/WebResourcesHttpContext.java
new file mode 100644
index 0000000..0261cb2
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/servlet/WebResourcesHttpContext.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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
+ *
+ * Information:
+ * Based on original sources of
+ * - com.c4biz.osgiutils.vaadin.equinox.shiro.WebResourcesHttpContext from Cristiano Gaviao
+ *
+ * Contributors:
+ * Florian Pirchner - migrated to vaadin 7 and copied into org.eclipse.osbp namespace
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.servlet;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
+import org.osgi.service.http.HttpContext;
+
+/**
+ * The Class WebResourcesHttpContext.
+ */
+public class WebResourcesHttpContext implements HttpContext, BundleListener {
+
+ /** The resource bundles. */
+ private Set<Bundle> resourceBundles = new HashSet<Bundle>();
+
+ /** The bundle. */
+ private Bundle bundle;
+
+ /**
+ * Instantiates a new web resources http context.
+ *
+ * @param bundle
+ * the bundle
+ */
+ public WebResourcesHttpContext(Bundle bundle) {
+ this.bundle = bundle;
+ init(bundle.getBundleContext());
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.service.http.HttpContext#handleSecurity(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ */
+ @Override
+ public boolean handleSecurity(final HttpServletRequest request,
+ final HttpServletResponse response) throws IOException {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.service.http.HttpContext#getResource(java.lang.String)
+ */
+ @Override
+ public URL getResource(final String name) {
+ URL resource = null;
+ // iterate the server bundle, client bundle and fragments
+ for (Bundle bundle : resourceBundles) {
+ String uri = name.startsWith("/") ? name : "/" + name;
+ String root = (String) bundle.getHeaders().get("Vaadin-Resources");
+ if (root != null && !root.equals("") && !".".equals(root)) {
+ uri = "/" + root + uri;
+ }
+ if (null != (resource = bundle.getResource(uri))) {
+ break;
+ }
+ }
+ return resource;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.service.http.HttpContext#getMimeType(java.lang.String)
+ */
+ @Override
+ public String getMimeType(final String name) {
+ URL resource = getResource(name);
+ if (null != resource) {
+ try {
+ return resource.openConnection().getContentType();
+ } catch (final IOException e) {
+ return null;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Check bundle for resources.
+ *
+ * @param bundle
+ * the bundle
+ */
+ private void checkBundleForResources(Bundle bundle) {
+ if (isClientBundle(bundle) || isServerBundle(bundle)
+ || isThemesBundle(bundle)) {
+ resourceBundles.add(bundle);
+ } else if (null != bundle.getHeaders().get("Vaadin-Resources")) {
+ resourceBundles.add(bundle);
+ } else {
+ resourceBundles.remove(bundle);
+ }
+ }
+
+ /**
+ * Returns true if the bundle is the vaadin server bundle.
+ *
+ * @param bundle
+ * the bundle
+ * @return true, if is server bundle
+ */
+ private boolean isServerBundle(Bundle bundle) {
+ return bundle.getSymbolicName().equals("com.vaadin.server");
+ }
+
+ /**
+ * Returns true, if the bundle is the vaadin client bundle.
+ *
+ * @param bundle
+ * the bundle
+ * @return true, if is client bundle
+ */
+ private boolean isClientBundle(Bundle bundle) {
+ return bundle.getSymbolicName().equals("com.vaadin.client")
+ || bundle.getSymbolicName()
+ .equals("com.vaadin.client-compiled");
+ }
+
+ /**
+ * Returns true, if the bundle is the vaadin themes bundle.
+ *
+ * @param bundle
+ * the bundle
+ * @return true, if is themes bundle
+ */
+ private boolean isThemesBundle(Bundle bundle) {
+ return bundle.getSymbolicName().equals("com.vaadin.themes");
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleListener#bundleChanged(org.osgi.framework.BundleEvent)
+ */
+ @Override
+ public void bundleChanged(BundleEvent event) {
+ if (event.getBundle() == this.bundle) {
+ if (event.getType() == BundleEvent.STOPPED) {
+ this.bundle.getBundleContext().removeBundleListener(this);
+ return;
+ }
+ }
+
+ if (event.getType() == BundleEvent.UNINSTALLED) {
+ resourceBundles.remove(event.getBundle());
+ } else {
+ checkBundleForResources(event.getBundle());
+ }
+ }
+
+ /**
+ * Inits the.
+ *
+ * @param ctx
+ * the ctx
+ */
+ public void init(BundleContext ctx) {
+ ctx.addBundleListener(this);
+ for (Bundle bundle : ctx.getBundles()) {
+ checkBundleForResources(bundle);
+ }
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/HttpServiceTracker.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/HttpServiceTracker.java
new file mode 100644
index 0000000..f6fe7df
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/HttpServiceTracker.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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
+ *
+ * Information:
+ * Based on original sources of
+ * - org.vaadin.osgi.Activator from Chris Brind
+ * - com.c4biz.osgiutils.vaadin.equinox.shiro.HttpServiceTracker from Cristiano Gaviao
+ *
+ * Contributors:
+ * Florian Pirchner - migrated to vaadin 7 and copied into org.eclipse.osbp namespace
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.webapp;
+
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Map;
+
+import org.eclipse.equinox.http.servlet.ExtendedHttpService;
+import org.eclipse.osbp.ecview.jetty.manager.IJettyManager;
+import org.eclipse.osbp.vaaclipse.addons.app.common.Constants;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Filter;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
+import org.osgi.service.component.ComponentFactory;
+import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This tracker takes a {@link ComponentFactory} and then creates a
+ * {@link VaadinWebApplicationRegister} class which is then registered as a
+ * {@link ManagedService} to receive configuration for that specific
+ * application.
+ *
+ * @author brindy - initial contribution cvgaviao - using ExtendedHttpService
+ * that added support to filters
+ */
+@SuppressWarnings(value = { "rawtypes", "unchecked" })
+public class HttpServiceTracker extends ServiceTracker {
+
+ /** The logger. */
+ private static Logger logger = LoggerFactory
+ .getLogger(HttpServiceTracker.class);
+
+ /** The web application. */
+ private VaadinWebApplication webApplication;
+
+ /** The configs. */
+ private Map<ExtendedHttpService, VaadinWebApplicationRegister> configs = new IdentityHashMap<ExtendedHttpService, VaadinWebApplicationRegister>();
+
+ /**
+ * Instantiates a new http service tracker.
+ *
+ * @param ctx
+ * the ctx
+ * @param webApplication
+ * the web application
+ */
+ public HttpServiceTracker(BundleContext ctx,
+ VaadinWebApplication webApplication) {
+ super(ctx, createFilter(ctx, webApplication), null);
+ this.webApplication = webApplication;
+ }
+
+ /**
+ * Creates the filter.
+ *
+ * @param ctx
+ * the ctx
+ * @param webApplication
+ * the web application
+ * @return the filter
+ */
+ private static Filter createFilter(BundleContext ctx,
+ VaadinWebApplication webApplication) {
+ // search for http service with the given context path of type
+ // application.
+ String filter = String.format("(&(%s=%s)(%s=%s)(%s=%s))",
+ org.osgi.framework.Constants.OBJECTCLASS,
+ ExtendedHttpService.class.getName(), "other.info",
+ webApplication.getContextPath(),
+ IJettyManager.PROP_SERVICE_TYPE,
+ IJettyManager.SERVICE_TYPE__APPLICATION);
+ try {
+ return ctx.createFilter(filter);
+ } catch (InvalidSyntaxException e) {
+ logger.error("{}", e);
+ }
+ return null;
+ }
+
+ /**
+ * Gets the alias.
+ *
+ * @return the alias
+ */
+ public String getAlias() {
+ return webApplication.getAlias();
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.util.tracker.ServiceTracker#addingService(org.osgi.framework.ServiceReference)
+ */
+ @Override
+ public Object addingService(ServiceReference reference) {
+ ExtendedHttpService http = (ExtendedHttpService) super
+ .addingService(reference);
+
+ // register the application
+ VaadinWebApplicationRegister config = new VaadinWebApplicationRegister(
+ http, webApplication);
+
+ logger.debug("Application for alias \"" + getAlias()
+ + "\" was created.");
+
+ // save it for later
+ configs.put(http, config);
+
+ // register as a managed service so that alternative properties can
+ // be provided
+ Hashtable<String, String> properties = new Hashtable<String, String>();
+ properties.put(org.osgi.framework.Constants.SERVICE_PID,
+ Constants.PROP_MANAGED_SERVICE_PREFIX + "." + getAlias());
+ context.registerService(ManagedService.class.getName(), config,
+ properties);
+
+ try {
+ config.updated(null);
+ } catch (ConfigurationException e) {
+ logger.warn("Initial setup caused exception: !" + e);
+ }
+
+ return http;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.util.tracker.ServiceTracker#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
+ */
+ @Override
+ public void removedService(ServiceReference reference, Object service) {
+ configs.remove(service).kill();
+ logger.debug("Application for alias \"" + getAlias()
+ + "\" was removed.");
+
+ super.removedService(reference, service);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinUI.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinUI.java
new file mode 100644
index 0000000..7b13b56
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinUI.java
@@ -0,0 +1,783 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Rushan R. Gilmullin and others.
+ * 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:
+ * Rushan R. Gilmullin - initial API and implementation
+ * Florian Pirchner - adjustings for osbp implementation
+ *******************************************************************************/
+
+package org.eclipse.osbp.vaaclipse.addons.app.webapp;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.servlet.http.HttpSession;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.extensions.EventUtils;
+import org.eclipse.e4.core.services.contributions.IContributionFactory;
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.core.services.log.Logger;
+import org.eclipse.e4.core.services.translation.TranslationProviderFactory;
+import org.eclipse.e4.core.services.translation.TranslationService;
+import org.eclipse.e4.ui.di.UISynchronize;
+import org.eclipse.e4.ui.internal.workbench.ActiveChildLookupFunction;
+import org.eclipse.e4.ui.internal.workbench.ActivePartLookupFunction;
+import org.eclipse.e4.ui.internal.workbench.E4Workbench;
+import org.eclipse.e4.ui.internal.workbench.E4XMIResourceFactory;
+import org.eclipse.e4.ui.internal.workbench.ExceptionHandler;
+import org.eclipse.e4.ui.internal.workbench.ModelServiceImpl;
+import org.eclipse.e4.ui.internal.workbench.PlaceholderResolver;
+import org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory;
+import org.eclipse.e4.ui.internal.workbench.WorkbenchLogger;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.MContribution;
+import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
+import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
+import org.eclipse.e4.ui.model.application.ui.MElementContainer;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder;
+import org.eclipse.e4.ui.model.application.ui.advanced.impl.AdvancedPackageImpl;
+import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl;
+import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
+import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.e4.ui.services.internal.events.EventBroker;
+import org.eclipse.e4.ui.workbench.IExceptionHandler;
+import org.eclipse.e4.ui.workbench.IModelResourceHandler;
+import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate;
+import org.eclipse.e4.ui.workbench.lifecycle.ProcessAdditions;
+import org.eclipse.e4.ui.workbench.lifecycle.ProcessRemovals;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPlaceholderResolver;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.osbp.runtime.web.vaadin.databinding.VaadinObservables;
+import org.eclipse.osbp.ui.api.user.IUser;
+import org.eclipse.osbp.vaaclipse.addons.app.VaadinE4Application;
+import org.eclipse.osbp.vaaclipse.addons.app.servlet.VaadinExecutorServiceImpl;
+import org.eclipse.osbp.vaaclipse.addons.common.api.resource.ICustomizedModelResourceHandler;
+import org.eclipse.osbp.vaaclipse.addons.common.api.resource.ISystemuserModelHandler;
+import org.eclipse.osbp.vaaclipse.addons.common.resource.LayoutChangedObserver;
+import org.eclipse.osbp.vaaclipse.addons.softwarefactory.perspective.PerspectiveSupport;
+import org.eclipse.osbp.vaaclipse.api.VaadinExecutorService;
+import org.eclipse.osbp.vaaclipse.publicapi.authentication.AuthenticationConstants;
+import org.eclipse.osbp.vaaclipse.publicapi.debug.IOwningWorkspaceAccess;
+import org.eclipse.osbp.vaaclipse.publicapi.events.IWidgetModelAssociations;
+import org.eclipse.osbp.vaaclipse.publicapi.theme.Theme;
+import org.eclipse.osbp.vaaclipse.publicapi.theme.ThemeConstants;
+import org.eclipse.osgi.service.datalocation.Location;
+import org.osgi.service.event.EventHandler;
+
+import com.vaadin.annotations.Push;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinSession;
+import com.vaadin.server.WrappedHttpSession;
+import com.vaadin.ui.ComponentContainer;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.UIDetachedException;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * The Class VaadinUI.
+ */
+@SuppressWarnings("restriction")
+@Push
+public class VaadinUI extends UI {
+
+ /** The Constant serialVersionUID. */
+ private static final long serialVersionUID = 1L;
+
+ /** The Constant THEME_ID. */
+ public static final String THEME_ID = "cssTheme";
+
+ /**
+ * This UI uses a different default resource handler.
+ */
+ private static final String DEFAULT_RESOURCE_HANDLER = "bundleclass://org.eclipse.osbp.vaaclipse.addons.common/org.eclipse.osbp.vaaclipse.addons.common.resource.ResourceHandler";
+
+ /** The Constant CUSTOMIZED_MODEL_SERVICE. */
+ private static final String CUSTOMIZED_MODEL_SERVICE = "bundleclass://org.eclipse.osbp.vaaclipse.addons.common/org.eclipse.osbp.vaaclipse.addons.common.resource.SystemuserModelHandler";
+
+ /** The presentation engine uri. */
+ protected static String presentationEngineURI = "bundleclass://org.eclipse.osbp.vaaclipse.presentation/"
+ + "org.eclipse.osbp.vaaclipse.presentation.engine.VaadinPresentationEngine";
+
+ /** The logger. */
+ protected Logger logger;
+
+ /** The args. */
+ private String[] args;
+
+ /** The model resource handler. */
+ private ICustomizedModelResourceHandler modelResourceHandler;
+
+ /** The e4 workbench. */
+ private E4Workbench e4Workbench;
+
+ /** The instance location. */
+ private Location instanceLocation;
+
+ /** The context. */
+ private IApplicationContext context;
+
+ /** The id2element. */
+ private Map<String, MUIElement> id2element = new HashMap<String, MUIElement>();
+
+ /** The lc manager. */
+ private Object lcManager;
+
+ /** The app context. */
+ private IEclipseContext appContext;
+
+ /** The factory. */
+ private IContributionFactory factory;
+
+ /** The user. */
+ private IUser user;
+
+ /** The user class. */
+ private Class<Object> userClass;
+
+ /** The executor service. */
+ private VaadinExecutorServiceImpl executorService;
+
+ /** The layout changed observer. */
+ private LayoutChangedObserver layoutChangedObserver;
+
+ /** The temp user store. */
+ private static Map<String, Object[]> tempUserStore = new HashMap<String, Object[]>();
+
+ /**
+ * Instantiates a new vaadin ui.
+ */
+ public VaadinUI() {
+ }
+
+ /**
+ * Gets the root context.
+ *
+ * @return the root context
+ */
+ public IEclipseContext getRootContext() {
+ return appContext;
+ }
+
+ /**
+ * Sets the theme internal.
+ *
+ * @param themeId
+ * the new theme internal
+ */
+ private void setThemeInternal(String themeId) {
+ super.setTheme(themeId);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.UI#init(com.vaadin.server.VaadinRequest)
+ */
+ @Override
+ public void init(VaadinRequest request) {
+ initializeWorkbenchState();
+ }
+
+ /**
+ * Initializes the vaaclipse workbench.
+ */
+ @SuppressWarnings({ "unchecked", "unused" })
+ protected void initializeWorkbenchState() {
+ executorService = new VaadinExecutorServiceImpl();
+ context = VaadinE4Application.getInstance().getAppContext();
+ logger = VaadinE4Application.getInstance().getLogger();
+
+ String sessionId = getSession().getSession().getId();
+ Object[] prevUser = tempUserStore.remove(sessionId);
+ if (prevUser != null) {
+ this.user = (IUser)prevUser[0];
+ this.userClass = (Class<Object>) prevUser[1];
+ }
+
+ // -------------------------------------
+ prepareEnvironment(context);
+
+ IEventBroker eventBroker = appContext.get(EventBroker.class);
+ eventBroker.subscribe(ThemeConstants.Events.setThemeEvent, new EventHandler() {
+ @Override
+ public void handleEvent(org.osgi.service.event.Event event) {
+ Theme theme = (Theme) event.getProperty(IEventBroker.DATA);
+ if (theme != null) {
+ HttpSession httpSession = ((WrappedHttpSession) getSession().getSession()).getHttpSession();
+ httpSession.setAttribute(ThemeConstants.Attrubutes.themeid, theme.getId());
+ setThemeInternal(theme.getWebId());
+ }
+ }
+ });
+
+ String authProvider = VaadinE4Application.getInstance().getApplicationAuthenticationProvider();
+
+ if (authProvider == null || authProvider.trim().isEmpty()) {
+ appContext.set(AuthenticationConstants.USER_ID, "Administrator");
+ createAndRunWorkbench();
+ } else {
+ IContributionFactory contributionFactory = (IContributionFactory) appContext.get(IContributionFactory.class.getName());
+ IEclipseContext authConext = appContext.createChild();
+
+ VerticalLayout content = new VerticalLayout();
+ content.setSizeFull();
+ setContent(content);
+
+ authConext.set(ComponentContainer.class, content);
+ authConext.set(VerticalLayout.class, content);
+ Object authProviderObj = contributionFactory.create(authProvider, authConext);
+ }
+
+ eventBroker.subscribe(AuthenticationConstants.Events.Authentication.name, new EventHandler() {
+ @Override
+ public void handleEvent(org.osgi.service.event.Event event) {
+
+ user = (IUser) event.getProperty(EventUtils.DATA);
+ userClass = (Class<Object>) event.getProperty(AuthenticationConstants.Events.Authentication.userClass);
+
+ if (userClass == null && user != null) {
+ userClass = (Class<Object>) user.getClass();
+ }
+ appContext.set(userClass, user);
+ appContext.set(AuthenticationConstants.USER, user);
+
+ if (user instanceof IUser) {
+ appContext.set(AuthenticationConstants.USER_ID, ((IUser) user).getUserName());
+ }
+
+ if (e4Workbench != null) {
+ String sessionId = getSession().getSession().getId();
+ tempUserStore.put(sessionId, new Object[] { user, userClass });
+ e4Workbench.close();
+ } else {
+ if (user instanceof IUser) {
+ // set the theme set in user_account
+ String themeId = ((IUser) user).getTheme();
+ if(themeId != null) {
+ HttpSession httpSession = ((WrappedHttpSession) getSession().getSession()).getHttpSession();
+ httpSession.setAttribute(ThemeConstants.Attrubutes.themeid, themeId);
+ setThemeInternal(themeId.replaceAll("\\.", "-"));
+ }
+ }
+ createAndRunWorkbench();
+ if (user instanceof IUser) {
+ // we need the application in case the user changes
+ // locale and we must updateLocalizations
+ ((IUser) user).setApplication((MApplication) appContext.get(MApplication.class.getName()));
+ // if there is a default perspective set in user_account - load it
+ PerspectiveSupport perspectiveSupport = appContext.get(PerspectiveSupport.class);
+ String perspectiveId = ((IUser) user).getPerspective();
+ if (perspectiveId != null) {
+ perspectiveSupport.openPerspectiveEvent(perspectiveId);
+ }
+ }
+ }
+
+ }
+ });
+
+ // handle logout events
+ //
+ eventBroker.subscribe(AuthenticationConstants.Events.Authentication.LOGOUT, new EventHandler() {
+ @Override
+ public void handleEvent(org.osgi.service.event.Event event) {
+ logout();
+ }
+ });
+
+ executeLater();
+ }
+
+ /**
+ * Handles the logout process.
+ */
+ protected void logout() {
+ if (e4Workbench != null) {
+ e4Workbench.close();
+ e4Workbench = null;
+ } else {
+ close();
+ }
+ }
+
+ /**
+ * Disposes the workbench state.
+ */
+ protected void disposeWorkbenchState() {
+
+ if (layoutChangedObserver != null) {
+ layoutChangedObserver.dispose();
+ layoutChangedObserver = null;
+ }
+
+ if (appContext != null) {
+ appContext.dispose();
+ appContext = null;
+ }
+
+ if (executorService != null) {
+ executorService.dispose();
+ executorService = null;
+ }
+
+ String sessionId = getSession().getSession().getId();
+ tempUserStore.remove(sessionId);
+
+ lcManager = null;
+ modelResourceHandler = null;
+
+ user = null;
+ userClass = null;
+ factory = null;
+ args = null;
+ id2element = null;
+ instanceLocation = null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.UI#push()
+ */
+ @Override
+ public void push() {
+ VaadinSession session = getSession();
+
+ if (session == null) {
+ throw new UIDetachedException("Cannot push a detached UI");
+ }
+ assert session.hasLock();
+
+ if (!getPushConfiguration().getPushMode().isEnabled()) {
+ throw new IllegalStateException("Push not enabled");
+ }
+ assert getPushConnection() != null;
+
+ /*
+ * Purge the pending access queue as it might mark a connector as dirty
+ * when the push would otherwise be ignored because there are no changes
+ * to push.
+ */
+ session.getService().runPendingAccessTasks(session);
+
+ // execute the runnables for e4 kernel
+ if (executorService != null) {
+ executorService.exec();
+ }
+
+ if (!getConnectorTracker().hasDirtyConnectors()) {
+ // Do not push if there is nothing to push
+ return;
+ }
+
+ getPushConnection().push();
+ }
+
+ /**
+ * Is used to execute the runnables from executor service.
+ */
+ public void executeLater() {
+ VaadinExecutorServiceImpl man = (VaadinExecutorServiceImpl) appContext.get(VaadinExecutorService.class);
+ man.exec();
+ }
+
+ /**
+ * Prepare environment.
+ *
+ * @param applicationContext
+ * the application context
+ */
+ public void prepareEnvironment(IApplicationContext applicationContext) {
+ args = (String[]) applicationContext.getArguments().get(IApplicationContext.APPLICATION_ARGS);
+
+ appContext = createDefaultContext(applicationContext);
+ appContext.set("e4ApplicationInstanceId", UUID.randomUUID().toString());
+ appContext.set("vaadinUI", this);
+ appContext.set(UI.class, this);
+ appContext.set(VaadinExecutorService.class, getExecutorService());
+ appContext.set(UISynchronize.class, new UISynchronize() {
+
+ public void syncExec(Runnable runnable) {
+ VaadinObservables.activateRealm(VaadinUI.this);
+ VaadinUI.this.accessSynchronously(runnable);
+ }
+
+ public void asyncExec(Runnable runnable) {
+ VaadinObservables.activateRealm(VaadinUI.this);
+ VaadinUI.this.access(runnable);
+ }
+ });
+
+ factory = (IContributionFactory) appContext.get(IContributionFactory.class.getName());
+
+ // Install the life-cycle manager for this session if there's one
+ // defined
+ String lifeCycleURI = getArgValue(E4Workbench.LIFE_CYCLE_URI_ARG, applicationContext, false);
+ if (lifeCycleURI != null) {
+ lcManager = factory.create(lifeCycleURI, appContext);
+ if (lcManager != null) {
+ // Let the manager manipulate the appContext if desired
+ ContextInjectionFactory.invoke(lcManager, PostContextCreate.class, appContext, null);
+ }
+ }
+
+ // setup the widgetToModel-associations
+ appContext.set(IWidgetModelAssociations.class, ContextInjectionFactory.make(WidgetModelAssociations.class, appContext));
+ }
+
+ /**
+ * Gets the executor service.
+ *
+ * @return the executor service
+ */
+ private VaadinExecutorService getExecutorService() {
+ return executorService;
+ }
+
+ /**
+ * Creates the e4 workbench.
+ *
+ * @param applicationContext
+ * the application context
+ * @return the e4 workbench
+ */
+ public E4Workbench createE4Workbench(IApplicationContext applicationContext) {
+ // Create the app model and its context
+ MApplication appModel = loadApplicationModel(applicationContext, appContext);
+ fixNullElementIds(appModel);
+ appModel.setContext(appContext);
+ appContext.set(MApplication.class.getName(), appModel);
+
+ // ContextInjectionFactory.setDefault(appContext);
+ if (lcManager != null) {
+ ContextInjectionFactory.invoke(lcManager, ProcessAdditions.class, appContext, null);
+ ContextInjectionFactory.invoke(lcManager, ProcessRemovals.class, appContext, null);
+ }
+ // Create the addons
+ for (MContribution addon : appModel.getAddons()) {
+ Object obj = factory.create(addon.getContributionURI(), appContext);
+ addon.setObject(obj);
+ }
+
+ E4Workbench e4Workbench = new E4Workbench(appModel, appContext);
+
+ return e4Workbench;
+ }
+
+ /**
+ * Fix null element ids.
+ *
+ * @param element
+ * the element
+ */
+ private void fixNullElementIds(MUIElement element) {
+ if (!(element instanceof MApplication)) {
+ if (element.getElementId() == null || element.getElementId().trim().isEmpty()) {
+ element.setElementId(UUID.randomUUID().toString());
+ } else {
+ if (element instanceof MPlaceholder) {
+ // NOTHING TO DO - We must not touch the ID. Otherwise parts
+ // can not be wired for the #reference after cloning.
+ logger.debug("Skip fixing ID for " + element);
+ } else if (isInSharedArea(element)) {
+ // NOTHING TO DO - We must not touch the ID
+ logger.debug("Skip fixing ID for " + element);
+ } else {
+ // check that there are not element in model with this id
+ // MUIElement someElement =
+ // modelService.find(element.getElementId(), app); //this
+ // search
+ // recursive - very long, so use map
+ MUIElement someElement = id2element.get(element.getElementId());
+ if (someElement != null && someElement != element) {
+ final String randomUUID = UUID.randomUUID().toString();
+ element.setElementId(element.getElementId() + "_" + randomUUID);
+ }
+ }
+ }
+
+ id2element.put(element.getElementId(), element);
+ }
+
+ if (element instanceof MElementContainer<?>) {
+ for (MUIElement child : ((MElementContainer<?>) element).getChildren()) {
+ fixNullElementIds(child);
+ }
+ }
+ }
+
+ /**
+ * Checks if is in shared area.
+ *
+ * @param element
+ * the element
+ * @return true, if is in shared area
+ */
+ private boolean isInSharedArea(MUIElement element) {
+ EModelService modelService = appContext.get(EModelService.class);
+ int location = modelService.getElementLocation(element);
+ if ((location & EModelService.IN_SHARED_AREA) != 0) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Load application model.
+ *
+ * @param appContext
+ * the app context
+ * @param eclipseContext
+ * the eclipse context
+ * @return the m application
+ */
+ @SuppressWarnings({ "unused", "deprecation" })
+ private MApplication loadApplicationModel(IApplicationContext appContext, IEclipseContext eclipseContext) {
+ logger.debug("VaadinE4Application.loadApplicationModel()");
+ MApplication theApp = null;
+
+ instanceLocation = VaadinE4Application.getInstance().getInstanceLocation();
+
+ String appModelPath = getArgValue(E4Workbench.XMI_URI_ARG, appContext, false);
+ Assert.isNotNull(appModelPath, E4Workbench.XMI_URI_ARG + " argument missing"); //$NON-NLS-1$
+ final URI initialWorkbenchDefinitionInstance = URI.createPlatformPluginURI(appModelPath, true);
+
+ eclipseContext.set(E4Workbench.INITIAL_WORKBENCH_MODEL_URI, initialWorkbenchDefinitionInstance);
+ eclipseContext.set(E4Workbench.INSTANCE_LOCATION, instanceLocation);
+
+ // in debug mode, this value may be used to access the launching
+ // workspace location
+ String debugOwnerPath = getArgValue(IOwningWorkspaceAccess.DEBUG_OWNER_WORKSPACE_LOCATION, appContext, false);
+ if (debugOwnerPath != null && !debugOwnerPath.trim().equals("")) {
+ final URI debugOwnerPathURI = URI.createFileURI(debugOwnerPath);
+ eclipseContext.set(IOwningWorkspaceAccess.DEBUG_OWNER_WORKSPACE_LOCATION, debugOwnerPathURI);
+ }
+
+ // Save and restore
+ boolean saveAndRestore;
+ String value = getArgValue(E4Workbench.PERSIST_STATE, appContext, false);
+
+ saveAndRestore = value == null || Boolean.parseBoolean(value);
+
+ eclipseContext.set(E4Workbench.PERSIST_STATE, true);
+
+ // Persisted state
+ boolean clearPersistedState;
+ value = getArgValue(E4Workbench.CLEAR_PERSISTED_STATE, appContext, true);
+ clearPersistedState = value != null && Boolean.parseBoolean(value);
+ eclipseContext.set(E4Workbench.CLEAR_PERSISTED_STATE, false);
+
+ // Delta save and restore
+ boolean deltaRestore;
+ value = getArgValue(E4Workbench.DELTA_RESTORE, appContext, false);
+ deltaRestore = value == null || Boolean.parseBoolean(value);
+ eclipseContext.set(E4Workbench.DELTA_RESTORE, Boolean.valueOf(deltaRestore));
+
+ registerResourceSet(eclipseContext);
+
+ IContributionFactory factory = eclipseContext.get(IContributionFactory.class);
+
+ // create the customized model service
+ ISystemuserModelHandler service = (ISystemuserModelHandler) factory.create(CUSTOMIZED_MODEL_SERVICE, eclipseContext);
+ eclipseContext.set(ISystemuserModelHandler.class, service);
+
+ String resourceHandler = getArgValue(E4Workbench.MODEL_RESOURCE_HANDLER, appContext, false);
+
+ if (resourceHandler == null) {
+ resourceHandler = DEFAULT_RESOURCE_HANDLER;
+ }
+
+ modelResourceHandler = (ICustomizedModelResourceHandler) factory.create(resourceHandler, eclipseContext);
+ eclipseContext.set(IModelResourceHandler.class, modelResourceHandler);
+ eclipseContext.set(ICustomizedModelResourceHandler.class, modelResourceHandler);
+
+ Resource resource = modelResourceHandler.loadMostRecentModel();
+ theApp = (MApplication) resource.getContents().get(0);
+
+ return theApp;
+ }
+
+ /**
+ * Registers the model resource set at the eclipse context.
+ *
+ * @param eclipseContext
+ * the eclipse context
+ */
+ private void registerResourceSet(IEclipseContext eclipseContext) {
+ ResourceSet resourceSetImpl = new ResourceSetImpl();
+ resourceSetImpl.getResourceFactoryRegistry().getExtensionToFactoryMap()
+ .put(Resource.Factory.Registry.DEFAULT_EXTENSION, new E4XMIResourceFactory());
+ resourceSetImpl.getPackageRegistry().put(ApplicationPackageImpl.eNS_URI, ApplicationPackageImpl.eINSTANCE);
+ resourceSetImpl.getPackageRegistry().put(CommandsPackageImpl.eNS_URI, CommandsPackageImpl.eINSTANCE);
+ resourceSetImpl.getPackageRegistry().put(UiPackageImpl.eNS_URI, UiPackageImpl.eINSTANCE);
+ resourceSetImpl.getPackageRegistry().put(MenuPackageImpl.eNS_URI, MenuPackageImpl.eINSTANCE);
+ resourceSetImpl.getPackageRegistry().put(BasicPackageImpl.eNS_URI, BasicPackageImpl.eINSTANCE);
+ resourceSetImpl.getPackageRegistry().put(AdvancedPackageImpl.eNS_URI, AdvancedPackageImpl.eINSTANCE);
+ resourceSetImpl.getPackageRegistry().put(org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.eNS_URI,
+ org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.eINSTANCE);
+
+ eclipseContext.set(ResourceSet.class, resourceSetImpl);
+ eclipseContext.set("e4ModelResourceset", resourceSetImpl);
+ }
+
+ /**
+ * Gets the arg value.
+ *
+ * @param argName
+ * the arg name
+ * @param appContext
+ * the app context
+ * @param singledCmdArgValue
+ * the singled cmd arg value
+ * @return the arg value
+ */
+ private String getArgValue(String argName, IApplicationContext appContext, boolean singledCmdArgValue) {
+ // Is it in the arg list ?
+ if (argName == null || argName.length() == 0) {
+ return null;
+ }
+
+ if (singledCmdArgValue) {
+ for (int i = 0; i < args.length; i++) {
+ if (("-" + argName).equals(args[i])) {
+ return "true";
+ }
+ }
+ } else {
+ for (int i = 0; i < args.length; i++) {
+ if (("-" + argName).equals(args[i]) && i + 1 < args.length) {
+ return args[i + 1];
+ }
+ }
+ }
+
+ final String brandingProperty = appContext.getBrandingProperty(argName);
+ return brandingProperty == null ? System.getProperty(argName) : brandingProperty;
+ }
+
+ /**
+ * Creates the default context.
+ *
+ * @param applicationContext
+ * the application context
+ * @return the i eclipse context
+ */
+ @SuppressWarnings("unchecked")
+ public IEclipseContext createDefaultContext(IApplicationContext applicationContext) {
+ IEclipseContext serviceContext = E4Workbench.getServiceContext();
+ final IEclipseContext appContext = serviceContext.createChild("WorkbenchContext"); //$NON-NLS-1$
+
+ IExtensionRegistry registry = RegistryFactory.getRegistry();
+ ReflectionContributionFactory contributionFactory = new ReflectionContributionFactory(registry);
+ appContext.set(IContributionFactory.class.getName(), contributionFactory);
+
+ appContext.set(Logger.class.getName(), ContextInjectionFactory.make(WorkbenchLogger.class, appContext));
+
+ String presentationURI = getArgValue(E4Workbench.PRESENTATION_URI_ARG, applicationContext, false);
+ if (presentationURI == null) {
+ presentationURI = presentationEngineURI;
+ }
+ appContext.set(E4Workbench.PRESENTATION_URI_ARG, presentationURI);
+ appContext.set(UI.class, this);
+
+ appContext.set(EPlaceholderResolver.class, new PlaceholderResolver());
+
+ if (user != null) {
+ if (userClass == null) {
+ userClass = (Class<Object>) user.getClass();
+ }
+ appContext.set(userClass, user);
+ appContext.set("user", user);
+ }
+
+ String themeId = getArgValue(THEME_ID, applicationContext, false);
+ appContext.set(THEME_ID, themeId);
+
+ // if (themeId != null && !themeId.equals("")) {
+ // setTheme(themeId);
+ // } else {
+ // setTheme(ValoTheme.THEME_NAME);
+ // }
+
+ String cssURI = getArgValue(E4Workbench.CSS_URI_ARG, applicationContext, false);
+ if (cssURI != null) {
+ appContext.set(E4Workbench.CSS_URI_ARG, cssURI);
+ }
+
+ // Temporary to support old property as well
+ if (cssURI != null && !cssURI.startsWith("platform:")) {
+ logger.warn("Warning " + cssURI + " changed its meaning it is used now to run without theme support");
+ appContext.set(THEME_ID, cssURI);
+ }
+
+ String cssResourcesURI = getArgValue(E4Workbench.CSS_RESOURCE_URI_ARG, applicationContext, false);
+ appContext.set(E4Workbench.CSS_RESOURCE_URI_ARG, cssResourcesURI);
+
+ appContext.set(EModelService.class, new ModelServiceImpl(appContext));
+
+ // translation
+ String locale = getLocale().toLanguageTag();
+ serviceContext.set(TranslationService.LOCALE, locale);
+ logger.debug("Setting locale to " + locale);
+ TranslationService bundleTranslationProvider = TranslationProviderFactory.bundleTranslationService(serviceContext);
+ serviceContext.set(TranslationService.class, bundleTranslationProvider);
+
+ ExceptionHandler exceptionHandler = new ExceptionHandler();
+ appContext.set(IExceptionHandler.class.getName(), exceptionHandler);
+ appContext.set(IExtensionRegistry.class.getName(), registry);
+
+ // setup for commands and handlers
+ appContext.set(IServiceConstants.ACTIVE_PART, new ActivePartLookupFunction());
+
+ appContext.set(IServiceConstants.ACTIVE_SHELL, new ActiveChildLookupFunction(IServiceConstants.ACTIVE_SHELL,
+ E4Workbench.LOCAL_ACTIVE_SHELL));
+
+ return appContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.UI#detach()
+ */
+ @Override
+ public void detach() {
+ if (e4Workbench != null) {
+ e4Workbench.close();
+ e4Workbench = null;
+ }
+
+ disposeWorkbenchState();
+
+ super.detach();
+ }
+
+ /**
+ * Creates the and run workbench.
+ */
+ protected void createAndRunWorkbench() {
+ e4Workbench = createE4Workbench(context);
+ e4Workbench.createAndRunUI(e4Workbench.getApplication());
+
+ // register the layout changed observer when application was started
+ layoutChangedObserver = ContextInjectionFactory.make(LayoutChangedObserver.class, e4Workbench.getApplication().getContext());
+ e4Workbench.getApplication().getContext().set(LayoutChangedObserver.class, layoutChangedObserver);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinWebApplication.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinWebApplication.java
new file mode 100644
index 0000000..f81aae5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinWebApplication.java
@@ -0,0 +1,296 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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 API and implementation
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.webapp;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.osbp.vaaclipse.addons.app.common.Constants;
+import org.eclipse.osbp.vaaclipse.addons.app.common.OSGiUIProvider;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The Class VaadinWebApplication.
+ */
+public class VaadinWebApplication {
+
+ /** The logger. */
+ private static Logger logger = LoggerFactory
+ .getLogger(VaadinWebApplication.class);
+
+ /** The bundle context. */
+ private BundleContext bundleContext;
+
+ /** The id. */
+ private final String id;
+
+ /** The alias. */
+ private String alias = "";
+
+ /** The port. */
+ private int port;
+
+ /** The theme id. */
+ private String themeId;
+
+ /** The widgetset name. */
+ private String widgetsetName;
+
+ /** The header icon uri. */
+ private String headerIconURI;
+
+ /** The production mode. */
+ private boolean productionMode;
+
+ /** The context path. */
+ private String contextPath;
+
+ /** The init properties. */
+ private Map<String, String> initProperties = new HashMap<>();
+
+ /** The tracker. */
+ private HttpServiceTracker tracker;
+
+ /**
+ * Instantiates a new vaadin web application.
+ *
+ * @param bundle
+ * the bundle
+ */
+ public VaadinWebApplication(Bundle bundle) {
+ this.bundleContext = bundle.getBundleContext();
+ id = bundle.getSymbolicName();
+ }
+
+ /**
+ * Activate.
+ */
+ public void activate() {
+ tracker = new HttpServiceTracker(bundleContext, this);
+ logger.debug("The alias that will be tracked is:\"" + alias);
+ tracker.open();
+ }
+
+ /**
+ * Deactivate.
+ */
+ public void deactivate() {
+ logger.debug("Tracker for alias" + tracker.getAlias() + " was removed.");
+ if (tracker != null) {
+ tracker.close();
+ tracker = null;
+ }
+ }
+
+ /**
+ * Gets the id.
+ *
+ * @return the id
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Gets the alias.
+ *
+ * @return the alias
+ */
+ public String getAlias() {
+ return alias;
+ }
+
+ /**
+ * Sets the alias.
+ *
+ * @param alias
+ * the alias to set
+ */
+ public void setAlias(String alias) {
+ this.alias = alias;
+ }
+
+ /**
+ * Gets the port.
+ *
+ * @return the port
+ */
+ public int getPort() {
+ return port;
+ }
+
+ /**
+ * Sets the port.
+ *
+ * @param port
+ * the port to set
+ */
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ /**
+ * Gets the widgetset name.
+ *
+ * @return the widgetsetName
+ */
+ public String getWidgetsetName() {
+ return widgetsetName;
+ }
+
+ /**
+ * Sets the widgetset name.
+ *
+ * @param widgetsetName
+ * the widgetsetName to set
+ */
+ public void setWidgetsetName(String widgetsetName) {
+ this.widgetsetName = widgetsetName;
+ }
+
+ /**
+ * Checks if is production mode.
+ *
+ * @return the productionMode
+ */
+ public boolean isProductionMode() {
+ return productionMode;
+ }
+
+ /**
+ * Sets the production mode.
+ *
+ * @param productionMode
+ * the productionMode to set
+ */
+ public void setProductionMode(boolean productionMode) {
+ this.productionMode = productionMode;
+ }
+
+ /**
+ * Gets the inits the property.
+ *
+ * @param propName
+ * the prop name
+ * @return the inits the property
+ */
+ public String getInitProperty(String propName) {
+ return this.initProperties.get(propName);
+ }
+
+ /**
+ * Sets the init property.
+ *
+ * @param propName
+ * the prop name
+ * @param propValue
+ * the prop value
+ */
+ public void setInitProperty(String propName, String propValue) {
+ this.initProperties.put(propName, propValue);
+ }
+
+ /**
+ * Gets the inits the properties.
+ *
+ * @return the inits the properties
+ */
+ public Set<String> getInitProperties() {
+ return this.initProperties.keySet();
+ }
+
+ /**
+ * Gets the header icon uri.
+ *
+ * @return the headerIcon
+ */
+ public String getHeaderIconURI() {
+ return headerIconURI;
+ }
+
+ /**
+ * Sets the header icon uri.
+ *
+ * @param headerIconURI
+ * the headerIconURI to set
+ */
+ public void setHeaderIconURI(String headerIconURI) {
+ this.headerIconURI = headerIconURI;
+ }
+
+ /**
+ * Gets the theme id.
+ *
+ * @return the themeId
+ */
+ public String getThemeId() {
+ return themeId;
+ }
+
+ /**
+ * Sets the theme id.
+ *
+ * @param themeId
+ * the themeId to set
+ */
+ public void setThemeId(String themeId) {
+ this.themeId = themeId;
+ }
+
+ /**
+ * Gets the context path.
+ *
+ * @return the context path
+ */
+ public String getContextPath() {
+ return contextPath;
+ }
+
+ /**
+ * Sets the context path.
+ *
+ * @param contextPath
+ * the new context path
+ */
+ public void setContextPath(String contextPath) {
+ this.contextPath = contextPath;
+ }
+
+ /**
+ * Updated.
+ *
+ * @param properties
+ * the properties
+ */
+ @SuppressWarnings("rawtypes")
+ public void updated(Dictionary properties) {
+ if (properties.get(Constants.PROP_WIDGETSET) != null) {
+ widgetsetName = (String) properties.get(Constants.PROP_WIDGETSET);
+ }
+ }
+
+ /**
+ * Gets the ui provider.
+ *
+ * @return the ui provider
+ */
+ public OSGiUIProvider getUiProvider() {
+ return new OSGiUIProvider();
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinWebApplicationRegister.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinWebApplicationRegister.java
new file mode 100644
index 0000000..b364954
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/VaadinWebApplicationRegister.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 - 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
+ *
+ * Information:
+ * Based on original sources of
+ * - org.vaadin.osgi.Activator from Chris Brind
+ * - com.c4biz.osgiutils.vaadin.equinox.shiro.ApplicationRegister from Cristiano Gaviao
+ *
+ * Contributors:
+ * Florian Pirchner - migrated to vaadin 7 and copied into org.eclipse.osbp namespace
+ *
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.app.webapp;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import javax.servlet.Filter;
+
+import org.eclipse.equinox.http.servlet.ExtendedHttpService;
+import org.eclipse.osbp.vaaclipse.addons.app.Activator;
+import org.eclipse.osbp.vaaclipse.addons.app.common.Constants;
+import org.eclipse.osbp.vaaclipse.addons.app.servlet.VaadinOSGiServlet;
+import org.eclipse.osbp.vaaclipse.addons.app.servlet.WebResourcesHttpContext;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
+import org.osgi.service.component.ComponentFactory;
+import org.osgi.service.http.HttpContext;
+
+import com.vaadin.server.VaadinServlet;
+import com.vaadin.server.VaadinSession;
+
+/**
+ * This class is responsible for registering the {@link ComponentFactory} as a
+ * vaadin {@link VaadinSession}. It is a {@link ManagedService} so that it can
+ * receive properties which are then passed in to the {@link VaadinOSGiServlet}
+ * as init parameters, e.g. to enable production mode.
+ */
+@SuppressWarnings("deprecation")
+public class VaadinWebApplicationRegister implements ManagedService {
+
+ /** The http. */
+ private final ExtendedHttpService http;
+
+ /** The servlet. */
+ private VaadinServlet servlet;
+
+ /** The filter. */
+ private Filter filter;
+
+ /** The resource base. */
+ private final String RESOURCE_BASE = "/VAADIN";
+
+ /** The web application. */
+ private VaadinWebApplication webApplication;
+
+ /** The current alias. */
+ private String currentAlias;
+
+ /**
+ * Instantiates a new vaadin web application register.
+ *
+ * @param http
+ * the http
+ * @param webApplication
+ * the web application
+ */
+ public VaadinWebApplicationRegister(ExtendedHttpService http,
+ VaadinWebApplication webApplication) {
+ super();
+ this.http = http;
+ this.webApplication = webApplication;
+ }
+
+ /**
+ * Kill.
+ */
+ public void kill() {
+ if (filter != null) {
+ http.unregisterFilter(filter);
+ filter = null;
+ }
+ if (currentAlias != null) {
+ try {
+ http.unregister(currentAlias);
+ http.unregister(RESOURCE_BASE);
+ } catch (java.lang.IllegalArgumentException e) {
+ // ignore in case alias was not found exception
+ }
+ }
+ if (servlet != null) {
+ servlet.destroy();
+ servlet = null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.service.cm.ManagedService#updated(java.util.Dictionary)
+ */
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public void updated(Dictionary properties) throws ConfigurationException {
+ kill();
+
+ try {
+ if (properties == null) {
+ properties = new Hashtable();
+ }
+
+ // update the webapplication
+ //
+ webApplication.updated(properties);
+
+ // update the properties
+ //
+ properties.put(Constants.PROP_WIDGETSET,
+ webApplication.getWidgetsetName());
+ properties.put(Constants.PROP_PRODUCTION_MODE,
+ Boolean.toString(webApplication.isProductionMode()));
+
+ for (String propName : webApplication.getInitProperties()) {
+ properties.put(propName,
+ webApplication.getInitProperty(propName));
+ }
+
+ servlet = new VaadinOSGiServlet();
+ HttpContext defaultContext = new WebResourcesHttpContext(Activator
+ .getDefault().getBundle());
+ // http.registerResources(RESOURCE_BASE, RESOURCE_BASE,
+ // defaultContext);
+ currentAlias = webApplication.getAlias();
+ http.registerServlet(String.format("/%s", currentAlias), servlet,
+ properties, defaultContext);
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/WidgetModelAssociations.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/WidgetModelAssociations.java
new file mode 100644
index 0000000..de3b993
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/webapp/WidgetModelAssociations.java
@@ -0,0 +1,180 @@
+/**
+ * Copyright (c) 2011, 2014 - Lunifera GmbH (Gross Enzersdorf)
+ * 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.vaaclipse.addons.app.webapp;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.ui.workbench.UIEvents;
+import org.eclipse.e4.ui.workbench.UIEvents.EventTags;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osbp.vaaclipse.publicapi.events.IWidgetModelAssociations;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
+
+import com.vaadin.ui.Component;
+
+/**
+ * The Class WidgetModelAssociations.
+ */
+public class WidgetModelAssociations implements IWidgetModelAssociations,
+ EventHandler {
+
+ /** The event broker. */
+ @Inject
+ private IEventBroker eventBroker;
+
+ /** The cache. */
+ private Map<Object, EObject> cache = Collections
+ .synchronizedMap(new HashMap<Object, EObject>());
+
+ // third party assocations may provide widget to model element mappings for
+ /** The third party assocations. */
+ // different UI models, like ECView
+ private Set<IWidgetModelAssociations> thirdPartyAssocations = new HashSet<IWidgetModelAssociations>();
+
+ /**
+ * Setup.
+ */
+ @PostConstruct
+ void setup() {
+ eventBroker.subscribe(UIEvents.UIElement.TOPIC_WIDGET, this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.events.IWidgetModelAssociations#getElement(java.lang.Object)
+ */
+ @Override
+ public EObject getElement(Object component) {
+ if (component == null) {
+ return null;
+ }
+
+ // first, try to find the Vaaclipse component in the current cache
+ EObject result = cache.get(component);
+
+ // if no widget could be found here, lets try the thirdparty
+ // associations like ECView
+ if (result == null) {
+ for (IWidgetModelAssociations thirdParty : thirdPartyAssocations) {
+ result = thirdParty.getElement(component);
+ if (result != null) {
+ break;
+ }
+ }
+ }
+
+ // at last iterate all parent elements to find the next component in the
+ // Vaaclipse ui element hierarchy
+ if (result == null) {
+ if (component instanceof Component) {
+ result = getElementByParent(((Component) component).getParent());
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets the element by parent.
+ *
+ * @param component
+ * the component
+ * @return the element by parent
+ */
+ public EObject getElementByParent(Object component) {
+ if (component == null) {
+ return null;
+ }
+
+ EObject result = cache.get(component);
+ if (result == null) {
+ if (component instanceof Component) {
+ result = getElementByParent(((Component) component).getParent());
+ }
+ }
+
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.events.IWidgetModelAssociations#getWidget(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public Object getWidget(EObject element) {
+ if (cache.values().contains(element)) {
+ for (Map.Entry<Object, EObject> entry : cache.entrySet()) {
+ if (entry.getValue() == element) {
+ return entry.getKey();
+ }
+ }
+ }
+
+ // if no widget could be found here, lets try the thirdparty
+ // associations
+ for (IWidgetModelAssociations thirdParty : thirdPartyAssocations) {
+ Object widget = thirdParty.getWidget(element);
+ if (widget != null) {
+ return widget;
+ }
+ }
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.service.event.EventHandler#handleEvent(org.osgi.service.event.Event)
+ */
+ @Override
+ public void handleEvent(Event event) {
+ if (UIEvents.EventTypes.SET.equals(event.getProperty(EventTags.TYPE))) {
+ EObject changedObj = (EObject) event.getProperty(EventTags.ELEMENT);
+ Object widget = event.getProperty(EventTags.WIDGET);
+ if (widget == null) {
+ cache.remove(changedObj);
+ } else {
+ cache.put(widget, changedObj);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.events.IWidgetModelAssociations#addThirdParty(org.eclipse.osbp.vaaclipse.publicapi.events.IWidgetModelAssociations)
+ */
+ public boolean addThirdParty(IWidgetModelAssociations e) {
+ return thirdPartyAssocations.add(e);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.events.IWidgetModelAssociations#removeThirdParty(org.eclipse.osbp.vaaclipse.publicapi.events.IWidgetModelAssociations)
+ */
+ public boolean removeThirdParty(IWidgetModelAssociations o) {
+ return thirdPartyAssocations.remove(o);
+ }
+
+ /**
+ * Destroy.
+ */
+ @PreDestroy
+ void destroy() {
+ eventBroker.unsubscribe(this);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/.checkstyle b/org.eclipse.osbp.vaaclipse.addons.application/.checkstyle
new file mode 100644
index 0000000..2f2667a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/.checkstyle
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <fileset name="all" enabled="true" check-config-name="emfstoreStyle" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/.project b/org.eclipse.osbp.vaaclipse.addons.application/.project
new file mode 100644
index 0000000..c427278
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/.project
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.application</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>com.vaadin.integration.eclipse.addonStylesBuilder</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.vaaclipse.addons.application/Application.e4xmi b/org.eclipse.osbp.vaaclipse.addons.application/Application.e4xmi
new file mode 100644
index 0000000..bbf2d2d
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/Application.e4xmi
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ASCII"?>
+<e4modelextension:VaaclipseApplication xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:e4modelextension="http://www.semanticsoft.org/ExtensionUI/e4modelextension" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xsi:schemaLocation="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced http://www.eclipse.org/ui/2010/UIModel/application#//ui/advanced http://www.eclipse.org/ui/2010/UIModel/application/ui/basic http://www.eclipse.org/ui/2010/UIModel/application#//ui/basic http://www.eclipse.org/ui/2010/UIModel/application/ui/menu http://www.eclipse.org/ui/2010/UIModel/application#//ui/menu" xmi:id="_c1YngKljEeS1DvGiQJCYNA" elementId="org.lunifera.vaaclipse.addons.application">
+ <children xsi:type="basic:TrimmedWindow" xmi:id="_PCF4sKoREeSuAOXH-urFdQ" elementId="mainWindow" label="Lunifera Application" x="20" y="20" width="700" height="570">
+ <tags>no-decoration#topdecoration.fxml</tags>
+ <tags>mainWindow</tags>
+ <children xsi:type="advanced:PerspectiveStack" xmi:id="_PCF4saoREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.perspectivestack.0">
+ <children xsi:type="advanced:Perspective" xmi:id="_xeIHkKucEeS21pCaYI4ioQ" elementId="org.lunifera.vaaclipse.addons.application.perspective.general" selectedElement="_8RKzYKucEeS21pCaYI4ioQ" label="General" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.application/images/xmi.png" tooltip="General">
+ <children xsi:type="basic:PartSashContainer" xmi:id="_8RKzYKucEeS21pCaYI4ioQ" elementId="" horizontal="true">
+ <children xsi:type="basic:PartSashContainer" xmi:id="_7RTu0MyLEeSAOI_Qr45QBA" elementId="" containerData="1500" selectedElement="_9peDEKucEeS21pCaYI4ioQ">
+ <children xsi:type="basic:PartStack" xmi:id="_9peDEKucEeS21pCaYI4ioQ" elementId="org.lunifera.vaaclipse.addons.application.partstack.left" containerData="2500">
+ <tags>org.lunifera.vaaclipse.addons.application.partstack.left</tags>
+ <children xsi:type="advanced:Placeholder" xmi:id="_Fy8EkKudEeS21pCaYI4ioQ" elementId="org.lunifera.vaaclipse.addons.application.partdescriptor.explorer" containerData="" ref="_CtR-4MyREeSAOI_Qr45QBA"/>
+ </children>
+ </children>
+ <children xsi:type="basic:PartSashContainer" xmi:id="_CRZz0MyUEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.partsashcontainer.0" containerData="5000">
+ <children xsi:type="advanced:Placeholder" xmi:id="_2PP28KvNEeS5r6nTfRYz2w" elementId="org.lunifera.vaaclipse.addons.application.area.main" containerData="9000" ref="_PCF44qoREeSuAOXH-urFdQ"/>
+ <children xsi:type="basic:PartStack" xmi:id="_V2xxkMyMEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.partstack.bottom" containerData="2500">
+ <tags>org.lunifera.vaaclipse.addons.application.partstack.bottom</tags>
+ </children>
+ </children>
+ <children xsi:type="basic:PartSashContainer" xmi:id="_P_xh8MyMEeSAOI_Qr45QBA" elementId="" containerData="3500">
+ <children xsi:type="advanced:Placeholder" xmi:id="_bzHjgM5VEeSscMz1WjkrfA" elementId="org.lunifera.vaaclipse.addons.application.area.materdetail.master" containerData="500" ref="_UPxG0M5VEeSscMz1WjkrfA"/>
+ <children xsi:type="basic:PartStack" xmi:id="_IflRAKudEeS21pCaYI4ioQ" elementId="org.lunifera.vaaclipse.addons.application.partstack.right" containerData="500">
+ <tags>org.lunifera.vaaclipse.addons.application.partstack.outline</tags>
+ <tags>org.lunifera.vaaclipse.addons.application.partstack.right</tags>
+ <children xsi:type="advanced:Placeholder" xmi:id="_rYE6YMyNEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.partdescriptor.outline" ref="_WjXU0KudEeS21pCaYI4ioQ"/>
+ </children>
+ </children>
+ </children>
+ </children>
+ </children>
+ <mainMenu xmi:id="_PCF4z6oREeSuAOXH-urFdQ" elementId="menu:org.eclipse.ui.main.menu">
+ <children xsi:type="menu:Menu" xmi:id="_PCF40KoREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.file" label="File">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_qloogMvXEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.handledmenuitem.sample" label="Sample" tooltip="Sample" command="_em0GEMvXEeSAOI_Qr45QBA"/>
+ </children>
+ <children xsi:type="menu:Menu" xmi:id="_PCF41aoREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.views" label="View">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_ZvCCUMvYEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.handledmenuitem.sample" label="Sample" tooltip="Sample" command="_em0GEMvXEeSAOI_Qr45QBA"/>
+ </children>
+ <children xsi:type="menu:Menu" xmi:id="_PCF416oREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.window" label="Window">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_Z7PSUMvYEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.handledmenuitem.sample" label="Sample" tooltip="Sample" command="_em0GEMvXEeSAOI_Qr45QBA"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_nlzoEMvcEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.handledmenuitem.sample" label="Show View ..." tooltip="Show View" command="_t-dzQMvcEeSAOI_Qr45QBA"/>
+ </children>
+ <children xsi:type="menu:Menu" xmi:id="_PCF42aoREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.help" label="Help">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_aEFsUMvYEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.handledmenuitem.sample" label="Sample" tooltip="Sample" command="_em0GEMvXEeSAOI_Qr45QBA"/>
+ </children>
+ </mainMenu>
+ <sharedElements xsi:type="advanced:Area" xmi:id="_PCF44qoREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.area.main" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.application/images/editor_area.png">
+ <children xsi:type="basic:PartStack" xmi:id="_PCF446oREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.partstack.main">
+ <tags>org.lunifera.vaaclipse.addons.application.partstack.main</tags>
+ </children>
+ </sharedElements>
+ <sharedElements xsi:type="basic:Part" xmi:id="_WjXU0KudEeS21pCaYI4ioQ" elementId="org.lunifera.vaaclipse.addons.application.partdescriptor.outline" accessibilityPhrase="" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.views.OutlineView" label="Outline" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.application/images/outline.png" tooltip="A common Outline" closeable="true"/>
+ <sharedElements xsi:type="basic:Part" xmi:id="_CtR-4MyREeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.partdescriptor.explorer" accessibilityPhrase="" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.views.ExplorerView" label="Explorer" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.application/images/xmi.png" tooltip="Main entry point for the application" closeable="true"/>
+ <sharedElements xsi:type="advanced:Area" xmi:id="_UPxG0M5VEeSscMz1WjkrfA" elementId="org.lunifera.vaaclipse.addons.application.area.materdetail.master" containerData="500" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.application/images/editor_area.png">
+ <children xsi:type="basic:PartStack" xmi:id="_XGDj8MyTEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.partstack.materdetail.master" containerData="500">
+ <tags>org.lunifera.vaaclipse.addons.application.partstack.materdetail.master</tags>
+ </children>
+ </sharedElements>
+ <trimBars xmi:id="_PCGfyKoREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.toptrimbar">
+ <children xsi:type="menu:ToolBar" xmi:id="_PCGfyaoREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.toolbar.main"/>
+ </trimBars>
+ <trimBars xmi:id="_PCGfzqoREeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.application.bottomtrimbar" side="Bottom"/>
+ </children>
+ <handlers xmi:id="_SOnJMLWwEeSHovHvSw-FSQ" elementId="org.lunifera.vaaclipse.addons.application.handler.extsave" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.handler.ExtSaveHandler" command="_NPgK4LWwEeSHovHvSw-FSQ"/>
+ <handlers xmi:id="_A5lO4LXjEeSHovHvSw-FSQ" elementId="org.lunifera.vaaclipse.addons.application.handler.extpartcallback" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.handler.ExtViewCallbackHandlerer" command="_Eupb8LXjEeSHovHvSw-FSQ"/>
+ <handlers xmi:id="_89IJ8LXuEeSlMNkaQV5RDA" elementId="org.lunifera.vaaclipse.addons.application.handler.extdelete" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.handler.ExtDeleteHandler" command="_VnMscLXuEeSlMNkaQV5RDA"/>
+ <handlers xmi:id="_AFaJgLXvEeSlMNkaQV5RDA" elementId="org.lunifera.vaaclipse.addons.application.handler.extload" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.handler.ExtLoadHandler" command="_wQPnoLXuEeSlMNkaQV5RDA"/>
+ <handlers xmi:id="_1c4ygMDtEeSmRJXSDVN_4Q" elementId="org.lunifera.vaaclipse.addons.application.handler.openBrowser" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.handler.OpenBrowserHandler" command="_xkyfkMDtEeSmRJXSDVN_4Q"/>
+ <handlers xmi:id="_FXjXEMD8EeSQwIz-O_iJHw" elementId="org.lunifera.vaaclipse.addons.application.handler.extvalidate" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.handler.ExtValidateHandler" command="_ConroMD8EeSQwIz-O_iJHw"/>
+ <handlers xmi:id="_jA1aUMvXEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.handler.noimplementation" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.handler.NotImplementedHandler" command="_em0GEMvXEeSAOI_Qr45QBA"/>
+ <handlers xmi:id="_tKHlMMvcEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.handler.showView" contributionURI="bundleclass://org.semanticsoft.vaaclipse.additions/org.semanticsoft.vaaclipse.additions.view.ShowViewHandler" command="_t-dzQMvcEeSAOI_Qr45QBA"/>
+ <handlers xmi:id="_jEeVMFU0EeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.application.handler.ecview.showFieldHelp" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.handler.ShowFieldHelpForECViewHandler" command="_fwrpMFU0EeW2s7PYwBkfNg"/>
+ <bindingTables xmi:id="_oHto8FLsEeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.application.bindingtable.dialogAndWindow" bindingContext="_5qzyEKoQEeSuAOXH-urFdQ"/>
+ <bindingTables xmi:id="_xOr0gFLsEeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.application.bindingtable.window" bindingContext="_5qzyEaoQEeSuAOXH-urFdQ"/>
+ <bindingTables xmi:id="_xhPkIFLsEeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.application.bindingtable.dialog" bindingContext="_5qzyEqoQEeSuAOXH-urFdQ"/>
+ <rootContext xmi:id="_5qzyEKoQEeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.contexts.dialogAndWindow" name="In Dialog and Windows">
+ <children xmi:id="_5qzyEaoQEeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.contexts.window" name="In Windows"/>
+ <children xmi:id="_5qzyEqoQEeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.addons.contexts.dialog" name="In Dialogs"/>
+ </rootContext>
+ <descriptors xmi:id="_XBGroKubEeS21pCaYI4ioQ" elementId="org.lunifera.vaaclipse.addons.application.partdescriptor.explorer" label="Explorer" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.application/images/package_explorer.png" tooltip="Main entry point for the application" bindingContexts="_5qzyEaoQEeSuAOXH-urFdQ" category="org.lunifera.vaaclipse.addons.application.partstack.left" closeable="true" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.views.ExplorerView">
+ <tags>View</tags>
+ <toolbar xmi:id="_NlcLkMveEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.toolbar.1"/>
+ </descriptors>
+ <descriptors xmi:id="_4V24EMyQEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.partdescriptor.outline" label="Outline" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.application/images/outline.png" tooltip="A common outline" bindingContexts="_5qzyEaoQEeSuAOXH-urFdQ" category="org.lunifera.vaaclipse.addons.application.partstack.right" closeable="true" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.application/org.lunifera.vaaclipse.addons.application.views.OutlineView">
+ <tags>View</tags>
+ <toolbar xmi:id="_4V24EcyQEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.toolbar.1"/>
+ </descriptors>
+ <commands xmi:id="_NPgK4LWwEeSHovHvSw-FSQ" elementId="org.lunifera.vaaclipse.addons.application.command.extsave" commandName="Save" description="Save"/>
+ <commands xmi:id="_Eupb8LXjEeSHovHvSw-FSQ" elementId="org.lunifera.vaaclipse.addons.application.command.extdefault" commandName="Part Action Callback" description="A callback to the active part if command was executed. Used for actions without any command specifications."/>
+ <commands xmi:id="_VnMscLXuEeSlMNkaQV5RDA" elementId="org.lunifera.vaaclipse.addons.application.command.extdelete" commandName="Delete" description="Delete"/>
+ <commands xmi:id="_wQPnoLXuEeSlMNkaQV5RDA" elementId="org.lunifera.vaaclipse.addons.application.command.extload" commandName="Load" description="Load"/>
+ <commands xmi:id="_xkyfkMDtEeSmRJXSDVN_4Q" elementId="org.lunifera.vaaclipse.addons.application.command.openBrowser" commandName="Open Browser" description="Open Browser"/>
+ <commands xmi:id="_ConroMD8EeSQwIz-O_iJHw" elementId="org.lunifera.vaaclipse.addons.application.command.extvalidate" commandName="Validate" description="Validate"/>
+ <commands xmi:id="_em0GEMvXEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.command.noimplementation" commandName="No Implementation yet" description="No implementation yet"/>
+ <commands xmi:id="_t-dzQMvcEeSAOI_Qr45QBA" elementId="org.lunifera.vaaclipse.addons.application.command.showView" commandName="Show view" description="Show view"/>
+ <commands xmi:id="_fwrpMFU0EeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.application.command.ecview.showFieldHelp" commandName="Show field help ECView" description="Show field help for ECView">
+ <parameters xmi:id="_hHaR8FU8EeW2s7PYwBkfNg" elementId="keystroke.source" name="Source element of the keystroke"/>
+ <parameters xmi:id="_hjXOIFU8EeW2s7PYwBkfNg" elementId="keystroke.target" name="Target element of the keystroke"/>
+ </commands>
+ <addons xmi:id="_c1YngaljEeS1DvGiQJCYNA" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
+ <addons xmi:id="_c1YngqljEeS1DvGiQJCYNA" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
+ <addons xmi:id="_c1YnhKljEeS1DvGiQJCYNA" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
+ <addons xmi:id="_c1Ynh6ljEeS1DvGiQJCYNA" elementId="org.eclipse.e4.ui.workbench.handler.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>
+ <addons xmi:id="_c1YnhaljEeS1DvGiQJCYNA" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
+ <addons xmi:id="_2P2uIKoQEeSuAOXH-urFdQ" elementId="org.lunifera.vaaclipse.ui.preferences.addon" contributionURI="bundleclass://org.lunifera.vaaclipse.ui.preferences.addon/org.lunifera.vaaclipse.ui.preferences.addon.PreferencesAddon"/>
+</e4modelextension:VaaclipseApplication>
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.application/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/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.vaaclipse.addons.application/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.application/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3fcae17
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.application
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.application
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Require-Bundle: org.eclipse.core.databinding;bundle-version="1.4.1",
+ com.vaadin.server;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.4.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.e4.core.services;bundle-version="[1.2.1,1.3.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="[0.12.0,0.13.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.2,1.3.0)",
+ org.eclipse.osbp.vaaclipse.addons.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.addons.common.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.osbp.dsl.dto.lib;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.additions;bundle-version="[0.9.0,0.10.0)",
+ com.vaadin.shared;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.osbp.ecview.core.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.core.commands
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject;version="1.0.0",
+ org.osgi.framework;version="1.8.0",
+ org.osgi.service.event;version="1.3.0",
+ org.osgi.util.tracker;version="1.5.1",
+ org.slf4j
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.osbp.vaaclipse.addons.application.handler;version="0.9.0",
+ org.eclipse.osbp.vaaclipse.addons.application.views;x-internal:=true;version="0.9.0"
+OSBP-ECView-I18nProvider:
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/about.html b/org.eclipse.osbp.vaaclipse.addons.application/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/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.vaaclipse.addons.application/about.ini b/org.eclipse.osbp.vaaclipse.addons.application/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/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.vaaclipse.addons.application/about.mappings b/org.eclipse.osbp.vaaclipse.addons.application/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/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.vaaclipse.addons.application/about.properties b/org.eclipse.osbp.vaaclipse.addons.application/about.properties
new file mode 100644
index 0000000..c7188f8
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/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.vaaclipse.addons.application
+
+################ 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.vaaclipse.addons.application/build.properties b/org.eclipse.osbp.vaaclipse.addons.application/build.properties
new file mode 100644
index 0000000..2a77394
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/build.properties
@@ -0,0 +1,12 @@
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ Application.e4xmi,\
+ LICENSE.txt,\
+ .classpath,\
+ .project,\
+ epl-v10.html,\
+ license.html,\
+ images/,\
+ .settings/
+output.. = target/classes
+source.. = src/
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.application/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/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.vaaclipse.addons.application/i18n/translations.properties b/org.eclipse.osbp.vaaclipse.addons.application/i18n/translations.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/i18n/translations.properties
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/about.png b/org.eclipse.osbp.vaaclipse.addons.application/images/about.png
new file mode 100644
index 0000000..523a9f4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/about.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/collapse_all.png b/org.eclipse.osbp.vaaclipse.addons.application/images/collapse_all.png
new file mode 100644
index 0000000..6ae6c01
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/collapse_all.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/console.png b/org.eclipse.osbp.vaaclipse.addons.application/images/console.png
new file mode 100644
index 0000000..f55744f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/console.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/datasource.png b/org.eclipse.osbp.vaaclipse.addons.application/images/datasource.png
new file mode 100644
index 0000000..0194704
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/datasource.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/display.png b/org.eclipse.osbp.vaaclipse.addons.application/images/display.png
new file mode 100644
index 0000000..77143be
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/display.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/editor_area.png b/org.eclipse.osbp.vaaclipse.addons.application/images/editor_area.png
new file mode 100644
index 0000000..d697779
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/editor_area.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/error_tsk.png b/org.eclipse.osbp.vaaclipse.addons.application/images/error_tsk.png
new file mode 100644
index 0000000..487b5d7
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/error_tsk.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/fastview_restore.gif b/org.eclipse.osbp.vaaclipse.addons.application/images/fastview_restore.gif
new file mode 100644
index 0000000..e0010df
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/fastview_restore.gif
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/favicon.ico b/org.eclipse.osbp.vaaclipse.addons.application/images/favicon.ico
new file mode 100644
index 0000000..e58158c
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/favicon.ico
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/folder.png b/org.eclipse.osbp.vaaclipse.addons.application/images/folder.png
new file mode 100644
index 0000000..f633bb5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/folder.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-bottom.png b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-bottom.png
new file mode 100644
index 0000000..3d86693
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-bottom.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-bottom2.png b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-bottom2.png
new file mode 100644
index 0000000..1bf7a55
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-bottom2.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-top2.png b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-top2.png
new file mode 100644
index 0000000..8509f46
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-dark-top2.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-left.png b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-left.png
new file mode 100644
index 0000000..a6965e4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-left.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-top.png b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-top.png
new file mode 100644
index 0000000..d9479f1
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-top.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-top2.png b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-top2.png
new file mode 100644
index 0000000..51ec5e6
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/grad-light-top2.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/help.png b/org.eclipse.osbp.vaaclipse.addons.application/images/help.png
new file mode 100644
index 0000000..8fcfb91
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/help.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/html.png b/org.eclipse.osbp.vaaclipse.addons.application/images/html.png
new file mode 100644
index 0000000..a4c08bc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/html.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/img.png b/org.eclipse.osbp.vaaclipse.addons.application/images/img.png
new file mode 100644
index 0000000..91a4a2b
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/img.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/info_tsk.png b/org.eclipse.osbp.vaaclipse.addons.application/images/info_tsk.png
new file mode 100644
index 0000000..d1fcbf3
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/info_tsk.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/link_to_editor.png b/org.eclipse.osbp.vaaclipse.addons.application/images/link_to_editor.png
new file mode 100644
index 0000000..ab61503
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/link_to_editor.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/new.png b/org.eclipse.osbp.vaaclipse.addons.application/images/new.png
new file mode 100644
index 0000000..64c8a86
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/new.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/outline.png b/org.eclipse.osbp.vaaclipse.addons.application/images/outline.png
new file mode 100644
index 0000000..908eb4e
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/outline.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/package.png b/org.eclipse.osbp.vaaclipse.addons.application/images/package.png
new file mode 100644
index 0000000..906bdba
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/package.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/package_declaration.png b/org.eclipse.osbp.vaaclipse.addons.application/images/package_declaration.png
new file mode 100644
index 0000000..abced22
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/package_declaration.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/package_explorer.png b/org.eclipse.osbp.vaaclipse.addons.application/images/package_explorer.png
new file mode 100644
index 0000000..13ea956
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/package_explorer.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_16x16.png b/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_16x16.png
new file mode 100644
index 0000000..af511de
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_16x16.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_17x20.png b/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_17x20.png
new file mode 100644
index 0000000..6288cf9
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_17x20.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_active_17x20.png b/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_active_17x20.png
new file mode 100644
index 0000000..b71d5cd
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_active_17x20.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_hover_17x20.png b/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_hover_17x20.png
new file mode 100644
index 0000000..dc7caba
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/popup_button_hover_17x20.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/print.png b/org.eclipse.osbp.vaaclipse.addons.application/images/print.png
new file mode 100644
index 0000000..e21b697
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/print.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/problems.png b/org.eclipse.osbp.vaaclipse.addons.application/images/problems.png
new file mode 100644
index 0000000..0194704
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/problems.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/project.png b/org.eclipse.osbp.vaaclipse.addons.application/images/project.png
new file mode 100644
index 0000000..0194704
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/project.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/restore1.png b/org.eclipse.osbp.vaaclipse.addons.application/images/restore1.png
new file mode 100644
index 0000000..7419227
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/restore1.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/save.png b/org.eclipse.osbp.vaaclipse.addons.application/images/save.png
new file mode 100644
index 0000000..9b645ec
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/save.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/save_all.png b/org.eclipse.osbp.vaaclipse.addons.application/images/save_all.png
new file mode 100644
index 0000000..5fc9f1f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/save_all.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/text.png b/org.eclipse.osbp.vaaclipse.addons.application/images/text.png
new file mode 100644
index 0000000..4efeae9
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/text.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/toolbar_button_background_active_23x20.png b/org.eclipse.osbp.vaaclipse.addons.application/images/toolbar_button_background_active_23x20.png
new file mode 100644
index 0000000..18b8b0d
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/toolbar_button_background_active_23x20.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/toolbar_button_background_hover_23x20.png b/org.eclipse.osbp.vaaclipse.addons.application/images/toolbar_button_background_hover_23x20.png
new file mode 100644
index 0000000..931fe7d
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/toolbar_button_background_hover_23x20.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/vaaclipse.png b/org.eclipse.osbp.vaaclipse.addons.application/images/vaaclipse.png
new file mode 100644
index 0000000..2779af1
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/vaaclipse.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/variables.png b/org.eclipse.osbp.vaaclipse.addons.application/images/variables.png
new file mode 100644
index 0000000..908495a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/variables.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/warn_tsk.png b/org.eclipse.osbp.vaaclipse.addons.application/images/warn_tsk.png
new file mode 100644
index 0000000..b900f3b
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/warn_tsk.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/xmi.png b/org.eclipse.osbp.vaaclipse.addons.application/images/xmi.png
new file mode 100644
index 0000000..647fae1
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/xmi.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/images/xml.png b/org.eclipse.osbp.vaaclipse.addons.application/images/xml.png
new file mode 100644
index 0000000..2f0a698
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/images/xml.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/license.html b/org.eclipse.osbp.vaaclipse.addons.application/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/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.vaaclipse.addons.application/pom.xml b/org.eclipse.osbp.vaaclipse.addons.application/pom.xml
new file mode 100644
index 0000000..7678394
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/pom.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.application</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+
+</project>
+
+
+
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/AbstractHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/AbstractHandler.java
new file mode 100644
index 0000000..8449959
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/AbstractHandler.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.EnabledState;
+
+/**
+ * The Class AbstractHandler.
+ */
+public class AbstractHandler {
+
+ /**
+ * Instantiates a new abstract handler.
+ */
+ public AbstractHandler() {
+ super();
+ }
+
+ /**
+ * Creates the callback context.
+ *
+ * @param context
+ * the context
+ * @param command
+ * the command
+ * @return the i eclipse context
+ */
+ protected IEclipseContext createCallbackContext(MContext context,
+ Command command) {
+ final IEclipseContext pmContext = context.getContext().createChild();
+ pmContext.set("commandId", command.getId());
+ return pmContext;
+ }
+
+ /**
+ * Can execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ * @return true, if successful
+ */
+ @CanExecute
+ public boolean canExecute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ final IEclipseContext pmContext = createCallbackContext(context,
+ command.getCommand());
+ boolean result = (Boolean) ContextInjectionFactory.invoke(part.getObject(), EnabledState.class,
+ pmContext, Boolean.TRUE);
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtDeleteHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtDeleteHandler.java
new file mode 100644
index 0000000..20f8969
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtDeleteHandler.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Delete;
+
+/**
+ * The enablement of this handler is controlled by the item itself.
+ */
+public class ExtDeleteHandler extends AbstractHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ final IEclipseContext pmContext = createCallbackContext(context,
+ command.getCommand());
+ ContextInjectionFactory.invoke(part.getObject(), Delete.class,
+ pmContext, null);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtLoadHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtLoadHandler.java
new file mode 100644
index 0000000..9efe6b2
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtLoadHandler.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Load;
+
+/**
+ * The enablement of this handler is controlled by the item itself.
+ */
+public class ExtLoadHandler extends AbstractHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ final IEclipseContext pmContext = createCallbackContext(context,
+ command.getCommand());
+ ContextInjectionFactory.invoke(part.getObject(), Load.class, pmContext,
+ null);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtSaveHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtSaveHandler.java
new file mode 100644
index 0000000..100e61f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtSaveHandler.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import javax.inject.Inject;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.di.Persist;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+
+/**
+ * The enablement of this handler is controlled by the item itself.
+ */
+public class ExtSaveHandler extends AbstractHandler {
+
+ /** The service. */
+ @Inject
+ EModelService service;
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ final IEclipseContext pmContext = createCallbackContext(context,
+ command.getCommand());
+ ContextInjectionFactory.invoke(part.getObject(), Persist.class,
+ pmContext, null);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtValidateHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtValidateHandler.java
new file mode 100644
index 0000000..5a132d4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtValidateHandler.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Validate;
+
+/**
+ * The enablement of this handler is controlled by the item itself.
+ */
+public class ExtValidateHandler extends AbstractHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ final IEclipseContext pmContext = createCallbackContext(context,
+ command.getCommand());
+ ContextInjectionFactory.invoke(part.getObject(), Validate.class,
+ pmContext, null);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtViewCallbackHandlerer.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtViewCallbackHandlerer.java
new file mode 100644
index 0000000..6eff67a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ExtViewCallbackHandlerer.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Callback;
+
+/**
+ * The enablement of this handler is controlled by the item itself.
+ */
+public class ExtViewCallbackHandlerer extends AbstractHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ final IEclipseContext pmContext = createCallbackContext(context,
+ command.getCommand());
+ ContextInjectionFactory.invoke(part.getObject(), Callback.class,
+ pmContext, null);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/NotImplementedHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/NotImplementedHandler.java
new file mode 100644
index 0000000..cecb1f7
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/NotImplementedHandler.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.menu.MItem;
+
+import com.vaadin.ui.Notification;
+import com.vaadin.ui.Notification.Type;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * The Class NotImplementedHandler.
+ */
+public class NotImplementedHandler extends AbstractHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param parent
+ * the parent
+ * @param item
+ * the item
+ */
+ @Execute
+ public void execute(@Active MContext context,
+ @Active VerticalLayout parent, @Active MItem item) {
+ Notification.show("Not implemented yet.", Type.WARNING_MESSAGE);
+ }
+
+ /**
+ * Can execute.
+ *
+ * @return true, if successful
+ */
+ @CanExecute
+ public boolean canExecute() {
+ return true;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/OpenBrowserHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/OpenBrowserHandler.java
new file mode 100644
index 0000000..33cbb51
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/OpenBrowserHandler.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Load;
+
+/**
+ * The Class OpenBrowserHandler.
+ */
+public class OpenBrowserHandler extends AbstractHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ final IEclipseContext pmContext = createCallbackContext(context,
+ command.getCommand());
+ ContextInjectionFactory.invoke(part.getObject(), Load.class, pmContext,
+ null);
+ }
+
+ /**
+ * Can execute.
+ *
+ * @return true, if successful
+ */
+ @CanExecute
+ public boolean canExecute() {
+ return true;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/OpenRelatedPartHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/OpenRelatedPartHandler.java
new file mode 100644
index 0000000..19d2162
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/OpenRelatedPartHandler.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Validate;
+
+/**
+ * The enablement of this handler is controlled by the item itself.
+ */
+public class OpenRelatedPartHandler extends AbstractHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ final IEclipseContext pmContext = createCallbackContext(context,
+ command.getCommand());
+ ContextInjectionFactory.invoke(part.getObject(), Validate.class,
+ pmContext, null);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ShowFieldHelpForECViewHandler.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ShowFieldHelpForECViewHandler.java
new file mode 100644
index 0000000..17d1ce3
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/handler/ShowFieldHelpForECViewHandler.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.handler;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Constants;
+import org.eclipse.osbp.vaaclipse.addons.common.api.help.IHelpViewService;
+
+/**
+ * Opens the field help view.
+ */
+public class ShowFieldHelpForECViewHandler extends AbstractHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param command
+ * the command
+ * @param helpService
+ * the help service
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command, @Optional IHelpViewService helpService) {
+
+ if (helpService == null) {
+ return;
+ }
+
+ String fieldId = part.getElementId() + ":"
+ + command.getParameterMap().get(IE4Constants.KEYSTROKE_TARGET);
+ helpService.openFieldHelp(fieldId, part.getContext());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.application.handler.AbstractHandler#canExecute(org.eclipse.e4.ui.model.application.ui.MContext, org.eclipse.e4.ui.model.application.ui.basic.MPart, org.eclipse.core.commands.ParameterizedCommand)
+ */
+ @CanExecute
+ public boolean canExecute(@Active MContext context, @Active MPart part,
+ ParameterizedCommand command) {
+ return true;
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/views/ExplorerView.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/views/ExplorerView.java
new file mode 100644
index 0000000..5ca42c2
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/views/ExplorerView.java
@@ -0,0 +1,212 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.views;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.osbp.runtime.common.validation.Status;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerCategory;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerInfo;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerInfoManager;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerLeaf;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.data.Item;
+import com.vaadin.data.util.HierarchicalContainer;
+import com.vaadin.event.ItemClickEvent;
+import com.vaadin.event.ItemClickEvent.ItemClickListener;
+import com.vaadin.server.Resource;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.Tree;
+import com.vaadin.ui.Tree.ExpandEvent;
+import com.vaadin.ui.Tree.ExpandListener;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.themes.Reindeer;
+
+/**
+ * The explorer view is the main entry point for the user to deal with the
+ * applications. Applications, processes,... and beeing displayed there.
+ */
+@SuppressWarnings("serial")
+public class ExplorerView implements ItemClickListener, ExpandListener {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ExplorerView.class);
+
+ /** The tree. */
+ private Tree tree;
+
+ /** The panel. */
+ private Panel panel;
+
+ /** The eclipse context. */
+ private IEclipseContext eclipseContext;
+
+ /** The container. */
+ private LazyInfoLoader container;
+
+ /** The resolved. */
+ private Set<IExplorerInfo> resolved = new HashSet<IExplorerInfo>();
+
+ /**
+ * Instantiates a new explorer view.
+ *
+ * @param parent
+ * the parent
+ * @param eclipseContext
+ * the eclipse context
+ * @param app
+ * the app
+ */
+ @Inject
+ public ExplorerView(VerticalLayout parent, IEclipseContext eclipseContext,
+ MApplication app) {
+
+ this.eclipseContext = eclipseContext;
+
+ panel = new Panel();
+ panel.addStyleName(Reindeer.PANEL_LIGHT);
+ panel.setSizeFull();
+ tree = new Tree();
+ tree.setImmediate(true);
+ panel.setContent(tree);
+
+ container = new LazyInfoLoader();
+ tree.setContainerDataSource(container);
+ tree.setItemCaptionPropertyId(IExplorerInfo.PROP__LABEL);
+ tree.setItemIconPropertyId(IExplorerInfo.PROP__ICON);
+
+ tree.addItemClickListener(this);
+ tree.addExpandListener(this);
+
+ parent.addComponent(panel);
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.ui.Tree.ExpandListener#nodeExpand(com.vaadin.ui.Tree.ExpandEvent)
+ */
+ @Override
+ public void nodeExpand(ExpandEvent event) {
+ resolveChildren((IExplorerInfo) event.getItemId());
+ }
+
+ /**
+ * Resolve children.
+ *
+ * @param itemId
+ * the item id
+ */
+ @SuppressWarnings("unchecked")
+ private void resolveChildren(IExplorerInfo itemId) {
+ try {
+ if (itemId instanceof IExplorerCategory) {
+ IExplorerCategory category = (IExplorerCategory) itemId;
+ // access the categories getChildren method. The category
+ // will lazy load the childrens.
+ for (IExplorerInfo newInfo : ((IExplorerCategory) itemId)
+ .getChildren()) {
+ Item item = container.addItem(newInfo);
+ if (item == null) {
+ continue;
+ }
+ item.getItemProperty("label").setValue(newInfo.getLabel());
+ item.getItemProperty("icon").setValue(newInfo.getIcon());
+ container.setParent(newInfo, category);
+ if (newInfo instanceof IExplorerLeaf) {
+ container.setChildrenAllowed(newInfo, false);
+ }
+ }
+ }
+ } finally {
+ resolved.add(itemId);
+ }
+ }
+
+ /**
+ * Gets the platform component.
+ *
+ * @return the platform component
+ */
+ public Object getPlatformComponent() {
+ return panel;
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.event.ItemClickEvent.ItemClickListener#itemClick(com.vaadin.event.ItemClickEvent)
+ */
+ @Override
+ public void itemClick(ItemClickEvent event) {
+ IExplorerInfo info = (IExplorerInfo) event.getItemId();
+ if (info instanceof IExplorerLeaf) {
+ IExplorerLeaf leaf = (IExplorerLeaf) info;
+ leaf.execute(eclipseContext);
+ }
+ }
+
+ /**
+ * The Class LazyInfoLoader.
+ */
+ private class LazyInfoLoader extends HierarchicalContainer {
+
+ /**
+ * Instantiates a new lazy info loader.
+ */
+ public LazyInfoLoader() {
+ addContainerProperty("label", String.class, "");
+ addContainerProperty("icon", Resource.class, null);
+
+ loadRootElements();
+ }
+
+ /**
+ * Returns the infos as an input for the tree.
+ */
+ @SuppressWarnings("unchecked")
+ private void loadRootElements() {
+ ServiceTracker<IExplorerInfoManager, IExplorerInfoManager> tracker = new ServiceTracker<IExplorerInfoManager, IExplorerInfoManager>(
+ FrameworkUtil.getBundle(getClass()).getBundleContext(),
+ IExplorerInfoManager.class, null);
+
+ try {
+ tracker.open();
+ IExplorerInfoManager provider = tracker.waitForService(500);
+ if (provider == null) {
+ return;
+ }
+ for (IExplorerInfo newInfo : provider.getExplorerInfo(null,
+ eclipseContext)) {
+ Item item = addItem(newInfo);
+ item.getItemProperty("label").setValue(newInfo.getLabel());
+ item.getItemProperty("icon").setValue(newInfo.getIcon());
+ if (newInfo instanceof IExplorerLeaf) {
+ setChildrenAllowed(newInfo, false);
+ }
+ }
+ } catch (InterruptedException e) {
+ LOGGER.error("{}", e);
+ eclipseContext.get(IStatusManager.class).getActiveScope()
+ .addStatus(Status.createErrorStatus(e));
+ } finally {
+ tracker.close();
+ }
+ }
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/views/OutlineView.java b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/views/OutlineView.java
new file mode 100644
index 0000000..58cde38
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/src/org/eclipse/osbp/vaaclipse/addons/application/views/OutlineView.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.application.views;
+
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * View that shows problems.
+ */
+public class OutlineView {
+
+ /** The Constant LOGGER. */
+ @SuppressWarnings("unused")
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(OutlineView.class);
+
+ /**
+ * Instantiates a new outline view.
+ *
+ * @param parent
+ * the parent
+ * @param eclipseContext
+ * the eclipse context
+ * @param app
+ * the app
+ */
+ @Inject
+ public OutlineView(VerticalLayout parent, IEclipseContext eclipseContext,
+ MApplication app) {
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.checkstyle b/org.eclipse.osbp.vaaclipse.addons.common/.checkstyle
new file mode 100644
index 0000000..2f2667a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.checkstyle
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <fileset name="all" enabled="true" check-config-name="emfstoreStyle" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.project b/org.eclipse.osbp.vaaclipse.addons.common/.project
new file mode 100644
index 0000000..c3e757c
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.project
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.common</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.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.vaadin.integration.eclipse.addonStylesBuilder</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.vaaclipse.addons.common/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.common/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/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.vaaclipse.addons.common/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.common/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..377cefc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/META-INF/MANIFEST.MF
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.common
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.common
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject,
+ org.eclipse.osgi.util;version="[1.1.0,1.2.0)",
+ org.osgi.framework;version="1.8.0",
+ org.osgi.service.component.annotations;version="1.2.0",
+ org.osgi.service.event;version="1.3.0",
+ org.slf4j
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.osbp.vaaclipse.addons.common.event;version="0.9.0",
+ org.eclipse.osbp.vaaclipse.addons.common.event.impl;version="0.9.0";x-internal:=true,
+ org.eclipse.osbp.vaaclipse.addons.common.resource;version="0.9.0";x-internal:=true,
+ org.eclipse.osbp.vaaclipse.addons.common.state;version="0.9.0";x-internal:=true,
+ org.eclipse.osbp.vaaclipse.addons.common.status;version="0.9.0";x-internal:=true;uses:="org.eclipse.osbp.vaaclipse.addons.common.api.status",
+ org.eclipse.osbp.vaaclipse.addons.common.ui;version="0.9.0"
+Require-Bundle: com.vaadin.server;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.4.0)",
+ org.eclipse.osbp.vaaclipse.addons.common.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.core.services;bundle-version="[1.2.1,1.3.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.osbp.runtime.web.vaadin.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.2,1.3.0)",
+ org.eclipse.emf.ecore;bundle-version="2.10.2",
+ org.eclipse.equinox.common;bundle-version="3.6.200",
+ org.eclipse.osgi;bundle-version="3.10.2",
+ org.eclipse.e4.ui.model.workbench;bundle-version="1.1.0",
+ org.eclipse.emf.ecore.xmi;bundle-version="2.10.2",
+ org.eclipse.equinox.registry,
+ org.eclipse.osbp.vaaclipse.publicapi;bundle-version="[0.9.0,0.10.0)",
+ org.jsoup;bundle-version="1.8.3",
+ com.vaadin.shared;bundle-version="7.5.7"
+Service-Component: OSGI-INF/*.xml
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.EventTopicNormalizerFactory.xml b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.EventTopicNormalizerFactory.xml
new file mode 100644
index 0000000..76dfa02
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.EventTopicNormalizerFactory.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.eclipse.osbp.vaaclipse.addons.common.event.EventTopicNormalizerFactory">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.common.event.EventTopicNormalizerFactory"/>
+
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" type="String" value="org.eclipse.osbp.vaaclipse.addons.common.event.EventTopicNormalizer"/>
+ <property name="service.ranking" type="Integer" value="10000"/>
+</scr:component>
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory.xml b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory.xml
new file mode 100644
index 0000000..fbda1bd
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory"/>
+
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" type="String" value="org.eclipse.e4.core.services.events.IEventBroker"/>
+ <property name="service.ranking" type="Integer" value="10000"/>
+</scr:component>
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider.xml b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider.xml
new file mode 100644
index 0000000..6371cfe
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider"/>
+ <service>
+ <provide interface="org.eclipse.osbp.runtime.web.vaadin.common.resource.IResourceProvider"/>
+ </service>
+ <property name="service.ranking" type="Integer" value="1000"/>
+</scr:component>
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.state.SharedStateContextAdapterFactory.xml b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.state.SharedStateContextAdapterFactory.xml
new file mode 100644
index 0000000..e25e1c3
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.state.SharedStateContextAdapterFactory.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.vaaclipse.addons.common.state.SharedStateContextAdapterFactory">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.common.state.SharedStateContextAdapterFactory"/>
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" value="org.eclipse.osbp.runtime.common.state.ISharedStateContextProvider"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.status.StatusManagerFactory.xml b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.status.StatusManagerFactory.xml
new file mode 100644
index 0000000..c27ae75
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.status.StatusManagerFactory.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.vaaclipse.addons.common.status.StatusManagerFactory">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.common.status.StatusManagerFactory"/>
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" value="org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/about.html b/org.eclipse.osbp.vaaclipse.addons.common/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/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.vaaclipse.addons.common/about.ini b/org.eclipse.osbp.vaaclipse.addons.common/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/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.vaaclipse.addons.common/about.mappings b/org.eclipse.osbp.vaaclipse.addons.common/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/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.vaaclipse.addons.common/about.properties b/org.eclipse.osbp.vaaclipse.addons.common/about.properties
new file mode 100644
index 0000000..d40947f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/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.vaaclipse.addons.common
+
+################ 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.vaaclipse.addons.common/build.properties b/org.eclipse.osbp.vaaclipse.addons.common/build.properties
new file mode 100644
index 0000000..1394c6c
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/build.properties
@@ -0,0 +1,12 @@
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ OSGI-INF/,\
+ .classpath,\
+ .project,\
+ .settings/,\
+ LICENSE.txt,\
+ epl-v10.html,\
+ license.html,\
+ pom.xml
+output.. = target/classes/
+source.. = src/
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.common/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/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.vaaclipse.addons.common/license.html b/org.eclipse.osbp.vaaclipse.addons.common/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/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.vaaclipse.addons.common/pom.xml b/org.eclipse.osbp.vaaclipse.addons.common/pom.xml
new file mode 100644
index 0000000..049b104
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.common</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/EventTopicNormalizer.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/EventTopicNormalizer.java
new file mode 100644
index 0000000..407e264
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/EventTopicNormalizer.java
@@ -0,0 +1,50 @@
+/**
+ * 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.vaaclipse.addons.common.event;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Optional;
+
+/**
+ * Wraps and unwraps the event topics.
+ */
+public class EventTopicNormalizer {
+
+ /** The application instance id. */
+ @Inject
+ @Named("e4ApplicationInstanceId")
+ @Optional
+ String applicationInstanceId;
+
+ /**
+ * Wrap topic.
+ *
+ * @param topic
+ * the topic
+ * @return the string
+ */
+ public String wrapTopic(String topic) {
+ return applicationInstanceId + "/" + topic;
+ }
+
+ /**
+ * Unwrap topic.
+ *
+ * @param topic
+ * the topic
+ * @return the string
+ */
+ public String unwrapTopic(String topic) {
+ return topic.replace(applicationInstanceId + "/", "");
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/EventTopicNormalizerFactory.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/EventTopicNormalizerFactory.java
new file mode 100644
index 0000000..942b3af
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/EventTopicNormalizerFactory.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.vaaclipse.addons.common.event;
+
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+
+/**
+ * A factory for creating EventTopicNormalizer objects.
+ */
+public class EventTopicNormalizerFactory extends ContextFunction {
+
+ /**
+ * Instantiates a new event topic normalizer factory.
+ */
+ public EventTopicNormalizerFactory() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.core.contexts.ContextFunction#compute(org.eclipse.e4.core.contexts.IEclipseContext)
+ */
+ @Override
+ public Object compute(IEclipseContext context) {
+ // context is application context since startup eagerly very early
+ EventTopicNormalizer normalizer = ContextInjectionFactory.make(
+ EventTopicNormalizer.class, context);
+ context.set(EventTopicNormalizer.class, normalizer);
+ return normalizer;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/impl/SeparatedEventBroker.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/impl/SeparatedEventBroker.java
new file mode 100644
index 0000000..9b4279f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/impl/SeparatedEventBroker.java
@@ -0,0 +1,212 @@
+/**
+ * Copyright (c) Rushan Gilmulin
+ * 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 - Copied from Vaaclipse
+ */
+package org.eclipse.osbp.vaaclipse.addons.common.event.impl;
+
+import java.util.Collection;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+import javax.annotation.PreDestroy;
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.core.services.log.Logger;
+import org.eclipse.e4.ui.di.UISynchronize;
+import org.eclipse.e4.ui.internal.services.Activator;
+import org.eclipse.e4.ui.internal.services.ServiceMessages;
+import org.eclipse.e4.ui.services.internal.events.EventBroker;
+import org.eclipse.e4.ui.services.internal.events.UIEventHandler;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.osbp.vaaclipse.addons.common.event.EventTopicNormalizer;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventAdmin;
+import org.osgi.service.event.EventConstants;
+import org.osgi.service.event.EventHandler;
+
+/**
+ * The Class SeparatedEventBroker.
+ */
+@SuppressWarnings({ "restriction", "rawtypes" })
+public class SeparatedEventBroker extends EventBroker implements IEventBroker {
+
+ // TBD synchronization
+
+ /** The registrations. */
+ private Map<EventHandler, ServiceRegistration> registrations = new HashMap<EventHandler, ServiceRegistration>();
+
+ /** The logger. */
+ @Inject
+ Logger logger;
+
+ /** The ui sync. */
+ @Inject
+ @Optional
+ UISynchronize uiSync;
+
+ /** The normalizer. */
+ @Inject
+ private EventTopicNormalizer normalizer;
+
+ // This is a temporary code to ensure that bundle containing
+ // EventAdmin implementation is started. This code it to be removed once
+ // the proper method to start EventAdmin is added.
+ static {
+ EventAdmin eventAdmin = Activator.getDefault().getEventAdmin();
+ if (eventAdmin == null) {
+ Bundle[] bundles = Activator.getDefault().getBundleContext()
+ .getBundles();
+ for (Bundle bundle : bundles) {
+ if (!"org.eclipse.equinox.event".equals(bundle
+ .getSymbolicName()))
+ continue;
+ try {
+ bundle.start(Bundle.START_TRANSIENT);
+ } catch (BundleException e) {
+ e.printStackTrace();
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * Instantiates a new separated event broker.
+ */
+ public SeparatedEventBroker() {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.ui.services.internal.events.EventBroker#send(java.lang.String, java.lang.Object)
+ */
+ public boolean send(String topic, Object data) {
+ Event event = constructEvent(topic, data);
+ EventAdmin eventAdmin = Activator.getDefault().getEventAdmin();
+ if (eventAdmin == null) {
+ logger.error(NLS.bind(ServiceMessages.NO_EVENT_ADMIN,
+ event.toString()));
+ return false;
+ }
+ eventAdmin.sendEvent(event);
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.ui.services.internal.events.EventBroker#post(java.lang.String, java.lang.Object)
+ */
+ public boolean post(String topic, Object data) {
+ Event event = constructEvent(topic, data);
+ EventAdmin eventAdmin = Activator.getDefault().getEventAdmin();
+ if (eventAdmin == null) {
+ logger.error(NLS.bind(ServiceMessages.NO_EVENT_ADMIN,
+ event.toString()));
+ return false;
+ }
+ eventAdmin.postEvent(event);
+ return true;
+ }
+
+ /**
+ * Construct event.
+ *
+ * @param topic
+ * the topic
+ * @param data
+ * the data
+ * @return the event
+ */
+ @SuppressWarnings("unchecked")
+ private Event constructEvent(String topic, Object data) {
+ Event event;
+
+ topic = normalizer.wrapTopic(topic);
+
+ if (data instanceof Dictionary<?, ?>) {
+ event = new Event(topic, (Dictionary<String, ?>) data);
+ } else if (data instanceof Map<?, ?>) {
+ event = new Event(topic, (Map<String, ?>) data);
+ } else {
+ Dictionary<String, Object> d = new Hashtable<String, Object>(2);
+ d.put(EventConstants.EVENT_TOPIC, topic);
+ if (data != null)
+ d.put(IEventBroker.DATA, data);
+ event = new Event(topic, d);
+ }
+ return event;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.ui.services.internal.events.EventBroker#subscribe(java.lang.String, org.osgi.service.event.EventHandler)
+ */
+ public boolean subscribe(String topic, EventHandler eventHandler) {
+ return subscribe(topic, null, eventHandler, false);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.ui.services.internal.events.EventBroker#subscribe(java.lang.String, java.lang.String, org.osgi.service.event.EventHandler, boolean)
+ */
+ public boolean subscribe(String topic, String filter,
+ EventHandler eventHandler, boolean headless) {
+ BundleContext bundleContext = Activator.getDefault().getBundleContext();
+ if (bundleContext == null) {
+ logger.error(NLS.bind(ServiceMessages.NO_BUNDLE_CONTEXT, topic));
+ return false;
+ }
+
+ String[] topics = new String[] { normalizer.wrapTopic(topic) };
+
+ Dictionary<String, Object> d = new Hashtable<String, Object>();
+ d.put(EventConstants.EVENT_TOPIC, topics);
+ if (filter != null)
+ d.put(EventConstants.EVENT_FILTER, filter);
+ EventHandler wrappedHandler = new UIEventHandler(eventHandler,
+ headless ? null : uiSync);
+ ServiceRegistration registration = bundleContext.registerService(
+ EventHandler.class.getName(), wrappedHandler, d);
+ registrations.put(eventHandler, registration);
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.ui.services.internal.events.EventBroker#unsubscribe(org.osgi.service.event.EventHandler)
+ */
+ public boolean unsubscribe(EventHandler eventHandler) {
+ ServiceRegistration registration = (ServiceRegistration) registrations
+ .remove(eventHandler);
+ if (registration == null)
+ return false;
+ registration.unregister();
+ return true;
+ }
+
+ /**
+ * Dodispose.
+ */
+ @PreDestroy
+ public void dodispose() {
+ Collection<ServiceRegistration> values = registrations.values();
+ ServiceRegistration[] array = values
+ .toArray(new ServiceRegistration[values.size()]);
+ registrations.clear();
+ for (int i = 0; i < array.length; i++) {
+ // System.out.println("SeparatedEventBroker dispose:" + array[i] +
+ // ")");
+ array[i].unregister();
+ }
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/impl/SeparatedEventBrokerFactory.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/impl/SeparatedEventBrokerFactory.java
new file mode 100644
index 0000000..7124ba3
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/event/impl/SeparatedEventBrokerFactory.java
@@ -0,0 +1,50 @@
+/**
+ * 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.vaaclipse.addons.common.event.impl;
+
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.ui.services.internal.events.EventBroker;
+
+/**
+ * A factory for creating SeparatedEventBroker objects.
+ */
+@SuppressWarnings({ "restriction" })
+public class SeparatedEventBrokerFactory extends ContextFunction {
+
+ /**
+ * Instantiates a new separated event broker factory.
+ */
+ public SeparatedEventBrokerFactory() {
+ // System.out.println("separated event broker factory start");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.core.contexts.ContextFunction#compute(org.eclipse.e4.core.contexts.IEclipseContext)
+ */
+ @Override
+ public Object compute(IEclipseContext context) {
+
+
+
+
+ // context is application context since eventbroker started up eagerly
+ // very early
+ SeparatedEventBroker broker = ContextInjectionFactory.make(
+ SeparatedEventBroker.class, context);
+ context.set(SeparatedEventBroker.class, broker);
+ context.set(EventBroker.class, broker);
+ context.set(IEventBroker.class, broker);
+ return broker;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/LayoutChangedObserver.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/LayoutChangedObserver.java
new file mode 100644
index 0000000..3f755bc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/LayoutChangedObserver.java
@@ -0,0 +1,137 @@
+/**
+ * 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.vaaclipse.addons.common.resource;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack;
+import org.eclipse.e4.ui.workbench.IModelResourceHandler;
+import org.eclipse.e4.ui.workbench.UIEvents;
+import org.eclipse.e4.ui.workbench.UIEvents.EventTags;
+import org.eclipse.osbp.vaaclipse.addons.common.event.EventTopicNormalizer;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Observes changes in the layout and forces a resource save.
+ */
+public class LayoutChangedObserver implements EventHandler {
+
+ /** The Constant ELEMENT_CONTAINER_SELECTED_ELEMENT_SET. */
+ private static final String ELEMENT_CONTAINER_SELECTED_ELEMENT_SET = "org/eclipse/e4/ui/model/ui/ElementContainer/selectedElement/SET";
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(LayoutChangedObserver.class);
+
+ /** The topics. */
+ private static Set<String> TOPICS = new HashSet<String>();
+ static {
+ TOPICS.add(UIEvents.UIElement.TOPIC_CONTAINERDATA);
+ TOPICS.add(UIEvents.ElementContainer.TOPIC_SELECTEDELEMENT);
+ TOPICS.add(UIEvents.ElementContainer.TOPIC_CHILDREN);
+ }
+
+ /** The event broker. */
+ @Inject
+ private IEventBroker eventBroker;
+
+ /** The topic normalizer. */
+ @Inject
+ private EventTopicNormalizer topicNormalizer;
+
+ /** The resource handler. */
+ @Inject
+ private IModelResourceHandler resourceHandler;
+
+ /** The current timer. */
+ private Timer currentTimer;
+
+ /**
+ * This method is called when information about an LayoutChanged which was
+ * previously requested using an asynchronous interface becomes available.
+ */
+ @PostConstruct
+ public void setup() {
+// commented temporarily by ri - don't save perspectives
+// for (String topic : TOPICS) {
+// eventBroker.subscribe(topic, this);
+// }
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.service.event.EventHandler#handleEvent(org.osgi.service.event.Event)
+ */
+ @Override
+ public void handleEvent(Event event) {
+ Object changedObj = event.getProperty(EventTags.ELEMENT);
+
+ if (topicNormalizer.unwrapTopic(event.getTopic()).equals(
+ ELEMENT_CONTAINER_SELECTED_ELEMENT_SET)) {
+ if (!(changedObj instanceof MPerspectiveStack)) {
+ return;
+ }
+ }
+
+ synchronized (this) {
+ // Wait for 1000ms before saving. Most probably several events will
+ // arrive in the next milli seconds
+ if (currentTimer == null) {
+ currentTimer = new Timer();
+ currentTimer.schedule(new TimerTask() {
+ @Override
+ public void run() {
+ try {
+ resourceHandler.save();
+ LOGGER.debug("ApplicationModel-Resource saved.");
+ resetTimer();
+ } catch (IOException e) {
+ LOGGER.warn("{}", e);
+ }
+ }
+ }, 1000);
+ LOGGER.debug("Scheduled Model-Save-Timer.");
+ } else {
+ LOGGER.debug("Timer already active.");
+ }
+ }
+
+ }
+
+ /**
+ * This method is called when information about an LayoutChanged which was
+ * previously requested using an asynchronous interface becomes available.
+ */
+ protected void resetTimer() {
+ synchronized (this) {
+ currentTimer = null;
+ }
+ }
+
+ /**
+ * This method is called when information about an LayoutChanged which was
+ * previously requested using an asynchronous interface becomes available.
+ */
+ public void dispose() {
+ eventBroker.unsubscribe(this);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/ResourceHandler.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/ResourceHandler.java
new file mode 100644
index 0000000..e84ea7b
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/ResourceHandler.java
@@ -0,0 +1,694 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2014 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Tristan Hume - <trishume@gmail.com> -
+ * Fix for Bug 2369 [Workbench] Would like to be able to save workspace without exiting
+ * Implemented workbench auto-save to correctly restore state in case of crash.
+ * Terry Parker <tparker@google.com> - Bug 416673
+ * Florian Pirchner - adjusted for Vaaclipse usecases - uses different ModelAssembler and ModelUtils
+ ******************************************************************************/
+
+package org.eclipse.osbp.vaaclipse.addons.common.resource;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.core.internal.runtime.PlatformURLPluginConnection;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.core.services.log.Logger;
+import org.eclipse.e4.ui.internal.workbench.CommandLineOptionModelProcessor;
+import org.eclipse.e4.ui.internal.workbench.E4Workbench;
+import org.eclipse.e4.ui.internal.workbench.E4XMIResource;
+import org.eclipse.e4.ui.internal.workbench.URIHelper;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.MApplicationElement;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.workbench.IWorkbench;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.osbp.vaaclipse.addons.common.api.resource.ICustomizedModelResourceHandler;
+import org.osgi.framework.Bundle;
+
+/**
+ * A common implementation for the ResourceHandler. This resource handler
+ * automatically loads user defined perspectives from a different model. So user
+ * can save, create and delete their own perspectives.
+ */
+@SuppressWarnings("restriction")
+public class ResourceHandler implements ICustomizedModelResourceHandler {
+
+ /** The resource set. */
+ @Inject
+ private ResourceSet resourceSet;
+
+ /** The resource. */
+ private E4XMIResource resource;
+
+ /** The logger. */
+ @Inject
+ private Logger logger;
+
+ /** The user id. */
+ @Inject
+ @Named("userId")
+ @Optional
+ String userId;
+
+ /** The context. */
+ @Inject
+ private IEclipseContext context;
+
+ /** The application definition instance. */
+ @Inject
+ @Named(E4Workbench.INITIAL_WORKBENCH_MODEL_URI)
+ private URI applicationDefinitionInstance;
+
+ /** The instance location. */
+ @Inject
+ @Optional
+ @Named(E4Workbench.INSTANCE_LOCATION)
+ private Location instanceLocation;
+
+ /**
+ * Dictates whether the model should be stored using EMF or with the merging
+ * algorithm. https://bugs.eclipse.org/bugs/show_bug.cgi?id=295524
+ *
+ */
+ final private boolean saveAndRestore;
+
+ /** The clear persisted state. */
+ private boolean clearPersistedState;
+
+ /**
+ * Constructor.
+ *
+ * @param saveAndRestore
+ * the save and restore
+ * @param clearPersistedState
+ * the clear persisted state
+ */
+ @Inject
+ public ResourceHandler(
+ @Named(IWorkbench.PERSIST_STATE) boolean saveAndRestore,
+ @Named(IWorkbench.CLEAR_PERSISTED_STATE) boolean clearPersistedState) {
+ this.saveAndRestore = saveAndRestore;
+ this.clearPersistedState = clearPersistedState;
+ }
+
+ /**
+ * Inits the.
+ */
+ @PostConstruct
+ void init() {
+
+ }
+
+ /**
+ * Checks for top level windows.
+ *
+ * @return {@code true} if the current application model has top-level
+ * windows.
+ */
+ public boolean hasTopLevelWindows() {
+ return hasTopLevelWindows(resource);
+ }
+
+ /**
+ * Checks for top level windows.
+ *
+ * @param applicationResource
+ * the application resource
+ * @return {@code true} if the specified application model has top-level
+ * windows.
+ */
+ private boolean hasTopLevelWindows(Resource applicationResource) {
+ if (applicationResource == null
+ || applicationResource.getContents() == null) {
+ // If the application resource doesn't exist or has no contents,
+ // then it has no
+ // top-level windows (and we are in an error state).
+ return false;
+ }
+ MApplication application = (MApplication) applicationResource
+ .getContents().get(0);
+ return !application.getChildren().isEmpty();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.ui.workbench.IModelResourceHandler#loadMostRecentModel()
+ */
+ @Override
+ public Resource loadMostRecentModel() {
+ File workbenchData = null;
+ URI restoreLocation = null;
+
+ if (saveAndRestore) {
+ workbenchData = getWorkbenchSaveLocation();
+ restoreLocation = URI
+ .createFileURI(workbenchData.getAbsolutePath());
+ }
+
+ if (clearPersistedState && workbenchData != null
+ && workbenchData.exists()) {
+ workbenchData.delete();
+ }
+
+ // last stored time-stamp
+ long restoreLastModified = restoreLocation == null ? 0L : new File(
+ restoreLocation.toFileString()).lastModified();
+
+ // See bug 380663, bug 381219
+ // long lastApplicationModification = getLastApplicationModification();
+ // boolean restore = restoreLastModified > lastApplicationModification;
+ boolean restore = restoreLastModified > 0;
+ boolean initialModel;
+
+ resource = null;
+ if (restore && saveAndRestore) {
+ resource = (E4XMIResource) loadResource(restoreLocation);
+ // If the saved model does not have any top-level windows, Eclipse
+ // will exit
+ // immediately, so throw out the persisted state and reinitialize
+ // with the defaults.
+ if (!hasTopLevelWindows(resource)) {
+ if (logger != null) {
+ logger.error(
+ new Exception(), // log a stack trace to help debug
+ // the corruption
+ "The persisted workbench has no top-level windows, so reinitializing with defaults."); //$NON-NLS-1$
+ }
+ resource = null;
+ }
+ }
+ if (resource == null) {
+ Resource appResource = loadResource(applicationDefinitionInstance);
+ if (!hasTopLevelWindows(appResource) && logger != null) {
+ logger.error(
+ new Exception(), // log a stack trace to help debug the
+ // corruption
+ "Initializing from the application definition instance yields no top-level windows! " //$NON-NLS-1$
+ + "Continuing execution, but the missing windows may cause other initialization failures."); //$NON-NLS-1$
+ }
+ MApplication theApp = (MApplication) appResource.getContents().get(
+ 0);
+ resource = (E4XMIResource) createResourceWithApp(theApp);
+ context.set(E4Workbench.NO_SAVED_MODEL_FOUND, Boolean.TRUE);
+ initialModel = true;
+
+ // remove the appResource since it was damaged by
+ // #createResourceWithApp()
+ appResource.unload();
+ resourceSet.getResources().remove(appResource);
+ } else {
+ initialModel = false;
+ }
+
+ // create an URI mapping from the application resource to the user
+ // resource
+ resourceSet.getURIConverter().getURIMap()
+ .put(applicationDefinitionInstance, resource.getURI());
+ // create a relative URI mapping for the last segment of the resource
+ // URI to its full qualified URI.
+ // Necessary to load split models like an exported perspective
+ resourceSet
+ .getURIConverter()
+ .getURIMap()
+ .put(URI.createURI(resource.getURI().lastSegment()),
+ resource.getURI());
+
+ // Add model items described in the model extension point
+ // This has to be done before commands are put into the context
+ MApplication appElement = (MApplication) resource.getContents().get(0);
+ Map<String, String> weights = getWeights(resource, appElement);
+ this.context.set(MApplication.class, appElement);
+ VaaclipseModelAssembler contribProcessor = ContextInjectionFactory
+ .make(VaaclipseModelAssembler.class, context);
+ contribProcessor.processModel(initialModel);
+
+ // load the customized models
+ //
+ SystemuserModelHandler handler = ContextInjectionFactory.make(
+ SystemuserModelHandler.class, context);
+ handler.mergeFragment();
+
+ if (!clearPersistedState) {
+ CommandLineOptionModelProcessor processor = ContextInjectionFactory
+ .make(CommandLineOptionModelProcessor.class, context);
+ processor.process();
+ }
+
+ // apply the weights
+ //
+ for (Map.Entry<String, String> entry : weights.entrySet()) {
+ MUIElement element = (MUIElement) resource.getIDToEObjectMap().get(
+ entry.getKey());
+ if (element != null) {
+ element.setContainerData(entry.getValue());
+ }
+ }
+
+ return resource;
+ }
+
+ /**
+ * Returns the layout weights for later restore.
+ *
+ * @param resource
+ * the resource
+ * @param appElement
+ * the app element
+ * @return the weights
+ */
+ private Map<String, String> getWeights(E4XMIResource resource,
+ MApplication appElement) {
+
+ Map<String, String> result = new HashMap<String, String>();
+ TreeIterator<EObject> treeIt = EcoreUtil.getAllContents(
+ (EObject) appElement, true);
+ while (treeIt.hasNext()) {
+ EObject eObj = treeIt.next();
+ if (eObj instanceof MUIElement) {
+ result.put(resource.getID(eObj),
+ ((MUIElement) eObj).getContainerData());
+ }
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.ui.workbench.IModelResourceHandler#save()
+ */
+ @Override
+ public void save() throws IOException {
+ if (saveAndRestore) {
+ MApplication mApp = (MApplication) resource.getContents().get(0);
+ Resource toSave = createResourceForSave(mApp);
+ toSave.save(null);
+ // resource.save(null);
+ }
+ }
+
+ /**
+ * Creates a resource with an app Model, used for saving copies of the main
+ * app model.
+ *
+ * @param theApp
+ * the application model to add to the resource
+ * @return a resource with a proper save path with the model as contents
+ */
+ @Override
+ public Resource createResourceWithApp(MApplication theApp) {
+ E4XMIResource appResource = (E4XMIResource) ((EObject) theApp)
+ .eResource();
+ Map<EObject, String> idMap = new HashMap<EObject, String>(
+ appResource.getEObjectToIDMap());
+
+ E4XMIResource res = (E4XMIResource) createResource();
+ // Removes the app model from the appResource
+ res.getContents().add((EObject) theApp);
+
+ // replace the IDs for the different EObjects by their original values.
+ // Otherwise proxies can not be resolved.
+ TreeIterator<EObject> it = EcoreUtil.getAllContents(res.getContents());
+ while (it.hasNext()) {
+ EObject o = it.next();
+ res.setID(o, idMap.get(o));
+ }
+
+ return res;
+ }
+
+ /**
+ * Creates a resource for saving issues. The content MApplication will be
+ * prepared. All the elements tagged with "vaaclipse-transient" will be
+ * removed from the model before saving.
+ *
+ * @param theApp
+ * the application model to add to the resource
+ * @return a resource with a proper save path with the model as contents
+ */
+ protected Resource createResourceForSave(MApplication theApp) {
+ E4XMIResource originalResource = (E4XMIResource) ((EObject) theApp)
+ .eResource();
+
+ // create a new resource with the copied application model and same URI
+ //
+ E4XMIResource toSaveResource = (E4XMIResource) createResource();
+ toSaveResource.setURI(originalResource.getURI());
+
+ // copy the eObject
+ //
+ EcoreUtil.Copier copier = new EcoreUtil.Copier();
+ EObject copyApp = copier.copy((EObject) theApp);
+ copier.copyReferences();
+
+ // Removes all transient objects
+ //
+ removeTransientObjects(copyApp);
+
+ // set the copy to the new resource
+ //
+ toSaveResource.getContents().add(copyApp);
+
+ // the xml ids to be transferred to the new resource
+ //
+ Map<EObject, String> idMap = new HashMap<EObject, String>(
+ originalResource.getEObjectToIDMap());
+
+ // replace the IDs for the different EObjects by their original values.
+ // Otherwise proxies can not be resolved.
+ //
+ TreeIterator<EObject> originalIterator = EcoreUtil
+ .getAllContents(originalResource.getContents());
+ while (originalIterator.hasNext()) {
+ EObject original = originalIterator.next();
+
+ String id = idMap.get(original);
+ // use the copier to find the copied element for the original
+ toSaveResource.setID(copier.get(original), id);
+ }
+
+ return toSaveResource;
+ }
+
+ /**
+ * Remove all transient objects and its cross references.
+ *
+ * @param copyApp
+ * the copy app
+ */
+ private void removeTransientObjects(EObject copyApp) {
+ List<EObject> toRemove = new ArrayList<>();
+ TreeIterator<EObject> iterator = EcoreUtil.getAllContents(copyApp,
+ false);
+ while (iterator.hasNext()) {
+ EObject eObject = iterator.next();
+ if (eObject instanceof MUIElement) {
+ MUIElement uiElement = (MUIElement) eObject;
+ if (uiElement.getTags().contains("vaaclipse-transient")) {
+ toRemove.add(eObject);
+ }
+ }
+ }
+
+ for (EObject eObject : toRemove) {
+ // remove the eObject
+ EcoreUtil.remove(eObject);
+
+ // remove all cross references
+ Collection<Setting> usages = EcoreUtil.UsageCrossReferencer.find(
+ eObject, copyApp);
+ for (Setting setting : usages) {
+ setting.unset();
+ }
+ }
+
+ }
+
+ /**
+ * Creates the resource.
+ *
+ * @return the resource
+ */
+ private Resource createResource() {
+ // if (saveAndRestore) {
+ URI saveLocation = URI.createFileURI(getWorkbenchSaveLocation()
+ .getAbsolutePath());
+ return resourceSet.createResource(saveLocation);
+ // }
+ // return resourceSet.createResource(URI.createURI("workbench.xmi")); //$NON-NLS-1$
+ }
+
+ /**
+ * Gets the workbench save location.
+ *
+ * @return the workbench save location
+ */
+ private File getWorkbenchSaveLocation() {
+ File workbenchData = new File(getBaseLocation(), String.format(
+ "%s_workbench.xmi", userId)); //$NON-NLS-1$
+ return workbenchData;
+ }
+
+ /**
+ * Gets the base location.
+ *
+ * @return the base location
+ */
+ private File getBaseLocation() {
+ File baseLocation;
+ try {
+ baseLocation = new File(URIUtil.toURI(instanceLocation.getURL()));
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ baseLocation = new File(baseLocation, ".metadata"); //$NON-NLS-1$
+ baseLocation = new File(baseLocation, ".plugins"); //$NON-NLS-1$
+ baseLocation = new File(baseLocation, "org.eclipse.e4.workbench"); //$NON-NLS-1$
+ return baseLocation;
+ }
+
+ /**
+ * Load resource.
+ *
+ * @param uri
+ * the uri
+ * @return the resource
+ */
+ // Ensures that even models with error are loaded!
+ private Resource loadResource(URI uri) {
+ Resource resource;
+ try {
+ resource = getResource(uri);
+ } catch (Exception e) {
+ // TODO We could use diagnostics for better analyzing the error
+ logger.error(e, "Unable to load resource " + uri.toString()); //$NON-NLS-1$
+ return null;
+ }
+
+ // TODO once we switch from deltas, we only need this once on the
+ // default model?
+ String contributorURI = URIHelper.EMFtoPlatform(uri);
+ if (contributorURI != null) {
+ TreeIterator<EObject> it = EcoreUtil.getAllContents(resource
+ .getContents());
+ while (it.hasNext()) {
+ EObject o = it.next();
+ if (o instanceof MApplicationElement) {
+ ((MApplicationElement) o).setContributorURI(contributorURI);
+ }
+ }
+ }
+ return resource;
+ }
+
+ /**
+ * Gets the resource.
+ *
+ * @param uri
+ * the uri
+ * @return the resource
+ * @throws Exception
+ * the exception
+ */
+ private Resource getResource(URI uri) throws Exception {
+ Resource resource;
+ if (saveAndRestore) {
+ resource = resourceSet.getResource(uri, true);
+ } else {
+ // Workaround for java.lang.IllegalStateException: No instance data
+ // can be specified
+ // thrown by
+ // org.eclipse.core.internal.runtime.DataArea.assertLocationInitialized
+ // The DataArea.assertLocationInitialized is called by
+ // ResourceSetImpl.getResource(URI,
+ // boolean)
+ resource = resourceSet.createResource(uri);
+ resource.load(new URL(uri.toString()).openStream(),
+ resourceSet.getLoadOptions());
+ }
+
+ return resource;
+ }
+
+ /**
+ * Gets the last application modification.
+ *
+ * @return the last application modification
+ */
+ protected long getLastApplicationModification() {
+ long appLastModified = 0L;
+ ResourceSetImpl resourceSetImpl = new ResourceSetImpl();
+
+ Map<String, ?> attributes = resourceSetImpl
+ .getURIConverter()
+ .getAttributes(
+ applicationDefinitionInstance,
+ Collections
+ .singletonMap(
+ URIConverter.OPTION_REQUESTED_ATTRIBUTES,
+ Collections
+ .singleton(URIConverter.ATTRIBUTE_TIME_STAMP)));
+
+ Object timestamp = attributes.get(URIConverter.ATTRIBUTE_TIME_STAMP);
+ if (timestamp instanceof Long) {
+ appLastModified = ((Long) timestamp).longValue();
+ } else if (applicationDefinitionInstance.isPlatformPlugin()) {
+ try {
+ java.net.URL url = new java.net.URL(
+ applicationDefinitionInstance.toString());
+ // can't just use 'url.openConnection()' as it usually returns a
+ // PlatformURLPluginConnection which doesn't expose the
+ // last-modification time. So we try to resolve the file through
+ // the bundle to obtain a BundleURLConnection instead.
+ Object[] obj = PlatformURLPluginConnection.parse(url.getFile()
+ .trim(), url);
+ Bundle b = (Bundle) obj[0];
+ // first try to resolve as an bundle file entry, then as a
+ // resource using
+ // the bundle's classpath
+ java.net.URL resolved = b.getEntry((String) obj[1]);
+ if (resolved == null) {
+ resolved = b.getResource((String) obj[1]);
+ }
+ if (resolved != null) {
+ URLConnection openConnection = resolved.openConnection();
+ appLastModified = openConnection.getLastModified();
+ }
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+
+ return appLastModified;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.resource.ICustomizedModelResourceHandler#loadPerspective(java.io.InputStream)
+ */
+ @Override
+ public MPerspective loadPerspective(InputStream stream) throws IOException {
+ E4XMIResource resource = new E4XMIResource(URI.createURI("perspective"));
+ resource.load(stream, null);
+ final MPerspective perspective = (MPerspective) resource.getContents()
+ .get(0);
+ resource.unload();
+ return perspective;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.resource.ICustomizedModelResourceHandler#savePerspective(org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public void savePerspective(MPerspective perspective) throws IOException {
+ Resource resource = createResourceForSave(perspective);
+ resource.save(null);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.resource.ICustomizedModelResourceHandler#savePerspective(java.io.OutputStream, org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public void savePerspective(OutputStream stream, MPerspective perspective) throws IOException {
+ Resource resource = createResourceForSave(perspective);
+ resource.save(stream, null);
+ }
+
+ /**
+ * Creates a resource for saving issues. The content {@link MPerspective}
+ * will be prepared. All the elements tagged with "vaaclipse-transient" will
+ * be removed from the model before saving.
+ *
+ * @param perspective
+ * the perspective
+ * @return a resource with a proper save path with the model as contents
+ */
+ protected Resource createResourceForSave(MPerspective perspective) {
+ E4XMIResource originalResource = (E4XMIResource) ((EObject) perspective)
+ .eResource();
+
+ // create a new resource with the copied application model and same URI
+ //
+ URI saveLocation = URI
+ .createFileURI(getWorkbenchSaveLocation().getAbsolutePath())
+ .trimSegments(1).appendSegment(perspective.getElementId())
+ .appendFileExtension("perspective");
+ XMIResource toSaveResource = new XMIResourceImpl(saveLocation);
+
+ // copy the eObject
+ //
+ EcoreUtil.Copier copier = new EcoreUtil.Copier();
+ EObject copyPerspective = copier.copy((EObject) perspective);
+ copier.copyReferences();
+
+ // Removes all transient objects
+ //
+ removeTransientObjects(copyPerspective);
+
+ // set the copy to the new resource
+ //
+ toSaveResource.getContents().add(copyPerspective);
+
+ // // the xml ids to be transferred to the new resource
+ // //
+ // Map<EObject, String> idMap = new HashMap<EObject, String>(
+ // originalResource.getEObjectToIDMap());
+ //
+ // // replace the IDs for the different EObjects by their original
+ // values.
+ // // Otherwise proxies can not be resolved.
+ // //
+ // TreeIterator<EObject> originalIterator = EcoreUtil
+ // .getAllContents(originalResource.getContents());
+ // while (originalIterator.hasNext()) {
+ // EObject original = originalIterator.next();
+ //
+ // String id = idMap.get(original);
+ // // use the copier to find the copied element for the original
+ // toSaveResource.setID(copier.get(original), id);
+ // }
+ //
+ // // // clear all internal ids
+ // // toSaveResource.getEObjectToIDMap().clear();
+ // // if (toSaveResource.getIntrinsicIDToEObjectMap() != null) {
+ // // toSaveResource.getIntrinsicIDToEObjectMap().clear();
+ // // }
+
+ return toSaveResource;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/SystemuserModelHandler.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/SystemuserModelHandler.java
new file mode 100644
index 0000000..26c0882
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/SystemuserModelHandler.java
@@ -0,0 +1,511 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.common.resource;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.internal.workbench.E4Workbench;
+import org.eclipse.e4.ui.internal.workbench.E4XMIResource;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.MApplicationElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder;
+import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
+import org.eclipse.e4.ui.model.fragment.MFragmentFactory;
+import org.eclipse.e4.ui.model.fragment.MModelFragment;
+import org.eclipse.e4.ui.model.fragment.MModelFragments;
+import org.eclipse.e4.ui.model.fragment.MStringModelFragment;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPlaceholderResolver;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.osbp.vaaclipse.addons.common.api.model.VaaclipseModelUtils;
+import org.eclipse.osbp.vaaclipse.addons.common.api.resource.ISystemuserModelHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Stateful implementation.
+ */
+@SuppressWarnings("restriction")
+public class SystemuserModelHandler implements ISystemuserModelHandler {
+
+ /**
+ * A fragment used for the system user settings. Will copied into location
+ * if not available.
+ */
+ public static final String DEFAULT_SYSTEM_USER_FRAGMENT = "platform:/plugin/org.eclipse.osbp.vaaclipse.addons.perspective/template/systemUserFragment.e4xmi-template";
+
+ /** The Constant SYSTEM_USER_FRAGMENT_PROPERTY. */
+ private static final String SYSTEM_USER_FRAGMENT_PROPERTY = "org.eclipse.osbp.vaaclipse.addons.perspective.systemuser.fragment";
+
+ /** The Constant FEATURE__CHILDREN. */
+ private static final String FEATURE__CHILDREN = UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN
+ .getName();
+
+ /** The Constant logger. */
+ private static final Logger logger = LoggerFactory
+ .getLogger(SystemuserModelHandler.class);
+
+ /** The use system user. */
+ private boolean useSystemUser = true;
+
+ /** The model service. */
+ @Inject
+ private EModelService modelService;
+
+ /** The context. */
+ @Inject
+ private IEclipseContext context;
+
+ /** The resource set. */
+ @Inject
+ private ResourceSet resourceSet;
+
+ /** The instance location. */
+ @Inject
+ @org.eclipse.e4.core.di.annotations.Optional
+ @Named(E4Workbench.INSTANCE_LOCATION)
+ private Location instanceLocation;
+
+ /** The system resource. */
+ private Resource systemResource;
+
+ /**
+ * Returns the resource for the application model.
+ *
+ * @return the application model resource
+ */
+ private Resource getApplicationModelResource() {
+ return resourceSet.getResources().get(0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.resource.ISystemuserModelHandler#mergeFragment()
+ */
+ @Override
+ public void mergeFragment() {
+ if (!useSystemUser) {
+ return;
+ }
+
+ E4XMIResource applicationResource = (E4XMIResource) getApplicationModelResource();
+
+ try {
+ MModelFragments fragmentsContainer = getFragment();
+
+ // for the first call check after getFragment()
+ if (!useSystemUser) {
+ return;
+ }
+
+ List<MModelFragment> fragments = fragmentsContainer.getFragments();
+ for (MModelFragment fragment : fragments) {
+ List<MApplicationElement> elements = fragment.getElements();
+ if (elements.size() == 0) {
+ continue;
+ }
+
+ for (MApplicationElement el : elements) {
+ EObject o = (EObject) el;
+ E4XMIResource r = (E4XMIResource) o.eResource();
+
+ if (applicationResource.getIDToEObjectMap().containsKey(
+ r.getID(o))) {
+ continue;
+ }
+
+ applicationResource.setID(o, r.getID(o));
+
+ // Remember IDs of subitems
+ TreeIterator<EObject> treeIt = EcoreUtil.getAllContents(o,
+ true);
+ while (treeIt.hasNext()) {
+ EObject eObj = treeIt.next();
+ r = (E4XMIResource) eObj.eResource();
+ applicationResource.setID(eObj, r.getInternalId(eObj));
+ }
+ }
+
+ MApplication application = (MApplication) applicationResource
+ .getContents().get(0);
+ merge(application, (MStringModelFragment) fragment);
+ }
+ } finally {
+ unload();
+ }
+ }
+
+ /**
+ * Merge.
+ *
+ * @param application
+ * the application
+ * @param fragment
+ * the fragment
+ * @return the list
+ */
+ public List<MApplicationElement> merge(MApplication application,
+ MStringModelFragment fragment) {
+ MApplicationElement o = VaaclipseModelUtils.findElementById(
+ application, fragment.getParentElementId());
+ if (o != null) {
+ EStructuralFeature feature = ((EObject) o).eClass()
+ .getEStructuralFeature(fragment.getFeaturename());
+ if (feature != null) {
+ return VaaclipseModelUtils.merge(o, feature,
+ fragment.getElements(), fragment.getPositionInList());
+ }
+
+ }
+
+ return Collections.emptyList();
+ }
+
+ /**
+ * Find fragments.
+ *
+ * @param parentId
+ * the parent id
+ * @param featureName
+ * the feature name
+ * @param fragmentsContainer
+ * the fragments container
+ * @return the list
+ */
+ protected List<MModelFragment> findFragments(String parentId,
+ String featureName, MModelFragments fragmentsContainer) {
+ final List<MModelFragment> result = new ArrayList<MModelFragment>();
+ fragmentsContainer
+ .getFragments()
+ .stream()
+ .filter(e -> e instanceof MStringModelFragment)
+ .map(c -> (MStringModelFragment) c)
+ .filter(e -> e.getParentElementId().equals(parentId)
+ && e.getFeaturename().equals(featureName))
+ .forEach(e -> result.add(e));
+ return result;
+ }
+
+ /**
+ * Creates the fragment.
+ *
+ * @param parentId
+ * the parent id
+ * @param featureName
+ * the feature name
+ * @return the m model fragment
+ */
+ protected MModelFragment createFragment(String parentId, String featureName) {
+ MStringModelFragment fragment = MFragmentFactory.INSTANCE
+ .createStringModelFragment();
+ fragment.setParentElementId(parentId);
+ fragment.setFeaturename(featureName);
+ return fragment;
+ }
+
+ /**
+ * Creates the fragment container.
+ *
+ * @return the m model fragments
+ */
+ protected MModelFragments createFragmentContainer() {
+ MModelFragments container = MFragmentFactory.INSTANCE
+ .createModelFragments();
+ return container;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.resource.ISystemuserModelHandler#addPerspectiveFragment(org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack, org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public void addPerspectiveFragment(MPerspectiveStack parent,
+ MPerspective newPerspective) {
+
+ if(!useSystemUser) {
+ return;
+ }
+
+ MModelFragment fragment = null;
+ try {
+ MModelFragments fragmentsContainer = getFragment();
+ fragment = createPerspectiveFragment(parent, newPerspective);
+ fragmentsContainer.getFragments().add(fragment);
+
+ persistFragment(fragmentsContainer);
+ } catch (IOException e) {
+ logger.warn("{}", e);
+ } finally {
+ unload();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.resource.ISystemuserModelHandler#removePerspectiveFragment(java.lang.String, org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public void removePerspectiveFragment(String parentId,
+ MPerspective perspective) {
+ if (!useSystemUser) {
+ return;
+ }
+
+ try {
+ MModelFragments container = getFragment();
+ if (container != null) {
+ removePerspective(parentId, perspective, container);
+
+ persistFragment(container);
+ }
+ } catch (IOException e) {
+ logger.error("{}", e);
+ }
+ }
+
+ /**
+ * Removes the perspective.
+ *
+ * @param parentId
+ * the parent id
+ * @param perspective
+ * the perspective
+ * @param fragmentsContainer
+ * the fragments container
+ */
+ protected void removePerspective(String parentId, MPerspective perspective,
+ MModelFragments fragmentsContainer) {
+
+ MModelFragment fragment = findFragmentForPerspective(parentId,
+ perspective, fragmentsContainer);
+ if (fragment.getElements().size() > 1) {
+ throw new IllegalArgumentException(
+ "Customized fragments may only contain one element!");
+ }
+ fragmentsContainer.getFragments().remove(fragment);
+ }
+
+ /**
+ * Creates the perspective fragment.
+ *
+ * @param parent
+ * the parent
+ * @param newPerspective
+ * the new perspective
+ * @return the m model fragment
+ */
+ protected MModelFragment createPerspectiveFragment(
+ MPerspectiveStack parent, MPerspective newPerspective) {
+ MModelFragment fragment = createFragment(parent.getElementId(),
+ FEATURE__CHILDREN);
+
+ MPerspective clone = (MPerspective) modelService.cloneElement(
+ newPerspective, null);
+ EPlaceholderResolver resolver = context.get(EPlaceholderResolver.class);
+ // Re-resolve any placeholder references
+ List<MPlaceholder> phList = modelService.findElements(clone, null,
+ MPlaceholder.class, null);
+ for (MPlaceholder ph : phList) {
+ resolver.resolvePlaceholderRef(ph,
+ modelService.getTopLevelWindowFor(parent));
+ }
+ fragment.getElements().add(clone);
+ return fragment;
+ }
+
+ /**
+ * Find fragment for perspective.
+ *
+ * @param parentId
+ * the parent id
+ * @param perspective
+ * the perspective
+ * @param fragmentsContainer
+ * the fragments container
+ * @return the m model fragment
+ */
+ protected MModelFragment findFragmentForPerspective(String parentId,
+ MPerspective perspective, MModelFragments fragmentsContainer) {
+ List<MModelFragment> fragments = findFragments(parentId,
+ FEATURE__CHILDREN, fragmentsContainer);
+
+ Optional<MModelFragment> fragment = fragments
+ .stream()
+ .filter(e -> e
+ .getElements()
+ .stream()
+ .filter(c -> c.getElementId().equals(
+ perspective.getElementId())).iterator()
+ .hasNext()).findFirst();
+
+ return fragment.isPresent() ? fragment.get() : null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.resource.ISystemuserModelHandler#persistFragment(org.eclipse.e4.ui.model.fragment.MModelFragments)
+ */
+ @Override
+ public void persistFragment(MModelFragments mFragments) throws IOException {
+
+ if (!useSystemUser) {
+ return;
+ }
+
+ if (!validateFragement(mFragments)) {
+ throw new IllegalStateException(
+ "Fragments are not configured properly.");
+ }
+
+ ensureSystemUserFragment();
+
+ File saveLocation = getSystemUserFragmentLocation();
+ if (saveLocation.exists()) {
+ Resource toSave = resourceSet.getResource(
+ URI.createFileURI(saveLocation.getAbsolutePath()), true);
+ toSave.getContents().clear();
+ toSave.getContents().add((EObject) mFragments);
+ toSave.save(null);
+ toSave.unload();
+ }
+ }
+
+ /**
+ * Validate fragement.
+ *
+ * @param mFragments
+ * the m fragments
+ * @return true, if successful
+ */
+ protected boolean validateFragement(MModelFragments mFragments) {
+ java.util.Optional<MModelFragment> result = mFragments.getFragments()
+ .stream().filter(e -> e.getElements().size() > 1).findFirst();
+ if (result.isPresent()) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Gets the fragment.
+ *
+ * @return the fragment
+ */
+ protected MModelFragments getFragment() {
+
+ ensureSystemUserFragment();
+
+ // Then load the customized user fragments
+ //
+ File systemLocation = getSystemUserFragmentLocation();
+ if (systemLocation.exists()) {
+ systemResource = resourceSet.getResource(
+ URI.createFileURI(systemLocation.getAbsolutePath()), true);
+ MModelFragments result = (MModelFragments) systemResource
+ .getContents().get(0);
+ return result;
+ }
+
+ return null;
+ }
+
+ /**
+ * Unload the system resource. After merge it will be damaged since
+ * containment references are broken.
+ */
+ protected void unload() {
+ if (systemResource != null) {
+ systemResource.unload();
+ }
+ }
+
+ /**
+ * Ensures that the system user fragment exists in workbench location.
+ */
+ protected void ensureSystemUserFragment() {
+ // check the system user file
+ File systemUserFile = getSystemUserFragmentLocation();
+ if (!systemUserFile.exists()) {
+ try {
+ String uri = (String) context
+ .get(SYSTEM_USER_FRAGMENT_PROPERTY);
+ if (uri == null) {
+ uri = DEFAULT_SYSTEM_USER_FRAGMENT;
+ }
+
+ Resource sysuserFragment = resourceSet.getResource(
+ URI.createURI(uri), true);
+ // copy model
+ sysuserFragment.setURI(URI.createFileURI(systemUserFile
+ .getAbsolutePath()));
+ try {
+ sysuserFragment.save(null);
+ } catch (IOException e) {
+ logger.warn("{}", e);
+ }
+
+ // unload the fragment
+ sysuserFragment.unload();
+ resourceSet.getResources().remove(sysuserFragment);
+ } catch (Exception e) {
+ useSystemUser = false;
+ logger.debug("SystemUserFragment not in use");
+ }
+ }
+ }
+
+ /**
+ * Gets the system user fragment location.
+ *
+ * @return the system user fragment location
+ */
+ private File getSystemUserFragmentLocation() {
+ File workbenchData = new File(getBaseLocation(),
+ "systemUserFragment.e4xmi"); //$NON-NLS-1$
+ return workbenchData;
+ }
+
+ /**
+ * Gets the base location.
+ *
+ * @return the base location
+ */
+ private File getBaseLocation() {
+ File baseLocation;
+ try {
+ baseLocation = new File(URIUtil.toURI(instanceLocation.getURL()));
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ baseLocation = new File(baseLocation, ".metadata"); //$NON-NLS-1$
+ baseLocation = new File(baseLocation, ".plugins"); //$NON-NLS-1$
+ baseLocation = new File(baseLocation, "org.eclipse.e4.workbench"); //$NON-NLS-1$
+ return baseLocation;
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/ThemeResourceProvider.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/ThemeResourceProvider.java
new file mode 100644
index 0000000..f59653d
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/ThemeResourceProvider.java
@@ -0,0 +1,35 @@
+/**
+ * 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.vaaclipse.addons.common.resource;
+
+import org.eclipse.osbp.runtime.web.vaadin.common.resource.IResourceProvider;
+import org.eclipse.osbp.vaaclipse.addons.common.api.ResourceUtil;
+
+import com.vaadin.server.Resource;
+
+/**
+ * Vaaclipse specific resource provider. Service.ranking = 1000.
+ */
+public class ThemeResourceProvider implements IResourceProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.web.vaadin.common.resource.IResourceProvider#getResource(java.lang.String)
+ */
+ @Override
+ public Resource getResource(String resourcePath) {
+ if(resourcePath == null || resourcePath.trim().equals("")){
+ return null;
+ }
+
+ return ResourceUtil.getResource(resourcePath);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/VaaclipseModelAssembler.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/VaaclipseModelAssembler.java
new file mode 100644
index 0000000..69766c6
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/resource/VaaclipseModelAssembler.java
@@ -0,0 +1,437 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2014 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ * Lars Vogel <Lars.Vogel@gmail.com> - Bug 430075, 430080, 431464, 433336
+ * René Brandstetter - Bug 419749 - [Workbench] [e4 Workbench] - Remove the deprecated PackageAdmin
+ * Brian de Alwis (MTI) - Bug 433053
+ * Florian Pirchner - adjusted for Vaaclipse perspectives restore - using different ModelUtils
+ ******************************************************************************/
+
+package org.eclipse.osbp.vaaclipse.addons.common.resource;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.Inject;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.EclipseContextFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.services.contributions.IContributionFactory;
+import org.eclipse.e4.core.services.log.Logger;
+import org.eclipse.e4.ui.internal.workbench.E4XMIResource;
+import org.eclipse.e4.ui.internal.workbench.ExtensionsSort;
+import org.eclipse.e4.ui.internal.workbench.URIHelper;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.MApplicationElement;
+import org.eclipse.e4.ui.model.fragment.MModelFragment;
+import org.eclipse.e4.ui.model.fragment.MModelFragments;
+import org.eclipse.e4.ui.model.fragment.MStringModelFragment;
+import org.eclipse.e4.ui.model.fragment.impl.FragmentPackageImpl;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentsEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.osbp.vaaclipse.addons.common.api.model.VaaclipseModelUtils;
+
+/**
+ * The Class VaaclipseModelAssembler.
+ */
+@SuppressWarnings("restriction")
+public class VaaclipseModelAssembler {
+
+ /** The logger. */
+ @Inject
+ private Logger logger;
+
+ /** The application. */
+ @Inject
+ private MApplication application;
+
+ /** The context. */
+ @Inject
+ private IEclipseContext context;
+
+ /** The registry. */
+ @Inject
+ private IExtensionRegistry registry;
+
+ /** The Constant extensionPointID. */
+ final private static String extensionPointID = "org.eclipse.e4.workbench.model"; //$NON-NLS-1$
+
+ /** The Constant INITIAL. */
+ // private static final String ALWAYS = "always"; //$NON-NLS-1$
+ private static final String INITIAL = "initial"; //$NON-NLS-1$
+
+ /** The Constant NOTEXISTS. */
+ private static final String NOTEXISTS = "notexists"; //$NON-NLS-1$
+
+ /**
+ * Process the model.
+ *
+ * @param initial
+ * the initial
+ */
+ public void processModel(boolean initial) {
+ IExtensionPoint extPoint = registry.getExtensionPoint(extensionPointID);
+ IExtension[] extensions = new ExtensionsSort().sort(extPoint
+ .getExtensions());
+
+ List<MApplicationElement> imports = new ArrayList<MApplicationElement>();
+ List<MApplicationElement> addedElements = new ArrayList<MApplicationElement>();
+
+ // run processors which are marked to run before fragments
+ runProcessors(extensions, initial, false);
+ processFragments(extensions, imports, addedElements, initial);
+ // run processors which are marked to run after fragments
+ runProcessors(extensions, initial, true);
+
+ resolveImports(imports, addedElements);
+ }
+
+ /**
+ * Process fragments.
+ *
+ * @param extensions
+ * the extensions
+ * @param imports
+ * the imports
+ * @param addedElements
+ * the added elements
+ * @param initial
+ * the initial
+ */
+ private void processFragments(IExtension[] extensions,
+ List<MApplicationElement> imports,
+ List<MApplicationElement> addedElements, boolean initial) {
+
+ for (IExtension extension : extensions) {
+ IConfigurationElement[] ces = extension.getConfigurationElements();
+ for (IConfigurationElement ce : ces) {
+ if ("fragment".equals(ce.getName())) { //$NON-NLS-1$
+ if (initial || !INITIAL.equals(ce.getAttribute("apply"))) { //$NON-NLS-1$
+ processFragment(ce, imports, addedElements, initial);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Process fragment.
+ *
+ * @param ce
+ * the ce
+ * @param imports
+ * the imports
+ * @param addedElements
+ * the added elements
+ * @param initial
+ * the initial
+ */
+ private void processFragment(IConfigurationElement ce,
+ List<MApplicationElement> imports,
+ List<MApplicationElement> addedElements, boolean initial) {
+ E4XMIResource applicationResource = (E4XMIResource) ((EObject) application)
+ .eResource();
+ ResourceSet resourceSet = applicationResource.getResourceSet();
+ IContributor contributor = ce.getContributor();
+ String attrURI = ce.getAttribute("uri"); //$NON-NLS-1$
+ String bundleName = contributor.getName();
+ if (attrURI == null) {
+ logger.warn(
+ "Unable to find location for the model extension \"{0}\"", bundleName); //$NON-NLS-1$
+ return;
+ }
+
+ URI uri;
+ try {
+ // check if the attrURI is already a platform URI
+ if (URIHelper.isPlatformURI(attrURI)) {
+ uri = URI.createURI(attrURI);
+ } else {
+ String path = bundleName + '/' + attrURI;
+ uri = URI.createPlatformPluginURI(path, false);
+ }
+ } catch (RuntimeException e) {
+ logger.warn(
+ e,
+ "Invalid location \"" + attrURI + "\" of model extension \"" + bundleName + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return;
+ }
+
+ String contributorURI = URIHelper.constructPlatformURI(contributor);
+ Resource resource;
+ try {
+ resource = resourceSet.getResource(uri, true);
+ } catch (RuntimeException e) {
+ logger.warn(
+ e,
+ "Unable to read model extension from \"" + uri.toString() + "\" of \"" + bundleName + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return;
+ }
+
+ EList<?> contents = resource.getContents();
+ if (contents.isEmpty()) {
+ return;
+ }
+
+ Object extensionRoot = contents.get(0);
+
+ if (!(extensionRoot instanceof MModelFragments)) {
+ logger.warn("Unable to create model extension \"{0}\"", bundleName); //$NON-NLS-1$
+ return;
+ }
+ boolean checkExist = !initial
+ && NOTEXISTS.equals(ce.getAttribute("apply")); //$NON-NLS-1$
+
+ MModelFragments fragmentsContainer = (MModelFragments) extensionRoot;
+ List<MModelFragment> fragments = fragmentsContainer.getFragments();
+ boolean evalImports = false;
+ for (MModelFragment fragment : fragments) {
+ List<MApplicationElement> elements = fragment.getElements();
+ if (elements.size() == 0) {
+ continue;
+ }
+
+ for (MApplicationElement el : elements) {
+ EObject o = (EObject) el;
+
+ E4XMIResource r = (E4XMIResource) o.eResource();
+
+ if (checkExist
+ && applicationResource.getIDToEObjectMap().containsKey(
+ r.getID(o))) {
+ continue;
+ }
+
+ String cId = r.getID(o);
+ applicationResource.setID(o, r.getID(o));
+ String nId = applicationResource.getID(o);
+ assert(cId.equals(nId));
+
+ if (contributorURI != null)
+ el.setContributorURI(contributorURI);
+
+ // Remember IDs of subitems
+ TreeIterator<EObject> treeIt = EcoreUtil
+ .getAllContents(o, true);
+ while (treeIt.hasNext()) {
+ EObject eObj = treeIt.next();
+ r = (E4XMIResource) eObj.eResource();
+ if (contributorURI != null
+ && (eObj instanceof MApplicationElement))
+ ((MApplicationElement) eObj)
+ .setContributorURI(contributorURI);
+ applicationResource.setID(eObj, r.getInternalId(eObj));
+ }
+ }
+
+ List<MApplicationElement> merged = merge(application, (MStringModelFragment) fragment);
+ if (merged.size() > 0) {
+ evalImports = true;
+ addedElements.addAll(merged);
+ } else {
+ logger.info("Nothing to merge for \"{0}\"", uri); //$NON-NLS-1$
+ }
+ }
+
+ if (evalImports) {
+ List<MApplicationElement> localImports = fragmentsContainer
+ .getImports();
+ if (localImports != null) {
+ imports.addAll(localImports);
+ }
+ }
+ }
+
+ /**
+ * Merge.
+ *
+ * @param application
+ * the application
+ * @param fragment
+ * the fragment
+ * @return the list
+ */
+ public List<MApplicationElement> merge(MApplication application, MStringModelFragment fragment) {
+ MApplicationElement o = VaaclipseModelUtils.findElementById(application, fragment.getParentElementId());
+ if( o != null ) {
+ EStructuralFeature feature = ((EObject)o).eClass().getEStructuralFeature(fragment.getFeaturename());
+ if( feature != null ) {
+ return VaaclipseModelUtils.merge(o, feature, fragment.getElements(), fragment.getPositionInList());
+ }
+
+ }
+
+ return Collections.emptyList();
+ }
+
+ /**
+ * Run processors.
+ *
+ * @param extensions
+ * the extensions
+ * @param initial
+ * the initial
+ * @param afterFragments
+ * the after fragments
+ */
+ private void runProcessors(IExtension[] extensions, boolean initial,
+ boolean afterFragments) {
+ for (IExtension extension : extensions) {
+ IConfigurationElement[] ces = extension.getConfigurationElements();
+ for (IConfigurationElement ce : ces) {
+ boolean parseBoolean = Boolean.parseBoolean(ce
+ .getAttribute("beforefragment")); //$NON-NLS-1$
+ if ("processor".equals(ce.getName()) && afterFragments != parseBoolean) { //$NON-NLS-1$
+ if (initial || !INITIAL.equals(ce.getAttribute("apply"))) { //$NON-NLS-1$
+ runProcessor(ce);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Run processor.
+ *
+ * @param ce
+ * the ce
+ */
+ private void runProcessor(IConfigurationElement ce) {
+ IEclipseContext localContext = EclipseContextFactory.create();
+ IContributionFactory factory = context.get(IContributionFactory.class);
+
+ for (IConfigurationElement ceEl : ce.getChildren("element")) { //$NON-NLS-1$
+ String id = ceEl.getAttribute("id"); //$NON-NLS-1$
+
+ if (id == null) {
+ logger.warn("No element id given"); //$NON-NLS-1$
+ continue;
+ }
+
+ String key = ceEl.getAttribute("contextKey"); //$NON-NLS-1$
+ if (key == null) {
+ key = id;
+ }
+
+ MApplicationElement el = VaaclipseModelUtils
+ .findElementById(application, id);
+ if (el == null) {
+ logger.warn("Could not find element with id '" + id + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ localContext.set(key, el);
+ }
+
+ try {
+ Object o = factory
+ .create("bundleclass://" + ce.getContributor().getName() + "/" + ce.getAttribute("class"), //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ context, localContext);
+ if (o == null) {
+ logger.warn("Unable to create processor " + ce.getAttribute("class") + " from " + ce.getContributor().getName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else {
+ ContextInjectionFactory.invoke(o, Execute.class, context,
+ localContext);
+ }
+ } catch (Exception e) {
+ logger.warn(e, "Could not run processor"); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Resolve imports.
+ *
+ * @param imports
+ * the imports
+ * @param addedElements
+ * the added elements
+ */
+ private void resolveImports(List<MApplicationElement> imports,
+ List<MApplicationElement> addedElements) {
+ if (imports.isEmpty())
+ return;
+ // now that we have all components loaded, resolve imports
+ Map<MApplicationElement, MApplicationElement> importMaps = new HashMap<MApplicationElement, MApplicationElement>();
+ for (MApplicationElement importedElement : imports) {
+ MApplicationElement realElement = VaaclipseModelUtils.findElementById(
+ application, importedElement.getElementId());
+ if (realElement == null) {
+ logger.warn("Could not resolve an import element for '" + realElement + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ importMaps.put(importedElement, realElement);
+ }
+
+ TreeIterator<EObject> it = EcoreUtil.getAllContents(addedElements);
+ List<Runnable> commands = new ArrayList<Runnable>();
+
+ // TODO Probably use EcoreUtil.UsageCrossReferencer
+ while (it.hasNext()) {
+ EObject o = it.next();
+
+ EContentsEList.FeatureIterator<EObject> featureIterator = (EContentsEList.FeatureIterator<EObject>) o
+ .eCrossReferences().iterator();
+ while (featureIterator.hasNext()) {
+ EObject importObject = featureIterator.next();
+ if (importObject.eContainmentFeature() == FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS) {
+ EStructuralFeature feature = featureIterator.feature();
+
+ MApplicationElement el = importMaps.get(importObject);
+ if (el == null) {
+ logger.warn("Could not resolve import for " + el); //$NON-NLS-1$
+ }
+
+ final EObject interalTarget = o;
+ final EStructuralFeature internalFeature = feature;
+ final MApplicationElement internalElment = el;
+ final EObject internalImportObject = importObject;
+
+ commands.add(new Runnable() {
+
+ @Override
+ public void run() {
+ if (internalFeature.isMany()) {
+ logger.error("Replacing"); //$NON-NLS-1$
+ @SuppressWarnings("unchecked")
+ List<Object> l = (List<Object>) interalTarget
+ .eGet(internalFeature);
+ int index = l.indexOf(internalImportObject);
+ if (index >= 0) {
+ l.set(index, internalElment);
+ }
+ } else {
+ interalTarget.eSet(internalFeature,
+ internalElment);
+ }
+ }
+ });
+ }
+ }
+ }
+
+ for (Runnable cmd : commands) {
+ cmd.run();
+ }
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/state/SharedStateContextAdapter.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/state/SharedStateContextAdapter.java
new file mode 100644
index 0000000..db18b79
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/state/SharedStateContextAdapter.java
@@ -0,0 +1,109 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.common.state;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.osbp.runtime.common.state.ISharedStateContext;
+import org.eclipse.osbp.runtime.common.state.ISharedStateContextProvider;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Constants;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This adapter ensures, that the application id is added to the id of the
+ * context as prefix. <code>{applicationId}_{id}</code><br>
+ * The {@link IE4Constants#APPLICATION_ID} is also added to the OSGi service
+ * properties.
+ */
+public class SharedStateContextAdapter implements ISharedStateContextProvider {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(SharedStateContextAdapter.class);
+
+ /** The application instance id. */
+ @Inject
+ @Named("e4ApplicationInstanceId")
+ String applicationInstanceId;
+
+ /**
+ * Instantiates a new shared state context adapter.
+ */
+ public SharedStateContextAdapter() {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.common.state.ISharedStateContextProvider#getContext(java.lang.String, java.util.Map)
+ */
+ @Override
+ public ISharedStateContext getContext(String id,
+ Map<String, Object> properties) {
+ ISharedStateContextProvider delegate = getDelegate();
+ if (delegate == null) {
+ LOGGER.error("ISharedStateContextProvider could not be found!");
+ return null;
+ }
+
+ // add the application id to the OSGi service properties
+ properties = properties != null ? properties
+ : new HashMap<String, Object>();
+ properties.put(IE4Constants.APPLICATION_ID, applicationInstanceId);
+
+ return delegate.getContext(createApplicationId(id), properties);
+ }
+
+ /**
+ * Creates the application id.
+ *
+ * @param id
+ * the id
+ * @return the string
+ */
+ private String createApplicationId(String id) {
+ return applicationInstanceId + "_" + id;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.common.state.ISharedStateContextProvider#unget(org.eclipse.osbp.runtime.common.state.ISharedStateContext)
+ */
+ @Override
+ public void unget(ISharedStateContext context) {
+ ISharedStateContextProvider delegate = getDelegate();
+ if (delegate == null) {
+ LOGGER.error("ISharedStateContextProvider could not be found!");
+ return;
+ }
+ delegate.unget(context);
+ }
+
+ /**
+ * Gets the delegate.
+ *
+ * @return the delegate
+ */
+ protected ISharedStateContextProvider getDelegate() {
+ BundleContext context = FrameworkUtil.getBundle(getClass())
+ .getBundleContext();
+ ServiceReference<ISharedStateContextProvider> reference = context
+ .getServiceReference(ISharedStateContextProvider.class);
+ return context.getService(reference);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/state/SharedStateContextAdapterFactory.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/state/SharedStateContextAdapterFactory.java
new file mode 100644
index 0000000..77eb0f5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/state/SharedStateContextAdapterFactory.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.common.state;
+
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.osbp.runtime.common.state.ISharedStateContextProvider;
+import org.osgi.service.component.annotations.Component;
+
+/**
+ * A factory for creating SharedStateContextAdapter objects.
+ */
+@Component(service = org.eclipse.e4.core.contexts.IContextFunction.class, property = { "service.context.key=org.eclipse.osbp.runtime.common.state.ISharedStateContextProvider" })
+public class SharedStateContextAdapterFactory extends ContextFunction {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.core.contexts.ContextFunction#compute(org.eclipse.e4.core.contexts.IEclipseContext, java.lang.String)
+ */
+ @Override
+ public Object compute(IEclipseContext context, String contextKey) {
+ // add the new object to the application context
+ MApplication application = context.get(MApplication.class);
+ IEclipseContext appCtx = application.getContext();
+
+ SharedStateContextAdapter provider = ContextInjectionFactory.make(
+ SharedStateContextAdapter.class, appCtx);
+
+ appCtx.set(ISharedStateContextProvider.class, provider);
+
+ return provider;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusManager.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusManager.java
new file mode 100644
index 0000000..823dd83
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusManager.java
@@ -0,0 +1,157 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.common.status;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PreDestroy;
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
+import org.eclipse.osbp.runtime.common.validation.IStatus;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Topics;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope;
+
+/**
+ * The Class StatusManager.
+ */
+public class StatusManager implements IStatusManager {
+
+ /** The scopes. */
+ private final Map<MPart, IStatusScope> scopes = new HashMap<MPart, IStatusScope>();
+
+ /** The event broker. */
+ @Inject
+ private IEventBroker eventBroker;
+
+ /** The part service. */
+ @Inject
+ private EPartService partService;
+
+ /** The active part. */
+ private MPart activePart;
+
+ /**
+ * Instantiates a new status manager.
+ */
+ public StatusManager() {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager#getAllStatus()
+ */
+ @Override
+ public List<IStatus> getAllStatus() {
+ IStatusScope scope = getActiveScope();
+ if (scope == null) {
+ return Collections.emptyList();
+ }
+
+ return scope.getAllStatus();
+ }
+
+ /**
+ * Returns the scope of the currently active MPart.
+ *
+ * @return the active scope
+ */
+ public IStatusScope getActiveScope() {
+ return scopes.get(activePart);
+ }
+
+ /**
+ * Sets the active view.
+ *
+ * @param activePart
+ * the new active view
+ */
+ @Inject
+ public void setActiveView(@Active @Optional MPart activePart) {
+
+ this.activePart = activePart;
+ if (activePart == null) {
+ return;
+ }
+ ensureScope(this.activePart);
+
+ Map<String, Object> props = new HashMap<String, Object>();
+ props.put(IE4Topics.StatusManagerEvents.PROP_SCOPE, getActiveScope());
+ eventBroker
+ .post(IE4Topics.StatusManagerEvents.ACTIVE_SCOPE_CHANGED_TOPIC,
+ props);
+ }
+
+ /**
+ * Ensure scope.
+ *
+ * @param mPart
+ * the m part
+ */
+ protected void ensureScope(MPart mPart) {
+ if (mPart == null) {
+ return;
+ }
+
+ if (!scopes.containsKey(mPart)) {
+ IStatusScope scope = new StatusScope(mPart, eventBroker);
+ scopes.put(mPart, scope);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager#getAllScopes()
+ */
+ @Override
+ public List<IStatusScope> getAllScopes() {
+ return Collections.unmodifiableList(new ArrayList<IStatusScope>(scopes
+ .values()));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager#getScopeFor(org.eclipse.e4.ui.model.application.ui.basic.MPart)
+ */
+ @Override
+ public IStatusScope getScopeFor(MPart mPart) {
+ ensureScope(mPart);
+ return scopes.get(mPart);
+ }
+
+ /**
+ * Dispose.
+ */
+ @PreDestroy
+ protected void dispose() {
+ scopes.clear();
+ activePart = null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager#getAllScopeStatus()
+ */
+ @Override
+ public List<IStatus> getAllScopeStatus() {
+ List<IStatus> result = new ArrayList<>();
+ for(IStatusScope scope : getAllScopes()) {
+ result.addAll(scope.getAllStatus());
+ }
+ return result;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusManagerFactory.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusManagerFactory.java
new file mode 100644
index 0000000..d1f10aa
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusManagerFactory.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.common.status;
+
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager;
+import org.osgi.service.component.annotations.Component;
+
+/**
+ * A factory for creating StatusManager objects.
+ */
+@Component(service = org.eclipse.e4.core.contexts.IContextFunction.class, property = { "service.context.key=org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager" })
+public class StatusManagerFactory extends ContextFunction {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.core.contexts.ContextFunction#compute(org.eclipse.e4.core.contexts.IEclipseContext, java.lang.String)
+ */
+ @Override
+ public Object compute(IEclipseContext context, String contextKey) {
+ // add the new object to the application context
+ MApplication application = context.get(MApplication.class);
+ IEclipseContext appCtx = application.getContext();
+
+ StatusManager manager = ContextInjectionFactory.make(
+ StatusManager.class, appCtx);
+
+ appCtx.set(IStatusManager.class, manager);
+
+ return manager;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusScope.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusScope.java
new file mode 100644
index 0000000..6986614
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/status/StatusScope.java
@@ -0,0 +1,210 @@
+/**
+ * Copyright (c) 2011, 2014 - Lunifera GmbH (Gross Enzersdorf)
+ * 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.vaaclipse.addons.common.status;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.runtime.common.validation.IStatus;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Topics;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope;
+
+/**
+ * The Class StatusScope.
+ */
+public class StatusScope implements IStatusScope {
+
+ /** The status list. */
+ private final List<IStatus> statusList = new ArrayList<IStatus>(10);
+
+ /** The status hash. */
+ private final Set<String> statusHash = new HashSet<String>();
+
+ /** The part. */
+ private final MPart part;
+
+ /** The event broker. */
+ private final IEventBroker eventBroker;
+
+ /**
+ * Instantiates a new status scope.
+ *
+ * @param part
+ * the part
+ * @param eventBroker
+ * the event broker
+ */
+ public StatusScope(MPart part, IEventBroker eventBroker) {
+ this.part = part;
+ this.eventBroker = eventBroker;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope#getMPart()
+ */
+ @Override
+ public MPart getMPart() {
+ return part;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope#addStatus(org.eclipse.osbp.runtime.common.validation.IStatus)
+ */
+ @Override
+ public void addStatus(IStatus status) {
+
+ String hash = toHash(status);
+ if (statusHash.contains(hash)) {
+ return;
+ }
+
+ if (statusList.contains(status)) {
+ return;
+ }
+
+ statusHash.add(hash);
+ statusList.add(status);
+
+ sendEvent(Collections.singletonList(status));
+ }
+
+ /**
+ * To hash.
+ *
+ * @param status
+ * the status
+ * @return the string
+ */
+ private String toHash(IStatus status) {
+ String hash = String.format("%s-%s-%s", status.getCode(),
+ status.getProperty(IStatus.PROP_FIELD_ID),
+ status.getProperty(IStatus.PROP_JAVAX_PROPERTY_PATH));
+ return hash;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope#addAllStatus(java.util.Collection)
+ */
+ @Override
+ public void addAllStatus(Collection<IStatus> status) {
+ if (status != null) {
+
+ for (IStatus s : status) {
+ if (!statusList.contains(s)) {
+ String hash = toHash(s);
+ if (statusHash.contains(hash)) {
+ continue;
+ }
+ statusHash.add(hash);
+ statusList.add(s);
+ }
+ }
+
+ sendEvent(status);
+ }
+ }
+
+ /**
+ * Send event.
+ *
+ * @param status
+ * the status
+ */
+ private void sendEvent(Collection<IStatus> status) {
+ Map<String, Object> props = new HashMap<String, Object>();
+ props.put(IE4Topics.StatusManagerEvents.PROP_SCOPE, this);
+ props.put(IE4Topics.StatusManagerEvents.PROP_STATUS, status);
+ eventBroker.post(
+ IE4Topics.StatusManagerEvents.VALIDATIONS_CHANGED_TOPIC, props);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope#clearStatus()
+ */
+ @Override
+ public void clearStatus() {
+ statusList.clear();
+ statusHash.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope#getAllStatus()
+ */
+ @Override
+ public List<IStatus> getAllStatus() {
+ return new ArrayList<IStatus>(statusList);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope#removeStatus(org.eclipse.osbp.runtime.common.validation.IStatus)
+ */
+ @Override
+ public void removeStatus(IStatus status) {
+ statusList.remove(status);
+ statusHash.remove(toHash(status));
+
+ sendEvent(Collections.singletonList(status));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope#removeAllStatus(java.util.Collection)
+ */
+ @Override
+ public void removeAllStatus(Collection<IStatus> status) {
+ for (IStatus s : status) {
+ String hash = toHash(s);
+ statusHash.remove(hash);
+ statusList.remove(s);
+ }
+
+ sendEvent(status);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope#modifyStatus(java.util.Collection, java.util.Collection)
+ */
+ @Override
+ public void modifyStatus(Collection<IStatus> oldStatus,
+ Collection<IStatus> newStatus) {
+
+ for (IStatus s : oldStatus) {
+ String hash = toHash(s);
+ statusHash.remove(hash);
+ statusList.remove(s);
+ }
+
+ if (newStatus != null) {
+ for (IStatus s : newStatus) {
+ // avoid duplicate add
+ if (!statusList.contains(s)) {
+ String hash = toHash(s);
+ if (statusHash.contains(hash)) {
+ continue;
+ }
+
+ statusHash.add(hash);
+ statusList.add(s);
+ }
+ }
+ }
+
+ sendEvent(newStatus);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/ui/ThemeIconsComboBox.java b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/ui/ThemeIconsComboBox.java
new file mode 100644
index 0000000..fde6a8f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/src/org/eclipse/osbp/vaaclipse/addons/common/ui/ThemeIconsComboBox.java
@@ -0,0 +1,136 @@
+/**
+ * Copyright (c) 2011, 2014 - Lunifera GmbH (Gross Enzersdorf)
+ * 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.vaaclipse.addons.common.ui;
+
+import org.eclipse.osbp.vaaclipse.addons.common.api.ResourceUtil;
+import org.eclipse.osbp.vaaclipse.publicapi.theme.Theme;
+
+import com.vaadin.server.Resource;
+import com.vaadin.shared.ui.combobox.FilteringMode;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.CustomField;
+
+/**
+ * The Class ThemeIconsComboBox.
+ */
+@SuppressWarnings("serial")
+public class ThemeIconsComboBox extends CustomField<String> {
+
+ /** The theme. */
+ private Theme theme;
+
+ /** The cb. */
+ private ComboBox cb;
+
+ /**
+ * Instantiates a new theme icons combo box.
+ *
+ * @param caption
+ * the caption
+ * @param theme
+ * the theme
+ */
+ public ThemeIconsComboBox(String caption, Theme theme) {
+ this.theme = theme;
+ setCaption(caption);
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.ui.CustomField#initContent()
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ protected Component initContent() {
+
+ cb = new ComboBox();
+ cb.setSizeFull();
+ cb.setImmediate(true);
+ cb.setBuffered(false);
+ cb.setInvalidAllowed(true);
+ cb.setFilteringMode(FilteringMode.CONTAINS);
+ cb.addContainerProperty("icon", Resource.class, null);
+ cb.addContainerProperty("name", String.class, "");
+ cb.addContainerProperty("uri", String.class, "");
+
+ cb.setItemIconPropertyId("icon");
+ cb.setItemCaptionPropertyId("name");
+
+ for (String uri : theme.getImageURIs()) {
+ Object id = cb.addItem();
+ cb.getItem(id).getItemProperty("icon")
+ .setValue(ResourceUtil.getResource(uri));
+ cb.getItem(id).getItemProperty("name").setValue(extractName(uri));
+ cb.getItem(id).getItemProperty("uri").setValue(uri);
+ }
+
+ if (getInternalValue() != null) {
+ // set the selection to the combo box
+ setInternalValue(getInternalValue());
+ }
+
+ cb.addValueChangeListener(e -> setInternalSelection(cb.getValue()));
+
+ return cb;
+ }
+
+ /**
+ * Sets the internal selection.
+ *
+ * @param value
+ * the new internal selection
+ */
+ private void setInternalSelection(Object value) {
+ if (value == null) {
+ return;
+ }
+ String internalSelected = (String) cb.getItem(value)
+ .getItemProperty("uri").getValue();
+ setConvertedValue(internalSelected);
+ }
+
+ /**
+ * Extract name.
+ *
+ * @param uri
+ * the uri
+ * @return the string
+ */
+ private String extractName(String uri) {
+ String[] path = uri.split("/");
+ return path[path.length - 1];
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.ui.AbstractField#getType()
+ */
+ @Override
+ public Class<String> getType() {
+ return String.class;
+ }
+
+ /* (non-Javadoc)
+ * @see com.vaadin.ui.AbstractField#setInternalValue(java.lang.Object)
+ */
+ @Override
+ protected void setInternalValue(String newValue) {
+ super.setInternalValue(newValue);
+
+ if (cb != null) {
+ for (Object id : cb.getItemIds()) {
+ if (newValue.equals(cb.getItem(id).getItemProperty("uri").getValue())) {
+ cb.setValue(id);
+ }
+ }
+ }
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.checkstyle b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.checkstyle
new file mode 100644
index 0000000..2f2667a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.checkstyle
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <fileset name="all" enabled="true" check-config-name="emfstoreStyle" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.project b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.project
new file mode 100644
index 0000000..93ff340
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.project
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.ecview.lib</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.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.vaaclipse.addons.ecview.lib/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/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.vaaclipse.addons.ecview.lib/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..4c6750a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.ecview.lib
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.ecview.lib;singleton:=true
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.osbp.ecview.core.common;bundle-version="[0.9.0,0.10.0)";visibility:=reexport,
+ org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)";visibility:=reexport,
+ org.eclipse.xtext.xbase.lib;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.osbp.ecview.dsl.lib;bundle-version="[0.9.0,0.10.0)";visibility:=reexport
+Export-Package: org.eclipse.osbp.vaaclipse.addons.ecview.lib;version="0.9.0"
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/about.html b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/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.vaaclipse.addons.ecview.lib/about.ini b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/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.vaaclipse.addons.ecview.lib/about.mappings b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/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.vaaclipse.addons.ecview.lib/about.properties b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/about.properties
new file mode 100644
index 0000000..4fcb816
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/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.vaaclipse.addons.ecview.lib
+
+################ 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.vaaclipse.addons.ecview.lib/build.properties b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/build.properties
new file mode 100644
index 0000000..3350c04
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/build.properties
@@ -0,0 +1,13 @@
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ .classpath,\
+ .project,\
+ .settings/,\
+ LICENSE.txt,\
+ epl-v10.html,\
+ license.html,\
+ pom.xml,\
+ model/
+output.. = target/classes/
+source.. = src/,\
+ model/
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/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.vaaclipse.addons.ecview.lib/license.html b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/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.vaaclipse.addons.ecview.lib/model/Vaaclipse.uisemantics b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/model/Vaaclipse.uisemantics
new file mode 100644
index 0000000..def24d9
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/model/Vaaclipse.uisemantics
@@ -0,0 +1,19 @@
+ePackage "http://osbp.eclipse.org/ecview/dsl/uimodel/core" as view
+
+actions {
+ org.lunifera.^actions.save externalCommand "org.lunifera.vaaclipse.addons.application.command.extsave" disabled
+ org.lunifera.^actions.load externalCommand "org.lunifera.vaaclipse.addons.application.command.extload" disabled
+ org.lunifera.^actions.delete externalCommand "org.lunifera.vaaclipse.addons.application.command.extdelete" disabled
+ org.lunifera.^actions.validate externalCommand "org.lunifera.vaaclipse.addons.application.command.extvalidate" disabled
+ org.lunifera.^actions.addNewRow
+ org.lunifera.^actions.addNew
+ org.lunifera.^actions.applyFilter
+}
+
+categories {
+ org.lunifera.vaaclipse.addons.application.partstack.left
+ org.lunifera.vaaclipse.addons.application.partstack.right
+ org.lunifera.vaaclipse.addons.application.partstack.main
+ org.lunifera.vaaclipse.addons.application.partstack.bottom
+ org.lunifera.vaaclipse.addons.application.partstack.materdetail.master
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/pom.xml b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/pom.xml
new file mode 100644
index 0000000..9be1d49
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/pom.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.ecview.lib</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/src/PLACEHOLDER b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/src/PLACEHOLDER
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/src/PLACEHOLDER
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/src/org/eclipse/osbp/vaaclipse/addons/ecview/lib/IECViewConstants.java b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/src/org/eclipse/osbp/vaaclipse/addons/ecview/lib/IECViewConstants.java
new file mode 100644
index 0000000..2ab2296
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/src/org/eclipse/osbp/vaaclipse/addons/ecview/lib/IECViewConstants.java
@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2011, 2014 - Lunifera GmbH (Gross Enzersdorf)
+ * 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.vaaclipse.addons.ecview.lib;
+
+/**
+ * The Interface IECViewConstants.
+ */
+public interface IECViewConstants {
+
+ /**
+ * Property to get the view id from the MPart persistent context.
+ */
+ public static final String ECVIEW_VIEW_ID = "ecview.viewId";
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/.checkstyle b/org.eclipse.osbp.vaaclipse.addons.ecview/.checkstyle
new file mode 100644
index 0000000..2f2667a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/.checkstyle
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <fileset name="all" enabled="true" check-config-name="emfstoreStyle" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/.project b/org.eclipse.osbp.vaaclipse.addons.ecview/.project
new file mode 100644
index 0000000..6c5f628
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/.project
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.ecview</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>com.vaadin.integration.eclipse.addonStylesBuilder</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.vaaclipse.addons.ecview/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.ecview/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/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.vaaclipse.addons.ecview/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.ecview/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..856fe83
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/META-INF/MANIFEST.MF
@@ -0,0 +1,71 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.ecview
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.ecview
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject;version="1.0.0",
+ org.osgi.framework;version="1.8.0",
+ org.osgi.service.component.annotations;version="1.2.0",
+ org.osgi.service.event;version="1.3.0",
+ org.osgi.util.tracker;version="1.5.1",
+ org.slf4j
+Service-Component: OSGI-INF/*.xml
+Bundle-ActivationPolicy: lazy
+Require-Bundle: com.vaadin.server;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.osbp.vaaclipse.addons.ecview.lib;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.addons.common.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.ecview.xtext.builder.participant;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.osbp.dsl.dto.lib;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.web.ecview.presentation.vaadin;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.4.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="[0.12.0,0.13.0)",
+ org.eclipse.e4.core.services;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.0,1.3.0)",
+ com.vaadin.shared;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.osbp.vaaclipse.addons.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.web.vaadin.databinding;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.web.vaadin.components;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.web.vaadin.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.publicapi;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.ecview.core.util.emf;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.addons.keybinding;bundle-version="[0.9.0,0.10.0)"
+Bundle-Activator: org.eclipse.osbp.vaaclipse.addons.ecview.impl.Activator
+Export-Package: org.eclipse.osbp.vaaclipse.addons.ecview.views;
+ uses:="org.osgi.service.event,
+ org.eclipse.osbp.ecview.core.common.model.core";version="0.9.0"
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml,
+ OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml b/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml
new file mode 100644
index 0000000..68f3b91
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.ecview.ExplorerInfoManager"/>
+ <service>
+ <provide interface="org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerInfoManager"/>
+ </service>
+ <property name="service.ranking" value="100"/>
+ <reference bind="bindECViewMetadataService" cardinality="1..1" interface="org.eclipse.osbp.ecview.xtext.builder.participant.IECViewAddonsMetadataService" name="ecviewMetadataService" policy="dynamic" unbind="unbindECViewMetadataService"/>
+ <reference bind="bindI18nService" cardinality="1..1" interface="org.eclipse.osbp.runtime.common.i18n.II18nService" name="i18nService" policy="dynamic" unbind="unbindI18nService"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml b/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
new file mode 100644
index 0000000..c8c89d9
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.ecview.e4context.DynamicViewSupportContextFunctionFactory"/>
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" value="org.eclipse.osbp.vaaclipse.addons.ecview.DynamicViewSupport"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml b/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml
new file mode 100644
index 0000000..f3f1a74
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.ecview.e4context.YViewContextFunctionFactory"/>
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" value="org.eclipse.osbp.ecview.core.common.model.core.YView"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/about.html b/org.eclipse.osbp.vaaclipse.addons.ecview/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/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.vaaclipse.addons.ecview/about.ini b/org.eclipse.osbp.vaaclipse.addons.ecview/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/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.vaaclipse.addons.ecview/about.mappings b/org.eclipse.osbp.vaaclipse.addons.ecview/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/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.vaaclipse.addons.ecview/about.properties b/org.eclipse.osbp.vaaclipse.addons.ecview/about.properties
new file mode 100644
index 0000000..dd375c5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/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.vaaclipse.addons.ecview
+
+################ 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.vaaclipse.addons.ecview/build.properties b/org.eclipse.osbp.vaaclipse.addons.ecview/build.properties
new file mode 100644
index 0000000..cad6f44
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/build.properties
@@ -0,0 +1,13 @@
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ OSGI-INF/,\
+ .classpath,\
+ .project,\
+ .settings/,\
+ LICENSE.txt,\
+ epl-v10.html,\
+ license.html,\
+ pom.xml
+output.. = target/classes/
+source.. = src/,\
+ model/
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.ecview/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/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.vaaclipse.addons.ecview/license.html b/org.eclipse.osbp.vaaclipse.addons.ecview/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/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.vaaclipse.addons.ecview/model/Vaaclipse.uisemantics b/org.eclipse.osbp.vaaclipse.addons.ecview/model/Vaaclipse.uisemantics
new file mode 100644
index 0000000..def24d9
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/model/Vaaclipse.uisemantics
@@ -0,0 +1,19 @@
+ePackage "http://osbp.eclipse.org/ecview/dsl/uimodel/core" as view
+
+actions {
+ org.lunifera.^actions.save externalCommand "org.lunifera.vaaclipse.addons.application.command.extsave" disabled
+ org.lunifera.^actions.load externalCommand "org.lunifera.vaaclipse.addons.application.command.extload" disabled
+ org.lunifera.^actions.delete externalCommand "org.lunifera.vaaclipse.addons.application.command.extdelete" disabled
+ org.lunifera.^actions.validate externalCommand "org.lunifera.vaaclipse.addons.application.command.extvalidate" disabled
+ org.lunifera.^actions.addNewRow
+ org.lunifera.^actions.addNew
+ org.lunifera.^actions.applyFilter
+}
+
+categories {
+ org.lunifera.vaaclipse.addons.application.partstack.left
+ org.lunifera.vaaclipse.addons.application.partstack.right
+ org.lunifera.vaaclipse.addons.application.partstack.main
+ org.lunifera.vaaclipse.addons.application.partstack.bottom
+ org.lunifera.vaaclipse.addons.application.partstack.materdetail.master
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/pom.xml b/org.eclipse.osbp.vaaclipse.addons.ecview/pom.xml
new file mode 100644
index 0000000..58274da
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/pom.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.ecview</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/DynamicViewSupport.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/DynamicViewSupport.java
new file mode 100644
index 0000000..19e1ba2
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/DynamicViewSupport.java
@@ -0,0 +1,328 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.commands.MBindingContext;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.MElementContainer;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory;
+import org.eclipse.e4.ui.model.application.ui.menu.MToolBar;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
+import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
+import org.eclipse.osbp.dsl.dto.lib.impl.DtoServiceAccess;
+import org.eclipse.osbp.dsl.dto.lib.services.IDTOService;
+import org.eclipse.osbp.ecview.core.common.context.IViewContext;
+import org.eclipse.osbp.ecview.core.common.model.core.YBeanSlot;
+import org.eclipse.osbp.ecview.core.common.model.core.YView;
+import org.eclipse.osbp.ecview.xtext.builder.participant.IECViewAddonsMetadataService;
+import org.eclipse.osbp.runtime.common.state.ISharedStateContext;
+import org.eclipse.osbp.runtime.common.state.ISharedStateContextProvider;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Constants;
+import org.eclipse.osbp.vaaclipse.addons.ecview.impl.Activator;
+import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The Class DynamicViewSupport.
+ */
+@SuppressWarnings("restriction")
+public class DynamicViewSupport {
+
+ /** The Constant ECVIEW_GENERIC__BINDING_CONTEXT. */
+ private static final String ECVIEW_GENERIC__BINDING_CONTEXT = "org.eclipse.osbp.samples.carstore.ui.application.contexts.ecviewgeneric";
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(DynamicViewSupport.class);
+
+ /** The Constant PROP_VIEW_ID. */
+ private static final String PROP_VIEW_ID = "org.eclipse.osbp.vaaclipse.addons.ecview.viewId";
+
+ /** The shared state provider. */
+ @Inject
+ private ISharedStateContextProvider sharedStateProvider;
+
+ /** The model service. */
+ @Inject
+ private EModelService modelService;
+
+ /**
+ * Instantiates a new dynamic view support.
+ */
+ public DynamicViewSupport() {
+ }
+
+ /**
+ * Opens a new generic ECView view.
+ *
+ * @param id
+ * the id
+ * @param label
+ * the label
+ * @param description
+ * the description
+ * @param iconURI
+ * the icon uri
+ * @param context
+ * the context
+ */
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public void openNewGenericECViewView(String id, String label,
+ String description, String iconURI, IEclipseContext context) {
+
+ MApplication app = context.get(MApplication.class);
+ EPartService partService = context.get(EPartService.class);
+ EModelService modelService = context.get(EModelService.class);
+ MUIElement activeElement = modelService.find(id,
+ context.get(MPerspective.class));
+
+ if (activeElement != null) {
+ // show the part
+ partService.activate((MPart) activeElement, true);
+ } else {
+
+ YView yView = findViewModel(id);
+ if (yView == null) {
+ LOGGER.error("Could not find view for {}", id);
+ return;
+ }
+
+ // determine the view category
+ String viewCategory = yView.getCategory();
+ if (viewCategory == null) {
+ viewCategory = IE4Constants.ID__PARTSTACK__MAIN;
+ }
+
+ // find a parent container for the category
+ MElementContainer container = null;
+ List<MElementContainer> containers = modelService.findElements(app,
+ null, MElementContainer.class,
+ Collections.singletonList(viewCategory),
+ EModelService.PRESENTATION);
+ if (!containers.isEmpty()) {
+ container = containers.get(0);
+ } else {
+ LOGGER.error("Could not container for category {}",
+ viewCategory);
+ return;
+ }
+
+ MPart part = modelService.createModelElement(MPart.class);
+ part.setElementId(id);
+ part.setLabel(label);
+ part.setDescription(description);
+ part.setIconURI(iconURI);
+ part.setContributionURI(IE4Constants.BUNDLECLASS_GENERIC_ECVIEW_VIEWPART);
+ part.setCloseable(true);
+ part.setOnTop(true);
+ part.setToBeRendered(true);
+ part.setVisible(true);
+ part.getTags().add(EPartService.REMOVE_ON_HIDE_TAG);
+ MToolBar mToolbar = MMenuFactory.INSTANCE.createToolBar();
+ part.setToolbar(mToolbar);
+
+ // get the proper binding context for the generic ecview view
+ MBindingContext bindingContext = findBindingContext(
+ ECVIEW_GENERIC__BINDING_CONTEXT, app);
+ if (bindingContext != null) {
+ part.getBindingContexts().add(bindingContext);
+ }
+
+ //
+ // create a child context and configure with the view model
+ //
+ IEclipseContext partContext = getContext(container).createChild();
+ part.setContext(partContext);
+ initializePartContext(part, partContext, yView, id);
+
+ // add the part to its container
+ container.getChildren().add(part); // Add part to stack
+
+ // show the part
+ partService.showPart(part, PartState.ACTIVATE); // Show
+ }
+ }
+
+ /**
+ * Find binding context.
+ *
+ * @param id
+ * the id
+ * @param app
+ * the app
+ * @return the m binding context
+ */
+ private MBindingContext findBindingContext(String id, MApplication app) {
+ // initialize the binding context that should be used
+ List<MBindingContext> bindingContexts = app.getRootContext();
+ for (MBindingContext b : bindingContexts) {
+ if (b.getElementId().equals(id)) {
+ return b;
+ }
+ MBindingContext result = findBindingContext(id, b.getChildren());
+ if (result != null) {
+ return result;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Find binding context.
+ *
+ * @param id
+ * the id
+ * @param bindingContexts
+ * the binding contexts
+ * @return the m binding context
+ */
+ private MBindingContext findBindingContext(String id,
+ List<MBindingContext> bindingContexts) {
+ // initialize the binding context that should be used
+ for (MBindingContext b : bindingContexts) {
+ if (b.getElementId().equals(id)) {
+ return b;
+ }
+
+ MBindingContext result = findBindingContext(id, b.getChildren());
+ if (result != null) {
+ return result;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets the context.
+ *
+ * @param parent
+ * the parent
+ * @return the context
+ */
+ private IEclipseContext getContext(MUIElement parent) {
+ if (parent instanceof MContext) {
+ return ((MContext) parent).getContext();
+ }
+ return modelService.getContainingContext(parent);
+ }
+
+ /**
+ * Creates the context for a part that is already opened and was persisted
+ * in the user specific application model.
+ *
+ * @param part
+ * the part
+ * @return the y view
+ */
+ public YView createPartContextForPersisted(MPart part) {
+ String viewId = part.getPersistedState().get(PROP_VIEW_ID);
+ if (viewId == null) {
+ return null;
+ }
+
+ YView yView = findViewModel(viewId);
+ if (yView == null) {
+ return null;
+ }
+
+ IEclipseContext context = part.getContext();
+ String id = part.getElementId();
+
+ initializePartContext(part, context, yView, id);
+
+ return yView;
+ }
+
+ /**
+ * Creates a child context for the part that should be opened.
+ *
+ * @param part
+ * the part
+ * @param partContext
+ * the part context
+ * @param yView
+ * the y view
+ * @param id
+ * the id
+ */
+ private void initializePartContext(MPart part, IEclipseContext partContext,
+ YView yView, String id) {
+
+ // Store the view id in the part for later reloading
+ part.getPersistedState().put(PROP_VIEW_ID, yView.getName());
+
+ // initialize the context -> so no delegation to OSGi services is
+ // processed later
+ partContext.set(ISharedStateContext.class, null);
+ partContext.set(IDTOService.class, null);
+
+ partContext.set(YView.class, yView);
+
+ if (yView != null) {
+ // create shared state
+ if (yView.getSharedStateGroup() != null
+ && !yView.getSharedStateGroup().trim().equals("")) {
+ ISharedStateContext sharedState = sharedStateProvider
+ .getContext(yView.getSharedStateGroup(), null);
+ partContext.set(ISharedStateContext.class, sharedState);
+ }
+
+ // put the main DTO service into the context
+ YBeanSlot yBeanSlot = yView
+ .getBeanSlot(IViewContext.MAIN_BEAN_SLOT);
+ if (yBeanSlot != null) {
+ @SuppressWarnings({ "unchecked" })
+ IDTOService<Object> dtoService = (IDTOService<Object>) DtoServiceAccess
+ .getService(yBeanSlot.getValueType());
+ partContext.set(IDTOService.class, dtoService);
+ }
+ }
+ }
+
+ /**
+ * Tries to find the view model using the ecview addons service.
+ *
+ * @param viewId
+ * the view id
+ * @return the y view
+ */
+ private YView findViewModel(String viewId) {
+ ServiceTracker<IECViewAddonsMetadataService, IECViewAddonsMetadataService> tracker = new ServiceTracker<IECViewAddonsMetadataService, IECViewAddonsMetadataService>(
+ Activator.getContext(), IECViewAddonsMetadataService.class,
+ null);
+ tracker.open();
+ try {
+ IECViewAddonsMetadataService uiService = tracker
+ .waitForService(5000);
+ return uiService.getViewMetadata(viewId);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } finally {
+ tracker.close();
+ }
+ return null;
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerApplicationLeaf.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerApplicationLeaf.java
new file mode 100644
index 0000000..338f6ae
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerApplicationLeaf.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.AbstractExplorerInfo;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerLeaf;
+
+/**
+ * The Class ExplorerApplicationLeaf.
+ */
+public class ExplorerApplicationLeaf extends AbstractExplorerInfo implements
+ IExplorerLeaf {
+
+ /**
+ * Instantiates a new explorer application leaf.
+ */
+ public ExplorerApplicationLeaf() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerLeaf#execute(org.eclipse.e4.core.contexts.IEclipseContext)
+ */
+ @Override
+ public void execute(IEclipseContext context) {
+
+ DynamicViewSupport viewSupport = context.get(DynamicViewSupport.class);
+ viewSupport
+ .openNewGenericECViewView(
+ getId(),
+ getLabel(),
+ getDescription(),
+ "platform:/plugin/org.eclipse.osbp.vaaclipse.addons.application/images/package_explorer.png",
+ context);
+
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerCategory.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerCategory.java
new file mode 100644
index 0000000..dbc80d9
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerCategory.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.osbp.runtime.common.validation.Status;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.AbstractExplorerInfo;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerCategory;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerInfo;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerInfoManager;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The Class ExplorerCategory.
+ */
+public class ExplorerCategory extends AbstractExplorerInfo implements
+ IExplorerCategory {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ExplorerCategory.class);
+
+ /** The eclipse context. */
+ private final IEclipseContext eclipseContext;
+
+ /** The parent category. */
+ protected IExplorerCategory parentCategory;
+
+ /** The children. */
+ protected List<IExplorerInfo> children;
+
+ /** The lazy has children. */
+ protected boolean lazyHasChildren;
+
+ /**
+ * Instantiates a new explorer category.
+ *
+ * @param eclipseContext
+ * the eclipse context
+ */
+ public ExplorerCategory(IEclipseContext eclipseContext) {
+ this.eclipseContext = eclipseContext;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerCategory#getParentCategory()
+ */
+ @Override
+ public IExplorerCategory getParentCategory() {
+ return parentCategory;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerCategory#getChildren()
+ */
+ @Override
+ public List<IExplorerInfo> getChildren() {
+ if (children == null) {
+ loadChilds();
+ }
+ return children != null ? Collections.unmodifiableList(children)
+ : Collections.<IExplorerInfo> emptyList();
+ }
+
+ /**
+ * Adds the child.
+ *
+ * @param info
+ * the info
+ * @return true, if successful
+ */
+ private boolean addChild(IExplorerInfo info) {
+ return children.add(info);
+ }
+
+ /**
+ * Returns the infos as an input for the tree.
+ */
+ private void loadChilds() {
+ if (children == null) {
+ children = new ArrayList<IExplorerInfo>();
+ } else {
+ return;
+ }
+
+ ServiceTracker<IExplorerInfoManager, IExplorerInfoManager> tracker = new ServiceTracker<IExplorerInfoManager, IExplorerInfoManager>(
+ FrameworkUtil.getBundle(getClass()).getBundleContext(),
+ IExplorerInfoManager.class, null);
+
+ try {
+ tracker.open();
+ IExplorerInfoManager provider = tracker.waitForService(500);
+ for (IExplorerInfo info : provider.getExplorerInfo(this,
+ eclipseContext)) {
+ addChild(info);
+ }
+ } catch (InterruptedException e) {
+ LOGGER.error("{}", e);
+ eclipseContext.get(IStatusManager.class).getActiveScope()
+ .addStatus(Status.createErrorStatus(e));
+ } finally {
+ tracker.close();
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerInfoManager.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerInfoManager.java
new file mode 100644
index 0000000..babb851
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/ExplorerInfoManager.java
@@ -0,0 +1,283 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.osbp.ecview.xtext.builder.participant.IECViewAddonsMetadataService;
+import org.eclipse.osbp.runtime.common.i18n.II18nService;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerCategory;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerInfo;
+import org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerInfoManager;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.osgi.service.component.annotations.ReferencePolicy;
+
+/**
+ * The Class ExplorerInfoManager.
+ */
+@Component(property = { "service.ranking=100" }, immediate = true)
+public class ExplorerInfoManager implements IExplorerInfoManager {
+
+ /** The Constant I18NKEY_CATEGORY_DESCRIPTION. */
+ private static final String I18NKEY_CATEGORY_DESCRIPTION = "desc.%s";
+
+ /** The Constant I18NKEY_CATEGORY. */
+ private static final String I18NKEY_CATEGORY = "category.%s";
+
+ /** The ecview service. */
+ private IECViewAddonsMetadataService ecviewService;
+
+ /** The i18n service. */
+ private II18nService i18nService;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerInfoManager#getExplorerInfo(org.eclipse.osbp.vaaclipse.addons.common.api.explorer.IExplorerCategory, org.eclipse.e4.core.contexts.IEclipseContext)
+ */
+ @Override
+ public Iterable<IExplorerInfo> getExplorerInfo(IExplorerCategory parent,
+ IEclipseContext context) {
+ if (parent == null) {
+ return getRootInfos(context);
+ } else {
+ return getChildren(context, parent);
+ }
+ }
+
+ /**
+ * Bind ec view metadata service.
+ *
+ * @param service
+ * the service
+ */
+ @Reference(name = "ecviewMetadataService", unbind = "unbindECViewMetadataService", cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC)
+ protected void bindECViewMetadataService(
+ IECViewAddonsMetadataService service) {
+ // handle mandatory dynamic
+ if (service != this.ecviewService) {
+ this.ecviewService = service;
+ }
+ }
+
+ /**
+ * Unbind ec view metadata service.
+ *
+ * @param service
+ * the service
+ */
+ protected void unbindECViewMetadataService(
+ IECViewAddonsMetadataService service) {
+ // handle mandatory dynamic
+ if (service == this.ecviewService) {
+ this.ecviewService = null;
+ }
+ }
+
+ /**
+ * Bind i18n service.
+ *
+ * @param service
+ * the service
+ */
+ @Reference(name = "i18nService", unbind = "unbindI18nService", cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC)
+ protected void bindI18nService(II18nService service) {
+ // handle mandatory dynamic
+ if (service != this.i18nService) {
+ this.i18nService = service;
+ }
+ }
+
+ /**
+ * Unbind i18n service.
+ *
+ * @param service
+ * the service
+ */
+ protected void unbindI18nService(II18nService service) {
+ // handle mandatory dynamic
+ if (service == this.i18nService) {
+ this.i18nService = null;
+ }
+ }
+
+ /**
+ * Creates a category for each package name of found views.
+ *
+ * @param context
+ * the context
+ * @return the root infos
+ */
+ protected Iterable<IExplorerInfo> getRootInfos(IEclipseContext context) {
+ Map<String, IExplorerInfo> infos = new HashMap<String, IExplorerInfo>();
+
+ List<String> viewNames = getSortedRootViewNames(null, false);
+ // access all views that are contained in root packages
+ for (String viewFQN : viewNames) {
+ String pkg = viewFQN.substring(0, viewFQN.lastIndexOf("."));
+ String categoryId = toCategoryI18nKey(pkg);
+ ExplorerCategory category = null;
+ if (!infos.containsKey(categoryId)) {
+ category = new ExplorerCategory(context);
+ category.setId(categoryId);
+ category.setTarget(pkg);
+ category.setI18nLabelKey(categoryId);
+ category.setIconI18nKey(toImageI18nKey(categoryId));
+ category.setI18nDescriptionKey(toDescriptionI18nKey(categoryId));
+ category.setLabel(translate(category.getI18nLabelKey()));
+ category.setDescription(translate(category
+ .getI18nDescriptionKey()));
+ category.setIconURI(translate(category.getIconI18nKey()));
+ infos.put(categoryId, category);
+ }
+ }
+
+ return infos.values();
+ }
+
+ /**
+ * Fetches all children for the given category.
+ *
+ * @param context
+ * the context
+ * @param parent
+ * the parent
+ * @return the children
+ */
+ protected Iterable<IExplorerInfo> getChildren(IEclipseContext context,
+ IExplorerCategory parent) {
+ Map<String, IExplorerInfo> infos = new HashMap<String, IExplorerInfo>();
+
+ List<String> viewNames = getSortedRootViewNames(parent.getTarget(),
+ false);
+ // access all views that are contained in the parent category
+ for (String viewFQN : viewNames) {
+ String pkg = viewFQN.substring(0, viewFQN.lastIndexOf("."));
+ String categoryId = toCategoryI18nKey(pkg);
+
+ if (pkg.equals(parent.getTarget())) {
+ // the package is the same as the parent#target. So lets add an
+ // application leaf
+ ExplorerApplicationLeaf leaf = new ExplorerApplicationLeaf();
+ leaf.setId(viewFQN);
+ leaf.setTarget(viewFQN);
+ leaf.setI18nLabelKey(viewFQN);
+ leaf.setIconI18nKey(toImageI18nKey(viewFQN));
+ leaf.setI18nDescriptionKey(toDescriptionI18nKey(viewFQN));
+ leaf.setLabel(translate(leaf.getI18nLabelKey()));
+ leaf.setDescription(translate(leaf.getI18nDescriptionKey()));
+ leaf.setIconURI(translate(leaf.getIconI18nKey()));
+
+ infos.put(viewFQN, leaf);
+ } else {
+ // must be a new category
+ ExplorerCategory category = null;
+
+ // if not already created, then do so
+ if (!infos.containsKey(categoryId)) {
+ category = new ExplorerCategory(context);
+ category.setId(categoryId);
+ category.setTarget(pkg);
+ category.setI18nLabelKey(categoryId);
+ category.setIconI18nKey(toImageI18nKey(categoryId));
+ category.setI18nDescriptionKey(toDescriptionI18nKey(categoryId));
+ category.setLabel(translate(category.getI18nLabelKey()));
+ category.setDescription(translate(category
+ .getI18nDescriptionKey()));
+ category.setIconURI(translate(category.getIconI18nKey()));
+
+ infos.put(categoryId, category);
+ }
+ }
+ }
+
+ List<IExplorerInfo> result = new ArrayList<IExplorerInfo>(
+ infos.values());
+ Collections.sort(result);
+
+ return result;
+ }
+
+ /**
+ * Gets the sorted root view names.
+ *
+ * @param pkgName
+ * the pkg name
+ * @param includeChildren
+ * the include children
+ * @return the sorted root view names
+ */
+ private List<String> getSortedRootViewNames(String pkgName,
+ boolean includeChildren) {
+ List<String> viewNames = ecviewService.getIDEViewNames(pkgName,
+ includeChildren);
+ // Collections.sort(viewNames, new Comparator<String>() {
+ // @Override
+ // public int compare(String o0, String o1) {
+ // String pkg0 = o0.substring(0, o0.lastIndexOf("."));
+ // String pkg1 = o1.substring(0, o1.lastIndexOf("."));
+ //
+ // return pkg0.length() - pkg1.length();
+ // }
+ // });
+ return viewNames;
+ }
+
+ /**
+ * To category i18n key.
+ *
+ * @param pkg
+ * the pkg
+ * @return the string
+ */
+ private String toCategoryI18nKey(String pkg) {
+ return String.format(I18NKEY_CATEGORY, pkg);
+ }
+
+ /**
+ * To image i18n key.
+ *
+ * @param category
+ * the category
+ * @return the string
+ */
+ private String toImageI18nKey(String category) {
+ return category + ".image";
+ }
+
+ /**
+ * To description i18n key.
+ *
+ * @param categoryId
+ * the category id
+ * @return the string
+ */
+ private String toDescriptionI18nKey(String categoryId) {
+ return String.format(I18NKEY_CATEGORY_DESCRIPTION, categoryId);
+ }
+
+ /**
+ * Translate.
+ *
+ * @param key
+ * the key
+ * @return the string
+ */
+ private String translate(String key) {
+ return i18nService.getValue(key, Locale.getDefault());
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/e4context/DynamicViewSupportContextFunctionFactory.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/e4context/DynamicViewSupportContextFunctionFactory.java
new file mode 100644
index 0000000..aa2b5a4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/e4context/DynamicViewSupportContextFunctionFactory.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview.e4context;
+
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.services.nls.ILocaleChangeService;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.osbp.vaaclipse.addons.ecview.DynamicViewSupport;
+import org.osgi.service.component.annotations.Component;
+
+/**
+ * A factory for creating DynamicViewSupportContextFunction objects.
+ */
+@Component(service = org.eclipse.e4.core.contexts.IContextFunction.class, property = { "service.context.key=org.eclipse.osbp.vaaclipse.addons.ecview.DynamicViewSupport" })
+public class DynamicViewSupportContextFunctionFactory extends ContextFunction {
+
+ /** The Constant ROOT_CONTEXT. */
+ public static final String ROOT_CONTEXT = "rootContext"; //$NON-NLS-1$
+
+ /**
+ * Instantiates a new dynamic view support context function factory.
+ */
+ public DynamicViewSupportContextFunctionFactory() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.core.contexts.ContextFunction#compute(org.eclipse.e4.core.contexts.IEclipseContext, java.lang.String)
+ */
+ @Override
+ public Object compute(IEclipseContext context, String contextKey) {
+ // add the new object to the application context
+ MApplication application = context.get(MApplication.class);
+ IEclipseContext appCtx = application.getContext();
+
+ DynamicViewSupport support = ContextInjectionFactory.make(DynamicViewSupport.class,
+ appCtx);
+
+ appCtx.set(DynamicViewSupport.class, support);
+
+ return support;
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/e4context/YViewContextFunctionFactory.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/e4context/YViewContextFunctionFactory.java
new file mode 100644
index 0000000..06bc208
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/e4context/YViewContextFunctionFactory.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview.e4context;
+
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.ecview.core.common.model.core.YView;
+import org.eclipse.osbp.vaaclipse.addons.ecview.DynamicViewSupport;
+import org.osgi.service.component.annotations.Component;
+
+/**
+ * A factory for creating YViewContextFunction objects.
+ */
+@Component(service = org.eclipse.e4.core.contexts.IContextFunction.class, property = { "service.context.key=org.eclipse.osbp.ecview.core.common.model.core.YView" })
+public class YViewContextFunctionFactory extends ContextFunction {
+
+ /**
+ * Instantiates a new y view context function factory.
+ */
+ public YViewContextFunctionFactory() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.core.contexts.ContextFunction#compute(org.eclipse.e4.core.contexts.IEclipseContext, java.lang.String)
+ */
+ @Override
+ public Object compute(IEclipseContext context, String contextKey) {
+ MPart part = context.get(MPart.class);
+ DynamicViewSupport viewSupport = context.get(DynamicViewSupport.class);
+ YView yView = viewSupport.createPartContextForPersisted(part);
+
+ return yView;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/event/E4EventBrokerAdapter.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/event/E4EventBrokerAdapter.java
new file mode 100644
index 0000000..f7966ee
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/event/E4EventBrokerAdapter.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview.event;
+
+import org.osgi.service.event.EventHandler;
+
+/**
+ * This adapter adapts from the e4 eventbroker to the ecview eventbroker. So the
+ * e4 eventbroker can be used in ecview too.
+ */
+public class E4EventBrokerAdapter implements
+ org.eclipse.osbp.runtime.common.event.IEventBroker {
+
+ /** The e4 event broker. */
+ private org.eclipse.e4.core.services.events.IEventBroker e4EventBroker;
+
+ /**
+ * Instantiates a new e4 event broker adapter.
+ *
+ * @param e4EventBroker
+ * the e4 event broker
+ */
+ public E4EventBrokerAdapter(
+ org.eclipse.e4.core.services.events.IEventBroker e4EventBroker) {
+ this.e4EventBroker = e4EventBroker;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.common.event.IEventBroker#send(java.lang.String, java.lang.Object)
+ */
+ @Override
+ public boolean send(String topic, Object data) {
+ return e4EventBroker.send(topic, data);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.common.event.IEventBroker#post(java.lang.String, java.lang.Object)
+ */
+ @Override
+ public boolean post(String topic, Object data) {
+ return e4EventBroker.post(topic, data);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.common.event.IEventBroker#subscribe(java.lang.String, org.osgi.service.event.EventHandler)
+ */
+ @Override
+ public boolean subscribe(String topic, EventHandler eventHandler) {
+ return e4EventBroker.subscribe(topic, eventHandler);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.common.event.IEventBroker#subscribe(java.lang.String, java.lang.String, org.osgi.service.event.EventHandler, boolean)
+ */
+ @Override
+ public boolean subscribe(String topic, String filter,
+ EventHandler eventHandler, boolean headless) {
+ return e4EventBroker.subscribe(topic, filter, eventHandler, headless);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.common.event.IEventBroker#unsubscribe(org.osgi.service.event.EventHandler)
+ */
+ @Override
+ public boolean unsubscribe(EventHandler eventHandler) {
+ return e4EventBroker.unsubscribe(eventHandler);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/impl/Activator.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/impl/Activator.java
new file mode 100644
index 0000000..6492a75
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/impl/Activator.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview.impl;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The Class Activator.
+ */
+public class Activator implements BundleActivator {
+
+ /** The context. */
+ private static BundleContext context;
+
+ /**
+ * Gets the context.
+ *
+ * @return the context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ Activator.context = context;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/views/GenericECViewPart.java b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/views/GenericECViewPart.java
new file mode 100644
index 0000000..dbe643c
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/views/GenericECViewPart.java
@@ -0,0 +1,1217 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.ecview.views;
+
+import java.util.Collections;
+import java.util.Date;
+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.NoSuchElementException;
+import java.util.Set;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.di.Persist;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.commands.MCommand;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.menu.MHandledToolItem;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory;
+import org.eclipse.e4.ui.model.application.ui.menu.MToolBar;
+import org.eclipse.e4.ui.model.application.ui.menu.MToolBarElement;
+import org.eclipse.e4.ui.model.application.ui.menu.MToolItem;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.osbp.dsl.dto.lib.services.DtoServiceException;
+import org.eclipse.osbp.dsl.dto.lib.services.IDTOService;
+import org.eclipse.osbp.ecview.core.common.beans.ISlot;
+import org.eclipse.osbp.ecview.core.common.context.ContextException;
+import org.eclipse.osbp.ecview.core.common.context.IViewContext;
+import org.eclipse.osbp.ecview.core.common.editpart.IFieldEditpart;
+import org.eclipse.osbp.ecview.core.common.model.core.CoreModelPackage;
+import org.eclipse.osbp.ecview.core.common.model.core.YBeanSlot;
+import org.eclipse.osbp.ecview.core.common.model.core.YEmbeddable;
+import org.eclipse.osbp.ecview.core.common.model.core.YExposedAction;
+import org.eclipse.osbp.ecview.core.common.model.core.YField;
+import org.eclipse.osbp.ecview.core.common.model.core.YFocusable;
+import org.eclipse.osbp.ecview.core.common.model.core.YView;
+import org.eclipse.osbp.ecview.core.common.model.core.util.BindingIdUtil;
+import org.eclipse.osbp.ecview.core.common.validation.IFieldValidationManager;
+import org.eclipse.osbp.ecview.core.util.emf.ModelUtil;
+import org.eclipse.osbp.runtime.common.annotations.DtoUtils;
+import org.eclipse.osbp.runtime.common.event.IEventBroker;
+import org.eclipse.osbp.runtime.common.i18n.II18nService;
+import org.eclipse.osbp.runtime.common.state.ISharedStateContext;
+import org.eclipse.osbp.runtime.common.state.SharedStateUnitOfWork;
+import org.eclipse.osbp.runtime.common.validation.IStatus;
+import org.eclipse.osbp.runtime.common.validation.ValidationKind;
+import org.eclipse.osbp.runtime.web.ecview.presentation.vaadin.VaadinRenderer;
+import org.eclipse.osbp.runtime.web.vaadin.common.resource.IResourceProvider;
+import org.eclipse.osbp.runtime.web.vaadin.components.dialogs.AcceptDeleteDialog;
+import org.eclipse.osbp.runtime.web.vaadin.components.dialogs.AcceptLoosingDataDialog;
+import org.eclipse.osbp.runtime.web.vaadin.components.dialogs.AcceptReloadDialog;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Constants;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Topics;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Callback;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Delete;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.EnabledState;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Load;
+import org.eclipse.osbp.vaaclipse.addons.common.api.di.Validate;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope;
+import org.eclipse.osbp.vaaclipse.addons.common.event.EventTopicNormalizer;
+import org.eclipse.osbp.vaaclipse.addons.ecview.event.E4EventBrokerAdapter;
+import org.eclipse.osbp.vaaclipse.addons.keybinding.IKeyBindingService;
+import org.eclipse.osbp.vaaclipse.publicapi.commands.IPartItemExecutionService;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.event.LayoutEvents;
+import com.vaadin.event.LayoutEvents.LayoutClickEvent;
+import com.vaadin.ui.Notification;
+import com.vaadin.ui.Notification.Type;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * A generic ECView view part implementation. It will be used by the
+ * DynamicViewSupport to create views on the fly.
+ * <p>
+ * Client should not subclass this implementation.
+ */
+public class GenericECViewPart implements IFieldValidationManager.Listener {
+
+ /** The Constant BEAN_SLOT__VALIDATION_ERROR. */
+ private static final String BEAN_SLOT__VALIDATION_ERROR = "validationError";
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(GenericECViewPart.class);
+
+ /** The eclipse context. */
+ @Inject
+ private IEclipseContext eclipseContext;
+
+ /** The m part. */
+ @Inject
+ private MPart mPart;
+
+ /** The parent layout. */
+ @Inject
+ private VerticalLayout parentLayout;
+
+ /** The e4 event broker. */
+ @Inject
+ private org.eclipse.e4.core.services.events.IEventBroker e4EventBroker;
+
+ /** The topic normalizer. */
+ @Inject
+ private EventTopicNormalizer topicNormalizer;
+
+ /** The i18n service. */
+ @Inject
+ private II18nService i18nService;
+
+ /** The resource provider. */
+ @Inject
+ private IResourceProvider resourceProvider;
+
+ /** The y view. */
+ @Inject
+ private YView yView;
+
+ /** The shared state. */
+ @Inject
+ private ISharedStateContext sharedState;
+
+ /** The dto service. */
+ @Inject
+ private IDTOService<Object> dtoService;
+
+ /** The part service. */
+ @Inject
+ private EPartService partService;
+
+ /** The status manager. */
+ @Inject
+ private IStatusManager statusManager;
+
+ /** The key binding service. */
+ @Inject
+ private IKeyBindingService keyBindingService;
+
+ /** The command info. */
+ private Map<String, CommandInfo> commandInfo = new HashMap<String, CommandInfo>();
+
+ /** The exposed actions callback. */
+ private ExposedActionsCallback exposedActionsCallback;
+
+ /** The view context. */
+ private IViewContext viewContext;
+
+ /** The redirected eventtopics. */
+ private HashMap<String, Set<YBeanSlot>> redirectedEventtopics;
+
+ /** The event handlers. */
+ private Set<EventHandler> eventHandlers = new HashSet<EventHandler>();
+
+ /** The ecview field validation manager. */
+ private IFieldValidationManager ecviewFieldValidationManager;
+
+ /** The validation result. */
+ private Set<IStatus> validationResult;
+
+ /**
+ * Instantiates a new generic ec view part.
+ */
+ public GenericECViewPart() {
+ }
+
+ /**
+ * Setup.
+ */
+ @SuppressWarnings("serial")
+ @PostConstruct
+ public void setup() {
+
+ if (yView == null) {
+ Notification.show("View model is not available!",
+ Notification.Type.ERROR_MESSAGE);
+ return;
+ }
+
+ exposedActionsCallback = new ExposedActionsCallback();
+
+ VerticalLayout layout = new VerticalLayout();
+ parentLayout.addComponent(layout);
+ layout.setSizeFull();
+
+ redirectEventTopics(yView);
+
+ // render the Vaadin UI
+ Map<String, Object> properties = new HashMap<String, Object>();
+
+ // register services to be used
+ Map<String, Object> services = new HashMap<String, Object>();
+ services.put(org.eclipse.osbp.runtime.common.event.IEventBroker.class
+ .getName(), new E4EventBrokerAdapter(e4EventBroker));
+ if (sharedState != null) {
+ services.put(ISharedStateContext.class.getName(), sharedState);
+ }
+ properties.put(IViewContext.PARAM_SERVICES, services);
+
+ VaadinRenderer renderer = new VaadinRenderer();
+ try {
+ viewContext = renderer.render(layout, yView, properties);
+ viewContext.createBeanSlot(BEAN_SLOT__VALIDATION_ERROR,
+ Boolean.class);
+ viewContext.setBean(BEAN_SLOT__VALIDATION_ERROR, Boolean.FALSE);
+ } catch (ContextException e) {
+ LOGGER.error("{}", e);
+ }
+
+ // bridges the validation from ECView core to Vaaclipse
+ setupValidationBridge();
+
+ // register a layout click listener to activate the part.
+ layout.addLayoutClickListener(new LayoutEvents.LayoutClickListener() {
+ @Override
+ public void layoutClick(LayoutClickEvent event) {
+ partService.activate(mPart);
+ }
+ });
+
+ setupFocusFieldFeature();
+
+ preparePartToolbar(yView);
+ }
+
+ /**
+ * Setup the focus-field feature. Handles events from event broker and tries
+ * to focus the element.
+ */
+ protected void setupFocusFieldFeature() {
+ // install an event handler that is responsible to focus elements
+ EventHandler focusEventHandler = new EventHandler() {
+ @Override
+ public void handleEvent(Event event) {
+ String partId = (String) event
+ .getProperty(IE4Topics.PartEvents.PROP_MPART_ID);
+ if (partId != null && partId.equals(mPart.getElementId())) {
+ String fieldId = (String) event
+ .getProperty(IE4Topics.PartEvents.PROP_FIELD_ID);
+ if (fieldId != null && !fieldId.equals("")) {
+ YEmbeddable yElement = (YEmbeddable) viewContext
+ .findModelElement(fieldId);
+ if (yElement instanceof YFocusable) {
+ YView yView = (YView) viewContext.getViewEditpart()
+ .getModel();
+ yView.setCurrentFocus((YFocusable) yElement);
+ }
+ }
+ }
+ }
+ };
+ eventHandlers.add(focusEventHandler);
+
+ e4EventBroker.subscribe(IE4Topics.PartEvents.FOCUS_FIELD_TOPIC,
+ focusEventHandler);
+ }
+
+ /**
+ * Setup validation bridge.
+ */
+ protected void setupValidationBridge() {
+ // create a validation enhancer. If an error message is added to the
+ // field validation manager. The enhancer will set the id of the mpart
+ // to the status.
+ ecviewFieldValidationManager = viewContext
+ .getService(IFieldValidationManager.class.getName());
+ ecviewFieldValidationManager
+ .setEnhancer(new IFieldValidationManager.Enhancer() {
+ @Override
+ public void enhance(IStatus status) {
+ status.putProperty(IStatus.PROP_UI_APPLICATION_ID,
+ mPart.getElementId());
+ }
+ });
+
+ ecviewFieldValidationManager.addListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ecview.core.common.validation.IFieldValidationManager.Listener#validationChanged(org.eclipse.osbp.ecview.core.common.validation.IFieldValidationManager.Event)
+ */
+ @Override
+ public void validationChanged(IFieldValidationManager.Event event) {
+ // add them to the Vaaclipse status manager
+ IStatusScope scope = statusManager.getScopeFor(mPart);
+ scope.modifyStatus(event.getOldStatus(), event.getNewStatus());
+
+ applyValidationResult();
+ }
+
+ /**
+ * Remove defined event topics at bean slots. We pass them to custom
+ * handlers which will forward to the view. So we can avoid loosing changed
+ * data.
+ *
+ * @param yView
+ * the y view
+ */
+ private void redirectEventTopics(YView yView) {
+
+ // redirect event topics
+ redirectedEventtopics = new HashMap<String, Set<YBeanSlot>>();
+ for (YBeanSlot yBeanSlot : yView.getBeanSlots()) {
+ String eventTopic = yBeanSlot.getEventTopic();
+ if (eventTopic != null && !eventTopic.trim().equals("")) {
+ eventTopic = eventTopic.trim();
+
+ // events will be forwarded by this view
+ yBeanSlot.setRedirectEvents(true);
+
+ Set<YBeanSlot> yRedirSlots = redirectedEventtopics
+ .get(eventTopic);
+ if (yRedirSlots == null) {
+ yRedirSlots = new HashSet<YBeanSlot>();
+ redirectedEventtopics.put(eventTopic, yRedirSlots);
+ }
+ yRedirSlots.add(yBeanSlot);
+ }
+ }
+
+ if (redirectedEventtopics.size() > 0) {
+ // install event handler for each redirected topic
+ for (String eventTopic : redirectedEventtopics.keySet()) {
+ // install the event handler
+ EventHandler handler = new EventHandler() {
+ @Override
+ public void handleEvent(Event event) {
+ dispatchEventBrokerEvent(event);
+ }
+ };
+
+ e4EventBroker.subscribe(eventTopic, handler);
+ eventHandlers.add(handler);
+ }
+ }
+ }
+
+ /**
+ * Save.
+ *
+ * @param commandId
+ * the command id
+ */
+ @Persist
+ public void save(@Named("commandId") String commandId) {
+ final Object mainDto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);
+ boolean processedProperly = false;
+ try {
+ if (mainDto != null) {
+ new SharedStateUnitOfWork<Object>() {
+ @Override
+ protected Object doExecute() {
+ dtoService.update(mainDto);
+ return null;
+ }
+ }.execute(sharedState);
+ // in case of exception, it is still false
+ processedProperly = true;
+ } else {
+ }
+ } finally {
+ if (processedProperly) {
+ notifyExecuted(toExposedAction(commandId));
+ } else {
+ notifyCanceled(toExposedAction(commandId));
+ }
+ }
+ }
+
+ /**
+ * To exposed action.
+ *
+ * @param commandId
+ * the command id
+ * @return the y exposed action
+ */
+ private YExposedAction toExposedAction(String commandId) {
+ return commandInfo.get(commandId).action;
+ }
+
+ /**
+ * Validate.
+ *
+ * @param commandId
+ * the command id
+ */
+ @Validate
+ public void validate(@Named("commandId") String commandId) {
+ if (commandId != null) {
+
+ Set<IStatus> oldValidationResult = validationResult != null ? new HashSet<IStatus>(
+ validationResult) : new HashSet<IStatus>();
+
+ final Object mainDto = viewContext
+ .getBean(IViewContext.MAIN_BEAN_SLOT);
+ validationResult = dtoService.validate(mainDto,
+ ValidationKind.OTHER, null);
+
+ for (IStatus status : validationResult) {
+ // set the application id to the status
+ status.putProperty(IStatus.PROP_UI_APPLICATION_ID,
+ mPart.getElementId());
+
+ if (status.containsProperty(IStatus.PROP_FIELD_ID)
+ && status.containsProperty(IStatus.PROP_FIELD_I18N_KEY)) {
+ continue;
+ }
+
+ // fix the field id. Therefore we try to find the yField that is
+ // bound to the property path of javax.validation result.
+ if (!status.containsProperty(IStatus.PROP_FIELD_ID)) {
+ if (status
+ .containsProperty(IStatus.PROP_JAVAX_PROPERTY_PATH)) {
+ String path = (String) status
+ .getProperty(IStatus.PROP_JAVAX_PROPERTY_PATH);
+
+ // if path points to a collection, then remove all the
+ // collection stuff, since Vaadin can not focus rows
+ if (path.matches(".*\\[\\d*\\].*")) {
+ path = path.substring(0, path.indexOf("["));
+ }
+
+ // using a regex to find the yElement:
+ // "beanslot/.*/{propertyPath}"
+ YEmbeddable yElement = (YEmbeddable) viewContext
+ .findBoundField(String.format("%s.*/%s",
+ BindingIdUtil.BEANSLOT, path));
+ if (yElement != null) {
+ status.putProperty(IStatus.PROP_FIELD_ID,
+ yElement.getId());
+ status.putProperty(IStatus.PROP_FIELD_I18N_KEY,
+ yElement.getLabelI18nKey());
+ }
+ }
+ }
+ }
+
+ // now update the field with the new Status instances
+ //
+ for (IStatus status : oldValidationResult) {
+ String fieldId = (String) status
+ .getProperty(IStatus.PROP_FIELD_ID);
+ if (fieldId != null && !fieldId.trim().equals("")) {
+ YField yField = (YField) viewContext
+ .findModelElement(fieldId);
+ IFieldEditpart editpart = ModelUtil.findEditpart(yField);
+ if (editpart != null) {
+ editpart.removeExternalStatus(status);
+ }
+ }
+ }
+
+ for (IStatus status : validationResult) {
+ String fieldId = (String) status
+ .getProperty(IStatus.PROP_FIELD_ID);
+ if (fieldId != null && !fieldId.trim().equals("")) {
+ YField yField = (YField) viewContext
+ .findModelElement(fieldId);
+ IFieldEditpart editpart = ModelUtil.findEditpart(yField);
+ if (editpart != null) {
+ editpart.addExternalStatus(status);
+ }
+ }
+ }
+
+ statusManager.getScopeFor(mPart).modifyStatus(oldValidationResult,
+ validationResult);
+
+ notifyExternalClicked(toExposedAction(commandId));
+
+ applyValidationResult();
+ }
+ }
+
+ /**
+ * Apply the validation result to the view.
+ */
+ protected void applyValidationResult() {
+ // set the validation result
+ viewContext.setBean(BEAN_SLOT__VALIDATION_ERROR, Boolean.FALSE);
+ for (IStatus status : statusManager.getScopeFor(mPart).getAllStatus()) {
+ if (status.isError()) {
+ viewContext.setBean(BEAN_SLOT__VALIDATION_ERROR, Boolean.TRUE);
+ break;
+ }
+ }
+ }
+
+ /**
+ * Gets the enabled state.
+ *
+ * @param commandId
+ * the command id
+ * @return the enabled state
+ */
+ @EnabledState
+ public boolean getEnabledState(@Named("commandId") String commandId) {
+ CommandInfo info = findCommandInfo(commandId);
+ if (info == null) {
+ return true;
+ }
+ return info.enabled;
+ }
+
+ /**
+ * Delete.
+ *
+ * @param commandId
+ * the command id
+ */
+ @Delete
+ public void delete(@Named("commandId") final String commandId) {
+ final Object mainDto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);
+ if (mainDto != null) {
+ AcceptDeleteDialog.showDialog(i18nService, resourceProvider,
+ new Runnable() {
+ @Override
+ public void run() {
+ new SharedStateUnitOfWork<Object>() {
+ @Override
+ protected Object doExecute() {
+ boolean processed = false;
+ try {
+ try {
+ dtoService.delete(mainDto);
+ // in case of exception, it is not
+ // changed
+ processed = true;
+ } catch (DtoServiceException e) {
+ // catch exception, show message and
+ // return
+ Notification.show("",
+ e.getMessage(),
+ Type.ERROR_MESSAGE);
+ }
+ } finally {
+ if (processed) {
+ notifyExecuted(toExposedAction(commandId));
+ } else {
+ notifyCanceled(toExposedAction(commandId));
+ }
+ }
+ return null;
+ }
+ }.execute(sharedState);
+ }
+ }, new ActionCanceledAdapter(toExposedAction(commandId)));
+ } else {
+ notifyCanceled(toExposedAction(commandId));
+ }
+ }
+
+ /**
+ * Notifies the action about cancel.
+ *
+ * @param yAction
+ * the y action
+ */
+ protected void notifyCanceled(final YExposedAction yAction) {
+ ActionCanceledAdapter.notify(yAction);
+ }
+
+ /**
+ * Notifies the action about executed.
+ *
+ * @param yAction
+ * the y action
+ */
+ protected void notifyExecuted(final YExposedAction yAction) {
+ ActionExecutedAdapter.notify(yAction);
+ }
+
+ /**
+ * Notifies the action about external clicked.
+ *
+ * @param yAction
+ * the y action
+ */
+ protected void notifyExternalClicked(final YExposedAction yAction) {
+ ActionExternalClickedAdapter.notify(yAction);
+ }
+
+ /**
+ * Reload.
+ *
+ * @param commandId
+ * the command id
+ */
+ @Load
+ public void reload(@Named("commandId") final String commandId) {
+ final Object mainDto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);
+ if (mainDto != null) {
+ boolean isDirty = false;
+ try {
+ isDirty = DtoUtils.isDirty(mainDto);
+ } catch (IllegalAccessException e) {
+ // nothing to do
+ }
+
+ // if there is no dirty indicator, or the record is not dirty,
+ // reload the data
+ if (!isDirty) {
+ new SharedStateUnitOfWork<Object>() {
+ @Override
+ protected Object doExecute() {
+ boolean processed = false;
+ try {
+ dtoService.reload(mainDto);
+ // in case of exception, it is not changed
+ processed = true;
+ } finally {
+ if (processed) {
+ statusManager.getScopeFor(mPart).clearStatus();
+
+ notifyExecuted(toExposedAction(commandId));
+ } else {
+ notifyCanceled(toExposedAction(commandId));
+ }
+ }
+ return null;
+ }
+ }.execute(sharedState);
+ } else {
+ AcceptReloadDialog.showDialog(
+ i18nService,
+ resourceProvider,
+ new Runnable() {
+ @Override
+ public void run() {
+ new SharedStateUnitOfWork<Object>() {
+ @Override
+ protected Object doExecute() {
+ boolean processed = false;
+ try {
+ dtoService.reload(mainDto);
+ // in case of exception, it is not
+ // changed
+ processed = true;
+ } finally {
+ if (processed) {
+ statusManager
+ .getScopeFor(mPart)
+ .clearStatus();
+
+ notifyExecuted(toExposedAction(commandId));
+ } else {
+ notifyCanceled(toExposedAction(commandId));
+ }
+ }
+ return null;
+ }
+ }.execute(sharedState);
+ }
+ },
+ new ActionCanceledAdapter(toExposedAction(commandId)));
+ }
+ } else {
+ notifyCanceled(toExposedAction(commandId));
+ }
+ }
+
+ /**
+ * If a command was executed, the original actionId from the ECView view
+ * (YView) will be passed here.
+ *
+ * @param yAction
+ * the y action
+ */
+ @Callback
+ public void commandExecuted(YExposedAction yAction) {
+ if (yAction != null) {
+ // we are going to forward the execution of the action to the ecView
+ // exposed action
+ // final YExposedAction yAction = (YExposedAction) action;
+ yAction.setExternalClickTime(new Date().getTime());
+
+ // check if dto is dirty
+ //
+ boolean isDirty = false;
+ final Object mainDto = viewContext
+ .getBean(IViewContext.MAIN_BEAN_SLOT);
+ if (mainDto != null) {
+ try {
+ isDirty = DtoUtils.isDirty(mainDto);
+ } catch (IllegalAccessException e) {
+ // nothing to do -> if there is not dirty flag, we ignore
+ // this
+ }
+ }
+
+ // to notify about executed or canceled state, first check if the
+ // state is dirty
+ if (isDirty && yAction.isCheckDirty()) {
+ // show accept dialog
+ AcceptLoosingDataDialog.showDialog(i18nService,
+ resourceProvider, new ActionExecutedAdapter(yAction),
+ new ActionCanceledAdapter(yAction));
+ } else {
+ notifyExecuted(yAction);
+ }
+ }
+ }
+
+ /**
+ * Prepares the toolbar for the view.
+ *
+ * @param yView
+ * the y view
+ */
+ private void preparePartToolbar(YView yView) {
+ MToolBar mToolbar = mPart.getToolbar();
+ clearToolbar(mToolbar);
+
+ for (YExposedAction yAction : yView.getExposedActions()) {
+
+ // register the exposed actions callback to handle enabled state
+ yAction.eAdapters().add(exposedActionsCallback);
+
+ MHandledToolItem toolItem = null;
+ if (yAction.getExternalCommandId() == null) {
+ toolItem = createToolItem(yAction,
+ IE4Constants.COMMAND_DEFAULT_PART_CALLBACK,
+ yAction.isInitialEnabled());
+ } else if (yAction.getExternalCommandId() != null) {
+ toolItem = createToolItem(yAction,
+ yAction.getExternalCommandId(),
+ yAction.isInitialEnabled());
+ }
+
+ if (toolItem != null) {
+ mToolbar.getChildren().add(toolItem);
+ // set default after rendering
+ toolItem.setEnabled(yAction.isInitialEnabled());
+ }
+ }
+ }
+
+ /**
+ * Clear toolbar.
+ *
+ * @param mToolbar
+ * the m toolbar
+ */
+ protected void clearToolbar(MToolBar mToolbar) {
+ // bug in Vaaclipse -> Iterate to remove all
+ for (Iterator<MToolBarElement> iterator = mToolbar.getChildren()
+ .iterator(); iterator.hasNext();) {
+ iterator.next();
+ iterator.remove();
+ }
+ }
+
+ /**
+ * Creates handled tool items for the given exposed action and the
+ * commandId.
+ *
+ * @param yAction
+ * the y action
+ * @param commandId
+ * the command id
+ * @param initialEnabled
+ * the initial enabled
+ * @return the m handled tool item
+ */
+ private MHandledToolItem createToolItem(YExposedAction yAction,
+ String commandId, boolean initialEnabled) {
+ MCommand command = findCommand(mPart, commandId);
+ if (command == null) {
+ LOGGER.error("No action created for " + yAction.getId()
+ + " since command missing: " + commandId);
+ return null;
+ }
+
+ MHandledToolItem toolItem = MMenuFactory.INSTANCE
+ .createHandledToolItem();
+ toolItem.setCommand(command);
+
+ String keyBinding = keyBindingService.getKeyBindingString(mPart,
+ commandId);
+ String tooltip = i18nService.getValue(yAction.getLabelI18nKey(),
+ Locale.getDefault());
+ toolItem.setTooltip(tooltip + " " + keyBinding);
+ toolItem.setIconURI(i18nService.getValue(yAction.getIcon(),
+ Locale.getDefault()));
+ toolItem.setVisible(true);
+ toolItem.setToBeRendered(true);
+
+ commandInfo.put(commandId, new CommandInfo(yAction, toolItem,
+ initialEnabled, commandId));
+
+ return toolItem;
+ }
+
+ /**
+ * Tries to find the command with the specified id.
+ *
+ * @param mPart
+ * the m part
+ * @param id
+ * the id
+ * @return the m command
+ */
+ private MCommand findCommand(MPart mPart, String id) {
+ EModelService modelService = eclipseContext.get(EModelService.class);
+ List<MCommand> commands = modelService.findElements(
+ eclipseContext.get(MApplication.class), id, MCommand.class,
+ Collections.<String> emptyList());
+ MCommand command = null;
+ if (commands.size() > 0) {
+ command = commands.get(0);
+ }
+ return command;
+ }
+
+ /**
+ * Dispose.
+ */
+ @PreDestroy
+ public void dispose() {
+ try {
+ if (redirectedEventtopics != null) {
+ redirectedEventtopics.clear();
+ redirectedEventtopics = null;
+ }
+
+ exposedActionsCallback = null;
+
+ if (eventHandlers != null) {
+ for (EventHandler handler : eventHandlers) {
+ e4EventBroker.unsubscribe(handler);
+
+ }
+ eventHandlers.clear();
+ eventHandlers = null;
+ }
+
+ if (viewContext != null) {
+ viewContext.dispose();
+ }
+
+ if (ecviewFieldValidationManager != null) {
+ ecviewFieldValidationManager.dispose();
+ ecviewFieldValidationManager.removeListener(this);
+ ecviewFieldValidationManager = null;
+ }
+
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ /**
+ * Dispatches events from the event broker to the proper bean slots.
+ *
+ * @param event
+ * the event
+ */
+ protected void dispatchEventBrokerEvent(final Event event) {
+ if (redirectedEventtopics == null) {
+ return;
+ }
+ final String eventTopic = topicNormalizer.unwrapTopic(event.getTopic());
+ if (!redirectedEventtopics.containsKey(eventTopic)) {
+ return;
+ }
+
+ final Object newBean = event.getProperty(IEventBroker.DATA);
+
+ // create a runnable processing the set operations
+ Runnable doRunnable = new Runnable() {
+ @Override
+ public void run() {
+
+ resetStatus();
+
+ for (YBeanSlot yBeanSlot : redirectedEventtopics
+ .get(eventTopic)) {
+ final ISlot slot = viewContext.getBeanSlot(yBeanSlot
+ .getName());
+
+ // TODO workaround for databinding -> New instance may be
+ // polymorphic brother of the current instance. And if
+ // binding
+ // the new instance, numeric field will not become unbound.
+ // So
+ // lets set a new instance of current set instance before
+ // setting the new entry.
+ Object oldValue = slot.getValue();
+ if (oldValue != null) {
+ Class<?> valueClass = oldValue.getClass();
+ try {
+ // now all fields will become unbound from the
+ // current
+ // instance
+ slot.setValue(valueClass.newInstance());
+ } catch (Exception e) {
+ LOGGER.warn("Could not reset the value by {}",
+ valueClass.getName());
+ }
+ }
+
+ slot.setValue(newBean);
+ }
+ }
+ };
+
+ if (isBeanslotDirty(eventTopic, newBean)) {
+ // show an accept loosing data dialog
+ AcceptLoosingDataDialog.showDialog(i18nService, resourceProvider,
+ doRunnable, null);
+ } else {
+ doRunnable.run();
+ }
+
+ }
+
+ /**
+ * Returns true, if one of the bean slots addressed by the eventTopic is
+ * dirty.
+ *
+ * @param eventTopic
+ * the event topic
+ * @param newBean
+ * the new bean
+ * @return true, if is beanslot dirty
+ */
+ protected boolean isBeanslotDirty(String eventTopic, Object newBean) {
+ boolean dirty = false;
+ for (YBeanSlot yBeanSlot : redirectedEventtopics.get(eventTopic)) {
+ final ISlot slot = viewContext.getBeanSlot(yBeanSlot.getName());
+ Object currentBean = slot.getValue();
+ if (currentBean != null && currentBean != newBean) {
+ try {
+ dirty = DtoUtils.isDirty(currentBean);
+ if (dirty) {
+ // dirty found and leave
+ break;
+ }
+ } catch (IllegalAccessException e) {
+ // if there is no dirty flag, we just ignore it
+ }
+ }
+ }
+ return dirty;
+ }
+
+ /**
+ * Resets the status in the status manager.
+ */
+ protected void resetStatus() {
+ statusManager.getScopeFor(mPart).clearStatus();
+ }
+
+ /**
+ * Forwards the enabled state to the e4 tool item.
+ */
+ private class ExposedActionsCallback extends AdapterImpl {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void notifyChanged(org.eclipse.emf.common.notify.Notification msg) {
+ if (msg.getEventType() == org.eclipse.emf.common.notify.Notification.SET) {
+ if (msg.getFeature() == CoreModelPackage.Literals.YENABLE__ENABLED) {
+ YExposedAction yAction = (YExposedAction) msg.getNotifier();
+ CommandInfo info = findCommandInfo(yAction);
+ if (info != null) {
+ boolean newEnabled = msg.getNewBooleanValue();
+ info.toolItem.setEnabled(newEnabled);
+ info.enabled = newEnabled;
+ }
+ } else if (msg.getFeature() == CoreModelPackage.Literals.YEXPOSED_ACTION__INTERNAL_CLICK_TIME) {
+ YExposedAction yAction = (YExposedAction) msg.getNotifier();
+ CommandInfo info = findCommandInfo(yAction);
+ if (info != null) {
+ MHandledToolItem handledItem = (MHandledToolItem) info.toolItem;
+ IPartItemExecutionService service = mPart.getContext()
+ .get(IPartItemExecutionService.class);
+ if (service != null
+ && service.canExecuteItem(handledItem)) {
+ // notify the exposed action about the external
+ // click
+ yAction.setExternalClickTime(new Date().getTime());
+ service.executeItem(handledItem);
+ } else {
+ // notify the action about the cancel
+ ActionCanceledAdapter.notify(yAction);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Notifies the action about a cancel.
+ */
+ private static class ActionCanceledAdapter implements Runnable {
+
+ /** The action. */
+ private final YExposedAction action;
+
+ /**
+ * Notify.
+ *
+ * @param action
+ * the action
+ */
+ public static void notify(YExposedAction action) {
+ action.setCanceledNotificationTime(new Date().getTime());
+ }
+
+ /**
+ * Instantiates a new action canceled adapter.
+ *
+ * @param action
+ * the action
+ */
+ public ActionCanceledAdapter(YExposedAction action) {
+ super();
+ this.action = action;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ @Override
+ public void run() {
+ notify(action);
+ }
+ }
+
+ /**
+ * Notifies the action about their proper execution.
+ */
+ private static class ActionExecutedAdapter implements Runnable {
+
+ /** The action. */
+ private final YExposedAction action;
+
+ /**
+ * Notify.
+ *
+ * @param action
+ * the action
+ */
+ public static void notify(YExposedAction action) {
+ action.setExecutedNotificationTime(new Date().getTime());
+ }
+
+ /**
+ * Instantiates a new action executed adapter.
+ *
+ * @param action
+ * the action
+ */
+ public ActionExecutedAdapter(YExposedAction action) {
+ super();
+ this.action = action;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ @Override
+ public void run() {
+ notify(action);
+ }
+ }
+
+ /**
+ * Notifies the action about the external click.
+ */
+ private static class ActionExternalClickedAdapter implements Runnable {
+
+ /** The action. */
+ private final YExposedAction action;
+
+ /**
+ * Notify.
+ *
+ * @param action
+ * the action
+ */
+ public static void notify(YExposedAction action) {
+ action.setExternalClickTime(new Date().getTime());
+ }
+
+ /**
+ * Instantiates a new action external clicked adapter.
+ *
+ * @param action
+ * the action
+ */
+ @SuppressWarnings("unused")
+ public ActionExternalClickedAdapter(YExposedAction action) {
+ super();
+ this.action = action;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ @Override
+ public void run() {
+ notify(action);
+ }
+ }
+
+ /**
+ * A pojo to keep related objects together. Will be used by the
+ * GenericECViewPart and also by handlers to determine enabled state.
+ */
+ private static class CommandInfo {
+
+ /** The action. */
+ private YExposedAction action;
+
+ /** The tool item. */
+ private MToolItem toolItem;
+
+ /** The enabled. */
+ // is used to return the enabled state for a request from handler
+ private boolean enabled;
+
+ /** The command id. */
+ private String commandId;
+
+ /**
+ * Instantiates a new command info.
+ *
+ * @param action
+ * the action
+ * @param toolItem
+ * the tool item
+ * @param enabled
+ * the enabled
+ * @param commandId
+ * the command id
+ */
+ public CommandInfo(YExposedAction action, MToolItem toolItem,
+ boolean enabled, String commandId) {
+ super();
+ this.action = action;
+ this.toolItem = toolItem;
+ this.enabled = enabled;
+ this.commandId = commandId;
+ }
+
+ }
+
+ /**
+ * Returns the command info for the given action.
+ *
+ * @param yAction
+ * the y action
+ * @return the command info
+ */
+ protected CommandInfo findCommandInfo(final YExposedAction yAction) {
+ try {
+ return commandInfo.values().stream()
+ .filter(e -> e.action == yAction).findFirst().get();
+ } catch (NoSuchElementException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Returns the command info for the given toolItem.
+ *
+ * @param toolItem
+ * the tool item
+ * @return the command info
+ */
+ protected CommandInfo findCommandInfo(MToolBarElement toolItem) {
+ try {
+ return commandInfo.values().stream()
+ .filter(e -> e.toolItem == toolItem).findFirst().get();
+ } catch (NoSuchElementException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Returns the command info for the given commandId.
+ *
+ * @param commandId
+ * the command id
+ * @return the command info
+ */
+ protected CommandInfo findCommandInfo(final String commandId) {
+ return commandInfo.get(commandId);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.feature/.project b/org.eclipse.osbp.vaaclipse.addons.feature/.project
new file mode 100644
index 0000000..30c0ffe
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.feature</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.vaaclipse.addons.feature/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.feature/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/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.vaaclipse.addons.feature/build.properties b/org.eclipse.osbp.vaaclipse.addons.feature/build.properties
new file mode 100644
index 0000000..b8920ff
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes = license.html, epl-v10.html, feature.xml,\
+ feature.properties
diff --git a/org.eclipse.osbp.vaaclipse.addons.feature/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.feature/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/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.vaaclipse.addons.feature/feature.properties b/org.eclipse.osbp.vaaclipse.addons.feature/feature.properties
new file mode 100644
index 0000000..fac0bf3
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/feature.properties
@@ -0,0 +1,169 @@
+###############################################################################
+# Copyright (c) 2012, 2015 - Florian Pirchner (Austria), Loetz GmbH&Co.KG and others
+# 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 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 = OSBP :: Vaaclipse Addons feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse OSBP
+
+# "description" property - description of the feature
+description= .
+
+# "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.vaaclipse.addons.feature/feature.xml b/org.eclipse.osbp.vaaclipse.addons.feature/feature.xml
new file mode 100644
index 0000000..4a1e890
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/feature.xml
@@ -0,0 +1,88 @@
+<?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.vaaclipse.addons.feature"
+ 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.vaaclipse.addons.app"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.vaaclipse.addons.application"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.vaaclipse.addons.common"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.vaaclipse.addons.ecview"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.vaaclipse.addons.ecview.lib"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.vaaclipse.addons.perspective"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.vaaclipse.addons.keybinding"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osbp.vaaclipse.addons.problems"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/org.eclipse.osbp.vaaclipse.addons.feature/license.html b/org.eclipse.osbp.vaaclipse.addons.feature/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/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.vaaclipse.addons.feature/pom.xml b/org.eclipse.osbp.vaaclipse.addons.feature/pom.xml
new file mode 100644
index 0000000..9174201
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.feature</artifactId>
+ <description>Feature for Vaaclipse Addons</description>
+ <packaging>eclipse-feature</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <labelSuffix> (source)</labelSuffix>
+ </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.vaaclipse.addons.feature/src/main/javadoc/README.txt b/org.eclipse.osbp.vaaclipse.addons.feature/src/main/javadoc/README.txt
new file mode 100644
index 0000000..831da7e
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/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.vaaclipse.addons.feature/src/overview.html b/org.eclipse.osbp.vaaclipse.addons.feature/src/overview.html
new file mode 100644
index 0000000..080047a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/src/overview.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>OSBP Tools Graphical Entity</title>
+</head>
+<body>
+<p>The <strong>OSBP Vaaclipse Addons</strong> provide ,,,.</p>
+
+<p> </p>
+
+<p> </p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/.checkstyle b/org.eclipse.osbp.vaaclipse.addons.keybinding/.checkstyle
new file mode 100644
index 0000000..2f2667a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.checkstyle
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <fileset name="all" enabled="true" check-config-name="emfstoreStyle" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/.project b/org.eclipse.osbp.vaaclipse.addons.keybinding/.project
new file mode 100644
index 0000000..6deb2d2
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.project
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.keybinding</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>com.vaadin.integration.eclipse.addonStylesBuilder</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.vaaclipse.addons.keybinding/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.keybinding/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/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.vaaclipse.addons.keybinding/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.keybinding/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..72aefbc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/META-INF/MANIFEST.MF
@@ -0,0 +1,40 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.keybinding
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.keybinding;singleton:=true
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject,
+ org.eclipse.osgi.util;version="[1.1.0,1.2.0)",
+ org.osgi.framework;version="1.8.0",
+ org.osgi.service.component.annotations;version="1.2.0",
+ org.osgi.service.event;version="1.3.0",
+ org.slf4j
+Bundle-ActivationPolicy: lazy
+Require-Bundle: com.vaadin.server;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.4.0)",
+ org.eclipse.osbp.vaaclipse.addons.common.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.core.services;bundle-version="[1.2.1,1.3.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.osbp.runtime.web.vaadin.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.equinox.registry,
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.2,1.3.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.equinox.preferences,
+ org.eclipse.osbp.vaaclipse.publicapi;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.emf.ecore;bundle-version="2.10.2",
+ org.eclipse.emf.ecore.xmi;bundle-version="2.10.2",
+ org.eclipse.osbp.vaaclipse.addons.application;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.web.vaadin.components;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.ecview.core.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.core.commands,
+ org.eclipse.e4.core.commands;bundle-version="0.10.2"
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.keybinding.PerspectiveRegistryContextFunction.xml
+OSBP-ECView-I18nProvider:
+Export-Package: org.eclipse.osbp.vaaclipse.addons.keybinding;version="0.9.0",
+ org.eclipse.osbp.vaaclipse.addons.keybinding.view;x-internal:=true;version="0.9.0"
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/about.html b/org.eclipse.osbp.vaaclipse.addons.keybinding/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/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.vaaclipse.addons.keybinding/about.ini b/org.eclipse.osbp.vaaclipse.addons.keybinding/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/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.vaaclipse.addons.keybinding/about.mappings b/org.eclipse.osbp.vaaclipse.addons.keybinding/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/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.vaaclipse.addons.keybinding/about.properties b/org.eclipse.osbp.vaaclipse.addons.keybinding/about.properties
new file mode 100644
index 0000000..d9b6314
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/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.vaaclipse.addons.keybinding
+
+################ 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.vaaclipse.addons.keybinding/build.properties b/org.eclipse.osbp.vaaclipse.addons.keybinding/build.properties
new file mode 100644
index 0000000..4739dc7
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/build.properties
@@ -0,0 +1,14 @@
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ .classpath,\
+ .project,\
+ .settings/,\
+ LICENSE.txt,\
+ epl-v10.html,\
+ license.html,\
+ pom.xml,\
+ plugin.xml,\
+ fragment.e4xmi_template,\
+ i18n/
+output.. = target/classes/
+source.. = src/
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.keybinding/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/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.vaaclipse.addons.keybinding/fragment.e4xmi_template b/org.eclipse.osbp.vaaclipse.addons.keybinding/fragment.e4xmi_template
new file mode 100644
index 0000000..d847b77
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/fragment.e4xmi_template
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ASCII"?>
+<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/descriptor/basic" xmlns:basic_1="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_MNDvwMWxEeSzw8CCZBgGfQ">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_jVnlMFLnEeW2s7PYwBkfNg" featurename="descriptors" parentElementId="org.lunifera.vaaclipse.addons.application">
+ <elements xsi:type="basic:PartDescriptor" xmi:id="_jVnlMVLnEeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.problems.partdescriptor.keybinding" label="Keybinding view" iconURI="" tooltip="Keybinding view" category="org.lunifera.vaaclipse.addons.application.partstack.bottom" closeable="true" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.keybinding/org.lunifera.vaaclipse.addons.keybinding.view.KeybindingView">
+ <tags>View</tags>
+ <toolbar xmi:id="_jVnlMlLnEeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.problems.toolbar.0"/>
+ </elements>
+ </fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_jzhCIFLnEeW2s7PYwBkfNg" featurename="sharedElements" parentElementId="mainWindow">
+ <elements xsi:type="basic_1:Part" xmi:id="_jzhCIVLnEeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.problems.partdescriptor.keybinding" accessibilityPhrase="" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.keybinding/org.lunifera.vaaclipse.addons.keybinding.view.KeybindingView" label="Keybinding" iconURI="" tooltip="Keybinding" closeable="true">
+ <toolbar xmi:id="_jzhCIlLnEeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.problems.toolbar.1"/>
+ </elements>
+ </fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_RL4XoFLyEeW2s7PYwBkfNg" featurename="addons" parentElementId="org.lunifera.vaaclipse.addons.application">
+ <elements xsi:type="application:Addon" xmi:id="_Y1ud4FLyEeW2s7PYwBkfNg" elementId="org.lunifera.vaaclipse.addons.keybinding.addon.0" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.keybinding/org.lunifera.vaaclipse.addons.keybinding.KeyBindingServiceAddon"/>
+ </fragments>
+</fragment:ModelFragments>
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/i18n/i18n.properties b/org.eclipse.osbp.vaaclipse.addons.keybinding/i18n/i18n.properties
new file mode 100644
index 0000000..4b55aa3
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/i18n/i18n.properties
@@ -0,0 +1,7 @@
+# Keybinding View
+org.eclipse.osbp.vaaclipse.addons.keybinding.view.KeybindingView.name=Name
+org.eclipse.osbp.vaaclipse.addons.keybinding.view.KeybindingView.description=Description
+org.eclipse.osbp.vaaclipse.addons.keybinding.view.KeybindingView.category=Category
+org.eclipse.osbp.vaaclipse.addons.keybinding.view.KeybindingView.keySequence=Shortcut
+org.eclipse.osbp.vaaclipse.addons.keybinding.view.KeybindingView.contextDescription=Context Description
+org.eclipse.osbp.vaaclipse.addons.keybinding.view.KeybindingView.contextName=Context Name
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/license.html b/org.eclipse.osbp.vaaclipse.addons.keybinding/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/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.vaaclipse.addons.keybinding/plugin.xml b/org.eclipse.osbp.vaaclipse.addons.keybinding/plugin.xml
new file mode 100644
index 0000000..d339569
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+ <!-- <extension
+ id="org.eclipse.osbp.vaaclipse.addons.keybinding"
+ point="org.eclipse.e4.workbench.model">
+ <fragment
+ apply="notexists"
+ uri="fragment.e4xmi">
+ </fragment>
+ </extension> -->
+</plugin>
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/pom.xml b/org.eclipse.osbp.vaaclipse.addons.keybinding/pom.xml
new file mode 100644
index 0000000..233a3ad
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.keybinding</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/CommandKeyStrokeCallback.java b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/CommandKeyStrokeCallback.java
new file mode 100644
index 0000000..8b07028
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/CommandKeyStrokeCallback.java
@@ -0,0 +1,109 @@
+/**
+ * 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.vaaclipse.addons.keybinding;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.e4.core.commands.ECommandService;
+import org.eclipse.e4.core.commands.EHandlerService;
+import org.eclipse.e4.ui.model.application.commands.MCommand;
+import org.eclipse.e4.ui.model.application.commands.MCommandParameter;
+import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.osbp.runtime.common.keystroke.KeyStrokeCallback;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.ui.Component;
+
+/**
+ * The Class CommandKeyStrokeCallback.
+ */
+@SuppressWarnings("restriction")
+public class CommandKeyStrokeCallback implements KeyStrokeCallback {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(CommandKeyStrokeCallback.class);
+
+ /** The command service. */
+ private ECommandService commandService;
+
+ /** The handler service. */
+ private EHandlerService handlerService;
+
+ /** The m key binding. */
+ private MKeyBinding mKeyBinding;
+
+ /** The m part. */
+ @SuppressWarnings("unused")
+ private MPart mPart;
+
+ /**
+ * Instantiates a new command key stroke callback.
+ *
+ * @param mKeyBinding
+ * the m key binding
+ * @param mPart
+ * the m part
+ * @param commandService
+ * the command service
+ * @param handlerService
+ * the handler service
+ */
+ public CommandKeyStrokeCallback(MKeyBinding mKeyBinding, MPart mPart,
+ ECommandService commandService, EHandlerService handlerService) {
+ super();
+ this.mKeyBinding = mKeyBinding;
+ this.mPart = mPart;
+ this.commandService = commandService;
+ this.handlerService = handlerService;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.common.keystroke.KeyStrokeCallback#callback(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void callback(Object source, Object target) {
+ Component sourceComponent = (Component) source;
+ Component targetComponent = (Component) target;
+
+ MCommand mCommand = mKeyBinding.getCommand();
+ if (mCommand != null) {
+ Command command = commandService
+ .getCommand(mCommand.getElementId());
+ if (command != null) {
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ for(MCommandParameter param : mCommand.getParameters()) {
+ if(param.getName().equals(IE4Constants.KEYSTROKE_SOURCE)) {
+ parameters.put(IE4Constants.KEYSTROKE_SOURCE, sourceComponent
+ .getId() != null ? sourceComponent.getId() : "");
+ } else if(param.getName().equals(IE4Constants.KEYSTROKE_TARGET)) {
+ parameters.put(IE4Constants.KEYSTROKE_TARGET, targetComponent
+ .getId() != null ? targetComponent.getId() : "");
+ }
+ }
+
+ ParameterizedCommand paramCommand = ParameterizedCommand
+ .generateCommand(command, parameters);
+ if (paramCommand != null) {
+ handlerService.executeHandler(paramCommand);
+ } else {
+ LOGGER.error("Can not execute command " + command.getId());
+ }
+ }
+ }
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/IKeyBindingService.java b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/IKeyBindingService.java
new file mode 100644
index 0000000..de87cdf
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/IKeyBindingService.java
@@ -0,0 +1,48 @@
+/**
+ * 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.vaaclipse.addons.keybinding;
+
+import java.util.List;
+
+import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+
+/**
+ * The Interface IKeyBindingService.
+ */
+public interface IKeyBindingService {
+
+ /** The Constant DEFAULT_CONTEXT. */
+ public static final String DEFAULT_CONTEXT = "org.eclipse.osbp.vaaclipse.addons.contexts.dialogAndWindow";
+
+ /** The Constant LUNIFERA_KEY_BINDINGS. */
+ public static final String LUNIFERA_KEY_BINDINGS = "osbp.keyBindings";
+
+ /**
+ * Returns the key binding String like "CTRL+S" for the given mPart and the
+ * commandId.
+ *
+ * @param mPart
+ * the m part
+ * @param commandId
+ * the command id
+ * @return the key binding string
+ */
+ String getKeyBindingString(MPart mPart, String commandId);
+
+ /**
+ * Returns all key bindings for the application model.
+ *
+ * @return the all key bindings
+ */
+ List<MKeyBinding> getAllKeyBindings();
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/KeyBindingServiceAddon.java b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/KeyBindingServiceAddon.java
new file mode 100644
index 0000000..cb9c593
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/KeyBindingServiceAddon.java
@@ -0,0 +1,45 @@
+/**
+ * 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.vaaclipse.addons.keybinding;
+
+import javax.annotation.PostConstruct;
+
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.osbp.runtime.web.vaadin.common.shortcuts.ShortcutManager;
+
+/**
+ * The Class KeyBindingServiceAddon.
+ */
+public final class KeyBindingServiceAddon {
+
+ /**
+ * Inits the.
+ *
+ * @param context
+ * the context
+ */
+ @PostConstruct
+ public void init(IEclipseContext context) {
+
+ MApplication application = context.get(MApplication.class);
+ IEclipseContext appCtx = application.getContext();
+
+ // create the binding service eager
+ ShortcutManager manager = new ShortcutManager();
+ appCtx.set(ShortcutManager.class.getName(), manager);
+
+ IKeyBindingService service = ContextInjectionFactory.make(
+ KeyBindingServiceImpl.class, appCtx);
+ appCtx.set(IKeyBindingService.class.getName(), service);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/KeyBindingServiceImpl.java b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/KeyBindingServiceImpl.java
new file mode 100644
index 0000000..8d511e3
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/KeyBindingServiceImpl.java
@@ -0,0 +1,241 @@
+/**
+ * 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.vaaclipse.addons.keybinding;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.commands.ECommandService;
+import org.eclipse.e4.core.commands.EHandlerService;
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.MApplicationElement;
+import org.eclipse.e4.ui.model.application.commands.MBindingContext;
+import org.eclipse.e4.ui.model.application.commands.MBindingTable;
+import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.workbench.Selector;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osbp.runtime.common.keystroke.KeyCodeUtil;
+import org.eclipse.osbp.runtime.common.keystroke.KeyStrokeCallback;
+import org.eclipse.osbp.runtime.common.keystroke.KeyStrokeDefinition;
+import org.eclipse.osbp.runtime.web.vaadin.common.shortcuts.ShortcutHandler;
+import org.eclipse.osbp.runtime.web.vaadin.common.shortcuts.ShortcutManager;
+
+import com.vaadin.ui.Component;
+
+/**
+ * Is responsible to deal with keybindings for the active MPart.
+ */
+@SuppressWarnings("restriction")
+public class KeyBindingServiceImpl implements IKeyBindingService {
+
+ /** The m app. */
+ @Inject
+ private MApplication mApp;
+
+ /** The command service. */
+ @Inject
+ private ECommandService commandService;
+
+ /** The handler service. */
+ @Inject
+ private EHandlerService handlerService;
+
+ /** The model service. */
+ @Inject
+ private EModelService modelService;
+
+ /** The manager. */
+ @Inject
+ private ShortcutManager manager;
+
+ /**
+ * Activates all keybindings for the given mPart.
+ *
+ * @param mPart
+ * the m part
+ */
+ @SuppressWarnings("unchecked")
+ @Inject
+ public void activateBindings(@Active @Optional MPart mPart) {
+ if (mPart == null) {
+ return;
+ }
+
+ ensureKeybindingData(mPart);
+
+ Component component = (Component) mPart.getWidget();
+ if (!manager.isHandled(component)) {
+ List<MKeyBinding> partKeyBindings = (List<MKeyBinding>) mPart
+ .getTransientData().get(LUNIFERA_KEY_BINDINGS);
+ if (partKeyBindings != null) {
+ for (MKeyBinding binding : partKeyBindings) {
+ String sequence = binding.getKeySequence();
+ ShortcutHandler handler = new ShortcutHandler(
+ toKeyStrokeDefinition(sequence),
+ createCallback(binding, mPart), component);
+ manager.register(component, handler);
+ }
+ }
+ }
+ // at least, activate all key bindings
+ manager.activate(component);
+ }
+
+ /**
+ * Ensure keybinding data.
+ *
+ * @param mPart
+ * the m part
+ */
+ protected void ensureKeybindingData(MPart mPart) {
+ if (!mPart.getTransientData().containsKey(LUNIFERA_KEY_BINDINGS)) {
+ internalCollectData(mPart);
+ }
+ }
+
+ /**
+ * Creates a callback which executes the bound command.
+ *
+ * @param binding
+ * the binding
+ * @param mPart
+ * the m part
+ * @return the key stroke callback
+ */
+ private KeyStrokeCallback createCallback(MKeyBinding binding, MPart mPart) {
+ return new CommandKeyStrokeCallback(binding, mPart, commandService,
+ handlerService);
+ }
+
+ /**
+ * Parses the given sequence to a valid keystroke definition.
+ *
+ * @param sequence
+ * the sequence
+ * @return the key stroke definition
+ */
+ private KeyStrokeDefinition toKeyStrokeDefinition(String sequence) {
+ return KeyCodeUtil.parse(sequence);
+ }
+
+ /**
+ * Internal collect data.
+ *
+ * @param mPart
+ * the m part
+ */
+ private void internalCollectData(MPart mPart) {
+ List<MBindingContext> aContexts = mPart.getBindingContexts();
+ if (aContexts.isEmpty()) {
+ // use the default context
+ for (MBindingContext context : mApp.getRootContext()) {
+ if (context.getElementId().equals(DEFAULT_CONTEXT)) {
+ aContexts.add(context);
+ break;
+ }
+ }
+ }
+
+ List<MKeyBinding> partKeyBindings = new ArrayList<MKeyBinding>();
+ collectKeyBindings(aContexts, partKeyBindings);
+
+ // register all keybinding info at the part for later use
+ mPart.getTransientData().put(LUNIFERA_KEY_BINDINGS, partKeyBindings);
+ }
+
+ /**
+ * Collects all key bindings for the given part.
+ *
+ * @param contexts
+ * the contexts
+ * @param partKeyBindings
+ * the part key bindings
+ */
+ protected void collectKeyBindings(List<MBindingContext> contexts,
+ List<MKeyBinding> partKeyBindings) {
+ List<MBindingContext> superContexts = new ArrayList<MBindingContext>();
+ for (MBindingContext temp : contexts) {
+ EObject casted = (EObject) temp;
+ if (casted.eContainer() instanceof MBindingContext) {
+ superContexts.add((MBindingContext) casted.eContainer());
+ }
+
+ for (MBindingTable tempTable : mApp.getBindingTables()) {
+ if (tempTable.getBindingContext() == temp) {
+ partKeyBindings.addAll(tempTable.getBindings());
+ }
+ }
+ }
+
+ if (!superContexts.isEmpty()) {
+ collectKeyBindings(superContexts, partKeyBindings);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.keybinding.IKeyBindingService#getKeyBindingString(org.eclipse.e4.ui.model.application.ui.basic.MPart, java.lang.String)
+ */
+ @Override
+ public String getKeyBindingString(MPart mPart, String commandId) {
+ MKeyBinding result = findKeyBinding(mPart, commandId);
+ return result != null ? result.getKeySequence() : "";
+ }
+
+ /**
+ * Returns the keybinding for the given mPart and the commandId.
+ *
+ * @param mPart
+ * the m part
+ * @param commandId
+ * the command id
+ * @return the m key binding
+ */
+ @SuppressWarnings("unchecked")
+ protected MKeyBinding findKeyBinding(MPart mPart, String commandId) {
+ ensureKeybindingData(mPart);
+
+ MKeyBinding result = null;
+ List<MKeyBinding> partKeyBindings = (List<MKeyBinding>) mPart
+ .getTransientData().get(LUNIFERA_KEY_BINDINGS);
+ if (partKeyBindings != null) {
+ for (MKeyBinding binding : partKeyBindings) {
+ if (binding.getCommand() != null
+ && binding.getCommand().getElementId()
+ .equals(commandId)) {
+ result = binding;
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.addons.keybinding.IKeyBindingService#getAllKeyBindings()
+ */
+ @Override
+ public List<MKeyBinding> getAllKeyBindings() {
+ List<MKeyBinding> result = modelService.findElements(mApp,
+ MKeyBinding.class, EModelService.ANYWHERE, new Selector() {
+ @Override
+ public boolean select(MApplicationElement element) {
+ return true;
+ }
+ });
+ return result;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/view/KeybindingView.java b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/view/KeybindingView.java
new file mode 100644
index 0000000..23a8a83
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/src/org/eclipse/osbp/vaaclipse/addons/keybinding/view/KeybindingView.java
@@ -0,0 +1,336 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.keybinding.view;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.inject.Inject;
+
+import org.eclipse.core.commands.CommandManager;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.commands.MBindingContext;
+import org.eclipse.e4.ui.model.application.commands.MBindingTable;
+import org.eclipse.e4.ui.model.application.commands.MCommand;
+import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osbp.runtime.common.i18n.II18nService;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Topics;
+import org.eclipse.osbp.vaaclipse.addons.keybinding.IKeyBindingService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.data.Property;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.util.BeanItemContainer;
+import com.vaadin.event.ItemClickEvent;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * View that shows problems.
+ */
+public class KeybindingView {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(KeybindingView.class);
+
+ /** The parent. */
+ private final VerticalLayout parent;
+
+ /** The eclipse context. */
+ @SuppressWarnings("unused")
+ private final IEclipseContext eclipseContext;
+
+ /** The command manager. */
+ @Inject
+ private CommandManager commandManager;
+
+ /** The i18n service. */
+ @Inject
+ private II18nService i18nService;
+
+ /** The keybinding service. */
+ @Inject
+ private IKeyBindingService keybindingService;
+
+ /** The table. */
+ private Table table;
+
+ /** The container. */
+ private BeanItemContainer<BindingBean> container;
+
+ /**
+ * Instantiates a new keybinding view.
+ *
+ * @param parent
+ * the parent
+ * @param eclipseContext
+ * the eclipse context
+ * @param app
+ * the app
+ */
+ @Inject
+ public KeybindingView(VerticalLayout parent,
+ IEclipseContext eclipseContext, MApplication app) {
+ this.parent = parent;
+ this.eclipseContext = eclipseContext;
+ }
+
+ /**
+ * Inits the.
+ */
+ @SuppressWarnings("serial")
+ @PostConstruct
+ protected void init() {
+
+ table = new Table();
+ table.setSelectable(true);
+ table.setSizeFull();
+ parent.addComponent(table);
+
+ container = new BeanItemContainer<BindingBean>(BindingBean.class);
+ table.setContainerDataSource(container);
+
+ List<MKeyBinding> bindings = keybindingService.getAllKeyBindings();
+ for (MKeyBinding binding : bindings) {
+ container.addBean(new BindingBean(binding));
+ }
+
+ table.setVisibleColumns(new Object[] { "name", "description",
+ "keySequence", "category", "contextName", "contextDescription" });
+ table.setColumnCollapsingAllowed(true);
+ table.setColumnCollapsed("category", true);
+ table.setColumnCollapsed("contextDescription", true);
+
+ Locale locale = UI.getCurrent().getLocale();
+ table.setColumnHeader("name", toViewI18n("name", i18nService, locale));
+ table.setColumnHeader("description",
+ toViewI18n("description", i18nService, locale));
+ table.setColumnHeader("category",
+ toViewI18n("category", i18nService, locale));
+ table.setColumnHeader("keySequence",
+ toViewI18n("keySequence", i18nService, locale));
+ table.setColumnHeader("contextName",
+ toViewI18n("contextName", i18nService, locale));
+ table.setColumnHeader("contextDescription",
+ toViewI18n("contextDescription", i18nService, locale));
+
+ table.addItemClickListener(new ItemClickEvent.ItemClickListener() {
+ @Override
+ public void itemClick(ItemClickEvent event) {
+ if (event.isDoubleClick()) {
+ }
+ }
+ });
+
+ table.addValueChangeListener(new Property.ValueChangeListener() {
+ @Override
+ public void valueChange(ValueChangeEvent event) {
+ // showDetailMessage((StatusBean)
+ // event.getProperty().getValue());
+ }
+ });
+
+ // parent.setExpandRatio(table, 0.85f);
+
+ }
+
+ /**
+ * To view i18n.
+ *
+ * @param key
+ * the key
+ * @param i18nService
+ * the i18n service
+ * @param locale
+ * the locale
+ * @return the string
+ */
+ private static String toViewI18n(String key, II18nService i18nService,
+ Locale locale) {
+ String result = i18nService.getValue(
+ "org.eclipse.osbp.vaaclipse.addons.keybinding.view.KeybindingView."
+ + key, locale);
+ if (result == null || result.equals("")) {
+ return key;
+ }
+
+ return result;
+ }
+
+ /**
+ * To common i18n.
+ *
+ * @param key
+ * the key
+ * @param i18nService
+ * the i18n service
+ * @param locale
+ * the locale
+ * @return the string
+ */
+ @SuppressWarnings("unused")
+ private static String toCommonI18n(String key, II18nService i18nService,
+ Locale locale) {
+ if (key == null) {
+ return "";
+ }
+ String result = i18nService.getValue(key, locale);
+ if (result == null || result.equals("")) {
+ return key;
+ }
+
+ return result;
+ }
+
+ /**
+ * Creates an event to focus a field in a MPart.
+ *
+ * @param mPartId
+ * the m part id
+ * @param fieldId
+ * the field id
+ * @return the map
+ */
+ protected Map<String, Object> createFocusFieldEvent(String mPartId,
+ String fieldId) {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ properties.put(IE4Topics.PartEvents.PROP_MPART_ID, mPartId);
+ properties.put(IE4Topics.PartEvents.PROP_FIELD_ID, fieldId);
+ return properties;
+ }
+
+ /**
+ * Dispose.
+ */
+ @PreDestroy
+ protected void dispose() {
+ table = null;
+ container = null;
+ }
+
+ /**
+ * The Class BindingBean.
+ */
+ public static class BindingBean {
+
+ /** The binding. */
+ private MKeyBinding binding;
+
+ /** The binding table. */
+ private MBindingTable bindingTable;
+
+ /** The binding context. */
+ private MBindingContext bindingContext;
+
+ /** The command. */
+ private MCommand command;
+
+ /**
+ * Instantiates a new binding bean.
+ *
+ * @param binding
+ * the binding
+ */
+ public BindingBean(MKeyBinding binding) {
+ super();
+ this.binding = binding;
+ this.command = binding.getCommand();
+ this.bindingTable = (MBindingTable) ((EObject) binding)
+ .eContainer();
+ this.bindingContext = bindingTable.getBindingContext();
+ }
+
+ /**
+ * Gets the description.
+ *
+ * @return the description
+ * @throws NotDefinedException
+ * the not defined exception
+ */
+ public final String getDescription() throws NotDefinedException {
+ return command.getDescription();
+ }
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ * @throws NotDefinedException
+ * the not defined exception
+ */
+ public final String getName() throws NotDefinedException {
+ return command.getCommandName();
+ }
+
+ /**
+ * Gets the id.
+ *
+ * @return the id
+ */
+ public final String getId() {
+ return command.getElementId();
+ }
+
+ /**
+ * Gets the category.
+ *
+ * @return the category
+ * @throws NotDefinedException
+ * the not defined exception
+ */
+ public final String getCategory() throws NotDefinedException {
+ try {
+ return command.getCategory().getName();
+ } catch (Exception e) {
+ return "";
+ }
+ }
+
+ /**
+ * Gets the key sequence.
+ *
+ * @return the key sequence
+ */
+ public final String getKeySequence() {
+ return binding.getKeySequence();
+ }
+
+ /**
+ * Gets the context name.
+ *
+ * @return the context name
+ */
+ public final String getContextName() {
+ return bindingContext.getName();
+ }
+
+ /**
+ * Gets the context description.
+ *
+ * @return the context description
+ */
+ public final String getContextDescription() {
+ return bindingContext.getDescription();
+ }
+
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/.checkstyle b/org.eclipse.osbp.vaaclipse.addons.login/.checkstyle
new file mode 100644
index 0000000..2f2667a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.checkstyle
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <fileset name="all" enabled="true" check-config-name="emfstoreStyle" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/.project b/org.eclipse.osbp.vaaclipse.addons.login/.project
new file mode 100644
index 0000000..a0821a8
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.project
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.login</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.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.vaadin.integration.eclipse.addonStylesBuilder</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.vaaclipse.addons.login/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.login/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/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.vaaclipse.addons.login/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.login/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..01cf929
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/META-INF/MANIFEST.MF
@@ -0,0 +1,34 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.login
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.login;singleton:=true
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Require-Bundle: org.eclipse.core.databinding;bundle-version="1.4.1",
+ com.vaadin.server;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.4.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.e4.core.services;bundle-version="[1.2.1,1.3.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="[0.12.0,0.13.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.2,1.3.0)",
+ org.eclipse.osbp.vaaclipse.addons.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.addons.common.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.osbp.dsl.dto.lib;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.additions;bundle-version="[0.9.0,0.10.0)",
+ com.vaadin.shared;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.osbp.ecview.core.common;bundle-version="[0.9.0,0.10.0)",
+ javax.inject,
+ org.eclipse.osbp.vaaclipse.publicapi;bundle-version="[0.9.0,0.10.0)"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject;version="1.0.0",
+ org.osgi.framework;version="1.8.0",
+ org.osgi.service.event;version="1.3.0",
+ org.osgi.util.tracker;version="1.5.1",
+ org.slf4j
+Export-Package: org.eclipse.osbp.vaaclipse.addons.login;x-internal:=true;version="0.9.0"
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/about.html b/org.eclipse.osbp.vaaclipse.addons.login/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/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.vaaclipse.addons.login/about.ini b/org.eclipse.osbp.vaaclipse.addons.login/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/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.vaaclipse.addons.login/about.mappings b/org.eclipse.osbp.vaaclipse.addons.login/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/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.vaaclipse.addons.login/about.properties b/org.eclipse.osbp.vaaclipse.addons.login/about.properties
new file mode 100644
index 0000000..f091566
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/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.vaaclipse.addons.login
+
+################ 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.vaaclipse.addons.login/build.properties b/org.eclipse.osbp.vaaclipse.addons.login/build.properties
new file mode 100644
index 0000000..96d366a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/build.properties
@@ -0,0 +1,15 @@
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ LICENSE.txt,\
+ .classpath,\
+ .project,\
+ epl-v10.html,\
+ license.html,\
+ images/,\
+ .settings/,\
+ plugin.xml,\
+ i18n/,\
+ fragment.e4xmi_template,\
+ fragment.e4xmi_template
+output.. = target/classes
+source.. = src/
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.login/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/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.vaaclipse.addons.login/fragment.e4xmi_template b/org.eclipse.osbp.vaaclipse.addons.login/fragment.e4xmi_template
new file mode 100644
index 0000000..27c233c
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/fragment.e4xmi_template
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ASCII"?>
+<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_5XsuUHM-EeWbP6g-trZTVQ">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_HhsH0HM_EeWbP6g-trZTVQ" featurename="children" parentElementId="org.eclipse.osbp.vaaclipse.addons.application.help">
+ <elements xsi:type="menu:DirectMenuItem" xmi:id="_Ntm3gHM_EeWbP6g-trZTVQ" elementId="org.eclipse.osbp.vaaclipse.addons.login.directmenuitem.logout" label="Logout" contributionURI="bundleclass://org.eclipse.osbp.vaaclipse.addons.login/org.eclipse.osbp.vaaclipse.addons.login.LogoutHandler"/>
+ </fragments>
+</fragment:ModelFragments>
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/i18n/translations.properties b/org.eclipse.osbp.vaaclipse.addons.login/i18n/translations.properties
new file mode 100644
index 0000000..eea32ac
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/i18n/translations.properties
@@ -0,0 +1,11 @@
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.message=Message
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.fieldId=Field
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.partId=View
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.fieldName=Field
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.partName=View
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.bundleSymbolicName=Bundle
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.severity=Severity
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.detailmessage=Message
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.messagePath=Message Path
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.creatorClass=Creator Class
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.messageCode=Message Code
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/images/problems.png b/org.eclipse.osbp.vaaclipse.addons.login/images/problems.png
new file mode 100644
index 0000000..0194704
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/images/problems.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/images/showAllMessages.png b/org.eclipse.osbp.vaaclipse.addons.login/images/showAllMessages.png
new file mode 100644
index 0000000..0194704
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/images/showAllMessages.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/license.html b/org.eclipse.osbp.vaaclipse.addons.login/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/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.vaaclipse.addons.login/plugin.xml b/org.eclipse.osbp.vaaclipse.addons.login/plugin.xml
new file mode 100644
index 0000000..ef2bea6
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/plugin.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+
+
+</plugin>
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/pom.xml b/org.eclipse.osbp.vaaclipse.addons.login/pom.xml
new file mode 100644
index 0000000..2b155cb
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/pom.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.login</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/src/org/eclipse/osbp/vaaclipse/addons/login/AuthenticationProvider.java b/org.eclipse.osbp.vaaclipse.addons.login/src/org/eclipse/osbp/vaaclipse/addons/login/AuthenticationProvider.java
new file mode 100644
index 0000000..003fde5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/src/org/eclipse/osbp/vaaclipse/addons/login/AuthenticationProvider.java
@@ -0,0 +1,67 @@
+/**
+ *
+ * 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 implementation
+ *
+ */
+ package org.eclipse.osbp.vaaclipse.addons.login;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.osbp.vaaclipse.publicapi.authentication.AuthenticationConstants;
+import org.eclipse.osbp.vaaclipse.publicapi.authentication.IUser;
+
+import com.vaadin.ui.Button;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+
+public class AuthenticationProvider {
+
+ @Inject
+ private IEventBroker eventBroker;
+
+ private Window dialog;
+
+ private TextField userName;
+
+ @PostConstruct
+ public void setup() {
+ userName = new TextField("userName");
+ Button b = new Button("Login", e -> login());
+ VerticalLayout vl = new VerticalLayout(userName, b);
+ vl.setSpacing(true);
+ vl.setMargin(true);
+ dialog = new Window("Login", vl);
+
+ UI.getCurrent().addWindow(dialog);
+ dialog.center();
+ }
+
+ private void login() {
+ dialog.close();
+
+ eventBroker.send(AuthenticationConstants.Events.Authentication.name,
+ new User());
+ }
+
+ private class User implements IUser {
+
+ @Override
+ public String getUserName() {
+ return userName.getValue();
+ }
+
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/src/org/eclipse/osbp/vaaclipse/addons/login/LogoutHandler.java b/org.eclipse.osbp.vaaclipse.addons.login/src/org/eclipse/osbp/vaaclipse/addons/login/LogoutHandler.java
new file mode 100644
index 0000000..dc238c3
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/src/org/eclipse/osbp/vaaclipse/addons/login/LogoutHandler.java
@@ -0,0 +1,42 @@
+/**
+ *
+ * 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 implementation
+ *
+ */
+ package org.eclipse.osbp.vaaclipse.addons.login;
+
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.osbp.vaaclipse.publicapi.authentication.AuthenticationConstants;
+
+public class LogoutHandler {
+
+ @Inject
+ private IEventBroker eventBroker;
+
+ @Execute
+ public void execute() {
+ eventBroker.send(
+ AuthenticationConstants.Events.Authentication.PRE_LOGOUT,
+ new Object());
+ eventBroker.send(AuthenticationConstants.Events.Authentication.LOGOUT,
+ new Object());
+ }
+
+ @CanExecute
+ public boolean canExecute() {
+ return true;
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/.checkstyle b/org.eclipse.osbp.vaaclipse.addons.perspective/.checkstyle
new file mode 100644
index 0000000..2f2667a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/.checkstyle
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <fileset name="all" enabled="true" check-config-name="emfstoreStyle" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/.project b/org.eclipse.osbp.vaaclipse.addons.perspective/.project
new file mode 100644
index 0000000..a802c73
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/.project
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.perspective</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>com.vaadin.integration.eclipse.addonStylesBuilder</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.vaaclipse.addons.perspective/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.perspective/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/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.vaaclipse.addons.perspective/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.perspective/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e0e3c9a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/META-INF/MANIFEST.MF
@@ -0,0 +1,45 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.perspective
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.perspective;singleton:=true
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject,
+ org.eclipse.osgi.util;version="[1.1.0,1.2.0)",
+ org.osgi.framework;version="1.8.0",
+ org.osgi.service.component.annotations;version="1.2.0",
+ org.osgi.service.event;version="1.3.0",
+ org.slf4j
+Bundle-ActivationPolicy: lazy
+Require-Bundle: com.vaadin.server;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.4.0)",
+ org.eclipse.osbp.vaaclipse.addons.common.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.core.services;bundle-version="[1.2.1,1.3.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.osbp.runtime.web.vaadin.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.2,1.3.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.equinox.preferences,
+ org.eclipse.osbp.vaaclipse.publicapi;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.emf.ecore;bundle-version="2.10.2",
+ org.eclipse.emf.ecore.xmi;bundle-version="2.10.2",
+ org.eclipse.osbp.vaaclipse.addons.application;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.web.vaadin.components;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.ecview.core.common;bundle-version="[0.9.0,0.10.0)"
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
+OSBP-ECView-I18nProvider:
+Export-Package: org.eclipse.osbp.vaaclipse.addons.perspective.common;version="0.9.0",
+ org.eclipse.osbp.vaaclipse.addons.perspective.handler;version="0.9.0"
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
+Service-Component: OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory.xml b/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory.xml
new file mode 100644
index 0000000..fbda1bd
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.common.event.impl.SeparatedEventBrokerFactory"/>
+
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" type="String" value="org.eclipse.e4.core.services.events.IEventBroker"/>
+ <property name="service.ranking" type="Integer" value="10000"/>
+</scr:component>
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider.xml b/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider.xml
new file mode 100644
index 0000000..6371cfe
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.common.resource.ThemeResourceProvider"/>
+ <service>
+ <provide interface="org.eclipse.osbp.runtime.web.vaadin.common.resource.IResourceProvider"/>
+ </service>
+ <property name="service.ranking" type="Integer" value="1000"/>
+</scr:component>
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml b/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
new file mode 100644
index 0000000..0be8299
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/OSGI-INF/org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction">
+ <implementation class="org.eclipse.osbp.vaaclipse.addons.perspective.PerspectiveRegistryContextFunction"/>
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" value="org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/about.html b/org.eclipse.osbp.vaaclipse.addons.perspective/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/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.vaaclipse.addons.perspective/about.ini b/org.eclipse.osbp.vaaclipse.addons.perspective/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/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.vaaclipse.addons.perspective/about.mappings b/org.eclipse.osbp.vaaclipse.addons.perspective/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/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.vaaclipse.addons.perspective/about.properties b/org.eclipse.osbp.vaaclipse.addons.perspective/about.properties
new file mode 100644
index 0000000..fdf438d
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/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.vaaclipse.addons.perspective
+
+################ 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.vaaclipse.addons.perspective/build.properties b/org.eclipse.osbp.vaaclipse.addons.perspective/build.properties
new file mode 100644
index 0000000..84f6b29
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/build.properties
@@ -0,0 +1,16 @@
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ OSGI-INF/,\
+ .classpath,\
+ .project,\
+ .settings/,\
+ LICENSE.txt,\
+ epl-v10.html,\
+ license.html,\
+ pom.xml,\
+ plugin.xml,\
+ fragment.e4xmi_template,\
+ template/,\
+ i18n/
+output.. = target/classes/
+source.. = src/
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.perspective/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/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.vaaclipse.addons.perspective/fragment.e4xmi_template b/org.eclipse.osbp.vaaclipse.addons.perspective/fragment.e4xmi_template
new file mode 100644
index 0000000..2872745
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/fragment.e4xmi_template
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ASCII"?>
+<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:commands="http://www.eclipse.org/ui/2010/UIModel/application/commands" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_MNDvwMWxEeSzw8CCZBgGfQ">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_xO4gEOdEEeSksfj086eVVA" featurename="children" parentElementId="org.lunifera.vaaclipse.addons.application.window" positionInList="">
+ <elements xsi:type="menu:MenuSeparator" xmi:id="_Iv7g0Om8EeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.menuseparator.0"/>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_JQQ1cOdFEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.handledmenuitem.save" label="Save perspective" tooltip="Save perspective" command="_yZY5cOdGEeSksfj086eVVA"/>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_NzQoEOdcEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.handledmenuitem.delete" label="Delete perspective" tooltip="Delete perspective" command="_QD7DIOdcEeSksfj086eVVA"/>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_anBOcOdcEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.handledmenuitem.reset" label="Reset perspective" tooltip="Reset perspective" command="_cRwR8OdcEeSksfj086eVVA"/>
+ </fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_9e5qwOdFEeSksfj086eVVA" featurename="commands" parentElementId="org.lunifera.vaaclipse.addons.application">
+ <elements xsi:type="commands:Command" xmi:id="_yZY5cOdGEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.commands.save" commandName="Save perspective" description="Save perspective"/>
+ <elements xsi:type="commands:Command" xmi:id="_QD7DIOdcEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.commands.delete" commandName="Delete perspective" description="Delete perspective"/>
+ <elements xsi:type="commands:Command" xmi:id="_cRwR8OdcEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.commands.reset" commandName="Reset perspective" description="Reset perspective"/>
+ </fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_5BJ3oOdGEeSksfj086eVVA" featurename="handlers" parentElementId="org.lunifera.vaaclipse.addons.application">
+ <elements xsi:type="commands:Handler" xmi:id="_5BJ3oedGEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.handler.save" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.perspective/org.lunifera.vaaclipse.addons.perspective.handler.SavePerspectiveHandler" command="_yZY5cOdGEeSksfj086eVVA"/>
+ <elements xsi:type="commands:Handler" xmi:id="_R8FeoOdcEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.handler.delete" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.perspective/org.lunifera.vaaclipse.addons.perspective.handler.DeletePerspectiveHandler" command="_QD7DIOdcEeSksfj086eVVA"/>
+ <elements xsi:type="commands:Handler" xmi:id="_ciif8OdcEeSksfj086eVVA" elementId="org.lunifera.vaaclipse.addons.perspective.handler.reset" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.perspective/org.lunifera.vaaclipse.addons.perspective.handler.ResetPerspectiveHandler" command="_cRwR8OdcEeSksfj086eVVA"/>
+ </fragments>
+</fragment:ModelFragments>
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/i18n/i18n.properties b/org.eclipse.osbp.vaaclipse.addons.perspective/i18n/i18n.properties
new file mode 100644
index 0000000..547a7e5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/i18n/i18n.properties
@@ -0,0 +1,9 @@
+# Save Perspective
+org.eclipse.osbp.dialogs.saveperspective.title=Save perspective
+org.eclipse.osbp.dialogs.saveperspective.message=Saves the perspective
+org.eclipse.osbp.dialogs.saveperspective.description=Saves the perspective
+org.eclipse.osbp.dialogs.options.saveperspective=Save
+org.eclipse.osbp.dialogs.options.saveperspective.description=Saves the perspective
+
+org.eclipse.osbp.dialogs.saveperspective.nameField=Perspective
+org.eclipse.osbp.dialogs.saveperspective.systemUserField=For systemuser
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/license.html b/org.eclipse.osbp.vaaclipse.addons.perspective/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/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.vaaclipse.addons.perspective/plugin.xml b/org.eclipse.osbp.vaaclipse.addons.perspective/plugin.xml
new file mode 100644
index 0000000..fb9f4d8
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+ <!-- <extension
+ id="org.eclipse.osbp.vaaclipse.addons.perspective"
+ point="org.eclipse.e4.workbench.model">
+ <fragment
+ apply="notexists"
+ uri="fragment.e4xmi_template">
+ </fragment>
+ </extension> -->
+
+</plugin>
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/pom.xml b/org.eclipse.osbp.vaaclipse.addons.perspective/pom.xml
new file mode 100644
index 0000000..72b9d42
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.perspective</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/PerspectiveHandler.java b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/PerspectiveHandler.java
new file mode 100644
index 0000000..78fb80b
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/PerspectiveHandler.java
@@ -0,0 +1,362 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Jan-Hendrik Diederich, Bredex GmbH - bug 201052
+ *******************************************************************************/
+package org.eclipse.osbp.vaaclipse.addons.perspective;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPlaceholderResolver;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osbp.vaaclipse.addons.common.api.resource.ICustomizedModelResourceHandler;
+import org.eclipse.osbp.vaaclipse.addons.common.api.resource.ISystemuserModelHandler;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+import org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler;
+import org.eclipse.osbp.vaaclipse.publicapi.preferences.IPreferenceProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Perspective registry.
+ * <p>
+ * Stateful implementation.
+ */
+public class PerspectiveHandler implements IPerspectiveHandler {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(PerspectiveHandler.class);
+
+ /** The model service. */
+ @Inject
+ private EModelService modelService;
+
+ /** The application. */
+ @Inject
+ private MApplication application;
+
+ /** The context. */
+ @Inject
+ private IEclipseContext context;
+
+ /** The preference provider. */
+ @Inject
+ private IPreferenceProvider preferenceProvider;
+
+ /** The model handler. */
+ @Inject
+ private ISystemuserModelHandler modelHandler;
+
+ /** The resource handler. */
+ @Inject
+ private ICustomizedModelResourceHandler resourceHandler;
+
+ /** The user id. */
+ @Inject
+ @Optional
+ @Named("userId")
+ private String userId;
+
+ /**
+ * Post construct.
+ *
+ * @param application
+ * the application
+ */
+ @PostConstruct
+ void postConstruct(MApplication application) {
+
+ }
+
+ /**
+ * Construct a new registry.
+ */
+ public PerspectiveHandler() {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#clonePerspective(java.lang.String, java.lang.String, org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public MPerspective clonePerspective(String userId, String label,
+ MPerspective original) throws IllegalArgumentException {
+
+ String newID = createNewId(label, original);
+ MPerspective newPerspective = (MPerspective) modelService.cloneElement(
+ original, null);
+ EPlaceholderResolver resolver = context.get(EPlaceholderResolver.class);
+ // Re-resolve any placeholder references
+ List<MPlaceholder> phList = modelService.findElements(newPerspective,
+ null, MPlaceholder.class, null);
+ for (MPlaceholder ph : phList) {
+ resolver.resolvePlaceholderRef(ph,
+ modelService.getTopLevelWindowFor(original));
+ }
+
+ newPerspective.getPersistedState().put(
+ IPerspectiveHandler.PROP_ORIGINAL_PERSPECTIVE,
+ original.getElementId());
+ newPerspective.getTags().add(IPerspectiveHandler.TAG_CREATED_BY_USER);
+
+ newPerspective.setElementId(newID);
+ newPerspective.setLabel(label);
+
+ // add the new object to the part stack
+ MPerspectiveStack stack = (MPerspectiveStack) (EObject) original
+ .getParent();
+ stack.getChildren().add((MPerspective) newPerspective);
+
+ try {
+ resourceHandler.save();
+ } catch (IOException e) {
+ LOGGER.error("{}", e);
+ }
+
+ if (userId != null
+ && userId.equals(ICustomizedModelResourceHandler.SYSTEM_USER)) {
+ modelHandler.addPerspectiveFragment(stack, newPerspective);
+ }
+
+ return newPerspective;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#canDeletePerspective(java.lang.String, org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public boolean canDeletePerspective(String userId, MPerspective perspective) {
+ return perspective.getTags().contains(
+ IPerspectiveHandler.TAG_CREATED_BY_USER);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#deletePerspective(java.lang.String, org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public boolean deletePerspective(String userId, MPerspective toDelete) {
+ MPerspective perspective = (MPerspective) toDelete;
+ MUIElement parent = (MUIElement) ((EObject) perspective).eContainer();
+
+ boolean result = false;
+ if (userId == null
+ || !userId.equals(ICustomizedModelResourceHandler.SYSTEM_USER)) {
+ if (parent instanceof MPerspectiveStack) {
+ MPerspectiveStack stack = (MPerspectiveStack) parent;
+ stack.getChildren().remove(toDelete);
+ result = true;
+ }
+
+ try {
+ resourceHandler.save();
+ } catch (IOException e) {
+ LOGGER.error("{}", e);
+ }
+ } else {
+ // TODO define system user
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#findPerspectiveWithId(java.lang.String)
+ */
+ @Override
+ public MPerspective findPerspectiveWithId(String perspectiveId) {
+ return (MPerspective) modelService.find(perspectiveId, application);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#getDefaultPerspective()
+ */
+ @Override
+ public String getDefaultPerspective() {
+ return getDefaultPerspective(userId);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#getDefaultPerspective(java.lang.String)
+ */
+ @Override
+ public String getDefaultPerspective(String userId) {
+ String defaultId = preferenceProvider.getUserPreferences(userId).get(
+ IPerspectiveHandler.PREF_DEFAULT_PERSPECTIVE, null);
+ // empty string may be returned but we want to return null if nothing
+ // found
+ if (defaultId == null || defaultId.length() == 0
+ || findPerspectiveWithId(defaultId) == null) {
+ defaultId = preferenceProvider.getSystemPreferences().get(
+ IPerspectiveHandler.PREF_DEFAULT_PERSPECTIVE, null);
+ }
+
+ return defaultId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#setSystemDefaultPerspective(java.lang.String)
+ */
+ @Override
+ public void setSystemDefaultPerspective(String id) {
+ MPerspective perspective = findPerspectiveWithId(id);
+ if (perspective != null) {
+ Preferences prefs = preferenceProvider.getSystemPreferences();
+ setDefaultPerspective(prefs, id);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#setUserDefaultPerspective(java.lang.String, java.lang.String)
+ */
+ @Override
+ public void setUserDefaultPerspective(String userId, String id) {
+ MPerspective perspective = findPerspectiveWithId(id);
+ if (perspective != null) {
+ Preferences prefs = preferenceProvider.getUserPreferences();
+ setDefaultPerspective(prefs, id);
+ }
+ }
+
+ /**
+ * Sets the default perspective.
+ *
+ * @param prefs
+ * the prefs
+ * @param id
+ * the id
+ */
+ protected void setDefaultPerspective(Preferences prefs, String id) {
+ prefs.put(IPerspectiveHandler.PREF_DEFAULT_PERSPECTIVE, id);
+ try {
+ prefs.flush();
+ } catch (BackingStoreException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+
+ /**
+ * Return <code>true</code> if a label is valid. This checks only the given
+ * label in isolation. It does not check whether the given label is used by
+ * any existing perspectives.
+ *
+ * @param label
+ * the label to test
+ * @return whether the label is valid
+ */
+ public boolean validateLabel(String label) {
+ label = label.trim();
+ if (label.length() <= 0) {
+ return false;
+ }
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#canRevertPerspective(org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public boolean canRevertPerspective(MPerspective perspToRevert) {
+ EObject container = ((EObject) perspToRevert).eContainer();
+ if (!(container instanceof MPerspectiveStack)) {
+ return false;
+ }
+
+ String originalId = perspToRevert.getPersistedState().get(
+ IPerspectiveHandler.PROP_ORIGINAL_PERSPECTIVE);
+ if (originalId != null) {
+ MPerspective originalPerspective = findPerspectiveWithId(originalId);
+ return originalPerspective != null;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler#revertPerspective(org.eclipse.e4.ui.model.application.ui.advanced.MPerspective)
+ */
+ @Override
+ public void revertPerspective(MPerspective perspToRevert) {
+ EObject container = ((EObject) perspToRevert).eContainer();
+ if (!(container instanceof MPerspectiveStack)) {
+ return;
+ }
+ MPerspectiveStack stack = (MPerspectiveStack) container;
+
+ String originalId = perspToRevert.getPersistedState().get(
+ IPerspectiveHandler.PROP_ORIGINAL_PERSPECTIVE);
+ if (originalId != null) {
+ MPerspective originalPerspective = findPerspectiveWithId(originalId);
+ if (originalPerspective != null) {
+ String label = perspToRevert.getLabel();
+
+ // delte the old perspective
+ deletePerspective(userId, perspToRevert);
+
+ // create a new one
+ MPerspective newPerspective = clonePerspective(userId, label,
+ originalPerspective);
+ stack.setSelectedElement(newPerspective);
+ }
+ }
+ }
+
+ /**
+ * Create a new perspective.
+ *
+ * @param label
+ * the name of the new descriptor
+ * @param description
+ * the description of the new descriptor
+ * @param original
+ * the descriptor on which to base the new descriptor
+ * @return a new perspective or <code>null</code> if the creation failed.
+ */
+ public MPerspective createPerspective(String label, String description,
+ MPerspective original) {
+
+ String newID = createNewId(label, original);
+ MPerspective newPerspective = (MPerspective) modelService.cloneElement(
+ original, null);
+ newPerspective.setElementId(newID);
+ return newPerspective;
+ }
+
+ /**
+ * Return an id for the new descriptor.
+ *
+ * The id must encode the original id. id is of the form <originalId>.label
+ *
+ * @param label
+ * the label
+ * @param originalDescriptor
+ * the original descriptor
+ * @return the new id
+ */
+ private String createNewId(String label, MPerspective originalDescriptor) {
+ String originalId = originalDescriptor.getPersistedState().get(
+ IPerspectiveHandler.PROP_ORIGINAL_PERSPECTIVE);
+ if (originalId == null) {
+ originalId = "root";
+ }
+ return originalId + '.' + label;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/PerspectiveRegistryContextFunction.java b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/PerspectiveRegistryContextFunction.java
new file mode 100644
index 0000000..042d18d
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/PerspectiveRegistryContextFunction.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.perspective;
+
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IContextFunction;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.osgi.service.component.annotations.Component;
+import org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler;
+
+/**
+ * Use this class to obtain an instance of {@link IPerspectiveHandler}.
+ */
+@Component(service = IContextFunction.class, property = { "service.context.key=org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler" })
+public class PerspectiveRegistryContextFunction extends ContextFunction {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.e4.core.contexts.ContextFunction#compute(org.eclipse.e4.core.contexts.IEclipseContext, java.lang.String)
+ */
+ @Override
+ public Object compute(IEclipseContext context, String contextKey) {
+ PerspectiveHandler registry = ContextInjectionFactory.make(
+ PerspectiveHandler.class, context);
+ context.set(IPerspectiveHandler.class, registry);
+ context.set(PerspectiveHandler.class, registry);
+ return registry;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/common/ISystemUserCapability.java b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/common/ISystemUserCapability.java
new file mode 100644
index 0000000..6bb1a3c
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/common/ISystemUserCapability.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.perspective.common;
+
+/**
+ * The Interface ISystemUserCapability.
+ */
+public interface ISystemUserCapability {
+
+ /**
+ * Returns true, if the user is allowed to save perspectives under the
+ * system user.
+ *
+ * @param userId
+ * - If null, then the system needs to use the current user.
+ * @return true, if successful
+ */
+ boolean hasCapability(String userId);
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/dialog/SavePerspectiveDialog.java b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/dialog/SavePerspectiveDialog.java
new file mode 100644
index 0000000..879b8af
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/dialog/SavePerspectiveDialog.java
@@ -0,0 +1,245 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.perspective.dialog;
+
+import java.util.Locale;
+
+import org.eclipse.osbp.runtime.common.i18n.II18nService;
+import org.eclipse.osbp.runtime.web.vaadin.common.resource.IResourceProvider;
+import org.eclipse.osbp.runtime.web.vaadin.components.dialogs.AbstractInputDialog;
+import org.eclipse.osbp.runtime.web.vaadin.components.dialogs.IDialogI18nKeys;
+
+import com.vaadin.data.util.BeanItem;
+import com.vaadin.server.Resource;
+import com.vaadin.ui.CheckBox;
+import com.vaadin.ui.FormLayout;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.Window;
+
+/**
+ * The Class SavePerspectiveDialog.
+ */
+public class SavePerspectiveDialog extends AbstractInputDialog {
+
+ /** The Constant DIALOG_TITLE. */
+ public static final String DIALOG_TITLE = "org.eclipse.osbp.dialogs.saveperspective.title";
+
+ /** The Constant DIALOG_MESSAGE. */
+ public static final String DIALOG_MESSAGE = "org.eclipse.osbp.dialogs.saveperspective.message";
+
+ /** The Constant DIALOG_ICON. */
+ public static final String DIALOG_ICON = "org.eclipse.osbp.dialogs.saveperspective.image";
+
+ /** The Constant DIALOG_DESCRIPTION. */
+ public static final String DIALOG_DESCRIPTION = "org.eclipse.osbp.dialogs.saveperspective.description";
+
+ /** The Constant DIALOG_OPTION__ACCEPT_CAPTION. */
+ public static final String DIALOG_OPTION__ACCEPT_CAPTION = "org.eclipse.osbp.dialogs.options.saveperspective";
+
+ /** The Constant DIALOG_OPTION__ACCEPT_DESCRIPTION. */
+ public static final String DIALOG_OPTION__ACCEPT_DESCRIPTION = "org.eclipse.osbp.dialogs.options.saveperspective.description";
+
+ /** The Constant NAME_FIELD. */
+ public static final String NAME_FIELD = "org.eclipse.osbp.dialogs.saveperspective.nameField";
+
+ /** The Constant SYSTEM_USER_FIELD. */
+ public static final String SYSTEM_USER_FIELD = "org.eclipse.osbp.dialogs.saveperspective.systemUserField";
+
+ /** The i18n service. */
+ private II18nService i18nService;
+
+ /** The name. */
+ private TextField name;
+
+ /** The system user. */
+ private CheckBox systemUser;
+
+ /** The data. */
+ private Data data;
+
+ /** The item. */
+ private BeanItem<Data> item;
+
+ /** The system user capability. */
+ private boolean systemUserCapability;
+
+ /**
+ * Instantiates a new save perspective dialog.
+ *
+ * @param config
+ * the config
+ * @param data
+ * the data
+ * @param options
+ * the options
+ */
+ protected SavePerspectiveDialog(DialogConfig config, Data data,
+ Option... options) {
+ super(config, options);
+ this.data = data;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.runtime.web.vaadin.components.dialogs.AbstractInputDialog#fillForm(com.vaadin.ui.FormLayout)
+ */
+ @Override
+ protected void fillForm(FormLayout customArea) {
+ Locale locale = UI.getCurrent().getLocale();
+ name = new TextField(i18nService.getValue(NAME_FIELD, locale));
+ name.setNullRepresentation("");
+ systemUser = new CheckBox(i18nService.getValue(SYSTEM_USER_FIELD,
+ locale));
+ systemUser.setVisible(systemUserCapability);
+
+ customArea.addComponent(name);
+ customArea.addComponent(systemUser);
+
+ item = new BeanItem<Data>(data);
+ name.setPropertyDataSource(item.getItemProperty("name"));
+ systemUser.setPropertyDataSource(item.getItemProperty("systemUser"));
+
+ name.focus();
+ }
+
+ /**
+ * Show dialog.
+ *
+ * @param service
+ * the service
+ * @param systemUserCapability
+ * the system user capability
+ * @param resourceProvider
+ * the resource provider
+ * @param onAccept
+ * the on accept
+ * @param data
+ * the data
+ */
+ public static void showDialog(II18nService service,
+ boolean systemUserCapability, IResourceProvider resourceProvider,
+ Runnable onAccept, Data data) {
+ if (service == null) {
+ throw new NullPointerException("Please pass an i18nService");
+ }
+
+ Locale locale = UI.getCurrent().getLocale();
+ String dialogTitle = service.getValue(DIALOG_TITLE, locale);
+ String dialogMessage = service.getValue(DIALOG_MESSAGE, locale);
+ String dialogDescription = service.getValue(DIALOG_DESCRIPTION, locale);
+ String dialogIcon = service.getValue(DIALOG_ICON, locale);
+ String optionAcceptCaption = service.getValue(
+ DIALOG_OPTION__ACCEPT_CAPTION, locale);
+ String optionAcceptDescription = service.getValue(
+ DIALOG_OPTION__ACCEPT_DESCRIPTION, locale);
+ String optionCancelCaption = service.getValue(
+ IDialogI18nKeys.DIALOG_OPTION__CANCEL_CAPTION, locale);
+ String optionCancelDescription = service.getValue(
+ IDialogI18nKeys.DIALOG_OPTION__CANCEL_DESCRIPTION, locale);
+ String optionCancelIcon = service.getValue(
+ IDialogI18nKeys.DIALOG_OPTION__CANCEL_ICON, locale);
+
+ DialogConfig config = new DialogConfig(dialogTitle, dialogMessage,
+ dialogDescription, createResource(dialogIcon, resourceProvider)) {
+ @Override
+ public void config(Window window) {
+ super.config(window);
+ window.setHeight("220px");
+ window.setWidth("350px");
+ window.center();
+ }
+ };
+
+ SavePerspectiveDialog dialog = new SavePerspectiveDialog(config, data,
+ new Option(optionCancelCaption, optionCancelDescription,
+ createResource(optionCancelIcon, resourceProvider),
+ null), new Option(optionAcceptCaption,
+ optionAcceptDescription, null, onAccept));
+
+ dialog.i18nService = service;
+ dialog.systemUserCapability = systemUserCapability;
+ dialog.open();
+ }
+
+ /**
+ * The Class Data.
+ */
+ public static class Data {
+
+ /** The name. */
+ private String name;
+
+ /** The system user. */
+ private boolean systemUser;
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name.
+ *
+ * @param name
+ * the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Checks if is system user.
+ *
+ * @return the systemUser
+ */
+ public boolean isSystemUser() {
+ return systemUser;
+ }
+
+ /**
+ * Sets the system user.
+ *
+ * @param systemUser
+ * the systemUser to set
+ */
+ public void setSystemUser(boolean systemUser) {
+ this.systemUser = systemUser;
+ }
+
+ }
+
+ /**
+ * The Class AcceptOption.
+ */
+ public static class AcceptOption extends Option {
+
+ /**
+ * Instantiates a new accept option.
+ *
+ * @param name
+ * the name
+ * @param description
+ * the description
+ * @param icon
+ * the icon
+ * @param runnable
+ * the runnable
+ */
+ public AcceptOption(String name, String description, Resource icon,
+ Runnable runnable) {
+ super(name, description, icon, runnable);
+ }
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/DeletePerspectiveHandler.java b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/DeletePerspectiveHandler.java
new file mode 100644
index 0000000..f24edbb
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/DeletePerspectiveHandler.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.perspective.handler;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack;
+import org.eclipse.e4.ui.model.application.ui.menu.MItem;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osbp.vaaclipse.addons.application.handler.AbstractHandler;
+import org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler;
+
+/**
+ * The Class DeletePerspectiveHandler.
+ */
+public class DeletePerspectiveHandler extends AbstractHandler {
+
+ /** The handler. */
+ @Inject
+ private IPerspectiveHandler handler;
+
+ /** The user id. */
+ @Inject
+ @Optional
+ @Named("userId")
+ private String userId;
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param perspective
+ * the perspective
+ * @param item
+ * the item
+ */
+ @Execute
+ public void execute(@Active MContext context,
+ @Active MPerspective perspective, @Active MItem item) {
+ MPerspectiveStack stack = (MPerspectiveStack) ((EObject) perspective)
+ .eContainer();
+ if (handler.deletePerspective(userId, perspective)) {
+ // select the first perspective in the stack
+ if (stack.getSelectedElement() == null
+ && !stack.getChildren().isEmpty()) {
+ stack.setSelectedElement(stack.getChildren().get(0));
+ }
+ }
+ }
+
+ /**
+ * Can execute.
+ *
+ * @param perspective
+ * the perspective
+ * @return true, if successful
+ */
+ @CanExecute
+ public boolean canExecute(@Active MPerspective perspective) {
+ return handler.canDeletePerspective(userId, perspective);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/ResetPerspectiveHandler.java b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/ResetPerspectiveHandler.java
new file mode 100644
index 0000000..9990ac5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/ResetPerspectiveHandler.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.perspective.handler;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.menu.MItem;
+import org.eclipse.osbp.vaaclipse.addons.application.handler.AbstractHandler;
+import org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler;
+
+/**
+ * The Class ResetPerspectiveHandler.
+ */
+public class ResetPerspectiveHandler extends AbstractHandler {
+
+ /** The handler. */
+ @Inject
+ private IPerspectiveHandler handler;
+
+ /** The user id. */
+ @Inject
+ @Optional
+ @Named("userId")
+ private String userId;
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param perspective
+ * the perspective
+ * @param item
+ * the item
+ */
+ @Execute
+ public void execute(@Active MContext context,
+ @Active MPerspective perspective, @Active MItem item) {
+ handler.revertPerspective(perspective);
+ }
+
+ /**
+ * Can execute.
+ *
+ * @param perspective
+ * the perspective
+ * @return true, if successful
+ */
+ @CanExecute
+ public boolean canExecute(@Active MPerspective perspective) {
+ return handler.canRevertPerspective(perspective);
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/SavePerspectiveHandler.java b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/SavePerspectiveHandler.java
new file mode 100644
index 0000000..db3a0d0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/src/org/eclipse/osbp/vaaclipse/addons/perspective/handler/SavePerspectiveHandler.java
@@ -0,0 +1,107 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.perspective.handler;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack;
+import org.eclipse.e4.ui.model.application.ui.menu.MItem;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osbp.runtime.common.i18n.II18nService;
+import org.eclipse.osbp.runtime.web.vaadin.common.resource.IResourceProvider;
+import org.eclipse.osbp.vaaclipse.addons.application.handler.AbstractHandler;
+import org.eclipse.osbp.vaaclipse.addons.common.api.resource.ICustomizedModelResourceHandler;
+import org.eclipse.osbp.vaaclipse.addons.perspective.common.ISystemUserCapability;
+import org.eclipse.osbp.vaaclipse.addons.perspective.dialog.SavePerspectiveDialog;
+import org.eclipse.osbp.vaaclipse.publicapi.perspective.IPerspectiveHandler;
+
+/**
+ * The Class SavePerspectiveHandler.
+ */
+public class SavePerspectiveHandler extends AbstractHandler {
+
+ /** The handler. */
+ @Inject
+ private IPerspectiveHandler handler;
+
+ /** The i18n service. */
+ @Inject
+ private II18nService i18nService;
+
+ /** The resource provider. */
+ @Inject
+ private IResourceProvider resourceProvider;
+
+ /** The system user capability. */
+ @Inject
+ @Optional
+ private ISystemUserCapability systemUserCapability;
+
+ /** The user id. */
+ @Inject
+ @Optional
+ @Named("userId")
+ private String userId;
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param perspective
+ * the perspective
+ * @param item
+ * the item
+ */
+ @Execute
+ public void execute(@Active MContext context,
+ final @Active MPerspective perspective, @Active MItem item) {
+
+ boolean systemUser = systemUserCapability != null ? systemUserCapability
+ .hasCapability(userId) : true;
+
+ final SavePerspectiveDialog.Data data = new SavePerspectiveDialog.Data();
+ SavePerspectiveDialog.showDialog(i18nService, systemUser,
+ resourceProvider, new Runnable() {
+ @Override
+ public void run() {
+ String user = data.isSystemUser() ? ICustomizedModelResourceHandler.SYSTEM_USER
+ : userId;
+ MPerspective newPerspective = handler.clonePerspective(
+ user, data.getName(), perspective);
+
+ if (newPerspective != null) {
+ // select the first perspective in the stack
+ MPerspectiveStack stack = (MPerspectiveStack) ((EObject) perspective)
+ .eContainer();
+ stack.setSelectedElement(newPerspective);
+ }
+ }
+ }, data);
+ }
+
+ /**
+ * Can execute.
+ *
+ * @return true, if successful
+ */
+ @CanExecute
+ public boolean canExecute() {
+ return true;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/template/systemUserFragment.e4xmi-template b/org.eclipse.osbp.vaaclipse.addons.perspective/template/systemUserFragment.e4xmi-template
new file mode 100644
index 0000000..8e2a8a9
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/template/systemUserFragment.e4xmi-template
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ASCII"?>
+<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_MNDvwMWxEeSzw8CCZBgGfQ">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_MdNeEOf_EeSksfj086eVVA" featurename="children" parentElementId="org.eclipse.osbp.vaaclipse.addons.application.perspectivestack.0"/>
+</fragment:ModelFragments>
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/.checkstyle b/org.eclipse.osbp.vaaclipse.addons.problems/.checkstyle
new file mode 100644
index 0000000..2f2667a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.checkstyle
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <fileset name="all" enabled="true" check-config-name="emfstoreStyle" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/.project b/org.eclipse.osbp.vaaclipse.addons.problems/.project
new file mode 100644
index 0000000..a81c92b
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.project
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.vaaclipse.addons.problems</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>com.vaadin.integration.eclipse.addonStylesBuilder</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.vaaclipse.addons.problems/LICENSE.txt b/org.eclipse.osbp.vaaclipse.addons.problems/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/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.vaaclipse.addons.problems/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.problems/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e0aa036
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/META-INF/MANIFEST.MF
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.vaaclipse.addons.problems
+Bundle-SymbolicName: org.eclipse.osbp.vaaclipse.addons.problems;singleton:=true
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Export-Package: org.eclipse.osbp.vaaclipse.addons.problems.views;x-internal:=true;version="0.9.0"
+Require-Bundle: org.eclipse.core.databinding;bundle-version="1.4.1",
+ com.vaadin.server;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.4.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.e4.core.services;bundle-version="[1.2.1,1.3.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="[0.12.0,0.13.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.2,1.3.0)",
+ org.eclipse.osbp.vaaclipse.addons.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.addons.common.api;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.osbp.dsl.dto.lib;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.vaaclipse.additions;bundle-version="[0.9.0,0.10.0)",
+ com.vaadin.shared;bundle-version="[7.5.7,7.7.0)",
+ org.eclipse.osbp.ecview.core.common;bundle-version="[0.9.0,0.10.0)",
+ javax.inject
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject;version="1.0.0",
+ org.osgi.framework;version="1.8.0",
+ org.osgi.service.event;version="1.3.0",
+ org.osgi.util.tracker;version="1.5.1",
+ org.slf4j
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/about.html b/org.eclipse.osbp.vaaclipse.addons.problems/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/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.vaaclipse.addons.problems/about.ini b/org.eclipse.osbp.vaaclipse.addons.problems/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/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.vaaclipse.addons.problems/about.mappings b/org.eclipse.osbp.vaaclipse.addons.problems/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/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.vaaclipse.addons.problems/about.properties b/org.eclipse.osbp.vaaclipse.addons.problems/about.properties
new file mode 100644
index 0000000..017b625
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/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.vaaclipse.addons.problems
+
+################ 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.vaaclipse.addons.problems/build.properties b/org.eclipse.osbp.vaaclipse.addons.problems/build.properties
new file mode 100644
index 0000000..fa8f5a8
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/build.properties
@@ -0,0 +1,14 @@
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ LICENSE.txt,\
+ .classpath,\
+ .project,\
+ epl-v10.html,\
+ license.html,\
+ images/,\
+ .settings/,\
+ plugin.xml,\
+ i18n/,\
+ fragment.e4xmi_template
+output.. = target/classes
+source.. = src/
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/epl-v10.html b/org.eclipse.osbp.vaaclipse.addons.problems/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/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.vaaclipse.addons.problems/fragment.e4xmi_template b/org.eclipse.osbp.vaaclipse.addons.problems/fragment.e4xmi_template
new file mode 100644
index 0000000..63b96bc
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/fragment.e4xmi_template
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="ASCII"?>
+<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/descriptor/basic" xmlns:basic_1="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_MNDvwMWxEeSzw8CCZBgGfQ">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_ieGRoM-xEeSscMz1WjkrfA" featurename="descriptors" parentElementId="org.lunifera.vaaclipse.addons.application">
+ <elements xsi:type="basic:PartDescriptor" xmi:id="_VG-MkM--EeSqGowmJdFaKQ" elementId="org.lunifera.vaaclipse.addons.problems.partdescriptor.problems" label="Problems view" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.problems/images/problems.png" tooltip="Problems view" category="org.lunifera.vaaclipse.addons.application.partstack.bottom" closeable="true" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.problems/org.lunifera.vaaclipse.addons.problems.views.ProblemsView">
+ <tags>View</tags>
+ <toolbar xmi:id="_7ANhYEEDEeWrZbjw3rhvHw" elementId="org.lunifera.vaaclipse.addons.problems.toolbar.0">
+ <children xsi:type="menu:DirectToolItem" xmi:id="_8qvJgEEDEeWrZbjw3rhvHw" elementId="org.lunifera.vaaclipse.addons.problems.directtoolitem.showAllMessages" label="Show all messages" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.problems/images/showAllMessages.png" tooltip="Show all messages" type="Check" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.problems/org.lunifera.vaaclipse.addons.problems.handler.ShowAllMessagesHandler"/>
+ </toolbar>
+ </elements>
+ </fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_99lXAN0iEeSOjIDi2pwsFg" featurename="sharedElements" parentElementId="mainWindow">
+ <elements xsi:type="basic_1:Part" xmi:id="_G4dAQN0jEeSOjIDi2pwsFg" elementId="org.lunifera.vaaclipse.addons.problems.partdescriptor.problems" accessibilityPhrase="" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.problems/org.lunifera.vaaclipse.addons.problems.views.ProblemsView" label="Problems" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.problems/images/problems.png" tooltip="Problems" closeable="true">
+ <toolbar xmi:id="_-icSAEEDEeWrZbjw3rhvHw" elementId="org.lunifera.vaaclipse.addons.problems.toolbar.1">
+ <children xsi:type="menu:DirectToolItem" xmi:id="_Dqfw8EEEEeWrZbjw3rhvHw" elementId="org.lunifera.vaaclipse.addons.problems.directtoolitem.showAllMessages" label="Show all messages" iconURI="platform:/plugin/org.lunifera.vaaclipse.addons.problems/images/showAllMessages.png" tooltip="Show all messages" type="Check" contributionURI="bundleclass://org.lunifera.vaaclipse.addons.problems/org.lunifera.vaaclipse.addons.problems.handler.ShowAllMessagesHandler"/>
+ </toolbar>
+ </elements>
+ </fragments>
+</fragment:ModelFragments>
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/i18n/translations.properties b/org.eclipse.osbp.vaaclipse.addons.problems/i18n/translations.properties
new file mode 100644
index 0000000..eea32ac
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/i18n/translations.properties
@@ -0,0 +1,11 @@
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.message=Message
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.fieldId=Field
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.partId=View
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.fieldName=Field
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.partName=View
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.bundleSymbolicName=Bundle
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.severity=Severity
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.detailmessage=Message
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.messagePath=Message Path
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.creatorClass=Creator Class
+org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView.messageCode=Message Code
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/images/problems.png b/org.eclipse.osbp.vaaclipse.addons.problems/images/problems.png
new file mode 100644
index 0000000..0194704
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/images/problems.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/images/showAllMessages.png b/org.eclipse.osbp.vaaclipse.addons.problems/images/showAllMessages.png
new file mode 100644
index 0000000..0194704
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/images/showAllMessages.png
Binary files differ
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/license.html b/org.eclipse.osbp.vaaclipse.addons.problems/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/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.vaaclipse.addons.problems/plugin.xml b/org.eclipse.osbp.vaaclipse.addons.problems/plugin.xml
new file mode 100644
index 0000000..b7a1f98
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+ <!-- <extension
+ id="org.eclipse.osbp.vaaclipse.addons.extension.system.fragment"
+ point="org.eclipse.e4.workbench.model">
+ <fragment
+ apply="notexists"
+ uri="fragment.e4xmi_template">
+ </fragment>
+ </extension> -->
+</plugin>
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/pom.xml b/org.eclipse.osbp.vaaclipse.addons.problems/pom.xml
new file mode 100644
index 0000000..a80a000
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/pom.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.problems</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/src/org/eclipse/osbp/vaaclipse/addons/problems/handler/ShowAllMessagesHandler.java b/org.eclipse.osbp.vaaclipse.addons.problems/src/org/eclipse/osbp/vaaclipse/addons/problems/handler/ShowAllMessagesHandler.java
new file mode 100644
index 0000000..8cc0a69
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/src/org/eclipse/osbp/vaaclipse/addons/problems/handler/ShowAllMessagesHandler.java
@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.problems.handler;
+
+import org.eclipse.e4.core.contexts.Active;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.menu.MItem;
+import org.eclipse.osbp.vaaclipse.addons.problems.views.ProblemsView;
+import org.eclipse.osbp.vaaclipse.addons.problems.views.ProblemsView.Mode;
+
+/**
+ * The Class ShowAllMessagesHandler.
+ */
+public class ShowAllMessagesHandler {
+
+ /**
+ * Execute.
+ *
+ * @param context
+ * the context
+ * @param part
+ * the part
+ * @param item
+ * the item
+ */
+ @Execute
+ public void execute(@Active MContext context, @Active MPart part,
+ @Active MItem item) {
+
+ ProblemsView view = (ProblemsView) part.getObject();
+ view.setMode(toMode(item));
+ }
+
+ /**
+ * To mode.
+ *
+ * @param item
+ * the item
+ * @return the mode
+ */
+ private Mode toMode(MItem item) {
+ if (item.isSelected()) {
+ return Mode.SHOW_ALL;
+ } else {
+ return Mode.FOLLOW_ACTIVE_PART;
+ }
+ }
+
+ /**
+ * Can execute.
+ *
+ * @param item
+ * the item
+ * @return true, if successful
+ */
+ @CanExecute
+ public boolean canExecute(@Active MItem item) {
+ return true;
+ }
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/src/org/eclipse/osbp/vaaclipse/addons/problems/views/ProblemsView.java b/org.eclipse.osbp.vaaclipse.addons.problems/src/org/eclipse/osbp/vaaclipse/addons/problems/views/ProblemsView.java
new file mode 100644
index 0000000..2025604
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/src/org/eclipse/osbp/vaaclipse/addons/problems/views/ProblemsView.java
@@ -0,0 +1,846 @@
+/**
+ * Copyright (c) 2011, 2014 - 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.vaaclipse.addons.problems.views;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
+import org.eclipse.osbp.runtime.common.i18n.II18nService;
+import org.eclipse.osbp.runtime.common.validation.IStatus;
+import org.eclipse.osbp.runtime.common.validation.IStatus.Severity;
+import org.eclipse.osbp.vaaclipse.addons.common.api.IE4Topics;
+import org.eclipse.osbp.vaaclipse.addons.common.api.ResourceUtil;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusManager;
+import org.eclipse.osbp.vaaclipse.addons.common.api.status.IStatusScope;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.data.Property;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.util.BeanItemContainer;
+import com.vaadin.event.ItemClickEvent;
+import com.vaadin.server.Resource;
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.Table.ColumnHeaderMode;
+import com.vaadin.ui.Table.RowHeaderMode;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * View that shows problems.
+ */
+public class ProblemsView {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ProblemsView.class);
+
+ /** The parent. */
+ private final VerticalLayout parent;
+
+ /** The eclipse context. */
+ @SuppressWarnings("unused")
+ private final IEclipseContext eclipseContext;
+
+ /** The status manager. */
+ @Inject
+ private IStatusManager statusManager;
+
+ /** The part service. */
+ @Inject
+ private EPartService partService;
+
+ /** The event broker. */
+ @Inject
+ private IEventBroker eventBroker;
+
+ /** The i18n service. */
+ @Inject
+ private II18nService i18nService;
+
+ /** The table. */
+ private Table table;
+
+ /** The container. */
+ private BeanItemContainer<StatusBean> container;
+
+ /** The current timer. */
+ private Timer currentTimer;
+
+ /** The changed validations handler. */
+ private EventHandler changedValidationsHandler;
+
+ /** The changed scope handler. */
+ private EventHandler changedScopeHandler;
+
+ /** The view mode. */
+ private Mode viewMode = Mode.FOLLOW_ACTIVE_PART;
+
+ /** The freezed scope. */
+ private IStatusScope freezedScope;
+
+ /** The detail label. */
+ private Label detailLabel;
+
+ /**
+ * Instantiates a new problems view.
+ *
+ * @param parent
+ * the parent
+ * @param eclipseContext
+ * the eclipse context
+ * @param app
+ * the app
+ */
+ @Inject
+ public ProblemsView(VerticalLayout parent, IEclipseContext eclipseContext,
+ MApplication app) {
+ this.parent = parent;
+ this.eclipseContext = eclipseContext;
+ }
+
+ /**
+ * Inits the.
+ */
+ @SuppressWarnings("serial")
+ @PostConstruct
+ protected void init() {
+
+ table = new Table();
+ table.setSelectable(true);
+ table.setSizeFull();
+ parent.addComponent(table);
+
+ container = new BeanItemContainer<StatusBean>(StatusBean.class);
+ table.setContainerDataSource(container);
+
+ table.setVisibleColumns(new Object[] { "message", "fieldName",
+ "partName", "bundleSymbolicName", "severity", "messagePath",
+ "creatorClass", "messageCode" });
+ table.setColumnCollapsingAllowed(true);
+ table.setColumnCollapsed("bundleSymbolicName", true);
+ table.setColumnCollapsed("severity", true);
+ table.setColumnCollapsed("creatorClass", true);
+ table.setColumnCollapsed("messageCode", true);
+
+ table.setRowHeaderMode(RowHeaderMode.ICON_ONLY);
+ table.setItemIconPropertyId("severityImage");
+
+ table.setColumnHeaderMode(ColumnHeaderMode.EXPLICIT_DEFAULTS_ID);
+ Locale locale = UI.getCurrent().getLocale();
+ table.setColumnHeader("message",
+ toViewI18n("message", i18nService, locale));
+ table.setColumnHeader("fieldName",
+ toViewI18n("fieldName", i18nService, locale));
+ table.setColumnHeader("partName",
+ toViewI18n("partName", i18nService, locale));
+ table.setColumnHeader("bundleSymbolicName",
+ toViewI18n("bundleSymbolicName", i18nService, locale));
+ table.setColumnHeader("severity",
+ toViewI18n("severity", i18nService, locale));
+ table.setColumnHeader("messagePath",
+ toViewI18n("messagePath", i18nService, locale));
+ table.setColumnHeader("creatorClass",
+ toViewI18n("creatorClass", i18nService, locale));
+ table.setColumnHeader("messageCode",
+ toViewI18n("messageCode", i18nService, locale));
+
+ table.addItemClickListener(new ItemClickEvent.ItemClickListener() {
+ @Override
+ public void itemClick(ItemClickEvent event) {
+ if (event.isDoubleClick()) {
+ focusStatus(event);
+ }
+ }
+ });
+
+ table.addValueChangeListener(new Property.ValueChangeListener() {
+ @Override
+ public void valueChange(ValueChangeEvent event) {
+ showDetailMessage((StatusBean) event.getProperty().getValue());
+ }
+ });
+
+ detailLabel = new Label();
+ detailLabel.setPrimaryStyleName("detailmessage");
+ detailLabel.setContentMode(ContentMode.HTML);
+ detailLabel.setSizeFull();
+ parent.addComponent(detailLabel);
+
+ parent.setExpandRatio(table, 0.85f);
+ parent.setExpandRatio(detailLabel, 0.15f);
+
+ // initialize the view mode
+ setMode(viewMode);
+
+ // handle changed validation scopes
+ //
+ changedScopeHandler = new EventHandler() {
+ @Override
+ public void handleEvent(Event event) {
+ switch (viewMode) {
+ case FREEZE_SCOPE:
+ // only refresh contents if the changed scope is the freezed
+ // scope
+ IStatusScope scope = getScopeFromEvent(event);
+ if (freezedScope == scope) {
+ refreshContent();
+ }
+ break;
+ case FOLLOW_ACTIVE_PART:
+ case SHOW_ALL:
+ default:
+ refreshContent();
+ break;
+ }
+ }
+ };
+
+ // handle changes in validation results
+ //
+ eventBroker.subscribe(
+ IE4Topics.StatusManagerEvents.ACTIVE_SCOPE_CHANGED_TOPIC,
+ changedScopeHandler);
+ changedValidationsHandler = new EventHandler() {
+ @Override
+ public void handleEvent(Event event) {
+ switch (viewMode) {
+ case FREEZE_SCOPE:
+ // only refresh contents if the changed scope is the freezed
+ // scope
+ IStatusScope scope = getScopeFromEvent(event);
+ if (freezedScope == scope) {
+ refreshContent();
+ }
+ break;
+ case FOLLOW_ACTIVE_PART:
+ case SHOW_ALL:
+ default:
+ refreshContent();
+ break;
+ }
+ }
+ };
+
+ eventBroker.subscribe(
+ IE4Topics.StatusManagerEvents.VALIDATIONS_CHANGED_TOPIC,
+ changedValidationsHandler);
+ }
+
+ /**
+ * To view i18n.
+ *
+ * @param key
+ * the key
+ * @param i18nService
+ * the i18n service
+ * @param locale
+ * the locale
+ * @return the string
+ */
+ private static String toViewI18n(String key, II18nService i18nService,
+ Locale locale) {
+ String result = i18nService.getValue(
+ "org.eclipse.osbp.vaaclipse.addons.application.views.ProblemsView."
+ + key, locale);
+ if (result == null || result.equals("")) {
+ return key;
+ }
+
+ return result;
+ }
+
+ /**
+ * To common i18n.
+ *
+ * @param key
+ * the key
+ * @param i18nService
+ * the i18n service
+ * @param locale
+ * the locale
+ * @return the string
+ */
+ private static String toCommonI18n(String key, II18nService i18nService,
+ Locale locale) {
+ if (key == null) {
+ return "";
+ }
+ String result = i18nService.getValue(key, locale);
+ if (result == null || result.equals("")) {
+ return key;
+ }
+
+ return result;
+ }
+
+ /**
+ * Shows the detail message.
+ *
+ * @param statusBean
+ * the status bean
+ */
+ protected void showDetailMessage(StatusBean statusBean) {
+ if (statusBean != null) {
+ detailLabel.setValue(statusBean.getMessage().getValue());
+ } else {
+ detailLabel.setValue(null);
+ }
+ }
+
+ /**
+ * Tries to put the focus to the field involved in the problem.
+ *
+ * @param event
+ * the event
+ */
+ protected void focusStatus(ItemClickEvent event) {
+ StatusBean status = (StatusBean) event.getItemId();
+
+ String mPartId = status.getPartId();
+ if (mPartId != null && !mPartId.equals("")) {
+ MPart mPart = partService.findPart(mPartId);
+ if (mPart != null) {
+ partService.bringToTop(mPart);
+ partService.activate(mPart);
+
+ String fieldId = status.getFieldId();
+ if (fieldId != null && !fieldId.equals("")) {
+ // send a focus field event to the mpart
+ eventBroker.post(IE4Topics.PartEvents.FOCUS_FIELD_TOPIC,
+ createFocusFieldEvent(mPartId, fieldId));
+ }
+ }
+ }
+ }
+
+ /**
+ * Creates an event to focus a field in a MPart.
+ *
+ * @param mPartId
+ * the m part id
+ * @param fieldId
+ * the field id
+ * @return the map
+ */
+ protected Map<String, Object> createFocusFieldEvent(String mPartId,
+ String fieldId) {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ properties.put(IE4Topics.PartEvents.PROP_MPART_ID, mPartId);
+ properties.put(IE4Topics.PartEvents.PROP_FIELD_ID, fieldId);
+ return properties;
+ }
+
+ /**
+ * Refreshes the content of the active MPart.
+ */
+ protected void refreshContent() {
+ if (table == null || table.getUI() == null) {
+ return;
+ }
+
+ synchronized (this) {
+ // Wait for 250ms before refreshing the table. Most probably several
+ // validation events will
+ // arrive in the next milliseconds
+ if (currentTimer == null) {
+ currentTimer = new Timer();
+ currentTimer.schedule(new TimerTask() {
+ @Override
+ public void run() {
+ table.getUI().accessSynchronously(new Runnable() {
+ @Override
+ public void run() {
+ container.removeAllItems();
+ if (viewMode == Mode.FOLLOW_ACTIVE_PART
+ || viewMode == Mode.FREEZE_SCOPE) {
+ IStatusScope scope = statusManager
+ .getActiveScope();
+ if (scope != null) {
+ container.addAll(mapStatus(scope));
+ }
+ } else if (viewMode == Mode.SHOW_ALL) {
+ container.addAll(mapStatus(statusManager));
+ }
+
+ detailLabel.setValue("");
+
+ LOGGER.debug("Table refreshed.");
+ resetTimer();
+ }
+ });
+ }
+ }, 250);
+ LOGGER.debug("Scheduled Table-Refresh-Timer.");
+ } else {
+ LOGGER.debug("Timer already active.");
+ }
+ }
+ }
+
+ /**
+ * Reset timer.
+ */
+ protected void resetTimer() {
+ synchronized (this) {
+ currentTimer = null;
+ }
+ }
+
+ /**
+ * Map status.
+ *
+ * @param scope
+ * the scope
+ * @return the list
+ */
+ protected List<StatusBean> mapStatus(IStatusScope scope) {
+ List<StatusBean> result = new ArrayList<ProblemsView.StatusBean>();
+ for (IStatus status : scope.getAllStatus()) {
+ result.add(StatusBean.create(status, i18nService,
+ parent.getLocale()));
+ }
+ return result;
+ }
+
+ /**
+ * Map status.
+ *
+ * @param manager
+ * the manager
+ * @return the list
+ */
+ protected List<StatusBean> mapStatus(IStatusManager manager) {
+ List<StatusBean> result = new ArrayList<ProblemsView.StatusBean>();
+ for (IStatus status : manager.getAllScopeStatus()) {
+ result.add(StatusBean.create(status, i18nService,
+ parent.getLocale()));
+ }
+ return result;
+ }
+
+ /**
+ * Sets the mode.
+ *
+ * @param mode
+ * the new mode
+ */
+ public void setMode(Mode mode) {
+ switch (mode) {
+ case FREEZE_SCOPE:
+ this.freezedScope = statusManager.getActiveScope();
+ break;
+ case FOLLOW_ACTIVE_PART:
+ case SHOW_ALL:
+ this.freezedScope = null;
+ }
+
+ this.viewMode = mode;
+
+ refreshContent();
+ }
+
+ /**
+ * Dispose.
+ */
+ @PreDestroy
+ protected void dispose() {
+ eventBroker.unsubscribe(changedScopeHandler);
+ eventBroker.unsubscribe(changedValidationsHandler);
+
+ changedScopeHandler = null;
+ changedValidationsHandler = null;
+ table = null;
+ container = null;
+ }
+
+ /**
+ * Gets the scope from event.
+ *
+ * @param event
+ * the event
+ * @return the scope from event
+ */
+ protected IStatusScope getScopeFromEvent(Event event) {
+ @SuppressWarnings("unchecked")
+ Map<String, Object> props = (Map<String, Object>) event
+ .getProperty(IEventBroker.DATA);
+ IStatusScope scope = (IStatusScope) props
+ .get(IE4Topics.StatusManagerEvents.ACTIVE_SCOPE_CHANGED_TOPIC);
+ return scope;
+ }
+
+ /**
+ * The mode of the view.
+ */
+ public enum Mode {
+
+ /** Follows the active MPart. */
+ FOLLOW_ACTIVE_PART,
+
+ /** Only shows messages for the current scope. */
+ FREEZE_SCOPE,
+
+ /** Show all messages. */
+ SHOW_ALL
+ }
+
+ /**
+ * The Class StatusBean.
+ */
+ public static class StatusBean {
+
+ /** The severity image. */
+ @SuppressWarnings("unused")
+ private Resource severityImage;
+
+ /** The severity. */
+ private Severity severity;
+
+ /** The bundle symbolic name. */
+ private String bundleSymbolicName;
+
+ /** The message code. */
+ private String messageCode;
+
+ /** The message. */
+ private Label message;
+
+ /** The exception. */
+ private Exception exception;
+
+ /** The part id. */
+ private String partId;
+
+ /** The field id. */
+ private String fieldId;
+
+ /** The part name. */
+ private String partName;
+
+ /** The field name. */
+ private String fieldName;
+
+ /** The message path. */
+ private String messagePath;
+
+ /** The creator class. */
+ private String creatorClass;
+
+ /**
+ * Creates the.
+ *
+ * @param status
+ * the status
+ * @param i18nService
+ * the i18n service
+ * @param locale
+ * the locale
+ * @return the status bean
+ */
+ public static StatusBean create(IStatus status,
+ II18nService i18nService, Locale locale) {
+ StatusBean bean = new StatusBean();
+ bean.severity = status.getSeverity();
+ bean.bundleSymbolicName = status.getBundleSymblicName();
+ bean.messageCode = status.getCode();
+ bean.message = new Label(status.getMessage(), ContentMode.HTML);
+ bean.exception = status.getException();
+
+ bean.partId = (String) status
+ .getProperty(IStatus.PROP_UI_APPLICATION_ID);
+ bean.fieldId = (String) status.getProperty(IStatus.PROP_FIELD_ID);
+ String fieldI18nKey = (String) status
+ .getProperty(IStatus.PROP_FIELD_I18N_KEY);
+
+ bean.partName = toCommonI18n(bean.partId, i18nService, UI
+ .getCurrent().getLocale());
+ if (fieldI18nKey != null && !fieldI18nKey.equals("")) {
+ bean.fieldName = toCommonI18n(fieldI18nKey, i18nService, UI
+ .getCurrent().getLocale());
+ } else {
+ bean.fieldName = toCommonI18n(bean.fieldId, i18nService, UI
+ .getCurrent().getLocale());
+ }
+
+ bean.creatorClass = (String) status
+ .getProperty(IStatus.PROP_CREATOR);
+ bean.messagePath = (String) status
+ .getProperty(IStatus.PROP_JAVAX_PROPERTY_PATH);
+
+ return bean;
+ }
+
+ /**
+ * Gets the severity image.
+ *
+ * @return the severityImage
+ */
+ @SuppressWarnings("incomplete-switch")
+ public Resource getSeverityImage() {
+ switch (severity) {
+ case OK:
+ case INFO:
+ return ResourceUtil
+ .getResource("platform:/plugin/org.eclipse.osbp.vaaclipse.addons.application/images/info_tsk.png");
+ case WARNING:
+ return ResourceUtil
+ .getResource("platform:/plugin/org.eclipse.osbp.vaaclipse.addons.application/images/warn_tsk.png");
+ case ERROR:
+ case CRITICAL:
+ case SYSTEMERROR:
+ return ResourceUtil
+ .getResource("platform:/plugin/org.eclipse.osbp.vaaclipse.addons.application/images/error_tsk.png");
+ }
+
+ return null;
+ }
+
+ /**
+ * Sets the severity image.
+ *
+ * @param severityImage
+ * the severityImage to set
+ */
+ public void setSeverityImage(Resource severityImage) {
+ this.severityImage = severityImage;
+ }
+
+ /**
+ * Gets the severity.
+ *
+ * @return the severity
+ */
+ public Severity getSeverity() {
+ return severity;
+ }
+
+ /**
+ * Sets the severity.
+ *
+ * @param severity
+ * the severity to set
+ */
+ public void setSeverity(Severity severity) {
+ this.severity = severity;
+ }
+
+ /**
+ * Gets the bundle symbolic name.
+ *
+ * @return the bundleSymbolicName
+ */
+ public String getBundleSymbolicName() {
+ return bundleSymbolicName;
+ }
+
+ /**
+ * Sets the bundle symbolic name.
+ *
+ * @param bundleSymbolicName
+ * the bundleSymbolicName to set
+ */
+ public void setBundleSymbolicName(String bundleSymbolicName) {
+ this.bundleSymbolicName = bundleSymbolicName;
+ }
+
+ /**
+ * Gets the message.
+ *
+ * @return the message
+ */
+ public Label getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the message.
+ *
+ * @param message
+ * the message to set
+ */
+ public void setMessage(Label message) {
+ this.message = message;
+ }
+
+ /**
+ * Gets the exception.
+ *
+ * @return the exception
+ */
+ public Exception getException() {
+ return exception;
+ }
+
+ /**
+ * Sets the exception.
+ *
+ * @param exception
+ * the exception to set
+ */
+ public void setException(Exception exception) {
+ this.exception = exception;
+ }
+
+ /**
+ * Gets the part id.
+ *
+ * @return the partId
+ */
+ public String getPartId() {
+ return partId;
+ }
+
+ /**
+ * Sets the part id.
+ *
+ * @param partId
+ * the partId to set
+ */
+ public void setPartId(String partId) {
+ this.partId = partId;
+ }
+
+ /**
+ * Gets the field id.
+ *
+ * @return the fieldId
+ */
+ public String getFieldId() {
+ return fieldId;
+ }
+
+ /**
+ * Sets the field id.
+ *
+ * @param fieldId
+ * the fieldId to set
+ */
+ public void setFieldId(String fieldId) {
+ this.fieldId = fieldId;
+ }
+
+ /**
+ * Gets the part name.
+ *
+ * @return the partName
+ */
+ public String getPartName() {
+ return partName;
+ }
+
+ /**
+ * Sets the part name.
+ *
+ * @param partName
+ * the partName to set
+ */
+ public void setPartName(String partName) {
+ this.partName = partName;
+ }
+
+ /**
+ * Gets the field name.
+ *
+ * @return the fieldName
+ */
+ public String getFieldName() {
+ return fieldName;
+ }
+
+ /**
+ * Sets the field name.
+ *
+ * @param fieldName
+ * the fieldName to set
+ */
+ public void setFieldName(String fieldName) {
+ this.fieldName = fieldName;
+ }
+
+ /**
+ * Gets the message path.
+ *
+ * @return the messagePath
+ */
+ public String getMessagePath() {
+ return messagePath;
+ }
+
+ /**
+ * Sets the message path.
+ *
+ * @param messagePath
+ * the messagePath to set
+ */
+ public void setMessagePath(String messagePath) {
+ this.messagePath = messagePath;
+ }
+
+ /**
+ * Gets the message code.
+ *
+ * @return the messageCode
+ */
+ public String getMessageCode() {
+ return messageCode;
+ }
+
+ /**
+ * Sets the message code.
+ *
+ * @param messageCode
+ * the messageCode to set
+ */
+ public void setMessageCode(String messageCode) {
+ this.messageCode = messageCode;
+ }
+
+ /**
+ * Gets the creator class.
+ *
+ * @return the creatorClass
+ */
+ public String getCreatorClass() {
+ return creatorClass;
+ }
+
+ /**
+ * Sets the creator class.
+ *
+ * @param creatorClass
+ * the creatorClass to set
+ */
+ public void setCreatorClass(String creatorClass) {
+ this.creatorClass = creatorClass;
+ }
+
+ }
+
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..bf60011
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2014 - 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: -->
+<!--# Klemens Edler - 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.releng.maven</groupId>
+ <artifactId>org.eclipse.osbp.releng.maven.parent.tycho</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.eclipse.osbp.vaaclipse.addons</groupId>
+ <artifactId>org.eclipse.osbp.vaaclipse.addons.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <url>${distribution.site.url}</url>
+ <distributionManagement>
+ <site>
+ <id>gh-pages</id>
+ <name>OSBP GitHub Pages</name>
+ <url>${distribution.site.url}</url>
+ </site>
+ </distributionManagement>
+
+ <modules>
+ <module>org.eclipse.osbp.vaaclipse.addons.app</module>
+ <module>org.eclipse.osbp.vaaclipse.addons.common</module>
+ <module>org.eclipse.osbp.vaaclipse.addons.application</module>
+ <module>org.eclipse.osbp.vaaclipse.addons.perspective</module>
+ <module>org.eclipse.osbp.vaaclipse.addons.problems</module>
+ <module>org.eclipse.osbp.vaaclipse.addons.keybinding</module>
+ <module>org.eclipse.osbp.vaaclipse.addons.ecview</module>
+ <module>org.eclipse.osbp.vaaclipse.addons.ecview.lib</module>
+ <module>org.eclipse.osbp.vaaclipse.addons.feature</module>
+ </modules>
+
+ <properties>
+ <tycho-version>0.21.0</tycho-version>
+ <tychoExtrasVersion>0.21.0</tychoExtrasVersion>
+ <xtext.version>2.7.3</xtext.version>
+ <vaadin.version>7.3.8</vaadin.version>
+
+ <osbp.deployment.p2.name>vaaclipse.addons</osbp.deployment.p2.name>
+ <osbp.build.p2.project.name>org.eclipse.osbp.vaaclipse.addons.p2</osbp.build.p2.project.name>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+ <osbp.jacoco.include>org.eclipse.osbp.vaaclipse.*</osbp.jacoco.include>
+ <osbp.gitrepo.name>${project.groupId}</osbp.gitrepo.name>
+
+ </properties>
+
+ <developers>
+ <developer>
+ <id>florianpirchner</id>
+ <name>Florian Pirchner</name>
+ <email>florian.pirchner@gmail.com</email>
+ <timezone>+2</timezone>
+ </developer>
+ </developers>
+
+ <profiles>
+ <!--<profile>
+ <id>build.p2</id>
+ <activation>
+ <property>
+ <name>osbp.build.p2</name>
+ </property>
+ </activation>
+ <modules>
+ <module>org.eclipse.osbp.vaaclipse.addons.p2</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.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>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <compilerVersion>1.8</compilerVersion>
+ <encoding>UTF-8</encoding>
+ <source>1.8</source>
+ <target>1.8</target>
+ </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>