Quantcast
Channel: Custom DSL Editor
Viewing all articles
Browse latest Browse all 5

Custom DSL Editor

$
0
0

That approach won’t be simple neither and the question becomes a T4 and WPF question, but I’ll try to answer without digging into details:

If your WPF will represent an xml model as visual elements, then adding/removing them is a matter of adding or removing a visual element. You will then need to serialize the model and write T4 templates that will analyze the persisted model and generate the concrete artifact (i.e. C# class with properties, methods and etc.).

If you will compare the approach above with the DSL WPF minimal language then it will be simpler for you to try and implement it on WPF minimal language, since you will get the model, persistence, transaction support, eventing, rules and T4 directive processor (simpler templates) by sticking with DSLTools.

In general, the problem is not a simple one, and if you willing to give up the diagram persistence (just the visual layout persistence, the model is obviously persisted) then WPF minimal language with bring closer to what you seek than any other option I’m aware of.

There is a sample on T4 processing arbitrary text input in VS2008 SDK (under installation dir\VisualStudioIntegration\Samples\DSKTools\Example.TextTemplating\Example.DirectiveProcessors).

 


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>