Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [ECP][EMFForms]Emtpy standard view for ecore model
[ECP][EMFForms]Emtpy standard view for ecore model [message #1735723] Wed, 22 June 2016 09:15 Go to next message
Martin Weber is currently offline Martin WeberFriend
Messages: 4
Registered: June 2016
Junior Member
Hi,

I created an RCP 3.x application and intergated EMFStore and ECP. Everithing works fine until, I try to open a EClass or an other ecore model element from the Model Explorer. For example when I open a EClass node in the model explorer, it shows an almost emtpy frame in the editor area with a header [EClass], an empty tab at the top of the editor area and a tab like thing with title "Standard View" at the bottom.

On the console the following exceptions are logged:

!ENTRY org.eclipse.equinox.ds 1 0 2016-06-22 10:55:07.716
!MESSAGE Could not bind a reference of component EMFFormsViewService. The reference is: Reference[name = Provider, interface = org.eclipse.emf.ecp.view.spi.provider.IViewProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addProvider, unbind = removeProvider]

!ENTRY org.eclipse.emf.ecp.view.model 4 0 2016-06-22 10:55:08.024
!MESSAGE No view service of type 'org.eclipse.emfforms.spi.swt.core.di.EMFFormsContextProvider' found.

!ENTRY org.eclipse.emf.ecp.view.model 4 0 2016-06-22 10:55:08.025
!MESSAGE The given ViewModelContext does not have a EMFFormsContextProvider. Hence, no renderer instance can be created.

!ENTRY org.eclipse.emf.ecp.view.model 4 0 2016-06-22 10:55:08.026
!MESSAGE Rendering not possible due to: No fitting EMFFormsRendererService for View available!.
!STACK 0
org.eclipse.emf.ecp.ui.view.ECPRendererException: No fitting EMFFormsRendererService for View available!
at org.eclipse.emf.ecp.view.internal.swt.ECPSWTViewRendererImpl.render(ECPSWTViewRendererImpl.java:95)
at org.eclipse.emf.ecp.editor.internal.e3.MEEditorPage.createFormContent(MEEditorPage.java:132)
at org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:152)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150)
at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:471)
...


Do I have to register the EMFFormsContextProvider somewhere manually? Where?

I'm new to ECP and EMFStore, so any help would be highly appreciated.

