Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Updating diagram xml model(Updating xml model after changing ports order in Properties view in Table)
Updating diagram xml model [message #1794893] Mon, 10 September 2018 13:07 Go to next message
Roman Rutsevich is currently offline Roman RutsevichFriend
Messages: 11
Registered: June 2017
Junior Member
Hello!

I bumpled into situation that I don't know how to deal with.
I got a diagram model which has an element with some amount of in ports and out ports.
Please, see the picture element_with_ports_and_table.jpg.
As well on picture I have properties view where I got a table "Port Infos" of this ports. Ports are shown at the table in order of adding on the element.

This part of model in xml looks like this (ports order - In0, Out0, In1, In2, Out1):

<element name="element" alias="ELEMENT_K">
<portInfos name="In0" alias="ELEMENT_KN_In0">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="Out0" alias="ELEMENT_KN_Out0">
<portAttrbutesInfo portType="ATTR_OUT"/>
</portInfos>
<portInfos name="In1" alias="ELEMENT_KN_In1">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="In2" alias="ELEMENT_KN_In2">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="Out1" alias="ELEMENT_KN_Out1">
<portAttrbutesInfo portType="ATTR_OUT"/>
</portInfos>
</element>


The question is: I need to get in model xml first inputs and then outputs - In0, In1, In2, Out0, Out1 to be model xml like this:

<element name="element" alias="ELEMENT_K">
<portInfos name="In0" alias="ELEMENT_KN_In0">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="In1" alias="ELEMENT_KN_In1">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="In2" alias="ELEMENT_KN_In2">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="Out0" alias="ELEMENT_KN_Out0">
<portAttrbutesInfo portType="ATTR_OUT"/>
</portInfos>
<portInfos name="Out1" alias="ELEMENT_KN_Out1">
<portAttrbutesInfo portType="ATTR_OUT"/>
</portInfos>
</element>

but If I move ports in table "Port Infos" by arrows like in picture changed_order_in_the_table.jpg,
the diagram does not get "dirty state", so it does not affect model xml to get order I need and keeps an old one order (In0, Out0, In1, In2, Out1),
but not a new one (In0, In1, In2, Out0, Out1) like I set in table by moving ports (changed_order_in_the_table.jpg).

If I only change the element name, then model xml is affected by order changes from the table, but I would like to get it without additional actions like change the name or something.

Did anyone meet this situation?

Thank you in advance, Roman.

[Updated on: Mon, 10 September 2018 13:13]

Report message to a moderator

Re: Updating diagram xml model [message #1794993 is a reply to message #1794893] Wed, 12 September 2018 09:53 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Roman,

Only list elements in container list are ordered according to the order in the semantic model. As border nodes (ports) might be moved by the end user without affecting the semantic model, there is no synchronization between the port order and the semantic model order. The only possible restriction from the odesign is the port authorized side (see https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#authorizedsides).

Regards,

Florian
Previous Topic:Selection Wizard Container Variable
Next Topic:Sirius based RCP
Goto Forum:
  


Current Time: Thu Apr 25 11:35:16 GMT 2024

Powered by FUDForum. Page generated in 0.03347 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top