Branching Support for the EMFStore Model Repository

July 23, 2012 | 3 min Read

EMFStore is a model repository based on EMF and the Eclipse RCP application framework. It enables EMF and RCP based applications to easily version and distribute their domain models with very few modifications.

Technically EMFStore works similarly to a CVS/SVN repository. The user can execute operations such as update and commit on the given model and synchronize it with a centralized repository. EMFStore has built-in merge support for resolving model version conflicts. It offers a history view to follow all changes in detail.

During the last month we have worked on a major new feature for EMFStore. With the next release we will deliver branching support for models managed with EMFStore. As mentioned, the resemblance to CVS/SVN remains. Users are able to branch off any version and modify the model in a separate version branch. Reintegrating separate branches is supported by our visual merging tools, which enable decision-making on a fine-grained level. Furthermore, we have enhanced the history view with a git-like version graph, allowing the user to quickly understand the relationships between different versions.

In the following we will present the new feature in more detail. The UI elements shown in the screenshots are quite close to final. In our sample use-case we will organize a football league, which was modeled with EMF. After creating a basic template for the league, two branches were created. As you can see in the first screenshot, the projects are now decorated with the name of the branch, version and author, similar to team providers in Eclipse.

As you would expect, we have added new menu items for creating branches or merging existing branches into your current project. You can checkout the same project as often as you want and in any version and branch.

The visual changes are minor if you are used to EMFStore in the default configuration. However, we put more UI work into a new History Browser which presents the project’s progress at a glance. This history view works similarly to the history view used in EGit. In fact we have reused code from EGit in order to represent the version graphs.

As you can see on the next screenshot, all versions are displayed with the branched versions shown in different colors for clarity. You can toggle version nodes to see the changes in the particular version in more detail.

All the views presented here are shipped with EMFStore out of the box but can be exchanged, removed or modified as needed. We have put emphasis on creating a framework which can be easily extended. For example creating a whole new merge dialog is possible while using the same merge logic. Alternatively one can exchange the logic and use the same dialog or create custom merge widgets for special cases in your model.

Despite all the user interfaces we discussed previously in this post, EMFStore is actually a headless application with a server application and a client-side API. The client-side API allows you to access anything you see in the UI and more. Based on the API you can build your own views and integrate EMFStore into your own RCP application. To get started with EMFStore please visit our webpage at https://eclipse.org/emfstore.

Join me on Google+ Follow @EMFStore

Maximilian Koegel and Jonas Helming, EclipseSource Munich leads

Author: Maximilian Koegel

Maximilian Koegel

Maximilian Koegel

Dr. Maximilian Koegel is deeply involved with the Eclipse community. He is project lead and committer on several open-source projects including EMF Cloud, JSON Forms and …