Home » Eclipse Projects » Sirius » Grayed diagram name when reopening aird(repon diagram)
|Grayed diagram name when reopening aird [message #1829110]
||Thu, 25 June 2020 10:18
| Franco Bergomi
Registered: July 2009
Hi, I'm having a strange behaviour with Sirius.|
I designed a simple viewpoint with a couple of diagram representations, to display some xml files in a fancy way.
The xml files are constrained by an XSD that I transformed to .ecore, and then corresponding model/edit/editor.
I added some derived/transient/volatile references in order to easily handle name-based references in the XML.
When I create a new representation file for an xml file, I have absolutely no problem when creating diagrams, showing/removing elements from the diags, edition through property views, and saving.
If i close and then reopen the project, the aird will properly open, with the model tree.
BUT the diagrams names appear "grayed", and when I click them nothing happens.
No log, no console message, no stacktrace (even in runtime).
> see attached "Sirius_Gray.jpg" file.
I am using Obeo designer 11.1.1 / Sirius 6.1.1
How can I investigate this issues by Myself?
[Updated on: Thu, 25 June 2020 10:19]
Report message to a moderator
|Re: Grayed diagram name when reopening aird [message #1829141 is a reply to message #1829135]
||Thu, 25 June 2020 17:48
| Anthony Nillar
Registered: May 2014
Thanks for letting me know.
I would say that the problem arises in this sense (qualified = false). If you take a look at the minimal example that I submitted you will see that also in the representations.aird the target reference is serialized as:
<target xmi:type="Family" href="sample.basicfamily#//@family"/>
and when I open the aird file with the reflective editor, in the properties view, the target reference appears empty.
In the basicfamily.ecore, if you change the qualified=true, generate a new model and a modelling project, you will see that the problem disappear. Of course, in this case, the target reference is serialized with a prefix as:
<target xmi:type="basicfamily:Family" href="example.basicfamily#//@family"/>
|Re: Grayed diagram name when reopening aird [message #1829727 is a reply to message #1829711]
||Thu, 09 July 2020 14:29
| Franco Bergomi
Registered: July 2009
Hi Anthony, |
I'm sorry that I wasn't able to answer before. I had to switch to another activity and didn't finish the analysis o this issue.
However I tried what you proposed (thank you), but I was not able to open my ".xml" file anymore as a model since it was violating the need (from EMF) to have prefixes everywhere.
I didn't have time enough to create a sample model with the generated editor in order to see if it would be working on Sirius.
I keep believing that Sirius is doing something strange when loading the resource.
I have a model "A.dtp5g" that complies with an xsd and that can be read/write with the generated model/edit/editor plugins.
I created a second model "B.dtp5g" that has a reference to A.dtp5g (To do that i intentionally added a EReference in one of the metaclasses, since it is not possible in plain xml).
So in "B.dtp5g" i have a href referencing one element (with XPath syntax like //@firstname.lastname@example.org)
When i Open B model, EMF immediately loads the A model, and I can see the reference in the property view, change it, and it is then properly saved & loaded.
If i take the same A.dtp5G and create its representation file (.aird);
I create a View (Diagram for instance), that displays elements from A.
When i save the .aird, and read it textually, I see the same reference that I was seeing in B file (of test #1).
> If i reopen the aird file the diagram name appears "grayed", and the DRepresentationDescriptorQuery#isDangling method returns true.
> If i open the aird file with the ecore reflexive editor, the reference seems not to be resolved; it remains empty in the property view; I can set a value but it won't be saved.
and a NPE is thrown if trying to validate the model (see my previous message).
As soon as I have time, I'll try
> either to set up an example to reproduce & study this issue..
> or look through your example to extend it in order to reproduce & study the issue
Current Time: Thu Oct 22 07:52:50 GMT 2020
Powered by FUDForum
. Page generated in 0.02437 seconds