index > Visual Studio Team System - Domain-Specific Language Tools > problem when following "Walkthrough: Creating and Running Te...

problem when following "Walkthrough: Creating and Running Te...


Guys,

I am new to your dsl tool, and I am trying to follow the workthroughs in the Help. I am stuck at the "Walkthrough: Creating and Running Text Templates" where I keep getting the same error when trying to run the Custom tool on the text template copied and pasted from the Help:

Error 1 The processor named 'ClassDiagramExampleDirectiveProcessor' does not support the directive named 'modelRoot'. The transformation will not be run. C:\Documents and Settings\chuijh.AHNTDOM1\My Documents\Visual Studio 2005\Projects\ClassDiagramExample\Debugging\TextFile1.txt 2 4 Debugging

Did I miss something here?

Joe

Coconut1

Hi Joe,

make sure your LibraryCode.tt (pay attention, file name is LibraryCode.tt and not TextFile1.txt) looks like this:

===========================

<#@ template inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation"#>
<#@ ClassDiagramExample processor="ClassDiagramExampleDirectiveProcessor" requires="fileName='Sample.testcd'" #>

<#
foreach(ModelType type in this.ModelRoot.Types)
{
#>
<#= type.Name#>
<#
}
#>

===========================

The first two lines are called directives - they tell the text templating engine what to do with the rest of the code and text.

Please let me know if this helps.

Thanks

Kirill

Kirill Osenkov

It works, thanks.

I think it works because "ClassDiagramExample" is used in your

<#@ ClassDiagramExample processor="ClassDiagramExampleDirectiveProcessor" requires="fileName='Sample.testcd'" #>

instead of "modelRoot". I looked at the generated code on DirectiveProcessor.cs, and "ClassDiagramExample" is added to collection.

It makes me believe the software and its Help are not in sync on my PC.

Joe

Coconut1
reply 3

You can use google to search for other answers

 

More Articles

Many models, one template.
DSL Tools support for Visual Studio editions
How to generate additional property for embedding elements
Custom type for property
Template Fix: Text templating fails with designers deployed using...
Copy/Paste
Using domain specific language
Compartment Shape Equivalents
How to control order of transformation steps?
Come join the largest group on the DSL and Related Technologies
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

DSL Support For Reverse Engineering, Obj…
When do you plan to update documentation…
Split (T4) code in more than 1 text temp…
Where can i get more documents of DLS To…
Preventing model elements from being del…
Come Join the World's Largest Software F…
Bug in Edit Attributes editor
DSL and XMI interchange format
Own shape decorators
How create an Emf file ? Extending notat…
Dynamically determining link type
Re: Have problem for the DSL walk-throug…
Process to create report at design time
When will a release be made available fo…
DSL and GAT demo

Hot Articles

change literals of enumeration property …
Question on roadmap to DSL features
How to Limit Number of Connectors Betwee…
How to clip shape text?
How to respond to and propagate changes
Licensing & pricing
I have a new article from the NOV CTP ba…
How to expose domain model objects throu…
Bugs (?) in July version
Changing elements from properties
How to access the Session in subdomain?
Using DSL tools outside VS
Documentation for Microsoft.VisualStudio…
Background Picture
Error in "Domain-Specific Language …

Recommend Articles

Beginners Question on code generation
toolbox problem - reset toolbox doesn't …
N-ary Relationships
Model Query Capabilities
On Stores, Editors & Models.
How to make a Domain Relationship visibl…
How to update PropertyGrid after changin…
Error in "Domain-Specific Language …
Question on roadmap to DSL features
new connectors
VS Host Assembly Resolving and parameter…
Popup dialog in DSL
Nested Shapes
Experimental UI - show and hide shapes a…
How to generate Hashtable like collection?