Example #1
0
        /// <summary>
        /// returns a list to LinkedWindows
        /// </summary>
        /// <param name="windows"></param>
        /// <returns></returns>
        public static List <EnvDTE.Window> GetWindowsList(EnvDTE.Windows windows)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            List <EnvDTE.Window> windowsList = new List <Window>();

            foreach (var window in windows)
            {
                windowsList.Add((Window)window);
            }
            return(windowsList);
        }
Example #2
0
 FileCodeModel GetDocumentCodeModel(ITextDocument document, EnvDTE.Windows windows)
 {
     foreach (Window win in windows)
     {
         try
         {
             if (win.ProjectItem != null && win.ProjectItem.FileCount > 0 && win.ProjectItem.FileNames[1] == document.FilePath)
             {
                 return(win.ProjectItem.FileCodeModel);
             }
         }
         catch { }
     }
     return(null);
 }