Bug 548631 - Move name and documentation from DRepresentation to DRepresentationDescriptor for better lazy loading
Summary: Move name and documentation from DRepresentation to DRepresentationDescriptor...
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 6.2.1   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: 6.3.0   Edit
Assignee: Laurent Redor CLA
QA Contact: Laurent Redor CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-06-25 09:25 EDT by Pierre Guilet CLA
Modified: 2019-12-09 02:56 EST (History)
4 users (show)

See Also:


Attachments
SimpleProject.zip (3.16 KB, application/x-zip-compressed)
2019-10-04 10:40 EDT, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Guilet CLA 2019-06-25 09:25:21 EDT
Currently each time the name or description is retrieved from a DRepresentation, this representation is loaded.

In many contexts we can have the need to get these characteristic without having the need to load the representation like when renaming a representation.

To avoid these loadings, we will move the name and description from DRepresentation to DRerpresentationDescriptor.
Comment 1 Eclipse Genie CLA 2019-06-26 13:11:52 EDT
New Gerrit change created: https://git.eclipse.org/r/144943
Comment 3 Eclipse Genie CLA 2019-07-16 05:36:15 EDT
New Gerrit change created: https://git.eclipse.org/r/146154
Comment 5 Eclipse Genie CLA 2019-07-17 04:30:54 EDT
New Gerrit change created: https://git.eclipse.org/r/146229
Comment 6 Maxime Porhel CLA 2019-07-26 04:48:22 EDT
org.eclipse.sirius.diagram.ui.tools.internal.properties.DocumentationPropertySection should also be modified. 

setInput(): should retrieve the representation descriptor
getFeature(): todo: check that the feature is still valid
Comment 7 Maxime Porhel CLA 2019-07-26 06:09:42 EDT
The migration is missing for the description move. 
Furthermore it seems that the migration version should also be updated in DRepInDViewToRootObjectsAndWithDRepDescRepPathMigrationParticipant (I also wonder if this issue would not have require its own dedicated and isolated migration participant).
Comment 8 Eclipse Genie CLA 2019-08-09 08:11:35 EDT
New Gerrit change created: https://git.eclipse.org/r/147370
Comment 10 Eclipse Genie CLA 2019-08-21 10:51:06 EDT
New Gerrit change created: https://git.eclipse.org/r/148067
Comment 12 Eclipse Genie CLA 2019-08-23 04:42:12 EDT
New Gerrit change created: https://git.eclipse.org/r/148183
Comment 13 Eclipse Genie CLA 2019-08-26 05:17:11 EDT
New Gerrit change created: https://git.eclipse.org/r/148330
Comment 15 Maxime Porhel CLA 2019-09-04 09:50:53 EDT
Some OutOfMemoryError occured in Capella tests after integration of Sirius 6.1.3. 
It currently seems to come from DRepInDViewToRootObjectsAndWithDRepDescRepPathMigrationParticipant maps which retains all the migrated representations of the test session.
Comment 16 Maxime Porhel CLA 2019-09-04 09:53:36 EDT
DRepInDViewToRootObjectsAndWithDRepDescRepPathMigrationParticipant also needs to be completed to log something when it has been triggered for the migration added in 6.3.0. 

An entry must be added in the release note with the migration version.
Comment 17 Eclipse Genie CLA 2019-09-04 11:02:31 EDT
New Gerrit change created: https://git.eclipse.org/r/148901
Comment 18 Maxime Porhel CLA 2019-09-11 08:11:56 EDT
Another issue has been detected : the copy representation action rename the original descriptor.
Comment 19 Eclipse Genie CLA 2019-09-11 09:50:37 EDT
New Gerrit change created: https://git.eclipse.org/r/149348
Comment 21 Eclipse Genie CLA 2019-09-12 04:49:04 EDT
New Gerrit change created: https://git.eclipse.org/r/149403
Comment 23 Maxime Porhel CLA 2019-09-12 09:29:43 EDT
A new fix has been added: the documentation field is now correctly copied.
Comment 24 Eclipse Genie CLA 2019-09-16 04:31:42 EDT
New Gerrit change created: https://git.eclipse.org/r/149564
Comment 25 Eclipse Genie CLA 2019-09-16 06:18:07 EDT
New Gerrit change created: https://git.eclipse.org/r/149573
Comment 28 Eclipse Genie CLA 2019-09-19 11:51:03 EDT
New Gerrit change created: https://git.eclipse.org/r/149858
Comment 30 Eclipse Genie CLA 2019-10-02 09:28:37 EDT
New Gerrit change created: https://git.eclipse.org/r/150492
Comment 32 Laurent Redor CLA 2019-10-04 10:40:43 EDT
Created attachment 280162 [details]
SimpleProject.zip

Steps to validate:
* Import the project "SimpleProject" from SimpleProject.zip (this project was made on a ODCE 11.2.0 version)
* Open the representations.aird file with a text editor.
* Expected: The name "root class diagram" is on an instance of diagram:DSemanticDiagram and on an instance of viewpoint:DRepresentationDescriptor.
* Expected: The documentation "This is the documentation of this diagram." is on an instance of diagram:DSemanticDiagram.
* Open the diagram "root class diagram"
* Move an element on this diagram
* Save the session
* Expected: The name "root class diagram" is no longer available on diagram:DSemanticDiagram (only available on viewpoint:DRepresentationDescriptor).
* Expected: The documentation has been moved from diagram:DSemanticDiagram to viewpoint:DRepresentationDescriptor.
Comment 33 Laurent Redor CLA 2019-10-04 10:41:19 EDT
The migration participant does not migrate the existing documentation.
Comment 34 Eclipse Genie CLA 2019-10-04 11:14:29 EDT
New Gerrit change created: https://git.eclipse.org/r/150605
Comment 35 Laurent Redor CLA 2019-10-04 11:33:19 EDT
An additional test must be added to cover the case fix with the above gerrit.
Comment 37 Eclipse Genie CLA 2019-11-25 10:39:44 EST
New Gerrit change created: https://git.eclipse.org/r/153314
Comment 39 Pierre-Charles David CLA 2019-12-09 02:56:30 EST
Available in Sirius 6.3.0, see https://wiki.eclipse.org/Sirius/6.3.0