Example #1
0
        void StartDetection()
        {
            try
            {
                var asm = GetType().Assembly;
                var id  = "ReSharper OpenWrap Integration";
#if v600
                _lifetimeDefinition = resharper::JetBrains.DataFlow.Lifetimes.Define(resharper::JetBrains.DataFlow.EternalLifetime.Instance, "OpenWrap Solution");
                _pluginsDirectory   =
                    (resharper::JetBrains.Application.PluginSupport.PluginsDirectory)_host.Environment.Container.ResolveDynamic(typeof(resharper::JetBrains.Application.PluginSupport.PluginsDirectory)).Instance;

                _selfPlugin = new ResharperPlugin(_lifetimeDefinition.Lifetime, new[] { new resharper::JetBrains.Util.FileSystemPath(asm.Location) }, null, null, null);

                _pluginsDirectory.Plugins.Add(_selfPlugin);
#else
                _selfPlugin = new ResharperPlugin(id, new[] { asm });

                ResharperPluginManager.Instance.Plugins.Add(_selfPlugin);
                _selfPlugin.Enabled = true;
                resharper::JetBrains.Application.Shell.Instance.LoadAssemblies(id, asm);
#endif
            }
            catch (Exception e)
            {
                _output.Write("Plugin integration failed.\r\n" + e.ToString());
            }
        }
Example #2
0
        void StartDetection()
        {
            try
            {
                var asm = GetType().Assembly;
#if v600 || v610
                _lifetimeDefinition = resharper::JetBrains.DataFlow.Lifetimes.Define(resharper::JetBrains.DataFlow.EternalLifetime.Instance, "OpenWrap Solution");
                _pluginsDirectory =
                    (resharper::JetBrains.Application.PluginSupport.PluginsDirectory)_host.Environment.Container.ResolveDynamic(typeof(resharper::JetBrains.Application.PluginSupport.PluginsDirectory)).Instance;

                _selfPlugin = new ResharperPlugin(_lifetimeDefinition.Lifetime, new[] { new resharper::JetBrains.Util.FileSystemPath(asm.Location) }, null, null, null);

                _pluginsDirectory.Plugins.Add(_selfPlugin);
                
                _selfPlugin.IsEnabled.SetValue(true);
#elif v710
                _lifetimeDefinition = resharper::JetBrains.DataFlow.Lifetimes.Define(resharper::JetBrains.DataFlow.EternalLifetime.Instance, "OpenWrap Solution");
                _pluginsDirectory =
                    (resharper::JetBrains.Application.PluginSupport.PluginsDirectory)_host.Environment.Container.ResolveDynamic(typeof(resharper::JetBrains.Application.PluginSupport.PluginsDirectory)).Instance;

                _selfPlugin = new ResharperPlugin(_lifetimeDefinition.Lifetime, new[] { new resharper::JetBrains.Util.FileSystemPath(asm.Location) }, null, null, null);

                //_pluginsDirectory.Plugins.Add(_selfPlugin);

                _selfPlugin.IsEnabled.SetValue(true);
#else
                var id = "ReSharper OpenWrap Integration";
                _selfPlugin = new ResharperPlugin(id, new[] { asm });


                ResharperPluginManager.Instance.Plugins.Add(_selfPlugin);
                _selfPlugin.Enabled = true;
                resharper::JetBrains.Application.Shell.Instance.LoadAssemblies(id, asm);
#endif
            }
            catch (Exception e)
            {
                _output.Write("Plugin integration failed.\r\n" + e.ToString());
            }
        }
		void StartDetection()
		{
			try
			{
				_output.Write("Start detection of Simple.Testing Resharper plugin" );
				var asm = GetType().Assembly;
				var id = "Simple.Testing ReSharper Plugin";
#if RESHARPER_6
                _lifetimeDefinition = resharper::JetBrains.DataFlow.Lifetimes.Define(resharper::JetBrains.DataFlow.EternalLifetime.Instance, "Simple.Testing Reharper Plugin");
                _pluginsDirectory =
                    (resharper::JetBrains.Application.PluginSupport.PluginsDirectory)_host.Environment.Container.ResolveDynamic(typeof(resharper::JetBrains.Application.PluginSupport.PluginsDirectory)).Instance;

                _selfPlugin = new ResharperPlugin(_lifetimeDefinition.Lifetime, new[] { new resharper::JetBrains.Util.FileSystemPath(asm.Location) }, null, null, null);
                
                _pluginsDirectory.Plugins.Add(_selfPlugin);
#else
				_selfPlugin = new ResharperPlugin(id, new[] { asm });

				ResharperPluginManager.Instance.Plugins.Add(_selfPlugin);
				_selfPlugin.Enabled = true;
				resharper::JetBrains.Application.Shell.Instance.LoadAssemblies(id, asm);
#endif
				_output.Write("End detection of Simple.Testing Resharper plugin");
				
			}
			catch (Exception e)
			{
				_output.Write("Plugin integration failed.\r\n" + e.ToString());
			}
		}