Hi Gregor, I think the problem comes from the fact you have a nameless constraint. Try to give a name to your OCL rule. For instance : inv rule1: self.getAllOperations()->size() = 0.
Tell us if this solution solves your problem. Regards, Sebastien Quoting [email protected]: > Hello Topcased-Users, > > I have a problem with the ocl-checking on an UML-Modell. I created an > ocl-rule-file containig this constraints: > > MainModel : http://www.eclipse.org/uml2/2.1.0/UML > > context Class > inv: self.getAllOperations()->size() = 0 > > Now I want this invariant to be performed on this uml-file: > > <?xml version="1.0" encoding="UTF-8"?> > <uml:Model xmi:version="2.1" > xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" > xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" > xmi:id="_qb8akM37EdqwVrslYOdUDA"> > <packagedElement xmi:type="uml:Package" > xmi:id="_w8IxIM37EdqwVrslYOdUDA" name="OCLTest"> > <packagedElement xmi:type="uml:Class" > xmi:id="_nVos8BrhEd6FZN6o2XCVkQ" name="Test"> > <ownedAttribute xmi:id="_onBcUBrhEd6FZN6o2XCVkQ" name="prop1" > type="_uSUyQBrhEd6FZN6o2XCVkQ"/> > </packagedElement> > <packagedElement xmi:type="uml:PrimitiveType" > xmi:id="_uSUyQBrhEd6FZN6o2XCVkQ" name="Integer"/> > </packagedElement> > </uml:Model> > It is a simple uml-model consisting of one class with one property. > I right click on the model and choose the option "OCL Check...". In the > upcoming OCL checker I try to add the ocl-file. > But unfourtnately after clicking ok, I'm still with the ocl-checker > whithout the ocl-file. The error log doesn't prompt anything. > > I tried both in the standalone TopCased-RCP and as a plugin for eclispe > 3.4.1 (Ganymede). Topcased version is 2.4.0. > My project's structure is as follows: > OCLTest > --> constraints > --> rules.ocl > --> Models > --> OCLTest.uml > --> OCLTest.umldi > > Do you have any suggestion how to solve this problem ? I'm really > looking forward for your help. > > Kind regards > Gregor Trefs > > _______________________________________________ > Topcased-users mailing list > [email protected] > http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users > > ---------------------------------------------------------------- Ce message electronique et tous les fichiers joints qu'il contient (ci-apres "le message") sont confidentiels et destines exclusivement a l'usage des destinataires indiques ou des personnes dument habilitees a les recevoir a leur place. Si vous recevez ce message par erreur, merci de bien vouloir le detruire et d'en avertir l'emetteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication totale ou partielle est interdite sauf autorisation expresse de l'emetteur. Les idees et opinions exprimees dans ce message sont celles de son auteur et ne representent pas necessairement celles de CS Communication & Systemes ou de ses filiales. Malgre toutes les dispositions prises par CS Communication & Systemes et ses filiales pour minimiser les risques de virus, les fichiers joints a ce message peuvent contenir des virus qui pourraient endommager votre systeme informatique. Il vous appartient d'effectuer vos propres controles anti-virus avant d'ouvrir les fichiers joints. CS Communication & Systemes et ses filiales declinent toute responsabilite pour toute perte ou dommage resultant de l'utilisation de ce message et/ou des fichiers joints. This e-mail and any file attached hereto (hereinafter 'the e-mail') are confidential and intended solely for the use of the adressees indicated below or the persons duly entitled to receive them in their place. If you receive this e-mail in error, please delete it and notify the sender. Any use of this e-mail not in accordance with its purpose, any dissemination or disclosure, either whole or partial, is prohibited, unless formally approved by the sender. The ideas or opinions expressed in this e-mail are solely those of its author and do not necessarily represent those of CS Communication & Systeme or its affiliates. Despite all the measures taken by CS Communication & Systeme and its affiliates in order to minimize the risks of virus, the files attached to this e-mail may contain virus which could damage your information system. You are responsible for processing your own anti-virus checking before opening any file attached hereto. Neither CS Communication & Systemes, nor its affiliates, shall be held liable for any loss or damage due to the use of this e-mail or any file attached hereto. _______________________________________________ Topcased-users mailing list [email protected] http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users
