Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 514639 - [Core] Undo re-inherit of redefined trigger guard casues persisted constrainedElement to be lost
Summary: [Core] Undo re-inherit of redefined trigger guard casues persisted constraine...
Status: CLOSED FIXED
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: core (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows 7
: P2 normal
Target Milestone: 1.0.0   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-03 08:40 EDT by Peter Cigehn CLA
Modified: 2017-04-06 05:02 EDT (History)
1 user (show)

See Also:


Attachments
Example model with a redefined trigger guard (6.96 KB, application/x-zip-compressed)
2017-04-03 08:40 EDT, Peter Cigehn CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Cigehn CLA 2017-04-03 08:40:48 EDT
Created attachment 267607 [details]
Example model with a redefined trigger guard

When undo a re-inherit of redefined trigger guard, then the perstisted constrainedElement reference for the trigger guard constraints is lost after undo.

Steps to reproduce:

1) Open the attached model
2) Check the .uml model file for the constrainedElement reference 

            <ownedRule xmi:type="uml:Constraint" xmi:id="_H7hjohhpEeemJtomyNM8PA" constrainedElement="_7JKscBhdEeeSBZ9WSKr4Zg">
              <specification xmi:type="uml:OpaqueExpression" xmi:id="_I7-7EBhpEeemJtomyNM8PA">
                <language>C++</language>
                <body>// Redefined trigger guard for request</body>
              </specification>
            </ownedRule>

3) Re-inherit the redefined trigger guard in the state-machine of Capsule2
4) Save the model to persist it and reset the dirty indicator
5) Undo the re-inherit
6) Save the model after undo
7) Check the persisted result. The redefining trigger guard constraint does not have the constrainedElement reference.

            <ownedRule xmi:type="uml:Constraint" xmi:id="_H7hjohhpEeemJtomyNM8PA">
              <specification xmi:type="uml:OpaqueExpression" xmi:id="_Z_PLQBhqEeeuSM-laWkO6A">
                <language>C++</language>
                <body>// Redefined trigger guard for request</body>
              </specification>
            </ownedRule>

If the model is closed and re-opened again, then the redefining trigger guard is lost in the subclass, and the trigger guard no longer have the redefined symbol in the diagram (and it is not shown in the model explorer).
Comment 1 Eclipse Genie CLA 2017-04-05 17:51:10 EDT
New Gerrit change created: https://git.eclipse.org/r/94502
Comment 3 Christian Damus CLA 2017-04-05 20:09:04 EDT
(In reply to Eclipse Genie from comment #2)
> Gerrit change https://git.eclipse.org/r/94502 was merged to [master].
Comment 4 Peter Cigehn CLA 2017-04-06 05:02:01 EDT
Verified to be fixed in the latest Papyrus-RT build (#551). The constrainedElement reference is now persisted correctly also after undo.
Comment 5 Peter Cigehn CLA 2017-04-06 05:02:14 EDT
Closing as verified fixed.