| Operation Overriding [message #825119] |
Tue, 20 March 2012 09:45  |
ModelGeek Mising name Messages: 348 Registered: June 2011 |
Senior Member |
|
|
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,
|
|
|
|
| Re: Operation Overriding [message #825906 is a reply to message #825193] |
Wed, 21 March 2012 08:08   |
ModelGeek Mising name Messages: 348 Registered: June 2011 |
Senior Member |
|
|
Hi,
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.
Do you have any idea about this problem?
Regards,
[Updated on: Wed, 21 March 2012 08:20] Report message to a moderator
|
|
|
|
|
|
|
| Re: Operation Overriding [message #826764 is a reply to message #826707] |
Thu, 22 March 2012 09:31  |
ModelGeek Mising name Messages: 348 Registered: June 2011 |
Senior Member |
|
|
Hi,
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?
regards,
|
|
|
Powered by
FUDForum. Page generated in 0.03297 seconds