static void Main(string[] args)
        {
            var parser      = new SourceFileParser(null);
            var projectInfo = new ProjectInfo();
            var project     = new Project();

            project.SourceDirPath = @"C:\work\AbrantixGit\MSW2\test";
            projectInfo.AddProject(project);
            projectInfo.SelectedProject = project;
            parser.ScanProjectDir(project);
        }
示例#2
0
        private void RefreshAll()
        {
            WriteLine(3, "RefreshAll-Begin");

            try
            {
                /*// Read from startup project
                 * m_projectInfo = new ProjectInfo();
                 * if (!m_vsConnector.ReadSettingsOfStartupProject(m_projectInfo) || m_projectInfo.Projects.Count == 0)
                 * {
                 *  WriteLine(2,"WARNING: There is no startup project defined or the project settings are not accessible!");
                 *  return;
                 * }
                 * m_projectInfo.SelectedProject = m_projectInfo.Projects[0];
                 * m_parser.ScanProjectDir(m_projectInfo.SelectedProject);
                 */

                m_projectInfo = m_vsConnector.ReadSettingsOfAllProjects();
                if (m_projectInfo.Projects.Count == 0)
                {
                    WriteLine(2, "WARNING: There is no project defined or the project settings are not accessible!");
                    return;
                }

                foreach (var project in m_projectInfo.Projects)
                {
                    m_parser.ScanProjectDir(project);
                }

                m_projectInfo.SelectedProject = m_projectInfo.Projects.FirstOrDefault(x => x.AppType == AppType.BOOST);

                if (m_projectInfo.SelectedProject == null)
                {
                    WriteLine(2, "WARNING: There is no project with BOOST or the project settings are not accessible!");
                    return;
                }


                Gui().SetTestInfo(m_projectInfo);
            }
            catch (Exception e)
            {
                string info = "EXCEPTION: " + e.ToString();
                WriteLine(1, info);
            }

            WriteLine(3, "RefreshAll-End");
        }