|
|
Re: specialzed OCL [message #1033628 is a reply to message #1033609] |
Thu, 04 April 2013 12:58 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
You've given no real clue as to what you really want to do, just a vague
assumption of your not-working solution.
If you're using OCLinEcore why not just add features to taste, possibly
in a dummy utilities class.
If you're using Complete OCL why not just add features to taste,
potentially anywhere.
So what is your problem?
Regards
Ed Willinkl
On 04/04/2013 13:32, ModelGeek Mising name wrote:
> I want to add some operations in default OCL so i can use them in ocl
> statements and then delegates should be able to evaluate them
> according to given implementation.
>
> Lets say i want to add operation xyz(real, real) with return type real
> as well. Now suppose i have a classed named "class1" and has three
> real attributes names as "one", "two" and "three". In derivation
> statement of "three" i want to write "self.xyz(self.one, seld.2)". I
> want xyz operation to be part of default OCL implemention same as
> collect, select, count etc operations are part of OCL.
>
> How can i extend default implementation to make xyz part of it and how
> to extends delegates to be able to recognize and evaluate it as any
> other default operation available in OCL
>
> Cheers,
|
|
|
Re: specialzed OCL [message #1033664 is a reply to message #1033628] |
Thu, 04 April 2013 13:46 |
ModelGeek Mising name Messages: 550 Registered: June 2011 |
Senior Member |
|
|
Hi,
i am creating an Ecore enriched with OCL at runtime. I am also instantiating ecore at run time and using delegates to evaluate. I want to add some operations in default OCL specification, so users can use that. For example i want to add an operation xyz(real, real)::real in default MDT/OCL and users will be able to use this operation like any other operation available in OCL specs(e.g set->count, set->select(oclexpression) etc). Something like http://www.eclipse.org/forums/index.php/m/989574/#msg_936996
So i think i need to change OCLEssential Xtext grammer first and then I should extend oclstdlib, pivot etc...
i would like to know if there is any tutorial for this or any directions...
thank you very much for your support.
[Updated on: Thu, 04 April 2013 13:47] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|