Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Mueller2015-08-10 14:27:44 +0000
committerMarvin Mueller2015-08-10 14:27:49 +0000
commit13a13ad318949121ed8f91ede0f586e8826c711c (patch)
treec2e4dcfd6e5baea6b2a3fe26550c35e63a7d15a8
parentb06dbc20c86f0bb1a6b7461349a54fc93c21c1a7 (diff)
downloadorg.eclipse.jubula.core-13a13ad318949121ed8f91ede0f586e8826c711c.tar.gz
org.eclipse.jubula.core-13a13ad318949121ed8f91ede0f586e8826c711c.tar.xz
org.eclipse.jubula.core-13a13ad318949121ed8f91ede0f586e8826c711c.zip
Sprint task - fix for http://eclip.se/473036
This is fixing a problem which leads sometimes to timeout exceptions if using application actions like click in active window. The newly created dialog was not in the list where we are catching events from and therefore the move to the dialog could not be confirmed.
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java
index 49ee02e0f..f1fce618b 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/JavaFXApplicationTester.java
@@ -19,6 +19,7 @@ import java.util.concurrent.TimeUnit;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
+import javafx.collections.ListChangeListener;
import javafx.event.EventHandler;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
@@ -62,6 +63,21 @@ public class JavaFXApplicationTester extends AbstractApplicationTester {
((RobotJavaFXImpl) getRobot()).getInterceptor().addSceneGraph(
s.getScene().windowProperty());
}
+ CurrentStages.addStagesListener(new ListChangeListener<Stage>() {
+ @Override
+ public void onChanged(
+ ListChangeListener.Change<? extends Stage> c) {
+ if (c.next()) {
+ if (c.wasAdded()) {
+ for (Stage stage : c.getAddedSubList()) {
+ ((RobotJavaFXImpl) getRobot())
+ .getInterceptor().addSceneGraph(
+ stage.getScene().windowProperty());
+ }
+ }
+ }
+ }
+ });
}
@Override

Back to the top