specialzed OCL [message #1033609] |
Thu, 04 April 2013 08:32  |
Eclipse User |
|
|
|
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 #1033628 is a reply to message #1033609] |
Thu, 04 April 2013 08:58   |
Eclipse User |
|
|
|
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 #1057430 is a reply to message #1057012] |
Wed, 08 May 2013 08:28  |
Eclipse User |
|
|
|
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 08:01  |
Eclipse User |
|
|
|
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 08:01  |
Eclipse User |
|
|
|
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 08:16  |
Eclipse User |
|
|
|
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 08:28  |
Eclipse User |
|
|
|
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 08:01  |
Eclipse User |
|
|
|
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 08:01  |
Eclipse User |
|
|
|
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 08:16  |
Eclipse User |
|
|
|
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 08:28  |
Eclipse User |
|
|
|
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,
|
|
|