File templates or custom extension?

Answered

Hello,

I would like to create an extension for ReSharper that creates an NUnit file, however, all NUnit files live in the NUnit folder.

So the structure I want is:

 

Folder

--NUnit

---FileFixture.cs

- File.cs

 

Preferably, I want my extension to do the following;

- using ctrl alt insert to specify a template to create

- grab the name from the current class, add Fixture behind it

- Create the NUnit folder if it does not yet exist

- Create the file and add it to the project

- Apply the file template to the class

 

I would like to know, is this possible? Perhaps already with the current file templates?

If this is not within reach for the current file templates is it an option as an extension?

1 comment

Hello!

 

Thank you for contacting us.

Currently there's no such option in ReSharper. File templates with custom folder can be created using Multi-File Templates, though it doesn't seem to be helpful in your case. Also there's no way to use macro for the file name - https://youtrack.jetbrains.com/issue/RSRP-355528.

Thank you.

0

Please sign in to leave a comment.