Index: trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/AbstractTemporalRelationshipTC.java
===================================================================
--- trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/AbstractTemporalRelationshipTC.java	(revision 468)
+++ trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/AbstractTemporalRelationshipTC.java	(revision 557)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: AbstractTemporalRelationshipTC.java,v $
 // Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
@@ -5,5 +4,5 @@
 // Creation  : 2012 by patrick
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
 package de.ugoe.cs.quest.tasktrees.temporalrelation;
 
@@ -14,18 +13,17 @@
 import org.junit.Before;
 
-import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
-import de.ugoe.cs.quest.eventcore.userinteraction.Interaction;
+import de.ugoe.cs.quest.eventcore.IEventTarget;
+import de.ugoe.cs.quest.eventcore.IEventType;
 import de.ugoe.cs.quest.tasktrees.nodeequality.NodeEqualityRuleManager;
 import de.ugoe.cs.quest.tasktrees.testutils.SimpleLogFormatter;
 import de.ugoe.cs.quest.tasktrees.testutils.Utilities;
-import de.ugoe.cs.quest.tasktrees.treeifc.InteractionTask;
-import de.ugoe.cs.quest.tasktrees.treeifc.Sequence;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTree;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeBuilder;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNodeFactory;
-import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeBuilderImpl;
-import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeNodeFactoryImpl;
+import de.ugoe.cs.quest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.quest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeBuilder;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNodeFactory;
+import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeBuilder;
+import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeNodeFactory;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -34,67 +32,54 @@
  * @author 2012, last modified by $Author: patrick$
  */
-//-------------------------------------------------------------------------------------------------
-public class AbstractTemporalRelationshipTC
-{
+public class AbstractTemporalRelationshipTC {
 
-  /** */
-  private List<InteractionTask> mInteractions;
-  
-  /** */
-  private TaskTreeBuilder mTaskTreeBuilder = new TaskTreeBuilderImpl();
+    /** */
+    private List<IEventTask> events;
 
-  /** */
-  private TaskTreeNodeFactory mTaskTreeNodeFactory = new TaskTreeNodeFactoryImpl();
-  
-  /** */
-  private NodeEqualityRuleManager mNodeEqualityRuleManager =
-    Utilities.getNodeEqualityRuleManagerForTests();
+    /** */
+    private ITaskTreeBuilder taskTreeBuilder = new TaskTreeBuilder();
 
-  //-----------------------------------------------------------------------------------------------
-  /**
+    /** */
+    private ITaskTreeNodeFactory taskTreeNodeFactory = new TaskTreeNodeFactory();
+
+    /** */
+    private NodeEqualityRuleManager nodeEqualityRuleManager =
+        Utilities.getNodeEqualityRuleManagerForTests();
+
+    /**
    *
    */
-  //-----------------------------------------------------------------------------------------------
-  @Before
-  public void setUp()
-  {
-    Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter());
-    mInteractions = new ArrayList<InteractionTask>();
-  }
+    @Before
+    public void setUp() {
+        Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter());
+        events = new ArrayList<IEventTask>();
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * @param interactionsDoNotOverwriteElement
-   */
-  //-----------------------------------------------------------------------------------------------
-  protected void simulateInteraction(GUIElement GUIElement, Interaction interaction)
-  {
-    mInteractions.add
-      (mTaskTreeNodeFactory.createNewInteractionTask(GUIElement, interaction));
-  }
+    /**
+     *
+     */
+    protected void simulateEvent(IEventType eventType, IEventTarget eventTarget) {
+        events.add(taskTreeNodeFactory.createNewEventTask(eventType, eventTarget));
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * @param interactionsDoNotOverwriteElement
-   * @return 
-   */
-  //-----------------------------------------------------------------------------------------------
-  protected TaskTree getTaskTree()
-  {
-    Sequence sequence = mTaskTreeNodeFactory.createNewSequence();
-    
-    for (InteractionTask task : mInteractions)
-    {
-      mTaskTreeBuilder.addChild(sequence, task);
+    /**
+     *
+     * @return
+     */
+    protected ITaskTree getTaskTree() {
+        ISequence sequence = taskTreeNodeFactory.createNewSequence();
+
+        for (IEventTask task : events) {
+            taskTreeBuilder.addChild(sequence, task);
+        }
+
+        TemporalRelationshipRuleManager ruleManager =
+            new TemporalRelationshipRuleManager(nodeEqualityRuleManager);
+
+        ruleManager.init();
+        ruleManager.applyRules(sequence, taskTreeBuilder, taskTreeNodeFactory, true);
+
+        return taskTreeNodeFactory.createTaskTree(sequence);
     }
-    
-    TemporalRelationshipRuleManager ruleManager =
-      new TemporalRelationshipRuleManager(mNodeEqualityRuleManager);
-    
-    ruleManager.init();
-    ruleManager.applyRules(sequence, mTaskTreeBuilder, mTaskTreeNodeFactory, true);
-    
-    return mTaskTreeNodeFactory.createTaskTree(sequence);
-  }
 
 }
Index: trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultGUIElementSequenceDetectionRuleTest.java
===================================================================
--- trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultGUIElementSequenceDetectionRuleTest.java	(revision 468)
+++ 	(revision )
@@ -1,232 +1,0 @@
-//-------------------------------------------------------------------------------------------------
-// Module    : $RCSfile: TaskTreeManagerTest.java,v $
-// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 08.11.2011 21:32:36 $
-// Project   : TaskTreePerformanceTest
-// Creation  : 2011 by Patrick
-// Copyright : Patrick Harms, 2011
-//-------------------------------------------------------------------------------------------------
-
-package de.ugoe.cs.quest.tasktrees.temporalrelation;
-
-import org.junit.Test;
-
-import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
-import de.ugoe.cs.quest.eventcore.userinteraction.Interaction;
-import de.ugoe.cs.quest.tasktrees.testutils.DummyGUIElement;
-import de.ugoe.cs.quest.tasktrees.testutils.DummyInteraction;
-import de.ugoe.cs.quest.tasktrees.testutils.TaskTreeChecker;
-
-//-------------------------------------------------------------------------------------------------
-/**
- * TODO comment
- *
- * @version $Revision: $ $Date: $
- * @author  2011, last modified by $Author: $
- */
-//-------------------------------------------------------------------------------------------------
-public class DefaultGUIElementSequenceDetectionRuleTest extends AbstractTemporalRelationshipTC
-{
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testOneInteractionOnOneElement()
-  {
-    simulateInteraction(new DummyGUIElement("elem1"), new DummyInteraction("bla", 1));
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence {" +
-       "  Interaction bla {}" +
-       "}", getTaskTree());
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testManyInteractionsOnOneElement()
-  {
-    GUIElement element = new DummyGUIElement("elem1");
-    simulateInteraction(element, new DummyInteraction("bla", 1));
-    simulateInteraction(element, new DummyInteraction("bli", 1));
-    simulateInteraction(element, new DummyInteraction("blo", 1));
-    simulateInteraction(element, new DummyInteraction("blu", 1));
-    simulateInteraction(element, new DummyInteraction("bla", 1));
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence {" +
-       "  Interaction bla {}" +
-       "  Interaction bli {}" +
-       "  Interaction blo {}" +
-       "  Interaction blu {}" +
-       "  Interaction bla {}" +
-       "}", getTaskTree());
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testOneInteractionOnManyElements()
-  {
-    GUIElement element1 = new DummyGUIElement("elem1");
-    GUIElement element2 = new DummyGUIElement("elem2");
-    GUIElement element3 = new DummyGUIElement("elem3");
-    GUIElement element4 = new DummyGUIElement("elem4");
-    GUIElement element5 = new DummyGUIElement("elem5");
-    GUIElement element6 = new DummyGUIElement("elem6");
-    simulateInteraction(element1, new DummyInteraction("bla", 1));
-    simulateInteraction(element2, new DummyInteraction("bli", 1));
-    simulateInteraction(element3, new DummyInteraction("bla", 1));
-    simulateInteraction(element4, new DummyInteraction("bli", 1));
-    simulateInteraction(element5, new DummyInteraction("blo", 1));
-    simulateInteraction(element6, new DummyInteraction("bla", 1));
-
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    Interaction bli {}" +
-       "  }" +
-       "  Sequence sequence3 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Sequence sequence4 {" +
-       "    Interaction bli {}" +
-       "  }" +
-       "  Sequence sequence5 {" +
-       "    Interaction blo {}" +
-       "  }" +
-       "  Sequence sequence6 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "}", getTaskTree());
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testManyInteractionsOnManyElements()
-  {
-    GUIElement element1 = new DummyGUIElement("elem1");
-    GUIElement element2 = new DummyGUIElement("elem2");
-    GUIElement element3 = new DummyGUIElement("elem3");
-    GUIElement element4 = new DummyGUIElement("elem4");
-    GUIElement element5 = new DummyGUIElement("elem5");
-    GUIElement element6 = new DummyGUIElement("elem6");
-    simulateInteraction(element1, new DummyInteraction("bla", 1));
-    simulateInteraction(element1, new DummyInteraction("bli", 1));
-    simulateInteraction(element1, new DummyInteraction("bla", 1));
-    simulateInteraction(element2, new DummyInteraction("bli", 1));
-    simulateInteraction(element2, new DummyInteraction("blo", 1));
-    simulateInteraction(element3, new DummyInteraction("bla", 1));
-    simulateInteraction(element4, new DummyInteraction("bli", 1));
-    simulateInteraction(element4, new DummyInteraction("bla", 1));
-    simulateInteraction(element4, new DummyInteraction("bli", 1));
-    simulateInteraction(element4, new DummyInteraction("blo", 1));
-    simulateInteraction(element5, new DummyInteraction("bla", 1));
-    simulateInteraction(element6, new DummyInteraction("bli", 1));
-    simulateInteraction(element6, new DummyInteraction("bla", 1));
-    simulateInteraction(element6, new DummyInteraction("bli", 1));
-    simulateInteraction(element6, new DummyInteraction("blo", 1));
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    Interaction bli {}" +
-       "    Interaction blo {}" +
-       "  }" +
-       "  Sequence sequence3 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Sequence sequence4 {" +
-       "    Interaction bli {}" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction blo {}" +
-       "  }" +
-       "  Sequence sequence5 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Sequence sequence6 {" +
-       "    Interaction bli {}" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction blo {}" +
-       "  }" +
-       "}", getTaskTree());
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testGUIElementHierarchyChanges() throws Exception
-  {
-    GUIElement element1 = new DummyGUIElement("elem1");
-    GUIElement element2 = new DummyGUIElement("elem2");
-    GUIElement element3 = new DummyGUIElement("elem3");
-    GUIElement parent1 = new DummyGUIElement("parent1");
-    GUIElement parent2 = new DummyGUIElement("parent2");
-    GUIElement parent3 = new DummyGUIElement("parent3");
-    
-    element1.setParent(parent1);
-    element2.setParent(parent2);
-    element3.setParent(parent3);
-    
-    parent1.setParent(parent2);
-    parent2.setParent(parent3);
-    
-    Interaction interaction1 = new DummyInteraction("bla", 1);
-    simulateInteraction(element1, interaction1);
-    simulateInteraction(element2, interaction1);
-    simulateInteraction(element3, interaction1);
-    simulateInteraction(element2, interaction1);
-    simulateInteraction(element3, interaction1);
-    simulateInteraction(element2, interaction1);
-    simulateInteraction(element1, interaction1);
-   
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Iteration iteration0 {" +
-       "    Sequence sequence3 {" +
-       "      Sequence sequence4 {" +
-       "        Interaction bla {}" +
-       "      }" +
-       "      Sequence sequence5 {" +
-       "        Interaction bla {}" +
-       "      }" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence6 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-  }
-  
-}
Index: trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultGuiEventSequenceDetectionRuleTest.java
===================================================================
--- trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultGuiEventSequenceDetectionRuleTest.java	(revision 557)
+++ trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultGuiEventSequenceDetectionRuleTest.java	(revision 557)
@@ -0,0 +1,159 @@
+// Module    : $RCSfile: TaskTreeManagerTest.java,v $
+// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 08.11.2011 21:32:36 $
+// Project   : TaskTreePerformanceTest
+// Creation  : 2011 by Patrick
+// Copyright : Patrick Harms, 2011
+
+package de.ugoe.cs.quest.tasktrees.temporalrelation;
+
+import org.junit.Test;
+
+import de.ugoe.cs.quest.eventcore.IEventTarget;
+import de.ugoe.cs.quest.tasktrees.testutils.DummyGUIElement;
+import de.ugoe.cs.quest.tasktrees.testutils.DummyInteraction;
+import de.ugoe.cs.quest.tasktrees.testutils.TaskTreeChecker;
+
+/**
+ * TODO comment
+ * 
+ * @version $Revision: $ $Date: $
+ * @author 2011, last modified by $Author: $
+ */
+public class DefaultGuiEventSequenceDetectionRuleTest extends AbstractTemporalRelationshipTC {
+    
+    /**
+     *
+     */
+    @Test
+    public void testOneInteractionOnOneElement() {
+        simulateEvent(new DummyInteraction("bla", 1), new DummyGUIElement("elem1"));
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence {" +
+             "  Event bla {}" +
+             "}", getTaskTree());
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testManyInteractionsOnOneElement() {
+        IEventTarget eventTarget = new DummyGUIElement("elem1");
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget);
+        simulateEvent(new DummyInteraction("blo", 1), eventTarget);
+        simulateEvent(new DummyInteraction("blu", 1), eventTarget);
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget);
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence {" +
+             "  Event bla {}" +
+             "  Event bli {}" +
+             "  Event blo {}" +
+             "  Event blu {}" +
+             "  Event bla {}" +
+             "}", getTaskTree());
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testOneInteractionOnManyElements() {
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        IEventTarget eventTarget3 = new DummyGUIElement("elem3");
+        IEventTarget eventTarget4 = new DummyGUIElement("elem4");
+        IEventTarget eventTarget5 = new DummyGUIElement("elem5");
+        IEventTarget eventTarget6 = new DummyGUIElement("elem6");
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget1);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget2);
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget3);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget4);
+        simulateEvent(new DummyInteraction("blo", 1), eventTarget5);
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget6);
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    Event bla {}" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    Event bli {}" +
+             "  }" +
+             "  Sequence sequence3 {" +
+             "    Event bla {}" +
+             "  }" +
+             "  Sequence sequence4 {" +
+             "    Event bli {}" +
+             "  }" +
+             "  Sequence sequence5 {" +
+             "    Event blo {}" +
+             "  }" +
+             "  Sequence sequence6 {" +
+             "    Event bla {}" +
+             "  }" +
+             "}", getTaskTree());
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testManyInteractionsOnManyElements() {
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        IEventTarget eventTarget3 = new DummyGUIElement("elem3");
+        IEventTarget eventTarget4 = new DummyGUIElement("elem4");
+        IEventTarget eventTarget5 = new DummyGUIElement("elem5");
+        IEventTarget eventTarget6 = new DummyGUIElement("elem6");
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget1);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget1);
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget1);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget2);
+        simulateEvent(new DummyInteraction("blo", 1), eventTarget2);
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget3);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget4);
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget4);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget4);
+        simulateEvent(new DummyInteraction("blo", 1), eventTarget4);
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget5);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget6);
+        simulateEvent(new DummyInteraction("bla", 1), eventTarget6);
+        simulateEvent(new DummyInteraction("bli", 1), eventTarget6);
+        simulateEvent(new DummyInteraction("blo", 1), eventTarget6);
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event bla {}" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    Event bli {}" +
+             "    Event blo {}" +
+             "  }" +
+             "  Sequence sequence3 {" +
+             "    Event bla {}" +
+             "  }" +
+             "  Sequence sequence4 {" +
+             "    Event bli {}" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event blo {}" +
+             "  }" +
+             "  Sequence sequence5 {" +
+             "    Event bla {}" +
+             "  }" +
+             "  Sequence sequence6 {" +
+             "    Event bli {}" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event blo {}" +
+             "  }" +
+             "}", getTaskTree());
+    }
+
+}
Index: trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultIterationDetectionRuleTest.java
===================================================================
--- trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultIterationDetectionRuleTest.java	(revision 468)
+++ trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultIterationDetectionRuleTest.java	(revision 557)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: DefaultIterationDetectionRuleTest.java,v $
 // Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
