Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Copy elements of a class to another class?
Copy elements of a class to another class? [message #732299] Tue, 04 October 2011 13:13
Iban Ayestaran is currently offline Iban AyestaranFriend
Messages: 58
Registered: September 2011

I am designing a DSL with EMF/GMF and I have an ecore model with two kinds of blocks: one called MainBlock and the other main DerivedBlock.

The idea is that the user has to design a MainBlock (which may have lots of components inside), and then in the same diagram he can declare a DerivedBlock.

What I want to do is to automatically generate a copy of the mainblock (of all its components, I mean) when the user decides to define a DerivedBlock. So the workflow should be this:

1. User defines a MainBlock. (drag&drop a MainBlock block to the empty diagram)
2. User draws all the MainBlock components.
3. User defines a DerivedBlock (drag&drop a DerivedBlock diagram). The components of the MainBlock are automatically copied to the DerivedBlock, so initially it has the same aspect as the MainBlock.
4. The user may edit the DerivedBlock.

So my question is: how can I make a copy of the mainblock automatically when I define a DerivedBlock??

it would be great if the components of the derivedblock were updated every time the MainBlock is updated, but maybe this is too much...
Previous Topic:Help with specific layout
Next Topic:Moving a Node with connected source/target Edge doesn't update the bendpoint
Goto Forum:

Current Time: Mon May 28 01:49:16 GMT 2018

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

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

Back to the top