Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2014-07-15 14:01:54 -0400
committerTom Schindl2014-07-15 14:01:54 -0400
commit6f437cf9b0c538c402f553cafd02ff815b56b520 (patch)
treec453166c25c59ee07c5eb71cf1f9e6d370bcbbf7 /testcases
parentf8bcac34770a9f073887ad5b5149fe7f35973475 (diff)
downloadorg.eclipse.efxclipse-6f437cf9b0c538c402f553cafd02ff815b56b520.tar.gz
org.eclipse.efxclipse-6f437cf9b0c538c402f553cafd02ff815b56b520.tar.xz
org.eclipse.efxclipse-6f437cf9b0c538c402f553cafd02ff815b56b520.zip
Bug 439572 - Need to apply enablement on menu while visible
Diffstat (limited to 'testcases')
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/Application.e4xmi1
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/DisableDelayed.java31
2 files changed, 32 insertions, 0 deletions
diff --git a/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi b/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
index ab13ed47d..b97f2cdd8 100755
--- a/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
+++ b/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
@@ -151,6 +151,7 @@
<children xsi:type="menu:HandledMenuItem" xmi:id="__QfhEANwEeS-UZpK2iB2xg" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.13" label="Sample Expression">
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_A09kgANxEeS-UZpK2iB2xg" coreExpressionId="org.eclipse.fx.testcases.e4.definition1"/>
</children>
+ <children xsi:type="menu:DirectMenuItem" xmi:id="_p-vFcAxJEeSIHKL_NsSDZw" elementId="org.eclipse.fx.testcases.e4.directmenuitem.16" label="Disable Delayed" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.DisableDelayed"/>
</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">
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/DisableDelayed.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/DisableDelayed.java
new file mode 100644
index 000000000..5db38be5e
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/handlers/DisableDelayed.java
@@ -0,0 +1,31 @@
+package org.eclipse.fx.testcases.e4.handlers;
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javafx.application.Platform;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.e4.ui.model.application.MApplication;
+
+public class DisableDelayed {
+ @Execute
+ public void execute(MApplication application, IEventBroker broker) {
+ Timer t = new Timer(true);
+ t.schedule(new TimerTask() {
+
+ @Override
+ public void run() {
+ Platform.runLater(new Runnable() {
+
+ @Override
+ public void run() {
+ new Handler0().execute(application);
+ new Handler1().execute(application, broker);
+ }
+ });
+ }
+ }, 3000);
+ }
+}

Back to the top