use of org.eclipse.jdt.internal.corext.refactoring.typeconstraints.CompilationUnitRange in project che by eclipse.
the class InferTypeArgumentsTCModel method makeTypeVariable.
public TypeVariable2 makeTypeVariable(Type type) {
ICompilationUnit cu = RefactoringASTParser.getCompilationUnit(type);
TType ttype = getBoxedType(type.resolveBinding(), /*no boxing*/
null);
if (ttype == null)
return null;
CompilationUnitRange range = new CompilationUnitRange(cu, type);
TypeVariable2 typeVariable = new TypeVariable2(ttype, range);
TypeVariable2 storedCv = (TypeVariable2) storedCv(typeVariable);
if (storedCv == typeVariable) {
fCuScopedConstraintVariables.add(storedCv);
if (isAGenericType(ttype))
makeElementVariables(storedCv, ttype);
makeArrayElementVariable(storedCv);
if (fStoreToString)
storedCv.setData(ConstraintVariable2.TO_STRING, type.toString());
}
return storedCv;
}
use of org.eclipse.jdt.internal.corext.refactoring.typeconstraints.CompilationUnitRange in project che by eclipse.
the class InferTypeArgumentsTCModel method makeCastVariable.
public CastVariable2 makeCastVariable(CastExpression castExpression, ConstraintVariable2 expressionCv) {
ITypeBinding typeBinding = castExpression.resolveTypeBinding();
ICompilationUnit cu = RefactoringASTParser.getCompilationUnit(castExpression);
CompilationUnitRange range = new CompilationUnitRange(cu, castExpression);
CastVariable2 castCv = new CastVariable2(createTType(typeBinding), range, expressionCv);
fCastVariables.add(castCv);
return castCv;
}
Aggregations