How to use “FileInjectedLayers” to programatically select settings file.

Under “FileInjectedLayers” object there are only two methods available “bool IsLayerInjected()” and “void InjectLayer()”. Both these methods have two input parameters “UserFriendlySettingsLayer.Identity host” and “FileSystemPath file”. I am unable to find what should be the value of the “host”. I could not find any documentation or sample on the same in net.

I want to create an R# addin which will programatically select a specific setting file and add it to

(C:\Users\<…>\AppData\Roaming\JetBrains\ReSharper\vAny\ GlobalSettingsStorage.DotSettings).

 

2 comments
Comment actions Permalink

You can get the host from the data context, for example

DataConstants.UserInjectedLayersHostData host = context.GetData(DataConstants.InjectedLayersHost_IncludingHostItself);

Subsequently, pass

host.Value
as the
host
parameter.
0
Comment actions Permalink

Can you guide me on how to create the data context object

0

Please sign in to leave a comment.