Ejemplo n.º 1
0
        ///// <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);
        }
Ejemplo n.º 2
0
        protected override ParseProjectContent CreateProjectContent()
        {
            if (BooCompilerPC == null)
            {
                ReferenceProjectItem booCompilerItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Compiler.AbstractAstAttribute).Assembly.Location);
                BooCompilerPC = ParserService.GetProjectContentForReference(booCompilerItem);
            }
            if (BooUsefulPC == null)
            {
                ReferenceProjectItem booUsefulItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Useful.Attributes.SingletonAttribute).Assembly.Location);
                BooUsefulPC = ParserService.GetRegistryForReference(booUsefulItem).GetProjectContentForReference("Boo.Lang.Useful", booUsefulItem.Include);
            }
            ParseProjectContent  pc         = base.CreateProjectContent();
            ReferenceProjectItem systemItem = new ReferenceProjectItem(this, "System");

            pc.AddReferencedContent(ParserService.GetProjectContentForReference(systemItem));
            ReferenceProjectItem booLangItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Builtins).Assembly.Location);

            pc.AddReferencedContent(ParserService.GetProjectContentForReference(booLangItem));
            ReferenceProjectItem booExtensionsItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Extensions.PropertyAttribute).Assembly.Location);

            pc.AddReferencedContent(ParserService.GetProjectContentForReference(booExtensionsItem));
            pc.DefaultImports = new DefaultUsing(pc);
            pc.DefaultImports.Usings.Add("Boo.Lang");
            pc.DefaultImports.Usings.Add("Boo.Lang.Builtins");
            pc.DefaultImports.Usings.Add("Boo.Lang.Extensions");
            return(pc);
        }
Ejemplo n.º 3
0
        protected override ParseProjectContent CreateProjectContent()
        {
            ParseProjectContent pc = base.CreateProjectContent();

            MyNamespaceBuilder.BuildNamespace(this, pc);
            return(pc);
        }
Ejemplo n.º 4
0
        protected override ParseProjectContent CreateProjectContent()
        {
            ParseProjectContent newProjectContent = new ParseProjectContent(this);
            var mscorlib = AssemblyParserService.GetRegistryForReference(new ReferenceProjectItem(this, "mscorlib")).Mscorlib;

            newProjectContent.AddReferencedContent(mscorlib);
            return(newProjectContent);
        }
Ejemplo n.º 5
0
        protected override ParseProjectContent CreateProjectContent()
        {
            ParseProjectContent  pc    = base.CreateProjectContent();
            ReferenceProjectItem vbRef = new ReferenceProjectItem(this, "Microsoft.VisualBasic");

            if (vbRef != null)
            {
                pc.AddReferencedContent(AssemblyParserService.GetProjectContentForReference(vbRef));
            }
            MyNamespaceBuilder.BuildNamespace(this, pc);
            return(pc);
        }
Ejemplo n.º 6
0
        /// <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);
        }
Ejemplo n.º 7
0
        protected override ParseProjectContent CreateProjectContent()
        {
            if (BooCompilerPC == null)
            {
                ReferenceProjectItem booCompilerItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Compiler.AbstractAstAttribute).Assembly.Location);
                BooCompilerPC = AssemblyParserService.GetProjectContentForReference(booCompilerItem);
            }

            ParseProjectContent pc = base.CreateProjectContent();

            pc.DefaultImports = new DefaultUsing(pc);
            pc.DefaultImports.Usings.Add("Boo.Lang");
            pc.DefaultImports.Usings.Add("Boo.Lang.Builtins");
            pc.DefaultImports.Usings.Add("Boo.Lang.Extensions");
            return(pc);
        }
Ejemplo n.º 8
0
        protected override ParseProjectContent CreateProjectContent()
        {
            ParseProjectContent newProjectContent = new ParseProjectContent(this);

            return(newProjectContent);
        }
Ejemplo n.º 9
0
 protected override ParseProjectContent CreateProjectContent()
 {
     return(ParseProjectContent.CreateUninitalized(this));
 }
Ejemplo n.º 10
0
		protected override ParseProjectContent CreateProjectContent()
		{
			ParseProjectContent newProjectContent = new ParseProjectContent(this);
			return newProjectContent;
		}
		protected override ParseProjectContent CreateProjectContent()
		{
			ParseProjectContent newProjectContent = new ParseProjectContent(this);
			var mscorlib = AssemblyParserService.GetRegistryForReference(new ReferenceProjectItem(this, "mscorlib")).Mscorlib;
			newProjectContent.AddReferencedContent(mscorlib);
			return newProjectContent;
		}