Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java	(revision 1158)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java	(revision 1217)
@@ -21,5 +21,5 @@
 import de.ugoe.cs.autoquest.CommandHelpers;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.rules.EmptyRuleset;
+import de.ugoe.cs.autoquest.usability.rules.PatternRuleset;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityResult;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityRuleset;
@@ -29,5 +29,5 @@
 /**
  * <p>
- * TODO comment
+ * Command to perform a automatic usability evaluation for a given task model.
  * </p>
  * 
@@ -36,13 +36,29 @@
 public class CMDperformUsabilityEvaluation implements Command {
 
+    /**
+     * <p>
+     * index for name of task model under which it could be retrieved from
+     * {@link GlobalDataContainer}
+     * </p>
+     */
     private final int taskModelParamaterIndex = 0;
-    
+
+    /**
+     * <p>
+     * index for name under which evaluation result should be stored in {@link GlobalDataContainer}
+     * </p>
+     */
     private final int evaluationResultParameterIndex = 1;
-    
+
+    /**
+     * <p>
+     * default name for evaluation result, which is used to store it in {@link GlobalDataContainer}
+     * </p>
+     */
     private final String defaultEvaluationResultParameterName = "usabilityEvaluationResult";
-    
-    private final UsabilityRuleset defaultUsabilityRuleset = new EmptyRuleset();
-    
-    /* (non-Javadoc)
+
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.util.console.Command#run(java.util.List)
      */
@@ -52,24 +68,25 @@
         Optional<ITaskModel> taskModel = getTaskModelFromDataContainer(nameOfTaskModel);
         if (taskModel.isPresent()) {
-            UsabilityRuleset ruleset = getUsabilityRuleset();
+            UsabilityRuleset ruleset = new PatternRuleset(taskModel.get());
             UsabilityResult result = UsabilityEvaluator.evaluate(taskModel.get()).using(ruleset);
             String evaluationResultParameterName = getEvaluationResultParameter(parameters);
             storeUsabilityResultInDataContainer(evaluationResultParameterName, result);
         }
-        return;
     }
 
     /**
      * <p>
-     * TODO: comment
+     * Gets name of task model from list of parameters.
      * </p>
-     *
+     * 
      * @param parameters
-     * @return
+     *            parameters for the command
+     * @return name of task model
      */
     private String getTaskModelParameter(List<Object> parameters) {
         try {
             return (String) parameters.get(taskModelParamaterIndex);
-        } catch (Exception e) {
+        }
+        catch (Exception e) {
             throw new IllegalArgumentException("must provide a task model name");
         }
@@ -78,32 +95,37 @@
     /**
      * <p>
-     * TODO: comment
+     * Gets name under which evaluation result should be stored in {@link GlobalDataContainer} from
+     * list of parameters. If not present, the default value {@code usabilityEvaluationResult} is
+     * used!
      * </p>
-     *
+     * 
      * @param parameters
-     * @return
+     *            parameters for the command
+     * @return name under which evaluation result should be stored
      */
     private String getEvaluationResultParameter(List<Object> parameters) {
-        if(parameters.size() == 2) {
+        if (parameters.size() == 2) {
             return (String) parameters.get(evaluationResultParameterIndex);
         }
         return defaultEvaluationResultParameterName;
     }
-    
+
     /**
      * <p>
-     * TODO: comment
+     * Retrieves task model from {@link GlobalDataContainer}.
      * </p>
-     *
+     * 
      * @param nameOfTaskModel
-     * @return
+     *            name of task model, under which it is stored in {@link GlobalDataContainer}
+     * @return if present, task model
      */
     private Optional<ITaskModel> getTaskModelFromDataContainer(String nameOfTaskModel) {
         Object dataObject = GlobalDataContainer.getInstance().getData(nameOfTaskModel);
-        if(dataObject != null) {
-            if(dataObject instanceof ITaskModel) {
+        if (dataObject != null) {
+            if (dataObject instanceof ITaskModel) {
                 ITaskModel taskModel = (ITaskModel) dataObject;
                 return Optional.of(taskModel);
-            } else {
+            }
+            else {
                 CommandHelpers.objectNotType(nameOfTaskModel, "ITaskModel");
                 return Optional.absent();
@@ -113,32 +135,25 @@
         return Optional.absent();
     }
-    
+
     /**
      * <p>
-     * TODO: comment
+     * Stores usability evaluation in {@link GlobalDataContainer}.
      * </p>
-     *
-     * @return
+     * 
+     * @param evaluationResultParameterName
+     *            name under which usability result should be stored in {@link GlobalDataContainer}
+     * 
      */
-    private UsabilityRuleset getUsabilityRuleset() {
-        // TODO Auto-generated method stub
-        System.out.println("TODO: implement CMDperformUsabilityEvaluation.getUsabilityRuleset ");
-        return this.defaultUsabilityRuleset;
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * @param evaluationResultParameterName 
-     *
-     */
-    private void storeUsabilityResultInDataContainer(String evaluationResultParameterName, UsabilityResult result) {
+    private void storeUsabilityResultInDataContainer(String evaluationResultParameterName,
+                                                     UsabilityResult result)
+    {
         if (GlobalDataContainer.getInstance().addData(evaluationResultParameterName, result)) {
             CommandHelpers.dataOverwritten(evaluationResultParameterName);
-        }   
+        }
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.util.console.Command#help()
      */
