在Eclipse Papyrus上进行OCL约束检查 [英] OCL constraints checking on Eclipse Papyrus

查看:179
本文介绍了在Eclipse Papyrus上进行OCL约束检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人在Eclipse Papyrus中建模的类图上检查OCL约束吗?我已经定义了一个简单的测试配置文件,该模板仅对原型属性具有一个约束:

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

构造型扩展了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.

任何帮助将不胜感激.

多谢.

推荐答案

对于其他可能遇到相同问题的人,我自己回答.

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

对于Papyrus 0.9.x,OCL约束检查不起作用.您必须下载最新版本的OCL和Papyrus.

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

请注意,您必须使用Eclipse Kepler而不是Juno.

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

这篇关于在Eclipse Papyrus上进行OCL约束检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