catch up with dev
diff --git a/.artifactVersions b/.artifactVersions
deleted file mode 100644
index 9a17bde..0000000
--- a/.artifactVersions
+++ /dev/null
@@ -1,4 +0,0 @@
-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
deleted file mode 100644
index 90b0f6b..0000000
--- a/.depVersions
+++ /dev/null
@@ -1,14 +0,0 @@
-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/.gitignore b/.gitignore
new file mode 100644
index 0000000..21b4ab3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,52 @@
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+bin/
+target
+/target/
+target/
+.DS_Store
+**/git.properties
+git.properties
+**/target/
+**/.metadata/
+
+**/emf-gen/**/.gitignore
+**/src-gen/**/.gitignore
+**/git.properties
+**/*.java._trace
+**/*.log
+**/*.log.properties
+
+**/bin/
+**/build/
+*.class
+*.ctrl
+**/Debug/
+.DS_Store
+*.ear
+*.war
+
+**/*.actionbin
+**/*.blipbin
+**/*.chartbin
+**/*.cubebin
+**/*.datatypebin
+**/*.dtobin
+**/*.entitybin
+**/*.servicebin
+**/*.tablebin
+**/*.uibin
+**/*.uisemanticbin
+**/*.xtendbin
+**/*.xtextbin
+
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 3260e4f..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,204 +0,0 @@
-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/README.md b/README.md
deleted file mode 100644
index c8ac9b7..0000000
--- a/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-lunifera-vaaclipse-addons
-===============
-
-Contains useful addons for Vaaclipse.
diff --git a/jenkins.build.config.xml b/jenkins.build.config.xml
index e0ee0e9..4762e18 100644
--- a/jenkins.build.config.xml
+++ b/jenkins.build.config.xml
@@ -15,6 +15,7 @@
<jenkins>
<!-- DO NOT EDIT BELOW THIS LINE -->
<jenkins.build.dependencies>
+ <jenkins.build.dependency>org.eclipse.osbp.authentication</jenkins.build.dependency>
<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>
@@ -23,6 +24,5 @@
<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/org.eclipse.osbp.vaaclipse.addons.app/.classpath b/org.eclipse.osbp.vaaclipse.addons.app/.classpath
new file mode 100644
index 0000000..cf36b56
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/.gitignore b/org.eclipse.osbp.vaaclipse.addons.app/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.app/META-INF/MANIFEST.MF
index 6fda93e..af7a0f5 100644
--- a/org.eclipse.osbp.vaaclipse.addons.app/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.app/META-INF/MANIFEST.MF
@@ -6,46 +6,47 @@
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.e4.ui.workbench;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.5.0,1.6.0)",
+ org.eclipse.e4.core.services;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.6.1,1.7.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.2.100,2.0.0)",
+ org.eclipse.core.databinding;bundle-version="[1.6.0,1.7.0)",
org.eclipse.core.commands;bundle-version="3.6.1",
- org.eclipse.e4.core.commands;bundle-version="0.10.1",
+ org.eclipse.e4.core.commands;bundle-version="[0.11.100,0.12.0)",
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.e4.ui.di;bundle-version="[1.1.100,1.2.0)",
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.e4.core.di.extensions;bundle-version="[0.14.0,0.15.0)",
+ com.vaadin.server;bundle-version="[7.7.6,7.8.0)",
+ com.vaadin.shared;bundle-version="[7.7.6,7.8.0)",
org.eclipse.osbp.vaaclipse.widgetset.default;bundle-version="[0.9.0,0.10.0)",
- org.eclipse.e4.ui.model.workbench,
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.2.0,2.0.0)",
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",
+ com.vaadin.external.atmosphere.runtime;bundle-version="2.2.9.vaadin2",
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
+ org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
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",
+Import-Package: javax.annotation,
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"
+ org.eclipse.osbp.ui.api.perspective;version="0.9.0",
+ org.eclipse.osbp.ui.api.user,
+ org.osgi.util.promise;version="1.0.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/src/org/eclipse/osbp/vaaclipse/addons/app/converter/VaaclipseConverterFactory.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/converter/VaaclipseConverterFactory.java
new file mode 100644
index 0000000..3c19404
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/converter/VaaclipseConverterFactory.java
@@ -0,0 +1,22 @@
+package org.eclipse.osbp.vaaclipse.addons.app.converter;
+
+import com.vaadin.data.util.converter.Converter;
+import com.vaadin.data.util.converter.DefaultConverterFactory;
+
+@SuppressWarnings("serial")
+public class VaaclipseConverterFactory extends DefaultConverterFactory {
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> createConverter(Class<PRESENTATION> presentationType,
+ Class<MODEL> modelType) {
+ if (String.class == presentationType && (
+ java.util.Date.class == modelType||
+ java.sql.Date.class == modelType||
+ java.sql.Timestamp.class == modelType)) {
+ return (Converter<PRESENTATION, MODEL>) new VaaclipseDateConverter();
+ }
+ return super.createConverter(presentationType, modelType);
+ }
+
+}
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/converter/VaaclipseDateConverter.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/converter/VaaclipseDateConverter.java
new file mode 100644
index 0000000..37e891c
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/converter/VaaclipseDateConverter.java
@@ -0,0 +1,100 @@
+package org.eclipse.osbp.vaaclipse.addons.app.converter;
+
+import java.text.DateFormat;
+import java.text.ParsePosition;
+import java.util.Date;
+import java.util.Locale;
+
+import com.vaadin.data.util.converter.Converter;
+
+@SuppressWarnings("serial")
+public class VaaclipseDateConverter implements Converter<String, Date> {
+
+ /**
+ * Returns the format used by
+ * {@link #convertToPresentation(Date, Class,Locale)} and
+ * {@link #convertToModel(String, Class, Locale)}.
+ *
+ * @param locale
+ * The locale to use
+ * @return A DateFormat instance
+ */
+ protected DateFormat getFormat(Locale locale) {
+ if (locale == null) {
+ locale = Locale.getDefault();
+ }
+
+ DateFormat f = DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
+ f.setLenient(false);
+ return f;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
+ * java.lang.Class, java.util.Locale)
+ */
+ @Override
+ public Date convertToModel(String value, Class<? extends Date> targetType, Locale locale)
+ throws com.vaadin.data.util.converter.Converter.ConversionException {
+ if (targetType != getModelType()) {
+ throw new ConversionException("Converter only supports " + getModelType().getName() + " (targetType was "
+ + targetType.getName() + ")");
+ }
+
+ if (value == null) {
+ return null;
+ }
+
+ // Remove leading and trailing white space
+ value = value.trim();
+
+ ParsePosition parsePosition = new ParsePosition(0);
+ Date parsedValue = getFormat(locale).parse(value, parsePosition);
+ if (parsePosition.getIndex() != value.length()) {
+ throw new ConversionException("Could not convert '" + value + "' to " + getModelType().getName());
+ }
+
+ return parsedValue;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.vaadin.data.util.converter.Converter#convertToPresentation(java.lang
+ * .Object, java.lang.Class, java.util.Locale)
+ */
+ @Override
+ public String convertToPresentation(Date value, Class<? extends String> targetType, Locale locale)
+ throws com.vaadin.data.util.converter.Converter.ConversionException {
+ if (value == null) {
+ return null;
+ }
+
+ return getFormat(locale).format(value);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.data.util.converter.Converter#getModelType()
+ */
+ @Override
+ public Class<Date> getModelType() {
+ return Date.class;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.data.util.converter.Converter#getPresentationType()
+ */
+ @Override
+ public Class<String> getPresentationType() {
+ return String.class;
+ }
+
+}
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
index 1b2d977..e590129 100644
--- 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
@@ -241,99 +241,95 @@
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("/");
+ 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 (segments.length < 2)
+ throw new IllegalArgumentException();
- if (!"VAADIN".equals(segments[0]))
- 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;
+ 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 {
- 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) {
- }
+ 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 {
+ 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;
+ } 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 {
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
index 4a577a6..29754ab 100644
--- 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
@@ -70,31 +70,6 @@
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)
*/
diff --git a/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/session/VaaclipseSession.java b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/session/VaaclipseSession.java
new file mode 100644
index 0000000..a0691b9
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.app/src/org/eclipse/osbp/vaaclipse/addons/app/session/VaaclipseSession.java
@@ -0,0 +1,145 @@
+package org.eclipse.osbp.vaaclipse.addons.app.session;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutorService;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.osbp.runtime.common.session.AbstractSession;
+import org.eclipse.osbp.runtime.common.session.ISession;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.ui.UI;
+
+/**
+ * This session is registered as an OSGi service any time a new UI-Instance is
+ * created.
+ */
+public class VaaclipseSession extends AbstractSession {
+
+ /**
+ * OSGi service properties.
+ */
+ public static String PROP_VAADIN_UI_ID = "vaadinUIId";
+ public static String PROP_E4_APP_ID = "e4SessionId";
+ public static String PROP_USER_NAME = "userName";
+ public static String PROP_LOCALE = "locale";
+
+ private static Logger LOGGER = LoggerFactory.getLogger(VaaclipseSession.class);
+
+ final UI ui;
+ final IEclipseContext eclipseContext;
+
+ final List<ISession> slaves = new ArrayList<ISession>();
+ private ISession masterSession;
+ private final String fragment;
+
+ public VaaclipseSession(UI ui, IEclipseContext eclipseContext, String fragment) {
+ super();
+ this.ui = ui;
+ this.eclipseContext = eclipseContext;
+ this.fragment = fragment;
+ setType(Type.MASTER);
+ }
+
+ @Override
+ public <T> T get(Class<T> key) {
+ return eclipseContext.get(key);
+ }
+
+ @Override
+ public Object get(String key) {
+ return eclipseContext.get(key);
+ }
+
+ @Override
+ protected <T> CompletableFuture<T> doAsync(final Function<ISession, T> function, ExecutorService executor) {
+ CompletableFuture<T> promise = new CompletableFuture<>();
+ runVaadinAsync(function, promise);
+ return promise;
+ }
+
+ protected <T> void runVaadinAsync(final Function<ISession, T> function, CompletableFuture<T> promise) {
+ ui.access(() -> {
+ try {
+ T value = function.apply(this);
+ // notify the promise
+ promise.complete(value);
+ } catch (Exception e) {
+ promise.completeExceptionally(e);
+ }
+ });
+ }
+
+ @Override
+ public void set(String key, Object object) {
+ eclipseContext.set(key, object);
+ }
+
+ @Override
+ public List<ISession> getSlaves() {
+ return Collections.unmodifiableList(slaves);
+ }
+
+ @Override
+ public List<ISession> getSlaves(Predicate<ISession> filter) {
+ return slaves.stream().filter(filter).collect(Collectors.toList());
+ }
+
+ @Override
+ public void addSlave(ISession slave) {
+ if (isSlaveSession()) {
+ throw new IllegalStateException("Not allowed for slaves");
+ }
+ slaves.add(slave);
+ }
+
+ @Override
+ public void removeSlave(ISession slave) {
+ if (isSlaveSession()) {
+ throw new IllegalStateException("Not allowed for slaves");
+ }
+ slaves.remove(slave);
+ }
+
+ @Override
+ public boolean isMasterSession() {
+ return getType() == Type.MASTER;
+ }
+
+ @Override
+ public boolean isSlaveSession() {
+ return getType() == Type.SLAVE;
+ }
+
+ @Override
+ public ISession getMaster() {
+ return masterSession;
+ }
+
+ @Override
+ public String getHost() {
+ try {
+ InetAddress netAddress = InetAddress
+ .getByName(eclipseContext.get(UI.class).getPage().getWebBrowser().getAddress());
+ return netAddress.getHostName();
+ } catch (UnknownHostException e) {
+ LOGGER.error("{}", e);
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ @Override
+ public String getFragment() {
+ return fragment;
+ }
+
+}
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
index 7b13b56..df94015 100644
--- 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
@@ -12,7 +12,12 @@
package org.eclipse.osbp.vaaclipse.addons.app.webapp;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Dictionary;
import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Locale;
import java.util.Map;
import java.util.UUID;
@@ -64,14 +69,17 @@
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.common.session.ISession;
import org.eclipse.osbp.runtime.web.vaadin.databinding.VaadinObservables;
+import org.eclipse.osbp.ui.api.perspective.IPerspectiveProvider;
import org.eclipse.osbp.ui.api.user.IUser;
import org.eclipse.osbp.vaaclipse.addons.app.VaadinE4Application;
+import org.eclipse.osbp.vaaclipse.addons.app.converter.VaaclipseConverterFactory;
import org.eclipse.osbp.vaaclipse.addons.app.servlet.VaadinExecutorServiceImpl;
+import org.eclipse.osbp.vaaclipse.addons.app.session.VaaclipseSession;
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;
@@ -79,6 +87,9 @@
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.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceRegistration;
import org.osgi.service.event.EventHandler;
import com.vaadin.annotations.Push;
@@ -157,6 +168,8 @@
/** The layout changed observer. */
private LayoutChangedObserver layoutChangedObserver;
+ private ServiceRegistration<ISession> sessionReg;
+
/** The temp user store. */
private static Map<String, Object[]> tempUserStore = new HashMap<String, Object[]>();
@@ -192,14 +205,16 @@
*/
@Override
public void init(VaadinRequest request) {
- initializeWorkbenchState();
+ initializeWorkbenchState(request);
}
/**
* Initializes the vaaclipse workbench.
+ *
+ * @param request
*/
@SuppressWarnings({ "unchecked", "unused" })
- protected void initializeWorkbenchState() {
+ protected void initializeWorkbenchState(VaadinRequest request) {
executorService = new VaadinExecutorServiceImpl();
context = VaadinE4Application.getInstance().getAppContext();
logger = VaadinE4Application.getInstance().getLogger();
@@ -207,7 +222,7 @@
String sessionId = getSession().getSession().getId();
Object[] prevUser = tempUserStore.remove(sessionId);
if (prevUser != null) {
- this.user = (IUser)prevUser[0];
+ this.user = (IUser) prevUser[0];
this.userClass = (Class<Object>) prevUser[1];
}
@@ -231,9 +246,10 @@
if (authProvider == null || authProvider.trim().isEmpty()) {
appContext.set(AuthenticationConstants.USER_ID, "Administrator");
- createAndRunWorkbench();
+ createAndRunWorkbench(request);
} else {
- IContributionFactory contributionFactory = (IContributionFactory) appContext.get(IContributionFactory.class.getName());
+ IContributionFactory contributionFactory = (IContributionFactory) appContext
+ .get(IContributionFactory.class.getName());
IEclipseContext authConext = appContext.createChild();
VerticalLayout content = new VerticalLayout();
@@ -270,22 +286,23 @@
if (user instanceof IUser) {
// set the theme set in user_account
String themeId = ((IUser) user).getTheme();
- if(themeId != null) {
+ if (themeId != null) {
HttpSession httpSession = ((WrappedHttpSession) getSession().getSession()).getHttpSession();
httpSession.setAttribute(ThemeConstants.Attrubutes.themeid, themeId);
setThemeInternal(themeId.replaceAll("\\.", "-"));
}
}
- createAndRunWorkbench();
+ createAndRunWorkbench(request);
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);
+ user.setApplication((MApplication) appContext.get(MApplication.class.getName()));
+ // if there is a default perspective set in user_account
+ // - load it
+ IPerspectiveProvider perspectiveProvider = appContext.get(IPerspectiveProvider.class);
+ String perspectiveId = user.getPerspective();
+ if (perspectiveId != null && !perspectiveId.isEmpty()) {
+ perspectiveProvider.openPerspective(perspectiveId);
}
}
}
@@ -322,6 +339,11 @@
*/
protected void disposeWorkbenchState() {
+ if (sessionReg != null) {
+ sessionReg.unregister();
+ sessionReg = null;
+ }
+
if (layoutChangedObserver != null) {
layoutChangedObserver.dispose();
layoutChangedObserver = null;
@@ -412,6 +434,7 @@
appContext.set("vaadinUI", this);
appContext.set(UI.class, this);
appContext.set(VaadinExecutorService.class, getExecutorService());
+ appContext.set(ISession.Type.class, ISession.Type.MASTER);
appContext.set(UISynchronize.class, new UISynchronize() {
public void syncExec(Runnable runnable) {
@@ -439,7 +462,12 @@
}
// setup the widgetToModel-associations
- appContext.set(IWidgetModelAssociations.class, ContextInjectionFactory.make(WidgetModelAssociations.class, appContext));
+ appContext.set(IWidgetModelAssociations.class,
+ ContextInjectionFactory.make(WidgetModelAssociations.class, appContext));
+
+ // setup a new converterFactory to handle the "default" date formatting
+ // without time part
+ getSession().setConverterFactory(new VaaclipseConverterFactory());
}
/**
@@ -585,17 +613,19 @@
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));
+ // 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);
+ ISystemuserModelHandler service = (ISystemuserModelHandler) factory.create(CUSTOMIZED_MODEL_SERVICE,
+ eclipseContext);
eclipseContext.set(ISystemuserModelHandler.class, service);
String resourceHandler = getArgValue(E4Workbench.MODEL_RESOURCE_HANDLER, appContext, false);
@@ -630,7 +660,8 @@
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,
+ 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);
@@ -733,10 +764,10 @@
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.LOCALE, getLocale());
+ logger.debug("Setting locale to " + getLocale().toLanguageTag());
+ TranslationService bundleTranslationProvider = TranslationProviderFactory
+ .bundleTranslationService(serviceContext);
serviceContext.set(TranslationService.class, bundleTranslationProvider);
ExceptionHandler exceptionHandler = new ExceptionHandler();
@@ -746,8 +777,8 @@
// 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));
+ appContext.set(IServiceConstants.ACTIVE_SHELL,
+ new ActiveChildLookupFunction(IServiceConstants.ACTIVE_SHELL, E4Workbench.LOCAL_ACTIVE_SHELL));
return appContext;
}
@@ -771,13 +802,54 @@
/**
* Creates the and run workbench.
+ *
+ * @param request
*/
- protected void createAndRunWorkbench() {
+ protected void createAndRunWorkbench(VaadinRequest request) {
e4Workbench = createE4Workbench(context);
e4Workbench.createAndRunUI(e4Workbench.getApplication());
// register the layout changed observer when application was started
- layoutChangedObserver = ContextInjectionFactory.make(LayoutChangedObserver.class, e4Workbench.getApplication().getContext());
+ layoutChangedObserver = ContextInjectionFactory.make(LayoutChangedObserver.class,
+ e4Workbench.getApplication().getContext());
e4Workbench.getApplication().getContext().set(LayoutChangedObserver.class, layoutChangedObserver);
+
+ registerSessionService(request);
+ }
+
+ /**
+ * Registers the session service.
+ *
+ * @param request
+ */
+ private void registerSessionService(VaadinRequest request) {
+ BundleContext bc = FrameworkUtil.getBundle(getClass()).getBundleContext();
+
+ Dictionary<String, Object> dictionary = new Hashtable<>();
+ dictionary.put("vaadinUIId", Integer.toString(getUIId()));
+ String instanceId = (String) appContext.get("e4ApplicationInstanceId");
+ if (instanceId != null) {
+ dictionary.put("e4SessionId", instanceId);
+ }
+ IUser user = (IUser) appContext.get("user");
+ if (user != null) {
+ dictionary.put("userName", user.getUserName());
+ }
+ Locale locale = (Locale) appContext.get(TranslationService.LOCALE);
+ if (locale != null) {
+ dictionary.put("locale", locale.toLanguageTag());
+ }
+
+ try {
+ InetAddress netAddress = InetAddress.getByName(getPage().getWebBrowser().getAddress());
+ String hostName = netAddress.getHostName();
+ appContext.set("ip", hostName);
+ } catch (UnknownHostException e) {
+ logger.error("{}", e);
+ }
+
+ appContext.set(ISession.Type.class, ISession.Type.MASTER);
+
+ sessionReg = bc.registerService(ISession.class, new VaaclipseSession(this, appContext, null), dictionary);
}
}
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/.classpath b/org.eclipse.osbp.vaaclipse.addons.application/.classpath
new file mode 100644
index 0000000..cf36b56
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/.gitignore b/org.eclipse.osbp.vaaclipse.addons.application/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.application/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.application/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.application/META-INF/MANIFEST.MF
index 3fcae17..270245c 100644
--- a/org.eclipse.osbp.vaaclipse.addons.application/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.application/META-INF/MANIFEST.MF
@@ -4,26 +4,26 @@
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)",
+Require-Bundle: org.eclipse.core.databinding;bundle-version="[1.6.0,1.7.0)",
+ com.vaadin.server;bundle-version="[7.7.6,7.8.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.5.0,1.6.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.e4.core.services;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="[0.14.0,0.15.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.6.1,1.7.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.1.100,1.2.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.4.0,1.5.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.e4.ui.services;bundle-version="[1.2.100,2.0.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)",
+ com.vaadin.shared;bundle-version="[7.7.6,7.8.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",
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: javax.annotation,
javax.inject;version="1.0.0",
org.osgi.framework;version="1.8.0",
org.osgi.service.event;version="1.3.0",
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.classpath b/org.eclipse.osbp.vaaclipse.addons.common/.classpath
new file mode 100644
index 0000000..43b9862
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.gitignore b/org.eclipse.osbp.vaaclipse.addons.common/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.project b/org.eclipse.osbp.vaaclipse.addons.common/.project
index c3e757c..427b821 100644
--- a/org.eclipse.osbp.vaaclipse.addons.common/.project
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.project
@@ -36,11 +36,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>com.vaadin.integration.eclipse.addonStylesBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
<arguments>
</arguments>
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.settings/com.vaadin.integration.eclipse.prefs b/org.eclipse.osbp.vaaclipse.addons.common/.settings/com.vaadin.integration.eclipse.prefs
new file mode 100644
index 0000000..0904e44
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.settings/com.vaadin.integration.eclipse.prefs
@@ -0,0 +1,2 @@
+com.vaadin.integration.eclipse.mavenLatestVersionsUpgrade=["7.7.7"]
+eclipse.preferences.version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.common/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.common/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.common/META-INF/MANIFEST.MF
index 377cefc..d337e73 100644
--- a/org.eclipse.osbp.vaaclipse.addons.common/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.common/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@
Bundle-Vendor: Eclipse OSBP
Bundle-Version: 0.9.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: javax.annotation;version="1.1.0",
+Import-Package: javax.annotation,
javax.inject,
org.eclipse.osgi.util;version="[1.1.0,1.2.0)",
org.osgi.framework;version="1.8.0",
@@ -17,18 +17,19 @@
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.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)",
+Require-Bundle: com.vaadin.server;bundle-version="[7.7.6,7.8.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.5.0,1.6.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.e4.core.di;bundle-version="[1.6.1,1.7.0)",
+ org.eclipse.e4.core.services;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.1.100,1.2.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.2.100,2.0.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.workbench;bundle-version="[1.4.0,1.5.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",
@@ -37,5 +38,5 @@
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"
+ com.vaadin.shared;bundle-version="[7.7.6,7.8.0)"
Service-Component: OSGI-INF/*.xml
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.classpath b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.classpath
new file mode 100644
index 0000000..630e6c5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="src" path="model"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.gitignore b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
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
index 4c6750a..c5a147c 100644
--- a/org.eclipse.osbp.vaaclipse.addons.ecview.lib/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview.lib/META-INF/MANIFEST.MF
@@ -4,10 +4,10 @@
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-RequiredExecutionEnvironment: JavaSE-1.8
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.xtext.xbase.lib;bundle-version="[2.11.0,2.12.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/.classpath b/org.eclipse.osbp.vaaclipse.addons.ecview/.classpath
new file mode 100644
index 0000000..630e6c5
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="src" path="model"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/.gitignore b/org.eclipse.osbp.vaaclipse.addons.ecview/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.ecview/META-INF/MANIFEST.MF
index 856fe83..067c3a4 100644
--- a/org.eclipse.osbp.vaaclipse.addons.ecview/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/META-INF/MANIFEST.MF
@@ -5,16 +5,17 @@
Bundle-Vendor: Eclipse OSBP
Bundle-Version: 0.9.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: javax.annotation;version="1.1.0",
+Import-Package: javax.annotation,
javax.inject;version="1.0.0",
+ org.eclipse.osbp.ui.api.metadata;version="0.9.0",
+ org.eclipse.osbp.ui.api.themes;version="0.9.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)",
+Require-Bundle: com.vaadin.server;bundle-version="[7.7.6,7.8.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)",
@@ -22,15 +23,15 @@
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.e4.core.contexts;bundle-version="[1.5.0,1.6.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.6.1,1.7.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="[0.14.0,0.15.0)",
+ org.eclipse.e4.core.services;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.1.100,1.2.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.2.100,2.0.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.4.0,1.5.0)",
+ com.vaadin.shared;bundle-version="[7.7.6,7.8.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)",
@@ -39,33 +40,4 @@
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
+Service-Component: OSGI-INF/*.xml
diff --git a/org.eclipse.osbp.vaaclipse.addons.ecview/build.properties b/org.eclipse.osbp.vaaclipse.addons.ecview/build.properties
index cad6f44..46ac9ce 100644
--- a/org.eclipse.osbp.vaaclipse.addons.ecview/build.properties
+++ b/org.eclipse.osbp.vaaclipse.addons.ecview/build.properties
@@ -1,9 +1,6 @@
bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
.,\
OSGI-INF/,\
- .classpath,\
- .project,\
- .settings/,\
LICENSE.txt,\
epl-v10.html,\
license.html,\
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
index 19e1ba2..309dec6 100644
--- 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
@@ -29,11 +29,11 @@
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.filter.IDTOService;
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;
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
deleted file mode 100644
index dbe643c..0000000
--- a/org.eclipse.osbp.vaaclipse.addons.ecview/src/org/eclipse/osbp/vaaclipse/addons/ecview/views/GenericECViewPart.java
+++ /dev/null
@@ -1,1217 +0,0 @@
-/**
- * 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/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.feature/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.feature/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.feature/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.feature/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.feature/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/.classpath b/org.eclipse.osbp.vaaclipse.addons.keybinding/.classpath
new file mode 100644
index 0000000..cf36b56
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/.gitignore b/org.eclipse.osbp.vaaclipse.addons.keybinding/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/.project b/org.eclipse.osbp.vaaclipse.addons.keybinding/.project
index 6deb2d2..248c491 100644
--- a/org.eclipse.osbp.vaaclipse.addons.keybinding/.project
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.project
@@ -41,6 +41,11 @@
</arguments>
</buildCommand>
<buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -51,5 +56,6 @@
<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.keybinding/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.keybinding/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.keybinding/META-INF/MANIFEST.MF
index 72aefbc..6bb1068 100644
--- a/org.eclipse.osbp.vaaclipse.addons.keybinding/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.keybinding/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@
Bundle-Vendor: Eclipse OSBP
Bundle-Version: 0.9.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: javax.annotation;version="1.1.0",
+Import-Package: javax.annotation,
javax.inject,
org.eclipse.osgi.util;version="[1.1.0,1.2.0)",
org.osgi.framework;version="1.8.0",
@@ -13,18 +13,18 @@
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)",
+Require-Bundle: com.vaadin.server;bundle-version="[7.7.6,7.8.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.5.0,1.6.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.e4.core.di;bundle-version="[1.6.1,1.7.0)",
+ org.eclipse.e4.core.services;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.1.100,1.2.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.2.100,2.0.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.e4.ui.workbench;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.2.0,1.3.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",
@@ -34,7 +34,6 @@
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/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
index 8d511e3..e5a283e 100644
--- 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
@@ -141,12 +141,8 @@
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;
- }
+ for (MBindingContext context : mApp.getBindingContexts()) {
+ aContexts.add(context);
}
}
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/.classpath b/org.eclipse.osbp.vaaclipse.addons.login/.classpath
new file mode 100644
index 0000000..cf36b56
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/.gitignore b/org.eclipse.osbp.vaaclipse.addons.login/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/.project b/org.eclipse.osbp.vaaclipse.addons.login/.project
index a0821a8..c9ad268 100644
--- a/org.eclipse.osbp.vaaclipse.addons.login/.project
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.project
@@ -35,11 +35,17 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</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.login/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..6155a21
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.login/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,9 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.login/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.login/META-INF/MANIFEST.MF
index 01cf929..c09dd56 100644
--- a/org.eclipse.osbp.vaaclipse.addons.login/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.login/META-INF/MANIFEST.MF
@@ -4,29 +4,30 @@
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)",
+Require-Bundle: org.eclipse.core.databinding;bundle-version="[1.6.0,1.7.0)",
+ com.vaadin.server;bundle-version="[7.7.6,7.8.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.3.100,1.6.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.1.0,1.3.0)",
+ org.eclipse.e4.core.services;bundle-version="[1.2.1,2.1.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="[0.12.0,0.15.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.4.0,1.7.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.0.0,1.2.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.2.2,1.5.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.e4.ui.services;bundle-version="[1.1.0,1.3.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)",
+ com.vaadin.shared;bundle-version="[7.7.6,7.8.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",
+Import-Package: javax.annotation,
javax.inject;version="1.0.0",
+ org.eclipse.osbp.user;version="0.9.0",
org.osgi.framework;version="1.8.0",
org.osgi.service.event;version="1.3.0",
org.osgi.util.tracker;version="1.5.1",
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
index 003fde5..b2c464c 100644
--- 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
@@ -17,8 +17,8 @@
import javax.inject.Inject;
import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.osbp.user.User;
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;
@@ -52,16 +52,7 @@
dialog.close();
eventBroker.send(AuthenticationConstants.Events.Authentication.name,
- new User());
- }
-
- private class User implements IUser {
-
- @Override
- public String getUserName() {
- return userName.getValue();
- }
-
+ new User(userName.getValue()));
}
}
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/.classpath b/org.eclipse.osbp.vaaclipse.addons.perspective/.classpath
new file mode 100644
index 0000000..cf36b56
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/.gitignore b/org.eclipse.osbp.vaaclipse.addons.perspective/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.perspective/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.perspective/META-INF/MANIFEST.MF
index e0e3c9a..6df70aa 100644
--- a/org.eclipse.osbp.vaaclipse.addons.perspective/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.perspective/META-INF/MANIFEST.MF
@@ -4,8 +4,8 @@
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",
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: javax.annotation,
javax.inject,
org.eclipse.osgi.util;version="[1.1.0,1.2.0)",
org.osgi.framework;version="1.8.0",
@@ -13,17 +13,17 @@
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)",
+Require-Bundle: com.vaadin.server;bundle-version="[7.7.6,7.8.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.5.0,1.6.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.e4.core.di;bundle-version="[1.6.1,1.7.0)",
+ org.eclipse.e4.core.services;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.1.100,1.2.0)",
+ org.eclipse.e4.ui.services;bundle-version="[1.2.100,2.0.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.e4.ui.workbench;bundle-version="[1.4.0,1.5.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.2.0,1.3.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",
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/.classpath b/org.eclipse.osbp.vaaclipse.addons.problems/.classpath
new file mode 100644
index 0000000..cf36b56
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/.gitignore b/org.eclipse.osbp.vaaclipse.addons.problems/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/.project b/org.eclipse.osbp.vaaclipse.addons.problems/.project
index a81c92b..3b4106d 100644
--- a/org.eclipse.osbp.vaaclipse.addons.problems/.project
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.project
@@ -36,6 +36,11 @@
</arguments>
</buildCommand>
<buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
@@ -46,5 +51,6 @@
<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.problems/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..f6a7c78
--- /dev/null
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,10 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.vaaclipse.addons.problems/META-INF/MANIFEST.MF b/org.eclipse.osbp.vaaclipse.addons.problems/META-INF/MANIFEST.MF
index e0aa036..7b4bb21 100644
--- a/org.eclipse.osbp.vaaclipse.addons.problems/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.vaaclipse.addons.problems/META-INF/MANIFEST.MF
@@ -5,26 +5,26 @@
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)",
+Require-Bundle: org.eclipse.core.databinding;bundle-version="[1.6.0,1.7.0)",
+ com.vaadin.server;bundle-version="[7.7.6,7.8.0)",
+ org.eclipse.e4.core.contexts;bundle-version="[1.5.0,1.6.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.2.0,1.3.0)",
+ org.eclipse.e4.core.services;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.e4.core.di.extensions;bundle-version="[0.14.0,0.15.0)",
+ org.eclipse.e4.core.di;bundle-version="[1.6.1,1.7.0)",
+ org.eclipse.e4.ui.di;bundle-version="[1.1.100,1.2.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.4.0,1.5.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.e4.ui.services;bundle-version="[1.2.100,2.0.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)",
+ com.vaadin.shared;bundle-version="[7.7.6,7.8.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",
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: javax.annotation,
javax.inject;version="1.0.0",
org.osgi.framework;version="1.8.0",
org.osgi.service.event;version="1.3.0",