Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Customized Edit and Editor generated code that suppress some model objects
Customized Edit and Editor generated code that suppress some model objects [message #1059786] Tue, 21 May 2013 11:27 Go to next message
kon f is currently online kon f
Messages: 34
Registered: March 2012
Member
Hey,

I'm trying to build a visual editor for my ecore model with the generated Edit and Editor plugins. The generated editor reflects the exactly the hierarchical structure of my ecore model. If my model consists of A -> B -> C, then the user needs to provide A first, followed by B and complete the task with C. I would like to adjust the visual editor, so the user is able to enter directly A -> C (B is suppressed in the visual editor, but not in the source xml file). The actual creation of B is performed implicit while C is generated.

Is this possible? I'm quite new to EMF, so some source code would be really helpful!

Thank you.

Kon
Re: Customized Edit and Editor generated code that suppress some model objects [message #1059867 is a reply to message #1059786] Tue, 21 May 2013 23:14 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 24570
Registered: July 2009
Senior Member
Kon,

In general when writing an editor you'll want to do all changes to the
model via commands so it would be possible for example to support a
createAddCommand/createSetCommand for AItemProvider that allows a C to
be added/set to an A, and it the specialized AddCommand, you'd ensure
there a.getB() isn't null and if it is, you'd create a B and set it and
then in either case add/set the C into the B.


On 21/05/2013 5:27 PM, kon f wrote:
> Hey,
>
> I'm trying to build a visual editor for my ecore model with the
> generated Edit and Editor plugins. The generated editor reflects the
> exactly the hierarchical structure of my ecore model. If my model
> consists of A -> B -> C, then the user needs to provide A first,
> followed by B and complete the task with C. I would like to adjust the
> visual editor, so the user is able to enter directly A -> C (B is
> suppressed in the visual editor, but not in the source xml file). The
> actual creation of B is performed implicit while C is generated.
> Is this possible? I'm quite new to EMF, so some source code would be
> really helpful!
>
> Thank you.
>
> Kon
Previous Topic:[CDO] Programmatically get the DB mapping
Next Topic:How to resolve this error?
Goto Forum:
  


Current Time: Tue May 28 11:38:00 EDT 2013

Powered by FUDForum. Page generated in 0.04641 seconds