using @pre. operator. [message #655710] |
Tue, 22 February 2011 07:02  |
Eclipse User |
|
|
|
Hello every experts ,
I am writing a program in Java,using Eclipse for providing the user by the ability to apply some operators on a per developed UML Model of any software. one of this operators is to add a new Operation into an interface , so that all the related elements that interface has to be updated.
I need to use the @pre in the post conditions as you see in the following short code.:
String test="Dependency.allInstances()->select(getAppliedStereotypes().name- > includes('AddPhenomenon')).source.oclAsType(Interface).owned Member.oclAsType(Operation)- > forAll(op:Operation|Operation.allInstances()->select(name=op.name)- >size()=1)";
Constraint consTest=(Constraint)oclHelper.createInvariant(test); existsDepndency_AddPheno=ocl2.check(this.model, consTest);
if(existsDepndency_AddPheno)
The result is that : the @pre is to be used in the method post conditions, so how can I use it. where exactly I could embed the code of post conditions in the Java program?
|
|
|
|
Re: using @pre. operator. [message #655749 is a reply to message #655743] |
Tue, 22 February 2011 09:47  |
Eclipse User |
|
|
|
Hi Axel,
I really did mistake in the example code in this topic, but I did create a new topic with the correct example, and the correct error message from the ocl parser.
I am using Eclips, in Plugin perspective, and UML model in Papyrus.
best regards,
|
|
|
Powered by
FUDForum. Page generated in 0.04972 seconds