Programming Domain-Specific Languages
This section shows you how to use custom code to build and modify a domain-specific language.
When you build a domain-specific language project, code will be generated from your model elements. You should not modify the code generated from the model elements, because it is regenerated whenever the project is built, and your custom code will be lost. Instead, you should override the class that you want to modify and set the Generates Double Derived property to true. You can then add your custom code to a partial class.
In This Section
Accessing the Store Programmatically
Describes how to access a domain-specific language in the in-memory store.
Describes how to use transactions to wrap the modifications you make to the domain-specific language.
Describes how to add elements to the model in the in-memory store.
Modifying Elements in the Model
Describes different kinds of modifications that can be made to the model.
Describes how to find different kinds of model elements.
How to: Delete Elements from the Model
Describes how to delete model elements.
Responding to Changes in the Model
Describes how to provide code that runs in response to events generated by changes in the model.
How to: Set a Diagram Background Image
Explains how to add custom code that adds a background image to the generated designer.