summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorsten Sommer2013-07-13 16:25:25 -0400
committerTorsten Sommer2013-07-13 16:25:25 -0400
commit7dfd6e05025999a495911641f0b9cfc409bc4834 (patch)
tree608e9bf39d44627533304ee7ee2daada802db38d
parent6d57663f8f2c9a606dc02ea416dbe94d18b96423 (diff)
parentabbae7435278dd652a3c4eaa6854c71d64a16b20 (diff)
downloadorg.eclipse.efxclipse-7dfd6e05025999a495911641f0b9cfc409bc4834.tar.gz
org.eclipse.efxclipse-7dfd6e05025999a495911641f0b9cfc409bc4834.tar.xz
org.eclipse.efxclipse-7dfd6e05025999a495911641f0b9cfc409bc4834.zip
Merge remote-tracking branch 'origin/master' into ecp
-rwxr-xr-xbundles/runtime/org.eclipse.fx.core.log4j/OSGI-INF/log4jlogger.xml3
-rwxr-xr-xbundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF36
-rw-r--r--bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/ExtendedFXMLLoader.java32
-rw-r--r--bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/FXMLDocument.java17
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/.classpath7
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/.gitignore1
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/.project33
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/META-INF/MANIFEST.MF18
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/OSGI-INF/component.xml8
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/build.properties5
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/pom.xml34
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleContextFunction.java14
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleServiceImpl.java78
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/ELifecycleService.java16
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/LifecycleAddon.java47
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/annotations/PreClose.java14
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/annotations/PreShow.java14
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/META-INF/MANIFEST.MF3
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseMenuRenderer.java127
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseStackRenderer.java30
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseWorkbenchRendererFactory.java3
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/widget/WMenu.java2
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/META-INF/MANIFEST.MF3
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefMenuRenderer.java13
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartMenuRenderer.java12
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefToolItemMenuRenderer.java7
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.ant/.classpath26
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.ant/.gitignore1
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.ant/.project23
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.ant/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.ant/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.ant/pom.xml25
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.ant/src/main/java/org/eclipse/fx/ide/ant/FXOsgiLaunchTask.java110
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.fxgraph/src/org/eclipse/fx/ide/fxgraph/converter/FXMLSaxHandler.xtend78
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.jdt.core/src/org/eclipse/fx/ide/jdt/core/internal/BuildPathSupport.java13
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.jdt.ui/plugin.properties4
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/at.bestsolution.efxclipse.tooling.build-0.0.1.jarbin3955 -> 0 bytes
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/fx-osgi-launch.jarbin16855 -> 0 bytes
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/org.eclipse.fx.ide.ant-0.9.0.jarbin0 -> 4743 bytes
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/e4App.rtask5
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/mediaSample.rtask1
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.pde.ui.e4/src/org/eclipse/fx/ide/pde/ui/e4/project/template/NativeLaunchGenerator.xtend6
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.pde.ui/generator-tasks/osgi-app.rtask2
-rw-r--r--org.eclipse.fx.ide.fxml.compiler/src/org/eclipse/fx/ide/fxml/compiler/FXGraphJavaGenerator.xtend4
-rwxr-xr-xreleng/org.eclipse.fx.ide.releng/pom.xml97
-rw-r--r--releng/org.eclipse.fx.ide.updatesite/pom.xml36
-rwxr-xr-xreleng/org.eclipse.fx.releng/pom.xml99
-rwxr-xr-xreleng/org.eclipse.fx.releng/pom_jdt8.xml244
-rw-r--r--releng/org.eclipse.fx.updatesite/pom.xml40
-rw-r--r--releng/runtime/org.eclipse.fx.target.feature/feature.xml24
-rw-r--r--releng/runtime/org.eclipse.fx.target.rcp.feature/.gitignore1
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/Application.e4xmi7
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF9
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product1
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/contributions/DMContribution.java22
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/ClosePerspectiveHandler.java49
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/RegisterDynamicLifecycle.java16
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/LifeCycle.java31
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/MenuLifecycle.java34
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/SecondLifeCycle.java20
62 files changed, 1346 insertions, 286 deletions
diff --git a/bundles/runtime/org.eclipse.fx.core.log4j/OSGI-INF/log4jlogger.xml b/bundles/runtime/org.eclipse.fx.core.log4j/OSGI-INF/log4jlogger.xml
index e8edcb407..7f3d347dc 100755
--- a/bundles/runtime/org.eclipse.fx.core.log4j/OSGI-INF/log4jlogger.xml
+++ b/bundles/runtime/org.eclipse.fx.core.log4j/OSGI-INF/log4jlogger.xml
@@ -2,4 +2,7 @@
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.fx.core.log4j.log4jlogger">
<implementation class="org.eclipse.fx.core.log4j.Log4JLoggerFactory"/>
<property name="service.ranking" type="Integer" value="1"/>
+ <service>
+ <provide interface="org.eclipse.fx.core.log.LoggerFactory"/>
+ </service>
</scr:component>
diff --git a/bundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF b/bundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF
index 79e797d63..6ab24ec8e 100755
--- a/bundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF
+++ b/bundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF
@@ -4,8 +4,42 @@ Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.fx.core
Bundle-Version: 0.8.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: javax.inject;version="1.0.0"
+Import-Package: javafx.animation;version="2.2.0",
+ javafx.application;version="2.2.0",
+ javafx.beans;version="2.2.0",
+ javafx.beans.binding;version="2.2.0",
+ javafx.beans.property;version="2.2.0",
+ javafx.beans.property.adapter;version="2.2.0",
+ javafx.beans.value;version="2.2.0",
+ javafx.collections;version="2.2.0",
+ javafx.concurrent;version="2.2.0",
+ javafx.css;version="8.0.0",
+ javafx.embed.swing;version="2.2.0",
+ javafx.embed.swt;version="2.2.0",
+ javafx.event;version="2.2.0",
+ javafx.fxml;version="2.2.0",
+ javafx.geometry;version="2.2.0",
+ javafx.scene;version="2.2.0",
+ javafx.scene.canvas;version="2.2.0",
+ javafx.scene.chart;version="2.2.0",
+ javafx.scene.control;version="2.2.0",
+ javafx.scene.control.cell;version="2.2.0",
+ javafx.scene.effect;version="2.2.0",
+ javafx.scene.image;version="2.2.0",
+ javafx.scene.input;version="2.2.0",
+ javafx.scene.layout;version="2.2.0",
+ javafx.scene.media;version="2.2.0",
+ javafx.scene.paint;version="2.2.0",
+ javafx.scene.shape;version="2.2.0",
+ javafx.scene.text;version="2.2.0",
+ javafx.scene.transform;version="2.2.0",
+ javafx.scene.web;version="2.2.0",
+ javafx.stage;version="2.2.0",
+ javafx.util;version="2.2.0",
+ javafx.util.converter;version="2.2.0",
+ javax.inject;version="1.0.0"
Export-Package: org.eclipse.fx.core,
+ org.eclipse.fx.core.fxml,
org.eclipse.fx.core.log,
org.eclipse.fx.core.update
Bundle-Vendor: %Bundle-Vendor
diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/ExtendedFXMLLoader.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/ExtendedFXMLLoader.java
new file mode 100644
index 000000000..835bc7880
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/ExtendedFXMLLoader.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2013 BestSolution.at and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.core.fxml;
+
+import java.io.IOException;
+
+import javafx.fxml.FXMLLoader;
+
+
+public class ExtendedFXMLLoader {
+ public <T> T load(ClassLoader cl, String path) throws IOException {
+ try {
+ Class<?> clazz = cl.loadClass(path.replace('/', '.'));
+ FXMLDocument<T> d = (FXMLDocument<T>) clazz.newInstance();
+ return d.load(null);
+ } catch (ClassNotFoundException e) {
+ return FXMLLoader.load(cl.getResource(path));
+ } catch (InstantiationException e) {
+ throw new IOException(e);
+ } catch (IllegalAccessException e) {
+ throw new IOException(e);
+ }
+ }
+}
diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/FXMLDocument.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/FXMLDocument.java
new file mode 100644
index 000000000..5c11234be
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/FXMLDocument.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2013 BestSolution.at and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.core.fxml;
+
+import java.util.ResourceBundle;
+
+public abstract class FXMLDocument<T> {
+ public abstract T load(ResourceBundle bundle);
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/.classpath b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.classpath
new file mode 100644
index 000000000..098194ca4
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.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.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/.gitignore b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.gitignore
new file mode 100644
index 000000000..5e56e040e
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.gitignore
@@ -0,0 +1 @@
+/bin
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/.project b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.project
new file mode 100644
index 000000000..7b38d57b1
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.fx.ui.lifecycle</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/.settings/org.eclipse.jdt.core.prefs b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..f42de363a
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.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.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/.settings/org.eclipse.pde.core.prefs b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..e8ff8be0b
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+pluginProject.equinox=false
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/META-INF/MANIFEST.MF b/bundles/runtime/org.eclipse.fx.ui.lifecycle/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..795322649
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Lifecycle
+Bundle-SymbolicName: org.eclipse.fx.ui.lifecycle
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.e4.ui.model.workbench,
+ org.eclipse.e4.core.di,
+ org.eclipse.e4.core.contexts,
+ org.eclipse.e4.core.services,
+ org.eclipse.e4.ui.workbench,
+ org.eclipse.emf.ecore;bundle-version="2.9.0"
+Export-Package: org.eclipse.fx.ui.lifecycle,
+ org.eclipse.fx.ui.lifecycle.annotations
+Import-Package: javax.annotation;version="1.1.0",
+ javax.inject;version="1.0.0"
+Service-Component: OSGI-INF/component.xml
+Bundle-ActivationPolicy: lazy
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/OSGI-INF/component.xml b/bundles/runtime/org.eclipse.fx.ui.lifecycle/OSGI-INF/component.xml
new file mode 100644
index 000000000..86219f015
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/OSGI-INF/component.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.fx.ui.lifecycle">
+ <implementation class="org.eclipse.fx.ui.internal.lifecycle.LifecycleContextFunction"/>
+ <service>
+ <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
+ </service>
+ <property name="service.context.key" type="String" value="org.eclipse.fx.ui.lifecycle.ELifecycleService"/>
+</scr:component> \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/build.properties b/bundles/runtime/org.eclipse.fx.ui.lifecycle/build.properties
new file mode 100644
index 000000000..c58ea2178
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/pom.xml b/bundles/runtime/org.eclipse.fx.ui.lifecycle/pom.xml
new file mode 100644
index 000000000..a807df10d
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/pom.xml
@@ -0,0 +1,34 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <name>e(fx)clipse - Runtime - e4 - Lifecycle Service API</name>
+ <groupId>org.eclipse.fx</groupId>
+ <artifactId>org.eclipse.fx.ui.lifecycle</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <parent>
+ <groupId>org.eclipse.fx</groupId>
+ <artifactId>releng</artifactId>
+ <relativePath>../../../releng/org.eclipse.fx.releng/pom.xml</relativePath>
+ <version>0.8.1-SNAPSHOT</version>
+ </parent>
+
+ <build>
+ <resources>
+ <!-- to ensure that the feature lookup of the ui test works -->
+ <resource>
+ <directory>.</directory>
+ <includes>
+ <include>META-INF/</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project> \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleContextFunction.java b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleContextFunction.java
new file mode 100644
index 000000000..a646b7da6
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleContextFunction.java
@@ -0,0 +1,14 @@
+package org.eclipse.fx.ui.internal.lifecycle;
+
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+
+public class LifecycleContextFunction extends ContextFunction {
+
+ @Override
+ public Object compute(IEclipseContext context, String contextKey) {
+ return ContextInjectionFactory.make(LifecycleServiceImpl.class, context);
+ }
+
+} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleServiceImpl.java b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleServiceImpl.java
new file mode 100644
index 000000000..54316919d
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleServiceImpl.java
@@ -0,0 +1,78 @@
+package org.eclipse.fx.ui.internal.lifecycle;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.services.contributions.IContributionFactory;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.ui.MContext;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.fx.ui.lifecycle.ELifecycleService;
+import org.eclipse.fx.ui.lifecycle.LifecycleAddon;
+
+public class LifecycleServiceImpl implements ELifecycleService{
+
+ @Inject
+ private EModelService modelService;
+
+ @Inject
+ private MApplication app;
+
+ @Inject
+ private IContributionFactory factory;
+
+ public void registerLifecycleURI(MUIElement element, String lifecycleURI) {
+ Set<Object> contributions = (Set<Object>) element.getTransientData().get(LifecycleAddon.LIFECYCLE_TRANSIENT_KEY);
+ if (contributions == null) {
+ contributions = new HashSet<Object>();
+ element.getTransientData().put(LifecycleAddon.LIFECYCLE_TRANSIENT_KEY, contributions);
+ }
+
+ Object object = factory.create(lifecycleURI, app.getContext());
+ contributions.add(object);
+
+ }
+
+ public boolean validateAnnotation(Class annotationClass, MUIElement element, IEclipseContext context) {
+ return validateLifecycleAnnotation(annotationClass, getContextForParent(element), context, element);
+ }
+
+ private boolean validateLifecycleAnnotation(Class clazz, IEclipseContext parentContext,
+ IEclipseContext partContext, MUIElement part) {
+ Set<Object> set = (Set<Object>) part.getTransientData().get(LifecycleAddon.LIFECYCLE_TRANSIENT_KEY);
+ if (set!=null){
+ for (Object object : set) {
+ Object invokeResult = ContextInjectionFactory.invoke(object, clazz, parentContext, partContext,true);
+ if (invokeResult!=null){//supports void methods
+ return (boolean)invokeResult;
+ }
+ else return true;
+ }
+ }
+ return true;
+ }
+ private IEclipseContext getContextForParent(MUIElement element) {
+ return modelService.getContainingContext(element);
+ }
+
+ private IEclipseContext getModelContext(MUIElement part) {
+ if (part instanceof MContext) {
+ return ((MContext) part).getContext();
+ }
+ return getContextForParent(part);
+ }
+
+ @Override
+ public void unregisterLifecycleContribution(MUIElement element,
+ Object contribution) {
+ Set<Object> objects = (Set<Object>) element.getTransientData().get(LifecycleAddon.LIFECYCLE_TRANSIENT_KEY);
+ if (objects!=null) objects.remove(contribution);
+ }
+
+} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/ELifecycleService.java b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/ELifecycleService.java
new file mode 100644
index 000000000..fd1afe872
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/ELifecycleService.java
@@ -0,0 +1,16 @@
+package org.eclipse.fx.ui.lifecycle;
+
+import java.lang.annotation.Annotation;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+
+public interface ELifecycleService {
+
+ public void registerLifecycleURI(MUIElement element, String lifecycleURI);
+
+ public void unregisterLifecycleContribution(MUIElement element, Object contribution);
+
+ public boolean validateAnnotation(Class<? extends Annotation> annotationClass, MUIElement element, IEclipseContext context);
+
+} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/LifecycleAddon.java b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/LifecycleAddon.java
new file mode 100644
index 000000000..fc07466aa
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/LifecycleAddon.java
@@ -0,0 +1,47 @@
+package org.eclipse.fx.ui.lifecycle;
+
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+
+//when we are ready to ditch the tag-based stuff we simply swap the addon
+public class LifecycleAddon {
+
+ @Inject
+ MApplication app;
+
+// @Inject
+// EModelService modelService;
+
+ @Inject
+ ELifecycleService lifecycleService;
+
+ public static final String LIFECYCLE_TRANSIENT_KEY="EFX_LIFECYCLE";
+
+ public static final String LIFECYCLE_TAG_PREFIX = "EFX_LC:";
+
+ @PostConstruct
+ public void postConstruct(){
+ TreeIterator<EObject> it = EcoreUtil.getAllContents((EObject)app, true);
+ while( it.hasNext() ) {
+ EObject e = it.next();
+ if( e instanceof MUIElement ) {
+ MUIElement element = (MUIElement) e;
+ List<String> tags = element.getTags();
+ for (String tag: tags) {
+ if (tag.startsWith(LIFECYCLE_TAG_PREFIX)) {
+ lifecycleService.registerLifecycleURI(element,tag.substring(LIFECYCLE_TAG_PREFIX.length()));
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/annotations/PreClose.java b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/annotations/PreClose.java
new file mode 100644
index 000000000..5e4960ac8
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/annotations/PreClose.java
@@ -0,0 +1,14 @@
+package org.eclipse.fx.ui.lifecycle.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Documented
+@Target({ ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PreClose {
+
+} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/annotations/PreShow.java b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/annotations/PreShow.java
new file mode 100644
index 000000000..4fbb42a46
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/annotations/PreShow.java
@@ -0,0 +1,14 @@
+package org.eclipse.fx.ui.lifecycle.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Documented
+@Target({ ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PreShow {
+
+} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/META-INF/MANIFEST.MF b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/META-INF/MANIFEST.MF
index 7f25b56bb..8f4b13c11 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/META-INF/MANIFEST.MF
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.e4.ui.model.workbench;bundle-version="0.10.1",
org.eclipse.fx.ui.workbench.base;bundle-version="0.8.1",
org.eclipse.e4.ui.di;bundle-version="0.10.1",
org.eclipse.fx.core;bundle-version="0.8.1",
- org.eclipse.emf.ecore;bundle-version="2.9.0"
+ org.eclipse.emf.ecore;bundle-version="2.9.0",
+ org.eclipse.fx.ui.lifecycle
Import-Package: javax.annotation;version="1.0.0",
javax.inject;version="1.0.0",
org.osgi.service.event;version="1.3.0"
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseMenuRenderer.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseMenuRenderer.java
index 8722825f3..7e43d36c2 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseMenuRenderer.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseMenuRenderer.java
@@ -10,21 +10,47 @@
*******************************************************************************/
package org.eclipse.fx.ui.workbench.renderers.base;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+import java.util.List;
import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.services.contributions.IContributionFactory;
import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.ui.di.AboutToHide;
+import org.eclipse.e4.ui.di.AboutToShow;
import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.menu.MDynamicMenuContribution;
import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.fx.core.log.Log;
+import org.eclipse.fx.core.log.Logger;
+import org.eclipse.fx.ui.lifecycle.ELifecycleService;
+import org.eclipse.fx.ui.lifecycle.annotations.PreClose;
+import org.eclipse.fx.ui.lifecycle.annotations.PreShow;
import org.eclipse.fx.ui.workbench.renderers.base.EventProcessor.ChildrenHandler;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WMenu;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WMenuElement;
+@SuppressWarnings("restriction")
public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>> implements ChildrenHandler<MMenu, MMenuElement> {
+ @Inject
+ private ELifecycleService lifecycleService;
+
+ @Inject
+ private IContributionFactory contributionFactory;
+
+ @Log
+ @Inject
+ private Logger logger;
+
@PostConstruct
void init(IEventBroker eventBroker) {
EventProcessor.attachChildProcessor(eventBroker, this);
@@ -41,9 +67,74 @@ public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>>
handleShowing(element);
}
});
+ widget.setHidingCallback(new Runnable() {
+
+ @Override
+ public void run() {
+ IEclipseContext context = getModelContext(element).createChild("lifecycle");
+ context.set(MMenu.class, element);
+ lifecycleService.validateAnnotation(PreClose.class, element, context);
+
+
+ for( MMenuElement e : element.getChildren().toArray(new MMenuElement[0]) ) {
+ if( e instanceof MDynamicMenuContribution ) {
+ MDynamicMenuContribution dc = (MDynamicMenuContribution) e;
+
+ Object contrib = dc.getObject();
+ if( contrib != null ) {
+ List<MMenuElement> list = new ArrayList<MMenuElement>();
+ context.set(List.class, list);
+ try {
+ ContextInjectionFactory.invoke(contrib, AboutToHide.class, context, null);
+ element.getChildren().removeAll(list);
+ } catch(Throwable t) {
+ logger.debug("Unable to process the AboutToHide", t);
+ }
+
+ }
+ }
+ }
+
+ context.dispose();
+ }
+ });
}
void handleShowing(MMenu element) {
+ IEclipseContext context = getModelContext(element).createChild("lifecycle");
+ context.set(MMenu.class, element);
+ lifecycleService.validateAnnotation(PreShow.class, element, context);
+
+ // we iterate of the copy because it is modified in between
+ for( MMenuElement e : element.getChildren().toArray(new MMenuElement[0]) ) {
+ if( e instanceof MDynamicMenuContribution ) {
+ MDynamicMenuContribution dc = (MDynamicMenuContribution) e;
+ if( dc.getObject() == null && dc.getContributionURI() != null ) {
+ try {
+ //TODO On which context should we create the instance, would
+ dc.setObject(contributionFactory.create(dc.getContributionURI(), context));
+ } catch(Throwable t ) {
+ logger.debug("Unable to create contribution", t);
+ }
+ }
+
+ Object contrib = dc.getObject();
+ if( contrib != null ) {
+ List<MMenuElement> list = new ArrayList<MMenuElement>();
+ context.set(List.class, list);
+ try {
+ ContextInjectionFactory.invoke(contrib, AboutToShow.class, context, null);
+
+ int idx = element.getChildren().indexOf(e);
+ element.getChildren().addAll(idx, list);
+ } catch(Throwable t) {
+ logger.debug("Unable to process AboutToShow", t);
+ }
+
+ }
+ }
+ }
+
for (MMenuElement e : element.getChildren()) {
if (e.getRenderer() instanceof BaseItemRenderer) {
@SuppressWarnings("unchecked")
@@ -51,7 +142,10 @@ public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>>
r.checkEnablement(e);
}
}
+
+ context.dispose();
}
+
@Override
public void doProcessContent(MMenu element) {
@@ -69,6 +163,14 @@ public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>>
Iterator<MMenuElement> iterator = elements.iterator();
while (iterator.hasNext()) {
MMenuElement element = iterator.next();
+
+ if( element instanceof MDynamicMenuContribution ) {
+ MDynamicMenuContribution dc = (MDynamicMenuContribution) element;
+ if( dc.getObject() != null ) {
+
+ }
+ }
+
if (element.isToBeRendered() && element.isVisible() && element.getWidget() != null) {
hideChild(parent, element);
}
@@ -79,6 +181,11 @@ public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>>
Iterator<MMenuElement> iterator = elements.iterator();
while (iterator.hasNext()) {
MMenuElement element = iterator.next();
+// if (element instanceof MDynamicMenuContribution) {
+// MDynamicMenuContribution c = (MDynamicMenuContribution) element;
+// lifecycleService.registerLifecycleURI(element, c.getContributionURI());
+// continue;
+// }
if (element.isToBeRendered() && element.isVisible()) {
if (element.getWidget() == null) {
engineCreateWidget(element);
@@ -103,6 +210,26 @@ public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>>
}
@Override
+ protected int getRenderedIndex(MUIElement parent, MUIElement element) {
+ EObject eElement = (EObject) element;
+
+ EObject container = eElement.eContainer();
+ @SuppressWarnings("unchecked")
+ List<MUIElement> list = (List<MUIElement>) container.eGet(eElement.eContainmentFeature());
+ int idx = 0;
+ for( MUIElement u : list ) {
+ if( u.isToBeRendered() && u.isVisible() && !(u instanceof MDynamicMenuContribution) ) {
+ if( u == element ) {
+ return idx;
+ }
+ idx++;
+ }
+ }
+ return -1;
+ }
+
+
+ @Override
public void hideChild(MMenu container, MUIElement changedObj) {
WMenu<N> menu = getWidget(container);
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseStackRenderer.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseStackRenderer.java
index e17c2e14a..2e2d2b376 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseStackRenderer.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseStackRenderer.java
@@ -33,13 +33,14 @@ import org.eclipse.e4.ui.model.application.ui.basic.MStackElement;
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
import org.eclipse.e4.ui.workbench.UIEvents;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
+import org.eclipse.fx.ui.lifecycle.ELifecycleService;
+import org.eclipse.fx.ui.lifecycle.annotations.PreClose;
import org.eclipse.fx.ui.workbench.base.rendering.AbstractRenderer;
import org.eclipse.fx.ui.workbench.base.rendering.RendererFactory;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WCallback;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WLayoutedWidget;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WPlaceholderWidget;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WStack;
-import org.eclipse.fx.ui.workbench.renderers.base.widget.WMinMaxableWidget.WMinMaxState;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WStack.WStackItem;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
@@ -53,6 +54,10 @@ public abstract class BaseStackRenderer<N, I, IC> extends BaseRenderer<MPartStac
@Inject
MApplication application;
+ @Inject
+ ELifecycleService lifecycleService;
+
+
boolean inLazyInit;
@PostConstruct
@@ -345,16 +350,25 @@ public abstract class BaseStackRenderer<N, I, IC> extends BaseRenderer<MPartStac
IEclipseContext partContext = part.getContext();
IEclipseContext parentContext = getContextForParent(part);
// a part may not have a context if it hasn't been rendered
- IEclipseContext context = partContext == null ? parentContext : partContext;
+ IEclipseContext context = (partContext == null ? parentContext : partContext).createChild();
+ if( partContext == null ) {
+ context.set(MPart.class, part);
+ }
+
// Allow closes to be 'canceled'
EPartService partService = (EPartService) context.get(EPartService.class.getName());
- if (partService.savePart(part, true)) {
- partService.hidePart(part);
- return true;
+
+ try {
+ if (partService.savePart(part, true) && lifecycleService.validateAnnotation(PreClose.class, part, context)) {
+ partService.hidePart(part);
+ return true;
+ }
+ // the user has canceled out of the save operation, so don't close the
+ // part
+ return false;
+ } finally {
+ context.dispose();
}
- // the user has canceled out of the save operation, so don't close the
- // part
- return false;
}
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseWorkbenchRendererFactory.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseWorkbenchRendererFactory.java
index e65bb4519..92dba3513 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseWorkbenchRendererFactory.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseWorkbenchRendererFactory.java
@@ -28,6 +28,7 @@ import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
import org.eclipse.e4.ui.model.application.ui.basic.MTrimBar;
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl;
+import org.eclipse.e4.ui.model.application.ui.menu.MDynamicMenuContribution;
import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
import org.eclipse.e4.ui.model.application.ui.menu.MMenuSeparator;
@@ -156,7 +157,7 @@ public abstract class BaseWorkbenchRendererFactory implements RendererFactory {
partRenderer = make(getPartRendererClass());
}
return (R) partRenderer;
- } else if( modelObject instanceof MMenuItem ) {
+ } else if( modelObject instanceof MMenuItem && ! (modelObject instanceof MDynamicMenuContribution) ) {
if( menuItemRenderer == null ) {
menuItemRenderer = make(getMenuItemRendererClass());
}
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/widget/WMenu.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/widget/WMenu.java
index 864cfb270..7523e7992 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/widget/WMenu.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/widget/WMenu.java
@@ -22,5 +22,7 @@ public interface WMenu<N> extends WMenuElement<MMenu> {
void setShowingCallback(Runnable showingCallback);
void removeElement(WMenuElement<MMenuElement> widget);
+
+ void setHidingCallback(Runnable hidingCallback);
}
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/META-INF/MANIFEST.MF b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/META-INF/MANIFEST.MF
index 09243d219..e99ce7132 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/META-INF/MANIFEST.MF
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/META-INF/MANIFEST.MF
@@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.e4.ui.model.workbench;bundle-version="0.10.1",
org.eclipse.fx.ui.dialogs;bundle-version="0.8.1",
org.eclipse.emf.common;bundle-version="2.9.0",
org.eclipse.emf.ecore;bundle-version="2.9.0",
- org.eclipse.fx.osgi.util;bundle-version="0.8.1"
+ org.eclipse.fx.osgi.util;bundle-version="0.8.1",
+ org.eclipse.fx.ui.lifecycle;bundle-version="1.0.0"
Import-Package: javafx.application,
javafx.beans;version="2.0.0",
javafx.beans.property,
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefMenuRenderer.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefMenuRenderer.java
index db2a4354d..71f0b0b8d 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefMenuRenderer.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefMenuRenderer.java
@@ -40,6 +40,7 @@ public class DefMenuRenderer extends BaseMenuRenderer<Menu> {
public static class MenuImpl extends WWidgetImpl<Menu, MMenu> implements WMenu<Menu> {
private ToggleGroup group;
Runnable showingCallback;
+ Runnable hidingCallback;
@Override
protected Menu createWidget() {
@@ -57,6 +58,13 @@ public class DefMenuRenderer extends BaseMenuRenderer<Menu> {
}
}
});
+ m.setOnHiding(new EventHandler<Event>() {
+
+ @Override
+ public void handle(Event arg0) {
+ if (hidingCallback!=null) hidingCallback.run();
+ }
+ });
return m;
}
@@ -123,5 +131,10 @@ public class DefMenuRenderer extends BaseMenuRenderer<Menu> {
protected void setUserData(WWidgetImpl<Menu, MMenu> widget) {
getWidget().setUserData(widget);
}
+
+ @Override
+ public void setHidingCallback(Runnable hidingCallback) {
+ this.hidingCallback=hidingCallback;
+ }
}
}
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartMenuRenderer.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartMenuRenderer.java
index 434b7e99f..e14a0316f 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartMenuRenderer.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartMenuRenderer.java
@@ -44,6 +44,7 @@ public class DefPartMenuRenderer extends BasePartMenuRenderer<Control> {
private ContextMenu menu;
private ToggleGroup group;
Runnable showingCallback;
+ Runnable hidingCallback;
@Override
public void addStyleClasses(List<String> classnames) {
@@ -130,8 +131,19 @@ public class DefPartMenuRenderer extends BasePartMenuRenderer<Control> {
}
}
});
+ menu.setOnHiding(new EventHandler<WindowEvent>() {
+ @Override
+ public void handle(WindowEvent arg0) {
+ if (hidingCallback!=null) hidingCallback.run();
+ }
+ });
b.setContextMenu(menu);
return b;
+ }
+
+ @Override
+ public void setHidingCallback(Runnable hidingCallback) {
+ this.hidingCallback = hidingCallback;
}
}
} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefToolItemMenuRenderer.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefToolItemMenuRenderer.java
index 0c1ed250b..130ccbe86 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefToolItemMenuRenderer.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefToolItemMenuRenderer.java
@@ -43,6 +43,7 @@ public class DefToolItemMenuRenderer extends BaseMenuRenderer<ToolItemMenu> {
static class WMenuImpl extends WWidgetImpl<ToolItemMenu, MMenu> implements WMenu<ToolItemMenu> {
private SplitMenuButton button;
Runnable showingCallback;
+ Runnable hidingCallback;
@Inject
public WMenuImpl(@Named(BaseRenderer.CONTEXT_DOM_ELEMENT) MMenu domElement) {
@@ -59,6 +60,7 @@ public class DefToolItemMenuRenderer extends BaseMenuRenderer<ToolItemMenu> {
}
}
});
+// this.button.hidingProperty???
}
@Override
@@ -110,6 +112,11 @@ public class DefToolItemMenuRenderer extends BaseMenuRenderer<ToolItemMenu> {
public void setShowingCallback(Runnable showingCallback) {
this.showingCallback = showingCallback;
}
+
+ @Override
+ public void setHidingCallback(Runnable hidingCallback) {
+ this.hidingCallback = hidingCallback;
+ }
}
} \ No newline at end of file
diff --git a/bundles/tooling/org.eclipse.fx.ide.ant/.classpath b/bundles/tooling/org.eclipse.fx.ide.ant/.classpath
new file mode 100644
index 000000000..007e9818c
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.ant/.classpath
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/bundles/tooling/org.eclipse.fx.ide.ant/.gitignore b/bundles/tooling/org.eclipse.fx.ide.ant/.gitignore
new file mode 100644
index 000000000..ea8c4bf7f
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.ant/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/bundles/tooling/org.eclipse.fx.ide.ant/.project b/bundles/tooling/org.eclipse.fx.ide.ant/.project
new file mode 100644
index 000000000..11376dc30
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.ant/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.fx.ide.ant</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/tooling/org.eclipse.fx.ide.ant/.settings/org.eclipse.jdt.core.prefs b/bundles/tooling/org.eclipse.fx.ide.ant/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..62492222a
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.ant/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/bundles/tooling/org.eclipse.fx.ide.ant/.settings/org.eclipse.m2e.core.prefs b/bundles/tooling/org.eclipse.fx.ide.ant/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 000000000..f897a7f1c
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.ant/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/bundles/tooling/org.eclipse.fx.ide.ant/pom.xml b/bundles/tooling/org.eclipse.fx.ide.ant/pom.xml
new file mode 100644
index 000000000..9e2801d86
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.ant/pom.xml
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.fx.ide.ant</groupId>
+ <artifactId>org.eclipse.fx.ide.ant</artifactId>
+ <version>0.9.0</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.8.4</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project> \ No newline at end of file
diff --git a/bundles/tooling/org.eclipse.fx.ide.ant/src/main/java/org/eclipse/fx/ide/ant/FXOsgiLaunchTask.java b/bundles/tooling/org.eclipse.fx.ide.ant/src/main/java/org/eclipse/fx/ide/ant/FXOsgiLaunchTask.java
new file mode 100644
index 000000000..a5724a13c
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.ant/src/main/java/org/eclipse/fx/ide/ant/FXOsgiLaunchTask.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ide.ant;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.resources.FileResource;
+import org.apache.tools.ant.util.ClasspathUtils;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.ResourceUtils;
+
+public class FXOsgiLaunchTask extends Task {
+ private String classpathRef;
+ private String outDir;
+ private String equinoxLauncherJarRef;
+
+ private static final String PREFIX = "resources/classes/";
+
+ private static final String[] LAUNCHER_FILES = new String[] {
+ "com/javafx/main/Main.class",
+ "com/javafx/main/Main$1.class",
+ "com/javafx/main/Main$2.class",
+ "com/javafx/main/NoJavaFXFallback.class"
+ };
+
+ public void setClasspathRef(String classpathRef) {
+ this.classpathRef = classpathRef;
+ }
+
+ public void setOutDir(String outDir) {
+ this.outDir = outDir;
+ }
+
+ public void setEquinoxLauncherJarRef(String equinoxLauncherJarRef) {
+ this.equinoxLauncherJarRef = equinoxLauncherJarRef;
+ }
+
+ public void execute() throws BuildException {
+ try {
+ ClassLoader cl = ClasspathUtils.getClassLoaderForPath(getProject(), (Path) getProject().getReference(classpathRef), UUID.randomUUID().toString());
+
+ FileSet p = (FileSet) getProject().getReference(equinoxLauncherJarRef);
+ FileResource r = (FileResource) p.iterator().next();
+ String equinoxLauncherJar = "plugins/"+r.getFile().getName();
+
+ Manifest m = new Manifest();
+ m.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0");
+ m.getMainAttributes().put(new Attributes.Name("JavaFX-Version"), "2.2");
+ m.getMainAttributes().put(Attributes.Name.IMPLEMENTATION_VENDOR, "BestSolution.at");
+ m.getMainAttributes().put(Attributes.Name.IMPLEMENTATION_TITLE, "JavaFX App");
+ m.getMainAttributes().put(Attributes.Name.IMPLEMENTATION_VERSION, "1.0.0");
+ m.getMainAttributes().put(new Attributes.Name("JavaFX-Application-Class"), "org.eclipse.equinox.launcher.Main");
+ m.getMainAttributes().put(new Attributes.Name("JavaFX-Class-Path"), equinoxLauncherJar);
+ m.getMainAttributes().put(new Attributes.Name("Main-Class"), "com/javafx/main/Main");
+
+ FileOutputStream out = new FileOutputStream(new File(outDir,"fx-osgi-launcher.jar"));
+
+ JarOutputStream jOut = new JarOutputStream(out,m);
+ jOut.putNextEntry(new JarEntry("com/"));
+ jOut.closeEntry();
+
+ jOut.putNextEntry(new JarEntry("com/javafx/"));
+ jOut.closeEntry();
+
+ jOut.putNextEntry(new JarEntry("com/javafx/main"));
+ jOut.closeEntry();
+
+ for( String f : LAUNCHER_FILES ) {
+ JarEntry e = new JarEntry(f);
+ jOut.putNextEntry(e);
+
+ byte[] buf = new byte[1024];
+ int len;
+ InputStream in = cl.getResourceAsStream(PREFIX+f);
+
+ while( (len = in.read(buf)) != -1 ) {
+ jOut.write(buf, 0, len);
+ }
+ jOut.closeEntry();
+ }
+ jOut.close();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/bundles/tooling/org.eclipse.fx.ide.fxgraph/src/org/eclipse/fx/ide/fxgraph/converter/FXMLSaxHandler.xtend b/bundles/tooling/org.eclipse.fx.ide.fxgraph/src/org/eclipse/fx/ide/fxgraph/converter/FXMLSaxHandler.xtend
new file mode 100644
index 000000000..eb38202f2
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.fxgraph/src/org/eclipse/fx/ide/fxgraph/converter/FXMLSaxHandler.xtend
@@ -0,0 +1,78 @@
+package org.eclipse.fx.ide.fxgraph.converter
+
+import java.util.Stack
+import org.eclipse.fx.ide.fxgraph.fXGraph.Element
+import org.eclipse.fx.ide.fxgraph.fXGraph.FXGraphFactory
+import org.eclipse.fx.ide.fxgraph.fXGraph.Model
+import org.xml.sax.Attributes
+import org.xml.sax.SAXException
+import org.xml.sax.helpers.DefaultHandler
+import org.eclipse.xtext.common.types.TypesFactory
+import javax.inject.Inject
+import org.eclipse.xtext.common.types.access.IJvmTypeProvider
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
+
+class FXMLSaxHandler extends DefaultHandler {
+ Model model;
+
+ Stack<Object> stack = new Stack;
+
+// @Inject
+// private IJvmTypeProvider.Factory jdtTypeProviderFactory;
+
+ private IJvmTypeProvider jdtTypeProvider;
+
+ override startDocument() throws SAXException {
+// jdtTypeProvider = jdtTypeProviderFactory.findOrCreateTypeProvider(new ResourceSetImpl)
+ model = FXGraphFactory.eINSTANCE.createModel
+ val componentDef = FXGraphFactory.eINSTANCE.createComponentDefinition
+
+ model.componentDef = componentDef
+ }
+
+ override processingInstruction(String target, String data) throws SAXException {
+ if ("import" == target) {
+ val i = FXGraphFactory.eINSTANCE.createImport
+ i.importedNamespace = data
+ model.imports += i
+ }
+ }
+
+ override startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+ if( localName.contains('.') ) {
+ // A static property
+ val e = stack.peek as Element
+ val prop = FXGraphFactory.eINSTANCE.createStaticValueProperty
+
+ e.staticProperties.add(prop);
+ stack.push(prop)
+ } else if( Character.isLowerCase(localName.charAt(0)) ) {
+ // A property
+ val e = stack.peek as Element
+ val prop = FXGraphFactory.eINSTANCE.createProperty
+ e.properties.add(prop)
+
+ stack.push(prop)
+ } else {
+ // An element
+ val e = FXGraphFactory.eINSTANCE.createElement
+
+ val t = TypesFactory.eINSTANCE.createJvmParameterizedTypeReference()
+ val jvmType = TypesFactory.eINSTANCE.createJvmPrimitiveType()
+ jvmType.simpleName = localName
+ t.type = jvmType
+ e.type = t
+
+ stack.push(e)
+ }
+ }
+
+ override endElement(String uri, String localName, String qName) throws SAXException {
+ stack.pop
+ }
+
+ def static void main(String[] args) {
+ val h = new FXMLSaxHandler()
+
+ }
+} \ No newline at end of file
diff --git a/bundles/tooling/org.eclipse.fx.ide.jdt.core/src/org/eclipse/fx/ide/jdt/core/internal/BuildPathSupport.java b/bundles/tooling/org.eclipse.fx.ide.jdt.core/src/org/eclipse/fx/ide/jdt/core/internal/BuildPathSupport.java
index 1fb743a81..41e273456 100755
--- a/bundles/tooling/org.eclipse.fx.ide.jdt.core/src/org/eclipse/fx/ide/jdt/core/internal/BuildPathSupport.java
+++ b/bundles/tooling/org.eclipse.fx.ide.jdt.core/src/org/eclipse/fx/ide/jdt/core/internal/BuildPathSupport.java
@@ -15,6 +15,8 @@ import java.io.File;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.fx.core.log.Logger;
+import org.eclipse.fx.osgi.util.LoggerCreator;
import org.eclipse.jdt.core.IAccessRule;
import org.eclipse.jdt.core.IClasspathAttribute;
import org.eclipse.jdt.core.IClasspathEntry;
@@ -26,6 +28,8 @@ import org.eclipse.jdt.launching.LibraryLocation;
public class BuildPathSupport {
public static final String WEB_JAVADOC_LOCATION = "http://docs.oracle.com/javafx/2/api/";
+
+ private static final Logger LOGGER = LoggerCreator.createLogger(BuildPathSupport.class);
public static IClasspathEntry getJavaFXLibraryEntry(IJavaProject project) {
IPath[] paths = getFxJarPath(project);
@@ -93,7 +97,7 @@ public class BuildPathSupport {
};
jarLocationPath = checkPaths[0];
-
+
if( ! jarLocationPath.toFile().exists() ) {
for( IPath p : checkPaths ) {
if( p.toFile().exists() ) {
@@ -104,6 +108,13 @@ public class BuildPathSupport {
}
if( ! jarLocationPath.toFile().exists() ) {
+ LOGGER.error("Unable to detect JavaFX jar for JRE " + i.getName());
+ LOGGER.error(" JRE: " + installDir.getAbsolutePath());
+ LOGGER.error(" Checked paths:" );
+ for( IPath p : checkPaths ) {
+ LOGGER.error(" " + p.toFile().getAbsolutePath());
+ }
+
return null;
}
diff --git a/bundles/tooling/org.eclipse.fx.ide.jdt.ui/plugin.properties b/bundles/tooling/org.eclipse.fx.ide.jdt.ui/plugin.properties
deleted file mode 100755
index 63ec2d93c..000000000
--- a/bundles/tooling/org.eclipse.fx.ide.jdt.ui/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-
-pluginName = JavaFXAntTask Model
-providerName = www.example.org
diff --git a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/at.bestsolution.efxclipse.tooling.build-0.0.1.jar b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/at.bestsolution.efxclipse.tooling.build-0.0.1.jar
deleted file mode 100755
index 82629ad44..000000000
--- a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/at.bestsolution.efxclipse.tooling.build-0.0.1.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/fx-osgi-launch.jar b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/fx-osgi-launch.jar
deleted file mode 100755
index e17ac5e3f..000000000
--- a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/fx-osgi-launch.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/org.eclipse.fx.ide.ant-0.9.0.jar b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/org.eclipse.fx.ide.ant-0.9.0.jar
new file mode 100644
index 000000000..45ddf0390
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/build_bin/org.eclipse.fx.ide.ant-0.9.0.jar
Binary files differ
diff --git a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/e4App.rtask b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/e4App.rtask
index 6bbe9761d..fdbef2042 100755
--- a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/e4App.rtask
+++ b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/e4App.rtask
@@ -211,6 +211,7 @@ RobotTask {
"org.eclipse.fx.ui.workbench.fx.controls",
"org.eclipse.fx.ui.workbench.renderers.base",
"org.eclipse.fx.ui.workbench.renderers.fx",
+ "org.eclipse.fx.ui.lifecycle",
"com.ibm.icu",
// TODO NEED TO SUPPORT CONDITIONALS HERE "com.ibm.icu.base",
"javax.annotation",
@@ -497,8 +498,8 @@ RobotTask {
DynamicFile "build.xml"
generated-from "bundleclass://org.eclipse.fx.ide.pde.ui.e4/org.eclipse.fx.ide.pde.ui.e4.project.template.NativeLaunchGenerator" by "java"
excluded-if "javascript" /# !NativeExport #/,
- URLFile "fx-osgi-launch.jar" "platform:/plugin/org.eclipse.fx.ide.pde.ui.e4/build_bin/fx-osgi-launch.jar"
- excluded-if "javascript" /# !NativeExport #/
+ URLFile "org.eclipse.fx.ide.ant.jar" "platform:/plugin/org.eclipse.fx.ide.pde.ui.e4/build_bin/org.eclipse.fx.ide.ant-0.9.0.jar"
+ excluded-if "javascript" /# !NativeExport #/
}
} excluded-if "javascript" /# !TychoIntegration; #/
}
diff --git a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/mediaSample.rtask b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/mediaSample.rtask
index 7676f73c0..c5ea672eb 100755
--- a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/mediaSample.rtask
+++ b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/generator-tasks/mediaSample.rtask
@@ -249,6 +249,7 @@ RobotTask {
"org.eclipse.fx.ui.workbench.fx.controls",
"org.eclipse.fx.ui.workbench.renderers.base",
"org.eclipse.fx.ui.workbench.renderers.fx",
+ "org.eclipse.fx.ui.lifecycle",
"com.ibm.icu",
// TODO NEED TO SUPPORT CONDITIONALS HERE "com.ibm.icu.base",
"javax.annotation",
diff --git a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/src/org/eclipse/fx/ide/pde/ui/e4/project/template/NativeLaunchGenerator.xtend b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/src/org/eclipse/fx/ide/pde/ui/e4/project/template/NativeLaunchGenerator.xtend
index 1517d7026..f92adb9a4 100755
--- a/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/src/org/eclipse/fx/ide/pde/ui/e4/project/template/NativeLaunchGenerator.xtend
+++ b/bundles/tooling/org.eclipse.fx.ide.pde.ui.e4/src/org/eclipse/fx/ide/pde/ui/e4/project/template/NativeLaunchGenerator.xtend
@@ -20,6 +20,7 @@ class NativeLaunchGenerator implements Generator<DynamicFile> {
<property name="eclipse-app-dir" value="«data.tychoOutDir»" />
<target name="init-fx-tasks">
+ <taskdef name="fxosgilauncher" classpath="org.eclipse.fx.ide.ant.jar" classname="org.eclipse.fx.ide.ant.FXOsgiLaunchTask" />
<path id="fxant">
<filelist>
<file name="${java.home}\..\lib\ant-javafx.jar"/>
@@ -32,6 +33,11 @@ class NativeLaunchGenerator implements Generator<DynamicFile> {
</target>
<target name="do-deploy" depends="init-fx-tasks">
+ <fileset id="equinox-launcher" dir="«data.tychoOutDir»">
+ <filename name="plugins/org.eclipse.equinox.launcher_*.jar"/>
+ </fileset>
+ <fxosgilauncher classpathref="fxant" equinoxlauncherjarref="equinox-launcher"/>
+
<fx:resources id="appRes">
<fx:fileset dir="." includes="fx-osgi-launch.jar"/>
<fx:fileset dir="${eclipse-app-dir}" includes="**/*"/>
diff --git a/bundles/tooling/org.eclipse.fx.ide.pde.ui/generator-tasks/osgi-app.rtask b/bundles/tooling/org.eclipse.fx.ide.pde.ui/generator-tasks/osgi-app.rtask
index 310ea3304..85676f10f 100755
--- a/bundles/tooling/org.eclipse.fx.ide.pde.ui/generator-tasks/osgi-app.rtask
+++ b/bundles/tooling/org.eclipse.fx.ide.pde.ui/generator-tasks/osgi-app.rtask
@@ -478,7 +478,7 @@ RobotTask {
DynamicFile "build.xml"
generated-from "bundleclass://org.eclipse.fx.ide.pde.ui.e4/org.eclipse.fx.ide.pde.ui.e4.project.template.NativeLaunchGenerator" by "java"
excluded-if "javascript" /# !NativeExport #/,
- URLFile "fx-osgi-launch.jar" "platform:/plugin/org.eclipse.fx.ide.pde.ui.e4/build_bin/fx-osgi-launch.jar"
+ URLFile "org.eclipse.fx.ide.ant.jar" "platform:/plugin/org.eclipse.fx.ide.pde.ui.e4/build_bin/org.eclipse.fx.ide.ant-0.9.0.jar"
excluded-if "javascript" /# !NativeExport #/
}
} excluded-if "javascript" /# !TychoIntegration; #/
diff --git a/org.eclipse.fx.ide.fxml.compiler/src/org/eclipse/fx/ide/fxml/compiler/FXGraphJavaGenerator.xtend b/org.eclipse.fx.ide.fxml.compiler/src/org/eclipse/fx/ide/fxml/compiler/FXGraphJavaGenerator.xtend
index 3d4a2904c..25f1c6890 100644
--- a/org.eclipse.fx.ide.fxml.compiler/src/org/eclipse/fx/ide/fxml/compiler/FXGraphJavaGenerator.xtend
+++ b/org.eclipse.fx.ide.fxml.compiler/src/org/eclipse/fx/ide/fxml/compiler/FXGraphJavaGenerator.xtend
@@ -21,7 +21,7 @@ class FXGraphJavaGenerator {
def generate(Model model) '''
package «model.package.name»;
- //import org.eclipse.fx.core.fxml.FXMLLoading;
+ import org.eclipse.fx.core.fxml.FXMLDocument;
import java.util.ResourceBundle;
«var content = generateElementDef("root", model.componentDef.rootNode)»
@@ -34,7 +34,7 @@ class FXGraphJavaGenerator {
import «i»;
«ENDFOR»
- public class «model.componentDef.name» /*implements FXMLLoading<«model.componentDef.rootNode.type.simpleName»>*/ {
+ public class «model.componentDef.name» extends FXMLDocument<«model.componentDef.rootNode.type.simpleName»> {
public «model.componentDef.rootNode.type.simpleName» load(ResourceBundle bundle) {
«content»
return root;
diff --git a/releng/org.eclipse.fx.ide.releng/pom.xml b/releng/org.eclipse.fx.ide.releng/pom.xml
index 3b0c2bc7e..087422dd6 100755
--- a/releng/org.eclipse.fx.ide.releng/pom.xml
+++ b/releng/org.eclipse.fx.ide.releng/pom.xml
@@ -14,12 +14,16 @@
<version>0.8.1-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
- <tycho-version>0.16.0</tycho-version>
+ <tycho-version>0.18.0</tycho-version>
+ <tycho-extras.version>0.18.0</tycho-extras.version>
+ <cbi-plugins.version>1.0.3</cbi-plugins.version>
<junit-version>4.8.1</junit-version>
<mockito-version>1.8.4</mockito-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform-version>[3.7,3.8)</platform-version>
- <!-- runtime_repo>http://downloads.efxclipse.org/eclipse.org/p2/runtime/nightly/site/</runtime_repo-->
+ <runtime_repo>http://download.eclipse.org/efxclipse/runtime-nightly/site/</runtime_repo>
+ <download-publish-path>/home/data/httpd/download.eclipse.org/efxclipse/updates-nightly</download-publish-path>
+ <eclipse-repo.url>https://repo.eclipse.org/content/repositories/releases/</eclipse-repo.url>
</properties>
<modules>
@@ -100,6 +104,16 @@
<enabled>true</enabled>
</snapshots>
</pluginRepository>
+ <pluginRepository>
+ <id>eclipse</id>
+ <url>${eclipse-repo.url}</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
</pluginRepositories>
<build>
@@ -109,7 +123,7 @@
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
- <version>2.4.1</version>
+ <version>2.4.2</version>
<executions>
<execution>
<goals>
@@ -227,6 +241,83 @@
</pluginManagement>
</build>
+ <profiles>
+ <profile>
+ <id>build-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <includePackedArtifacts>false</includePackedArtifacts>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200a-plugin</artifactId>
+ <version>${tycho-extras.version}</version>
+ <executions>
+ <execution>
+ <id>pack200-normalize</id>
+ <goals>
+ <goal>normalize</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.cbi.maven.plugins</groupId>
+ <artifactId>eclipse-jarsigner-plugin</artifactId>
+ <version>${cbi-plugins.version}</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tycho-extras.version}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>p2-metadata</id>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
<dependencyManagement>
<dependencies>
<dependency>
diff --git a/releng/org.eclipse.fx.ide.updatesite/pom.xml b/releng/org.eclipse.fx.ide.updatesite/pom.xml
index c2afcd980..3f6406045 100644
--- a/releng/org.eclipse.fx.ide.updatesite/pom.xml
+++ b/releng/org.eclipse.fx.ide.updatesite/pom.xml
@@ -24,5 +24,41 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>build-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>deploy</id>
+ <phase>install</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <delete includeemptydirs="false">
+ <fileset dir="${download-publish-path}">
+ <include name="**" />
+ </fileset>
+ </delete>
+ <copy includeemptydirs="false" todir="${download-publish-path}">
+ <fileset dir="target">
+ <include name="**" />
+ </fileset>
+ </copy>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project> \ No newline at end of file
diff --git a/releng/org.eclipse.fx.releng/pom.xml b/releng/org.eclipse.fx.releng/pom.xml
index 1b8db2877..96feba232 100755
--- a/releng/org.eclipse.fx.releng/pom.xml
+++ b/releng/org.eclipse.fx.releng/pom.xml
@@ -14,11 +14,15 @@
<version>0.8.1-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
- <tycho-version>0.16.0</tycho-version>
+ <tycho-version>0.18.0</tycho-version>
+ <tycho-extras.version>0.18.0</tycho-extras.version>
+ <cbi-plugins.version>1.0.3</cbi-plugins.version>
<junit-version>4.8.1</junit-version>
<mockito-version>1.8.4</mockito-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform-version>[3.7,3.8)</platform-version>
+ <download-publish-path>/home/data/httpd/download.eclipse.org/efxclipse/runtime-nightly</download-publish-path>
+ <eclipse-repo.url>https://repo.eclipse.org/content/repositories/releases/</eclipse-repo.url>
</properties>
<modules>
@@ -55,6 +59,7 @@
<module>../../bundles/runtime/org.eclipse.fx.ui.workbench.fx</module>
<module>../../bundles/runtime/org.eclipse.fx.ui.workbench.fx.controls</module>
<module>../../bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx</module>
+ <module>../../bundles/runtime/org.eclipse.fx.ui.lifecycle</module>
<!-- 3.x / 4.x SDK -->
<module>../../bundles/runtime/org.eclipse.fx.ui.workbench3</module>
@@ -76,7 +81,7 @@
<layout>p2</layout>
<url>http://download.eclipse.org/releases/kepler</url>
</repository>
- <repository>
+ <!-- repository>
<id>kepler-ecf</id>
<layout>p2</layout>
<url>http://download.eclipse.org/rt/ecf/3.6.1/site.p2</url>
@@ -85,7 +90,7 @@
<id>xtext</id>
<layout>p2</layout>
<url>http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/</url>
- </repository>
+ </repository-->
</repositories>
<pluginRepositories>
@@ -96,6 +101,16 @@
<enabled>true</enabled>
</snapshots>
</pluginRepository>
+ <pluginRepository>
+ <id>eclipse</id>
+ <url>${eclipse-repo.url}</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
</pluginRepositories>
<build>
@@ -105,7 +120,7 @@
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
- <version>2.4.1</version>
+ <version>2.4.2</version>
<executions>
<execution>
<goals>
@@ -215,6 +230,82 @@
</plugins>
</pluginManagement>
</build>
+ <profiles>
+ <profile>
+ <id>build-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <includePackedArtifacts>false</includePackedArtifacts>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200a-plugin</artifactId>
+ <version>${tycho-extras.version}</version>
+ <executions>
+ <execution>
+ <id>pack200-normalize</id>
+ <goals>
+ <goal>normalize</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.cbi.maven.plugins</groupId>
+ <artifactId>eclipse-jarsigner-plugin</artifactId>
+ <version>${cbi-plugins.version}</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tycho-extras.version}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>p2-metadata</id>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<dependencyManagement>
<dependencies>
diff --git a/releng/org.eclipse.fx.releng/pom_jdt8.xml b/releng/org.eclipse.fx.releng/pom_jdt8.xml
deleted file mode 100755
index 086f3febe..000000000
--- a/releng/org.eclipse.fx.releng/pom_jdt8.xml
+++ /dev/null
@@ -1,244 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <name>e(fx)clipse build</name>
-
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
-
- <groupId>org.eclipse.fx</groupId>
- <artifactId>releng</artifactId>
- <version>0.8.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <properties>
- <tycho-version>0.16.0</tycho-version>
- <junit-version>4.8.1</junit-version>
- <mockito-version>1.8.4</mockito-version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <platform-version>[3.7,3.8)</platform-version>
- <local-repo>/Users/tomschindl/.m2/repository</local-repo>
- <!-- local-repo>/var/lib/jenkins/.m2/repository</local-repo -->
- <jdt-core-version>3.9.0-SNAPSHOT</jdt-core-version>
- </properties>
-
- <modules>
- <!-- OSGI Support -->
- <module>../../bundles/runtime/org.eclipse.fx.javafx</module>
- <module>../../bundles/runtime/org.eclipse.fx.osgi</module>
- <module>../../bundles/runtime/org.eclipse.fx.osgi.util</module>
- <!-- Core Modules -->
- <module>../../bundles/runtime/org.eclipse.fx.core</module>
- <module>../../bundles/runtime/org.eclipse.fx.core.databinding</module>
- <module>../../bundles/runtime/org.eclipse.fx.core.p2</module>
- <module>../../bundles/runtime/org.eclipse.fx.core.log4j</module>
- <module>../../bundles/runtime/org.eclipse.fx.core.guice</module>
- <!-- UI Modules -->
- <module>../../bundles/runtime/org.eclipse.fx.ui.databinding</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.application</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.di</module>
- <!-- module>../../bundles/runtime/org.eclipse.fx.ui.di.interopt</module-->
- <module>../../bundles/runtime/org.eclipse.fx.ui.animation</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.panes</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.services</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.dialogs</module>
- <!-- EMF -->
- <module>../../bundles/runtime/org.eclipse.fx.emf.edit.ui</module>
- <module>../../bundles/runtime/org.eclipse.fx.emf.databinding</module>
-
- <!-- e4 -->
- <module>../../bundles/runtime/org.eclipse.fx.ui.keybindings</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.keybindings.generic</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.keybindings.e4</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.workbench.base</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base</module>
-
- <module>../../bundles/runtime/org.eclipse.fx.ui.theme</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.workbench.fx</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.workbench.fx.controls</module>
- <module>../../bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx</module>
-
- <!-- 3.x / 4.x SDK -->
- <!-- module>../../bundles/runtime/org.eclipse.fx.ui.workbench3</module -->
-
- <!-- Format Conversion -->
- <module>../../bundles/runtime/org.eclipse.fx.formats.svg</module>
-
- <!-- Features -->
- <module>../runtime/org.eclipse.fx.core.feature</module>
- <module>../runtime/org.eclipse.fx.target.feature</module>
-
- <module>../org.eclipse.fx.updatesite</module>
- </modules>
-
- <repositories>
- <repository>
- <id>juno</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/releases/juno</url>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>tycho</id>
- <url>http://repository.sonatype.org/content/groups/sonatype-public-grid</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- <pluginRepository>
- <id>local-repo</id>
- <url>${local-repo}</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
-
- <build>
-
- <!-- build plugins -->
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
-
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <resolver>p2</resolver>
- <pomDependencies>consider</pomDependencies>
- <environments>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- </plugins>
-
-
- <!-- defines the default settings for the used plugins -->
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
-
- <dependencies>
- <dependency>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>org.eclipse.jdt.core</artifactId>
- <version>${jdt-core-version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>org.eclipse.jdt.compiler.apt</artifactId>
- <version>${jdt-core-version}</version>
- </dependency>
- </dependencies>
-
- <configuration>
- <encoding>UTF-8</encoding>
- <source>1.8</source>
- <target>1.8</target>
- <debug>true</debug>
- <verbose>true</verbose>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>plugin-source</id>
- <goals>
- <goal>plugin-source</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-source-feature-plugin</artifactId>
- <!-- version>${tycho-version}</version-->
- <executions>
- <execution>
- <id>source-feature</id>
- <phase>package</phase>
- <goals>
- <goal>source-feature</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-packaging-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <archiveSite>true</archiveSite>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit-version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>${mockito-version}</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project> \ No newline at end of file
diff --git a/releng/org.eclipse.fx.updatesite/pom.xml b/releng/org.eclipse.fx.updatesite/pom.xml
index 9ded8b19d..b6cfce660 100644
--- a/releng/org.eclipse.fx.updatesite/pom.xml
+++ b/releng/org.eclipse.fx.updatesite/pom.xml
@@ -13,6 +13,10 @@
<version>0.8.1-SNAPSHOT</version>
</parent>
+ <properties>
+ <p2repo-zip-path>${project.build.directory}/site_assembly.zip</p2repo-zip-path>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -25,4 +29,40 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>build-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>deploy</id>
+ <phase>install</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <delete includeemptydirs="false">
+ <fileset dir="${download-publish-path}">
+ <include name="**" />
+ </fileset>
+ </delete>
+ <copy includeemptydirs="false" todir="${download-publish-path}">
+ <fileset dir="target">
+ <include name="**" />
+ </fileset>
+ </copy>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project> \ No newline at end of file
diff --git a/releng/runtime/org.eclipse.fx.target.feature/feature.xml b/releng/runtime/org.eclipse.fx.target.feature/feature.xml
index 24ae258c7..67d435be7 100644
--- a/releng/runtime/org.eclipse.fx.target.feature/feature.xml
+++ b/releng/runtime/org.eclipse.fx.target.feature/feature.xml
@@ -1856,29 +1856,29 @@
unpack="false"/>
<plugin
- id="org.eclipse.ecf.provider.filetransfer.httpclient"
+ id="org.eclipse.ecf.provider.filetransfer.httpclient4"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.ecf.provider.filetransfer.httpclient.source"
+ id="org.eclipse.ecf.provider.filetransfer.httpclient4.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl"
+ id="org.eclipse.ecf.provider.filetransfer.httpclient4.ssl"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
-
+
<plugin
- id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source"
+ id="org.eclipse.ecf.provider.filetransfer.httpclient4.ssl.source"
download-size="0"
install-size="0"
version="0.0.0"
@@ -2079,26 +2079,26 @@
install-size="0"
version="0.0.0"
unpack="false"/>
-
+
<plugin
id="org.eclipse.fx.ui.databinding.source"
download-size="0"
install-size="0"
version="0.0.0"
- unpack="false"/>
+ unpack="false"/>
- <!--plugin
- id="org.eclipse.fx.ui.di.interopt"
+ <plugin
+ id="org.eclipse.fx.ui.lifecycle"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
-
+
<plugin
- id="org.eclipse.fx.ui.di.interopt.source"
+ id="org.eclipse.fx.ui.lifecycles.source"
download-size="0"
install-size="0"
version="0.0.0"
- unpack="false"/-->
+ unpack="false"/>
</feature>
diff --git a/releng/runtime/org.eclipse.fx.target.rcp.feature/.gitignore b/releng/runtime/org.eclipse.fx.target.rcp.feature/.gitignore
new file mode 100644
index 000000000..ea8c4bf7f
--- /dev/null
+++ b/releng/runtime/org.eclipse.fx.target.rcp.feature/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi b/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
index c067a0598..33018943f 100755
--- a/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
+++ b/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
@@ -5,6 +5,7 @@
<persistedState key="efx.window.fullscreen" value="false"/>
<children xsi:type="advanced:PerspectiveStack" xmi:id="_mK1iIO6wEeG4lfn-YKJbJw" elementId="org.eclipse.fx.testcases.e4.perspectivestack.0">
<children xsi:type="advanced:Perspective" xmi:id="_m-PVAO6wEeG4lfn-YKJbJw" elementId="org.eclipse.fx.testcases.e4.perspective.0" label="P 0">
+ <tags>EFX_LC:bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.lifecycle.LifeCycle</tags>
<children xsi:type="basic:PartSashContainer" xmi:id="_A7Q9oOL-EeGP-5z69KadAQ" horizontal="true">
<children xsi:type="basic:Part" xmi:id="_A7Q9oeL-EeGP-5z69KadAQ" containerData="10" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.parts.ControlPanel" label="Control Stack" iconURI="">
<tags>Part-Toolbar-FullSpan</tags>
@@ -22,6 +23,7 @@
<children xsi:type="basic:Part" xmi:id="_ZHcNwOL-EeGP-5z69KadAQ" elementId="org.eclipse.fx.testcases.e4.part.0" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.parts.ContentPanel" label="C0" iconURI="platform:/plugin/org.eclipse.fx.testcases.e4/icons/folder.png" closeable="true">
<tags>Part-ToolBarMenu-Floating</tags>
<tags>Part-Toolbar-FullSpan</tags>
+ <tags>EFX_LC:bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.lifecycle.LifeCycle</tags>
<menus xmi:id="_dsz2oIEQEeKxavJ0U4_mHQ" elementId="org.eclipse.fx.testcases.e4.menu.4">
<tags>ViewMenu</tags>
<children xsi:type="menu:DirectMenuItem" xmi:id="_h8rwYIEQEeKxavJ0U4_mHQ" elementId="org.eclipse.fx.testcases.e4.directmenuitem.5" label="View Menu 1" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.DiHandler2"/>
@@ -92,6 +94,7 @@
</children>
<mainMenu xmi:id="_W8hHoORZEeGP-5z69KadAQ" elementId="org.eclipse.fx.testcases.e4.menu.0">
<children xsi:type="menu:Menu" xmi:id="_Xwuy0ORZEeGP-5z69KadAQ" elementId="org.eclipse.fx.testcases.e4.menu.1" label="M1">
+ <tags>EFX_LC:bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.lifecycle.MenuLifecycle</tags>
<children xsi:type="menu:HandledMenuItem" xmi:id="_f6s64ORqEeGP-5z69KadAQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.0" label="Push - HI 0" command="_FEZr8OUcEeGP-5z69KadAQ"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_lb8V4ORqEeGP-5z69KadAQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.1" label="Check - HI 1" type="Check" command="_3PQSEOqiEeGrz8mV_3Gr5A"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_pBaAsORqEeGP-5z69KadAQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.2" label="Radio - HI 2" type="Radio" command="_FEZr8OUcEeGP-5z69KadAQ"/>
@@ -106,6 +109,8 @@
<children xsi:type="menu:DirectMenuItem" xmi:id="_N4FhcIfmEeKsYN0U3N_L9Q" elementId="org.eclipse.fx.testcases.e4.directmenuitem.7" label="Exit" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.ExitHandler"/>
<children xsi:type="menu:DirectMenuItem" xmi:id="_3n7coIfmEeKsYN0U3N_L9Q" elementId="org.eclipse.fx.testcases.e4.directmenuitem.8" label="Restart" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.RestartHandler"/>
<children xsi:type="menu:DirectMenuItem" xmi:id="_Y2UZcMg4EeKo1rUjbZCXsQ" elementId="org.eclipse.fx.testcases.e4.directmenuitem.11" label="Dynamic Window" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.DynamicWinHandler"/>
+ <children xsi:type="menu:DynamicMenuContribution" xmi:id="_yP8EsOHBEeKlH9jWGqiIew" elementId="org.eclipse.fx.testcases.e4.dynamicmenucontribution.0" label="Test" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.contributions.DMContribution"/>
+ <children xsi:type="menu:DirectMenuItem" xmi:id="_uPNeUOJ-EeKZGIZ9VF1S7Q" elementId="org.eclipse.fx.testcases.e4.directmenuitem.13" label="Register dynamic lifecycle" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.RegisterDynamicLifecycle"/>
</children>
<children xsi:type="menu:Menu" xmi:id="_d-oDwO6yEeG4lfn-YKJbJw" elementId="org.eclipse.fx.testcases.e4.menu.3" label="Switch">
<children xsi:type="menu:HandledMenuItem" xmi:id="_jYdPMO6yEeG4lfn-YKJbJw" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.4" label="Perspective 0" command="_kCbZQO6yEeG4lfn-YKJbJw">
@@ -130,6 +135,7 @@
<children xsi:type="menu:Menu" xmi:id="_xS050MayEeKo1rUjbZCXsQ" elementId="org.eclipse.fx.testcases.e4.menu.6" label="Multiple close">
<children xsi:type="menu:DirectMenuItem" xmi:id="_yhjWwMayEeKo1rUjbZCXsQ" elementId="org.eclipse.fx.testcases.e4.directmenuitem.9" label="Close all" iconURI="platform:/plugin/org.eclipse.fx.testcases.e4/css/images/window-close-over.png" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.BatchRemoveHandler"/>
<children xsi:type="menu:DirectMenuItem" xmi:id="_2R3msMayEeKo1rUjbZCXsQ" elementId="org.eclipse.fx.testcases.e4.directmenuitem.10" label="Close others" iconURI="platform:/plugin/org.eclipse.fx.testcases.e4/css/images/window-close-over.png" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.CloseOthersHandler"/>
+ <children xsi:type="menu:DirectMenuItem" xmi:id="_HrhKkOHEEeKlH9jWGqiIew" elementId="org.eclipse.fx.testcases.e4.directmenuitem.12" label="Close perspective" iconURI="platform:/plugin/org.eclipse.fx.testcases.e4/css/images/window-close-over.png" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.ClosePerspectiveHandler"/>
</children>
</mainMenu>
<sharedElements xsi:type="basic:Part" xmi:id="_T4J0kPW5EeG7tr8qKhf17Q" elementId="org.eclipse.fx.testcases.e4.part.7" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.parts.ContentPanel" label="C7"/>
@@ -186,4 +192,5 @@
<addons xmi:id="_A7QWmOL-EeGP-5z69KadAQ" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
<addons xmi:id="_tQtNQOUbEeGP-5z69KadAQ" elementId="org.eclipse.fx.ui.keybindings.e4.model" contributionURI="bundleclass://org.eclipse.fx.ui.keybindings.e4/org.eclipse.fx.ui.keybindings.e4.BindingProcessingAddon"/>
<addons xmi:id="_3c-AUL89EeKIBMNbSVZPsw" elementId="org.eclipse.e4.ui.workbench.addons.HandlerProcessingAddon" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>
+ <addons xmi:id="_9h-HsOHDEeKlH9jWGqiIew" elementId="org.eclipse.fx.testcases.e4.addon.0" contributionURI="bundleclass://org.eclipse.fx.ui.lifecycle/org.eclipse.fx.ui.lifecycle.LifecycleAddon"/>
</application:Application>
diff --git a/testcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF b/testcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF
index 476b5a413..5e6468e0e 100755
--- a/testcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF
+++ b/testcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF
@@ -20,7 +20,13 @@ Require-Bundle: org.eclipse.e4.ui.model.workbench;bundle-version="0.10.1",
org.eclipse.equinox.common;bundle-version="3.6.0",
org.eclipse.e4.ui.services;bundle-version="0.10.1",
org.eclipse.fx.ui.services;bundle-version="0.8.1",
- org.eclipse.equinox.app;bundle-version="1.3.100"
+ org.eclipse.equinox.app;bundle-version="1.3.100",
+ org.eclipse.fx.javafx;bundle-version="2.2.0",
+ org.eclipse.osgi;bundle-version="3.9.0",
+ org.eclipse.fx.ui.workbench.renderers.base,
+ org.eclipse.fx.ui.dialogs,
+ org.eclipse.fx.ui.lifecycle,
+ org.eclipse.fx.ui.workbench.base
Bundle-ActivationPolicy: lazy
Import-Package: javafx.animation;version="2.0.0",
javafx.application;version="2.0.0",
@@ -52,5 +58,6 @@ Import-Package: javafx.animation;version="2.0.0",
javafx.util;version="2.0.0",
javax.annotation;version="1.1.0",
javax.inject;version="1.0.0",
+ org.eclipse.fx.ui.lifecycle,
org.osgi.framework;version="1.3.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/testcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product b/testcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product
index 7a55bd169..dd43ef0d7 100755
--- a/testcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product
+++ b/testcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product
@@ -75,6 +75,7 @@
<plugin id="org.eclipse.fx.ui.keybindings"/>
<plugin id="org.eclipse.fx.ui.keybindings.e4"/>
<plugin id="org.eclipse.fx.ui.keybindings.generic"/>
+ <plugin id="org.eclipse.fx.ui.lifecycle"/>
<plugin id="org.eclipse.fx.ui.panes"/>
<plugin id="org.eclipse.fx.ui.services"/>
<plugin id="org.eclipse.fx.ui.theme"/>
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/contributions/DMContribution.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/contributions/DMContribution.java
new file mode 100644
index 000000000..ba688513c
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/contributions/DMContribution.java
@@ -0,0 +1,22 @@
+package org.eclipse.fx.testcases.e4.contributions;
+
+import org.eclipse.e4.ui.di.AboutToHide;
+import org.eclipse.e4.ui.di.AboutToShow;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
+
+public class DMContribution {
+
+
+ @AboutToShow
+ public void ats(MMenu menu){
+// menu.getChildren().remove(0); <--works
+ System.err.println(menu);
+ System.err.println("ATSH");
+ }
+
+ @AboutToHide
+ public void ath(){
+ System.err.println("ATH");
+ }
+
+} \ No newline at end of file
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/ClosePerspectiveHandler.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/ClosePerspectiveHandler.java
new file mode 100644
index 000000000..fce75d0ac
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/ClosePerspectiveHandler.java
@@ -0,0 +1,49 @@
+package org.eclipse.fx.testcases.e4.handlers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
+import org.eclipse.fx.ui.lifecycle.ELifecycleService;
+import org.eclipse.fx.ui.lifecycle.annotations.PreClose;
+import org.eclipse.fx.ui.workbench.base.rendering.AbstractRenderer;
+import org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer;
+
+public class ClosePerspectiveHandler {
+
+ @Execute
+ public void closePerspective(MWindow window, EModelService modelService, EPartService partService, ELifecycleService lifecycleService) {
+
+ MPerspectiveStack activeStack = (MPerspectiveStack) window
+ .getSelectedElement();
+ if (activeStack == null)
+ return;
+
+ // find the next perspective to activate, and the selected one
+ MPerspective activePerspective = activeStack.getSelectedElement();
+ List<MPart> partsInActive = modelService.findElements(window, null, MPart.class, null,
+ EModelService.IN_ACTIVE_PERSPECTIVE);
+ List<MPart> allParts = modelService.findElements(window, null, MPart.class, null,
+ EModelService.IN_ANY_PERSPECTIVE);
+ List<MPart> partsToRemove = new ArrayList<MPart>();
+ for (MPart p : partsInActive) {
+ if (!allParts.contains(p)) partsToRemove.add(p);
+ }
+ for (MPart p : partsToRemove) {
+ partService.hidePart(p, true);//don't care about saving here
+ }
+// AbstractRenderer renderer = (AbstractRenderer) activePerspective.getRenderer();
+// if (renderer.validateLifecycleAnnotation(PreClose.class, null, renderer.getModelContext(activePerspective)
+// , activePerspective))
+ if (lifecycleService.validateAnnotation(PreClose.class, activePerspective, activePerspective.getContext()))
+ modelService.removePerspectiveModel(activePerspective, window);//this one includes selecting the next active
+
+ }
+
+} \ No newline at end of file
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/RegisterDynamicLifecycle.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/RegisterDynamicLifecycle.java
new file mode 100644
index 000000000..e7a0d9d11
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/RegisterDynamicLifecycle.java
@@ -0,0 +1,16 @@
+package org.eclipse.fx.testcases.e4.handlers;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.fx.ui.lifecycle.ELifecycleService;
+
+public class RegisterDynamicLifecycle {
+
+ @Execute
+ public void execute(ELifecycleService service, MPart part){
+ System.err.println(part.getLabel());
+ service.registerLifecycleURI(part, "bundleclass://org.eclipse.fx.testcases.e4/"+
+ "org.eclipse.fx.testcases.e4.lifecycle.SecondLifeCycle");
+ }
+
+} \ No newline at end of file
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/LifeCycle.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/LifeCycle.java
new file mode 100644
index 000000000..67bd19f53
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/LifeCycle.java
@@ -0,0 +1,31 @@
+package org.eclipse.fx.testcases.e4.lifecycle;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javafx.stage.Stage;
+
+import javax.annotation.PostConstruct;
+
+import org.eclipse.e4.core.services.contributions.IContributionFactory;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.MApplicationElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.fx.ui.dialogs.MessageDialog;
+import org.eclipse.fx.ui.lifecycle.LifecycleAddon;
+import org.eclipse.fx.ui.lifecycle.annotations.PreClose;
+import org.eclipse.fx.ui.workbench.renderers.base.widget.WWindow;
+
+public class LifeCycle {
+
+ @SuppressWarnings("rawtypes")
+ @PreClose
+ public boolean ph(MWindow win){
+ MessageDialog.openErrorDialog((Stage)((WWindow)win.getWidget()).getWidget(), "Sorry", "Sorry, no close.");
+ return false;
+ }
+
+ } \ No newline at end of file
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/MenuLifecycle.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/MenuLifecycle.java
new file mode 100644
index 000000000..98f6f2f62
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/MenuLifecycle.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2013 BestSolution.at and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.testcases.e4.lifecycle;
+
+import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.fx.ui.lifecycle.annotations.PreClose;
+import org.eclipse.fx.ui.lifecycle.annotations.PreShow;
+
+public class MenuLifecycle {
+
+ private MDirectMenuItem ds;
+
+ @PreClose
+ void closeingMenu(MMenu m) {
+ ds.getParent().getChildren().remove(ds);
+ }
+
+ @PreShow
+ void openingMenu(MMenu m, EModelService ms) {
+ ds = ms.createModelElement(MDirectMenuItem.class);
+ ds.setLabel("Dynamic Item");
+ m.getChildren().add(0,ds);
+ }
+}
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/SecondLifeCycle.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/SecondLifeCycle.java
new file mode 100644
index 000000000..cbc4e618f
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/lifecycle/SecondLifeCycle.java
@@ -0,0 +1,20 @@
+package org.eclipse.fx.testcases.e4.lifecycle;
+
+import javafx.stage.Stage;
+
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
+import org.eclipse.fx.ui.dialogs.MessageDialog;
+import org.eclipse.fx.ui.lifecycle.annotations.PreClose;
+import org.eclipse.fx.ui.workbench.renderers.base.widget.WWindow;
+
+public class SecondLifeCycle {
+
+
+ @SuppressWarnings("rawtypes")
+ @PreClose
+ public boolean ph(MWindow win){
+ MessageDialog.openErrorDialog((Stage)((WWindow)win.getWidget()).getWidget(),
+ "Sorry again", "Sorry again, no close.");
+ return false;
+ }
+} \ No newline at end of file