Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to rearrange elements in the representation graphical view
How to rearrange elements in the representation graphical view [message #1719108] Tue, 05 January 2016 10:55 Go to next message
Thanh Liem PHAN is currently offline Thanh Liem PHANFriend
Messages: 8
Registered: November 2015
Junior Member
Suppose that we have an example with a semantic model (.fam) and its representation model (.aird) with multiple viewpoints.

When an element (block or container) is selected from the semantic model (.fam), we can rearrange all the sub-elements of its properties (by selecting a certain property of which is a list of elements from the Property View, then a FeatureEditorDialog will appeared with the Add, Remove, Up and Down button allowing us to rearrange these elements).

And this operation has effects on all viewpoints of the representation model immediately. We can see the changes on all instances of the modified element.

Now, suppose that we open the representation file, then open a certain viewpoint and select an element (block or container). We can rearrange graphically the sub-elements of its properties but this has no effect on the semantic model (.fam). When you reopened the example, all changes are gone because they are not saved in the semantic model.

The question is how could we rearrange the elements of properties in the representation model and update the changes to the semantic model?

Do you have any idea? Or this is simply impossible?

Thanks for your help.

Re: How to rearrange elements in the representation graphical view [message #1720084 is a reply to message #1719108] Thu, 14 January 2016 10:05 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 503
Registered: May 2011
Senior Member
Hello,

I think that what you call a viewpoint is in fact a representation.
Viewpoints are containers of representation descriptions.

Can you provide some screenshots and details of the action of
FeatureEditorDialog because I do not understand your issue what you mean
by "We can rearrange graphically the sub-elements of its properties".

If you rearrage graphically, the impact will only be on the
representation itself, therefore only the graphical model (.aird) will
be modified, not your semantic model. However, modifying the diagram
should be saved, even if there is no change on the semantic model.

Regards,
Steve

Le 05/01/2016 11:55, Thanh Liem PHAN a écrit :
> Suppose that we have an example with a semantic model (.fam) and its
> representation model (.aird) with multiple viewpoints.
> When an element (block or container) is selected from the semantic model
> (.fam), we can rearrange all the sub-elements of its properties (by
> selecting a certain property of which is a list of elements from the
> Property View, then a FeatureEditorDialog will appeared with the Add,
> Remove, Up and Down button allowing us to rearrange these elements).
> And this operation has effects on all viewpoints of the representation
> model immediately. We can see the changes on all instances of the
> modified element.
>
> Now, suppose that we open the representation file, then open a certain
> viewpoint and select an element (block or container). We can rearrange
> graphically the sub-elements of its properties but this has no effect on
> the semantic model (.fam). When you reopened the example, all changes
> are gone because they are not saved in the semantic model.
>
> The question is how could we rearrange the elements of properties in the
> representation model and update the changes to the semantic model?
>
> Do you have any idea? Or this is simply impossible?
>
> Thanks for your help.
>
>


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to rearrange elements in the representation graphical view [message #1720131 is a reply to message #1720084] Thu, 14 January 2016 15:45 Go to previous messageGo to next message
Thanh Liem PHAN is currently offline Thanh Liem PHANFriend
Messages: 8
Registered: November 2015
Junior Member
Hi Steve

Yes, you are right, I attach here an image so the problem could be illustrated more clearly.
index.php/fa/24645/0/

Let's look at the Property view, we have 4 properties: Blocks list, Containers List, Description, and Name.

If you want to change the order of these 2 lists, you can do following the steps as illustrated in the picture. However, when you finish by click on the OK button:
- It seems that the data in memory is not updated to the real model
- You can see the order of elements are changed, but if you close the diagram and reopen it, everything returns to the moment before.
- As a result, you don't see the Save icon is changed, a signal to show that the model is changed, which does not happen when you modified the text properties such Description or Name.

The class of the dialog when we click the "..." button is FeatureEditorDialog.
Hope that you can see the problem in this situation.
Re: How to rearrange elements in the representation graphical view [message #1720410 is a reply to message #1720131] Mon, 18 January 2016 14:01 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 503
Registered: May 2011
Senior Member
Hi,

Thanks for the explanation and the screenshot. Can you look at the code
executed by the Ok button on FeatureEditorDialog and check that it is
executed using the editing domain of the Sirius Session?
It should probably look like this:
Session session = SessionManager.Instance.getSession(selectedElement);
session.getTransactionalEditingDomain().getCommandStack().execute(new
RecordingCommand(session.getTransactionalEditingDomain()) {

@Override
protected void doExecute() {
// Update list order
...
}

});

Regards,
Steve

Le 14/01/2016 16:45, Thanh Liem PHAN a écrit :
> Hi Steve
>
> Yes, you are right, I attach here an image so the problem could be illustrated more clearly.
>
>
> Let's look at the Property view, we have 4 properties: Blocks list, Containers List, Description, and Name.
>
> If you want to change the order of these 2 lists, you can do following the steps as illustrated in the picture. However, when you finish by click on the OK button:
> - It seems that the data in memory is not updated to the real model
> - You can see the order of elements are changed, but if you close the diagram and reopen it, everything returns to the moment before.
> - As a result, you don't see the Save icon is changed, a signal to show that the model is changed, which does not happen when you modified the text properties such Description or Name.
>
> The class of the dialog when we click the "..." button is FeatureEditorDialog.
> Hope that you can see the problem in this situation.
>


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:e4 tools error when exporting VSP
Next Topic:How to display an element outcoming from a foreign model (resource)
Goto Forum:
  


Current Time: Thu Jan 21 19:17:03 GMT 2021

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

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

Back to the top