コード例 #1
0
        // do not use an event for this because a solution might be loaded before ParserService
        // is initialized
        internal static void OnSolutionLoaded(List <ParseProjectContent> createdContents)
        {
            WorkbenchSingleton.DebugAssertMainThread();
            Debug.Assert(jobs != null);

            Solution openedSolution = ProjectService.OpenSolution;

            isThreadRunning = true;

            WorkbenchSingleton.SafeThreadAsyncCall(ProjectService.ParserServiceCreatedProjectContents);

            for (int i = 0; i < createdContents.Count; i++)
            {
                ParseProjectContent pc = createdContents[i];
                jobs.AddJob(new JobTask(pc.Initialize1,
                                        GetLoadReferenceTaskTitle(pc.ProjectName),
                                        10));
            }
            for (int i = 0; i < createdContents.Count; i++)
            {
                ParseProjectContent pc = createdContents[i];
                jobs.AddJob(new JobTask(pc.Initialize2,
                                        GetParseTaskTitle(pc.ProjectName),
                                        pc.GetInitializationWorkAmount()));
            }
            jobs.AddJob(new JobTask(ct => RaiseThreadEnded(openedSolution), "", 0));
            jobs.StartRunningIfRequired();
        }
コード例 #2
0
 internal static void StartParserThread()
 {
     WorkbenchSingleton.DebugAssertMainThread();
     timer          = new DispatcherTimer(DispatcherPriority.Background);
     timer.Interval = TimeSpan.FromSeconds(1.5);
     timer.Tick    += new EventHandler(timer_Tick);
     timer.Start();
 }
コード例 #3
0
 public static bool GetClipboardContainsText()
 {
     WorkbenchSingleton.DebugAssertMainThread();
     if (WorkbenchSingleton.Workbench != null && WorkbenchSingleton.Workbench.IsActiveWindow)
     {
         UpdateClipboardContainsText();
     }
     return(clipboardContainsText);
 }
コード例 #4
0
 void ParserServiceParseInformationUpdated(object sender, ParseInformationEventArgs e)
 {
     WorkbenchSingleton.DebugAssertMainThread();
     foreach (TreeNode node in classBrowserTreeView.Nodes)
     {
         AbstractProjectNode prjNode = node as AbstractProjectNode;
         if (prjNode != null && e.ProjectContent.Project == prjNode.Project)
         {
             prjNode.UpdateParseInformation(e.OldCompilationUnit, e.NewCompilationUnit);
         }
     }
 }