Changeset 1753 for trunk/autoquest-plugin-uml/src/main/java
- Timestamp:
- 09/18/14 10:04:21 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java
r1752 r1753 277 277 278 278 Lifeline userLifeline = interaction.createLifeline("user"); 279 280 Component testContext = (Component) model.getPackagedElement("TestContext", true, UMLPackage.Literals.COMPONENT, true); 279 280 Component testContext = 281 (Component) model.getPackagedElement("TestContext", true, 282 UMLPackage.Literals.COMPONENT, true); 281 283 userLifeline.setRepresents(testContext.getAttribute("user", null)); 282 283 Component userComponent = (Component) model.getPackagedElement("User", true, UMLPackage.Literals.COMPONENT, true); 284 285 Component userComponent = 286 (Component) model.getPackagedElement("User", true, UMLPackage.Literals.COMPONENT, true); 284 287 Port userPort = (Port) userComponent.getAttribute("p_user_rlus", null); 285 288 286 289 int i = 0; 287 290 for (Event event : sequence) { … … 300 303 if (targetLifeline == null) { 301 304 targetLifeline = interaction.createLifeline(serviceName); 302 303 304 targetLifeline.setRepresents(testContext.getAttribute(serviceName+"_property", null)); 305 306 Component component = (Component) model.getPackagedElement(serviceName, true, UMLPackage.Literals.COMPONENT, true); 307 portMap.put(serviceName, (Port) component.getAttribute("p_" + serviceName, null)); 305 306 targetLifeline.setRepresents(testContext 307 .getAttribute(serviceName + "_property", null)); 308 309 Component component = 310 (Component) model.getPackagedElement(serviceName, true, 311 UMLPackage.Literals.COMPONENT, true); 312 portMap.put(serviceName, 313 (Port) component.getAttribute("p_" + serviceName, null)); 308 314 } 309 315 MessageOccurrenceSpecification sendFragment = … … 320 326 321 327 Message message = interaction.createMessage(methodName); 322 if ( getOperationFromName(targetInterface.getOperations(), methodName)==null) {328 if (getOperationFromName(targetInterface.getOperations(), methodName) == null) { 323 329 System.out.println("operation not found: " + methodName); 324 330 } 325 message.setSignature(getOperationFromName(targetInterface.getOperations(), methodName)); 331 message.setSignature(getOperationFromName(targetInterface.getOperations(), 332 methodName)); 326 333 message.setMessageSort(MessageSort.ASYNCH_CALL_LITERAL); 327 334 message.setSendEvent(sendFragment); 328 335 message.setReceiveEvent(recvFragment); 329 336 330 337 EList<ConnectorEnd> sourceEnds = userPort.getEnds(); 331 338 EList<ConnectorEnd> targetEnds = portMap.get(serviceName).getEnds(); 332 333 for ( ConnectorEnd sourceEnd : sourceEnds) {339 340 for (ConnectorEnd sourceEnd : sourceEnds) { 334 341 Connector sourceConnector = (Connector) sourceEnd.eContainer(); 335 for ( ConnectorEnd targetEnd : targetEnds) {336 Connector targetConnector = 337 if ( targetConnector==sourceConnector) {342 for (ConnectorEnd targetEnd : targetEnds) { 343 Connector targetConnector = (Connector) targetEnd.eContainer(); 344 if (targetConnector == sourceConnector) { 338 345 message.setConnector(targetConnector); 339 346 } 340 347 } 341 } 342 348 } 349 343 350 sendFragment.setMessage(message); 344 351 recvFragment.setMessage(message);
Note: See TracChangeset
for help on using the changeset viewer.