extend OCL String Operation by contains - need help [message #644044] |
Thu, 09 December 2010 08:55 |
pez Messages: 2 Registered: December 2010 |
Junior Member |
|
|
Hi everyone,
I would like to have a string operation contains(substring: String): Boolean. Currently, I work with EMF/OCL, the interactive OCL console and an uml-model. The new operation should work on that, i.e., it should be usable like the build-in operations, e.g., size() or =.
My problem: I have no clue how to achieve that. I had a look at 'customizing environment'. Unfortunately, I was not able to manage it. I also found something on the StringLibrary in the context of QTVO. However, that didn't work for me either.
Is there anyone who can lead me through the different steps to achieve my goal?
Regards,
Pez
[Updated on: Thu, 09 December 2010 08:57] Report message to a moderator
|
|
|
Re: extend OCL String Operation by contains [message #644148 is a reply to message #644044] |
Thu, 09 December 2010 16:44 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi Pez
OMG OCL 2.2 defines String::indexOf(String) : Integer. Unfortunately
MDT/OCL 3.0 does not implement it and extending the library is hard.
MDT/OCL 3.1 will have an extensible library and will implement indexOf
anyway.
I'm afraid that doesn't help much today.
Regards
Ed Willink
On 09/12/2010 08:55, pez wrote:
> Hi everyone,
>
> I would like to have a string operation contains(substring: String):
> Boolean. Currently, I work with EMF/OCL, the interactive OCL console
> and an uml-model. The new operation should work on that, i.e., it
> should be usable like the build-in operations, e.g., size() or =. My
> problem: I have no clue how to achieve that. I had a look at
> 'customizing environment'. Unfortunately, I was not able to manage it.
> I also found something on the StringLibrary in the context of QTVO.
> However, that didn't work for me either. Is there anyone who can lead
> me through the different steps to achieve my goal?
> Regards,
>
> Pez
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04246 seconds