expression.removeLast();
} else if (SuggestionCompletionEngine.TYPE_COLLECTION.equals(getCurrentGenericType())) {
onCollectionChange(value);
} else if (SuggestionCompletionEngine.TYPE_STRING.equals(getCurrentGenericType())) {
if ("size".equals(value)) {
expression.appendPart(new ExpressionMethod("size", "int", SuggestionCompletionEngine.TYPE_NUMERIC));
} else if ("isEmpty".equals(value)) {
expression.appendPart(new ExpressionText(".size() == 0", "", SuggestionCompletionEngine.TYPE_NUMERIC));
}
} else {
int dotPos = value.indexOf('.');
String prefix = value.substring(0, dotPos);
String attrib = value.substring(dotPos + 1);
prevFactName = getCompletionEngine().getFactNameFromType(
getCurrentClassType());
// String genericType = SuggestionCompletionEngine.TYPE_OBJECT;
if (FIElD_VALUE_PREFIX.equals(prefix)) {
String fieldClassName = getCompletionEngine().getFieldClassName(prevFactName, attrib);
String fieldGenericType = getCompletionEngine().getFieldType(prevFactName, attrib);
if (SuggestionCompletionEngine.TYPE_COLLECTION.equals(fieldGenericType)) {
String fieldParametricType = getCompletionEngine().getParametricFieldType(prevFactName, attrib);
expression.appendPart(new ExpressionCollection(attrib, fieldClassName, fieldGenericType, fieldParametricType));
} else {
expression.appendPart(new ExpressionField(attrib, fieldClassName, fieldGenericType));
}
} else if (METHOD_VALUE_PREFIX.equals(prefix)) {
MethodInfo mi = getCompletionEngine().getMethodinfo(prevFactName, attrib);
if (SuggestionCompletionEngine.TYPE_COLLECTION.equals(mi.getGenericType())) {
expression.appendPart(new ExpressionCollection(attrib, mi.getReturnClassType(), mi.getGenericType(), mi.getParametricReturnType()));
} else {
expression.appendPart(new ExpressionMethod(mi.getName(), mi.getReturnClassType(), mi.getGenericType()));
}
}
}
Widget w = getWidgetForCurrentType();