use of org.jetbrains.plugins.groovy.lang.psi.expectedTypes.SupertypeConstraint in project intellij-community by JetBrains.
the class ChooseTypeExpression method createItems.
@NotNull
private static List<SmartTypePointer> createItems(@NotNull TypeConstraint[] constraints, @NotNull SmartTypePointerManager typePointerManager) {
List<SmartTypePointer> result = ContainerUtil.newArrayList();
for (TypeConstraint constraint : constraints) {
if (constraint instanceof SubtypeConstraint) {
PsiType type = constraint.getDefaultType();
result.add(typePointerManager.createSmartTypePointer(type));
} else if (constraint instanceof SupertypeConstraint) {
processSuperTypes(constraint.getType(), result, typePointerManager);
}
}
return result;
}
Aggregations