Ran Mouri

Hi,
I got a problem when implementing nested shapes. I couldn't drag a shape from the toolbox to its parent shape directly, I had to drag it into the designer first and move it into the parent shape. I followed the nested shape sample code packaged in DSL tools (version March 2007) and I am not sure I missed something. Can anyone help me
Thank you very much.
Regards,
Ran


Re: Visual Studio Extensibility Nested Shape problem

Steve Cook MSFT

Did you follow this paragraph in the sample documentation

The model in this example includes a reference relationship "ComponentReferencesChildren". This is not mapped to a connector, but instead is updated with changes in the nesting on the diagram. When a new component is dropped from the toolbox onto another component, an Element Merge Directive (defined on Component and accepting Components) both creates a link of ComponentReferencesChildren, as well as embedding the new Component in the model root.

-- Steve




Re: Visual Studio Extensibility Nested Shape problem

Ran Mouri

Hi Steve,
I read it but I didn't really understand. My model has a set of Services and Interfaces, a service has a relationship with an Interface. If I like to have Interface shapes nested inside Service shapes, what should element merge directives look like
Regards,
Ran Mouri




Re: Visual Studio Extensibility Nested Shape problem

Edward Bakker

Hi Ran,

To see the Element Merge Directives in the sample solution that the documentation is referring to you can do the following. Open the ”°DslDefinition.dsl”± file in the sample solution and have a look at the DslExplorer. Click the ”°DomainClasses”± node in the DslExplorer and open the ”°Component”± node to see the related Element Merge Directives.

In your case, you will probably need to implement an Element Merge Directive on your ”°Service”± domain class.

Edward





Re: Visual Studio Extensibility Nested Shape problem

Ran Mouri

Thank you very much, Steve and Edward. I was just confused about element merge directive paths. I made it work now.
Ran Mouri