Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF 1.6] Using EEF 1.6 Standalone (Without Sirius)
[EEF 1.6] Using EEF 1.6 Standalone (Without Sirius) [message #1736831] Sat, 02 July 2016 13:35 Go to next message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 144
Registered: February 2012
Senior Member
Hello!

I'd like to use EEF 1.6 with hand-coded GEF-based editor. An editor is a form editor, rather then diagram editor, so it's hand-coded rather then Sirius-based. I'd like to use EEF to implement property pages for it, but don't know where to start. I have installed EEF 1.6 SDK to my eclipse, but there is no EEF Model editor from what I can see. I also haven't found any documentation on how to use new EEF without Sirius, with hand-coded/EMF Generated editors.

Please, provide any kind of guide/tutorial/article or just hints on how to use new EEF without Sirius.

Thanks in advance!
Re: [EEF 1.6] Using EEF 1.6 Standalone (Without Sirius) [message #1736885 is a reply to message #1736831] Mon, 04 July 2016 08:27 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 370
Registered: July 2009
Senior Member
Le 02/07/2016 15:35, Leonid Ripeynih a écrit :
> Hello!

Hi.

> I'd like to use EEF 1.6 with hand-coded GEF-based editor. An editor is a
> form editor, rather then diagram editor, so it's hand-coded rather then
> Sirius-based. I'd like to use EEF to implement property pages for it,
> but don't know where to start. I have installed EEF 1.6 SDK to my
> eclipse, but there is no EEF Model editor from what I can see.

EEF 1.6 only provides a runtime, and no authoring tools to create the
EEF model. In the standard use case, Sirius provides this part and feeds
the EEF runtime with the model it needs. If you want to use EEF 1.6
without Sirius you will need to create the EEF model yourself, either
programmatically or using an EMF refective editor.

> I also
> haven't found any documentation on how to use new EEF without Sirius,
> with hand-coded/EMF Generated editors.
>
> Please, provide any kind of guide/tutorial/article or just hints on how
> to use new EEF without Sirius.

The documentation for EEF 1.6 is available at
https://eclipse.org/eef/#/documentation/1.6.0. It describes the
metamodel that the runtime takes as input, and the extension points.

I don't think this scenario is documented yet, but off the top of my
head, it would involve:

- In your editor implementation, return an instance of
org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage when asked
for an IPropertySheetPage in the getAdapter(Class type) method;
- Implement the org.eclipse.eef.properties.ui.eefTabDescriptorProvider
extension point by providing an implementation of
org.eclipse.eef.properties.ui.api.IEEFTabDescriptorProvider. This is the
"meat" of the implementation, where the EEF runtime gives you (i) the
current editor instance, and (ii) the current selection, and expects you
to return a Collection<IEEFTabDescriptor> which fully describes the EEF
1.6-based tabs you want to provide.

In a Sirius context, the IEEFTabDescriptorProvider uses the Sirius
configuration model (in the *.odesign files) to create the corresponding
IEEFTabDescriptors. You can have a look at
org.eclipse.sirius.ui.properties.internal.tabprovider.SiriusTabDescriptorProvider,
and in particular the getTabDescriptors() and createEEFView() methods.

The dynamic nature of EEF 1.6 means that a lot of its behavior is
defined by expressions evaluated at runtime. In Sirius this is done by
reusing the Sirius session's expression interpreter. Outside of it
you'll need to provide your own implementation.
org.eclipse.eef.tests.internal.AQLInterpreter can serve as a good base.

You will also need to give EEF an implementation of
org.eclipse.eef.core.api.EditingContextAdapter. If your editor uses a
TransactionalEditingDomain from EMF Transaction,
org.eclipse.sirius.ui.properties.internal.TransactionalEditingDomainContextAdapter
should be a good start too.

Regards,
Pierre-Charles David

--
Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
Previous Topic:[ECP][EMFForms]Emtpy standard view for ecore model
Next Topic:emf databinding with unsetable primitive
Goto Forum:
  


Current Time: Tue Nov 21 07:58:26 GMT 2017

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

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