Skip to content

Tag: Eclipse Modeling Framework

Installing Eclipse for EMF/GEF Development

The eclipse development platform is one of the easiest programs to install. You just download it from the eclipse web site packed in a zip file, unpack… and that’s it. No need to do anything else.

But that is just the start. After this you have to download added plug-ins, depending on what you want to do. This semester I am the supervisor of a team of students who are helping me develop the OPM editor, and they need instructions on what to install and how to do it. And what a great opportunity to share this with the world. Who knows… maybe I’ll help someone else.

Back to reality. So you downloaded eclipse (I started with the most simple download, the eclipse IDE for java developers, indigo sr2), unpacked and double clicked on the eclipse.exe (or eclipse if you are in linux, but you probably didn’t click on anything). When starting eclipse, you are asked where your workspace will be located. I have a workspace for each project I am working in, but you can do whatever you like. BTW, I assume that you have already installed Java and Git. If not, you need to install them before working on the project.

Now that eclipse has started, you need to download all of the plug-ins required to develop and execute the project. This is done by selecting “Help->Install New Software…” from the menu:

In the window that pops up, select “–All Available Sites–” from the drop-down menu. This will download all available plug-ins that you can install from the defined update sites. This operation may take some time if your connection is slow or the download sites are loaded, so be patient.

Ok. The window loaded with lots of things in it. What do you need? Here is the short list:

  1. EMF (Eclipse Modeling Framework): under “Modeling”, select “EMF – Eclipse Modeling Framework SDK”.
  2. GEF (Graphical Editing Framework): under “Modeling”, select “Graphical Modeling Framework GEF SDK”.
  3. PDE (Plug-in Development Environment): under “General Purpose Tools”, select “Eclipse Plug-in Development Environment”.

This should give you the “bare-bones” GEF/EMF development platform. Click on “Finish”, accept all the licenses (have you ever read them?) and go!. After the update manager downloads the packages and installs them, reboot the platform. You are ready to go!

Now if you want to start working on my project, import the projects into eclipse. From the File menu, select import:

Select “projects from Git” in the wizard:

Select URI as the repository’s source:

And enter the URI of the repository in the next wizard page (here I’m importing from the Object-Process-Programming repository):

Clicking on “next” will bring a page showing the branches to import. If undecided, just select them all and click “next” again. In this page will ask where to locate the repository. Set it to an easy to find place because later you may need to access Git manually (I use “c:\temp\Object-Process-Programming” in my example, but you should probably put it someplace else):

Click “next” one last time. Eclipse will now clone the repository and as you what to do with the contents. Since I’m developing using eclipse projects, they can be directly imported into eclipse (the first option in the next wizard page), so click next. Now you will get a list of all the projects that exist inside the repository. Select the projects you need (all projects starting with “com.vainolo.phd.opm” which ARE NOT located in the “archive”. My repository is a bit of a mess but since I’m a researcher allow myself to do this):

Finally, you can click on “Finish”. You can see your projects in the eclipse project view:

One last thing… For some strange reason even though the projects were imported from Git they are not shared (i.e. you cannot use the git functionality directly on them). To “share” this projects you select them all, right-click and select “Team->Share Project…”, which should open the following window:

You obviously want to share the projects with Git, so click “next”. Mark “Use or create repository in parent folder of project”, since the projects are already in a Git repository:

And click on finish. Now you have fully Git-able projects on which you can work. You can pull, push, rebase, branch, add, commit, etc…, and all of it from inside eclipse. Enjoy.

Enhanced by Zemanta