Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [ECP] Custom E4 Application
[ECP] Custom E4 Application [message #1709735] Wed, 30 September 2015 15:03 Go to next message
Michael Shamiyeh is currently offline Michael ShamiyehFriend
Messages: 4
Registered: September 2015
Junior Member
Hello everybody,
I recently started exploring the EMF/ECP technologies and walked through the good introductions and tutorials on eclipsesource and vogella. Now I want to build my own custom application without using the tutorials and example projects, but encountered problems.

Working with Eclipse Mars 4.5, I created an E4 application and added an ECPModelView as well as an ECPRepositoryView as part to the application model. Further I created a simple EMF model and generated the code. Now I want to create arbitrary model instances within projects with help of the Model Explorer (ECPModelView).

Unfortunately, I couldn't figure out, how to use the EMF model as a basis for the ECPModelView. Is there something like a global model context for ECP views, where I can programmatically deposit my model?

It would be great, if someone could give me a hint on this!
Thanks in advance,
Michael
Re: [ECP] Custom E4 Application [message #1709857 is a reply to message #1709735] Thu, 01 October 2015 14:06 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 161
Registered: May 2015
Senior Member
Hi Michael,
so you want to reuse the ECPModelView as well as the ECPRepositoryView in your custom e4 application?
You should be able to right click in the modelview and create a new project. In there you should be able to add new model elements by again right clicking and selecting "New Model Element" .
You can find the ecp e4 application here:
http://git.eclipse.org/c/emfclient/org.eclipse.emf.ecp.core.git/tree/bundles/org.eclipse.emf.ecp.application.e4
and the implementation of all views here:
http://git.eclipse.org/c/emfclient/org.eclipse.emf.ecp.core.git/tree/bundles/org.eclipse.emf.ecp.ui.e4

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [ECP] Custom E4 Application [message #1709858 is a reply to message #1709857] Thu, 01 October 2015 14:10 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 161
Registered: May 2015
Senior Member
As you create your own e4 model, you will have to add at least two commands with the following handler classes:
org.eclipse.emf.ecp.ui.e4/org.eclipse.emf.ecp.ui.e4.handlers.NewProjectHandler
and
org.eclipse.emf.ecp.ui.e4/org.eclipse.emf.ecp.ui.e4.handlers.NewModelElementHandler

Don't forget to add handledMenuItems/HandledTooltems to use those handlers.

Cheers


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
icon14.gif  Re: [ECP] Custom E4 Application [message #1710258 is a reply to message #1709857] Mon, 05 October 2015 14:51 Go to previous message
Michael Shamiyeh is currently offline Michael ShamiyehFriend
Messages: 4
Registered: September 2015
Junior Member
Hi Eugen,
thanks for your help, your inputs were exactly what I needed!
I added the context menu items to the explorer one by one and my E4 ECP application is running smoothly now...
The fact that the menus were missing confused me a bit and made me think, that there is something wrong with my model plug-in deployment.
So thanks a lot again, and greetings!

Previous Topic:[EMF Forms] ItemPropertyDescriptor is null
Next Topic:[EMF Forms] Cannot edit models in Forms
Goto Forum:
  


Current Time: Sun Jul 12 01:19:48 GMT 2020

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

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

Back to the top