Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » specialzed OCL
specialzed OCL [message #1033609] Thu, 04 April 2013 12:32 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
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 #1033617 is a reply to message #1033609] Thu, 04 April 2013 12:42 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
i want to do something similar to http://www.eclipse.org/forums/index.php/m/989574/#msg_936996

any tutorial or tips...

cheers,

[Updated on: Thu, 04 April 2013 12:47]

Report message to a moderator

Re: specialzed OCL [message #1033628 is a reply to message #1033609] Thu, 04 April 2013 12:58 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
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 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
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

Re: specialzed OCL [message #1033729 is a reply to message #1033664] Thu, 04 April 2013 15:13 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI

The OCLinEcore tutorial shows how to add the Book::isAvailable operation.

What is wrong with this approach for you?

Regards

Ed Willink


On 04/04/2013 14:46, ModelGeek Mising name wrote:
> 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).
> 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.
Re: specialzed OCL [message #1033758 is a reply to message #1033729] Thu, 04 April 2013 15:52 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
In OCLinEcore tutorial... Is available operation is a user defined operation and it shows how to generate java code from Ecore.

I want to make a function part of OCL/MDT. So any ecore can use that specific operation.


Re: specialzed OCL [message #1033814 is a reply to message #1033758] Thu, 04 April 2013 17:17 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Have you actually looked at the generated code for the example? Any code
can use isAvailable.

Regards

Ed Willink

On 04/04/2013 16:52, ModelGeek Mising name wrote:
> In OCLinEcore tutorial... Is available operation is a user defined
> operation and it shows how to generate java code from Ecore.
> I want to make a function part of OCL/MDT. So any ecore can use that
> specific operation.
>
>
Re: specialzed OCL [message #1034275 is a reply to message #1033814] Fri, 05 April 2013 08:28 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
I guess i was not able to explain my question properly.
I am working on an application where user provide OCL at run time and application creates an new ecore at run time(so there is no one specific ecore, every time different ecore is generated). User can use all available operations when providing OCL e.g. collection's operation(sum, count, forAll etc). Now there is need in my application to add some more utility operations to the library to cater specific needs of my application. For example i want to add a new Collection operation Multiply() to OCL MDT library which will multiple all elements and will return a real number. So when user use this operation then editor should be able to recognize it and delegates should be able to evaluate it.
User should not write Multiply operation rather just use it as it should be the part of library.

i think i might need to see org.eclipse.ocl.examples.library.AbstractOperation
and org.eclipse.ocl.examples.library.oclstdlib(i might be wrong...)

thank you for your support, i really appriciate it.

Cheers,


Re: specialzed OCL [message #1036445 is a reply to message #1034275] Mon, 08 April 2013 11:53 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi Ed Willink!

Do you think i am thinking in right direction? Did you understand my question?

http://www.eclipse.org/forums/index.php/m/989574/#msg_936996 seems very similar to my problem.

Cheers,
Re: specialzed OCL [message #1036628 is a reply to message #1036445] Mon, 08 April 2013 16:10 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

No idea.

You need to take the time to ask a simple question that I can understand.

Regards

Ed Willink


On 08/04/2013 12:53, ModelGeek Mising name wrote:
> Hi Ed Willink!
>
> Do you think i am thinking in right direction? Did you understand my
> question?
> http://www.eclipse.org/forums/index.php/m/989574/#msg_936996 seems
> very similar to my problem.
>
> Cheers,
Re: specialzed OCL [message #1037252 is a reply to message #1036628] Tue, 09 April 2013 10:40 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
I want to extend OCL grammer and will try to explain with example. Lets say i want to introduce new operator called "allways" and it is similar to "not". Not operator negates the operand and "allways" will convert the boolean operand to true
for example : always(false) will return true, always(true) will also return true.
so i want to extend OCL grammer with new operators and operations.


Is there any tutorial/example/tips are available to do that?

thanks alot for your support.

cheers
Re: specialzed OCL [message #1037274 is a reply to message #1037252] Tue, 09 April 2013 11:13 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The Complete OCL grammar extends the Essential OCL grammar with
additional ^ and ^^ operators.

Your example seems really stupid. What's wrong with an extended library?

Regards

Ed Willink

On 09/04/2013 11:40, ModelGeek Mising name wrote:
> I want to extend OCL grammer and will try to explain with example.
> Lets say i want to introduce new operator called "allways" and it is
> similar to "not". Not operator negates the operand and "allways" will
> convert the boolean operand to true
> for example : always(false) will return true, always(true) will also
> return true.
> so i want to extend OCL grammer with new operators and operations.
>
>
> Is there any tutorial/example/tips are available to do that?
>
> thanks alot for your support.
>
> cheers
Re: specialzed OCL [message #1038994 is a reply to message #1037274] Thu, 11 April 2013 15:41 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Is there any tutorial available for extending OCL grammar and related tasks?

thanks for you support!

Cheers
Re: specialzed OCL [message #1039021 is a reply to message #1038994] Thu, 11 April 2013 16:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Sorry, little chance until the code gets promoted from examples.

For now you can look at the extending grammars with OCL and QVTd.

Regards

Ed Willink


On 11/04/2013 16:41, ModelGeek Mising name wrote:
> Is there any tutorial available for extending OCL grammar and related
> tasks?
>
> thanks for you support!
>
> Cheers
Re: specialzed OCL [message #1041845 is a reply to message #1039021] Mon, 15 April 2013 16:55 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
thanks!

Is there any help material explaining current OCL grammer(with respect to development process, how and where grammer files are defined, how parser access/ interact with grammer files etc ), it will help me extracting general idea about extending grammer.

If i can have some hints (3-4 lines) from you just describing steps needed to extend OCL grammer in sequential order then i will be very thankful as i will get the general direction.

Regards,



Re: specialzed OCL [message #1042290 is a reply to message #1041845] Tue, 16 April 2013 08:23 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I'm currently sponsoring an EngD student to substantially increase the
auto-generation of OCL and QVT tooling. Until then and while the code
remains as examples, it is there for those who wish to explpoit it to do
so. You may find some of my recent (last couple of years) publications
on http://wiki.eclipse.org/MDT/OCL/Articles helpful, in particular
http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop%5Coclxtext.pdf.

Regards

Ed Willink





On 15/04/2013 17:55, ModelGeek Mising name wrote:
> thanks!
>
> Is there any help material explaining current OCL grammer(with respect
> to development process, how and where grammer files are defined, how
> parser access/ interact with grammer files etc ), it will help me
> extracting general idea about extending grammer.
>
> If i can have some hints (3-4 lines) from you just describing steps
> needed to extend OCL grammer in sequential order then i will be very
> thankful as i will get the general direction.
>
> Regards,
>
>
>
>
Re: specialzed OCL [message #1042317 is a reply to message #1042290] Tue, 16 April 2013 09:08 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop%5Coclxtext.pdf is not working. I am getting 404 error page.

thanks!
Re: specialzed OCL [message #1042352 is a reply to message #1042317] Tue, 16 April 2013 10:14 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Thanks. Bad slash fixed.

Regards

Ed Willink

On 16/04/2013 10:08, ModelGeek Mising name wrote:
> http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop%5Coclxtext.pdf
> is not working. I am getting 404 error page.
>
> thanks!
>
Re: specialzed OCL [message #1042369 is a reply to message #1042352] Tue, 16 April 2013 10:43 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
so new link is? There is no new link given in your reply.
Old link does not work

Regards,
Re: specialzed OCL [message #1042386 is a reply to message #1042369] Tue, 16 April 2013 11:06 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The source of the bad link on http://wiki.eclipse.org/MDT/OCL/Articles
is fixed.

The correct link is

http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop/oclxtext.pdf

rather than

http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop%5Coclxtext.pdf

Regards

Ed Willink



On 16/04/2013 11:43, ModelGeek Mising name wrote:
> so new link is? There is no new link given in your reply.
> Old link does not work
>
> Regards,
Re: specialzed OCL [message #1056809 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1056874 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1056911 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057011 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057012 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057113 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057114 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057116 is a reply to message #1042386] Wed, 08 May 2013 12:16 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057218 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057219 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057322 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057323 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057324 is a reply to message #1042386] Wed, 08 May 2013 12:16 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057427 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057428 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057429 is a reply to message #1042386] Wed, 08 May 2013 12:16 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057430 is a reply to message #1057012] Wed, 08 May 2013 12:28 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you want to see source code import as a source rather than binary
project. Better still fetch from GIT.

The simplest extension is demonstrated by testImport in
GIT\org.eclipse.ocl\tests\org.eclipse.ocl.examples.xtext.tests\src\org\eclipse\ocl\examples\test\xtext\OCLstdlibTests.java.
You could add the Java class references using => constraucts.

If you are concerned about start up time or want to avoid model loadin
you can run an equivalent of
GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.build\src\org\eclipse\ocl\examples\build\GenerateOCLstdlibModel.mwe2
to create a library that can be installed by the equivalent of
OCLstdlib.install().

These facilities have not yet been extended by QVT, so the extensibility
has not yet been demonstrated; you may need to raise a Bugzilla or two.

Using OCL's GIT allows you to fix problems and submit them back for
review/incorporation.

[M7 adds the ability to define OCLstdlib operation bodies using OCL,
however the corresponding usage by the code generator is currently
disabled.]

Regards

Ed Willink


On 08/05/2013 13:01, ModelGeek Mising name wrote:
> Hi,
>
> In order to extend OCL library, i would like to get some information.
> I know few steps(i might be wrong) but i do not know all steps.
>
> 1 - Download latest version of org.eclipse.ocl.example.library.
> 2 - Create my own plugin and create my own OCL-ext.oclstdlib which
> extends from OCL 2.x.oclstdlib.
> 3 - new add functiona in OCL-ext.oclstdlib
> e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';
>
> I am not sure about steps that should be taken afterwards and i am not
> fimiliar with MWE. Can you please point out next steps.
>
> One small question when i import org.eclipse.ocl.example.library as
> binary project then it only contains OCL-ext.oclstdlib,
> oclstdlib.ecore and oclstdlib.genmodel.
> Classes like
> org.eclipse.ocl.examples.library.collection.CollectionMinOperation are
> not available in this plugin, rather i have to see
> org.eclipse.ocl.example.library_source plugin to see that operation.
> Can you explain why?
> Cheers,
Re: specialzed OCL [message #1057538 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057539 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057540 is a reply to message #1042386] Wed, 08 May 2013 12:16 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057541 is a reply to message #1057012] Wed, 08 May 2013 12:28 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you want to see source code import as a source rather than binary
project. Better still fetch from GIT.

The simplest extension is demonstrated by testImport in
GIT\org.eclipse.ocl\tests\org.eclipse.ocl.examples.xtext.tests\src\org\eclipse\ocl\examples\test\xtext\OCLstdlibTests.java.
You could add the Java class references using => constraucts.

If you are concerned about start up time or want to avoid model loadin
you can run an equivalent of
GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.build\src\org\eclipse\ocl\examples\build\GenerateOCLstdlibModel.mwe2
to create a library that can be installed by the equivalent of
OCLstdlib.install().

These facilities have not yet been extended by QVT, so the extensibility
has not yet been demonstrated; you may need to raise a Bugzilla or two.

Using OCL's GIT allows you to fix problems and submit them back for
review/incorporation.

[M7 adds the ability to define OCLstdlib operation bodies using OCL,
however the corresponding usage by the code generator is currently
disabled.]

Regards

Ed Willink


On 08/05/2013 13:01, ModelGeek Mising name wrote:
> Hi,
>
> In order to extend OCL library, i would like to get some information.
> I know few steps(i might be wrong) but i do not know all steps.
>
> 1 - Download latest version of org.eclipse.ocl.example.library.
> 2 - Create my own plugin and create my own OCL-ext.oclstdlib which
> extends from OCL 2.x.oclstdlib.
> 3 - new add functiona in OCL-ext.oclstdlib
> e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';
>
> I am not sure about steps that should be taken afterwards and i am not
> fimiliar with MWE. Can you please point out next steps.
>
> One small question when i import org.eclipse.ocl.example.library as
> binary project then it only contains OCL-ext.oclstdlib,
> oclstdlib.ecore and oclstdlib.genmodel.
> Classes like
> org.eclipse.ocl.examples.library.collection.CollectionMinOperation are
> not available in this plugin, rather i have to see
> org.eclipse.ocl.example.library_source plugin to see that operation.
> Can you explain why?
> Cheers,
Re: specialzed OCL [message #1057644 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057645 is a reply to message #1042386] Wed, 08 May 2013 12:01 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057646 is a reply to message #1042386] Wed, 08 May 2013 12:16 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
In order to extend OCL library, i would like to get some information. I know few steps(i might be wrong) but i do not know all steps.

1 - Download latest version of org.eclipse.ocl.example.library.
2 - Create my own plugin and create my own OCL-ext.oclstdlib which extends from OCL 2.x.oclstdlib.
3 - new add functiona in OCL-ext.oclstdlib
e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';

I am not sure about steps that should be taken afterwards and i am not fimiliar with MWE. Can you please point out next steps.

One small question when i import org.eclipse.ocl.example.library as binary project then it only contains OCL-ext.oclstdlib, oclstdlib.ecore and oclstdlib.genmodel.
Classes like org.eclipse.ocl.examples.library.collection.CollectionMinOperation are not available in this plugin, rather i have to see org.eclipse.ocl.example.library_source plugin to see that operation. Can you explain why?

Cheers,
Re: specialzed OCL [message #1057647 is a reply to message #1057012] Wed, 08 May 2013 12:28 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you want to see source code import as a source rather than binary
project. Better still fetch from GIT.

The simplest extension is demonstrated by testImport in
GIT\org.eclipse.ocl\tests\org.eclipse.ocl.examples.xtext.tests\src\org\eclipse\ocl\examples\test\xtext\OCLstdlibTests.java.
You could add the Java class references using => constraucts.

If you are concerned about start up time or want to avoid model loadin
you can run an equivalent of
GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.build\src\org\eclipse\ocl\examples\build\GenerateOCLstdlibModel.mwe2
to create a library that can be installed by the equivalent of
OCLstdlib.install().

These facilities have not yet been extended by QVT, so the extensibility
has not yet been demonstrated; you may need to raise a Bugzilla or two.

Using OCL's GIT allows you to fix problems and submit them back for
review/incorporation.

[M7 adds the ability to define OCLstdlib operation bodies using OCL,
however the corresponding usage by the code generator is currently
disabled.]

Regards

Ed Willink


On 08/05/2013 13:01, ModelGeek Mising name wrote:
> Hi,
>
> In order to extend OCL library, i would like to get some information.
> I know few steps(i might be wrong) but i do not know all steps.
>
> 1 - Download latest version of org.eclipse.ocl.example.library.
> 2 - Create my own plugin and create my own OCL-ext.oclstdlib which
> extends from OCL 2.x.oclstdlib.
> 3 - new add functiona in OCL-ext.oclstdlib
> e.g. operation xyx() : Boolean => 'abc.xyz.MyXYZOperation';
>
> I am not sure about steps that should be taken afterwards and i am not
> fimiliar with MWE. Can you please point out next steps.
>
> One small question when i import org.eclipse.ocl.example.library as
> binary project then it only contains OCL-ext.oclstdlib,
> oclstdlib.ecore and oclstdlib.genmodel.
> Classes like
> org.eclipse.ocl.examples.library.collection.CollectionMinOperation are
> not available in this plugin, rather i have to see
> org.eclipse.ocl.example.library_source plugin to see that operation.
> Can you explain why?
> Cheers,
Previous Topic:[Announce] Eclipse OCL 4.1.0 (Kepler) M7 is now available.
Next Topic:[OCLinEcore][bug?] @pre tag and isPre() method not working properly
Goto Forum:
  


Current Time: Fri Mar 29 07:00:01 GMT 2024

Powered by FUDForum. Page generated in 0.04631 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top