Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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: Mon Jul 14 18:04:42 EDT 2025

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

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

Back to the top