How do I nest shapes in a DSL Tools diagram?

I have a DSL containing two main domain classes: Area and Entity. Regions are represented visually using a GeometryShape, while objects are represented using a CompartmentShape. Objects can be inline in scope or not (in which case they are inline in root object, which is a kind of scope). There can be relationships between entities, including between entities in different areas. Districts cannot be embedded within other areas, nor objects embedded within other objects.

My problem is that I cannot get the behavior I want in the diagram. Nesting objects in regions works great at the model level, but the visual presentation is messy. For example, if I drag an object that was created in an area outside of that area, it no longer responds to mouse clicks (I have code that does a re-creation, but for some reason the side of the diagram of things is broken).

I searched high and low for samples of how to do this and came up with an empty one. Every example I have found on the internet simulates nesting through "link" relationships, whereas I am doing true nesting of domain classes (and therefore their associated form classes).

Does anyone have an example on how to do this?

While I go out, am I the only one who thinks the chart / shape classes are massively underestimated?

0


a source to share


1 answer


I believe there is an example of this in Developing a Domain with Visual Studio DSL Tools . Alternatively, you can ask a question on the Visual Studio Extensibility forum .



0


a source







All Articles