Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/EventGenerationRule.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/EventGenerationRule.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/EventGenerationRule.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc;
 
@@ -11,9 +12,9 @@
 /**
  * <p>
- * TODO comment
+ * This class defines rules for the generation of MFC events.
  * </p>
  * 
- * @version $Revision: $ $Date: 22.08.2012$
- * @author 2012, last modified by $Author: patrick$
+ * @version 1.0
+ * @author Steffen Herbold, Patrick Harms
  */
 class EventGenerationRule {
@@ -21,5 +22,5 @@
     /**
      * <p>
-     * the namespace used for parsing the rule
+     * Namespace used for parsing the rule.
      * </p>
      */
@@ -28,5 +29,5 @@
     /**
      * <p>
-     * the name of the rule
+     * Name of the rule.
      * </p>
      */
@@ -35,5 +36,5 @@
     /**
      * <p>
-     * the list of conditions for the rule to be matched
+     * List of conditions for the rule to be matched.
      * </p>
      */
@@ -42,5 +43,5 @@
     /**
      * <p>
-     * the list of parameters to be provided to the generated event
+     * List of parameters to be provided to the generated event.
      * </p>
      */
@@ -49,5 +50,5 @@
     /**
      * <p>
-     * the list of replay message generation rules
+     * List of replay message generation rules.
      * </p>
      */
@@ -56,20 +57,22 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
+     * Constructor. Creates a new EventGenerationRule.
+     * </p>
+     * 
      * @param ruleElement
-     * @param rulesNamespace 
+     *            the JDOM element that descripes the rule
+     * @param rulesNamespace
+     *            the XML namespace the rule is defined in
      */
     @SuppressWarnings("unchecked")
     EventGenerationRule(Element ruleElement, Namespace rulesNamespace) {
         this.namespace = rulesNamespace;
-        
+
         this.name = ruleElement.getAttributeValue("name");
-        
+
         this.messageConditions = new ArrayList<MessageCondition>();
         this.eventParameters = new ArrayList<Term>();
         this.replayMessageSpecifications = new ArrayList<ReplayMessageSpec>();
-        
+
         for (Element child : (List<Element>) ruleElement.getChildren()) {
             if ("msg".equals(child.getName()) && namespace.equals(child.getNamespace())) {
@@ -84,10 +87,12 @@
                 replayMessageSpecifications.add(new ReplayMessageSpec(child));
             }
-            else if ("genMsgSeq".equals(child.getName()) && namespace.equals(child.getNamespace())) {
+            else if ("genMsgSeq".equals(child.getName()) && namespace.equals(child.getNamespace()))
+            {
                 replayMessageSpecifications.add(new ReplayMessageSpec(child));
             }
             else {
-                throw new IllegalArgumentException
-                    ("the provided rules can not be parsed: unknown element " + child.getName());
+                throw new IllegalArgumentException(
+                                                   "the provided rules can not be parsed: unknown element " +
+                                                       child.getName());
             }
         }
@@ -95,4 +100,8 @@
 
     /**
+     * <p>
+     * Returns the name of the rule.
+     * </p>
+     * 
      * @return the name
      */
@@ -103,8 +112,8 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+     * Returns the conditions on the matched messages defined by this rule.
+     * </p>
+     * 
+     * @return the message conditions
      */
     List<MessageCondition> getMessageConditions() {
@@ -114,8 +123,8 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+     * Returns the parameters of the event generated by this rule.
+     * </p>
+     * 
+     * @return the event parameters
      */
     List<Term> getEventParameters() {
@@ -125,8 +134,8 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+     * Returns the replay specification defined by this rule.
+     * </p>
+     * 
+     * @return the replay specification
      */
     List<ReplayMessageSpec> getReplayMessageSpecifications() {
@@ -136,9 +145,9 @@
     /**
      * <p>
-     * TODO comment
+     * Helper class that describes conditions on the message sequence when matching this rule.
      * </p>
      * 
-     * @version $Revision: $ $Date: 22.08.2012$
-     * @author 2012, last modified by $Author: patrick$
+     * @version 1.0
+     * @author Steffen Herbold, Patrick Harms
      */
     class MessageCondition {
@@ -146,12 +155,12 @@
         /**
          * <p>
-         * true, if the condition defines to match several conditions
+         * True, if the condition defines to match several conditions
          * </p>
          */
         private boolean matchMultiple;
-        
-        /**
-         * <p>
-         * the type of the message matched by the condition
+
+        /**
+         * <p>
+         * Type of the message matched by the condition
          * </p>
          */
@@ -160,5 +169,5 @@
         /**
          * <p>
-         * the term conditions associate with the rule condition
+         * Term conditions associated with the rule condition
          * </p>
          */
@@ -167,6 +176,6 @@
         /**
          * <p>
-         * the list of messages to be stored, if the message matches, for continuing the
-         * rule application
+         * List of messages to be stored, if the message matches, for continuing the rule
+         * application
          * </p>
          */
@@ -175,8 +184,9 @@
         /**
          * <p>
-         * TODO: comment
-         * </p>
-         *
+         * Constructor. Creates a new MessageCondition.
+         * </p>
+         * 
          * @param msgChild
+         *            JDOM element that describes the message condition
          */
         @SuppressWarnings("unchecked")
@@ -185,16 +195,15 @@
             this.messageType =
                 WindowsMessageType.parseMessageType(msgChild.getAttributeValue("type"));
-            
+
             this.attributeConditions = new ArrayList<AttributeCondition>();
             for (Element childElement : (List<Element>) msgChild.getChildren("equals", namespace)) {
                 attributeConditions.add(new AttributeCondition(childElement));
             }
-            
+
             this.messagesToStore = new ArrayList<Term>();
             for (Element childElement : (List<Element>) msgChild.getChildren("store", namespace)) {
                 messagesToStore.add(new Term(childElement));
             }
-            for (Element childElement :
-                 (List<Element>) msgChild.getChildren("storeSeq", namespace))
+            for (Element childElement : (List<Element>) msgChild.getChildren("storeSeq", namespace))
             {
                 messagesToStore.add(new Term(childElement));
@@ -203,5 +212,11 @@
 
         /**
-         * @return the matchMultiple
+         * <p>
+         * Returns whether a single message is matched to the condition or a whole sequence can be
+         * matched.
+         * </p>
+         * 
+         * @return true if multiple message shall be matched, false if only a single message is
+         *         matched
          */
         boolean matchMultiple() {
@@ -211,8 +226,8 @@
         /**
          * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
+         * Returns the type of the matched messages.
+         * </p>
+         * 
+         * @return the message type
          */
         WindowsMessageType getMessageType() {
@@ -222,8 +237,8 @@
         /**
          * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
+         * Returns the attribute conditions of the message condition.
+         * </p>
+         * 
+         * @return the attribute conditions
          */
         List<AttributeCondition> getAttributeConditions() {
@@ -232,5 +247,9 @@
 
         /**
-         * @return the valuesToStore
+         * <p>
+         * Returns messages, that have eventually been stored as part of the condition.
+         * </p>
+         * 
+         * @return the stored messages
          */
         ArrayList<Term> getMessagesToStore() {
@@ -242,9 +261,9 @@
     /**
      * <p>
-     * TODO comment
+     * Helper class that defines attribute conditions for matching messages.
      * </p>
      * 
-     * @version $Revision: $ $Date: 22.08.2012$
-     * @author 2012, last modified by $Author: patrick$
+     * @version 1.0
+     * @author Steffen Herbold, Patrick Harms
      */
     class AttributeCondition {
@@ -252,12 +271,12 @@
         /**
          * <p>
-         * the left hand side of the condition
+         * Left hand side of the condition.
          * </p>
          */
         private Term leftHandSide;
-        
-        /**
-         * <p>
-         * the left hand side of the condition
+
+        /**
+         * <p>
+         * Reft hand side of the condition.
          * </p>
          */
@@ -266,8 +285,9 @@
         /**
          * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param childElement
+         * Constructor. Creates a new AttributeCondition.
+         * </p>
+         * 
+         * @param conditionElement
+         *            JDOM element that describes the condition
          */
         private AttributeCondition(Element conditionElement) {
@@ -275,7 +295,11 @@
             this.rightHandSide = new Term((Element) conditionElement.getChildren().get(1));
         }
-        
-        /**
-         * @return the leftHandSide
+
+        /**
+         * <p>
+         * Returns the left hand side of the condition.
+         * </p>
+         * 
+         * @return the left hand side
          */
         Term getLeftHandSide() {
@@ -284,5 +308,9 @@
 
         /**
-         * @return the rightHandSide
+         * <p>
+         * Returns the right hand side of the condition.
+         * </p>
+         * 
+         * @return the right hand side
          */
         Term getRightHandSide() {
@@ -294,9 +322,9 @@
     /**
      * <p>
-     * TODO comment
+     * Helper class that defines terms to define conditions.
      * </p>
      * 
-     * @version $Revision: $ $Date: 22.08.2012$
-     * @author 2012, last modified by $Author: patrick$
+     * @version 1.0
+     * @author Steffen Herbold, Patrick Harms
      */
     class Term {
@@ -304,12 +332,12 @@
         /**
          * <p>
-         * the name of the term
+         * Name of the term.
          * </p>
          */
         private String name;
-        
-        /**
-         * <p>
-         * the value of the term, if it is a constValue, null instead
+
+        /**
+         * <p>
+         * Value of the term, if it is a constValue; null otherwise.
          * </p>
          */
@@ -318,6 +346,6 @@
         /**
          * <p>
-         * the variable name of the object, i.e. a message, of which a parameter is identified if
-         * the term is a winInfoValue or a msgInfoValue; null instead
+         * Variable name of the object, i.e. a message, of which a parameter is identified if the
+         * term is a winInfoValue or a msgInfoValue; null otherwise.
          * </p>
          */
@@ -326,6 +354,6 @@
         /**
          * <p>
-         * the name of the parameter of the object, e.g. a message, of which a parameter is
-         * identified if the term is a paramValue, null instead
+         * Name of the parameter of the object, i.e., a message, of which a parameter is identified
+         * if the term is a paramValue; null otherwise.
          * </p>
          */
@@ -334,6 +362,6 @@
         /**
          * <p>
-         * the variable name of the message sequence denoted by the term in case of a seqValue;
-         * null instead
+         * Variable name of the message sequence denoted by the term in case of a seqValue; null
+         * otherwise.
          * </p>
          */
@@ -342,6 +370,6 @@
         /**
          * <p>
-         * the name of the parameter of the sequence of which a parameter is
-         * identified if the term is a seqValue, null instead
+         * Name of the parameter of the sequence of which a parameter is identified if the term is a
+         * seqValue; null otherwise.
          * </p>
          */
@@ -350,6 +378,6 @@
         /**
          * <p>
-         * the name of the parameter of the window of the object, e.g. a message, of which a
-         * parameter is identified if the term is a winInfoValue, null instead
+         * Name of the parameter of the window of the object, e.g. a message, of which a parameter
+         * is identified if the term is a winInfoValue; null otherwise.
          * </p>
          */
@@ -358,6 +386,6 @@
         /**
          * <p>
-         * the name of the info of the message of which a parameter is identified if the
-         * term is a msgInfoValue, null instead
+         * Name of the info of the message of which a parameter is identified if the term is a
+         * msgInfoValue; null otherwise.
          * </p>
          */
@@ -366,6 +394,6 @@
         /**
          * <p>
-         * the name of the parameter of the message into which a value shall be stored if the
-         * term is a resolveHwnd, null instead
+         * Name of the parameter of the message into which a value shall be stored if the term is a
+         * resolveHwnd, null otherwise
          * </p>
          */
@@ -374,5 +402,5 @@
         /**
          * <p>
-         * the list of handles to be resolved in case the term is a store or storeSeq, null instead
+         * List of handles to be resolved in case the term is a store or storeSeq; null otherwise.
          * </p>
          */
@@ -381,13 +409,14 @@
         /**
          * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param object
+         * Constructor. Creates a new Term.
+         * </p>
+         * 
+         * @param termElement
+         *            JDOM element that describes the term
          */
         @SuppressWarnings("unchecked")
         private Term(Element termElement) {
             this.name = termElement.getName();
-            
+
             if ("constValue".equals(name)) {
                 this.value = termElement.getAttributeValue("value");
@@ -434,4 +463,8 @@
 
         /**
+         * <p>
+         * Returns the name of the term.
+         * </p>
+         * 
          * @return the name
          */
@@ -441,4 +474,8 @@
 
         /**
+         * <p>
+         * Returns the value of the term.
+         * </p>
+         * 
          * @return the value
          */
@@ -448,5 +485,9 @@
 
         /**
-         * @return the object
+         * <p>
+         * Returns the object Id of the message, which is resolved as part of this term.
+         * </p>
+         * 
+         * @return the object Id
          */
         String getMessageId() {
@@ -455,5 +496,9 @@
 
         /**
-         * @return the objectParameter
+         * <p>
+         * Returns the name of the message parameter that is resolved as part of this term.
+         * </p>
+         * 
+         * @return the message parameter name
          */
         String getMessageParameterName() {
@@ -462,5 +507,9 @@
 
         /**
-         * @return the sequenceId
+         * <p>
+         * Returns the object Id of the message sequence, which is resolved as part of this term.
+         * </p>
+         * 
+         * @return the object Id
          */
         String getSequenceId() {
@@ -469,4 +518,8 @@
 
         /**
+         * <p>
+         * Returns the name of the message parameter that is resolved as part of this term.
+         * </p>
+         * 
          * @return the sequenceParameter
          */
@@ -476,5 +529,9 @@
 
         /**
-         * @return the windowParameter
+         * <p>
+         * Returns the window parameter name that is resolved as part of this term.
+         * </p>
+         * 
+         * @return the name of the window parameter
          */
         String getWindowParameterName() {
@@ -483,5 +540,9 @@
 
         /**
-         * @return the messageParameter
+         * <p>
+         * Returns the name of the message info value that is resolved as part of this term.
+         * </p>
+         * 
+         * @return the name of the message info value
          */
         String getMessageInfoName() {
@@ -490,5 +551,9 @@
 
         /**
-         * @return the storeParameter
+         * <p>
+         * Returns the object Id under which a message will be stored.
+         * </p>
+         * 
+         * @return the object Id
          */
         String getStoreParameterName() {
@@ -497,5 +562,9 @@
 
         /**
-         * @return the resolveHandles
+         * <p>
+         * Returns all terms that are responsible to resolve HWNDs.
+         * </p>
+         * 
+         * @return the terms
          */
         List<Term> getResolveHandles() {
@@ -504,12 +573,12 @@
 
     }
-    
-    /**
-     * <p>
-     * TODO comment
+
+    /**
+     * <p>
+     * Helper class that defines the replay specification part of rules.
      * </p>
      * 
-     * @version $Revision: $ $Date: 22.08.2012$
-     * @author 2012, last modified by $Author: patrick$
+     * @version 1.0
+     * @author Steffen Herbold, Patrick Harms
      */
     class ReplayMessageSpec {
@@ -517,40 +586,86 @@
         /**
          * <p>
-         * determines, if this specification defines one, or a sequence of messages
+         * Determines if this specification defines one, or a sequence of messages.
          * </p>
          */
         private boolean generateSingleMessage;
-        
-        /**
-         * <p>
-         * the id of a concrete message of message sequence to be replayed as is
+
+        /**
+         * <p>
+         * Object Id of a concrete message of message sequence to be replayed as is.
          * </p>
          */
         private String replayObjectId;
 
+        /**
+         * <p>
+         * Term describing the type of the generated message.
+         * </p>
+         */
         private Term type;
 
+        /**
+         * <p>
+         * Term describing the target of the generated message.
+         * </p>
+         */
         private Term target;
 
+        /**
+         * <p>
+         * Term describing the LO word of the LParam of the generated message.
+         * </p>
+         */
         private Term lparamLoWord;
 
+        /**
+         * <p>
+         * Term describing the HI word of the LParam of the generated message.
+         * </p>
+         */
         private Term lparamHiWord;
 
+        /**
+         * <p>
+         * Term describing the LParam of the generated message.
+         * </p>
+         */
         private Term lparam;
 
+        /**
+         * <p>
+         * Term describing the LO word of the WParam of the generated message.
+         * </p>
+         */
         private Term wparamLoWord;
 
+        /**
+         * <p>
+         * Term describing the HI word of the WParam of the generated message.
+         * </p>
+         */
         private Term wparamHiWord;
 
+        /**
+         * <p>
+         * Term describing the WParam of the generated message.
+         * </p>
+         */
         private Term wparam;
 
+        /**
+         * <p>
+         * Value in milliseconds that the replay waits until the the next message is replayed.
+         * </p>
+         */
         private int delay;
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param child
+
+        /**
+         * <p>
+         * Constructor. Creates a new ReplayMessageSpec.
+         * </p>
+         * 
+         * @param replayMessageSpecElement
+         *            JDOM element that describes the replay message specification
          */
         @SuppressWarnings("unchecked")
@@ -569,11 +684,11 @@
                 }
             }
-            
+
             this.delay = Integer.parseInt(replayMessageSpecElement.getAttributeValue("delay"));
-            
+
             if (children.size() > 1) {
                 for (Element child : children) {
                     Element termElement = (Element) child.getChildren().get(0);
-                    
+
                     if (child.getName().equals("type")) {
                         this.type = new Term(termElement);
@@ -581,5 +696,5 @@
                     else if (child.getName().equals("target")) {
                         this.target = new Term(termElement);
-                        
+
                         if (!generateSingleMessage) {
                             // in this case, the target is always a sequence value term, i.e.
@@ -595,11 +710,11 @@
                                 new Term((Element) loWordElement.getChildren().get(0));
                         }
-                        
+
                         Element hiWordElement = child.getChild("HIWORD", namespace);
                         if (hiWordElement != null) {
                             this.lparamHiWord =
-                                 new Term((Element) hiWordElement.getChildren().get(0));
+                                new Term((Element) hiWordElement.getChildren().get(0));
                         }
-                        
+
                         if ((lparamLoWord == null) && (lparamHiWord == null)) {
                             this.lparam = new Term(termElement);
@@ -612,11 +727,11 @@
                                 new Term((Element) loWordElement.getChildren().get(0));
                         }
-                        
+
                         Element hiWordElement = child.getChild("HIWORD", namespace);
                         if (hiWordElement != null) {
                             this.wparamHiWord =
-                                 new Term((Element) hiWordElement.getChildren().get(0));
+                                new Term((Element) hiWordElement.getChildren().get(0));
                         }
-                        
+
                         if ((wparamLoWord == null) && (wparamHiWord == null)) {
                             this.wparam = new Term(termElement);
@@ -629,8 +744,8 @@
         /**
          * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
+         * Determines if this specification defines one, or a sequence of messages.
+         * </p>
+         * 
+         * @return true if only a single message is generated; false if a sequence is generated
          */
         boolean generateSingleMessage() {
@@ -640,8 +755,8 @@
         /**
          * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
+         * Returns the object Id from which the message is generated.
+         * </p>
+         * 
+         * @return the object Id
          */
         String getReplayObjectId() {
@@ -650,5 +765,9 @@
 
         /**
-         * @return the type
+         * <p>
+         * Returns the term that describes the type of the generated message.
+         * </p>
+         * 
+         * @return the type term
          */
         Term getType() {
@@ -657,5 +776,9 @@
 
         /**
-         * @return the target
+         * <p>
+         * Returns the term that describes the target of the generated message.
+         * </p>
+         * 
+         * @return the target term
          */
         Term getTarget() {
@@ -664,5 +787,9 @@
 
         /**
-         * @return the lparamLoWord
+         * <p>
+         * Returns the term that describes the LO word of the LParam of the generated message.
+         * </p>
+         * 
+         * @return the LParam LO word term
          */
         Term getLparamLoWord() {
@@ -671,5 +798,9 @@
 
         /**
-         * @return the lparamHiWord
+         * <p>
+         * Returns the term that describes the HI word of the LParam of the generated message.
+         * </p>
+         * 
+         * @return the LParam HI word term
          */
         Term getLparamHiWord() {
@@ -678,5 +809,9 @@
 
         /**
-         * @return the lparam
+         * <p>
+         * Returns the term that describes the LParam of the generated message.
+         * </p>
+         * 
+         * @return the LParam term
          */
         Term getLparam() {
@@ -685,5 +820,9 @@
 
         /**
-         * @return the wparamLoWord
+         * <p>
+         * Returns the term that describes the LO word of the WParam of the generated message.
+         * </p>
+         * 
+         * @return the WParam LO word term
          */
         Term getWparamLoWord() {
@@ -692,5 +831,9 @@
 
         /**
-         * @return the wparamHiWord
+         * <p>
+         * Returns the term that describes the HI word of the WParam of the generated message.
+         * </p>
+         * 
+         * @return the WParam HI word term
          */
         Term getWparamHiWord() {
@@ -699,5 +842,9 @@
 
         /**
-         * @return the wparam
+         * <p>
+         * Returns the term that describes the WParam of the generated message.
+         * </p>
+         * 
+         * @return the WParam term
          */
         Term getWparam() {
@@ -706,4 +853,8 @@
 
         /**
+         * <p>
+         * Returns the delay during the replay after this message is sent.
+         * </p>
+         * 
          * @return the delay
          */
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/EventGenerator.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/EventGenerator.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/EventGenerator.java	(revision 837)
@@ -32,9 +32,9 @@
  * <p>
  * Translates sequences of windows messages into {@link WindowsEvent}s that can be used by the
- * EventBench core libraries.
+ * QUEST core libraries.
  * </p>
  * 
- * @author Steffen Herbold
  * @version 1.0
+ * @author Steffen Herbold, Patrick Harms
  */
 public class EventGenerator {
@@ -220,8 +220,9 @@
     /**
      * <p>
-     * TODO: comment
+     * Evaluates whether the current message sequence matches a given rule.
      * </p>
      *
-     * @param currentRule
+     * @param currentRule rule that is matched
+     * @return true if the message sequence matches the rule; false otherwise
      */
     private boolean evaluateMessageConditions(EventGenerationRule currentRule) {
@@ -742,9 +743,9 @@
     /**
      * <p>
-     * TODO: comment
+     * Resolves the parameters described by {@link Term}s.
      * </p>
      *
-     * @param eventParameters
-     * @return
+     * @param eventParameters terms whose parameters are resolved
+     * @return resolved parameters
      */
     private Map<String, String> resolveParameters(List<Term> eventParameters) {
@@ -947,5 +948,5 @@
     /**
      * <p>
-     * convenience method for {@link #getTermValueAsList(WindowsMessage, Term)} with current
+     * Convenience method for {@link #getTermValueAsList(WindowsMessage, Term)} with current
      * message is null.
      * </p>
@@ -996,10 +997,10 @@
     /**
      * <p>
-     * TODO: comment
+     * Resolves term values.
      * </p>
      *
-     * @param value
-     * @param expectedType
-     * @return
+     * @param value value to be resolved
+     * @param expectedType class defining the expected type
+     * @return resolved value
      */
     @SuppressWarnings("unchecked")
@@ -1076,5 +1077,5 @@
     /**
      * <p>
-     * TODO: comment
+     * Parses the rules.
      * </p>
      *
@@ -1091,12 +1092,10 @@
         catch (JDOMException e) {
             Console.printerrln("Invalid rules file.");
-            // TODO handle Exception
-            e.printStackTrace();
+            Console.logException(e);
             return;
         }
         catch (IOException e) {
             Console.printerrln("Invalid rules file.");
-            // TODO handle Exception
-            e.printStackTrace();
+            Console.logException(e);
             return;
         }
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/MFCLogParser.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/MFCLogParser.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/MFCLogParser.java	(revision 837)
@@ -172,18 +172,18 @@
         } 
         catch (UnsupportedEncodingException e) {
-            // TODO handle Exception
-            e.printStackTrace();
+            Console.printerr("Error parsing file " + file.getName());
+            Console.logException(e);
         }
         catch (ParserConfigurationException e) {
-            // TODO handle Exception
-            e.printStackTrace();
+            Console.printerr("Error parsing file " + file.getName());
+            Console.logException(e);
         }
         catch (SAXException e) {
-            // TODO handle Exception
-            e.printStackTrace();
+            Console.printerr("Error parsing file " + file.getName());
+            Console.logException(e);
         }
         catch (FileNotFoundException e) {
-            // TODO handle Exception
-            e.printStackTrace();
+            Console.printerr("Error parsing file " + file.getName());
+            Console.logException(e);
         }
         
@@ -202,10 +202,10 @@
             }
             catch (SAXException e) {
-                // TODO handle Exception
-                e.printStackTrace();
+                Console.printerr("Error parsing file " + file.getName());
+                Console.logException(e);
             }
             catch (IOException e) {
-                // TODO handle Exception
-                e.printStackTrace();
+                Console.printerr("Error parsing file " + file.getName());
+                Console.logException(e);
             }
         }
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/MFCEventType.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/MFCEventType.java	(revision 832)
+++ 	(revision )
@@ -1,40 +1,0 @@
-package de.ugoe.cs.quest.plugin.mfc.eventcore;
-
-import de.ugoe.cs.quest.eventcore.IEventType;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @version $Revision: $ $Date: 21.08.2012$
- * @author 2012, last modified by $Author: pharms$
- */
-public class MFCEventType implements IEventType {
-
-    /** */
-    private static final long serialVersionUID = 1L;
-    
-    /** */
-    private WindowsMessageType messageType;
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param currentMessageType
-     */
-    public MFCEventType(WindowsMessageType messageType) {
-        this.messageType = messageType;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.quest.eventcore.IEventType#getName()
-     */
-    @Override
-    public String getName() {
-        return messageType.name();
-    }
-
-}
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/MFCEventTypeFactory.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/MFCEventTypeFactory.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/MFCEventTypeFactory.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.eventcore;
 
@@ -4,4 +5,5 @@
 
 import de.ugoe.cs.quest.eventcore.IEventType;
+import de.ugoe.cs.quest.eventcore.gui.IInteraction;
 import de.ugoe.cs.quest.eventcore.gui.KeyPressed;
 import de.ugoe.cs.quest.eventcore.gui.KeyReleased;
@@ -14,15 +16,15 @@
 /**
  * <p>
- * TODO comment
+ * Creates the GUI event types (i.e., {@link IInteraction}s) for MFC events.
  * </p>
  * 
- * @version $Revision: $ $Date: 21.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCEventTypeFactory {
-    
+
     /**
      * <p>
-     * the instance of the singleton
+     * Instance of the singleton
      * </p>
      */
@@ -31,18 +33,16 @@
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCEventTypeFactory. Private to preserve singleton property.
      * </p>
-     *
+     * 
      */
-    private MFCEventTypeFactory() {
-        // prevent external instantiation
-    }
+    private MFCEventTypeFactory() {}
 
     /**
      * <p>
-     * TODO: comment
+     * Returns the instance of the MFCEventTypeFactory.
      * </p>
-     *
-     * @return
+     * 
+     * @return the instance
      */
     public static MFCEventTypeFactory getInstance() {
@@ -52,13 +52,14 @@
     /**
      * <p>
-     * TODO: comment
+     * Returns the event type based on the name and parameters of a MFC event.
      * </p>
-     *
-     * @param currentRuleName
-     * @return
+     * 
+     * @param eventName
+     *            name of the MFC event
+     * @param messageParameters
+     *            parameters of the MFC event
+     * @return the event type
      */
-    public IEventType getEventType(String              eventName,
-                                   Map<String, String> messageParameters)
-    {
+    public IEventType getEventType(String eventName, Map<String, String> messageParameters) {
         if ("LeftClickButton".equals(eventName)) {
             return new MouseClick(MouseButtonInteraction.Button.LEFT);
@@ -136,14 +137,24 @@
 
     /**
-     * @param message
-     * @return
+     * <p>
+     * If the message parameters contain information about a key that has been pressed, the
+     * associated {@link VirtualKey} is returned.
+     * </p>
+     * 
+     * @param messageParameters
+     *            the message parameters
+     * @return key extracted from the message parameters
+     * @throws IllegalArgumentException
+     *             thrown if the messageParameters do not contain information about a key
      */
-    private VirtualKey getKey(Map<String, String> messageParameters) {
+    private VirtualKey getKey(Map<String, String> messageParameters)
+        throws IllegalArgumentException
+    {
         String value = null;
-        
+
         if (messageParameters != null) {
             value = messageParameters.get("key");
         }
-        
+
         if (value == null) {
             throw new IllegalArgumentException
@@ -157,17 +168,24 @@
     /**
      * <p>
-     * TODO: comment
+     * If the message parameters contain information about a scroll position, the respective
+     * position is returned.
      * </p>
-     *
+     * 
      * @param messageParameters
-     * @return
+     *            the message parameters
+     * @return the scroll position
+     * @throws IllegalArgumentException
+     *             thrown if the messageParameters do not contain information about a scroll
+     *             position
      */
-    private int getSelectedValue(Map<String, String> messageParameters) {
+    private int getSelectedValue(Map<String, String> messageParameters)
+        throws IllegalArgumentException
+    {
         String value = null;
-        
+
         if (messageParameters != null) {
             value = messageParameters.get("scrollPos");
         }
-        
+
         if (value == null) {
             throw new IllegalArgumentException
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/ReplayWindowsMessage.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/ReplayWindowsMessage.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/ReplayWindowsMessage.java	(revision 837)
@@ -200,8 +200,8 @@
     /**
      * <p>
-     * TODO: comment
+     * Sets the XML target string.
      * </p>
      *
-     * @param termValue
+     * @param targetXML the target string
      */
     public void setTargetXML(String targetXML) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsMessage.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsMessage.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsMessage.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.eventcore;
 
@@ -17,5 +18,5 @@
  * 
  */
-public class WindowsMessage  implements Serializable {
+public class WindowsMessage implements Serializable {
 
     /**
@@ -76,14 +77,14 @@
      * @param type
      *            type of the message
-     * @param currentMessageParameters 
-     * @param target 
-     */
-    public WindowsMessage(WindowsMessageType  type,
-                          MFCGUIElement       target,
+     * @param currentMessageParameters
+     * @param target
+     */
+    public WindowsMessage(WindowsMessageType type,
+                          MFCGUIElement target,
                           Map<String, Object> messageParameters)
     {
         this.type = type;
         setTarget(target);
-        
+
         for (Map.Entry<String, Object> entry : messageParameters.entrySet()) {
             addParameter(entry.getKey(), entry.getValue());
@@ -99,6 +100,5 @@
      *            type of the message
      */
-    public WindowsMessage(WindowsMessageType type)
-    {
+    public WindowsMessage(WindowsMessageType type) {
         this.type = type;
     }
@@ -137,8 +137,9 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param target2
+     * Sets the message target.
+     * </p>
+     * 
+     * @param target
+     *            the target
      */
     public void setTarget(MFCGUIElement target) {
@@ -149,13 +150,13 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+     * Returns the target of the message.
+     * </p>
+     * 
+     * @return the target
      */
     public MFCGUIElement getTarget() {
         return target;
     }
-    
+
     /**
      * <p>
@@ -189,6 +190,6 @@
             isEqual =
                 ((WindowsMessage) other).type == this.type &&
-                ((WindowsMessage) other).target.equals(this.target) &&
-                ((WindowsMessage) other).params.equals(this.params);
+                    ((WindowsMessage) other).target.equals(this.target) &&
+                    ((WindowsMessage) other).params.equals(this.params);
         }
         return isEqual;
@@ -259,8 +260,8 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+     * Returns the parameters associated with this message.
+     * </p>
+     * 
+     * @return the parameters
      */
     protected Map<String, Object> getParameters() {
@@ -270,8 +271,8 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+     * Returns the XML target description of this message.
+     * </p>
+     * 
+     * @return the XML target description
      */
     public String getTargetXML() {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsMessageType.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsMessageType.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsMessageType.java	(revision 837)
@@ -1,179 +1,67 @@
+
 package de.ugoe.cs.quest.plugin.mfc.eventcore;
 
 /**
- * TODO comment
+ * <p>
+ * Enumeration to deal with MFC message types.
+ * </p>
  * 
- * @version $Revision: $ $Date: $
- * @author 2011, last modified by $Author: $
+ * @version 1.0
+ * @author Patrick Harms, Steffen Herbold
  */
 public enum WindowsMessageType {
-    
-    WM_NULL(0),
-    WM_CREATE(1),
-    WM_DESTROY(2),
-    WM_MOVE(3),
-    WM_SIZE(5),
-    WM_ACTIVATE(6),
-    WM_SETFOCUS(7),
-    WM_KILLFOCUS(8),
-    WM_ENABLE(10),
-    WM_SETREDRAW(11),
-    WM_SETTEXT(12),
-    WM_GETTEXT(13),
-    WM_GETTEXTLENGTH(14),
-    WM_PAINT(15),
-    WM_CLOSE(16),
-    WM_QUERYENDSESSION(17),
-    WM_QUIT(18),
-    WM_QUERYOPEN(19),
-    WM_ERASEBKGND(20),
-    WM_SYSCOLORCHANGE(21),
-    WM_ENDSESSION(22),
-    WM_SHOWWINDOW(24),
-    WM_CTLCOLOR(25),
-    WM_WININICHANGE(26),
-    WM_DEVMODECHANGE(27),
-    WM_ACTIVATEAPP(28),
-    WM_FONTCHANGE(29),
-    WM_TIMECHANGE(30),
-    WM_CANCELMODE(31),
-    WM_SETCURSOR(32),
-    WM_MOUSEACTIVATE(33),
-    WM_CHILDACTIVATE(34),
-    WM_QUEUESYNC(35),
-    WM_GETMINMAXINFO(36),
-    WM_PAINTICON(38),
-    WM_ICONERASEBKGND(39),
-    WM_NEXTDLGCTL(40),
-    WM_SPOOLERSTATUS(42),
-    WM_DRAWITEM(43),
-    WM_MEASUREITEM(44),
-    WM_DELETEITEM(45),
-    WM_VKEYTOITEM(46),
-    WM_CHARTOITEM(47),
-    WM_SETFONT(48),
-    WM_GETFONT(49),
-    WM_SETHOTKEY(50),
-    WM_GETHOTKEY(51),
-    WM_QUERYDRAGICON(55),
-    WM_COMPAREITEM(57),
-    WM_GETOBJECT(61),
-    WM_COMPACTING(65),
-    WM_COMMNOTIFY(68),
-    WM_WINDOWPOSCHANGING(70),
-    WM_WINDOWPOSCHANGED(71),
-    WM_POWER(72),
-    WM_COPYDATA(74),
-    WM_CANCELJOURNAL(75),
-    WM_NOTIFY(78),
-    WM_INPUTLANGCHANGEREQUEST(80),
-    WM_INPUTLANGCHANGE(81),
-    WM_TCARD(82),
-    WM_HELP(83),
-    WM_USERCHANGED(84),
-    WM_NOTIFYFORMAT(85),
-    WM_CONTEXTMENU(123),
-    WM_STYLECHANGING(124),
-    WM_STYLECHANGED(125),
-    WM_DISPLAYCHANGE(126),
-    WM_GETICON(127),
-    WM_SETICON(128),
-    WM_NCCREATE(129),
-    WM_NCDESTROY(130),
-    WM_NCCALCSIZE(131),
-    WM_NCHITTEST(132),
-    WM_NCPAINT(133),
-    WM_NCACTIVATE(134),
-    WM_GETDLGCODE(135),
-    WM_SYNCPAINT(136),
-    WM_NCMOUSEMOVE(160),
-    WM_NCLBUTTONDOWN(161),
-    WM_NCLBUTTONUP(162),
-    WM_NCLBUTTONDBLCLK(163),
-    WM_NCRBUTTONDOWN(164),
-    WM_NCRBUTTONUP(165),
-    WM_NCRBUTTONDBLCLK(166),
-    WM_NCMBUTTONDOWN(167),
-    WM_NCMBUTTONUP(168),
-    WM_NCMBUTTONDBLCLK(169),
-    WM_NCXBUTTONDOWN(171),
-    WM_NCXBUTTONUP(172),
-    WM_NCXBUTTONDBLCLK(173),
-    SBM_SETPOS(224),
-    BM_CLICK(245),
-    WM_INPUT(255),
-    WM_KEYDOWN(256),
-    WM_KEYFIRST(256),
-    WM_KEYUP(257),
-    WM_CHAR(258),
-    WM_DEADCHAR(259),
-    WM_SYSKEYDOWN(260),
-    WM_SYSKEYUP(261),
-    WM_SYSCHAR(262),
-    WM_SYSDEADCHAR(263),
-    WM_KEYLAST(264),
-    WM_WNT_CONVERTREQUESTEX(265),
-    WM_CONVERTREQUEST(266),
-    WM_CONVERTRESULT(267),
-    WM_INTERIM(268),
-    WM_IME_STARTCOMPOSITION(269),
-    WM_IME_ENDCOMPOSITION(270),
-    WM_IME_COMPOSITION(271),
-    WM_IME_KEYLAST(271),
-    WM_INITDIALOG(272),
-    WM_COMMAND(273),
-    WM_SYSCOMMAND(274),
-    WM_TIMER(275),
-    WM_HSCROLL(276),
-    WM_VSCROLL(277),
-    WM_INITMENU(278),
-    WM_INITMENUPOPUP(279),
-    WM_MENUSELECT(287),
-    WM_MENUCHAR(288),
-    WM_ENTERIDLE(289),
-    WM_MENURBUTTONUP(290),
-    WM_MENUDRAG(291),
-    WM_MENUGETOBJECT(292),
-    WM_UNINTMENUPOPUP(293),
-    WM_MENUCOMMAND(294),
-    WM_CHANGEUISTATE(295),
-    WM_UPDATEUISTATE(296),
-    WM_QUERYUISTATE(297),
-    WM_CTLCOLORMSGBOX(306),
-    WM_CTLCOLOREDIT(307),
-    WM_CTLCOLORLISTBOX(308),
-    WM_CTLCOLORBTN(309),
-    WM_CTLCOLORDLG(310),
-    WM_CTLCOLORSCROLLBAR(311),
-    WM_CTLCOLORSTATIC(312),
-    CB_SHOWDROPDOWN(335),
-    LB_SETCURSEL(390),
-    WM_MOUSEFIRST(512),
-    WM_MOUSEMOVE(512),
-    WM_LBUTTONDOWN(513),
-    WM_LBUTTONUP(514),
-    WM_LBUTTONDBLCLK(515),
-    WM_RBUTTONDOWN(516),
-    WM_RBUTTONUP(517),
-    WM_RBUTTONDBLCLK(518),
-    WM_MBUTTONDOWN(519),
-    WM_MBUTTONUP(520),
-    WM_MBUTTONDBLCLK(521),
-    WM_MOUSELAST(521),
-    WM_MOUSEWHEEL(522),
-    WM_XBUTTONDOWN(523),
-    WM_XBUTTONUP(524),
-    WM_XBUTTONDBLCLK(525),
-    WM_USER(1024),
-    CB_SETCURSEL(334),
-    TBM_SETPOS(1029),
-    UDM_SETRANGE(1125),
-    TCM_SETCURSEL(4876);
-
-    /** the numerical representation of the message type */
+
+    WM_NULL(0), WM_CREATE(1), WM_DESTROY(2), WM_MOVE(3), WM_SIZE(5), WM_ACTIVATE(6),
+    WM_SETFOCUS(7), WM_KILLFOCUS(8), WM_ENABLE(10), WM_SETREDRAW(11), WM_SETTEXT(12),
+    WM_GETTEXT(13), WM_GETTEXTLENGTH(14), WM_PAINT(15), WM_CLOSE(16), WM_QUERYENDSESSION(17),
+    WM_QUIT(18), WM_QUERYOPEN(19), WM_ERASEBKGND(20), WM_SYSCOLORCHANGE(21), WM_ENDSESSION(22),
+    WM_SHOWWINDOW(24), WM_CTLCOLOR(25), WM_WININICHANGE(26), WM_DEVMODECHANGE(27), WM_ACTIVATEAPP(
+        28), WM_FONTCHANGE(29), WM_TIMECHANGE(30), WM_CANCELMODE(31), WM_SETCURSOR(32),
+    WM_MOUSEACTIVATE(33), WM_CHILDACTIVATE(34), WM_QUEUESYNC(35), WM_GETMINMAXINFO(36),
+    WM_PAINTICON(38), WM_ICONERASEBKGND(39), WM_NEXTDLGCTL(40), WM_SPOOLERSTATUS(42), WM_DRAWITEM(
+        43), WM_MEASUREITEM(44), WM_DELETEITEM(45), WM_VKEYTOITEM(46), WM_CHARTOITEM(47),
+    WM_SETFONT(48), WM_GETFONT(49), WM_SETHOTKEY(50), WM_GETHOTKEY(51), WM_QUERYDRAGICON(55),
+    WM_COMPAREITEM(57), WM_GETOBJECT(61), WM_COMPACTING(65), WM_COMMNOTIFY(68),
+    WM_WINDOWPOSCHANGING(70), WM_WINDOWPOSCHANGED(71), WM_POWER(72), WM_COPYDATA(74),
+    WM_CANCELJOURNAL(75), WM_NOTIFY(78), WM_INPUTLANGCHANGEREQUEST(80), WM_INPUTLANGCHANGE(81),
+    WM_TCARD(82), WM_HELP(83), WM_USERCHANGED(84), WM_NOTIFYFORMAT(85), WM_CONTEXTMENU(123),
+    WM_STYLECHANGING(124), WM_STYLECHANGED(125), WM_DISPLAYCHANGE(126), WM_GETICON(127),
+    WM_SETICON(128), WM_NCCREATE(129), WM_NCDESTROY(130), WM_NCCALCSIZE(131), WM_NCHITTEST(132),
+    WM_NCPAINT(133), WM_NCACTIVATE(134), WM_GETDLGCODE(135), WM_SYNCPAINT(136),
+    WM_NCMOUSEMOVE(160), WM_NCLBUTTONDOWN(161), WM_NCLBUTTONUP(162), WM_NCLBUTTONDBLCLK(163),
+    WM_NCRBUTTONDOWN(164), WM_NCRBUTTONUP(165), WM_NCRBUTTONDBLCLK(166), WM_NCMBUTTONDOWN(167),
+    WM_NCMBUTTONUP(168), WM_NCMBUTTONDBLCLK(169), WM_NCXBUTTONDOWN(171), WM_NCXBUTTONUP(172),
+    WM_NCXBUTTONDBLCLK(173), SBM_SETPOS(224), BM_CLICK(245), WM_INPUT(255), WM_KEYDOWN(256),
+    WM_KEYFIRST(256), WM_KEYUP(257), WM_CHAR(258), WM_DEADCHAR(259), WM_SYSKEYDOWN(260),
+    WM_SYSKEYUP(261), WM_SYSCHAR(262), WM_SYSDEADCHAR(263), WM_KEYLAST(264),
+    WM_WNT_CONVERTREQUESTEX(265), WM_CONVERTREQUEST(266), WM_CONVERTRESULT(267), WM_INTERIM(268),
+    WM_IME_STARTCOMPOSITION(269), WM_IME_ENDCOMPOSITION(270), WM_IME_COMPOSITION(271),
+    WM_IME_KEYLAST(271), WM_INITDIALOG(272), WM_COMMAND(273), WM_SYSCOMMAND(274), WM_TIMER(275),
+    WM_HSCROLL(276), WM_VSCROLL(277), WM_INITMENU(278), WM_INITMENUPOPUP(279), WM_MENUSELECT(287),
+    WM_MENUCHAR(288), WM_ENTERIDLE(289), WM_MENURBUTTONUP(290), WM_MENUDRAG(291), WM_MENUGETOBJECT(
+        292), WM_UNINTMENUPOPUP(293), WM_MENUCOMMAND(294), WM_CHANGEUISTATE(295), WM_UPDATEUISTATE(
+        296), WM_QUERYUISTATE(297), WM_CTLCOLORMSGBOX(306), WM_CTLCOLOREDIT(307),
+    WM_CTLCOLORLISTBOX(308), WM_CTLCOLORBTN(309), WM_CTLCOLORDLG(310), WM_CTLCOLORSCROLLBAR(311),
+    WM_CTLCOLORSTATIC(312), CB_SHOWDROPDOWN(335), LB_SETCURSEL(390), WM_MOUSEFIRST(512),
+    WM_MOUSEMOVE(512), WM_LBUTTONDOWN(513), WM_LBUTTONUP(514), WM_LBUTTONDBLCLK(515),
+    WM_RBUTTONDOWN(516), WM_RBUTTONUP(517), WM_RBUTTONDBLCLK(518), WM_MBUTTONDOWN(519),
+    WM_MBUTTONUP(520), WM_MBUTTONDBLCLK(521), WM_MOUSELAST(521), WM_MOUSEWHEEL(522),
+    WM_XBUTTONDOWN(523), WM_XBUTTONUP(524), WM_XBUTTONDBLCLK(525), WM_USER(1024),
+    CB_SETCURSEL(334), TBM_SETPOS(1029), UDM_SETRANGE(1125), TCM_SETCURSEL(4876);
+
+    /**
+     * <p>
+     * Numerical representation of the message type.
+     * </p>
+     */
     private int mNumber;
 
     /**
+     * <p>
+     * Constructor. Creates a new WindowsMessageType.
+     * </p>
+     * 
      * @param number
+     *            numerical representation of the message type
      */
     WindowsMessageType(int number) {
@@ -182,5 +70,9 @@
 
     /**
-     * @return Returns the number.
+     * <p>
+     * Returns the numerical representation of the message type.
+     * </p>
+     * 
+     * @return the numerical representation
      */
     public int getNumber() {
@@ -301,7 +193,17 @@
 
     /**
-     *
-     */
-    public static WindowsMessageType parseMessageType(String numberString) {
+     * <p>
+     * Parses an {@link String} and returns the respective WindowsMessageType if possible.
+     * </p>
+     * 
+     * @param numberString
+     *            String representation of the event type
+     * @return created WindowsMessageType
+     * @throws IllegalArgumentException
+     *             thrown if there is no WindowsMessageType that correlates to numberString
+     */
+    public static WindowsMessageType parseMessageType(String numberString)
+        throws IllegalArgumentException
+    {
         try {
             int number = Integer.parseInt(numberString);
@@ -314,7 +216,15 @@
 
     /**
-     *
-     */
-    public static WindowsMessageType valueOf(int number) {
+     * <p>
+     * Returns the WindowsMessageType associated with an integer.
+     * </p>
+     * 
+     * @param number
+     *            integer to which the according WindowsMessageType is returned
+     * @return the WindowsMessageType
+     * @throws IllegalArgumentException
+     *             thrown if there is no WindowsMessageType that correlates to number
+     */
+    public static WindowsMessageType valueOf(int number) throws IllegalArgumentException {
         for (WindowsMessageType type : WindowsMessageType.values()) {
             if (type.mNumber == number) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsVirtualKey.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsVirtualKey.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/eventcore/WindowsVirtualKey.java	(revision 837)
@@ -5,13 +5,12 @@
 
 /**
- * TODO comment
+ * <p>
+ * Map of virtual keys for MFC.
+ * </p>
  * 
- * @version $Revision: $ $Date: $
- * @author 2011, last modified by $Author: $
+ * @version 1.0
+ * @author Patrick Harms
  */
-// -------------------------------------------------------------------------------------------------
-
-public enum WindowsVirtualKey
-{
+public enum WindowsVirtualKey {
     // VK_LBUTTON (0x01, "Left mouse button"),
     // VK_RBUTTON (0x02, "Right mouse button"),
@@ -168,42 +167,58 @@
     // VK_OEM_CLEAR (0xFE, "Clear key");
 
-    /** the id of the virtual key */
+    /**
+     * <p>
+     * Numerical representation of the virtual key.
+     * </p>
+     */
     private int mNumber;
 
-    /** the <code>Key</code> represented by this virtual key */
+    /**
+     * <p>
+     * {@link VirtualKey} represented by this WindowsVirtualKey
+     * </p>
+     */
     private VirtualKey mRepresentedKey;
 
-    // -----------------------------------------------------------------------------------------------
-    /**
+    /**
+     * <p>
+     * Constructor. Creates a new WindowsVirtualKey.
+     * </p>
+     * 
      * @param number
-     */
-    // -----------------------------------------------------------------------------------------------
-    WindowsVirtualKey(int number, VirtualKey representedKey)
-    {
+     *            numerical representation of the virtual key
+     * @param representedKey
+     *            virtual key that is represented
+     */
+    WindowsVirtualKey(int number, VirtualKey representedKey) {
         mNumber = number;
         mRepresentedKey = representedKey;
     }
 
-    // -----------------------------------------------------------------------------------------------
-    /**
-     * @return Returns the number.
-     */
-    // -----------------------------------------------------------------------------------------------
-    int getNumber()
-    {
+    /**
+     * <p>
+     * Returns the numerical representation of the virtual key.
+     * </p>
+     * 
+     * @return the numerical representation
+     */
+    int getNumber() {
         return mNumber;
     }
 
-    // -----------------------------------------------------------------------------------------------
-    /**
-   *
-   */
-    // -----------------------------------------------------------------------------------------------
-    public static WindowsVirtualKey parseVirtualKey(String string)
-    {
-        for (WindowsVirtualKey virtualKey : WindowsVirtualKey.values())
-        {
-            if (virtualKey.mNumber == Integer.parseInt(string))
-            {
+    /**
+     * <p>
+     * Parses an {@link String} and returns the respective WindowsVirtualKey if possible.
+     * </p>
+     * 
+     * @param string
+     *            String representation of the event type
+     * @return created WindowsVirtualKey
+     * @throws IllegalArgumentException
+     *             thrown if there is no WindowsVirtualKey that correlates to string
+     */
+    public static WindowsVirtualKey parseVirtualKey(String string) throws IllegalArgumentException {
+        for (WindowsVirtualKey virtualKey : WindowsVirtualKey.values()) {
+            if (virtualKey.mNumber == Integer.parseInt(string)) {
                 return virtualKey;
             }
@@ -213,15 +228,18 @@
     }
 
-    // -----------------------------------------------------------------------------------------------
-    /**
-   *
-   */
-    // -----------------------------------------------------------------------------------------------
-    public static WindowsVirtualKey valueOf(int number)
-    {
-        for (WindowsVirtualKey virtualKey : WindowsVirtualKey.values())
-        {
-            if (virtualKey.mNumber == number)
-            {
+    /**
+     * <p>
+     * Returns the WindowsVirtualKey associated with an integer.
+     * </p>
+     * 
+     * @param number
+     *            integer to which the according WindowsVirtualKey is returned
+     * @return the WindowsVirtualKey
+     * @throws IllegalArgumentException
+     *             thrown if there is no WindowsVirtualKey that correlates to number
+     */
+    public static WindowsVirtualKey valueOf(int number) throws IllegalArgumentException {
+        for (WindowsVirtualKey virtualKey : WindowsVirtualKey.values()) {
+            if (virtualKey.mNumber == number) {
                 return virtualKey;
             }
@@ -231,13 +249,12 @@
     }
 
-    // -----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     * 
-     * @return
-     */
-    // -----------------------------------------------------------------------------------------------
-    public VirtualKey getKey()
-    {
+    /**
+     * <p>
+     * Returns the {@link VirtualKey} associated with this WindowsVirtualKey.
+     * </p>
+     * 
+     * @return the virtual key
+     */
+    public VirtualKey getKey() {
         return mRepresentedKey;
     }
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCButton.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCButton.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCButton.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,21 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents buttons in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 21.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCButton extends MFCGUIElement implements IButton {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCButton.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
+     * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCButton(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCCanvas.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCCanvas.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCCanvas.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,22 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents canvas' in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 23.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCCanvas extends MFCGUIElement implements ICanvas {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCCanvas.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
      * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCCanvas(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCComboBox.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCComboBox.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCComboBox.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,22 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents combo boxes in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 23.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCComboBox extends MFCGUIElement implements IComboBox {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCComboBox.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
      * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCComboBox(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCDialog.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCDialog.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCDialog.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,21 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents dialogs in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 21.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCDialog extends MFCWindow implements IDialog {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCDialog.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
+     * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCDialog(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCGUIElement.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCGUIElement.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCGUIElement.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,18 +6,30 @@
 
 /**
- * TODO comment
+ * <p>
+ * Base class that represents GUI element in MFC GUIs.
+ * </p>
  * 
- * @version $Revision: $ $Date: $
- * @author 2011, last modified by $Author: $
+ * @version 1.0
+ * @author Patrick Harms
  */
 public abstract class MFCGUIElement extends AbstractDefaultGUIElement {
-    
-    /**  */
+
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
-     * @param name
-     * @param id
-     * @param isModal
+     * <p>
+     * Constructor. Creates a new MFCGUIElement.
+     * </p>
+     * 
+     * @param specification
+     *            specification of created GUI element
+     * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCGUIElement(MFCGUIElementSpec specification, MFCGUIElement parent) {
@@ -24,5 +37,7 @@
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.quest.eventcore.IEventTarget#getPlatform()
      */
@@ -33,5 +48,9 @@
 
     /**
-     * @return Returns the id.
+     * <p>
+     * Returns the HWND (Id) of the GUI element.
+     * </p>
+     * 
+     * @return the HWND (Id)
      */
     public String getId() {
@@ -40,5 +59,9 @@
 
     /**
-     * @return Returns the name.
+     * <p>
+     * Returns the type of the GUI element.
+     * </p>
+     * 
+     * @return the type
      */
     public String getType() {
@@ -47,5 +70,9 @@
 
     /**
-     * @return Returns the name.
+     * <p>
+     * Returns the name of the GUI element.
+     * </p>
+     * 
+     * @return the name
      */
     public String getName() {
@@ -54,5 +81,9 @@
 
     /**
-     * @return Returns the isModal.
+     * <p>
+     * Returns the modality of the GUI element.
+     * </p>
+     * 
+     * @return the modality
      */
     public boolean isModal() {
@@ -62,8 +93,8 @@
     /**
      * <p>
-     * TODO: comment
+     * Returns the resource Id of the GUI element.
      * </p>
-     *
-     * @return
+     * 
+     * @return the resource Id
      */
     public int getResourceId() {
@@ -71,6 +102,10 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElement#updateSpecification(de.ugoe.cs.quest.eventcore.guimodel.IGUIElementSpec)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.quest.eventcore.guimodel.IGUIElement#updateSpecification(de.ugoe.cs.quest.eventcore
+     * .guimodel.IGUIElementSpec)
      */
     @Override
@@ -78,9 +113,14 @@
         ((MFCGUIElementSpec) super.getSpecification()).update(furtherSpec);
     }
-    
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.quest.eventcore.IEventTarget#getStringIdentifier()
+     */
     @Override
     public String getStringIdentifier() {
         String str = this.toString();
-        if( getParent()!=null ) {
+        if (getParent() != null) {
             return getParent().getStringIdentifier() + "->" + str;
         }
@@ -88,5 +128,7 @@
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.lang.Object#toString()
      */
@@ -98,11 +140,12 @@
     /**
      * <p>
-     * TODO: comment
+     * Returns the XML representation of the GUI element.
      * </p>
+     * 
+     * @return the XML representation
      */
     public String toXML() {
         if (getParent() != null) {
-            return
-                ((MFCGUIElement) getParent()).toXML() +
+            return ((MFCGUIElement) getParent()).toXML() +
                 ((MFCGUIElementSpec) super.getSpecification()).toXML();
         }
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCGUIElementSpec.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCGUIElementSpec.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCGUIElementSpec.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -99,9 +100,5 @@
      *            modality of the window
      */
-    protected MFCGUIElementSpec(long    hwnd,
-                                String  name,
-                                int     resourceId,
-                                String  type,
-                                boolean isModal)
+    protected MFCGUIElementSpec(long hwnd, String name, int resourceId, String type, boolean isModal)
     {
         this.hwnd = hwnd;
@@ -121,5 +118,5 @@
     public String getName() {
         StringBuffer names = new StringBuffer();
-        
+
         if (name != null) {
             names.append('"');
@@ -130,9 +127,9 @@
             names.append("NOT_SET");
         }
-        
+
         if (formerNames.size() > 0) {
-            
+
             names.append(" (aka ");
-            
+
             for (int i = 0; i < formerNames.size(); i++) {
                 if (i > 0) {
@@ -144,8 +141,8 @@
                 names.append('"');
             }
-            
+
             names.append(")");
         }
-        
+
         return names.toString();
     }
@@ -173,5 +170,7 @@
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElementSpec#getType()
      */
@@ -183,8 +182,8 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+     * Returns the modality of the specified GUI element.
+     * </p>
+     * 
+     * @return the modality
      */
     public boolean isModal() {
@@ -201,11 +200,10 @@
      */
     public void setName(String newName) {
-        if ((this.name != null) &&
-            (!this.name.equals(newName)) &&
+        if ((this.name != null) && (!this.name.equals(newName)) &&
             (!this.formerNames.contains(this.name)))
         {
             this.formerNames.add(this.name);
         }
-        
+
         this.name = newName;
     }
@@ -223,22 +221,26 @@
             this.formerHwnds.add(this.hwnd);
         }
-        
+
         this.hwnd = newHwnd;
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElementSpec#getSimilarity(de.ugoe.cs.quest.eventcore.guimodel.IGUIElementSpec)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.quest.eventcore.guimodel.IGUIElementSpec#getSimilarity(de.ugoe.cs.quest.eventcore
+     * .guimodel.IGUIElementSpec)
      */
     @Override
     public boolean getSimilarity(IGUIElementSpec other) {
-        
+
         if (this == other) {
             return true;
         }
-        
+
         if (!(other instanceof MFCGUIElementSpec)) {
             return false;
         }
-        
+
         MFCGUIElementSpec otherSpec = (MFCGUIElementSpec) other;
 
@@ -260,20 +262,21 @@
         // and reopend, i.e. a new instance is created. If one of them stays the same, then
         // similarity is given. Therefore these are the first two comparisons
-        
+
         if (hwnd == otherSpec.hwnd) {
             return true;
         }
-        
+
         if ((name != null) && (name.equals(otherSpec.name))) {
             return true;
         }
-        
-        if ((((name == null) && (otherSpec.name == null)) ||
-             (("".equals(name)) && ("".equals(otherSpec.name)))) &&
-            (formerNames.size() == 0) && (otherSpec.formerNames.size() == 0))
+
+        if ((((name == null) && (otherSpec.name == null)) || (("".equals(name)) && (""
+            .equals(otherSpec.name)))) &&
+            (formerNames.size() == 0) &&
+            (otherSpec.formerNames.size() == 0))
         {
             return true;
         }
-        
+
         // if the hwnd and the name did not stay the same, then the name should be checked first.
         // The current name of one of the specs must be contained in the former names of the
@@ -291,5 +294,5 @@
             return true;
         }
-        
+
         // ok. Even the names do not match. This is usually a clear indication, that the elements
         // are distinct. However, we check, if the former handles matched. This is very unlikely
@@ -302,26 +305,27 @@
 
         // now we can be really sure, that the GUI elements differ
-        
+
         return false;
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElementSpec#equals(IGUIElementSpec)
      */
     @Override
     public boolean equals(Object other) {
-        
+
         if (this == other) {
             return true;
         }
-        
+
         if (!(other instanceof MFCGUIElementSpec)) {
             return false;
         }
-        
+
         MFCGUIElementSpec otherSpec = (MFCGUIElementSpec) other;
-        
-        return
-            (hwnd == otherSpec.hwnd) && (isModal == otherSpec.isModal) &&
+
+        return (hwnd == otherSpec.hwnd) && (isModal == otherSpec.isModal) &&
             (resourceId == otherSpec.resourceId) &&
             ((type == otherSpec.type) || ((type != null) && (type.equals(otherSpec.type)))) &&
@@ -329,5 +333,7 @@
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.lang.Object#hashCode()
      */
@@ -340,5 +346,5 @@
     /**
      * <p>
-     * Returns a string identfier of the window:<br>
+     * Returns a string identifier of the window:<br>
      * {@code [resourceId;"windowName";"className";modality]}
      * </p>
@@ -348,31 +354,32 @@
     @Override
     public String toString() {
-        return "[" + resourceId + ";" + getName() + ";\"" + type + "\";" + isModal + ";" +
-            hwnd + "]";
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
+        return "[" + resourceId + ";" + getName() + ";\"" + type + "\";" + isModal + ";" + hwnd +
+            "]";
+    }
+
+    /**
+     * <p>
+     * Returns the XML representation of this specification.
+     * </p>
+     * 
+     * @return the XML representation
      */
     String toXML() {
-        return
-            "<window name=\"" + (name != null ? StringTools.xmlEntityReplacement(name) : "") +
-            "\" class=\"" + StringTools.xmlEntityReplacement(type) +
-            "\" resourceId=\"" + resourceId + "\" isModal=\"" +
-            isModal + "\"/>";
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
+        return "<window name=\"" + (name != null ? StringTools.xmlEntityReplacement(name) : "") +
+            "\" class=\"" + StringTools.xmlEntityReplacement(type) + "\" resourceId=\"" +
+            resourceId + "\" isModal=\"" + isModal + "\"/>";
+    }
+
+    /**
+     * <p>
+     * Updates the specification with another specification.
+     * </p>
+     * 
      * @param furtherSpec
+     *            specification used to update the current specification
      */
     void update(IGUIElementSpec furtherSpec) {
         MFCGUIElementSpec other = (MFCGUIElementSpec) furtherSpec;
-        
+
         if (other != this) {
             for (long formerHwnd : other.formerHwnds) {
@@ -388,6 +395,5 @@
             }
 
-            if ((name != other.name) && (name != null) && (!name.equals(other.name)))
-            {
+            if ((name != other.name) && (name != null) && (!name.equals(other.name))) {
                 setName(other.name);
             }
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCListBox.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCListBox.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCListBox.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,22 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents list boxes in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 23.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCListBox extends MFCGUIElement implements IListBox {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCListBox.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
      * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCListBox(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCPanel.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCPanel.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCPanel.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,22 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents panels in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 23.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCPanel extends MFCGUIElement implements IPanel {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCPanel.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
      * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCPanel(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTabbedPane.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTabbedPane.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTabbedPane.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,22 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents tabbed panes in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 23.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCTabbedPane extends MFCGUIElement implements ITabbedPane {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new TabbedPane.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
      * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCTabbedPane(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTextArea.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTextArea.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTextArea.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,21 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents text areas in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 21.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCTextArea extends MFCGUIElement implements ITextArea {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCTextArea.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
+     * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCTextArea(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCToolBar.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCToolBar.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCToolBar.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,22 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents tool bars in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 23.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCToolBar extends MFCGUIElement implements IToolBar {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCToolBar.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
      * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCToolBar(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTrackBar.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTrackBar.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCTrackBar.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -5,22 +6,29 @@
 /**
  * <p>
- * TODO comment
+ * Class that represents track bars in MFC GUIs.
  * </p>
  * 
- * @version $Revision: $ $Date: 23.08.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCTrackBar extends MFCGUIElement implements ITrackBar {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new MFCTrackBar.
      * </p>
-     *
+     * 
      * @param specification
+     *            specification of created GUI element
      * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCTrackBar(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCWindow.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCWindow.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCWindow.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -4,18 +5,30 @@
 
 /**
- * TODO comment
+ * <p>
+ * Class that represents windows in MFC GUIs.
+ * </p>
  * 
- * @version $Revision: $ $Date: $
- * @author 2011, last modified by $Author: $
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class MFCWindow extends MFCGUIElement implements IFrame {
 
-    /**  */
+    /**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
-     * @param name
-     * @param id
-     * @param isModal
+     * <p>
+     * Constructor. Creates a new MFCWindow.
+     * </p>
+     * 
+     * @param specification
+     *            specification of created GUI element
+     * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
      */
     public MFCWindow(MFCGUIElementSpec specification, MFCGUIElement parent) {
Index: trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/WindowTree.java
===================================================================
--- trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/WindowTree.java	(revision 832)
+++ trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/WindowTree.java	(revision 837)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.quest.plugin.mfc.guimodel;
 
@@ -12,5 +13,4 @@
 import de.ugoe.cs.quest.eventcore.guimodel.GUIModelException;
 import de.ugoe.cs.quest.eventcore.guimodel.IGUIElementFactory;
-
 
 /**
@@ -30,6 +30,6 @@
     /**
      * <p>
-     * Maintains a set of all the targets of all widgets that were at some point part of the
-     * window tree.
+     * Maintains a set of all the targets of all widgets that were at some point part of the window
+     * tree.
      * </p>
      */
@@ -38,6 +38,6 @@
     /**
      * <p>
-     * Map of all GUI element specifications that are part of the tree for efficient searching.
-     * The keys of the map are the hwnd's of the GUI elements.
+     * Map of all GUI element specifications that are part of the tree for efficient searching. The
+     * keys of the map are the hwnd's of the GUI elements.
      * </p>
      */
@@ -46,6 +46,6 @@
     /**
      * <p>
-     * Map of all children of GUI elements that are part of the tree. The keys of the map are
-     * the hwnd's of the parent GUI elements.
+     * Map of all children of GUI elements that are part of the tree. The keys of the map are the
+     * hwnd's of the parent GUI elements.
      * </p>
      */
@@ -54,6 +54,6 @@
     /**
      * <p>
-     * Map of all parents of GUI elements that are part of the tree. The keys of the map are
-     * the hwnd's of the child GUI elements.
+     * Map of all parents of GUI elements that are part of the tree. The keys of the map are the
+     * hwnd's of the child GUI elements.
      * </p>
      */
@@ -66,5 +66,5 @@
      */
     private GUIModel guiModel = new GUIModel();
-    
+
     /**
      * <p>
@@ -114,9 +114,9 @@
      *            class name of the window to be created
      */
-    public void add(long    parentHwnd,
-                    long    childHwnd,
-                    String  childWindowName,
-                    int     resourceId,
-                    String  className,
+    public void add(long parentHwnd,
+                    long childHwnd,
+                    String childWindowName,
+                    int resourceId,
+                    String className,
                     boolean isModal)
     {
@@ -128,12 +128,12 @@
             if (parent != null) {
                 List<MFCGUIElementSpec> otherChildren = childRelations.get(parentHwnd);
-                
+
                 if (otherChildren == null) {
                     otherChildren = new ArrayList<MFCGUIElementSpec>();
                     childRelations.put(parentHwnd, otherChildren);
                 }
-                
+
                 otherChildren.add(child);
-                
+
                 parentRelations.put(childHwnd, parent);
             }
@@ -145,6 +145,6 @@
     /**
      * <p>
-     * Searches the tree for a window with the specified hwnd and returns its {@link MFCGUIElementSpec}
-     * .
+     * Searches the tree for a window with the specified hwnd and returns its
+     * {@link MFCGUIElementSpec} .
      * </p>
      * 
@@ -157,19 +157,19 @@
         if (guiElement == null) {
             List<MFCGUIElementSpec> guiElementPath = new ArrayList<MFCGUIElementSpec>();
-            
+
             MFCGUIElementSpec child = guiElementSpecs.get(hwnd);
-            
+
             if (child == null) {
                 throw new RuntimeException("no GUI element found with id " + hwnd);
             }
-            
+
             while (child != null) {
                 guiElementPath.add(0, child);
                 child = parentRelations.get(child.getHwnd());
             }
-            
+
             try {
-                guiElement = (MFCGUIElement)
-                    guiModel.integratePath(guiElementPath, guiElementFactory);
+                guiElement =
+                    (MFCGUIElement) guiModel.integratePath(guiElementPath, guiElementFactory);
             }
             catch (GUIModelException e) {
@@ -183,9 +183,11 @@
     /**
      * <p>
-     * TODO: comment
-     * </p>
-     *
+     * Sets the name of a GUI element given its HWND.
+     * </p>
+     * 
      * @param hwnd
+     *            HWND of the GUI element
      * @param windowName
+     *            new name of the GUI element
      */
     public void setName(long hwnd, String windowName) {
@@ -201,5 +203,5 @@
         }
     }
-    
+
     /**
      * <p>
@@ -215,8 +217,8 @@
         MFCGUIElementSpec node = guiElementSpecs.remove(hwnd);
         int removedCounter = 1;
-        
+
         if (node != null) {
             List<MFCGUIElementSpec> nodesToBeRemoved = childRelations.remove(hwnd);
-            
+
             // remove all children and sub-children, if any
             if (nodesToBeRemoved != null) {
@@ -225,9 +227,9 @@
                     List<MFCGUIElementSpec> children =
                         childRelations.remove(nodeToBeRemoved.getHwnd());
-                    
+
                     if (children != null) {
                         nodesToBeRemoved.addAll(children);
                     }
-                    
+
                     guiElementSpecs.remove(nodeToBeRemoved.getHwnd());
                     parentRelations.remove(nodeToBeRemoved.getHwnd());
@@ -248,5 +250,5 @@
                         }
                     }
-                    
+
                     if (children.size() <= 0) {
                         childRelations.remove(parent.getHwnd());
