Ignore:
Timestamp:
11/08/13 22:34:21 (11 years ago)
Author:
khartmann
Message:
  • Reworked Filters to use the first instance of a task to provide type and target
  • Added a function to extract all tasks matching a given filter
  • Added simple console feedback for matched usability problems
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternVisitor.java

    r1293 r1319  
    2020 
    2121import com.google.common.base.Splitter; 
     22import com.google.common.collect.Iterables; 
    2223import com.google.common.collect.Lists; 
    2324 
     25import de.ugoe.cs.autoquest.eventcore.Event; 
    2426import de.ugoe.cs.autoquest.eventcore.IEventTarget; 
    2527import de.ugoe.cs.autoquest.eventcore.IEventType; 
    2628import de.ugoe.cs.autoquest.eventcore.StringEventType; 
    2729import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
     30import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance; 
    2831import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
    2932import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional; 
     
    3134import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    3235import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     36import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance; 
    3337import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor; 
    3438import de.ugoe.cs.autoquest.test.DummyGUIElement; 
     
    6771    public void visit(IEventTask event) { 
    6872        if (!this.present && isEventVisitor()) { 
    69                 boolean matchesEventType = matchesEventType(event.getEventType()); 
    70                 boolean matchesEventTarget = matchesEventTarget(event.getEventTarget()); 
     73                Event eventRepresentative = ((IEventTaskInstance) event.getInstances().iterator().next()).getEvent(); 
     74                boolean matchesEventType = matchesEventType(eventRepresentative.getType()); 
     75                boolean matchesEventTarget = matchesEventTarget(eventRepresentative.getTarget()); 
    7176                this.present = eventTarget != null ? matchesEventType && matchesEventTarget : matchesEventType; 
    7277        } 
     78        System.out.printf("%s [%s, %s, %s]: %s\n", event, this.eventType, this.eventTarget, this.taskType, this.present); 
     79        System.out.println(this.getClass().getSimpleName() + " "+ this.hashCode()); 
    7380    } 
    7481 
Note: See TracChangeset for help on using the changeset viewer.