|Re: Extension of the standard library [message #64214 is a reply to message #64185]
||Tue, 04 November 2008 14:57
Originally posted by: cdamus.zeligsoft.com|
No problem. It's nice to have more requestees on board to motivate this
laurent Goubet wrote:
> Yep, seems like the same as mine, thanks and sorry for not searching ;).
> Laurent Goubet
> Christian W. Damus a écrit :
>> Hi, Laurent,
>> I think that a solution for your problem is on the plan for the 1.3
>> release. See https://bugs.eclipse.org/179990 for details.
>> laurent Goubet wrote:
>>> Hi Christian,
>>> I managed to extend the standard library and added custom operations
>>> to OCL during the development of MTL. For this, I defined a model
>>> really close to what you did with oclstdlib.ecore and
>>> OCLStandardLibrary.java. The implementation of these custom
>>> operations is in the EvaluationEnvironment where I overrode
>>> What I did not manage to do though, was to create a custom operation
>>> which would return a typed sequence : my best try returned a
>>> "Sequence(T)". This forces me to use "oclAsType" after each
>>> invocation to accurately type the sequence.
>>> The operation I defined is a "typed" eAllContents for EObject in
>>> order to retrieve only the elements of a given type in the content
>>> tree of an element : "eAllContents(EClassifier) : Sequence(T)".
>>> Obviously, the type of the sequence content is known (EClassifier).
>>> Is there any way to force the OCL parser to type that sequence
>>> without a subsequent call to oclAsType?
>>> laurent Goubet
Powered by FUDForum
. Page generated in 0.01613 seconds