File Template - More control for integration (Icon, Availability)

Hi,

 

I'm very into creating file templates and live code templates, as they increase productivity enormeously. However, I have some question about file templates:

  1. Is it possible to specify an icon for a file template?
  2. Is it possible to specify a file template for more special projects or add some restrictions (like this template is only available for projects referencing xunit)?

What I've found so far:

To 1: I created a "Test" class file template for XUnit but within the "New..." menu, the icon is missing. 

"Test" is the description, I've noted it as "&Test" like the built-in file templates ("&Class", "&Struct", etc. [What is the "&" for?]). However, as you see, the icon is missing. The configuration for Test is like this (I just renamed "Test" to "XUnit Test Class" for better conveniance):

To 2: 

I know restricting file templates based on references is possible because the built-in "Test Fixture" template has already such a restriction

But I can't find this in the "Availability" dialog so I guess this is not meant to be accessible for a "customer". Is this how it works or am I missing something here?

 

I'm glad for every help. Thanks in advance and thanks for reading if you made it up til here :)

 

Kind regards

 

0
2 comments

Hi Tabaloa

Thank you for your request. 

For the first case, I suppose this is a known issue: RIDER-13989 as C# files should have a special icon. However, there is no way to add your custom icon for templates. 

Availability of templates by reference has not been implemented yet, but we already have a feature request: RIDER-40343

Feel free to follow the issues to increase their priority and for update notifications. 

Should you have any other questions, let me know. Have a great day :) 

0

Thanks for the answer Alexandra.

0

Please sign in to leave a comment.