Bonjour,

Je suis entrain d'écrire un script Python qui, lors de son exécution, doit 
parcourir un modèle et vérifier qu'il respecte bien les règles spécifiées dans 
un fichier OCL.

J'ai un problème lors de l'utilisation de la méthode 
org.topcased.ocl.checker.engine.OCLCheckerEngine.evaluateOCLRules(Resource, 
OCLFileDescriptor, IProgressMonitor)

Par Ressource je sous entend la ressource du modèle à évaluer (ressource que 
j'ai crée à partir de l'URI du modèle).
 Pour l'OCLFileDescriptor j'ai mis celui de mon fichier « .ocl » (obtenu grâce 
à la méthode 
org.topcased.validation.ocl.extension.OCLMetamodelManager.getFiles() )

Finalement pour le IProgressMonitor j'ai crée un NullProgressMonitor.

Cependant lors de l'exécution du script j'obtiens l'erreur suivante :

File "C:/Users/to100966/workspace/essaiEx1Jyt/scripts/Example1.py", line 46, in 
main
    Log=OCLCheckerEngine.evaluateOCLRules(res, FD[0], IPM)
        at 
com.esterel.scade.api.storage.impl.ModelImpl.getAllLibraries(ModelImpl.java:467)

        at 
com.esterel.scade.api.storage.impl.ModelImpl.eIsSet(ModelImpl.java:746)

        at 
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectImpl.java:1247)

        at 
org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:407)

        at 
org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.next(EContentsEList.java:565)

        at 
org.eclipse.emf.ecore.util.EcoreUtil.resolveCrossReferences(EcoreUtil.java:307)

        at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.java:287)

        at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.java:274)

        at 
org.topcased.ocl.checker.engine.OCLCheckerEngine.evaluateOCLRules(OCLCheckerEngine.java:179)

        at 
org.topcased.ocl.checker.engine.OCLCheckerEngine.evaluateOCLRules(OCLCheckerEngine.java:135)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)


java.lang.UnsupportedOperationException: java.lang.UnsupportedOperationException
 C:/Users/to100966/workspace/essaiEx1Jyt/scripts/Example1.py

Pourriez-vous me donner des détails concernant l'utilisation de cette méthode 
et éventuellement une solution à ce problème

Merci d'avance,

Andreu CASAL VILANA



The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.

_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users

Reply via email to