Thanks,
Martin
Re: [ECP][EMFForms]Emtpy standard view for ecore model [message #1735930 is a reply to message #1735723] Thu, 23 June 2016 16:59 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 127
Registered: May 2015
Senior Member
Hi Martin,

thank you for using ECP.
No you don't need to register anything manually. You are missing some bundles in your runconfig.
If you use ECP 1.9 released yesterday together with Eclipse Neon, you will find a bundle org.eclipse.emfforms.setup.base in the list of available plugins in your runconfig. Add this one and all necessary dependencies to your runconfig.
If you want to edit an ecore file using ecp/emfforms you will need org.eclipse.emfforms.editor.ecore and its dependencies.
If you use ECP 1.8 you should add org.eclipse.emf.ecp.view.core.swt, org.eclipse.emfforms.swt.core.di, org.eclipse.emfforms.databinding.emf and all dependencies. But I would strongly recommend to update to 1.9 and use the org.eclipse.emfforms.setup.base bundle.

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [ECP][EMFForms]Emtpy standard view for ecore model [message #1736183 is a reply to message #1735930] Mon, 27 June 2016 11:08 Go to previous messageGo to next message
Martin Weber is currently offline Martin WeberFriend
Messages: 4
Registered: June 2016
Junior Member
Hi Eugen,

Thank you for your help. You enabled me to show the editor for ecore object such as EClass and EAttribute.
But what I'm still missing is the possibility to set the datatype for an EAttribute...
Is this a special plugin/feature? Which?

I read this blogposts from eclipse source, but I miss a documentation which gives me an overview, where to start looking for certain functionality. Something like an architecture description, which shows the overall picture.

Is there a documentation or overview where I can see which plugins provide which features?

Thanks,
Martin
Re: [ECP][EMFForms]Emtpy standard view for ecore model [message #1736263 is a reply to message #1736183] Tue, 28 June 2016 06:14 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi Martin,

can you share, what you actually want to do? If you want an Ecore
editor, you might be interested in:
http://eclipsesource.com/blogs/2016/02/11/emf-forms-1-8-0-feature-ecore-editor-reloaded/

If you want to edit Ecores in ECP, you will probably need to add some
custom controls, as the Ecore meta-model is special at some places.

Best regards

Jonas


On 27.06.2016 13:08, Martin Weber wrote:
> Hi Eugen,
>
> Thank you for your help. You enabled me to show the editor for ecore
> object such as EClass and EAttribute.
> But what I'm still missing is the possibility to set the datatype for an
> EAttribute... Is this a special plugin/feature? Which?
> I read this blogposts from eclipse source, but I miss a documentation
> which gives me an overview, where to start looking for certain
> functionality. Something like an architecture description, which shows
> the overall picture.
>
> Is there a documentation or overview where I can see which plugins
> provide which features?
>
> Thanks,
> Martin
Re: [ECP][EMFForms]Emtpy standard view for ecore model [message #1736341 is a reply to message #1736263] Tue, 28 June 2016 14:26 Go to previous messageGo to next message
Martin Weber is currently offline Martin WeberFriend
Messages: 4
Registered: June 2016
Junior Member
Hi Jonas

I try to create an RCP editor which allows creating models based on Ecore. Because these models define a domain specific language, the idea is to define the language based on EClass, EAttribute and EReference.
These models will be later interpreted by an other RCP application which will use EMF Forms to create and edit instances of the models defined in the first editor.

A days ago, I already read the blog you mentioned. I was expecting that the ecore editor will be used when I select only the ecore model in the context menu "Fitler Model Elements" of the ECP model explorer.
Am I wrong with this assumption? Is it the generic editor unless I specify an other one?
What do I have to configure to use the ecore editor?
How does the EcoreEditor work together with the ECP Model Explorer?
How can I provide ecore as the default model for ECP?

Thanks for your help,
Martin
Re: [ECP][EMFForms]Emtpy standard view for ecore model [message #1736437 is a reply to message #1736341] Wed, 29 June 2016 12:15 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi Martin,

the ECP model explorer and the editor are two separate components.
The model explorer can show the hierachy of any EMF model instance. It
does not show "files", but projects. Projects can be filled from
different sources, of which one is a file. However in gerenal, the model
explorer abstracts from files and does not show them to the uiser. The
model explorer can also show Ecore models, as Ecore is defined itself in
Ecore. Although I would say the standard case is to show a custom model
instance in the model explorer, I currently do not know any adopter
using it for Ecore. The model explorer allows to open single instances
in the ECP editor, which embeds EMF Forms for showing the attributes.

The EMF Forms generic editor is an integration into the IDE providing a
ready to use editor, which reads in an XMI file and shows its complete
contents. Therefore, it also embedd EMF Forms. The EMF Forms ecore
editor is a subclass, which additionally adds custom renderers for Ecore
and actions, e.g. to generate code. This editor can also be embedded
into an RCP application (without the model explorer).

So it depends a little bit on how you want your application to look
like. If you want to have one editor per model, the EMF Forms editor is
probably a good starting point (maybe with some adpatations). If you
want to use the model explorer, you might want to reuse the custom
renderers we have written for the Ecore editor. As the are plugged into
EMF Forms, they are pretty independant to be reused.

I hopw this clarifies things a bit.

Best regards

Jonas


On 28.06.2016 16:26, Martin Weber wrote:
> Hi Jonas
>
> I try to create an RCP editor which allows creating models based on
> Ecore. Because these models define a domain specific language, the idea
> is to define the language based on EClass, EAttribute and EReference.
> These models will be later interpreted by an other RCP application which
> will use EMF Forms to create and edit instances of the models defined in
> the first editor.
>
> A days ago, I already read the blog you mentioned. I was expecting that
> the ecore editor will be used when I select only the ecore model in the
> context menu "Fitler Model Elements" of the ECP model explorer.
> Am I wrong with this assumption? Is it the generic editor unless I
> specify an other one?
> What do I have to configure to use the ecore editor? How does the
> EcoreEditor work together with the ECP Model Explorer?
> How can I provide ecore as the default model for ECP?
>
> Thanks for your help,
> Martin
>
Re: [ECP][EMFForms]Emtpy standard view for ecore model [message #1736750 is a reply to message #1736437] Fri, 01 July 2016 13:08 Go to previous message
Martin Weber is currently offline Martin WeberFriend
Messages: 4
Registered: June 2016
Junior Member
Hi Jonas

Thank you. This clarifies things.
Thanks to your answer and with having a look into the source code, I was able to get my solution for the ecore model up and running.
I'm now able to define the ecore model in my RCP.

Best regards,
Martin
Previous Topic:Managing dependencies between EMF resources.
Next Topic:[EEF 1.6] Using EEF 1.6 Standalone (Without Sirius)
Goto Forum:
  


Current Time: Wed Nov 22 01:51:30 GMT 2017

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

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