OCL constraints checking on Eclipse Papyrus

不羁的心 提交于 2019-12-22 10:57:34

问题


Does anyone manage to check OCL constraints on a class diagram modeled in Eclipse Papyrus ? I have definied a simple test profile with only one constraint on a stereotype attribute :

{OCL} self.property > 0

The stereotype extends the Property metaclass so I applied it on a class attribute and I set the property of the stereotype to 0. But I never got an error with the Validation > Validate Model command from the context menu.

Any help would be much appreciate.

Thanks by advance.


回答1:


I answer to myself for other people who might have the same problem.

OCL constraints checking doesn't work for Papyrus 0.9.x You have to download the latest nighlty build of OCL and Papyrus.

You can download them from these repositories :

  • http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/kepler/
  • http://download.eclipse.org/modeling/mdt/ocl/updates/nightly

Please notice that you have to use Eclipse Kepler and not Juno.



来源:https://stackoverflow.com/questions/15897583/ocl-constraints-checking-on-eclipse-papyrus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!