Changeset 743 for trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/JFCLogParser.java
- Timestamp:
- 09/03/12 09:14:35 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/JFCLogParser.java
r736 r743 340 340 else if ("hash".equals(atts.getValue("name"))) { 341 341 currentGuiElementSpec.setElementHash 342 ( atts.getValue("value"));342 ((int) Long.parseLong(atts.getValue("value"), 16)); 343 343 } 344 344 } … … 566 566 else 567 567 { 568 throw new SAXException 569 ("log file has an error, as it contains a key up event on key " + key + 570 " for which there is no preceeding key down event"); 568 Console.printerrln("log file has an error, as it contains a key up event on key " + 569 key + " for which there is no preceeding key down event"); 571 570 } 572 571 … … 645 644 matcher = Pattern.compile(pattern).matcher(matcher.group(2)); 646 645 647 String elementHash = "-1";646 float elementHash = -1; 648 647 649 648 pattern = "(([\\d]*)|([\\w$]*)|(([\\w$@\\.]*)=([\\w$@\\.]*)))\\z"; … … 656 655 // found digit value. Those in combination usually denote the position 657 656 // of the GUI element. So calculate an element has out of them 658 elementHash += valueMatcher.group(2);657 elementHash += Integer.parseInt(valueMatcher.group(2)); 659 658 } 660 659 else if ((valueMatcher.group(5) != null) && … … 667 666 668 667 if ("alignmentX".equals(key) || "alignmentY".equals(key)) { 669 elementHash += valueMatcher.group(6);668 elementHash += Float.parseFloat(valueMatcher.group(6)); 670 669 } 671 670 } … … 673 672 } 674 673 675 currentGuiElementSpec.setName("unknown(" + elementHash+ ")");674 currentGuiElementSpec.setName("unknown(" + ((int) elementHash) + ")"); 676 675 currentGuiElementSpec.setType(type); 677 676 currentGuiElementSpec.setIndex(-1); 678 currentGuiElementSpec.setElementHash( elementHash);677 currentGuiElementSpec.setElementHash((int) elementHash); 679 678 } 680 679 catch (Exception e)
Note: See TracChangeset
for help on using the changeset viewer.