eclipse e4 – create Application.xmi

How do you create this? The XMI is just a serialized form of the model instances. Its really xml so create an xml file the usual eclipse way.

Just ran into this. I don't know if there is a wizard that has already been made (there is a sample Application.xmi in the workbench fragment bundle) but you can just create an XML file with .xmi extension and add the application namespace to it. Then just right click and select the generic ecore emf form editor or "other..." (and find the generic ecore emf form editor in the etools feature).

I think you can add these entries to the top element:

   1: <application:MApplication xmi:version="2.0"
   2:     xmlns:xmi="http://www.omg.org/XMI"
   3:     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   4:     xmlns:application="http://www.eclipse.org/ui/2008/Application"
   5:     xmlns:workbench="http://www.eclipse.org./ui/2008/Workbench"> 
   6:  
   7: .... 
   8:  
   9: </application:MApplication> 

If you are having schema resolution issues maybe adding the following to
the toplevel element may work:



   1: xsi:schemaLocation="http://www.eclipse.org/ui/2008/Application
   2: platform:/plugin/org.eclipse.e4.ui.model.workbench/model/Application.ecore
   3: http://www.eclipse.org/ui/2008/Workbench
   4: platform:/plugin/org.eclipse.e4.ui.model.workbench/model/Workbench.ecore" 

or add the mapping under Preferences in the XML editor preferences.

 


If you checked out from CVS the org.eclipse.e4.ui.model.workbench bundle you would see the models and could open the model diagram and see how to build the XML. Remember its an EMF model so it has elements in it that are in the EMF part of the model as well as what is directly in the defined ecore model.

Popular posts from this blog

React, Redux, Recompose and some simple steps to remove "some" boilerplate and improve reuse

graphql (facebook), falcor (netflix) and odata and ...

Using wye and tee with scalaz-stream