GrTypeComboBox (GrVariable var, GrExpression expr, StringPartInfo stringPartInfo) { GrTypeComboBox box; if (var != null) { box = GrTypeComboBox.createTypeComboBoxWithDefType(var.getDeclaredType(), var); } else if (expr != null) { box = GrTypeComboBox.createTypeComboBoxFromExpression(expr); } else if (stringPartInfo != null) { box = GrTypeComboBox.createTypeComboBoxFromExpression(stringPartInfo.getLiteral()); } else { box = GrTypeComboBox.createEmptyTypeComboBox(); } box.addClosureTypesFrom(inferClosureReturnType(), myInfo.getContext()); if (expr == null && var == null && stringPartInfo == null) { box.setSelectedIndex(box.getItemCount() - 1); } return box; }