use of org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ITypeConstraint2 in project che by eclipse.
the class InferTypeArgumentsTCModel method createSubtypeConstraint.
public void createSubtypeConstraint(ConstraintVariable2 cv1, ConstraintVariable2 cv2) {
if (!keep(cv1, cv2))
return;
ConstraintVariable2 storedCv1 = storedCv(cv1);
ConstraintVariable2 storedCv2 = storedCv(cv2);
ITypeConstraint2 typeConstraint = new SubTypeConstraint2(storedCv1, storedCv2);
Object storedTc = fTypeConstraints.get(typeConstraint);
if (storedTc == null) {
fTypeConstraints.put(typeConstraint, typeConstraint);
} else {
typeConstraint = (ITypeConstraint2) storedTc;
}
registerCvWithTc(storedCv1, typeConstraint);
registerCvWithTc(storedCv2, typeConstraint);
}
Aggregations