示例#1
0
 public static void Reparse(IProject project, bool initReferences, bool parseCode)
 {
     if (project == null)
     {
         throw new ArgumentNullException("project");
     }
     LoadSolutionProjects.Reparse(project, initReferences, parseCode);
 }
示例#2
0
 internal static void InitializeParserService()
 {
     if (parserDescriptors == null)
     {
         parserDescriptors = AddInTree.BuildItems <ParserDescriptor>("/Workspace/Parser", null, false);
         AssemblyParserService.Initialize();
         LoadSolutionProjects.Initialize();
     }
 }
示例#3
0
 internal static void OnSolutionClosed()
 {
     LoadSolutionProjects.OnSolutionClosed();
     lock (projectContents) {
         foreach (IProjectContent content in projectContents.Values)
         {
             content.Dispose();
         }
         projectContents.Clear();
     }
     ClearAllFileEntries();
 }
示例#4
0
        /// <remarks>Can return null.</remarks>
        internal static IProjectContent CreateProjectContentForAddedProject(IProject project)
        {
            ParseProjectContent newContent = project.CreateProjectContent();

            if (newContent != null)
            {
                lock (projectContents) {
                    projectContents[project] = newContent;
                }
                LoadSolutionProjects.InitNewProject(newContent);
            }
            return(newContent);
        }
示例#5
0
        internal static void OnSolutionLoaded()
        {
            List <ParseProjectContent> createdContents = new List <ParseProjectContent>();

            foreach (IProject project in ProjectService.OpenSolution.Projects)
            {
                try {
                    LoggingService.Debug("Creating project content for " + project.Name);
                    ParseProjectContent newContent = project.CreateProjectContent();
                    if (newContent != null)
                    {
                        lock (projectContents) {
                            projectContents[project] = newContent;
                        }
                        createdContents.Add(newContent);
                    }
                } catch (Exception e) {
                    MessageService.ShowException(e, "Error while retrieving project contents from " + project);
                }
            }
            LoadSolutionProjects.OnSolutionLoaded(createdContents);
        }