Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java	(revision 1150)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java	(revision 1152)
@@ -19,5 +19,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
 import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
@@ -47,5 +47,5 @@
      */
     public void visit(IIteration iteration) {
-        checkAllChildrenAndReturnIfPatternIsPresent(iteration.getChildren());
+        checkTaskAndReturnIfPatternIsPresent(iteration.getMarkedTask());
     }
 
@@ -57,8 +57,7 @@
     }
     
-    private void checkAllChildrenAndReturnIfPatternIsPresent(List<ITaskTreeNode> children) {
-        for(ITaskTreeNode node : children) {
-            node.accept(this);
-            if(this.present) {
+    private void checkAllChildrenAndReturnIfPatternIsPresent(List<ITask> children) {
+        for (ITask task : children) {
+            if (checkTaskAndReturnIfPatternIsPresent(task)) {
                 break;
             }
@@ -66,3 +65,10 @@
     }
 
+    /**
+     *
+     */
+    private boolean checkTaskAndReturnIfPatternIsPresent(ITask task) {
+        task.accept(this);
+        return this.present;
+    }
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsPatternVisitor.java	(revision 1150)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsPatternVisitor.java	(revision 1152)
@@ -15,8 +15,9 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors;
 
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern;
 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
@@ -47,5 +48,5 @@
      */
     public void visit(IIteration iteration) {
-        checkAllChildrenAndReturnIfPatternIsPresent(iteration);
+        checkTaskAndReturnIfPatternIsPresent(iteration.getMarkedTask());
 
     }
@@ -59,14 +60,7 @@
     }
     
-    private void checkAllChildrenAndReturnIfPatternIsPresent(ITaskTreeNode node) {
-        for(ITaskTreeNode child : node.getChildren()) {
-            ITaskTree taskTree;
-            if(isEvent(child)) {
-                taskTree = PatternsVisitorUtil.createTaskTreeFromNode(node);
-            } else {
-                taskTree = PatternsVisitorUtil.createTaskTreeFromNode(child);
-            }
-            this.present = containedPattern.containedIn(taskTree); 
-            if(this.present) {
+    private void checkAllChildrenAndReturnIfPatternIsPresent(ISequence sequence) {
+        for (ITask child : sequence.getChildren()) {
+            if(checkTaskAndReturnIfPatternIsPresent(child)) {
                 break;
             }
@@ -74,6 +68,11 @@
     }
     
-    private boolean isEvent(ITaskTreeNode firstNode) {
-        return firstNode.getChildren().isEmpty();
+    private boolean checkTaskAndReturnIfPatternIsPresent(ITask task) {
+        ITaskModel taskModel = PatternsVisitorUtil.createTaskModelFromNode(task);
+        this.present = containedPattern.containedIn(taskModel); 
+    }
+    
+    private boolean isEvent(ITask task) {
+        return task instanceof IEventTask;
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java	(revision 1150)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java	(revision 1152)
@@ -45,5 +45,5 @@
      */
     public void visit(IIteration iteration) {
-        PatternsVisitorUtil.lastNodeOf(iteration.getChildren()).accept(this);
+        iteration.getMarkedTask().accept(this);
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithPatternVisitor.java	(revision 1150)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithPatternVisitor.java	(revision 1152)
@@ -15,8 +15,9 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors;
 
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern;
 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
@@ -47,6 +48,6 @@
      */
     public void visit(IIteration iteration) {
-        ITaskTree taskTree = PatternsVisitorUtil.createTaskTreeFromNode(iteration);
-        this.present = containedPattern.containedIn(taskTree); 
+        ITaskModel taskModel = PatternsVisitorUtil.createTaskModelFromNode(iteration);
+        this.present = containedPattern.containedIn(taskModel); 
 
     }
@@ -56,16 +57,16 @@
      */
     public void visit(ISequence sequence) {
-        ITaskTreeNode lastNode = PatternsVisitorUtil.lastNodeOf(sequence.getChildren());
-        ITaskTree taskTree;
-        if(isEvent(lastNode)) {
-            taskTree = PatternsVisitorUtil.createTaskTreeFromNode(sequence);
+        ITask lastTask = PatternsVisitorUtil.lastNodeOf(sequence.getChildren());
+        ITaskModel taskModel;
+        if(isEvent(lastTask)) {
+            taskModel = PatternsVisitorUtil.createTaskModelFromNode(sequence);
         } else {
-            taskTree = PatternsVisitorUtil.createTaskTreeFromNode(lastNode);
+            taskModel = PatternsVisitorUtil.createTaskModelFromNode(lastTask);
         }
-        this.present = containedPattern.containedIn(taskTree);      
+        this.present = containedPattern.containedIn(taskModel);      
     }
 
-    private boolean isEvent(ITaskTreeNode firstNode) {
-        return firstNode.getChildren().isEmpty();
+    private boolean isEvent(ITask lastTask) {
+        return lastTask instanceof IEventTask;
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java	(revision 1150)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java	(revision 1152)
@@ -45,5 +45,5 @@
      */
     public void visit(IIteration iteration) {
-        PatternsVisitorUtil.firstNodeOf(iteration.getChildren()).accept(this);
+        iteration.getMarkedTask().accept(this);
     }
     
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithPatternVisitor.java	(revision 1150)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithPatternVisitor.java	(revision 1152)
@@ -15,8 +15,9 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors;
 
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern;
 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
@@ -47,6 +48,6 @@
      */
     public void visit(IIteration iteration) {
-        ITaskTree taskTree = PatternsVisitorUtil.createTaskTreeFromNode(iteration);
-        this.present = containedPattern.containedIn(taskTree);  
+        ITaskModel taskModel = PatternsVisitorUtil.createTaskModelFromNode(iteration);
+        this.present = containedPattern.containedIn(taskModel);  
     }
 
@@ -55,16 +56,16 @@
      */
     public void visit(ISequence sequence) {
-        ITaskTreeNode firstNode = PatternsVisitorUtil.firstNodeOf(sequence.getChildren());
-        ITaskTree taskTree;
-        if(isEvent(firstNode)) {
-            taskTree = PatternsVisitorUtil.createTaskTreeFromNode(sequence);
+        ITask firstTask = PatternsVisitorUtil.firstNodeOf(sequence.getChildren());
+        ITaskModel taskModel;
+        if(isEvent(firstTask)) {
+            taskModel = PatternsVisitorUtil.createTaskModelFromNode(sequence);
         } else {
-            taskTree = PatternsVisitorUtil.createTaskTreeFromNode(firstNode);
+            taskModel = PatternsVisitorUtil.createTaskModelFromNode(firstTask);
         }
-        this.present = containedPattern.containedIn(taskTree);      
+        this.present = containedPattern.containedIn(taskModel);      
     }
 
-    private boolean isEvent(ITaskTreeNode firstNode) {
-        return firstNode.getChildren().isEmpty();
+    private boolean isEvent(ITask firstTask) {
+        return firstTask instanceof IEventTask;
     }
 
