Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Programmatically adding elements to a Representation
Programmatically adding elements to a Representation [message #1702209] Mon, 20 July 2015 16:10 Go to next message
Lukas Meier is currently offline Lukas MeierFriend
Messages: 2
Registered: July 2015
Junior Member
Hi all,

I have an ECore-Model and a Representation. When I programmatically manipulate the model, these changes should also be shown in the Representation.
For EReferences, EAttributes, etc. this works fine by default. But for children of EPackages (like EClass or EPackage) the elements are created in the model, but not shown in the Representation. I have to add them manually using the editor. It's the same way when the elements in the model are created manually.*

Is there a way to programmatically create representation elements for elements added to the model?

Thank you
Lukas

*I edited the model in the tree editor, saved it and hit the refresh-button in the Representation.
Re: Programmatically adding elements to a Representation [message #1702334 is a reply to message #1702209] Tue, 21 July 2015 15:31 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Lukas,

Are you based on your own modeler or are you using Ecore-tools ?
The Ecore-tools diagram elements are “unsynchronized” (this option can
be specified for each mapping in the *.odesign ) . That means the
representation elements have to be manually added by using the palette
tools.

Regards,

Florian


On 07/20/2015 07:37 PM, Lukas Meier wrote:
> Hi all,
>
> I have an ECore-Model and a Representation. When I programmatically
> manipulate the model, these changes should also be shown in the
> Representation.
> For EReferences, EAttributes, etc. this works fine by default. But for
> children of EPackages (like EClass or EPackage) the elements are created
> in the model, but not shown in the Representation. I have to add them
> manually using the editor. It's the same way when the elements in the
> model are created manually.*
>
> Is there a way to programmatically create representation elements for
> elements added to the model?
>
> Thank you
> Lukas
>
> *I edited the model in the tree editor, saved it and hit the
> refresh-button in the Representation.


--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Programmatically adding elements to a Representation [message #1702756 is a reply to message #1702334] Fri, 24 July 2015 13:23 Go to previous message
Lukas Meier is currently offline Lukas MeierFriend
Messages: 2
Registered: July 2015
Junior Member
Hi Florian,

I'm using Ecore-tools.
I will try to find out how adding elements is implemented by the Representation editor.

Thank you
Previous Topic:CPN editor creation with sirius
Next Topic:Different options to specify label position around border node
Goto Forum:
  


Current Time: Thu Apr 25 13:44:02 GMT 2024

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

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

Back to the top