|
|
Re: Extend OCL [message #1721025 is a reply to message #1719873] |
Fri, 22 January 2016 16:35 |
John Prestwick Messages: 2 Registered: January 2016 |
Junior Member |
|
|
Hi,
Thanks for your answer.
So, I defined my attributes as EDate.
I am able to use some operations (<, >) on Dates directly into my (Complete) OCL constraints. That is nice.
I want now to add new operations by using Java methods that I will create.
As you told me, I need to extend the OCL Standard Library.
The file that you gave me as an example is the following (I've deleted 2 operations) :
import 'http://www.eclipse.org/ocl/2015/Library';
library ocl : ocl = 'http://www.eclipse.org/ocl/2015/Library'
{
type String {
operation getSeverity() : Integer[1] => 'org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation';
}
}
When copying this file and opening, I have the following error :
I have no idea how to link the oclstdlib file with the org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation.java ?
And I am not able to find org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation.getSeverity() to see how it is implemented.
Could you help me on this two points ? This might looks stupid but I am really a newbie.
Thanks a lot
Regards
[Updated on: Sun, 24 January 2016 18:25] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02134 seconds