Changeset 1010


Ignore:
Timestamp:
12/11/12 19:06:51 (12 years ago)
Author:
fglaser
Message:
  • new method getUsageObserved() in IGUIElement, implemented in AbstractDefaultGUIElement. AbstractDefaultGUIElement now also

has markAsUsed() method, that sets internal boolean usageObserved to true.

  • JFCSimplifiedLogParser and MFCLogParser were updated and now mark GUI elements that have been targeted during a session as used.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/guimodel/MockGUIElement.java

    r1005 r1010  
    4848        } 
    4949 
     50        @Override 
     51        public boolean getUsageObserved() { 
     52                // TODO Auto-generated method stub 
     53                return false; 
     54        } 
     55 
    5056} 
  • trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/AbstractDefaultGUIElement.java

    r927 r1010  
    5858     */ 
    5959    private final IGUIElement parent; 
     60     
     61    /** 
     62     * <p> 
     63     * Boolean that indicates if a GUIElement was used during a session. 
     64     * </p> 
     65     */ 
     66    boolean usageObserved; 
    6067 
    6168    /** 
     
    7279        this.specification = specification; 
    7380        this.parent = parent; 
     81        this.usageObserved = false; 
    7482    } 
    7583 
     
    128136        return equalGUIElementManager.hashCode(this); 
    129137    } 
     138     
     139        @Override 
     140        public boolean getUsageObserved() { 
     141                return usageObserved; 
     142        } 
     143         
     144        /** 
     145         * <p> 
     146         * Marks a GUI element as used. 
     147         * </p>  
     148         */ 
     149        public void markAsUsed(){ 
     150                this.usageObserved = true; 
     151        } 
    130152 
    131153    /** 
  • trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/IGUIElement.java

    r927 r1010  
    2626 */ 
    2727public interface IGUIElement extends IEventTarget { 
     28        /** 
     29         * <p> 
     30         * Returns a boolean that indicates if GUIElement was used or not 
     31         * during a session 
     32         * </p> 
     33         * @return 
     34         */ 
     35        public boolean getUsageObserved(); 
    2836 
    2937    /** 
  • trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/JFCSimplifiedLogParser.java

    r1009 r1010  
    407407                     (currentGUIElement == null ? lastGUIElement : currentGUIElement)); 
    408408                event.setTimestamp(currentEventTimestamp); 
     409                JFCGUIElement currentEventTarget = (JFCGUIElement) event.getTarget(); 
     410                currentEventTarget.markAsUsed(); 
    409411                 
    410412                currentSequence.add(event); 
  • trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/MFCLogParser.java

    r1008 r1010  
    345345                    long hwnd = (Long) currentMessageParameters.get("window.hwnd"); 
    346346                    MFCGUIElement target = (MFCGUIElement) guiElementTree.find(hwnd); 
     347                    target.markAsUsed(); 
    347348                     
    348349                    WindowsMessage message = new WindowsMessage 
Note: See TracChangeset for help on using the changeset viewer.