Customized Edit and Editor generated code that suppress some model objects [message #1059786] |
Tue, 21 May 2013 11:27  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03626 seconds