EMF Compare/Grouping facility

From Eclipsepedia

< EMF Compare
Revision as of 09:14, 21 February 2011 by Mikael.barbero.obeo.fr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The capability to group differences will be provided by a menu next to the save diff model button. This button will be same for Grouping and Filtering. The tooltip will be "Group/Filter difference elements"

The provided menu will be organized as follow:

  • Group Structural Differences
    • By File
    • By Modification Type
    • By Metamodel Element

Each element will be a radio button (as the ones in the following screenshot), meaning that only one grouping facility can be selected at at time.


An API and an extension point will be provided to contribute new grouping facilities. A new group will have to implement an interface IGroupFilter:

/**
 * Returns the group to which the given DiffElement belongs to.
 */
public interface IGroupFilter {
	UIDifferenceGroup belongsTo(DiffElement d);
}

The corresponding extension point will be a simple one with two attributes : the name of the group (string type) and the implementation class (java type).

The extension point will be implemented by the classical tryptic :

  • ExtensionDescriptor (to support lazy loading)
  • ExtensionRegistry will be the bridge between the plugin registry and emfcompare
  • ExtensionRegistryListener to listen installation and de-installation of contributing plugins.

The IGroupFilter implementations will be used to fill a MultiMap (e.g. Map<UIDifferenceGroup, List<? extends DiffElement>>) of DiffElement by object as returned by the method belongsTo(). This MultiMap will be filled by visiting the whole DiffElement content tree.