Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Overriding oclIsUndefined method?(How to override oclIsUndefined method?)
Overriding oclIsUndefined method? [message #489359] Fri, 02 October 2009 15:13 Go to next message
Bence Ol is currently offline Bence Ol
Messages: 4
Registered: July 2009
Junior Member
Hello

I would like to override oclIsUndefined method to change the behaviour to be domain specific.

EEnum field cannot be empty (it is always initialized with the default value), however in my model the default value of Enum is 'NULL', so
the overriden oclIsUndefined would have to return true in case of 'NULL'.

How can I override oclIsUndefined() method? I tried to add an oclIsUndefined new custom method as it is described in the help, but it was never called.



Regards,
Bence
Re: Overriding oclIsUndefined method? [message #489372 is a reply to message #489359] Fri, 02 October 2009 16:12 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4061
Registered: July 2009
Senior Member
Hi Bence

I think you may have to dive in to the Java code if you want this now.

I have raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=291220
to ensure that we support this hopefully in the next release. I suspect
we have at least two limitations that will prevent it working at present.

However you didn't provide your code. I think it is
EEnumLiteral::oclIsUndefined that you need to override.

Regards

Ed Willink

Bence Ol wrote:
> Hello
>
> I would like to override oclIsUndefined method to change the behaviour
> to be domain specific.
>
> EEnum field cannot be empty (it is always initialized with the default
> value), however in my model the default value of Enum is 'NULL', so
> the overriden oclIsUndefined would have to return true in case of 'NULL'.
>
> How can I override oclIsUndefined() method? I tried to add an
> oclIsUndefined new custom method as it is described in the help, but it
> was never called.
>
>
>
> Regards,
> Bence
Previous Topic:XML representation of OCL constraints ?
Next Topic:Converting Integer to String
Goto Forum:
  


Current Time: Thu Oct 02 00:20:58 GMT 2014

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

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