Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Using the EMF Client Platform(I'm a bit confused about how to use the EMF Client Platform)
Using the EMF Client Platform [message #1069939] Tue, 16 July 2013 23:30 Go to next message
Phillip Drew is currently offline Phillip Drew
Messages: 75
Registered: October 2012
Member
So I've started looking at the EMF Client Platform and I'm a bit confused.

The tutorials seem mostly geared towards controlling the appearance and functionality of the application however I'm a bit lost regarding actually creating a RCP / RAP application using ECP.

Since it doesn't use code generation etc. I can't seem to find anything easily identifiable as the plugins I need to include in an Eclipse product. The whole process seems too simple at the moment because I can't find where I should be controlling these things!
Re: Using the EMF Client Platform [message #1069941 is a reply to message #1069939] Tue, 16 July 2013 23:34 Go to previous messageGo to next message
Phillip Drew is currently offline Phillip Drew
Messages: 75
Registered: October 2012
Member
(Or on that note integrating something creating using ECP back into my development IDE)
Re: Using the EMF Client Platform [message #1070084 is a reply to message #1069939] Wed, 17 July 2013 08:00 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 427
Registered: July 2009
Senior Member
Hi,

I have actually already started to write a tutorial describing this. I
only need to finally complete it, so I think I might be able to publish
it later this day. I will post a link here.
Do you need it more urgently for RCP or RAP?

Regards

Jonas



Am 17.07.2013 01:30, schrieb Phillip Drew:
> So I've started looking at the EMF Client Platform and I'm a bit confused.
>
> The tutorials seem mostly geared towards controlling the appearance and
> functionality of the application however I'm a bit lost regarding
> actually creating a RCP / RAP application using ECP.
>
> Since it doesn't use code generation etc. I can't seem to find anything
> easily identifiable as the plugins I need to include in an Eclipse
> product. The whole process seems too simple at the moment because I
> can't find where I should be controlling these things!
Re: Using the EMF Client Platform [message #1070405 is a reply to message #1070084] Wed, 17 July 2013 22:45 Go to previous messageGo to next message
Phillip Drew is currently offline Phillip Drew
Messages: 75
Registered: October 2012
Member
Either should be fine to get me started - and presumably they don't differ so dramatically that knowing one doesn't help to understand the other?
Re: Using the EMF Client Platform [message #1072174 is a reply to message #1070405] Mon, 22 July 2013 08:31 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 427
Registered: July 2009
Senior Member
Hi,
I have added a new bullet to http://eclipse.org/emfclient/documentation.html
"Define a custom product/feature based on ECP"
Could you check and tell me if that helps you?

Regards

Jonas

Am 18.07.2013 00:45, schrieb Phillip Drew:
> Either should be fine to get me started - and presumably they don't
> differ so dramatically that knowing one doesn't help to understand the
> other?
Re: Using the EMF Client Platform [message #1082240 is a reply to message #1072174] Thu, 08 August 2013 09:35 Go to previous messageGo to next message
Phillip Drew is currently offline Phillip Drew
Messages: 75
Registered: October 2012
Member
Sorry my response has taken so long, and thanks for the prompt reply.

That does help with how to create an application that uses the ECP, however I'm still a bit lost regarding how to utilise individual components.

I want to insulate users from the EMF Store repository, and the idea of 'projects' in the Model Explorer. I assume that level of customisation isn't possible so I'll have to just use the editors? How can I just use the ECP editors and how can I easily open an editor on a model element?

Thanks!

Re: Using the EMF Client Platform [message #1082282 is a reply to message #1082240] Thu, 08 August 2013 10:48 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal Karaca
Messages: 743
Registered: July 2009
Senior Member
We have done exactly that by defining a custom ECPProvider that takes an in-memory EObject and renders it using the UI capabilities of ECP without the usage workflow of ECP (model repository, workspace projects, etc.).
I will ask to contribute it to ECP if that is of interest...

Phillip Drew wrote on Thu, 08 August 2013 11:35
Sorry my response has taken so long, and thanks for the prompt reply.

That does help with how to create an application that uses the ECP, however I'm still a bit lost regarding how to utilise individual components.

I want to insulate users from the EMF Store repository, and the idea of 'projects' in the Model Explorer. I assume that level of customisation isn't possible so I'll have to just use the editors? How can I just use the ECP editors and how can I easily open an editor on a model element?

Thanks!


Re: Using the EMF Client Platform [message #1082940 is a reply to message #1082240] Fri, 09 August 2013 08:28 Go to previous message
Jonas Helming is currently offline Jonas Helming
Messages: 427
Registered: July 2009
Senior Member
Hi,

There are two ways you can go:
1. If you want to use the core of ECP (i.e. the provider, the
repositories, projects. observerbus, etc.) in the background and just
want to provide another UI to it, you can do so by using the API. This
way you can things such as projects from the user. BDW, many things such
as the EMFStore are exchangeable in the existing UI. If none of the
existing providers (CDO, EMFStore or File) fits your needs, you can
implement an own one, as Erdal stated.

2. You can only use the editor. You implement your own backend and own
views to open the editor. This possibility is explicitly supported. It
is not part of the official API, yet, that is planed for 1.1. However, I
would recommend to already use it. The API might change a bit until 1.1,
but this only affects a few methods and should not require much
migration efforts. To open an editor, you can either use:

a) EditorFactory#getEditorComposite(ECPControlContext
modelElementContext) This allows you to render the content of the editor
into any existing view (in case of SWT a composite)

b) MEEditorInput input = new MEEditorInput(new YourEditorContext(),
shell);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input,
"org.eclipse.emf.ecp.editor", true);
This will open a view in the workbench containing an editor.


The editor basically only requires an EObject to be opened.
Additionally, it requires some methods to be implemented, which allow
the editor to talk to the layer managing all EObjects. As an example,
the editor needs an EditingDomain.
In the default case, if you use the ecp core, the editor calls the
project, from which a EObject was opened. However, all necessary calls
are abstracted in an interface called ECPControlContext. If you don't
use the ecp core layer, but want to adapt the editor to your own backend
(or in-memory EObjects), you need to provide an own implementation of
ECPControlContext. You can look at ECPControlContextImpl, how the
methods are implemented for ecp core.
Some of the methods are only needed, if references are rendered in the
editor. If you only display EAttributes, you can leaves these
unimplemented. We plan to move these methods out of the
ECPControlContext anyways:

openInNewContext
addModelElement
getNewElementFor
getExistingElementFor
createSubContext

The ECPControlContext allows to render the inner component of the
editor. For the view, an ECPEditorContext is required, which is a
sub-interface of ECPControlContext. It adds the possibility to dispose
the context. This is required to close the views showing elements, if
they are deleted (in case of the ecp core from a project).

If you are unsure, which way to go, you can ping me on Skype:
"JonasHelming". If you describe me your requirements a little more in
detail, I can more easily tell you, which way is better for you.

Regards

Jonas




Am 08.08.2013 11:35, schrieb Phillip Drew:
> Sorry my response has taken so long, and thanks for the prompt reply.
>
> That does help with how to create an application that uses the ECP,
> however I'm still a bit lost regarding how to utilise individual
> components.
>
> I want to insulate users from the EMF Store repository, and the idea of
> 'projects' in the Model Explorer. I assume that level of customisation
> isn't possible so I'll have to just use the editors? How can I just use
> the ECP editors and how can I easily open an editor on a model element?
>
> Thanks!
>
>
Previous Topic:EMFStore
Next Topic:GMF in the EMF Client Platform
Goto Forum:
  


Current Time: Thu Sep 18 09:49:50 GMT 2014

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

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