Changeset 1084
- Timestamp:
- 02/18/13 09:30:13 (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIElementTree.java
r1068 r1084 126 126 * @param guiElementSpec 127 127 * the GUI element specification 128 * 129 * @throws GUIModelException if the GUI element can not be added to the underlying GUI model 128 130 */ 129 131 public void add(T guiElementID, 130 132 T parentID, 131 133 IGUIElementSpec guiElementSpec) 134 throws GUIModelException 132 135 { 133 136 IGUIElement guiElement = guiElements.get(guiElementID); … … 158 161 } 159 162 160 try { 161 guiElement = guiModel.integratePath(guiElementPath, guiElementFactory); 162 } 163 catch (GUIModelException e) { 164 throw new RuntimeException("could not instantiate GUI element with id " + guiElementID, e); 165 } 163 guiElement = guiModel.integratePath(guiElementPath, guiElementFactory); 166 164 guiElements.put(guiElementID, guiElement); 167 165 } -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/HTMLLogParser.java
r1069 r1084 25 25 import de.ugoe.cs.autoquest.eventcore.IEventType; 26 26 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModel; 27 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModelException; 27 28 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 28 29 import de.ugoe.cs.autoquest.plugin.html.eventcore.HTMLEventTypeFactory; … … 133 134 134 135 if (specification != null) { 135 super.getGUIElementTree().add(id, parentId, specification); 136 try { 137 super.getGUIElementTree().add(id, parentId, specification); 138 } 139 catch (GUIModelException e) { 140 throw new SAXException("could not handle GUI element with id " + 141 id + ": " + e.getMessage(), e); 142 } 136 143 return true; 137 144 } … … 174 181 HTMLEventTypeFactory.getInstance().getEventType(type, parameters, target); 175 182 176 Event event = new Event(eventType, target); 177 178 String timestampStr = parameters.get("timestamp"); 179 180 if (timestampStr != null) { 181 event.setTimestamp(Long.parseLong(timestampStr)); 182 } 183 184 ((HTMLGUIElement) event.getTarget()).markUsed(); 185 186 super.addToSequence(event); 183 if (eventType != null) { 184 Event event = new Event(eventType, target); 185 186 String timestampStr = parameters.get("timestamp"); 187 188 if (timestampStr != null) { 189 event.setTimestamp(Long.parseLong(timestampStr)); 190 } 191 192 ((HTMLGUIElement) event.getTarget()).markUsed(); 193 194 super.addToSequence(event); 195 } 196 // else ignore unknown event type 187 197 188 198 return true; -
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/JFCSimplifiedLogParser.java
r1058 r1084 38 38 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIElementTree; 39 39 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModel; 40 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModelException; 40 41 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 41 42 import de.ugoe.cs.autoquest.keyboardmaps.VirtualKey; … … 397 398 } 398 399 else if (qName.equals("component") && currentGUIElementHash != null) { 399 currentGUIElementTree.add(currentGUIElementHash, currentParentHash, 400 currentGuiElementSpec); 400 try { 401 currentGUIElementTree.add(currentGUIElementHash, currentParentHash, 402 currentGuiElementSpec); 403 } 404 catch (GUIModelException e) { 405 throw new SAXException("could not handle GUI element with hash " + 406 currentGUIElementHash + ": " + e.getMessage(), e); 407 } 401 408 List<Event> unhandledEvents = eventsWithoutTargets.get(currentGUIElementHash); 402 409 if (unhandledEvents != null) { -
trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/HandlerCreate.java
r1028 r1084 15 15 package de.ugoe.cs.autoquest.plugin.mfc; 16 16 17 import org.xml.sax.SAXException; 18 17 19 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIElementTree; 20 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModelException; 18 21 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 19 22 import de.ugoe.cs.autoquest.plugin.mfc.guimodel.MFCGUIElementSpec; … … 89 92 */ 90 93 @Override 91 public void onEndElement() {94 public void onEndElement() throws SAXException { 92 95 if (hwnd != 0) { 93 96 IGUIElementSpec spec = new MFCGUIElementSpec(hwnd, guiElementName, resourceId, className, isModal); 94 super.getGUIElementTree().add(hwnd, parentHwnd, spec); 97 try { 98 super.getGUIElementTree().add(hwnd, parentHwnd, spec); 99 } 100 catch (GUIModelException e) { 101 throw new SAXException("could not handle GUI element with handle " + 102 hwnd + ": " + e.getMessage(), e); 103 } 95 104 } 96 105 } -
trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/MessageHandler.java
r1028 r1084 14 14 15 15 package de.ugoe.cs.autoquest.plugin.mfc; 16 17 import org.xml.sax.SAXException; 16 18 17 19 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIElementTree; … … 73 75 * Called in the endElement() method of {@link MFCLogParser} when a msg-node ends. 74 76 * </p> 77 * 78 * @throws SAXException if the msg-node could not be processed for some reason 75 79 */ 76 public void onEndElement() {}80 public void onEndElement() throws SAXException {} 77 81 78 82 /**
Note: See TracChangeset
for help on using the changeset viewer.