Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2013-07-10 12:28:38 -0400
committerTom Schindl2013-07-10 12:28:38 -0400
commit1f3b7b9c7137c4f75e690056cd09e87b78e3a263 (patch)
tree62fe142b7297747bf760c4e1ea998a1a6b4a5284
parent13818976efdc234eedd2aef6a8328ab0f3985bc6 (diff)
downloadorg.eclipse.efxclipse-1f3b7b9c7137c4f75e690056cd09e87b78e3a263.tar.gz
org.eclipse.efxclipse-1f3b7b9c7137c4f75e690056cd09e87b78e3a263.tar.xz
org.eclipse.efxclipse-1f3b7b9c7137c4f75e690056cd09e87b78e3a263.zip
Bug 410172 - [e4] add general lifecycle support for model elements
Signed-off-by: Sopot Cela <sopotcela@gmail.com>
-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/.project28
-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.MF17
-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/LifecycleCF.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.java13
-rw-r--r--bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/LifecycleAddon.java61
-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.java38
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/BaseStackRenderer.java9
-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
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/Application.e4xmi6
-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
26 files changed, 403 insertions, 5 deletions
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..5cb0f8e03
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/.project
@@ -0,0 +1,28 @@
+<?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>
+ </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..63b15abec
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+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
+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..75e44abbf
--- /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.LifecycleCF"/>
+ <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/LifecycleCF.java b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleCF.java
new file mode 100644
index 000000000..263c76811
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/internal/lifecycle/LifecycleCF.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 LifecycleCF 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..d494a66da
--- /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) {
+ return validateLifecycleAnnotation(annotationClass, getContextForParent(element), getModelContext(element), 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..995de686d
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/ELifecycleService.java
@@ -0,0 +1,13 @@
+package org.eclipse.fx.ui.lifecycle;
+
+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 annotationClass, MUIElement element);
+
+} \ 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..fb3fb88f3
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.lifecycle/src/org/eclipse/fx/ui/lifecycle/LifecycleAddon.java
@@ -0,0 +1,61 @@
+package org.eclipse.fx.ui.lifecycle;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+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.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+
+
+//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(){
+ //initial processing
+ process(MPart.class, app);
+ process(MWindow.class,app);
+ process(MPerspective.class,app);
+ //TODO - register an EH to watch for addition/removal of tags
+
+ }
+
+ private void process(Class<? extends MApplicationElement> clazz, MUIElement root) {
+ List<MUIElement> elements = (List<MUIElement>) modelService.findElements(root, null, clazz, null);
+ for (MUIElement element : elements) {
+ //build lifecycle uris set (because no duplicates allowed)
+ 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..1c60781cc 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
@@ -14,17 +14,27 @@ import java.util.Collection;
import java.util.Iterator;
import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import org.eclipse.e4.core.contexts.IEclipseContext;
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.MApplicationElement;
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.fx.ui.lifecycle.ELifecycleService;
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;
public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>> implements ChildrenHandler<MMenu, MMenuElement> {
+ @Inject
+ private ELifecycleService lifecycleService;
+
@PostConstruct
void init(IEventBroker eventBroker) {
EventProcessor.attachChildProcessor(eventBroker, this);
@@ -41,9 +51,26 @@ public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>>
handleShowing(element);
}
});
+ widget.setHidingCallback(new Runnable() {
+
+ @Override
+ public void run() {
+ IEclipseContext modelContext = getModelContext(element);
+ if (modelContext!=null) modelContext.set(MMenu.class, element);
+ lifecycleService.validateAnnotation(AboutToHide.class, element);
+ }
+ });
+ for (MApplicationElement m: element.getChildren()) {
+ if (!(m instanceof MDynamicMenuContribution)) continue;
+ MDynamicMenuContribution c = (MDynamicMenuContribution) m;
+ lifecycleService.registerLifecycleURI(element, c.getContributionURI());
+ }
}
void handleShowing(MMenu element) {
+ IEclipseContext modelContext = getModelContext(element);
+ if (modelContext!=null) modelContext.set(MMenu.class, element);
+ lifecycleService.validateAnnotation(AboutToShow.class, element);
for (MMenuElement e : element.getChildren()) {
if (e.getRenderer() instanceof BaseItemRenderer) {
@SuppressWarnings("unchecked")
@@ -52,6 +79,7 @@ public abstract class BaseMenuRenderer<N> extends BaseRenderer<MMenu, WMenu<N>>
}
}
}
+
@Override
public void doProcessContent(MMenu element) {
@@ -69,6 +97,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.unregisterLifecycleContribution(element, c.getObject());
+ continue;
+ }
if (element.isToBeRendered() && element.isVisible() && element.getWidget() != null) {
hideChild(parent, element);
}
@@ -79,6 +112,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);
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..165388247 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
@@ -348,7 +353,7 @@ public abstract class BaseStackRenderer<N, I, IC> extends BaseRenderer<MPartStac
IEclipseContext context = partContext == null ? parentContext : partContext;
// Allow closes to be 'canceled'
EPartService partService = (EPartService) context.get(EPartService.class.getName());
- if (partService.savePart(part, true)) {
+ if (partService.savePart(part, true) && lifecycleService.validateAnnotation(PreClose.class, part)) {
partService.hidePart(part);
return true;
}
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/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi b/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
index c067a0598..a8473b652 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"/>
@@ -106,6 +108,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 +134,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 +191,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"/>

Back to the top