In this post I will show you how to setup the EMF IDE which we will use for the Eclipse Modeling Framework on Windows. It should be similar on Linux as well if you use the Graphical Environment.
I will show two ways to setup the IDE – directly download a specifically build Eclipse IDE with all the needed packages and frameworks inside and installing the required packages and frameworks to your existing Eclipse IDE
Using EMF (Eclipse Modeling Framework) IDE
The easiest way to start with EMF is to download the IDE, which is specifically designed for that purpose. In the previous post I have given a link to download that IDE.
It will be downloaded as a .zip archive. All you have to do is to unzip the archive in a preferred folder.
After that start the eclipse.exe executable. It is quite possible that you might get the following error:
In this case you should do the following. First of all make sure that you have Java Run Time Environment 1.8 installed. Then add the path to the bin folder of the JRE to the Environment Variables Path variable. Once you add it there the IDE should start without any issues.
When you launch the IDE and select a preferred workspace you should see the Welcome screen. You can verify that everything is fine by creating a new project and when asked for the project type you should be able to see the Eclipse Modeling Framework projects available:
At this point you are good to go. You can proceed with the next posts on how to use Eclipse Modeling Framework
Installing the EMF packages to an existing Eclipse IDE
If you already have some Eclipse IDE and you want to use it instead of downloading another IDE, then you will need to perform the following steps. However, this isn’t my preferred approach and you might have some issues with it. Post any questions regarding such issues in the comments section.
First of all, open your IDE. Click on Help >> Install New Software.
Select the http://download.eclipse.org website to download the packages from. On your side it might look different then mine. Usually it is the first available site in the dropdown menu. Once you select the site you should be able to see different types of packages. Find and expand the Modeling section
If you are not constrained by memory, you can go ahead and install all packages from the Modeling section. This way you will make sure that all needed packages are available. If you don’t want to download and keep all the packages (we won’t be using most of them probably) on your Eclipse installation, just install the packages, listed below. Keep in mind that later you might need to install additional packages from the Modeling section. Also keep in mind that the packages that I have listed might not be available for the version of your IDE or maybe their version will differ slightly.
Here is the list of required packages:
- Ecore Diagram Editor (SDK)
- EMF – Eclipse Modeling Framework SDK
- EMF – Eclipse Modeling Framework Xcore SDK
- EMF Forms SDK 18.104.22.16800303-1319
- EMF Validation Framework SDK
- MWE SDK
- MWE 2 Language SDK
- MWE 2 runtime SDK
- Xpand SDK
- XSD – XML Schema Definition SDK
- Xtext complete SDK
You should also install CDT if you don’t have it already. It is found in the http://download.eclipse.org/tools/cdt/releases repository. Just make sure to pick the correct release version if you don’t have it already available. From there you need to install C/C++ Development Tools. Optionally you can also install C/C++ Development Tools SDK.
One last thing to install is found in the following repository: http://download.eclipse.org/modeling/m2t/xpand/updates/releases/. This is related to Xpand/Xtend. Once you add this repository, you should find the following packages and install them (keep in mind that there might be a newer version, if so install it instead):
- M2T Xpand/Xtend-2.2.0
- M2T Xpand/Xtend Additional-2.2.0
After installing all those packages you should be good to go. As with the first approach of getting the Eclipse Modeling Framework IDE, you can verify that your installation is complete if you try to create an Eclipse Modeling Project
Side Note: On my side I had issues installing the packages from the Modeling section. There is a thread on StackOverflow which might help you. It didn’t help me much though. That is why I prefer the first approach.
In this post I showed you how to install the Eclipse Modeling Framework IDE – either by getting it directly from the Eclipse web site as one complete IDE, which is the easiest way or by installing the required packages to your existing IDE. Choose what suits you best. Now after you have the IDE we can go ahead with the real fun and start generating code. The next post will describe how to create an Ecore model, needed for the code generation.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?
Passionate developer, loving husband and caring father. As an introvert programming is my life. I work as a senior software engineer in a big international company. My hobbies include playing computer games (mostly World of Warcraft), watching TV series and hiking.