Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 509383 - [UML Types] ConnectorEditHelper uses UMLFactory to create connector ends
Summary: [UML Types] ConnectorEditHelper uses UMLFactory to create connector ends
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.2   Edit
Hardware: All All
: P2 major (vote)
Target Milestone: 3.0.0   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 467545
  Show dependency tree
 
Reported: 2016-12-17 09:05 EST by Christian Damus CLA
Modified: 2017-05-10 04:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2016-12-17 09:05:27 EST
The ConnectorEditHelper::getConfigureCommand(ConfigureRequest) method uses the UMLFactory static instance to create the binary connector's source and target ends.  It is much better to use the Connector::createEnd() factory method, instead because

 (a) this simplifies the client code by implicitly adding the new
     end to the connector and

 (b) it ensures consistent creation of the correct UML implementation
     classes in Papyrus-RT (for the UML-RT implementation of the
     UML metamodel)

The consequence for Papyrus-RT of the current approach in the edit-helper is that capsule inheritance scenarios of new connector creation will not work:  the new connector's ends will not properly implement UML-RT semantics until the model is saved, closed, and opened again (which reconstitutes the connector ends with the correct implementation).
Comment 1 Eclipse Genie CLA 2016-12-17 09:32:40 EST
New Gerrit change created: https://git.eclipse.org/r/87351
Comment 2 Eclipse Genie CLA 2016-12-21 15:25:38 EST
Gerrit change https://git.eclipse.org/r/87351 was merged to [streams/2.0-maintenance].
Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=ca3803339074b0f22fd977747416f55af1e0edaa
Comment 3 Eclipse Genie CLA 2016-12-22 19:35:41 EST
New Gerrit change created: https://git.eclipse.org/r/87660
Comment 5 Christian Damus CLA 2016-12-22 21:52:34 EST
(In reply to Eclipse Genie from comment #2)
> Gerrit change https://git.eclipse.org/r/87351 was merged to
> [streams/2.0-maintenance].

(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/87660 was merged to [master].