Class EMFModelComparator
- java.lang.Object
-
- org.eclipse.epsilon.eunit.dt.cmp.emf.v3.EMFModelComparator
-
- All Implemented Interfaces:
IModelComparator
public class EMFModelComparator extends java.lang.Object implements IModelComparator
Model comparator for EMF models, using EMF Compare 2.x.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.epsilon.eunit.extensions.IModelComparator
EXTENSION_POINT_ID
-
-
Constructor Summary
Constructors Constructor Description EMFModelComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCompare(IModel m1, IModel m2)
Checks if the comparator can compare these two models.java.lang.Object
compare(IModel m1, IModel m2)
Returns an object with the differences between this model andotherModel
.void
configure(java.util.Map<java.lang.String,java.lang.Object> options)
Configures the model comparator with the specified options.
-
-
-
Method Detail
-
canCompare
public boolean canCompare(IModel m1, IModel m2)
Description copied from interface:IModelComparator
Checks if the comparator can compare these two models.- Specified by:
canCompare
in interfaceIModelComparator
- Returns:
true
ifIModelComparator.compare(IModel, IModel)
should finish successfully, and false otherwise.
-
compare
public java.lang.Object compare(IModel m1, IModel m2) throws java.lang.Exception
Description copied from interface:IModelComparator
Returns an object with the differences between this model andotherModel
. If there are no differences, returnsnull
. The exact configuration of the comparison depends on the model. For instance, unique identifiers (such as XMI IDs) may be ignored if the main object of these comparisons is to test model transformations. These tend to produce different unique identifiers each time they are run.- Specified by:
compare
in interfaceIModelComparator
- Throws:
java.lang.IllegalArgumentException
- The models cannot be compared: for instance, they use incompatible drivers.java.lang.Exception
- There was some other kind of problem when performing the comparison.
-
configure
public void configure(java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface:IModelComparator
Configures the model comparator with the specified options.- Specified by:
configure
in interfaceIModelComparator
-
-