@@ -5,16 +4,15 @@
 // Creation  : 2012 by patrick
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
 package de.ugoe.cs.quest.tasktrees.temporalrelation;
 
 import org.junit.Test;
 
-import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
-import de.ugoe.cs.quest.eventcore.userinteraction.Interaction;
+import de.ugoe.cs.quest.eventcore.IEventTarget;
+import de.ugoe.cs.quest.eventcore.IEventType;
 import de.ugoe.cs.quest.tasktrees.testutils.DummyGUIElement;
 import de.ugoe.cs.quest.tasktrees.testutils.DummyInteraction;
 import de.ugoe.cs.quest.tasktrees.testutils.TaskTreeChecker;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -23,307 +21,287 @@
  * @author 2012, last modified by $Author: patrick$
  */
-//-------------------------------------------------------------------------------------------------
-public class DefaultIterationDetectionRuleTest extends AbstractTemporalRelationshipTC
-{
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testInteractionIterationDetection() throws Exception
-  {
-    GUIElement element1 = new DummyGUIElement("elem1");
-    Interaction interaction1 = new DummyInteraction("bla", 1);
-    simulateInteraction(element1, interaction1);
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Interaction bla {}" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, interaction1);
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, interaction1);
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-    for (int i = 0; i < 10; i++)
-    {
-      simulateInteraction(element1, interaction1);
+public class DefaultIterationDetectionRuleTest extends AbstractTemporalRelationshipTC {
+
+    /**
+     *
+     */
+    @Test
+    public void testInteractionIterationDetection() throws Exception {
+        IEventTarget element1 = new DummyGUIElement("elem1");
+        IEventType event1 = new DummyInteraction("bla", 1);
+        simulateEvent(event1, element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Event bla {}" +
+             "}", getTaskTree());
+
+        simulateEvent(event1, element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Event bla {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(event1, element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Event bla {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        for (int i = 0; i < 10; i++) {
+            simulateEvent(event1, element1);
+        }
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Event bla {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        // now test with preceding and trailing other events
+        IEventType event2 = new DummyInteraction("bli", 1);
+        IEventType event3 = new DummyInteraction("blup", 1);
+
+        simulateEvent(event2, element1);
+        simulateEvent(event3, element1);
+        for (int i = 0; i < 10; i++) {
+            simulateEvent(event1, element1);
+        }
+        simulateEvent(event3, element1);
+        simulateEvent(event2, element1);
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Event bla {}" +
+             "  }" +
+             "  Event bli {}" +
+             "  Event blup {}" +
+             "  Iteration iteration2 {" +
+             "    Event bla {}" +
+             "  }" +
+             "  Event blup {}" +
+             "  Event bli {}" +
+             "}", getTaskTree());
+
+        // now test with iterations of iterations
+
+        for (int i = 0; i < 10; i++) {
+            for (int j = 0; j < 5; j++) {
+                simulateEvent(event1, element1);
+            }
+            for (int j = 0; j < 5; j++) {
+                simulateEvent(event2, element1);
+            }
+            for (int j = 0; j < 5; j++) {
+                simulateEvent(event3, element1);
+            }
+        }
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Event bla {}" +
+             "  }" +
+             "  Event bli {}" +
+             "  Event blup {}" +
+             "  Iteration iteration2 {" +
+             "    Event bla {}" +
+             "  }" +
+             "  Event blup {}" +
+             "  Event bli {}" +
+             "  Iteration iteration3 {" +
+             "    Sequence sequence2 {" +
+             "      Iteration iteration4 {" +
+             "        Event bla {}" +
+             "      }" +
+             "      Iteration iteration5 {" +
+             "        Event bli {}" +
+             "      }" +
+             "      Iteration iteration6 {" +
+             "        Event blup {}" +
+             "      }" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
     }
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "}", getTaskTree());    
-    
-    // now test with preceding and trailing other interactions
-    Interaction interaction2 = new DummyInteraction("bli", 1);
-    Interaction interaction3 = new DummyInteraction("blup", 1);
-
-    simulateInteraction(element1, interaction2);
-    simulateInteraction(element1, interaction3);
-    for (int i = 0; i < 10; i++)
-    {
-      simulateInteraction(element1, interaction1);
+
+    /**
+     *
+     */
+    @Test
+    public void testSequenceIterationDetection() throws Exception {
+        IEventTarget element1 = new DummyGUIElement("elem1");
+        IEventType event1 = new DummyInteraction("bla", 1);
+        IEventType event2 = new DummyInteraction("bli", 1);
+        IEventType event3 = new DummyInteraction("blup", 1);
+        simulateEvent(event1, element1);
+        simulateEvent(event2, element1);
+        simulateEvent(event3, element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Event bla {}" +
+             "  Event bli {}" +
+             "  Event blup {}" +
+             "}", getTaskTree());
+
+        simulateEvent(event1, element1);
+        simulateEvent(event2, element1);
+        simulateEvent(event3, element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Sequence sequence2 {" +
+             "      Event bla {}" +
+             "      Event bli {}" +
+             "      Event blup {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(event1, element1);
+        simulateEvent(event2, element1);
+        simulateEvent(event3, element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Sequence sequence2 {" +
+             "      Event bla {}" +
+             "      Event bli {}" +
+             "      Event blup {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        for (int i = 0; i < 10; i++) {
+            simulateEvent(event1, element1);
+            simulateEvent(event2, element1);
+            simulateEvent(event3, element1);
+        }
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Sequence sequence2 {" +
+             "      Event bla {}" +
+             "      Event bli {}" +
+             "      Event blup {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        // now test with preceding and trailing other events
+        IEventType event4 = new DummyInteraction("ble", 1);
+        IEventType event5 = new DummyInteraction("blo", 1);
+        IEventType event6 = new DummyInteraction("blu", 1);
+        simulateEvent(event4, element1);
+        simulateEvent(event5, element1);
+        simulateEvent(event6, element1);
+        for (int i = 0; i < 10; i++) {
+            simulateEvent(event1, element1);
+            simulateEvent(event2, element1);
+            simulateEvent(event3, element1);
+        }
+        simulateEvent(event6, element1);
+        simulateEvent(event5, element1);
+        simulateEvent(event4, element1);
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Sequence sequence2 {" +
+             "      Event bla {}" +
+             "      Event bli {}" +
+             "      Event blup {}" +
+             "    }" +
+             "  }" +
+             "  Event ble {}" +
+             "  Event blo {}" +
+             "  Event blu {}" +
+             "  Iteration iteration2 {" +
+             "    Sequence sequence3 {" +
+             "      Event bla {}" +
+             "      Event bli {}" +
+             "      Event blup {}" +
+             "    }" +
+             "  }" +
+             "  Event blu {}" +
+             "  Event blo {}" +
+             "  Event ble {}" +
+             "}", getTaskTree());
+
+        // now test with iterations of iterations
+        for (int i = 0; i < 10; i++) {
+            for (int j = 0; j < 5; j++) {
+                simulateEvent(event1, element1);
+                simulateEvent(event2, element1);
+                simulateEvent(event3, element1);
+            }
+            for (int j = 0; j < 5; j++) {
+                simulateEvent(event2, element1);
+                simulateEvent(event1, element1);
+                simulateEvent(event3, element1);
+            }
+            for (int j = 0; j < 5; j++) {
+                simulateEvent(event1, element1);
+                simulateEvent(event2, element1);
+                simulateEvent(event3, element1);
+            }
+        }
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration iteration1 {" +
+             "    Sequence sequence2 {" +
+             "      Event bla {}" +
+             "      Event bli {}" +
+             "      Event blup {}" +
+             "    }" +
+             "  }" +
+             "  Event ble {}" +
+             "  Event blo {}" +
+             "  Event blu {}" +
+             "  Iteration iteration2 {" +
+             "    Sequence sequence3 {" +
+             "      Event bla {}" +
+             "      Event bli {}" +
+             "      Event blup {}" +
+             "    }" +
+             "  }" +
+             "  Event blu {}" +
+             "  Event blo {}" +
+             "  Event ble {}" +
+             "  Iteration iteration3 {" +
+             "    Sequence sequence4 {" +
+             "      Iteration iteration4 {" +
+             "        Sequence sequence4 {" +
+             "          Event bla {}" +
+             "          Event bli {}" +
+             "          Event blup {}" +
+             "        }" +
+             "      }" +
+             "      Iteration iteration5 {" +
+             "        Sequence sequence5 {" +
+             "          Event bli {}" +
+             "          Event bla {}" +
+             "          Event blup {}" +
+             "        }" +
+             "      }" +
+             "      Iteration iteration6 {" +
+             "        Sequence sequence6 {" +
+             "          Event bla {}" +
+             "          Event bli {}" +
+             "          Event blup {}" +
+             "        }" +
+             "      }" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
     }
-    simulateInteraction(element1, interaction3);
-    simulateInteraction(element1, interaction2);
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Interaction bli {}" +
-       "  Interaction blup {}" +
-       "  Iteration iteration2 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Interaction blup {}" +
-       "  Interaction bli {}" +
-       "}", getTaskTree());    
-  
-    // now test with iterations of iterations
-
-    for (int i = 0; i < 10; i++)
-    {
-      for (int j = 0; j < 5; j++)
-      {
-        simulateInteraction(element1, interaction1);
-      }
-      for (int j = 0; j < 5; j++)
-      {
-        simulateInteraction(element1, interaction2);
-      }
-      for (int j = 0; j < 5; j++)
-      {
-        simulateInteraction(element1, interaction3);
-      }
-    }
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Interaction bli {}" +
-       "  Interaction blup {}" +
-       "  Iteration iteration2 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "  Interaction blup {}" +
-       "  Interaction bli {}" +
-       "  Iteration iteration3 {" +
-       "    Sequence sequence2 {" +
-       "      Iteration iteration4 {" +
-       "        Interaction bla {}" +
-       "      }" +
-       "      Iteration iteration5 {" +
-       "        Interaction bli {}" +
-       "      }" +
-       "      Iteration iteration6 {" +
-       "        Interaction blup {}" +
-       "      }" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-  
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testSequenceIterationDetection() throws Exception
-  {
-    GUIElement element1 = new DummyGUIElement("elem1");
-    Interaction interaction1 = new DummyInteraction("bla", 1);
-    Interaction interaction2 = new DummyInteraction("bli", 1);
-    Interaction interaction3 = new DummyInteraction("blup", 1);
-    simulateInteraction(element1, interaction1);
-    simulateInteraction(element1, interaction2);
-    simulateInteraction(element1, interaction3);
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Interaction bla {}" +
-       "  Interaction bli {}" +
-       "  Interaction blup {}" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, interaction1);
-    simulateInteraction(element1, interaction2);
-    simulateInteraction(element1, interaction3);
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Sequence sequence2 {" +
-       "      Interaction bla {}" +
-       "      Interaction bli {}" +
-       "      Interaction blup {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, interaction1);
-    simulateInteraction(element1, interaction2);
-    simulateInteraction(element1, interaction3);
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Sequence sequence2 {" +
-       "      Interaction bla {}" +
-       "      Interaction bli {}" +
-       "      Interaction blup {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-    for (int i = 0; i < 10; i++)
-    {
-      simulateInteraction(element1, interaction1);
-      simulateInteraction(element1, interaction2);
-      simulateInteraction(element1, interaction3);
-    }
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Sequence sequence2 {" +
-       "      Interaction bla {}" +
-       "      Interaction bli {}" +
-       "      Interaction blup {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-    
-    // now test with preceding and trailing other interactions
-    Interaction interaction4 = new DummyInteraction("ble", 1);
-    Interaction interaction5 = new DummyInteraction("blo", 1);
-    Interaction interaction6 = new DummyInteraction("blu", 1);
-    simulateInteraction(element1, interaction4);
-    simulateInteraction(element1, interaction5);
-    simulateInteraction(element1, interaction6);
-    for (int i = 0; i < 10; i++)
-    {
-      simulateInteraction(element1, interaction1);
-      simulateInteraction(element1, interaction2);
-      simulateInteraction(element1, interaction3);
-    }
-    simulateInteraction(element1, interaction6);
-    simulateInteraction(element1, interaction5);
-    simulateInteraction(element1, interaction4);
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Sequence sequence2 {" +
-       "      Interaction bla {}" +
-       "      Interaction bli {}" +
-       "      Interaction blup {}" +
-       "    }" +
-       "  }" +
-       "  Interaction ble {}" +
-       "  Interaction blo {}" +
-       "  Interaction blu {}" +
-       "  Iteration iteration2 {" +
-       "    Sequence sequence3 {" +
-       "      Interaction bla {}" +
-       "      Interaction bli {}" +
-       "      Interaction blup {}" +
-       "    }" +
-       "  }" +
-       "  Interaction blu {}" +
-       "  Interaction blo {}" +
-       "  Interaction ble {}" +
-       "}", getTaskTree());    
-  
-    // now test with iterations of iterations
-    for (int i = 0; i < 10; i++)
-    {
-      for (int j = 0; j < 5; j++)
-      {
-        simulateInteraction(element1, interaction1);
-        simulateInteraction(element1, interaction2);
-        simulateInteraction(element1, interaction3);
-      }
-      for (int j = 0; j < 5; j++)
-      {
-        simulateInteraction(element1, interaction2);
-        simulateInteraction(element1, interaction1);
-        simulateInteraction(element1, interaction3);
-      }
-      for (int j = 0; j < 5; j++)
-      {
-        simulateInteraction(element1, interaction1);
-        simulateInteraction(element1, interaction2);
-        simulateInteraction(element1, interaction3);
-      }
-    }
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration iteration1 {" +
-       "    Sequence sequence2 {" +
-       "      Interaction bla {}" +
-       "      Interaction bli {}" +
-       "      Interaction blup {}" +
-       "    }" +
-       "  }" +
-       "  Interaction ble {}" +
-       "  Interaction blo {}" +
-       "  Interaction blu {}" +
-       "  Iteration iteration2 {" +
-       "    Sequence sequence3 {" +
-       "      Interaction bla {}" +
-       "      Interaction bli {}" +
-       "      Interaction blup {}" +
-       "    }" +
-       "  }" +
-       "  Interaction blu {}" +
-       "  Interaction blo {}" +
-       "  Interaction ble {}" +
-       "  Iteration iteration3 {" +
-       "    Sequence sequence4 {" +
-       "      Iteration iteration4 {" +
-       "        Sequence sequence4 {" +
-       "          Interaction bla {}" +
-       "          Interaction bli {}" +
-       "          Interaction blup {}" +
-       "        }" +
-       "      }" +
-       "      Iteration iteration5 {" +
-       "        Sequence sequence5 {" +
-       "          Interaction bli {}" +
-       "          Interaction bla {}" +
-       "          Interaction blup {}" +
-       "        }" +
-       "      }" +
-       "      Iteration iteration6 {" +
-       "        Sequence sequence6 {" +
-       "          Interaction bla {}" +
-       "          Interaction bli {}" +
-       "          Interaction blup {}" +
-       "        }" +
-       "      }" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-  }
-  
+
 }
Index: trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultMouseClickReductionRuleTest.java
===================================================================
--- trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultMouseClickReductionRuleTest.java	(revision 468)
+++ trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultMouseClickReductionRuleTest.java	(revision 557)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: TaskTreeManagerTest.java,v $
 // Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 08.11.2011 21:32:36 $
@@ -5,5 +4,4 @@
 // Creation  : 2011 by Patrick
 // Copyright : Patrick Harms, 2011
-//-------------------------------------------------------------------------------------------------
 
 package de.ugoe.cs.quest.tasktrees.temporalrelation;
@@ -11,164 +9,159 @@
 import org.junit.Test;
 
-import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
-import de.ugoe.cs.quest.eventcore.userinteraction.MouseButtonDown;
-import de.ugoe.cs.quest.eventcore.userinteraction.MouseButtonInteraction;
-import de.ugoe.cs.quest.eventcore.userinteraction.MouseButtonUp;
-import de.ugoe.cs.quest.eventcore.userinteraction.MouseClick;
+import de.ugoe.cs.quest.eventcore.gui.MouseButtonDown;
+import de.ugoe.cs.quest.eventcore.gui.MouseButtonInteraction;
+import de.ugoe.cs.quest.eventcore.gui.MouseButtonUp;
+import de.ugoe.cs.quest.eventcore.gui.MouseClick;
+import de.ugoe.cs.quest.eventcore.guimodel.IGUIElement;
 import de.ugoe.cs.quest.tasktrees.testutils.DummyGUIElement;
 import de.ugoe.cs.quest.tasktrees.testutils.DummyInteraction;
 import de.ugoe.cs.quest.tasktrees.testutils.TaskTreeChecker;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
- *
+ * 
  * @version $Revision: $ $Date: $
- * @author  2011, last modified by $Author: $
+ * @author 2011, last modified by $Author: $
  */
-//-------------------------------------------------------------------------------------------------
-public class DefaultMouseClickReductionRuleTest extends AbstractTemporalRelationshipTC
-{
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testMouseClickInOneSequenceElement()
-  {
-    MouseButtonInteraction.Button leftBtn = MouseButtonInteraction.Button.LEFT;
-    MouseButtonInteraction.Button middleBtn = MouseButtonInteraction.Button.MIDDLE;
-    MouseButtonInteraction.Button rightBtn = MouseButtonInteraction.Button.RIGHT;
-    
-    GUIElement element1 = new DummyGUIElement("elem1");
-    GUIElement element2 = new DummyGUIElement("elem1");
-    
-    simulateInteraction(element1, new MouseButtonDown(leftBtn));
-    simulateInteraction(element1, new MouseButtonUp(leftBtn));
-    simulateInteraction(element1, new MouseClick(leftBtn));
+public class DefaultMouseClickReductionRuleTest extends AbstractTemporalRelationshipTC {
 
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence {" +
-       "  Interaction LeftMouseClick {}" +
-       "}", getTaskTree());
-    
-    simulateInteraction(element1, new DummyInteraction("bla", 1));
-    simulateInteraction(element1, new DummyInteraction("bli", 1));
-    simulateInteraction(element1, new MouseButtonDown(middleBtn));
-    simulateInteraction(element1, new MouseButtonUp(middleBtn));
-    simulateInteraction(element1, new MouseClick(middleBtn));
-    simulateInteraction(element1, new DummyInteraction("blo", 1));
-    simulateInteraction(element1, new DummyInteraction("blu", 1));
+    /**
+     *
+     */
+    @Test
+    public void testMouseClickInOneSequenceElement() {
+        MouseButtonInteraction.Button leftBtn = MouseButtonInteraction.Button.LEFT;
+        MouseButtonInteraction.Button middleBtn = MouseButtonInteraction.Button.MIDDLE;
+        MouseButtonInteraction.Button rightBtn = MouseButtonInteraction.Button.RIGHT;
 
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence {" +
-       "  Interaction LeftMouseClick {}" +
-       "  Interaction bla {}" +
-       "  Interaction bli {}" +
-       "  Interaction MiddleMouseClick {}" +
-       "  Interaction blo {}" +
-       "  Interaction blu {}" +
-       "}", getTaskTree());
+        IGUIElement element1 = new DummyGUIElement("elem1");
+        IGUIElement element2 = new DummyGUIElement("elem1");
 
-    simulateInteraction(element2, new DummyInteraction("bla", 1));
-    simulateInteraction(element2, new DummyInteraction("bli", 1));
-    simulateInteraction(element2, new MouseButtonDown(rightBtn));
-    simulateInteraction(element2, new MouseButtonUp(rightBtn));
-    simulateInteraction(element2, new MouseClick(rightBtn));
-    simulateInteraction(element2, new DummyInteraction("blo", 1));
-    simulateInteraction(element2, new DummyInteraction("blu", 1));
+        simulateEvent(new MouseButtonDown(leftBtn), element1);
+        simulateEvent(new MouseButtonUp(leftBtn), element1);
+        simulateEvent(new MouseClick(leftBtn), element1);
 
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    Interaction LeftMouseClick {}" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction MiddleMouseClick {}" +
-       "    Interaction blo {}" +
-       "    Interaction blu {}" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction RightMouseClick {}" +
-       "    Interaction blo {}" +
-       "    Interaction blu {}" +
-       "  }" +
-       "}", getTaskTree());
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence {" +
+             "  Event LeftMouseClick {}" +
+             "}", getTaskTree());
 
-    simulateInteraction(element1, new MouseButtonDown(leftBtn));
-    simulateInteraction(element1, new MouseButtonUp(leftBtn));
-    simulateInteraction(element2, new MouseClick(leftBtn));
+        simulateEvent(new DummyInteraction("bla", 1), element1);
+        simulateEvent(new DummyInteraction("bli", 1), element1);
+        simulateEvent(new MouseButtonDown(middleBtn), element1);
+        simulateEvent(new MouseButtonUp(middleBtn), element1);
+        simulateEvent(new MouseClick(middleBtn), element1);
+        simulateEvent(new DummyInteraction("blo", 1), element1);
+        simulateEvent(new DummyInteraction("blu", 1), element1);
 
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    Interaction LeftMouseClick {}" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction MiddleMouseClick {}" +
-       "    Interaction blo {}" +
-       "    Interaction blu {}" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction RightMouseClick {}" +
-       "    Interaction blo {}" +
-       "    Interaction blu {}" +
-       "  }" +
-       "  Sequence sequence3 {" +
-       "    Interaction LeftMouseButtonDown {}" +
-       "    Interaction LeftMouseButtonUp {}" +
-       "  }" +
-       "  Sequence sequence4 {" +
-       "    Interaction LeftMouseClick {}" +
-       "  }" +
-       "}", getTaskTree());
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence {" +
+             "  Event LeftMouseClick {}" +
+             "  Event bla {}" +
+             "  Event bli {}" +
+             "  Event MiddleMouseClick {}" +
+             "  Event blo {}" +
+             "  Event blu {}" +
+             "}", getTaskTree());
 
-    simulateInteraction(element1, new MouseButtonDown(middleBtn));
-    simulateInteraction(element1, new MouseButtonUp(middleBtn));
-    simulateInteraction(element1, new MouseClick(rightBtn));
-    simulateInteraction(element2, new DummyInteraction("bla", 1));
+        simulateEvent(new DummyInteraction("bla", 1), element2);
+        simulateEvent(new DummyInteraction("bli", 1), element2);
+        simulateEvent(new MouseButtonDown(rightBtn), element2);
+        simulateEvent(new MouseButtonUp(rightBtn), element2);
+        simulateEvent(new MouseClick(rightBtn), element2);
+        simulateEvent(new DummyInteraction("blo", 1), element2);
+        simulateEvent(new DummyInteraction("blu", 1), element2);
 
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    Interaction LeftMouseClick {}" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction MiddleMouseClick {}" +
-       "    Interaction blo {}" +
-       "    Interaction blu {}" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    Interaction bla {}" +
-       "    Interaction bli {}" +
-       "    Interaction RightMouseClick {}" +
-       "    Interaction blo {}" +
-       "    Interaction blu {}" +
-       "  }" +
-       "  Sequence sequence3 {" +
-       "    Interaction LeftMouseButtonDown {}" +
-       "    Interaction LeftMouseButtonUp {}" +
-       "  }" +
-       "  Sequence sequence4 {" +
-       "    Interaction LeftMouseClick {}" +
-       "  }" +
-       "  Sequence sequence5 {" +
-       "    Sequence sequence6 {" +
-       "      Interaction MiddleMouseButtonDown {}" +
-       "      Interaction MiddleMouseButtonUp {}" +
-       "    }" +
-       "    Interaction RightMouseClick {}" +
-       "  }" +
-       "  Sequence sequence7 {" +
-       "    Interaction bla {}" +
-       "  }" +
-       "}", getTaskTree());
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    Event LeftMouseClick {}" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event MiddleMouseClick {}" +
+             "    Event blo {}" +
+             "    Event blu {}" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event RightMouseClick {}" +
+             "    Event blo {}" +
+             "    Event blu {}" +
+             "  }" +
+             "}", getTaskTree());
 
-  }
-  
+        simulateEvent(new MouseButtonDown(leftBtn), element1);
+        simulateEvent(new MouseButtonUp(leftBtn), element1);
+        simulateEvent(new MouseClick(leftBtn), element2);
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    Event LeftMouseClick {}" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event MiddleMouseClick {}" +
+             "    Event blo {}" +
+             "    Event blu {}" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event RightMouseClick {}" +
+             "    Event blo {}" +
+             "    Event blu {}" +
+             "  }" +
+             "  Sequence sequence3 {" +
+             "    Event LeftMouseButtonDown {}" +
+             "    Event LeftMouseButtonUp {}" +
+             "  }" +
+             "  Sequence sequence4 {" +
+             "    Event LeftMouseClick {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new MouseButtonDown(middleBtn), element1);
+        simulateEvent(new MouseButtonUp(middleBtn), element1);
+        simulateEvent(new MouseClick(rightBtn), element1);
+        simulateEvent(new DummyInteraction("bla", 1), element2);
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    Event LeftMouseClick {}" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event MiddleMouseClick {}" +
+             "    Event blo {}" +
+             "    Event blu {}" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    Event bla {}" +
+             "    Event bli {}" +
+             "    Event RightMouseClick {}" +
+             "    Event blo {}" +
+             "    Event blu {}" +
+             "  }" +
+             "  Sequence sequence3 {" +
+             "    Event LeftMouseButtonDown {}" +
+             "    Event LeftMouseButtonUp {}" +
+             "  }" +
+             "  Sequence sequence4 {" +
+             "    Event LeftMouseClick {}" +
+             "  }" +
+             "  Sequence sequence5 {" +
+             "    Sequence sequence6 {" +
+             "      Event MiddleMouseButtonDown {}" +
+             "      Event MiddleMouseButtonUp {}" +
+             "    }" +
+             "    Event RightMouseClick {}" +
+             "  }" +
+             "  Sequence sequence7 {" +
+             "    Event bla {}" +
+             "  }" +
+             "}", getTaskTree());
+
+    }
+
 }
Index: trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultTextInputReductionRuleTest.java
===================================================================
--- trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultTextInputReductionRuleTest.java	(revision 468)
+++ trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/DefaultTextInputReductionRuleTest.java	(revision 557)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: DefaultIterationDetectionRuleTest.java,v $
 // Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
@@ -5,18 +4,17 @@
 // Creation  : 2012 by patrick
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
 package de.ugoe.cs.quest.tasktrees.temporalrelation;
 
 import org.junit.Test;
 
-import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
-import de.ugoe.cs.quest.eventcore.guimodel.TextField;
-import de.ugoe.cs.quest.eventcore.userinteraction.KeyPressed;
-import de.ugoe.cs.quest.eventcore.userinteraction.KeyReleased;
+import de.ugoe.cs.quest.eventcore.gui.KeyPressed;
+import de.ugoe.cs.quest.eventcore.gui.KeyReleased;
+import de.ugoe.cs.quest.eventcore.guimodel.IGUIElement;
+import de.ugoe.cs.quest.eventcore.guimodel.ITextField;
 import de.ugoe.cs.quest.tasktrees.testutils.DummyGUIElement;
 import de.ugoe.cs.quest.tasktrees.testutils.TaskTreeChecker;
 import de.ugoe.cs.tasktree.keyboardmaps.VirtualKey;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -25,387 +23,371 @@
  * @author 2012, last modified by $Author: patrick$
  */
-//-------------------------------------------------------------------------------------------------
-public class DefaultTextInputReductionRuleTest extends AbstractTemporalRelationshipTC
-{
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testSimpleTextEntry()
-  {
-    GUIElement element1 = new DummyTextField("elem1");
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_A));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_A));
-    new TaskTreeChecker(true).assertTaskTree
-      ("Sequence sequence0 {" +
-       "  TextInputInteraction TextInput a {" +
-       "    Interaction KeyPressed LETTER_A {}" +
-       "    Interaction KeyReleased LETTER_A {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_B));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_B));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  TextInputInteraction TextInput ab {" +
-       "    Interaction KeyPressed LETTER_A {}" +
-       "    Interaction KeyReleased LETTER_A {}" +
-       "    Interaction KeyPressed LETTER_B {}" +
-       "    Interaction KeyReleased LETTER_B {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new KeyPressed(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_C));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_C));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.SHIFT));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  TextInputInteraction TextInput abC {" +
-       "    Interaction KeyPressed LETTER_A {}" +
-       "    Interaction KeyReleased LETTER_A {}" +
-       "    Interaction KeyPressed LETTER_B {}" +
-       "    Interaction KeyReleased LETTER_B {}" +
-       "    Interaction KeyPressed SHIFT {}" +
-       "    Interaction KeyPressed LETTER_C {}" +
-       "    Interaction KeyReleased LETTER_C {}" +
-       "    Interaction KeyReleased SHIFT {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new KeyPressed(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_D));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_D));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_E));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_E));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_F));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_F));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.SHIFT));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  TextInputInteraction TextInput abCDEF {" +
-       "    Interaction KeyPressed LETTER_A {}" +
-       "    Interaction KeyReleased LETTER_A {}" +
-       "    Interaction KeyPressed LETTER_B {}" +
-       "    Interaction KeyReleased LETTER_B {}" +
-       "    Interaction KeyPressed SHIFT {}" +
-       "    Interaction KeyPressed LETTER_C {}" +
-       "    Interaction KeyReleased LETTER_C {}" +
-       "    Interaction KeyReleased SHIFT {}" +
-       "    Interaction KeyPressed SHIFT {}" +
-       "    Interaction KeyPressed LETTER_D {}" +
-       "    Interaction KeyReleased LETTER_D {}" +
-       "    Interaction KeyPressed LETTER_E {}" +
-       "    Interaction KeyReleased LETTER_E {}" +
-       "    Interaction KeyPressed LETTER_F {}" +
-       "    Interaction KeyReleased LETTER_F {}" +
-       "    Interaction KeyReleased SHIFT {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-
-    simulateInteraction(element1, new KeyPressed(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_G));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_G));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.SHIFT));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  TextInputInteraction TextInput abCDEFg {" +
-       "    Interaction KeyPressed LETTER_A {}" +
-       "    Interaction KeyReleased LETTER_A {}" +
-       "    Interaction KeyPressed LETTER_B {}" +
-       "    Interaction KeyReleased LETTER_B {}" +
-       "    Interaction KeyPressed SHIFT {}" +
-       "    Interaction KeyPressed LETTER_C {}" +
-       "    Interaction KeyReleased LETTER_C {}" +
-       "    Interaction KeyReleased SHIFT {}" +
-       "    Interaction KeyPressed SHIFT {}" +
-       "    Interaction KeyPressed LETTER_D {}" +
-       "    Interaction KeyReleased LETTER_D {}" +
-       "    Interaction KeyPressed LETTER_E {}" +
-       "    Interaction KeyReleased LETTER_E {}" +
-       "    Interaction KeyPressed LETTER_F {}" +
-       "    Interaction KeyReleased LETTER_F {}" +
-       "    Interaction KeyReleased SHIFT {}" +
-       "    Interaction KeyPressed SHIFT {}" +
-       "    Interaction KeyPressed SHIFT {}" +
-       "    Interaction KeyPressed LETTER_G {}" +
-       "    Interaction KeyReleased LETTER_G {}" +
-       "    Interaction KeyReleased SHIFT {}" +
-       "    Interaction KeyReleased SHIFT {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testTextEntryOnDifferentGuiElements()
-  {
-    GUIElement element1 = new DummyTextField("elem1");
-    GUIElement element2 = new DummyTextField("elem2");
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_A));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_A));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  TextInputInteraction TextInput a {" +
-       "    Interaction KeyPressed LETTER_A {}" +
-       "    Interaction KeyReleased LETTER_A {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element2, new KeyPressed(VirtualKey.LETTER_B));
-    simulateInteraction(element2, new KeyReleased(VirtualKey.LETTER_B));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    TextInputInteraction TextInput a {" +
-       "      Interaction KeyPressed LETTER_A {}" +
-       "      Interaction KeyReleased LETTER_A {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    TextInputInteraction TextInput b {" +
-       "      Interaction KeyPressed LETTER_B {}" +
-       "      Interaction KeyReleased LETTER_B {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new KeyPressed(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_C));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_C));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.SHIFT));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    TextInputInteraction TextInput a {" +
-       "      Interaction KeyPressed LETTER_A {}" +
-       "      Interaction KeyReleased LETTER_A {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    TextInputInteraction TextInput b {" +
-       "      Interaction KeyPressed LETTER_B {}" +
-       "      Interaction KeyReleased LETTER_B {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence3 {" +
-       "    TextInputInteraction TextInput C {" +
-       "      Interaction KeyPressed SHIFT {}" +
-       "      Interaction KeyPressed LETTER_C {}" +
-       "      Interaction KeyReleased LETTER_C {}" +
-       "      Interaction KeyReleased SHIFT {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element2, new KeyPressed(VirtualKey.SHIFT));
-    simulateInteraction(element2, new KeyPressed(VirtualKey.LETTER_D));
-    simulateInteraction(element2, new KeyReleased(VirtualKey.LETTER_D));
-    simulateInteraction(element2, new KeyPressed(VirtualKey.LETTER_E));
-    simulateInteraction(element2, new KeyReleased(VirtualKey.LETTER_E));
-    simulateInteraction(element2, new KeyPressed(VirtualKey.LETTER_F));
-    simulateInteraction(element2, new KeyReleased(VirtualKey.LETTER_F));
-    simulateInteraction(element2, new KeyReleased(VirtualKey.SHIFT));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    TextInputInteraction TextInput a {" +
-       "      Interaction KeyPressed LETTER_A {}" +
-       "      Interaction KeyReleased LETTER_A {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    TextInputInteraction TextInput b {" +
-       "      Interaction KeyPressed LETTER_B {}" +
-       "      Interaction KeyReleased LETTER_B {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence3 {" +
-       "    TextInputInteraction TextInput C {" +
-       "      Interaction KeyPressed SHIFT {}" +
-       "      Interaction KeyPressed LETTER_C {}" +
-       "      Interaction KeyReleased LETTER_C {}" +
-       "      Interaction KeyReleased SHIFT {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence4 {" +
-       "    TextInputInteraction TextInput DEF {" +
-       "      Interaction KeyPressed SHIFT {}" +
-       "      Interaction KeyPressed LETTER_D {}" +
-       "      Interaction KeyReleased LETTER_D {}" +
-       "      Interaction KeyPressed LETTER_E {}" +
-       "      Interaction KeyReleased LETTER_E {}" +
-       "      Interaction KeyPressed LETTER_F {}" +
-       "      Interaction KeyReleased LETTER_F {}" +
-       "      Interaction KeyReleased SHIFT {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-
-    simulateInteraction(element1, new KeyPressed(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_G));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_G));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.SHIFT));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.SHIFT));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  Sequence sequence1 {" +
-       "    TextInputInteraction TextInput a {" +
-       "      Interaction KeyPressed LETTER_A {}" +
-       "      Interaction KeyReleased LETTER_A {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence2 {" +
-       "    TextInputInteraction TextInput b {" +
-       "      Interaction KeyPressed LETTER_B {}" +
-       "      Interaction KeyReleased LETTER_B {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence3 {" +
-       "    TextInputInteraction TextInput C {" +
-       "      Interaction KeyPressed SHIFT {}" +
-       "      Interaction KeyPressed LETTER_C {}" +
-       "      Interaction KeyReleased LETTER_C {}" +
-       "      Interaction KeyReleased SHIFT {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence4 {" +
-       "    TextInputInteraction TextInput DEF {" +
-       "      Interaction KeyPressed SHIFT {}" +
-       "      Interaction KeyPressed LETTER_D {}" +
-       "      Interaction KeyReleased LETTER_D {}" +
-       "      Interaction KeyPressed LETTER_E {}" +
-       "      Interaction KeyReleased LETTER_E {}" +
-       "      Interaction KeyPressed LETTER_F {}" +
-       "      Interaction KeyReleased LETTER_F {}" +
-       "      Interaction KeyReleased SHIFT {}" +
-       "    }" +
-       "  }" +
-       "  Sequence sequence5 {" +
-       "    TextInputInteraction TextInput g {" +
-       "      Interaction KeyPressed SHIFT {}" +
-       "      Interaction KeyPressed SHIFT {}" +
-       "      Interaction KeyPressed LETTER_G {}" +
-       "      Interaction KeyReleased LETTER_G {}" +
-       "      Interaction KeyReleased SHIFT {}" +
-       "      Interaction KeyReleased SHIFT {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testUsageOfBackspace()
-  {
-    GUIElement element1 = new DummyTextField("elem1");
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_A));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_A));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_B));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_B));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_C));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_C));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_D));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_D));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.BACK_SPACE));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.BACK_SPACE));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_E));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_E));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.LETTER_F));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.LETTER_F));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  TextInputInteraction TextInput abcef {" +
-       "    Interaction KeyPressed LETTER_A {}" +
-       "    Interaction KeyReleased LETTER_A {}" +
-       "    Interaction KeyPressed LETTER_B {}" +
-       "    Interaction KeyReleased LETTER_B {}" +
-       "    Interaction KeyPressed LETTER_C {}" +
-       "    Interaction KeyReleased LETTER_C {}" +
-       "    Interaction KeyPressed LETTER_D {}" +
-       "    Interaction KeyReleased LETTER_D {}" +
-       "    Interaction KeyPressed BACK_SPACE {}" +
-       "    Interaction KeyReleased BACK_SPACE {}" +
-       "    Interaction KeyPressed LETTER_E {}" +
-       "    Interaction KeyReleased LETTER_E {}" +
-       "    Interaction KeyPressed LETTER_F {}" +
-       "    Interaction KeyReleased LETTER_F {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new KeyPressed(VirtualKey.BACK_SPACE));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.BACK_SPACE));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.BACK_SPACE));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.BACK_SPACE));
-    simulateInteraction(element1, new KeyPressed(VirtualKey.BACK_SPACE));
-    simulateInteraction(element1, new KeyReleased(VirtualKey.BACK_SPACE));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence0 {" +
-       "  TextInputInteraction TextInput ab {" +
-       "    Interaction KeyPressed LETTER_A {}" +
-       "    Interaction KeyReleased LETTER_A {}" +
-       "    Interaction KeyPressed LETTER_B {}" +
-       "    Interaction KeyReleased LETTER_B {}" +
-       "    Interaction KeyPressed LETTER_C {}" +
-       "    Interaction KeyReleased LETTER_C {}" +
-       "    Interaction KeyPressed LETTER_D {}" +
-       "    Interaction KeyReleased LETTER_D {}" +
-       "    Interaction KeyPressed BACK_SPACE {}" +
-       "    Interaction KeyReleased BACK_SPACE {}" +
-       "    Interaction KeyPressed LETTER_E {}" +
-       "    Interaction KeyReleased LETTER_E {}" +
-       "    Interaction KeyPressed LETTER_F {}" +
-       "    Interaction KeyReleased LETTER_F {}" +
-       "    Interaction KeyPressed BACK_SPACE {}" +
-       "    Interaction KeyReleased BACK_SPACE {}" +
-       "    Interaction KeyPressed BACK_SPACE {}" +
-       "    Interaction KeyReleased BACK_SPACE {}" +
-       "    Interaction KeyPressed BACK_SPACE {}" +
-       "    Interaction KeyReleased BACK_SPACE {}" +
-       "  }" +
-       "}", getTaskTree());    
-
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  private static class DummyTextField extends DummyGUIElement implements TextField
-  {
-
-    //---------------------------------------------------------------------------------------------
+public class DefaultTextInputReductionRuleTest extends AbstractTemporalRelationshipTC {
+
     /**
-     * TODO: comment
      *
-     * @param name
      */
-    //---------------------------------------------------------------------------------------------
-    public DummyTextField(String name)
-    {
-      super(name);
+    @Test
+    public void testSimpleTextEntry() {
+        IGUIElement element1 = new DummyTextField("elem1");
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_A), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_A), element1);
+        new TaskTreeChecker(true).assertTaskTree
+            ("Sequence sequence0 {" +
+             "  TextInputEvent TextInput a {" +
+             "    Event KeyPressed LETTER_A {}" +
+             "    Event KeyReleased LETTER_A {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_B), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_B), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  TextInputEvent TextInput ab {" +
+             "    Event KeyPressed LETTER_A {}" +
+             "    Event KeyReleased LETTER_A {}" +
+             "    Event KeyPressed LETTER_B {}" +
+             "    Event KeyReleased LETTER_B {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_C), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_C), element1);
+        simulateEvent(new KeyReleased(VirtualKey.SHIFT), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  TextInputEvent TextInput abC {" +
+             "    Event KeyPressed LETTER_A {}" +
+             "    Event KeyReleased LETTER_A {}" +
+             "    Event KeyPressed LETTER_B {}" +
+             "    Event KeyReleased LETTER_B {}" +
+             "    Event KeyPressed SHIFT {}" +
+             "    Event KeyPressed LETTER_C {}" +
+             "    Event KeyReleased LETTER_C {}" +
+             "    Event KeyReleased SHIFT {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_D), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_D), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_E), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_E), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_F), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_F), element1);
+        simulateEvent(new KeyReleased(VirtualKey.SHIFT), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  TextInputEvent TextInput abCDEF {" +
+             "    Event KeyPressed LETTER_A {}" +
+             "    Event KeyReleased LETTER_A {}" +
+             "    Event KeyPressed LETTER_B {}" +
+             "    Event KeyReleased LETTER_B {}" +
+             "    Event KeyPressed SHIFT {}" +
+             "    Event KeyPressed LETTER_C {}" +
+             "    Event KeyReleased LETTER_C {}" +
+             "    Event KeyReleased SHIFT {}" +
+             "    Event KeyPressed SHIFT {}" +
+             "    Event KeyPressed LETTER_D {}" +
+             "    Event KeyReleased LETTER_D {}" +
+             "    Event KeyPressed LETTER_E {}" +
+             "    Event KeyReleased LETTER_E {}" +
+             "    Event KeyPressed LETTER_F {}" +
+             "    Event KeyReleased LETTER_F {}" +
+             "    Event KeyReleased SHIFT {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyPressed(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_G), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_G), element1);
+        simulateEvent(new KeyReleased(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyReleased(VirtualKey.SHIFT), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  TextInputEvent TextInput abCDEFg {" +
+             "    Event KeyPressed LETTER_A {}" +
+             "    Event KeyReleased LETTER_A {}" +
+             "    Event KeyPressed LETTER_B {}" +
+             "    Event KeyReleased LETTER_B {}" +
+             "    Event KeyPressed SHIFT {}" +
+             "    Event KeyPressed LETTER_C {}" +
+             "    Event KeyReleased LETTER_C {}" +
+             "    Event KeyReleased SHIFT {}" +
+             "    Event KeyPressed SHIFT {}" +
+             "    Event KeyPressed LETTER_D {}" +
+             "    Event KeyReleased LETTER_D {}" +
+             "    Event KeyPressed LETTER_E {}" +
+             "    Event KeyReleased LETTER_E {}" +
+             "    Event KeyPressed LETTER_F {}" +
+             "    Event KeyReleased LETTER_F {}" +
+             "    Event KeyReleased SHIFT {}" +
+             "    Event KeyPressed SHIFT {}" +
+             "    Event KeyPressed SHIFT {}" +
+             "    Event KeyPressed LETTER_G {}" +
+             "    Event KeyReleased LETTER_G {}" +
+             "    Event KeyReleased SHIFT {}" +
+             "    Event KeyReleased SHIFT {}" +
+             "  }" +
+             "}", getTaskTree());
+
     }
 
-  }
+    /**
+     *
+     */
+    @Test
+    public void testTextEntryOnDifferentGuiElements() {
+        IGUIElement element1 = new DummyTextField("elem1");
+        IGUIElement element2 = new DummyTextField("elem2");
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_A), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_A), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  TextInputEvent TextInput a {" +
+             "    Event KeyPressed LETTER_A {}" +
+             "    Event KeyReleased LETTER_A {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_B), element2);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_B), element2);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    TextInputEvent TextInput a {" +
+             "      Event KeyPressed LETTER_A {}" +
+             "      Event KeyReleased LETTER_A {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    TextInputEvent TextInput b {" +
+             "      Event KeyPressed LETTER_B {}" +
+             "      Event KeyReleased LETTER_B {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_C), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_C), element1);
+        simulateEvent(new KeyReleased(VirtualKey.SHIFT), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    TextInputEvent TextInput a {" +
+             "      Event KeyPressed LETTER_A {}" +
+             "      Event KeyReleased LETTER_A {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    TextInputEvent TextInput b {" +
+             "      Event KeyPressed LETTER_B {}" +
+             "      Event KeyReleased LETTER_B {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence3 {" +
+             "    TextInputEvent TextInput C {" +
+             "      Event KeyPressed SHIFT {}" +
+             "      Event KeyPressed LETTER_C {}" +
+             "      Event KeyReleased LETTER_C {}" +
+             "      Event KeyReleased SHIFT {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.SHIFT), element2);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_D), element2);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_D), element2);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_E), element2);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_E), element2);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_F), element2);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_F), element2);
+        simulateEvent(new KeyReleased(VirtualKey.SHIFT), element2);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    TextInputEvent TextInput a {" +
+             "      Event KeyPressed LETTER_A {}" +
+             "      Event KeyReleased LETTER_A {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    TextInputEvent TextInput b {" +
+             "      Event KeyPressed LETTER_B {}" +
+             "      Event KeyReleased LETTER_B {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence3 {" +
+             "    TextInputEvent TextInput C {" +
+             "      Event KeyPressed SHIFT {}" +
+             "      Event KeyPressed LETTER_C {}" +
+             "      Event KeyReleased LETTER_C {}" +
+             "      Event KeyReleased SHIFT {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence4 {" +
+             "    TextInputEvent TextInput DEF {" +
+             "      Event KeyPressed SHIFT {}" +
+             "      Event KeyPressed LETTER_D {}" +
+             "      Event KeyReleased LETTER_D {}" +
+             "      Event KeyPressed LETTER_E {}" +
+             "      Event KeyReleased LETTER_E {}" +
+             "      Event KeyPressed LETTER_F {}" +
+             "      Event KeyReleased LETTER_F {}" +
+             "      Event KeyReleased SHIFT {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyPressed(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_G), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_G), element1);
+        simulateEvent(new KeyReleased(VirtualKey.SHIFT), element1);
+        simulateEvent(new KeyReleased(VirtualKey.SHIFT), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  Sequence sequence1 {" +
+             "    TextInputEvent TextInput a {" +
+             "      Event KeyPressed LETTER_A {}" +
+             "      Event KeyReleased LETTER_A {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence2 {" +
+             "    TextInputEvent TextInput b {" +
+             "      Event KeyPressed LETTER_B {}" +
+             "      Event KeyReleased LETTER_B {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence3 {" +
+             "    TextInputEvent TextInput C {" +
+             "      Event KeyPressed SHIFT {}" +
+             "      Event KeyPressed LETTER_C {}" +
+             "      Event KeyReleased LETTER_C {}" +
+             "      Event KeyReleased SHIFT {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence4 {" +
+             "    TextInputEvent TextInput DEF {" +
+             "      Event KeyPressed SHIFT {}" +
+             "      Event KeyPressed LETTER_D {}" +
+             "      Event KeyReleased LETTER_D {}" +
+             "      Event KeyPressed LETTER_E {}" +
+             "      Event KeyReleased LETTER_E {}" +
+             "      Event KeyPressed LETTER_F {}" +
+             "      Event KeyReleased LETTER_F {}" +
+             "      Event KeyReleased SHIFT {}" +
+             "    }" +
+             "  }" +
+             "  Sequence sequence5 {" +
+             "    TextInputEvent TextInput g {" +
+             "      Event KeyPressed SHIFT {}" +
+             "      Event KeyPressed SHIFT {}" +
+             "      Event KeyPressed LETTER_G {}" +
+             "      Event KeyReleased LETTER_G {}" +
+             "      Event KeyReleased SHIFT {}" +
+             "      Event KeyReleased SHIFT {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testUsageOfBackspace() {
+        IGUIElement element1 = new DummyTextField("elem1");
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_A), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_A), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_B), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_B), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_C), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_C), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_D), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_D), element1);
+        simulateEvent(new KeyPressed(VirtualKey.BACK_SPACE), element1);
+        simulateEvent(new KeyReleased(VirtualKey.BACK_SPACE), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_E), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_E), element1);
+        simulateEvent(new KeyPressed(VirtualKey.LETTER_F), element1);
+        simulateEvent(new KeyReleased(VirtualKey.LETTER_F), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  TextInputEvent TextInput abcef {" +
+             "    Event KeyPressed LETTER_A {}" +
+             "    Event KeyReleased LETTER_A {}" +
+             "    Event KeyPressed LETTER_B {}" +
+             "    Event KeyReleased LETTER_B {}" +
+             "    Event KeyPressed LETTER_C {}" +
+             "    Event KeyReleased LETTER_C {}" +
+             "    Event KeyPressed LETTER_D {}" +
+             "    Event KeyReleased LETTER_D {}" +
+             "    Event KeyPressed BACK_SPACE {}" +
+             "    Event KeyReleased BACK_SPACE {}" +
+             "    Event KeyPressed LETTER_E {}" +
+             "    Event KeyReleased LETTER_E {}" +
+             "    Event KeyPressed LETTER_F {}" +
+             "    Event KeyReleased LETTER_F {}" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new KeyPressed(VirtualKey.BACK_SPACE), element1);
+        simulateEvent(new KeyReleased(VirtualKey.BACK_SPACE), element1);
+        simulateEvent(new KeyPressed(VirtualKey.BACK_SPACE), element1);
+        simulateEvent(new KeyReleased(VirtualKey.BACK_SPACE), element1);
+        simulateEvent(new KeyPressed(VirtualKey.BACK_SPACE), element1);
+        simulateEvent(new KeyReleased(VirtualKey.BACK_SPACE), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence0 {" +
+             "  TextInputEvent TextInput ab {" +
+             "    Event KeyPressed LETTER_A {}" +
+             "    Event KeyReleased LETTER_A {}" +
+             "    Event KeyPressed LETTER_B {}" +
+             "    Event KeyReleased LETTER_B {}" +
+             "    Event KeyPressed LETTER_C {}" +
+             "    Event KeyReleased LETTER_C {}" +
+             "    Event KeyPressed LETTER_D {}" +
+             "    Event KeyReleased LETTER_D {}" +
+             "    Event KeyPressed BACK_SPACE {}" +
+             "    Event KeyReleased BACK_SPACE {}" +
+             "    Event KeyPressed LETTER_E {}" +
+             "    Event KeyReleased LETTER_E {}" +
+             "    Event KeyPressed LETTER_F {}" +
+             "    Event KeyReleased LETTER_F {}" +
+             "    Event KeyPressed BACK_SPACE {}" +
+             "    Event KeyReleased BACK_SPACE {}" +
+             "    Event KeyPressed BACK_SPACE {}" +
+             "    Event KeyReleased BACK_SPACE {}" +
+             "    Event KeyPressed BACK_SPACE {}" +
+             "    Event KeyReleased BACK_SPACE {}" +
+             "  }" +
+             "}", getTaskTree());
+
+    }
+
+    /**
+     *
+     */
+    private static class DummyTextField extends DummyGUIElement implements ITextField {
+
+        /**  */
+        private static final long serialVersionUID = 1L;
+
+        /**
+         * TODO: comment
+         * 
+         * @param name
+         */
+        public DummyTextField(String name) {
+            super(name);
+        }
+
+    }
 
 }
Index: trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/TrackBarSelectionDetectionRuleTest.java
===================================================================
--- trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/TrackBarSelectionDetectionRuleTest.java	(revision 468)
+++ trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/TrackBarSelectionDetectionRuleTest.java	(revision 557)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: DefaultIterationDetectionRuleTest.java,v $
 // Version   : $Revision: 0.0 $  $Author: patrick $  $Date: 28.04.2012 $
@@ -5,17 +4,16 @@
 // Creation  : 2012 by patrick
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
 package de.ugoe.cs.quest.tasktrees.temporalrelation;
 
 import org.junit.Test;
 
-import de.ugoe.cs.quest.eventcore.guimodel.GUIElement;
-import de.ugoe.cs.quest.eventcore.guimodel.TrackBar;
-import de.ugoe.cs.quest.eventcore.userinteraction.ValueSelection;
+import de.ugoe.cs.quest.eventcore.gui.ValueSelection;
+import de.ugoe.cs.quest.eventcore.guimodel.IGUIElement;
+import de.ugoe.cs.quest.eventcore.guimodel.ITrackBar;
 import de.ugoe.cs.quest.tasktrees.testutils.DummyGUIElement;
 import de.ugoe.cs.quest.tasktrees.testutils.DummyInteraction;
 import de.ugoe.cs.quest.tasktrees.testutils.TaskTreeChecker;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -24,157 +22,146 @@
  * @author 2012, last modified by $Author: patrick$
  */
-//-------------------------------------------------------------------------------------------------
-public class TrackBarSelectionDetectionRuleTest extends AbstractTemporalRelationshipTC
-{
+public class TrackBarSelectionDetectionRuleTest extends AbstractTemporalRelationshipTC {
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testSimpleDetection() throws Exception
-  {
-    GUIElement element1 = new DummyTrackBar();
-    simulateInteraction(element1, new ValueSelection<Integer>(1));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration interation1 {" +
-       "    Selection selection1 {" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new ValueSelection<Integer>(2));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration interation1 {" +
-       "    Selection selection1 {" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new ValueSelection<Integer>(3));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration interation1 {" +
-       "    Selection selection1 {" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new ValueSelection<Integer>(2));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration interation1 {" +
-       "    Selection selection1 {" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-
-    simulateInteraction(element1, new ValueSelection<Integer>(3));
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration interation1 {" +
-       "    Selection selection1 {" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());
-
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testComplexDetection() throws Exception
-  {
-    GUIElement element1 = new DummyTrackBar();
-    simulateInteraction(element1, new ValueSelection<Integer>(1));
-    simulateInteraction(element1, new ValueSelection<Integer>(2));
-    simulateInteraction(element1, new ValueSelection<Integer>(3));
-    simulateInteraction(element1, new ValueSelection<Integer>(1));
-    simulateInteraction(element1, new DummyInteraction("bla", 1));
-    simulateInteraction(element1, new DummyInteraction("bla", 2));
-    simulateInteraction(element1, new ValueSelection<Integer>(2));
-    simulateInteraction(element1, new ValueSelection<Integer>(1));
-    simulateInteraction(element1, new DummyInteraction("bla", 3));
-    simulateInteraction(element1, new ValueSelection<Integer>(3));
-    simulateInteraction(element1, new ValueSelection<Integer>(2));
-    simulateInteraction(element1, new ValueSelection<Integer>(3));
-    simulateInteraction(element1, new DummyInteraction("bla", 1));
-    simulateInteraction(element1, new DummyInteraction("bla", 2));
-    simulateInteraction(element1, new ValueSelection<Integer>(1));
-    simulateInteraction(element1, new ValueSelection<Integer>(1));
-    
-    new TaskTreeChecker().assertTaskTree
-      ("Sequence sequence1 {" +
-       "  Iteration interation1 {" +
-       "    Selection selection1 {" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "  Interaction bla {}" +
-       "  Interaction bla {}" +
-       "  Iteration interation2 {" +
-       "    Selection selection2 {" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "  Interaction bla {}" +
-       "  Iteration interation3 {" +
-       "    Selection selection3 {" +
-       "      Interaction ValueSelection {}" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "  Interaction bla {}" +
-       "  Interaction bla {}" +
-       "  Iteration interation4 {" +
-       "    Selection selection4 {" +
-       "      Interaction ValueSelection {}" +
-       "    }" +
-       "  }" +
-       "}", getTaskTree());    
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO comment
-   * 
-   * @version $Revision: $ $Date: 28.04.2012$
-   * @author 2012, last modified by $Author: patrick$
-   */
-  //-----------------------------------------------------------------------------------------------
-  public class DummyTrackBar extends DummyGUIElement implements TrackBar
-  {
-
-    //---------------------------------------------------------------------------------------------
     /**
      *
      */
-    //---------------------------------------------------------------------------------------------
-    public DummyTrackBar()
-    {
-      super("DummyTrackBar");
+    @Test
+    public void testSimpleDetection() throws Exception {
+        IGUIElement element1 = new DummyTrackBar();
+        simulateEvent(new ValueSelection<Integer>(1), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration interation1 {" +
+             "    Selection selection1 {" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new ValueSelection<Integer>(2), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration interation1 {" +
+             "    Selection selection1 {" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new ValueSelection<Integer>(3), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration interation1 {" +
+             "    Selection selection1 {" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new ValueSelection<Integer>(2), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration interation1 {" +
+             "    Selection selection1 {" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
+        simulateEvent(new ValueSelection<Integer>(3), element1);
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration interation1 {" +
+             "    Selection selection1 {" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+
     }
-  }
+
+    /**
+     *
+     */
+    @Test
+    public void testComplexDetection() throws Exception {
+        IGUIElement element1 = new DummyTrackBar();
+        simulateEvent(new ValueSelection<Integer>(1), element1);
+        simulateEvent(new ValueSelection<Integer>(2), element1);
+        simulateEvent(new ValueSelection<Integer>(3), element1);
+        simulateEvent(new ValueSelection<Integer>(1), element1);
+        simulateEvent(new DummyInteraction("bla", 1), element1);
+        simulateEvent(new DummyInteraction("bla", 2), element1);
+        simulateEvent(new ValueSelection<Integer>(2), element1);
+        simulateEvent(new ValueSelection<Integer>(1), element1);
+        simulateEvent(new DummyInteraction("bla", 3), element1);
+        simulateEvent(new ValueSelection<Integer>(3), element1);
+        simulateEvent(new ValueSelection<Integer>(2), element1);
+        simulateEvent(new ValueSelection<Integer>(3), element1);
+        simulateEvent(new DummyInteraction("bla", 1), element1);
+        simulateEvent(new DummyInteraction("bla", 2), element1);
+        simulateEvent(new ValueSelection<Integer>(1), element1);
+        simulateEvent(new ValueSelection<Integer>(1), element1);
+
+        new TaskTreeChecker().assertTaskTree
+            ("Sequence sequence1 {" +
+             "  Iteration interation1 {" +
+             "    Selection selection1 {" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "  Event bla {}" +
+             "  Event bla {}" +
+             "  Iteration interation2 {" +
+             "    Selection selection2 {" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "  Event bla {}" +
+             "  Iteration interation3 {" +
+             "    Selection selection3 {" +
+             "      Event ValueSelection {}" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "  Event bla {}" +
+             "  Event bla {}" +
+             "  Iteration interation4 {" +
+             "    Selection selection4 {" +
+             "      Event ValueSelection {}" +
+             "    }" +
+             "  }" +
+             "}", getTaskTree());
+    }
+
+    /**
+     * TODO comment
+     * 
+     * @version $Revision: $ $Date: 28.04.2012$
+     * @author 2012, last modified by $Author: patrick$
+     */
+    public class DummyTrackBar extends DummyGUIElement implements ITrackBar {
+
+        /**  */
+        private static final long serialVersionUID = 1L;
+
+         /**
+          *
+          */
+         public DummyTrackBar() {
+            super("DummyTrackBar");
+        }
+    }
 
 }
