无法获取要进入“编辑模式”的形状。为什么?
我创建了一个非常简单的 DSL,它是一个特定的形状 (TasksGroupShape),当用户开始敲击键盘或按 F2 时,我无法进入编辑模式。
该形状是一个几何形状,具有链接到名为“名称”的属性的简单文本装饰器(称为“名称”)。
该模型元素称为 TasksGroup,并继承自另一个名为 NamedElement(抽象)的域类,该域类具有域属性 Name。
此属性是一个简单的字符串,其中“Is Element Name”设置为 true。
这是一个简单的设计,我在其他 DSL 项目中使用过,效果很好。
可能这个有问题,但我不知道到哪里去寻找问题。
我是不是忘记了什么?关于在哪里放置断点以了解问题所在的任何建议?
I have created a very simple DSL that as a particular shape (TasksGroupShape) that I can't get to enter in edit mode either when the user starts to hit the keyboard or presses F2.
This shape is a geometry shape with a simple text decorator (called Name) linked to a property called Name.
The model element is called TasksGroup and inherits from another domain class called NamedElement (abstract) that has the domain property Name.
This property is a simple string with "Is Element Name" set to true.
This is a simple design that I used in other DSL projects and that worked fine.
Probably there is something wrong with this one but I don't know where to look to find the problem.
Am I forgetting something? Any advice on where to put a breakpoint to understand what is wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢 raskal,在 DSL Tools MSDN 论坛上找到了这个问题的答案。
问题是该形状定义了 2 个文本装饰器,一个称为“任务组”,另一个称为“名称”(这个附加到“名称”属性),按此顺序。
重新创建“任务组”装饰器,使“名称”装饰器成为列表中的第一个装饰器,使 DSL 开始正常运行。
显然,为了实现所需的行为,相应的文本装饰器必须是第一个。
Found the answer to this one on the DSL Tools MSDN Forum thanks to raskal.
The problem was that the shape had 2 text decorators defined, one called "Tasks Group" and other called "Name" (this one attached to the Name property) in this order.
Recreating the "Tasks Group" decorator so that the "Name" decorator is the first one in the list makes the DSL start to behave correctly.
Apparently to achieve the desired behavior, the corresponding text decorator must be the first one.