public window_manager(SsmsAbstract ssms)
 {
     _ssms = ssms;
     _working_query_window    = new query_window();
     _SSMS_window_collection  = (Windows2)_ssms.DTE2.Windows;
     _addin_window_collection = new System.Collections.Generic.List <Window>();
 }
        public query_window create_query_window()
        {
            EnvDTE.TextDocument doc;

            VSI.ServiceCache.ScriptFactory.CreateNewBlankScript(VSI.Editors.ScriptType.Sql);
            doc = (EnvDTE.TextDocument)VSI.ServiceCache.ExtensibilityModel.Application.ActiveDocument.Object(null);
            doc.EndPoint.CreateEditPoint().Insert("");

            query_window queryWindow = new query_window();

            queryWindow.set_doc(VSI.ServiceCache.ExtensibilityModel.ActiveDocument);

            return(queryWindow);
        }