Difference between revisions of "Mylyn/Context/Modeling Bridge"

From Eclipsepedia

Jump to: navigation, search
(Developers)
(38 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Image:EcoreMylyn.png|400px|right]]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.  
+
[[Image:EcoreMylyn.png|400px|right]]Mylyn Context Model Focusing Tools (MFT) project 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 editors.
  
 
This work is developed by [http://tasktop.com Tasktop Technologies] and sponsored by [http://www.ericsson.com/ Ericsson] in the context of the [http://wiki.eclipse.org/ModelingPlatform Modeling Platform Industrial Working Group]
 
This work is developed by [http://tasktop.com Tasktop Technologies] and sponsored by [http://www.ericsson.com/ Ericsson] in the context of the [http://wiki.eclipse.org/ModelingPlatform Modeling Platform Industrial Working Group]
 +
 +
Watch [http://www.youtube.com/watch?v=jnbzyrlUzlA Mylyn for Modeling in Two Minutes] (Screencast).
  
 
==Status==
 
==Status==
  
There are a few remaining usability related tasks, but basic implementation is complete. 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.  
+
MFT Release Review has passed release review for 0.9.0.
 +
We've just released version 0.9.1, which improves support for Papyrus and contains other graphics related fixes and improvements to the extension mechanism.
  
There are a number of additional extensions contemplated, including support for EMF Tree Editors.
+
==Known Issues==
  
=== Schedule (dates tentative) ===
+
*The Diagram editor outline view "Focus on Active" task button doesn't do anything. [https://bugs.eclipse.org/bugs/show_bug.cgi?id=357745]
 +
*When you select the "Remove from Context" context menu item in a diagram, the entire editor closes. [https://bugs.eclipse.org/bugs/show_bug.cgi?id=357747]
 +
*Items in containers -- for example Ecore packages -- are not revealed or hidden by MFT, but the enclosing containers are. [https://bugs.eclipse.org/bugs/show_bug.cgi?id=358489]
  
We're hoping for an 0.9.0 release sometime in September.
+
See all open bugs here: [https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;short_desc=%5Bmodeling%5D;bug_severity=blocker;bug_severity=critical;bug_severity=major;bug_severity=normal;bug_severity=minor;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;short_desc_type=allwordssubstr;classification=Mylyn;product=Mylyn%20Incubator this link].
  
 
=Users=
 
=Users=
  
==Installation==
+
==Installing==
 +
 
 +
;Current Release: <code>http://download.eclipse.org/mft/drops/0.9.1/I20120907-1845</code> (Recommended)
 +
;Snapshots: <code>http://download.eclipse.org/mft/snapshots/juno/</code>
 +
 
 +
;Previous Release (0.9.0): <code>http://download.eclipse.org/mft/drops/0.9.0/I20120314-1750/</code>
 +
 
 +
You can also install MFT 0.9.0 from Juno, but the latest release is currently only available on the above site(s). SR1 will include 0.9.1.
 +
 
 +
We recommend starting with Ecore Tools, as the tools have less dependencies and more complete integration. Mylyn for Modeling has minimal dependencies defined on its target tools, so you should probably install the target tools separately if you don't already have them.
 +
 
 +
==User Guide==
 +
 
 +
Mylyn for Modeling works in the same way as other Mylyn tool integrations such as for Java. See the [http://wiki.eclipse.org/index.php/Mylyn/User_Guide#Task-Focused_Interface Mylyn User Guide] for more details. Modeling specific features are described here.
 +
 
 +
===Task-Focused Interface===
 +
 
 +
====Diagrams====
 +
 
 +
 
 +
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.
 +
 
 +
[[Image:MylynModelingScreenshot1Ann.png]]
 +
 
 +
 
 +
Unselecting the [[Image:MylynModelingToolbar.png|caption]] Focus Button in the toolbar will cause all model elements to be shown as they are in an non-Mylyn enable editor.
 +
 
 +
 
 +
[[Image:MylynModelingScreenshot2.png]]
 +
 
 +
 
 +
To landmark a node, right-click on it and select "Mark as Landmark". Remove an element using "Remove Model Element from Context". Remove the entire diagram from the active context by clicking "Remove from Context".
 +
 
 +
 
 +
[[Image:MylynModelingNodeMenu.png]]
 +
 
 +
 
 +
====Project Explorer====
  
Currently, the features can be installed from:
+
If you're working 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.
  
http://ci.mylyn.org/job/mylyn-incubator-modeling-bridge/lastSuccessfulBuild/artifact/org.eclipse.mylyn.incubator-site/target/site/
+
'''Tip:''' You can use the Outline View to help identify and navigate to the nodes you've revealed.
  
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.
+
[[Image:MylynModelingProjectExplorer.png]]
  
''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.''
 
  
 
=Developers=
 
=Developers=
Line 46: Line 89:
  
 
*Uml2DiagramDecoratorProvider -> FooDiagramDecoratorProvider
 
*Uml2DiagramDecoratorProvider -> FooDiagramDecoratorProvider
*In Plugin.xml <pre><decoratorProvider class="org.eclipse.mylyn.internal.modeling.papyrus.Uml2DiagramDecoratorProvider"></pre> Becomes: <pre><decoratorProvider class="org.eclipse.mylyn.internal.modeling.foo.FooDiagramDecoratorProvider"></pre>
+
*In Plugin.xml <pre><decoratorProvider class="org.eclipse.mylyn.internal.modeling.papyrus.Uml2DiagramDecoratorProvider"></pre> Becomes: <pre><decoratorProvider class="org.you.foo.FooDiagramDecoratorProvider"></pre>
 
*etc..
 
*etc..
  
Line 105: Line 148:
 
See DiagramUiBridge for details.
 
See DiagramUiBridge for details.
  
= Project Details =
+
=Future Work=
  
== Bugzilla ==
+
Below are some ideas for further improvements and extensions. Please feel free to add your own, and let us know if you'd like to contribute solutions to any of these.
  
Release bug:
+
====Support other Model Editors====
  
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352032
+
It's quite easy to [[#Integrating_Mylyn_for_Modeling_with_custom_GMF_editors|implement editors for other model types]]. It would be great to have more examples.
  
All related bugs:
+
====EMF Tree Editors====
 +
Support for arbitrary EMF generated editors. See this [https://bugs.eclipse.org/bugs/show_bug.cgi?id=352173 bug].
  
https://bugs.eclipse.org/bugs/buglist.cgi?short_desc=%5Bmodeling%5D;resolution=---;query_format=advanced;short_desc_type=allwordssubstr;component=Experiments;product=Mylyn%20Incubator
+
====Easier Integration with Generic GMF Models====
  
===Bug Reports===
+
Code generation for Mylyn enabled GMF and EMF tree-based based editors. Ideally this would be completely transparent, but it's very likely we would need a project for each generated GMF model diagram. This isn't really an issue as generating code is part of the GMF diagram creation workflow anyway. This is actually a relatively simple plumbing task, as we already have good example projects to build tempaltes from.
  
*Product: Mylyn Incubator
+
====Show Focussed Collaborations====
*Component: Experiments
+
*Deescription: Include "[modeling]" as keyword.
+
  
== Git Repos ==
+
The current approach works well for object collaborations that are already close together or that are composed of several related clusters. Our intuition is that this will generally be the case. To the extent that focussed nodes are spread out across the diagram, the current approach will be less effective. Note that the situation is still much better than without Mylyn as in the default case, you'd have to find the other nodes of interest amidst all of the other diagram clutter! There are a number of approaches we might take to this issue:
  
URL: git@github.com:MilesParker/mylyn.incubator.git
+
*Use "signposts" where distant but off screen nodes are indicated.
 +
**These signposts when clicked on could auto-navigate to the related distant node.
 +
*Depict simple collapsed overview diagrams of just the focussed element collaborations either as an inset caption or a separate navigation view.
  
'''This is a temporary home only, we hope to contribute it to Eclipse git soon.'''
+
= Project Details =
  
Projects: org.eclipse.mylyn.modeling.*
+
* [http://eclipse.org/mft/ Website]
  
 
== Communication ==
 
== Communication ==
Please use: [https://dev.eclipse.org/mailman/listinfo/mylyn-incubator-dev mylyn-incubator-dev]. Discussion also on EMFT-dev.
+
 
 +
Please use: [https://dev.eclipse.org/mailman/listinfo/mylyn-context-dev mylyn-context-dev].
  
 
== Related Documents ==
 
== Related Documents ==
Line 139: Line 184:
 
*[http://greensopinion.blogspot.com/2008/12/mylyn-context-driven-domain-diagram.html 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.
 
*[http://greensopinion.blogspot.com/2008/12/mylyn-context-driven-domain-diagram.html 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 [http://kerstens.org/mik/publications/2007-01-mik-thesis.pdf PhD thesis] on Mylyn. See especially Section 5.4.1.
 
*Mik Kersten’s [http://kerstens.org/mik/publications/2007-01-mik-thesis.pdf PhD thesis] on Mylyn. See especially Section 5.4.1.
 
== Team ==
 
*Miles Parker for Tasktop
 
*Benjamin Muskalla Tasktop
 
 
= Original Proposal =
 
 
== Context Bridge for EMF Models ==
 
[[Image:Model context.png|500px|right]]
 
In order to bring the productivity benefits of the task-focused interface to engineers using Eclipse-based modeling technologies, Tasktop will create a “Context Bridge” for EMF-based models and diagram editors.  The result of this will be 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 will provide Mylyn’s one-click multitasking facilities for working with models, ensuring that engineers 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.
 
 
This feature is a new technology, that to date has only been discussed in Kersten’s PhD thesis and implemented by David Green, Tasktop’s VP of Engineering, for model-driven development diagrams based on a model similar to, but not based on, EMF.<ref>http://greensopinion.blogspot.com/2008/12/mylyn-context-driven-domain-diagram.html.</ref>
 
 
== High-Level Tasks ==
 
 
=== EMF Context Bridge ===
 
Integration between the EMF Ecore model with the Mylyn Context degree-of-interest model.
 
* EMF-1: identity of Ecore elements is integrated with task context
 
* EMF-2: relationships and containment are mapped to the degree-of-interest graph
 
* EMF-3: degree-of-interest model elements updated on refactoring of model, for active task
 
* EMF-4: contexts with refactored model elements are updated when loaded, eg, using refactoring history
 
[[Image:Model project explorer.png|300px ]]
 
 
 
=== GEF Diagram Focusing ===
 
Support for user interface focusing and one-click multitasking facilities for models and diagrams<ref>Degree-of-interest diagram highlighting can be applied to arbitrary diagrams, while degree-of-interest filtering only applies to diagrams where positioning does not have a semantic relevance (eg, works for UML class diagrams, but not for a pipe-and-filter diagram without additional support for displaying elided elements).  For more information see 5.4.1 and related sections of Kersten’s PhD thesis: http://www.tasktop.com/docs/publications/2007-01-mik-thesis.pdf </ref>
 
.
 
* FOCUS-1: creation of figure filter, highlighter and layout for focused diagrams
 
* FOCUS-2: degree-of-interest based view updated and model change notification integration
 
* FOCUS-3: Ecore model focusing for Common Navigators
 
* FOCUS-4: APIs for GEF figure focusing for downstream editors
 
* FOCUS-5: usage tracking for Ecore model and GEF diagram editing and navigation
 
* FOCUS-6: editor mementos are restored on task-reactivation
 
* FOCUS-7: quick/in-place view of model elements in context
 
* FOCUS-8: focus support for EMF models in GMF for UML models in Papyrus.
 
 
 
{{Reflist|2}}
 

Revision as of 20:38, 10 September 2012

EcoreMylyn.png
Mylyn Context Model Focusing Tools (MFT) project 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 editors.

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).

Contents

Status

MFT Release Review has passed release review for 0.9.0. We've just released version 0.9.1, which improves support for Papyrus and contains other graphics related fixes and improvements to the extension mechanism.

Known Issues

  • The Diagram editor outline view "Focus on Active" task button doesn't do anything. [1]
  • When you select the "Remove from Context" context menu item in a diagram, the entire editor closes. [2]
  • Items in containers -- for example Ecore packages -- are not revealed or hidden by MFT, but the enclosing containers are. [3]

See all open bugs here: this link.

Users

Installing

Current Release
http://download.eclipse.org/mft/drops/0.9.1/I20120907-1845 (Recommended)
Snapshots
http://download.eclipse.org/mft/snapshots/juno/
Previous Release (0.9.0)
http://download.eclipse.org/mft/drops/0.9.0/I20120314-1750/

You can also install MFT 0.9.0 from Juno, but the latest release is currently only available on the above site(s). SR1 will include 0.9.1.

We recommend starting with Ecore Tools, as the tools have less dependencies and more complete integration. Mylyn for Modeling has minimal dependencies defined on its target tools, so you should probably install the target tools separately if you don't already have them.

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. Modeling specific features are described here.

Task-Focused Interface

Diagrams

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.

MylynModelingScreenshot1Ann.png


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.


MylynModelingScreenshot2.png


To landmark a node, right-click on it and select "Mark as Landmark". Remove an element using "Remove Model Element from Context". Remove the entire diagram from the active context by clicking "Remove from Context".


MylynModelingNodeMenu.png


Project Explorer

If you're working 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.

Tip: You can use the Outline View to help identify and navigate to the nodes you've revealed.

MylynModelingProjectExplorer.png


Developers

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.

Concepts

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

Recipe

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">
    Becomes:
    <decoratorProvider class="org.you.foo.FooDiagramDecoratorProvider">
  • 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:

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

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

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

	@Override
	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:

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

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

See DiagramUiBridge for details.

Future Work

Below are some ideas for further improvements and extensions. Please feel free to add your own, and let us know if you'd like to contribute solutions to any of these.

Support other Model Editors

It's quite easy to implement editors for other model types. It would be great to have more examples.

EMF Tree Editors

Support for arbitrary EMF generated editors. See this bug.

Easier Integration with Generic GMF Models

Code generation for Mylyn enabled GMF and EMF tree-based based editors. Ideally this would be completely transparent, but it's very likely we would need a project for each generated GMF model diagram. This isn't really an issue as generating code is part of the GMF diagram creation workflow anyway. This is actually a relatively simple plumbing task, as we already have good example projects to build tempaltes from.

Show Focussed Collaborations

The current approach works well for object collaborations that are already close together or that are composed of several related clusters. Our intuition is that this will generally be the case. To the extent that focussed nodes are spread out across the diagram, the current approach will be less effective. Note that the situation is still much better than without Mylyn as in the default case, you'd have to find the other nodes of interest amidst all of the other diagram clutter! There are a number of approaches we might take to this issue:

  • Use "signposts" where distant but off screen nodes are indicated.
    • These signposts when clicked on could auto-navigate to the related distant node.
  • Depict simple collapsed overview diagrams of just the focussed element collaborations either as an inset caption or a separate navigation view.

Project Details

Communication

Please use: mylyn-context-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.