I have above mentioned ecore. If I take instance of Class2 and try to run methods(abc, test) in console, it gives me OCL_Invalid.
Is operation overriding is available in OCL? if yes then what is wrong with my ecore?
thanks for help!
regards,
]]>ModelGeek Mising name2012-03-20T13:45:14-00:00Re: Operation Overriding
https://www.eclipse.org/forums/index.php/mv/msg/313303/825193/#msg_825193
This looks like https://bugs.eclipse.org/bugs/show_bug.cgi?id=366229
which is fixed now for Juno for the new Eclipse evaluator. It may be
fixed for the legacy Ecore evaluator too.
Regards
Ed Willink
On 20/03/2012 09:45, ModelGeek Mising name wrote:
> class Class1
> {
> attribute ID : ecore_0::ELongObject[1];
> attribute name : String[1];
> operation abc(input : Class1[*] { !ordered,!unique }) :
> Boolean[1]
> {
> body: true;
> }
> operation test() : Integer[1]{ !ordered,!unique }
> {
> body:1;
> }
> }
> class Class2 extends Class1
> {
> operation abc(input : Class1[*] { !ordered,!unique }) :
> Boolean[1]
> {
> body: false;
> }
> operation test() : Integer[1]{ !ordered,!unique }
> {
> body:2;
> }
> }
>
> I have above mentioned ecore. If I take instance of Class2 and try to
> run methods(abc, test) in console, it gives me OCL_Invalid.
>
> Is operation overriding is available in OCL? if yes then what is wrong
> with my ecore?
>
> thanks for help!
>
> regards,
>]]>Ed Willink2012-03-20T15:29:07-00:00Re: Operation Overriding
https://www.eclipse.org/forums/index.php/mv/msg/313303/825906/#msg_825906
I have downloaded JUNO and ecore file seems working fine in Eclipse JUNO OCL console. I took an dynamic instance of subclass and opertaion worked fine.
I have an application written in netbeans IDE using old jar files. My application also has similar functionality of OCL console, but even after i have replaced all old jar files with new one(JUNO) but still it is giving same error. Do you know which jar files i need to replace in order to have the same effect in my application.
My application was using old jar files but now i have added new jar files but error is still there.
In JUNO OCL console i get the results from overriden method but in my application it is still results are from method in super class.
Please guide me which jar files i need to get from JUNO?
thanks!
regards,]]>ModelGeek Mising name2012-03-22T10:18:59-00:00Re: Operation Overriding
https://www.eclipse.org/forums/index.php/mv/msg/313303/826658/#msg_826658
The new Pivot-based OCL is used within interactive (Xtext-based)
tooling. It coexists with the legacy approaches since the new stuff has
new org.eclipse.ocl.examples... package names. You need to use these in
your application. The API is fairly similar but not identical and as yet
unreviewed.
Regards
Ed Willink
On 22/03/2012 06:19, ModelGeek Mising name wrote:
> I am again running into same problem. I have updated jar files from
> JUNO. The ecore i gave ealrier works fine but i have created new which
> works fine in JUNO ocl console but in my application it does not work.
>
>
> In JUNO OCL console i get the results from overriden method but in my
> application it is still results are from method in super class.
>
> Please guide me which jar files i need to get from JUNO?
>
> thanks!
>
> regards,]]>Ed Willink2012-03-22T10:46:41-00:00Re: Operation Overriding
https://www.eclipse.org/forums/index.php/mv/msg/313303/826707/#msg_826707
i have added all org.eclipse.ocl.examples... jar files but it does not work... As you have mentioned that Pivot-based OCL is used so do i need to change the code for evalution like i am using following code for evaluation
And even setting delegates are giving wrong results so do i need to change my code?
do i need to have different "imports" so Pivot-based OCL can be used?
thanks for assistance
Regards,]]>ModelGeek Mising name2012-03-22T12:05:35-00:00Re: Operation Overriding
https://www.eclipse.org/forums/index.php/mv/msg/313303/826764/#msg_826764
I read that i need to do intialization for standalone application with respect to PIVOT for my ecore model. I have also changed annotation to http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
oclDelegateURI = OCLDelegateDomain.OCL_DELEGATE_URI_PIVOT;
EOperation.Internal.InvocationDelegate.Factory.Registry.INSTANCE.put
(oclDelegateURI, new OCLInvocationDelegateFactory.Global());
EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.put
(oclDelegateURI, new OCLSettingDelegateFactory.Global());
EValidator.ValidationDelegate.Registry.INSTANCE.put
(oclDelegateURI, new OCLValidationDelegateFactory.Global());
but i getting the error
java.lang.NoClassDefFoundError: org/eclipse/uml2/uml/UMLPackage
at org.eclipse.ocl.examples.pivot.uml.UML2Ecore2Pivot$Factory.<init>(UML2Ecore2Pivot.java:48)
any idea? what is wrong here, i am not using uml model here then why it is looking for UML package?