Skip to main content
Jump to: navigation, search

Mylyn/Context/Modeling Bridge

< Mylyn
Revision as of 18:24, 14 September 2011 by (Talk | contribs) (User Guide)

Mylyn for Modeling brings the productivity, integration and traceability benefits of Mylyn to Eclipse Modeling. It provides a focused mode for diagrams that shows only the elements related to the task-at-hand, dramatically reducing information overload for engineers working on large models. In addition, the task-focused interface extensions provide Mylyn’s one-click multitasking facilities for working with models, ensuring that developers can instantly recover from interruptions, and share model-specific expertise, when working with models in addition to what Mylyn already provides for engineers working with source code.

Currently, Mylyn for Modeling supports EcoreTools diagrams and Project Manager integration as well as Papyrus UML2 class diagrams. The supporting modeling bridge is designed to be relatively easy to extend to support arbitrary GMF supported diagram editor.

This work is developed by Tasktop Technologies and sponsored by Ericsson in the context of the Modeling Platform Industrial Working Group

Watch Mylyn for Modeling in Two Minutes (Screencast).


Implementation is feature complete, we have a working build with test and update site, and there are as of this writing no open bugs. We're in good shape for 0.9.0 release in September.



Currently, the features can be installed from the "nightly" automated build update site:

Select Mylyn for EMF and GMF, along with Ecore Tools for Ecore and Ecore Diagram support and/or Papyrus for UML Class diagram support. (Mylyn for modeling has the minimal dependencies on those tools, so you should probably install the target tools separately if you don't already have them.) The tools should work with the Indigo Ecore Tools and Papyrus modeling components.

Please note that the project has not yet been contributed to Eclipse and so has not passed formal review. We don't anticipate any issues with this.

User Guide

Mylyn for Modeling works in the same way as other Mylyn tool integrations such as for Java. See the Mylyn User Guide for more details. The Modeling specific features are described below:

Task-Focused Interface


To reveal unfocussed items, we provide a "fade effect" to reveal diagram items. As you move the mouse though the diagram, nearby unfocussed nodes and edges will be revealed. Just click on a node to add it to your current context.


Unselecting the caption Focus Button in the toolbar will cause all model elements to be shown as they are in an non-Mylyn enable editor.


Project Explorer

If you're working with with EcoreTools or other supported EMF based models you can also use "Alt-Click" in the Project Explorer to reveal and select nodes. This works for both model and diagram elements.

Known Issues

Current issues (if any) can be found by clicking this link.


We've tried to design the modeling bridge so that it is easy to make your own GMF and other EMF-based editors and views Mylyn savvy. There are a number of artifacts to take care of but much of it is boiler-plate. (It would be straightforward to support this with a simple meta-model and code generation -- let us know if you'd like to participate in or support that effort!) And please let us know if you have any difficulties or improvements for the below steps.


Users aren't interested in the diagram objects, they're really interested in the underlying domain or model objects. In the Mylyn Java integration, for example, Java classes and methods are tracked, and then revealed in various ways in different editors. So for an EcoreTools model for example, we don't want or need to keep track of the diagram Node objects or any other reference in the various foo.gmf.. files for, we want the domain object itself, e.g. EClass, EPackage, etc.. in the corresponding foo.ecore resource. What we need to do is to define what the user might be interested (or not interested) in and then map that to the diagram editors and other editor types.

Integrating Mylyn for Modeling with custom GMF editors


Copy Existing Project

The best thing to do is just start with one of the two existing projects. We'd recommend org.eclipse.mylyn.modeling.papyrus.ui. org.eclipse.mylyn.modeling.ecoretools.ui will give you some ideas about how to work with a more complex scenario.

Refactor Artifacts

Rename files and other artifacts with the appropriate names. For example in your GMF "Foo" Diagram tool:

  • Uml2DiagramDecoratorProvider -> FooDiagramDecoratorProvider
  • In Plugin.xml
    <decoratorProvider class="org.eclipse.mylyn.internal.modeling.papyrus.Uml2DiagramDecoratorProvider">
    <decoratorProvider class="">
  • etc..

Define Model Specific Behavior

Here's where the non-boiler plate stuff is.

Structure Bridge

In FooStructureBridge, you'll define domain objects which should be managed by Mylyn. This is how it is implemented in UML2StructureBridge:

	public Class<?> getDomainBaseNodeClass() {
		return Element.class;

	public Class<?>[] getDomainNodeClasses() {
		return new Class[] { Classifier.class };

	public Class<?> getDomainBaseEdgeClass() {
		return Relation.class;

	public Class<?>[] getDomainEdgeClasses() {
		return new Class[] { Relation.class };

See DomainModelContextStructureBridge for API details .

Diagram Bridge

In FooUiBridge, you'll define diagrams and views which should be managed by Mylyn. In UML2UiBridge, the important bits are:

	public boolean acceptsPart(IWorkbenchPart part) {
		return part instanceof PapyrusMultiDiagramEditor;

	public boolean acceptsViewObject(Object domainObject, Object part) {
		if (domainObject instanceof Classifier) {
			return part instanceof ClassEditPart;
		if (domainObject instanceof Package) {
			return part instanceof PackageEditPart;
		if (domainObject instanceof Relationship) {
			return part instanceof ConnectionNodeEditPart;
		return false;

See DiagramUiBridge for details.

Future Work

Let's detail ideas for further improvements and extensions here. Please feel free to add your own!

  • Support for EMF Tree Editors. See this bug.

Project Details


Release bug:

All related bugs:;resolution=---;query_format=advanced;short_desc_type=allwordssubstr;component=Experiments;product=Mylyn%20Incubator

Bug Reports

  • Product: Mylyn Incubator
  • Component: Experiments
  • Deescription: Include "[modeling]" as keyword.

Git Repos



This is a temporary home only, we hope to contribute it to Eclipse git soon.

Projects: org.eclipse.mylyn.modeling.*

Automated Build


Please use: mylyn-incubator-dev. Discussion also on EMFT-dev.

Related Documents

  • Blog Post by Miles Parker on the current effort.
  • Blog post by David Green, Tasktop’s VP of Engineering, for model-driven development diagrams based on a model similar to, but not based on, EMF.
  • Mik Kersten’s PhD thesis on Mylyn. See especially Section 5.4.1.


  • Miles Parker for Tasktop -- Development
  • Benjamin Muskalla Tasktop -- QA, Testing and Builds
  • Steffen Pingel Tasktop -- QA, Testing and Builds

Back to the top