Message View: the created lifeline is short, and does not allow a new message to it

Issue #193 resolved
Omar Alam created an issue

(See attached) I am trying to create a ServerSocket and then a combined fragment, and inside the combined fragment I want to create a message to ServerSocket's lifeline, but the lifeline is too short.

Comments (10)

  1. Matthias Schoettle

    As a temporary workaround, it should be possible to do the following after creating the create message (the first one):

    1. create a message from target to serversocket
    2. create the combined fragment between the two messages
  2. Matthias Schoettle
    • changed status to open

    In general, a solution should either a) create longer lifelines or b) allow to "connect" to a lifeline even if the lifeline stops above, i.e., when the user draws a line that stops at the same x position.

  3. Matthias Schoettle

    References issue #193: Messages to existing lifelines can now be created even when the lifeline is not "on the same height". I.e., the end position of the stroke gesture is used to find a lifeline that is within range on its x position (center of the lifeline). A found lifeline view is highlighted to visualize to the user that it is possible to call this lifeline. All other lifelines are de-highlighted.

    → <<cset 26b506c9ceeb>>

  4. Matthias Schoettle

    Currently any lifeline is highlighted if the x position is in reach. It would be nice if only those lifelines are highlighted that are actually reachable from the calling lifeline (i.e., the choice of values when creating a lifeline provides the list of reachable lifelines).

  5. Omar Alam reporter

    The problem still exists. In the figure, it is possible to call an operation on the serversocket lifeline. However, it throws the following exception:

    org.eclipse.emf.common.util.WrappedException: An exception was ignored during command execution at org.eclipse.emf.common.command.BasicCommandStack.handleError(BasicCommandStack.java:281) at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:112) at ca.mcgill.sel.ram.controller.BaseController.doExecute(BaseController.java:105) at ca.mcgill.sel.ram.controller.MessageViewController.createMessage(MessageViewController.java:211) at ca.mcgill.sel.ram.ui.handler.message.impl.MessageViewHandler$3.elementSelected(MessageViewHandler.java:332) at ca.mcgill.ram.ui.components.RamSelectorComponent.selectElement(RamSelectorComponent.java:779) at ca.mcgill.ram.ui.components.RamSelectorComponent.access$5(RamSelectorComponent.java:777) at ca.mcgill.ram.ui.components.RamSelectorComponent$InternalSelectorHandler.processTapEvent(RamSelectorComponent.java:188) at ca.mcgill.ram.ui.handler.BaseHandler.processGestureEvent(BaseHandler.java:78) at ca.mcgill.ram.ui.components.RamSelectorComponent$InternalSelectorHandler.processGestureEvent(RamSelectorComponent.java:249) at org.mt4j.input.GestureEventSupport.fire(GestureEventSupport.java:184) at org.mt4j.input.GestureEventSupport.fireGestureEvt(GestureEventSupport.java:169) at org.mt4j.components.MTComponent.processGestureEvent(MTComponent.java:3033) at org.mt4j.input.inputProcessors.componentProcessors.AbstractComponentProcessor.fireGestureEvent(AbstractComponentProcessor.java:236) at org.mt4j.input.inputProcessors.componentProcessors.AbstractCursorProcessor.fireGestureEvent(AbstractCursorProcessor.java:169) at org.mt4j.input.inputProcessors.componentProcessors.tapProcessor.TapProcessor.endGesture(TapProcessor.java:214) at org.mt4j.input.inputProcessors.componentProcessors.tapProcessor.TapProcessor.cursorEnded(TapProcessor.java:172) at org.mt4j.input.inputProcessors.componentProcessors.AbstractCursorProcessor.processInputEvtImpl(AbstractCursorProcessor.java:143) at org.mt4j.input.inputProcessors.componentProcessors.AbstractComponentProcessor.processInputEvent(AbstractComponentProcessor.java:87) at org.mt4j.input.ComponentInputProcessorSupport.processInputEvent(ComponentInputProcessorSupport.java:76) at org.mt4j.components.MTComponent.dispatchInputEvent(MTComponent.java:2853) at org.mt4j.components.MTComponent.processInputEvent(MTComponent.java:2983) at org.mt4j.components.MTComponent.processInputEvent(MTComponent.java:2996) at org.mt4j.components.MTComponent.processInputEvent(MTComponent.java:2996) at org.mt4j.components.MTComponent.processInputEvent(MTComponent.java:2996) at org.mt4j.components.MTCanvas.processInputEvent(MTCanvas.java:449) at org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor.fireInputEvent(AbstractGlobalInputProcessor.java:138) at org.mt4j.input.inputProcessors.globalProcessors.InputRetargeter.processInputEvtImpl(InputRetargeter.java:91) at org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor.processInputEvent(AbstractGlobalInputProcessor.java:67) at org.mt4j.input.inputSources.AbstractInputSource.fireInputEvent(AbstractInputSource.java:208) at org.mt4j.input.inputSources.AbstractInputSource.flushEvents(AbstractInputSource.java:183) at org.mt4j.input.inputSources.AbstractInputSource.pre(AbstractInputSource.java:126) at org.mt4j.input.inputSources.AbstractInputSource.processAction(AbstractInputSource.java:86) at org.mt4j.AbstractMTApplication.runApplication(AbstractMTApplication.java:327) at org.mt4j.AbstractMTApplication.draw(AbstractMTApplication.java:272) at processing.core.PApplet.handleDraw(PApplet.java:1603) at processing.core.PApplet.run(PApplet.java:1502) at java.lang.Thread.run(Thread.java:695) Caused by: java.lang.NullPointerException at ca.mcgill.sel.ram.ui.views.message.LifelineView$EventContainer.access$0(LifelineView.java:151) at ca.mcgill.sel.ram.ui.views.message.LifelineView.getViewIndex(LifelineView.java:652) at ca.mcgill.sel.ram.ui.views.message.LifelineView.addFragment(LifelineView.java:508) at ca.mcgill.sel.ram.ui.views.message.LifelineView.addMessageEnd(LifelineView.java:446) at ca.mcgill.sel.ram.ui.views.message.MessageViewView.addMessageView(MessageViewView.java:287) at ca.mcgill.sel.ram.ui.views.message.MessageViewView.notifyChanged(MessageViewView.java:653) at org.eclipse.emf.edit.provider.ChangeNotifier.fireNotifyChanged(ChangeNotifier.java:45) at org.eclipse.emf.edit.provider.ItemProviderAdapter.fireNotifyChanged(ItemProviderAdapter.java:239) at ca.mcgill.cs.sel.ram.provider.InteractionItemProvider.notifyChanged(InteractionItemProvider.java:133) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:249) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:457) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:400) at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractEList.java:370) at org.eclipse.emf.edit.command.AddCommand.doExecute(AddCommand.java:399) at org.eclipse.emf.edit.command.AbstractOverrideableCommand.execute(AbstractOverrideableCommand.java:125) at org.eclipse.emf.common.command.CompoundCommand.execute(CompoundCommand.java:261) at org.eclipse.emf.common.command.CompoundCommand.execute(CompoundCommand.java:261) at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78) ... 36 more

  6. Matthias Schoettle

    Do you mean call the lifeline from within the combined fragment? If so, this is still an open issue, but unrelated to this one (see #162 and maybe #148).

  7. Log in to comment