I18NHelper.getMessage(messages,
"jqlc.semantic.analysecollectioncall.nonvariable")); //NOI18N
}
else
{
FieldInfo collectionFieldInfo = getCollectionField(collection);
if (collectionFieldInfo == null)
{
errorMsg.unsupported(collection.getLine(), collection.getColumn(),
I18NHelper.getMessage(messages,
"jqlc.semantic.analysecollectioncall.unsupportedcollectionexpr", //NOI18N
collection.getText()));
}
else if (!collectionFieldInfo.isRelationship())
{
// check compatibilty of collection element type and type of variable
errorMsg.error(collection.getLine(), collection.getColumn(),
I18NHelper.getMessage(messages,
"jqlc.semantic.analysecollectioncall.relationshipexpected", //NOI18N
collectionFieldInfo.getName()));
}
Type variableType = firstArg.getJQLType();
Type elementType = collectionFieldInfo.getAssociatedClass();
if (!elementType.isCompatibleWith(variableType))
{
errorMsg.error(collection.getLine(), collection.getColumn(),
I18NHelper.getMessage(messages,
"jqlc.semantic.analysecollectioncall.typemismatch", //NOI18N