<commit_before>using System;

using Extensibility;

using EnvDTE;

using EnvDTE80;

namespace FsEye.VSAddin

{

	/// <summary>The object for implementing an Add-in.</summary>

	/// <seealso class='IDTExtensibility2' />

	public class Connect : IDTExtensibility2

	{

		/// <summary>Implements the constructor for the Add-in object. Place your initialization code within this method.</summary>

		public Connect()

		{

		}



		/// <summary>Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.</summary>

		/// <param term='application'>Root object of the host application.</param>

		/// <param term='connectMode'>Describes how the Add-in is being loaded.</param>

		/// <param term='addInInst'>Object representing this Add-in.</param>

		/// <seealso class='IDTExtensibility2' />

		public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)

		{

            try

            {

                // ctlProgID - the ProgID for your user control.

                // asmPath - the path to your user control DLL.

                // guidStr - a unique GUID for the user control.

                string ctlProgID, asmPath, guidStr;

                // Variables for the new tool window that will hold

                // your user control.

                EnvDTE80.Windows2 toolWins;

                EnvDTE.Window toolWin;

                object objTemp = null;



                _applicationObject = (DTE2)application;

                _addInInstance = (AddIn)addInInst;

                ctlProgID = "Swensen.FsEye.Forms.WatchForm";

                // Replace the <Path to VS Project> with the path to

                // the folder where you created the WindowsCotrolLibrary.

                // Remove the line returns from the path before 

                // running the add-in.

                asmPath = @"C:\Users\Stephen\Documents\Visual Studio 2010\Projects\FsEye\code\FsEye\bin\Release\FsEye.dll";

                guidStr = "{E9C60F2B-F01B-4e3e-A551-C09C62E5F584}";



                toolWins = (Windows2)_applicationObject.Windows;

                // Create the new tool window, adding your user control.

                toolWin = toolWins.CreateToolWindow2(_addInInstance, 

                  asmPath, ctlProgID, "FsEye", guidStr, 

                  ref objTemp);

                // The tool window must be visible before you do anything 

                // with it, or you will get an error.

                if (toolWin != null)

                {

                    toolWin.Visible = true;

                }

                //// Set the new tool window's height and width, 
<commit_msg>refactoring<commit_after>using System;

using Extensibility;

using EnvDTE;

using EnvDTE80;

namespace FsEye.VSAddin

{

	/// <summary>The object for implementing an Add-in.</summary>

	/// <seealso class='IDTExtensibility2' />

	public class Connect : IDTExtensibility2

	{

		/// <summary>Implements the constructor for the Add-in object. Place your initialization code within this method.</summary>

		public Connect()

		{

		}



		/// <summary>Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.</summary>

		/// <param term='application'>Root object of the host application.</param>

		/// <param term='connectMode'>Describes how the Add-in is being loaded.</param>

		/// <param term='addInInst'>Object representing this Add-in.</param>

		/// <seealso class='IDTExtensibility2' />

		public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)

		{

            try

            {

                _applicationObject = (DTE2)application;

                _addInInstance = (AddIn)addInInst;

                

                // ctlProgID - the ProgID for your user control.

                var ctlProgID = "Swensen.FsEye.Forms.WatchForm";



                // asmPath - the path to your user control DLL.

                // Replace the <Path to VS Project> with the path to

                // the folder where you created the WindowsCotrolLibrary.

                // Remove the line returns from the path before 

                // running the add-in.

                var asmPath = @"C:\Users\Stephen\Documents\Visual Studio 2010\Projects\FsEye\code\FsEye\bin\Release\FsEye.dll";



                // guidStr - a unique GUID for the user control.

                var guidStr = "{E9C60F2B-F01B-4e3e-A551-C09C62E5F584}";



                var toolWins = (Windows2)_applicationObject.Windows;

                // Create the new tool window, adding your user control.

                object objTemp = null;

                var toolWin = toolWins.CreateToolWindow2(_addInInstance, asmPath, ctlProgID, "FsEye", guidStr, ref objTemp);

                

                // The tool window must be visible before you do anything 

                // with it, or you will get an error.

                if (toolWin != null)

                    toolWin.Visible = true;



                //// Set the new tool window's height and width, 

{'fraction_non_alphanumeric': 0.541233140655106, 'fraction_numerical': 0.0064547206165703275, 'mean_word_length': 4.716409691629956, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 65, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4477432', 'n_tokens_mistral': 10347, 'n_tokens_neox': 10346, 'n_words': 433}