@@ -91,8 +91,8 @@ sealed partial class VsProjectAnalyzer : IDisposable {
9191
9292 private readonly TaskProvider _defaultTaskProvider = CreateDefaultTaskProvider ( ) ;
9393
94- internal static readonly string [ ] _emptyCompletionContextKeywords = new string [ ] {
95- "var" , "function" , "const" , "let"
94+ internal static readonly string [ ] _emptyCompletionContextKeywords = new string [ ] {
95+ "var" , "function" , "const" , "let"
9696 } ;
9797#if FALSE
9898 private readonly UnresolvedImportSquiggleProvider _unresolvedSquiggles ;
@@ -157,10 +157,10 @@ private void CreateNewAnalyzer(AnalysisLimits limits) {
157157 _analysisQueue = new AnalysisQueue ( this ) ;
158158 }
159159 _fullyLoaded = true ;
160- }
161-
162- private bool ShouldEnqueue ( ) {
163- return _analysisLevel != AnalysisLevel . None && _analysisLevel != AnalysisLevel . Preview ;
160+ }
161+
162+ private bool ShouldEnqueue ( ) {
163+ return _analysisLevel != AnalysisLevel . None && _analysisLevel != AnalysisLevel . Preview ;
164164 }
165165
166166 #region Public API
@@ -260,7 +260,7 @@ public void RemoveBuffer(ITextBuffer buffer) {
260260 }
261261
262262 BufferParser bufferParser ;
263- if ( ! buffer . Properties . TryGetProperty < BufferParser > ( typeof ( BufferParser ) , out bufferParser ) ) {
263+ if ( ! buffer . Properties . TryGetProperty < BufferParser > ( typeof ( BufferParser ) , out bufferParser ) ) {
264264 return ;
265265 }
266266
@@ -325,8 +325,8 @@ private void AnalyzeFile(string path, bool reportErrors, ProjectItem originating
325325 } else {
326326 if ( ! reportErrors ) {
327327 TaskProvider . Clear ( item . Entry , ParserTaskMoniker ) ;
328- }
329-
328+ }
329+
330330 if ( ( _reparseDateTime != null && new FileInfo ( path ) . LastWriteTime > _reparseDateTime . Value )
331331 || ( reportErrors && ! item . ReportErrors ) ||
332332 ( item . Entry . Module == null || item . Entry . Unit == null ) ) {
@@ -381,21 +381,21 @@ public void AddPackageJson(string packageJsonPath) {
381381 AddPackageJson ( packageJsonPath , ( string ) mainFile , dependencyList ) ;
382382 }
383383 }
384- }
385-
386- private static List < string > GetDependencyListFromJson ( Dictionary < string , object > json , params string [ ] dependencyTypes ) {
387- var allDependencies = new List < string > ( ) ;
388- foreach ( var type in dependencyTypes ) {
389- object dependencies ;
390- json . TryGetValue ( type , out dependencies ) ;
391- var dep = dependencies as Dictionary < string , object > ;
392- if ( dep != null ) {
393- allDependencies . AddRange ( dep . Keys . ToList ( ) ) ;
394- }
395- }
396- return allDependencies ;
397- }
398-
384+ }
385+
386+ private static List < string > GetDependencyListFromJson ( Dictionary < string , object > json , params string [ ] dependencyTypes ) {
387+ var allDependencies = new List < string > ( ) ;
388+ foreach ( var type in dependencyTypes ) {
389+ object dependencies ;
390+ json . TryGetValue ( type , out dependencies ) ;
391+ var dep = dependencies as Dictionary < string , object > ;
392+ if ( dep != null ) {
393+ allDependencies . AddRange ( dep . Keys . ToList ( ) ) ;
394+ }
395+ }
396+ return allDependencies ;
397+ }
398+
399399 public void AddPackageJson ( string path , string mainFile , List < string > dependencies ) {
400400 if ( ! _fullyLoaded ) {
401401 lock ( _loadingDeltas ) {
@@ -1194,22 +1194,23 @@ private static CompletionAnalysis TrySpecialCompletions(ITextSnapshot snapshot,
11941194 if ( range != null ) {
11951195 start = range . Value . Start ;
11961196 }
1197- }
1198-
1199- // Get the classifiers from beginning of the line to the beginning of snapSpan.
1200- // The contents of snapSpan differ depending on what is determined in
1201- // CompletionSource.GetApplicableSpan.
1202- //
1203- // In the case of:
1204- // var myIdentifier<cursor>
1205- // the applicable span will be "myIdentifier", so GetClassificationSpans will operate on "var "
1206- //
1207- // In the case of comments and string literals, the applicable span will be empty,
1197+ }
1198+
1199+ // Get the classifiers from beginning of the line to the beginning of snapSpan.
1200+ // The contents of snapSpan differ depending on what is determined in
1201+ // CompletionSource.GetApplicableSpan.
1202+ //
1203+ // In the case of:
1204+ // var myIdentifier<cursor>
1205+ // the applicable span will be "myIdentifier", so GetClassificationSpans will operate on "var "
1206+ //
1207+ // In the case of comments and string literals, the applicable span will be empty,
12081208 // so snapSpan.Start will occur at the current cursor position.
12091209 var tokens = classifier . GetClassificationSpans ( new SnapshotSpan ( start . GetContainingLine ( ) . Start , snapSpan . Start ) ) ;
12101210 if ( tokens . Count > 0 ) {
12111211 // Check for context-sensitive intellisense
12121212 var lastClass = tokens [ tokens . Count - 1 ] ;
1213+
12131214 if ( lastClass . ClassificationType == classifier . Provider . Comment ||
12141215 lastClass . ClassificationType == classifier . Provider . StringLiteral ||
12151216 ( lastClass . ClassificationType == classifier . Provider . Keyword &&
@@ -1221,8 +1222,8 @@ private static CompletionAnalysis TrySpecialCompletions(ITextSnapshot snapshot,
12211222 }
12221223
12231224 return null ;
1224- }
1225-
1225+ }
1226+
12261227 private static CompletionAnalysis GetNormalCompletionContext ( ITextSnapshot snapshot , ITrackingSpan applicableSpan , ITrackingPoint point ) {
12271228 var span = applicableSpan . GetSpan ( snapshot ) ;
12281229
@@ -1290,8 +1291,8 @@ private void OnErrorRemoved(string path) {
12901291
12911292 private void ClearParserTasks ( IProjectEntry entry ) {
12921293 if ( entry != null ) {
1293- TaskProvider . Clear ( entry , ParserTaskMoniker ) ;
1294-
1294+ TaskProvider . Clear ( entry , ParserTaskMoniker ) ;
1295+
12951296 bool changed ;
12961297 lock ( _hasParseErrors ) {
12971298 changed = _hasParseErrors . Remove ( entry ) ;
0 commit comments