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=""
   3:     xmlns:xsi=""
   4:     xmlns:application=""
   5:     xmlns:workbench=""> 
   7: .... 
   9: </application:MApplication> 

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

   1: xsi:schemaLocation="
   2: platform:/plugin/org.eclipse.e4.ui.model.workbench/model/Application.ecore
   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

zio layers and framework integration

typescript and react types

dotty+scala.js+async: interesting options