Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvto-dev] Bug or Feature?: QvtOperationalVisitorCS.listLiteralExpCS returns CollectionLiteralExp instead of ListLiteralExp

Hi

QVT 1.3 added an Implementation Note to ListType

ListLiteralExp will become obsolete once OCL eliminates the prohibition on extension of CollectionLiteralExp imposed
by the redundant CollectionLiteralExp::kind attribute.

If you ignore CollectionLiteralExp::kind and instead work only on the types it should be straightforward.

    Regards

        Ed Willink

On 08/02/2016 10:46, Uwe Ritzmann wrote:
Dear all,

while converting the CST to the AST
org.eclipse.m2m.internal.qvt.oml.ast.parser.QvtOperationalVisitorCS.listLiteralExpCS(...)
returns a
org.eclipse.ocl.expressions.CollectionLiteralExp<EClassifier>
instead of a
    org.eclipse.m2m.qvt.oml.ecore.ImperativeOCL.ListLiteralExp.
In contrast
org.eclipse.m2m.internal.qvt.oml.ast.parser.QvtOperationalVisitorCS.dictionaryLiteralExp(...)
returns a
    org.eclipse.m2m.qvt.oml.ecore.ImperativeOCL.DictLiteralExp
just fine.

Seems like a bug, but might be a feature.

In doubt I will implement the necessary heuristics in the unparser to detect the CollectionLiterals which are actually ListLiterals,
but otherwise I would try to develop a patch to the visitor to get it right in the first place.

Any hints?

Sankt Augustin Alaaf,

Uwe
_______________________________________________
qvto-dev mailing list
qvto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/qvto-dev



Back to the top