public DartVsAnalysisService(string sdkPath, string analysisServerScript, DartProjectTracker projectTracker, OpenFileTracker openFileTracker)
				: base(sdkPath, analysisServerScript)
			{
				this.projectTracker = projectTracker;
				this.openFileTracker = openFileTracker;

				// TODO: Only fire this up when there's at least one Dart project open!
				// TODO: Shut it down when the last dart project closes!

				// When Dart projects change; update analysis roots.
				subscriptionDisposable.Add(this.projectTracker.ProjectsChanged.Subscribe(projs => this.SetAnalysisRoots(projs.Select(p => p.Path).ToArray())));

				// When open files change; update subscriptions.
				subscriptionDisposable.Add(this.openFileTracker.DocumentsChanged.Subscribe(files => this.SetAnalysisSubscriptions(subscriptions.ToDictionary(s => s, s => files))));
			}
Ejemplo n.º 2
0
            public DartVsAnalysisService(string sdkPath, string analysisServerScript, DartProjectTracker projectTracker, OpenFileTracker openFileTracker)
                : base(sdkPath, analysisServerScript)
            {
                this.projectTracker  = projectTracker;
                this.openFileTracker = openFileTracker;

                // TODO: Only fire this up when there's at least one Dart project open!
                // TODO: Shut it down when the last dart project closes!

                // When Dart projects change; update analysis roots.
                subscriptionDisposable.Add(this.projectTracker.ProjectsChanged.Subscribe(projs => this.SetAnalysisRoots(projs.Select(p => p.Path).ToArray())));

                // When open files change; update subscriptions.
                subscriptionDisposable.Add(this.openFileTracker.DocumentsChanged.Subscribe(files => this.SetAnalysisSubscriptions(subscriptions.ToDictionary(s => s, s => files))));
            }
		public DartAnalysisServiceFactory(DartProjectTracker projectTracker, OpenFileTracker openFileTracker)
		{
			this.projectTracker = projectTracker;
			this.openFileTracker = openFileTracker;
			this.getAnalysisServerTask = new Lazy<Task<DartAnalysisService>>(StartGetAnalysisServiceAsync, LazyThreadSafetyMode.ExecutionAndPublication);
		}
Ejemplo n.º 4
0
 public DartAnalysisServiceFactory(DartProjectTracker projectTracker, OpenFileTracker openFileTracker)
 {
     this.projectTracker        = projectTracker;
     this.openFileTracker       = openFileTracker;
     this.getAnalysisServerTask = new Lazy <Task <DartAnalysisService> >(StartGetAnalysisServiceAsync, LazyThreadSafetyMode.ExecutionAndPublication);
 }