Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Open references listed in the generated editor.
[EEF] Open references listed in the generated editor. [message #722619] Tue, 06 September 2011 10:50 Go to next message
Thomas Muller is currently offline Thomas MullerFriend
Messages: 8
Registered: September 2011
Junior Member
Hi,

Using EEF, I gererated an editor (Element Editor) for some references.
These references appear in the TableViewer in the generated
(CompositePropertiesEditionPart)s of a dedicated view (there are MyPropertiesEditionPartImpl,and the MyPropertiesEditionPartForm).

I want to open the elements listed in the TableViewer in an appropriate editor.

To do so, I found the solution to add an IOpenListener to the tableViewer,
but this implies to modify the EEF generated code (this sounds pretty bad,
and painful at re-generation).

Is there a better way to do this ?
Thanks per advance.

Thomas.
Re: [EEF] Open references listed in the generated editor. [message #724976 is a reply to message #722619] Tue, 13 September 2011 15:59 Go to previous message
Eclipse UserFriend
Originally posted by:

Hi Thomas,

Comments below :


Le 06/09/2011 12:50, Thomas Muller a écrit :
> Hi,
> Using EEF, I gererated an editor (Element Editor) for some references.
> These references appear in the TableViewer in the generated
> (CompositePropertiesEditionPart)s of a dedicated view (there are
> MyPropertiesEditionPartImpl,and the MyPropertiesEditionPartForm).
>
> I want to open the elements listed in the TableViewer in an appropriate
> editor.
>
> To do so, I found the solution to add an IOpenListener to the
> tableViewer, but this implies to modify the EEF generated code (this
> sounds pretty bad, and painful at re-generation).
>
> Is there a better way to do this ?


you have 2 solutions.
the first one is to overrides the generated code by your code if
possible. You just need to change the provider used by EEF to do so.
you can create your own PropertiesEditionPartProvider that overrides the
generated one, then overrides the getPropertiesEditionPart method to
insert a test that will return your own PropertiesEditionPartImpl and
PropertiesEditionPartForm. Finally, your dedicated classes needs to
overrides the create() methods that creates the table viewer.

the second option is to overrides dynamically the acceleo templates to
insert your code at the right place.


> Thanks per advance.
>
> Thomas.


--
Cheers,

Stéphane Bouchet, OBEO
Previous Topic:Change the order of parameters that are displayed on property window
Next Topic:[EEF] first generation error
Goto Forum:
  


Current Time: Sat Dec 20 21:03:53 GMT 2014

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

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