Changeset 1819


Ignore:
Timestamp:
11/11/14 13:38:39 (10 years ago)
Author:
funger
Message:
  • add eventcore parts to handle touch events and type events to android-plugin
Location:
trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest
Files:
5 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/ANDROIDPlugin.java

    r1788 r1819  
    3030 */ 
    3131public class ANDROIDPlugin implements AutoQUESTPlugin { 
    32          
    33         /** 
     32 
     33    /** 
    3434     * <p> 
    3535     * The command packages of this plug-in. 
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/AndroidLogParser.java

    r1815 r1819  
    5252/** 
    5353 * <p> 
    54  * This class provides functionality to parse XML log files generated by the 
    55  * AndroidMonitor of AutoQUEST. The result of parsing a file is a collection of 
    56  * event sequences. 
     54 * This class provides functionality to parse XML log files generated by the AndroidMonitor of 
     55 * AutoQUEST. The result of parsing a file is a collection of event sequences. 
    5756 * </p> 
    5857 *  
     
    6261public class AndroidLogParser extends DefaultHandler { 
    6362 
    64         /* 
    65          * (non-Javadoc) 
    66          *  
    67          * int java.lang.Object.hashCode() is used in the Androidmonitor Long is 
    68          * used to internally handle and compare the number. e.g. 
    69          * currentGUIElementHash != null 
    70          */ 
    71         /** 
    72          * <p> 
    73          * Internal handle to the id of the event that is currently being parsed. 
    74          * </p> 
    75          */ 
    76         private String currentEventId = null; 
    77  
    78         /** 
    79          * <p> 
    80          * Internal handle to the parameters of the event currently being parsed. 
    81          * </p> 
    82          */ 
    83         private Map<String, String> currentEventParameters; 
    84  
    85         /** 
    86          * <p> 
    87          * Internal handle to the source of the event that is currently being 
    88          * parsed. 
    89          * </p> 
    90          */ 
    91         private Long currentEventSource; 
    92  
    93         /** 
    94          * <p> 
    95          * Internal handle to the timestamp of the event that is currently being 
    96          * parsed. 
    97          */ 
    98         private Long currentEventTimestamp = -1l; 
    99  
    100         /** 
    101          *  
    102          * <p> 
    103          * Internal handle to the hashcode of the GUI element, that is currently 
    104          * parsed. 
    105          * </p> 
    106          */ 
    107         private Long currentGUIElementHash = null; 
    108  
    109         /** 
    110          * <p> 
    111          * Internal handle to the parsed GUI structure, stored in a GUIElementTree 
    112          * </p> 
    113          */ 
    114         private GUIElementTree<Long> currentGUIElementTree; 
    115  
    116         /** 
    117          * <p> 
    118          * Internal handle to the specification currently parsed for a GUI element 
    119          * </p> 
    120          */ 
    121         private ANDROIDGUIElementSpec currentGUIElementSpec; 
    122  
    123         /** 
    124          *  
    125          * <p> 
    126          * Internal handle to the hashcode of the parent of the GUI element, that is 
    127          * currently parsed. 
    128          * </p> 
    129          */ 
    130         private Long currentParentHash; 
    131  
    132         /** 
    133          * <p> 
    134          * Internal handle to the event sequence that is currently being parsed. 
    135          * </p> 
    136          */ 
    137         private List<Event> currentSequence; 
    138          
    139         /** 
     63    /* 
     64     * (non-Javadoc) 
     65     *  
     66     * int java.lang.Object.hashCode() is used in the Androidmonitor Long is used to internally 
     67     * handle and compare the number. e.g. currentGUIElementHash != null 
     68     */ 
     69    /** 
     70     * <p> 
     71     * Internal handle to the id of the event that is currently being parsed. 
     72     * </p> 
     73     */ 
     74    private String currentEventId = null; 
     75 
     76    /** 
     77     * <p> 
     78     * Internal handle to the parameters of the event currently being parsed. 
     79     * </p> 
     80     */ 
     81    private Map<String, String> currentEventParameters; 
     82 
     83    /** 
     84     * <p> 
     85     * Internal handle to the source of the event that is currently being parsed. 
     86     * </p> 
     87     */ 
     88    private Long currentEventSource; 
     89 
     90    /** 
     91     * <p> 
     92     * Internal handle to the timestamp of the event that is currently being parsed. 
     93     */ 
     94    private Long currentEventTimestamp = -1l; 
     95 
     96    /** 
     97     *  
     98     * <p> 
     99     * Internal handle to the hashcode of the GUI element, that is currently parsed. 
     100     * </p> 
     101     */ 
     102    private Long currentGUIElementHash = null; 
     103 
     104    /** 
     105     * <p> 
     106     * Internal handle to the parsed GUI structure, stored in a GUIElementTree 
     107     * </p> 
     108     */ 
     109    private GUIElementTree<Long> currentGUIElementTree; 
     110 
     111    /** 
     112     * <p> 
     113     * Internal handle to the specification currently parsed for a GUI element 
     114     * </p> 
     115     */ 
     116    private ANDROIDGUIElementSpec currentGUIElementSpec; 
     117 
     118    /** 
     119     *  
     120     * <p> 
     121     * Internal handle to the hashcode of the parent of the GUI element, that is currently parsed. 
     122     * </p> 
     123     */ 
     124    private Long currentParentHash; 
     125 
     126    /** 
     127     * <p> 
     128     * Internal handle to the event sequence that is currently being parsed. 
     129     * </p> 
     130     */ 
     131    private List<Event> currentSequence; 
     132 
     133    /** 
    140134     * <p> 
    141135     * internal handle to the class ancestors 
    142136     * </p> 
    143137     */ 
    144     private List<String> currentTypeHierarchy;   
    145  
    146         /** 
    147          * <p> 
    148          * Map that holds events that had no registered target GUI element during 
    149          * parsing. Keys are the IDs of the unregistered targets. 
    150          * </p> 
    151          */ 
    152         // private Map<Long, List<Event>> eventsWithoutTargets; 
    153  
    154         /** 
    155          * <p> 
    156          * Collection of event sequences that is contained in the log file, which is 
    157          * parsed. 
    158          * </p> 
    159          */ 
    160         private Collection<List<Event>> sequences; 
    161  
    162         /** 
     138    private List<String> currentTypeHierarchy; 
     139 
     140    /** 
     141     * <p> 
     142     * Map that holds events that had no registered target GUI element during parsing. Keys are the 
     143     * IDs of the unregistered targets. 
     144     * </p> 
     145     */ 
     146    // private Map<Long, List<Event>> eventsWithoutTargets; 
     147 
     148    /** 
     149     * <p> 
     150     * Collection of event sequences that is contained in the log file, which is parsed. 
     151     * </p> 
     152     */ 
     153    private Collection<List<Event>> sequences; 
     154 
     155    /** 
    163156         *  
    164157         */ 
    165         private Boolean showSteps = false; 
    166          
    167         /** 
    168          * <p> 
    169          * Constructor. Creates a new AndroidLogParser. 
    170          * </p> 
    171          */ 
    172         public AndroidLogParser() { 
    173                 sequences = new LinkedList<List<Event>>(); 
    174                 currentSequence = null; 
    175         } 
    176  
    177         // TODO create a constructor which creates a new AndroidLogParser with a 
    178         // specific event filter. 
    179  
    180         /** 
    181          * <p> 
    182          * Parses a log file written by the JFCMonitor and creates a collection of 
    183          * event sequences. 
    184          * </p> 
    185          *  
    186          * @param filename 
    187          *            name and path of the log file 
    188          */ 
    189         public void parseFile(String filename) { 
    190                 if (filename == null) { 
    191                         throw new IllegalArgumentException("filename must not be null"); 
    192                 } 
    193  
    194                 parseFile(new File(filename)); 
    195         } 
    196  
    197         /** 
    198          * <p> 
    199          * Parses a log file written by the JFCMonitor and creates a collection of 
    200          * event sequences. 
    201          * </p> 
    202          *  
    203          * @param file 
    204          *            name and path of the log file 
    205          */ 
    206         public void parseFile(File file) { 
    207                 if (file == null) { 
    208                         throw new IllegalArgumentException("file must not be null"); 
    209                 } 
    210  
    211                 SAXParserFactory spf = SAXParserFactory.newInstance(); 
    212                 // set true to validate that the file is well defined 
    213                 spf.setValidating(true); 
    214  
    215                 SAXParser saxParser = null; 
    216                 InputSource inputSource = null; 
    217                 try { 
    218                         saxParser = spf.newSAXParser(); 
    219                         inputSource = new InputSource(new InputStreamReader( 
    220                                         new FileInputStream(file), "UTF-8")); 
    221                 } catch (UnsupportedEncodingException e) { 
    222                         Console.printerr("Error parsing file + " + file.getName()); 
    223                         Console.logException(e); 
    224                         return; 
    225                 } catch (ParserConfigurationException e) { 
    226                         Console.printerr("Error parsing file + " + file.getName()); 
    227                         Console.logException(e); 
    228                         return; 
    229                 } catch (SAXException e) { 
    230                         Console.printerr("Error parsing file + " + file.getName()); 
    231                         Console.logException(e); 
    232                         return; 
    233                 } catch (FileNotFoundException e) { 
    234                         Console.printerr("Error parsing file + " + file.getName()); 
    235                         Console.logException(e); 
    236                         return; 
    237                 } 
    238  
    239                 if (inputSource != null) { 
    240                         inputSource.setSystemId("file://" + file.getAbsolutePath()); 
    241                         try { 
    242                                 // called a second time to be sure that no error happens 
    243                                 if (saxParser == null) { 
    244                                         throw new RuntimeException("SAXParser creation failed"); 
    245                                 } 
    246                                 saxParser.parse(inputSource, this); 
    247                         } catch (SAXParseException e) { 
    248                                 Console.printerrln("Failure parsing file in line " 
    249                                                 + e.getLineNumber() + ", column " + e.getColumnNumber() 
    250                                                 + "."); 
    251                                 Console.logException(e); 
    252                                 return; 
    253                         } catch (SAXException e) { 
    254                                 Console.printerr("Error parsing file + " + file.getName()); 
    255                                 Console.logException(e); 
    256                                 return; 
    257                         } catch (IOException e) { 
    258                                 Console.printerr("Error parsing file + " + file.getName()); 
    259                                 Console.logException(e); 
    260                                 return; 
    261                         } 
    262                 } 
    263         } 
    264  
    265         /** 
    266          * <p> 
    267          * Returns the collection of event sequences that is obtained from parsing 
    268          * log files. 
    269          * </p> 
    270          *  
    271          * @return collection of event sequences 
    272          */ 
    273         public Collection<List<Event>> getSequences() { 
    274                 return sequences; 
    275         } 
    276  
    277         /** 
    278          * <p> 
    279          * Returns the GUI model that is obtained from parsing log files. 
    280          * </p> 
    281          *  
    282          * @return GUIModel 
    283          */ 
    284         public GUIModel getGuiModel() { 
    285                 return currentGUIElementTree.getGUIModel(); 
    286         } 
    287  
    288         /* 
    289          * (non-Javadoc) 
    290          *  
    291          * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, 
    292          * java.lang.String, java.lang.String, org.xml.sax.Attributes) 
    293          */ 
    294         public void startElement(String uri, String localName, String qName, 
    295                         Attributes atts) throws SAXException { 
    296                 showSteps("start element: " + qName, true); 
    297                 if (qName.equals("sessions")) { 
    298                         currentSequence = new LinkedList<Event>(); 
    299                         if (currentGUIElementTree == null) { 
    300                                 currentGUIElementTree = new GUIElementTree<Long>(); 
    301                         } 
    302  
    303                 } 
    304  
    305                 if (qName.equals("component")) { 
    306                         currentGUIElementHash = Long.parseLong(atts.getValue("hash")); 
    307                         currentGUIElementSpec = new ANDROIDGUIElementSpec(); 
    308                         currentGUIElementSpec.setHashCode((int) currentGUIElementHash 
    309                                         .longValue()); 
    310  
    311                 } else if (qName.equals("event")) { 
    312                         currentEventId = atts.getValue("id"); 
    313                         currentEventParameters = new HashMap<String, String>(); 
    314  
    315                 } else if (qName.equals("param")) { 
    316                         if (currentGUIElementHash != null) { 
    317                                 if ("class".equals(atts.getValue("name"))) { 
    318                                         currentGUIElementSpec.setType(atts.getValue("value")); 
    319                                 } else if ("path".equals(atts.getValue("name"))) { 
    320                                         currentGUIElementSpec.setPath(atts.getValue("value")); 
    321                                 } else if ("id".equals(atts.getValue("name"))) { 
    322                                         currentGUIElementSpec.setIndex(Integer.parseInt(atts 
    323                                                         .getValue("value"))); 
    324                                 } else if ("parent".equals(atts.getValue("name"))) { 
    325                                         currentParentHash = Long.parseLong(atts.getValue("value")); 
    326                                 } 
    327                         } else if (currentEventId != null) { 
    328                                 if ("source".equals(atts.getValue("name"))) { 
    329                                         currentEventSource = Long.parseLong(atts.getValue("value")); 
    330                                 } 
    331                                 if ("timestamp".equals(atts.getValue("name"))) { 
    332                                         currentEventTimestamp = Long.parseLong(atts 
    333                                                         .getValue("value")); 
    334                                 } 
    335                                 currentEventParameters.put(atts.getValue("name"), 
    336                                                 atts.getValue("value")); 
    337                         } 
    338                 } 
    339                 else if (qName.equals("ancestor")) { 
     158    private Boolean showSteps = false; 
     159 
     160    /** 
     161     * <p> 
     162     * Constructor. Creates a new AndroidLogParser. 
     163     * </p> 
     164     */ 
     165    public AndroidLogParser() { 
     166        sequences = new LinkedList<List<Event>>(); 
     167        currentSequence = null; 
     168    } 
     169 
     170    // TODO create a constructor which creates a new AndroidLogParser with a 
     171    // specific event filter. 
     172 
     173    /** 
     174     * <p> 
     175     * Parses a log file written by the JFCMonitor and creates a collection of event sequences. 
     176     * </p> 
     177     *  
     178     * @param filename 
     179     *            name and path of the log file 
     180     */ 
     181    public void parseFile(String filename) { 
     182        if (filename == null) { 
     183            throw new IllegalArgumentException("filename must not be null"); 
     184        } 
     185 
     186        parseFile(new File(filename)); 
     187    } 
     188 
     189    /** 
     190     * <p> 
     191     * Parses a log file written by the JFCMonitor and creates a collection of event sequences. 
     192     * </p> 
     193     *  
     194     * @param file 
     195     *            name and path of the log file 
     196     */ 
     197    public void parseFile(File file) { 
     198        if (file == null) { 
     199            throw new IllegalArgumentException("file must not be null"); 
     200        } 
     201 
     202        SAXParserFactory spf = SAXParserFactory.newInstance(); 
     203        // set true to validate that the file is well defined 
     204        spf.setValidating(true); 
     205 
     206        SAXParser saxParser = null; 
     207        InputSource inputSource = null; 
     208        try { 
     209            saxParser = spf.newSAXParser(); 
     210            inputSource = 
     211                new InputSource(new InputStreamReader(new FileInputStream(file), "UTF-8")); 
     212        } 
     213        catch (UnsupportedEncodingException e) { 
     214            Console.printerr("Error parsing file + " + file.getName()); 
     215            Console.logException(e); 
     216            return; 
     217        } 
     218        catch (ParserConfigurationException e) { 
     219            Console.printerr("Error parsing file + " + file.getName()); 
     220            Console.logException(e); 
     221            return; 
     222        } 
     223        catch (SAXException e) { 
     224            Console.printerr("Error parsing file + " + file.getName()); 
     225            Console.logException(e); 
     226            return; 
     227        } 
     228        catch (FileNotFoundException e) { 
     229            Console.printerr("Error parsing file + " + file.getName()); 
     230            Console.logException(e); 
     231            return; 
     232        } 
     233 
     234        if (inputSource != null) { 
     235            inputSource.setSystemId("file://" + file.getAbsolutePath()); 
     236            try { 
     237                // called a second time to be sure that no error happens 
     238                if (saxParser == null) { 
     239                    throw new RuntimeException("SAXParser creation failed"); 
     240                } 
     241                saxParser.parse(inputSource, this); 
     242            } 
     243            catch (SAXParseException e) { 
     244                Console.printerrln("Failure parsing file in line " + e.getLineNumber() + 
     245                    ", column " + e.getColumnNumber() + "."); 
     246                Console.logException(e); 
     247                return; 
     248            } 
     249            catch (SAXException e) { 
     250                Console.printerr("Error parsing file + " + file.getName()); 
     251                Console.logException(e); 
     252                return; 
     253            } 
     254            catch (IOException e) { 
     255                Console.printerr("Error parsing file + " + file.getName()); 
     256                Console.logException(e); 
     257                return; 
     258            } 
     259        } 
     260    } 
     261 
     262    /** 
     263     * <p> 
     264     * Returns the collection of event sequences that is obtained from parsing log files. 
     265     * </p> 
     266     *  
     267     * @return collection of event sequences 
     268     */ 
     269    public Collection<List<Event>> getSequences() { 
     270        return sequences; 
     271    } 
     272 
     273    /** 
     274     * <p> 
     275     * Returns the GUI model that is obtained from parsing log files. 
     276     * </p> 
     277     *  
     278     * @return GUIModel 
     279     */ 
     280    public GUIModel getGuiModel() { 
     281        return currentGUIElementTree.getGUIModel(); 
     282    } 
     283 
     284    /* 
     285     * (non-Javadoc) 
     286     *  
     287     * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, 
     288     * java.lang.String, org.xml.sax.Attributes) 
     289     */ 
     290    public void startElement(String uri, String localName, String qName, Attributes atts) 
     291        throws SAXException 
     292    { 
     293        showSteps("start element: " + qName, true); 
     294        if (qName.equals("sessions")) { 
     295            currentSequence = new LinkedList<Event>(); 
     296            if (currentGUIElementTree == null) { 
     297                currentGUIElementTree = new GUIElementTree<Long>(); 
     298            } 
     299 
     300        } 
     301 
     302        if (qName.equals("component")) { 
     303            currentGUIElementHash = Long.parseLong(atts.getValue("hash")); 
     304            currentGUIElementSpec = new ANDROIDGUIElementSpec(); 
     305            currentGUIElementSpec.setHashCode((int) currentGUIElementHash.longValue()); 
     306 
     307        } 
     308        else if (qName.equals("event")) { 
     309            currentEventId = atts.getValue("id"); 
     310            currentEventParameters = new HashMap<String, String>(); 
     311 
     312        } 
     313        else if (qName.equals("param")) { 
     314            if (currentGUIElementHash != null) { 
     315                if ("class".equals(atts.getValue("name"))) { 
     316                    currentGUIElementSpec.setType(atts.getValue("value")); 
     317                } 
     318                else if ("path".equals(atts.getValue("name"))) { 
     319                    currentGUIElementSpec.setPath(atts.getValue("value")); 
     320                } 
     321                else if ("id".equals(atts.getValue("name"))) { 
     322                    currentGUIElementSpec.setIndex(Integer.parseInt(atts.getValue("value"))); 
     323                } 
     324                else if ("parent".equals(atts.getValue("name"))) { 
     325                    currentParentHash = Long.parseLong(atts.getValue("value")); 
     326                } 
     327            } 
     328            else if (currentEventId != null) { 
     329                if ("source".equals(atts.getValue("name"))) { 
     330                    currentEventSource = Long.parseLong(atts.getValue("value")); 
     331                } 
     332                if ("timestamp".equals(atts.getValue("name"))) { 
     333                    currentEventTimestamp = Long.parseLong(atts.getValue("value")); 
     334                } 
     335                currentEventParameters.put(atts.getValue("name"), atts.getValue("value")); 
     336            } 
     337        } 
     338        else if (qName.equals("ancestor")) { 
    340339            currentTypeHierarchy.add(atts.getValue("name")); 
    341340        } 
     
    343342            currentTypeHierarchy = new LinkedList<String>(); 
    344343        } 
    345         } 
    346  
    347         /* 
    348          * (non-Javadoc) 
    349          *  
    350          * @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String, 
    351          * java.lang.String, java.lang.String) 
    352          */ 
    353         @Override 
    354         public void endElement(String uri, String localName, String qName) 
    355                         throws SAXException { 
    356  
    357                 showSteps("end element: " + qName, true); 
    358  
    359                 if (qName.equals("sessions")) { 
    360                         if (currentSequence != null) { 
    361                                 sequences.add(currentSequence); 
    362                         } 
    363                 } 
    364                 else if (qName.equals("ancestors")) { 
     344    } 
     345 
     346    /* 
     347     * (non-Javadoc) 
     348     *  
     349     * @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String, java.lang.String, 
     350     * java.lang.String) 
     351     */ 
     352    @Override 
     353    public void endElement(String uri, String localName, String qName) throws SAXException { 
     354 
     355        showSteps("end element: " + qName, true); 
     356 
     357        if (qName.equals("sessions")) { 
     358            if (currentSequence != null) { 
     359                sequences.add(currentSequence); 
     360            } 
     361        } 
     362        else if (qName.equals("ancestors")) { 
    365363            currentGUIElementSpec.setTypeHierarchy(currentTypeHierarchy); 
    366364        } 
    367                 else if (qName.equals("component") && currentGUIElementHash != null) { 
    368                         try { 
    369                                 currentGUIElementTree.add(currentGUIElementHash, 
    370                                                 currentParentHash, currentGUIElementSpec); 
    371                         } catch (GUIModelException e) { 
    372                                 throw new SAXException( 
    373                                                 "could not handle GUI element with hash " 
    374                                                                 + currentGUIElementHash + ": " + e.getMessage(), 
    375                                                 e); 
    376                         } 
    377                         currentGUIElementHash = null; 
    378                         currentParentHash = null; 
    379                         currentTypeHierarchy = null; 
    380                 }  
    381                 else if (currentEventId != null && qName.equals("event")) { 
    382  
    383                         IGUIElement currentGUIElement; 
    384                         currentGUIElement = currentGUIElementTree.find(currentEventSource); 
    385                         Event event; 
    386  
    387                         // up to now only onClick events are implemented and each 
    388                         // onclick event is processed as a mouse click 
    389                         if (currentGUIElement == null) { 
    390  
    391                         } else { 
    392  
    393                                 event = new Event(instantiateInteraction(currentEventId, 
    394                                                 currentEventParameters), currentGUIElement); 
    395                                 ANDROIDGUIElement currentEventTarget = (ANDROIDGUIElement) event 
    396                                                 .getTarget(); 
    397                                 currentEventTarget.markUsed(); 
    398                                 event.setTimestamp(currentEventTimestamp); 
    399                                 currentSequence.add(event); 
    400                         } 
    401                         currentEventParameters = null; 
    402                         currentEventId = null; 
    403                         currentEventTimestamp = -1l; 
    404                 } 
    405         } 
    406  
    407         /** 
    408          * <p> 
    409          * depending on the event id and the event parameters, this method 
    410          * instantiates the concrete interaction, that took place, i.e. the event 
    411          * type 
    412          * </p> 
    413          *  
    414          * @param eventId 
    415          *            the id of the event 
    416          * @param eventParameters 
    417          *            the parameters provided for the event 
    418          *  
    419          * @return as described 
    420          *  
    421          * @throws SAXException 
    422          *             thrown if the provided event id is unknown 
    423          */ 
    424         private IInteraction instantiateInteraction(String event, 
    425                         Map<String, String> eventParameters) throws SAXException { 
    426  
    427                 switch (event) { 
    428                 case "onClick": 
    429                          
    430                         float x = Float.parseFloat(currentEventParameters.get("X")); 
    431                         float y = Float.parseFloat(currentEventParameters.get("Y")); 
    432                          
    433                         return new TouchSingle(x,y); 
    434                  
    435                 case "text": 
    436                         return new CharacterTyped(currentEventParameters.get("message")); 
    437                          
    438                 default: 
    439                         throw new SAXException("unhandled event id " + event); 
    440                 } 
    441  
    442         } 
    443  
    444         private void showSteps(String message, Boolean ln) { 
    445                 if (showSteps) { 
    446                         if (ln) { 
    447                                 Console.traceln(Level.INFO, message); 
    448                         } else { 
    449                                 Console.trace(Level.INFO, message); 
    450                         } 
    451  
    452                 } 
    453         } 
    454  
    455         public void setShowSteps(Boolean showSteps) { 
    456                 this.showSteps = showSteps; 
    457         } 
     365        else if (qName.equals("component") && currentGUIElementHash != null) { 
     366            try { 
     367                currentGUIElementTree.add(currentGUIElementHash, currentParentHash, 
     368                                          currentGUIElementSpec); 
     369            } 
     370            catch (GUIModelException e) { 
     371                throw new SAXException("could not handle GUI element with hash " + 
     372                    currentGUIElementHash + ": " + e.getMessage(), e); 
     373            } 
     374            currentGUIElementHash = null; 
     375            currentParentHash = null; 
     376            currentTypeHierarchy = null; 
     377        } 
     378        else if (currentEventId != null && qName.equals("event")) { 
     379 
     380            IGUIElement currentGUIElement; 
     381            currentGUIElement = currentGUIElementTree.find(currentEventSource); 
     382            Event event; 
     383 
     384            // up to now only onClick events are implemented and each 
     385            // onclick event is processed as a mouse click 
     386            if (currentGUIElement == null) { 
     387 
     388            } 
     389            else { 
     390 
     391                event = 
     392                    new Event(instantiateInteraction(currentEventId, currentEventParameters), 
     393                              currentGUIElement); 
     394                ANDROIDGUIElement currentEventTarget = (ANDROIDGUIElement) event.getTarget(); 
     395                currentEventTarget.markUsed(); 
     396                event.setTimestamp(currentEventTimestamp); 
     397                currentSequence.add(event); 
     398            } 
     399            currentEventParameters = null; 
     400            currentEventId = null; 
     401            currentEventTimestamp = -1l; 
     402        } 
     403    } 
     404 
     405    /** 
     406     * <p> 
     407     * depending on the event id and the event parameters, this method instantiates the concrete 
     408     * interaction, that took place, i.e. the event type 
     409     * </p> 
     410     *  
     411     * @param eventId 
     412     *            the id of the event 
     413     * @param eventParameters 
     414     *            the parameters provided for the event 
     415     *  
     416     * @return as described 
     417     *  
     418     * @throws SAXException 
     419     *             thrown if the provided event id is unknown 
     420     */ 
     421    private IInteraction instantiateInteraction(String event, Map<String, String> eventParameters) 
     422        throws SAXException 
     423    { 
     424 
     425        switch (event) 
     426        { 
     427            case "onClick": 
     428 
     429                float x = Float.parseFloat(currentEventParameters.get("X")); 
     430                float y = Float.parseFloat(currentEventParameters.get("Y")); 
     431 
     432                return new TouchSingle(x, y); 
     433 
     434            case "text": 
     435                return new CharacterTyped(currentEventParameters.get("message")); 
     436 
     437            default: 
     438                throw new SAXException("unhandled event id " + event); 
     439        } 
     440 
     441    } 
     442 
     443    private void showSteps(String message, Boolean ln) { 
     444        if (showSteps) { 
     445            if (ln) { 
     446                Console.traceln(Level.INFO, message); 
     447            } 
     448            else { 
     449                Console.trace(Level.INFO, message); 
     450            } 
     451 
     452        } 
     453    } 
     454 
     455    public void setShowSteps(Boolean showSteps) { 
     456        this.showSteps = showSteps; 
     457    } 
    458458 
    459459} 
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/commands/CMDparseAndroid.java

    r1783 r1819  
    1717import java.util.Collection; 
    1818import java.util.List; 
     19import java.util.logging.Level; 
    1920 
    2021import de.ugoe.cs.autoquest.CommandHelpers; 
     
    3637public class CMDparseAndroid implements Command { 
    3738 
    38         /* 
     39    /* 
    3940     * (non-Javadoc) 
    4041     *  
    4142     * @see de.ugoe.cs.util.console.Command#run(java.util.List) 
    4243     */ 
    43         @Override 
    44         public void run(List<Object> parameters) { 
    45                 String filename; 
    46                 String sequencesName = "sequences"; 
     44    @Override 
     45    public void run(List<Object> parameters) { 
     46        String filename; 
     47        String sequencesName = "sequences"; 
    4748 
    48                 try { 
    49                         filename = (String) parameters.get(0); 
    50                         if (parameters.size() >= 2) { 
    51                                 sequencesName = (String) parameters.get(1); 
    52                         } 
    53                 } catch (Exception e) { 
    54                         throw new IllegalArgumentException(); 
    55                 } 
     49        try { 
     50            filename = (String) parameters.get(0); 
     51            if (parameters.size() >= 2) { 
     52                sequencesName = (String) parameters.get(1); 
     53            } 
     54        } 
     55        catch (Exception e) { 
     56            throw new IllegalArgumentException(); 
     57        } 
    5658 
    57                 AndroidLogParser parser = new AndroidLogParser(); 
     59        AndroidLogParser parser = new AndroidLogParser(); 
    5860 
    59                 try { 
    60                         parser.parseFile(filename); 
    61                 } catch (Exception e) { 
    62                         Console.printerrln("Could not parse " + filename + ": " 
    63                                         + e.getMessage()); 
    64                         return; 
    65                 } 
     61        try { 
     62            parser.parseFile(filename); 
     63        } 
     64        catch (Exception e) { 
     65            Console.printerrln("Could not parse " + filename + ": " + e.getMessage()); 
     66            return; 
     67        } 
    6668 
    67                 Collection<List<Event>> sequences = parser.getSequences(); 
     69        Collection<List<Event>> sequences = parser.getSequences(); 
    6870 
    69                 GUIModel targets = parser.getGuiModel(); 
     71        GUIModel targets = parser.getGuiModel(); 
    7072 
    71                 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 
    72                         CommandHelpers.dataOverwritten(sequencesName); 
    73                 } 
     73        if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 
     74            CommandHelpers.dataOverwritten(sequencesName); 
     75        } 
    7476 
    75                 if (GlobalDataContainer.getInstance().addData( 
    76                                 sequencesName + "_targets", targets)) { 
    77                         CommandHelpers.dataOverwritten(sequencesName + "_targets"); 
    78                 } 
    79         } 
     77        if (GlobalDataContainer.getInstance().addData(sequencesName + "_targets", targets)) { 
     78            CommandHelpers.dataOverwritten(sequencesName + "_targets"); 
     79        } 
     80        Console.traceln(Level.INFO, "parse done"); 
     81    } 
    8082 
    81         /* 
     83    /* 
    8284     * (non-Javadoc) 
    8385     *  
    8486     * @see de.ugoe.cs.util.console.Command#help() 
    8587     */ 
    86         @Override 
    87         public String help() { 
    88                  
    89                 return "parseAndroid <filename> {<sequencesName>}"; 
    90         } 
     88    @Override 
     89    public String help() { 
     90 
     91        return "parseAndroid <filename> {<sequencesName>}"; 
     92    } 
    9193 
    9294} 
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/commands/CMDparseDirAndroid.java

    r1783 r1819  
    3131 * <p> 
    3232 * Command that tries to parse all files in a folder as if they were log files generated by the 
    33  * Androidmonitor. The result is one set of sequences for all files (not one set of sequences for each 
    34  * file!). 
     33 * Androidmonitor. The result is one set of sequences for all files (not one set of sequences for 
     34 * each file!). 
    3535 * </p> 
    3636 *  
     
    3838 * @version 1.0 
    3939 */ 
    40 public class CMDparseDirAndroid implements Command{ 
     40public class CMDparseDirAndroid implements Command { 
    4141 
    42         /* 
     42    /* 
    4343     * (non-Javadoc) 
    4444     *  
    4545     * @see de.ugoe.cs.util.console.Command#run(java.util.List) 
    4646     */ 
    47         @Override 
    48         public void run(List<Object> parameters) { 
    49                 String path; 
     47    @Override 
     48    public void run(List<Object> parameters) { 
     49        String path; 
    5050        String sequencesName = "sequences"; 
    5151 
     
    5959            throw new IllegalArgumentException(); 
    6060        } 
    61          
     61 
    6262        File folder = new File(path); 
    6363        if (!folder.isDirectory()) { 
     
    6565            return; 
    6666        } 
    67          
     67 
    6868        AndroidLogParser parser = new AndroidLogParser(); 
    69          
     69 
    7070        String absolutPath = folder.getAbsolutePath(); 
    7171        for (String filename : folder.list()) { 
     
    8080            } 
    8181        } 
    82          
     82 
    8383        Collection<List<Event>> sequences = parser.getSequences(); 
    84          
     84 
    8585        GUIModel targets = parser.getGuiModel(); 
    8686 
     
    8888            CommandHelpers.dataOverwritten(sequencesName); 
    8989        } 
    90          
     90 
    9191        if (GlobalDataContainer.getInstance().addData(sequencesName + "_targets", targets)) { 
    9292            CommandHelpers.dataOverwritten(sequencesName + "_targets"); 
    9393        } 
    94                  
    95         } 
    9694 
    97         /* 
     95    } 
     96 
     97    /* 
    9898     * (non-Javadoc) 
    9999     *  
    100100     * @see de.ugoe.cs.util.console.Command#help() 
    101101     */ 
    102         @Override 
    103         public String help() { 
    104                 return "parseDirAndroid <directory> {<sequencesName>}"; 
    105         } 
     102    @Override 
     103    public String help() { 
     104        return "parseDirAndroid <directory> {<sequencesName>}"; 
     105    } 
    106106 
    107107} 
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDButton.java

    r1813 r1819  
    1212//   See the License for the specific language governing permissions and 
    1313//   limitations under the License. 
     14 
    1415package de.ugoe.cs.autoquest.plugin.android.guimodel; 
    1516 
     
    2425 * @author Florian Unger 
    2526 */ 
    26 public class ANDROIDButton extends ANDROIDGUIElement implements IButton{ 
    27         /** 
     27public class ANDROIDButton extends ANDROIDGUIElement implements IButton { 
     28    /** 
    2829     * <p> 
    2930     * Id for object serialization. 
     
    3132     */ 
    3233    private static final long serialVersionUID = 1L; 
    33      
     34 
    3435    /** 
    3536     * <p> 
     
    4344     *            window 
    4445     */ 
    45     public ANDROIDButton(ANDROIDGUIElementSpec specification, 
    46                         ANDROIDGUIElement parent) { 
    47                 super(specification, parent); 
    48                 // TODO Auto-generated constructor stub 
    49         } 
    50      
     46    public ANDROIDButton(ANDROIDGUIElementSpec specification, ANDROIDGUIElement parent) { 
     47        super(specification, parent); 
     48        // TODO Auto-generated constructor stub 
     49    } 
     50 
    5151    /* 
    5252     * (non-Javadoc) 
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDFrame.java

    r1813 r1819  
    1212//   See the License for the specific language governing permissions and 
    1313//   limitations under the License. 
     14 
    1415package de.ugoe.cs.autoquest.plugin.android.guimodel; 
    1516 
    1617import de.ugoe.cs.autoquest.eventcore.guimodel.IFrame; 
     18 
    1719/** 
    1820 * <p> 
     
    2325 * @author Florian Unger 
    2426 */ 
    25 public class ANDROIDFrame extends ANDROIDGUIElement implements IFrame{ 
    26         /** 
     27public class ANDROIDFrame extends ANDROIDGUIElement implements IFrame { 
     28    /** 
    2729     * <p> 
    2830     * Id for object serialization. 
     
    3032     */ 
    3133    private static final long serialVersionUID = 1L; 
    32          
     34 
    3335    /** 
    3436     * <p> 
     
    4244     *            window 
    4345     */ 
    44         public ANDROIDFrame(ANDROIDGUIElementSpec specification, 
    45                         ANDROIDGUIElement parent) { 
    46                 super(specification, parent); 
    47         } 
     46    public ANDROIDFrame(ANDROIDGUIElementSpec specification, ANDROIDGUIElement parent) { 
     47        super(specification, parent); 
     48    } 
    4849 
    49         /* 
     50    /* 
    5051     * (non-Javadoc) 
    5152     *  
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDGUIElement.java

    r1790 r1819  
    1212//   See the License for the specific language governing permissions and 
    1313//   limitations under the License. 
     14 
    1415package de.ugoe.cs.autoquest.plugin.android.guimodel; 
    1516 
     
    2627 * @author Florian Unger 
    2728 */ 
    28 public class ANDROIDGUIElement extends AbstractDefaultGUIElement{ 
     29public class ANDROIDGUIElement extends AbstractDefaultGUIElement { 
    2930 
    30         /** 
     31    /** 
    3132     * <p> 
    3233     * Id for object serialization. 
     
    3435     */ 
    3536    private static final long serialVersionUID = 1L; 
    36      
     37 
    3738    /** 
    3839     * <p> 
     
    4142     */ 
    4243    private ANDROIDGUIElementSpec specification; 
    43      
     44 
    4445    /** 
    4546     * <p> 
     
    5455     */ 
    5556    public ANDROIDGUIElement(ANDROIDGUIElementSpec specification, ANDROIDGUIElement parent) { 
    56                 super(specification, parent); 
    57                 this.specification = specification; 
    58         } 
    59          
     57        super(specification, parent); 
     58        this.specification = specification; 
     59    } 
     60 
    6061    /* 
    6162     * (non-Javadoc) 
     
    6667     */ 
    6768    @Override 
    68         public void updateSpecification(IGUIElementSpec furtherSpec) { 
    69                 //nothing do do here up to now.          
    70         } 
     69    public void updateSpecification(IGUIElementSpec furtherSpec) { 
     70        // nothing do do here up to now. 
     71    } 
    7172 
    7273    /* 
     
    7576     * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) 
    7677     */ 
    77         @Override 
    78         public double getDistanceTo(IGUIElement otherElement) { 
    79                 throw new UnsupportedOperationException("not implemented yet"); 
    80         } 
    81          
    82         /** 
     78    @Override 
     79    public double getDistanceTo(IGUIElement otherElement) { 
     80        throw new UnsupportedOperationException("not implemented yet"); 
     81    } 
     82 
     83    /** 
    8384     * <p> 
    8485     * Returns the type of the GUI element, i.e., the name of its Java class. 
     
    9091        return specification.getType(); 
    9192    } 
    92      
    93      
    9493 
    95         /* 
     94    /* 
    9695     * (non-Javadoc) 
    9796     *  
    9897     * @see de.ugoe.cs.autoquest.eventcore.IEventTarget#getPlatform() 
    9998     */ 
    100         @Override 
    101         public String getPlatform() { 
    102                 return "Android"; 
    103         } 
     99    @Override 
     100    public String getPlatform() { 
     101        return "Android"; 
     102    } 
    104103 
    105         /* 
     104    /* 
    106105     * (non-Javadoc) 
    107106     *  
    108107     * @see java.lang.Object#toString() 
    109108     */ 
    110         @Override 
    111         public String getStringIdentifier() { 
    112                 String str = this.toString(); 
     109    @Override 
     110    public String getStringIdentifier() { 
     111        String str = this.toString(); 
    113112        if (getParent() != null) { 
    114113            return str + "<-" + getParent().getStringIdentifier(); 
    115114        } 
    116115        return str; 
    117         } 
    118          
    119         /** 
     116    } 
     117 
     118    /** 
    120119     * <p> 
    121120     * A short string describing the GUI element, e.g., Button, Canvas, or ScrollBar. 
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDGUIElementSpec.java

    r1815 r1819  
    1212//   See the License for the specific language governing permissions and 
    1313//   limitations under the License. 
     14 
    1415package de.ugoe.cs.autoquest.plugin.android.guimodel; 
    1516 
     
    2021/** 
    2122 * <p> 
    22  * Implements the specification of {@link IGUIElement} for 
    23  * {@link ANDROIDGUIElement}s. 
     23 * Implements the specification of {@link IGUIElement} for {@link ANDROIDGUIElement}s. 
    2424 * </p> 
    2525 *  
     
    2929public class ANDROIDGUIElementSpec implements IGUIElementSpec { 
    3030 
    31         /** 
    32         * <p> 
    33         * default serial version UID 
    34         * </p> 
    35         */ 
    36         private static final long serialVersionUID = 1L; 
     31    /** 
     32    * <p> 
     33    * default serial version UID 
     34    * </p> 
     35    */ 
     36    private static final long serialVersionUID = 1L; 
    3737 
    38         /* 
    39          * (non-Javadoc) see 
    40          * de.ugoe.cs.autoquest.androidmonitor.AndroidmonitorLogFile#logComponent() 
    41          */ 
    42         /** 
    43          * <p> 
    44          * Hash code of the GUI element. Used as unique identifier during parsing a 
    45          * log file. Note that it is possible that the hash code of an element 
    46          * changes over several log files even if they come from the same target. 
    47          * </p> 
    48          */ 
    49         private int hashCode; 
     38    /* 
     39     * (non-Javadoc) see de.ugoe.cs.autoquest.androidmonitor.AndroidmonitorLogFile#logComponent() 
     40     */ 
     41    /** 
     42     * <p> 
     43     * Hash code of the GUI element. Used as unique identifier during parsing a log file. Note that 
     44     * it is possible that the hash code of an element changes over several log files even if they 
     45     * come from the same target. 
     46     * </p> 
     47     */ 
     48    private int hashCode; 
    5049 
    51         /** 
    52          * <p> 
    53          * Path to an element in an activity. e.g. a path of a button could look 
    54          * like MainActivity/DecorView/ActionBarOverlayLayout/FrameLayout/ 
    55          * RelativeLayout/Button 
    56          * </p> 
    57          */ 
    58         private String path; 
    59          
    60         /** 
    61          * <p> 
    62          * id of the object as it is returned by view.getId() 
    63          * </p> 
    64          */ 
    65         private int index; 
     50    /** 
     51     * <p> 
     52     * Path to an element in an activity. e.g. a path of a button could look like 
     53     * MainActivity/DecorView/ActionBarOverlayLayout/FrameLayout/ RelativeLayout/Button 
     54     * </p> 
     55     */ 
     56    private String path; 
    6657 
    67         /** 
    68          * <p> 
    69          * the type of GUI element represented by this specification, which is 
    70          * usually the java class of the android GUI element 
    71          * </p> 
    72          */ 
    73         private String type; 
    74          
    75         /** 
     58    /** 
     59     * <p> 
     60     * id of the object as it is returned by view.getId() 
     61     * </p> 
     62     */ 
     63    private int index; 
     64 
     65    /** 
     66     * <p> 
     67     * the type of GUI element represented by this specification, which is usually the java class of 
     68     * the android GUI element 
     69     * </p> 
     70     */ 
     71    private String type; 
     72 
     73    /** 
    7674     * <p> 
    7775     * Type hierarchy of the class itself 
     
    8078    private List<String> typeHierarchy = null; 
    8179 
    82         /* 
    83         * (non-Javadoc) 
    84         *  
    85         * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getType() 
    86         */ 
    87         @Override 
    88         public String getType() { 
    89                 return type; 
    90         } 
     80    /* 
     81    * (non-Javadoc) 
     82    *  
     83    * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getType() 
     84    */ 
     85    @Override 
     86    public String getType() { 
     87        return type; 
     88    } 
    9189 
    92         /* 
    93          * (non-Javadoc) 
    94          *  
    95          * @see 
    96          * de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getTypeHierarchy 
    97          * () 
    98          */ 
    99         @Override 
    100         public String[] getTypeHierarchy() { 
    101                 if (typeHierarchy == null) { 
     90    /* 
     91     * (non-Javadoc) 
     92     *  
     93     * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getTypeHierarchy () 
     94     */ 
     95    @Override 
     96    public String[] getTypeHierarchy() { 
     97        if (typeHierarchy == null) { 
    10298            return new String[] 
    10399                { (getType()) }; 
     
    105101        else 
    106102            return typeHierarchy.toArray(new String[typeHierarchy.size()]); 
    107         } 
     103    } 
    108104 
    109         @Override 
    110         public boolean getSimilarity(IGUIElementSpec other) { 
    111                 if (this == other) { 
    112                         return true; 
    113                 } 
     105    @Override 
     106    public boolean getSimilarity(IGUIElementSpec other) { 
     107        if (this == other) { 
     108            return true; 
     109        } 
    114110 
    115                 if (!(other instanceof ANDROIDGUIElementSpec)) { 
    116                         return false; 
    117                 } 
     111        if (!(other instanceof ANDROIDGUIElementSpec)) { 
     112            return false; 
     113        } 
    118114 
    119                 // Check wheter view.id() keeps the same even if something in the 
    120                 // structure changes. The hash in the JFCMonitor seems to be unique at 
    121                 // all. In the Androidmonitore the hash of an element changes even from 
    122                 // one start of the activity to another. 
    123                 /* 
    124                 * Maybe some other comparisons will be necessary in the future. 
    125                 */ 
     115        // Check wheter view.id() keeps the same even if something in the 
     116        // structure changes. The hash in the JFCMonitor seems to be unique at 
     117        // all. In the Androidmonitore the hash of an element changes even from 
     118        // one start of the activity to another. 
     119        /* 
     120        * Maybe some other comparisons will be necessary in the future. 
     121        */ 
    126122 
    127                 return false; 
    128         } 
     123        return false; 
     124    } 
    129125 
    130         /* 
    131         * (non-Javadoc) 
    132         *  
    133         * @see java.lang.Object#hashCode() 
    134         */ 
    135         @Override 
    136         public int hashCode() { 
    137                 return hashCode; 
    138         } 
     126    /* 
     127    * (non-Javadoc) 
     128    *  
     129    * @see java.lang.Object#hashCode() 
     130    */ 
     131    @Override 
     132    public int hashCode() { 
     133        return hashCode; 
     134    } 
    139135 
    140         /** 
    141          * <p> 
    142          * Returns the path associated with the specified GUI element. 
    143          * </p> 
    144          * @return the path to an element 
    145          */ 
    146         public String getPath() { 
    147                 return path; 
    148         } 
     136    /** 
     137     * <p> 
     138     * Returns the path associated with the specified GUI element. 
     139     * </p> 
     140     *  
     141     * @return the path to an element 
     142     */ 
     143    public String getPath() { 
     144        return path; 
     145    } 
    149146 
    150         public int getIndex() { 
    151                 return index; 
    152         } 
     147    public int getIndex() { 
     148        return index; 
     149    } 
    153150 
    154         public void setIndex(int index) { 
    155                 this.index = index; 
    156         } 
     151    public void setIndex(int index) { 
     152        this.index = index; 
     153    } 
    157154 
    158         /** 
    159          * Set the hash code associated with the GUI element. 
    160          * @param hash 
    161          *                              the hash of an element object 
    162          */ 
    163         public void setHashCode(int hash){ 
    164                 this.hashCode = hash; 
    165         } 
    166          
    167         /** 
    168          * Set the path associated with the specified GUI element. 
    169          * @param path 
    170          *                              the path to an element 
    171          */ 
    172         public void setPath(String path) { 
    173                 this.path = path; 
    174         } 
    175          
    176         /** 
     155    /** 
     156     * Set the hash code associated with the GUI element. 
     157     *  
     158     * @param hash 
     159     *            the hash of an element object 
     160     */ 
     161    public void setHashCode(int hash) { 
     162        this.hashCode = hash; 
     163    } 
     164 
     165    /** 
     166     * Set the path associated with the specified GUI element. 
     167     *  
     168     * @param path 
     169     *            the path to an element 
     170     */ 
     171    public void setPath(String path) { 
     172        this.path = path; 
     173    } 
     174 
     175    /** 
    177176     * <p> 
    178177     * Sets the type of the specified GUI element. 
     
    185184        this.type = type; 
    186185    } 
    187      
     186 
    188187    /** 
    189188     * <p> 
     
    196195        this.typeHierarchy = typeHierarchy; 
    197196    } 
    198      
    199197 
    200198} 
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDPanel.java

    r1813 r1819  
    2525 * @author Florian Unger 
    2626 */ 
    27 public class ANDROIDPanel extends ANDROIDGUIElement implements IPanel{ 
     27public class ANDROIDPanel extends ANDROIDGUIElement implements IPanel { 
    2828 
    29         /** 
     29    /** 
    3030     * <p> 
    3131     * Id for object serialization. 
    3232     * </p> 
    3333     */ 
    34     private static final long serialVersionUID = 1L;  
    35          
     34    private static final long serialVersionUID = 1L; 
     35 
    3636    /** 
    3737     * <p> 
     
    4545     *            window 
    4646     */ 
    47         public ANDROIDPanel(ANDROIDGUIElementSpec specification, 
    48                         ANDROIDGUIElement parent) { 
    49                 super(specification, parent); 
    50                  
    51         } 
     47    public ANDROIDPanel(ANDROIDGUIElementSpec specification, ANDROIDGUIElement parent) { 
     48        super(specification, parent); 
    5249 
    53         /* 
     50    } 
     51 
     52    /* 
    5453     * (non-Javadoc) 
    5554     *  
     
    6059        return "Panel"; 
    6160    } 
    62          
     61 
    6362} 
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDRadioButton.java

    r1811 r1819  
    2525 * @author Florian Unger 
    2626 */ 
    27 public class ANDROIDRadioButton extends ANDROIDGUIElement implements IRadioButton{ 
     27public class ANDROIDRadioButton extends ANDROIDGUIElement implements IRadioButton { 
    2828 
    29         /** 
     29    /** 
    3030     * <p> 
    3131     * Id for object serialization. 
     
    4545     *            window 
    4646     */ 
    47         public ANDROIDRadioButton(ANDROIDGUIElementSpec specification, 
    48                         ANDROIDGUIElement parent) { 
    49                 super(specification, parent); 
    50         } 
     47    public ANDROIDRadioButton(ANDROIDGUIElementSpec specification, ANDROIDGUIElement parent) { 
     48        super(specification, parent); 
     49    } 
    5150 
    52         /* 
     51    /* 
    5352     * (non-Javadoc) 
    5453     *  
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDTextField.java

    r1813 r1819  
    2525 * @author Florian Unger 
    2626 */ 
    27 public class ANDROIDTextField extends ANDROIDGUIElement implements ITextField{ 
     27public class ANDROIDTextField extends ANDROIDGUIElement implements ITextField { 
    2828 
    29         /** 
     29    /** 
    3030     * <p> 
    3131     * Id for object serialization. 
     
    4545     *            window 
    4646     */ 
    47         public ANDROIDTextField(ANDROIDGUIElementSpec specification, 
    48                         ANDROIDGUIElement parent) { 
    49                 super(specification, parent); 
    50                  
    51         } 
    52          
    53         /* 
     47    public ANDROIDTextField(ANDROIDGUIElementSpec specification, ANDROIDGUIElement parent) { 
     48        super(specification, parent); 
     49 
     50    } 
     51 
     52    /* 
    5453     * (non-Javadoc) 
    5554     *  
Note: See TracChangeset for help on using the changeset viewer.