Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 483637 - [Tooling] Only service ports shall be shown on the border of a capsule part
Summary: [Tooling] Only service ports shall be shown on the border of a capsule part
Status: CLOSED FIXED
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: tool (show other bugs)
Version: 0.8.0   Edit
Hardware: PC Windows 7
: P3 normal
Target Milestone: M7   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 489457 496252
Blocks:
  Show dependency tree
 
Reported: 2015-12-04 04:00 EST by Peter Cigehn CLA
Modified: 2017-02-01 04:46 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Cigehn CLA 2015-12-04 04:00:12 EST
When creating a capsule part in a capsule structure diagram, then *only* the service ports of the capsule typing the capsule parts shall be shown (and synchronized) as ports on the capsule part, i.e. external behavior ports, relay ports and SPPs. Internal behavior ports and SAPs shall *not* be shown, since they are not service ports.

Currently when you create a capsule part, all the ports of the capsule typing the capsule part, gets visualized on the capsule part.

See also Bug 476882 Comment 5 regarding the notation for ports on capsule parts and Bug 482599 regarding the relative positioning of the service ports on a capsule part.
Comment 1 Peter Cigehn CLA 2015-12-04 04:22:16 EST
Forgot some steps to reproduce:

1) Create a UML-RT model with a protocol and two capsules, Capsule1 and Capsule2
2) In the capsule structure diagram of Capsule1 create one port of each type, i.e. one external behavior port, one relay port, one SPP, and one internal behavior port and one SAP.
3) Now drag-and-drop Capsule1 into the structure diagram of Capsule2 to create a capsule part typed by Capsule1.
4) Now you get five ports of all types visalized on the capsule part

Interesting enough, one can see if you now change the type of any of the service ports, e.g. the external behavior port, into a non-service port, i.e. an internal behavior port, then the port disappears.

So this issue seem mainly related to the initial placement of the ports on the border of the capsule part. This is then highly related to Bug 482599 which is about the (on-time) positioning of the ports relative to the positioning of the ports on the capsule itself.
Comment 2 Peter Cigehn CLA 2016-02-19 06:24:44 EST
I tested this a bit more in the latest Papyrus-RT build, and the behavior seem to be very inconsistent when using the radio buttons to change the kind of port from being a service to/from a non-service port. Sometimes the port disappears when making a a non-service, and sometimes not. And vice versa, when changing a non-service port back to a service port, then sometimes it shows on the capsule part and sometimes not. I cannot really see a pattern.

So it not only seem to be an issue during create, but is also seem to be an issue when toggling the kind of port using the radio buttons.

If you then also try to toggle using the "Is Service" check box, then it seem to stop working completely. Then you end up in a state where a service port is never shown on the capsule part.
Comment 3 Peter Cigehn CLA 2016-03-11 02:49:47 EST
Christian, since you have started to look into this, may I suggest that you take a quick look at Bug 486367 at the same time. They feel slightly related, since it is another case where only a subset of elements shall be synchronized, i.e. only a subsets of ownedAttributes shall be synchronized (those that are capsule parts but not "ordinary" attributes).
Comment 4 Eclipse Genie CLA 2016-03-11 16:30:51 EST
New Gerrit change created: https://git.eclipse.org/r/68248
Comment 5 Eclipse Genie CLA 2016-03-15 12:57:09 EDT
New Gerrit change created: https://git.eclipse.org/r/68455
Comment 6 Christian Damus CLA 2016-03-15 14:36:59 EDT
(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/68455

This gerrit patch adds JUnit regression tests covering the new behaviour of the Capsule Diagram synchronization for ports and parts (this bug and bug 486367).  Because the enablement of synchronization is governed by a CSS stylesheet that is provided by the UML RT Viewpoint, this patch adds a reusable JUnit test rule UMLRTViewpointRule that ensures the UML RT viewpoint is in effect throughout the scope of the rule.  Hopefully this will be useful to other automated diagram tests.

All of this is implemented in a new test bundle project org.eclipse.papyrusrt.umlrt.tooling.diagram.common.tests.
Comment 9 Remi Schnekenburger CLA 2016-03-17 03:52:14 EDT
bugfix and regressions tests have been merged. Closing bug.

The rule to check the active viewpoint is really interesting and could be propagated to some other test suites.
Comment 10 Peter Cigehn CLA 2016-03-17 04:58:38 EDT
I have tested the latest Papyrus-RT build, and verified that only service ports are shown on a capsule part, both at creation of the capsule part, as well as when toggling the kind of port (both using the radio buttons as well as the isService check box). 

Also tested the scenario that the toggling the kind of port on the capsule in a separate submodel, and the opening the capsule with the capsule part in another submodel, and checked that the synchronization is made at the time the diagram is opened.

The position of the synchronized port is still an issue though, but this should be tracked by Bug 482599. The size of the port on the capsule part should be smaller and should be tracked by Bug 476882 Comment 5.
Comment 11 Peter Cigehn CLA 2017-02-01 04:46:18 EST
Mass closing already verified fixed/worksforme/wontfix bugs.