///// <summary> ///// Gets whether the LoadSolutionProjects thread is currently running. ///// </summary> //public static bool LoadSolutionProjectsThreadRunning //{ // get { return LoadSolutionProjects.IsThreadRunning; } //} ///// <summary> ///// Occurs when the 'load solution projects' thread has finished. ///// This event is not raised when the 'load solution projects' is aborted because the solution was closed. ///// This event is raised on the main thread. ///// </summary> //public static event EventHandler LoadSolutionProjectsThreadEnded //{ // add { LoadSolutionProjects.ThreadEnded += value; } // remove { LoadSolutionProjects.ThreadEnded -= value; } //} 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); }
public static void Reparse(IProject project, bool initReferences, bool parseCode) { if (project == null) { throw new ArgumentNullException("project"); } LoadSolutionProjects.Reparse(project, initReferences, parseCode); }
internal static void InitializeParserService() { if (parserDescriptors == null) { parserDescriptors = AddInTree.BuildItems <ParserDescriptor>("/Workspace/Parser", null, false); AssemblyParserService.Initialize(); LoadSolutionProjects.Initialize(); } }
internal static void OnSolutionClosed() { LoadSolutionProjects.OnSolutionClosed(); lock (projectContents) { foreach (IProjectContent content in projectContents.Values) { content.Dispose(); } projectContents.Clear(); } ClearAllFileEntries(); }
/// <remarks>Can return null.</remarks> public static IProjectContent CreateProjectContentForAddedProject(IProject project) { ParseProjectContent newContent = project.CreateProjectContent(); if (newContent != null) { lock (projectContents) { projectContents[project] = newContent; } LoadSolutionProjects.InitNewProject(newContent); } return(newContent); }