Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [ECP] Custom E4 Application
[ECP] Custom E4 Application [message #1709735] Wed, 30 September 2015 11:03 Go to next message
Eclipse UserFriend
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 10:06 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: [ECP] Custom E4 Application [message #1709858 is a reply to message #1709857] Thu, 01 October 2015 10:10 Go to previous messageGo to next message
Eclipse UserFriend
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
icon14.gif  Re: [ECP] Custom E4 Application [message #1710258 is a reply to message #1709857] Mon, 05 October 2015 10:51 Go to previous message
Eclipse UserFriend
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: Thu Jul 10 00:24:57 EDT 2025

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

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

Back to the top