Can't get a shape to enter in "edit mode". Why?

100 Views Asked by At

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?

1

There are 1 best solutions below

0
On

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.