In ReSharper file template only one Hot Spot parameter is active and editable
I am creating ReSharper file template and am am using editable parameter as described here:https://www.jetbrains.com/help/resharper/2017.1/Templates__Creating_and_Editing_Templates__Declaring_Variables.html
However, when I have more then one occurrence of it, the template highlights only one, and during the Hot Spot Session it only changes the one that is highlighted using the setting M-O1, M-O2 and so on. But I want to change all off the occurrences when I edit the first one. My understanding is that as soon as I change the first occurrence of the parameter all other occurrences will also be changed , but this is not the case. Am I missing something here.
In the documentation it stated that only the focus depends on the M-O1 setting, however changing that one should change the other one as well: If the parameter is used in the template more than once, a combo box appears, where you can select a sequential number of the editable occurrence. This number specifies to which occurrence of the parameter the input focus will be set when the template is deployed with a Hot Spot Session.
Example code:
Insert.IntoTable("LocalResource")
.Row(
new
{
LocalResourceID = Ids.supportPhoneLocalResourceID$Region$,
ResourceType = "SageNA.CE.Common.Resources.Properties.Resources",
ResourceName = "RES_SUPPORT_PHONE_$Region$",
Created = DateTime.Now,
LastModified = DateTime.Now
});
In this case during the Hot Spot Session only the first occurrence is editable.
Please sign in to leave a comment.
Hello Svetlin
It does not matter which item you select in combobox (M-O1 or M-O2), changing a hotspot during active hotspot session will change both occurrences while you are typing something there. Are you able to send me a screencast (you may use free tool http://www.techsmith.com/jing.html) which will show how it works for you after inserting a template in your code?
For me, changing first occurrence leads to updating the second occurrence accordingly.
Thanks!