You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to Source Templates, it would be nice to be able to ship File Templates inside of source code projects and NuGet Packages. This would help OSS projects ship boilerplate code and light-up experiences inside of ReSharper and Rider.
I'm still not sure 100% how to define variables, but an array of comma delimited values might work. Here's an example of a file template defined in code.
usingJetBrains.Annotations;publicstaticclassMySourceTemplates{[FileTemplate(DefaultFileName="ClassTests.cs",Description="Tests for $CLASS$",Reformat=true,ShortenQualifyingReferences=true,Availability=new[]{"C# Projects","F# Projects"},AddToNewMenu=true,Variables=new[]{// Name, Macro, Editable (default false) "HEADER,FileHeader","CLASS,Current File Name,true","NAMESPACE,"})]publicstaticvoidxunit_test(){/* $HEADER$namespace $NAMESPACE$ { public class $CLASS$_TESTS {$END$} } */}}
The text was updated successfully, but these errors were encountered:
Similar to Source Templates, it would be nice to be able to ship File Templates inside of source code projects and NuGet Packages. This would help OSS projects ship boilerplate code and light-up experiences inside of ReSharper and Rider.
I'm still not sure 100% how to define variables, but an array of comma delimited values might work. Here's an example of a file template defined in code.
The text was updated successfully, but these errors were encountered: