Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 1303033010: Navigation extension point. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweaks Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:core' hide Resource; 9 import 'dart:core' hide Resource;
10 import 'dart:math' show max; 10 import 'dart:math' show max;
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 for (String file in todoFiles) { 954 for (String file in todoFiles) {
955 ContextSourcePair contextSource = getContextSourcePair(file); 955 ContextSourcePair contextSource = getContextSourcePair(file);
956 // prepare context 956 // prepare context
957 AnalysisContext context = contextSource.context; 957 AnalysisContext context = contextSource.context;
958 if (context == null) { 958 if (context == null) {
959 continue; 959 continue;
960 } 960 }
961 // Dart unit notifications. 961 // Dart unit notifications.
962 if (AnalysisEngine.isDartFileName(file)) { 962 if (AnalysisEngine.isDartFileName(file)) {
963 Source source = contextSource.source; 963 Source source = contextSource.source;
964 // TODO(scheglov) This way to get resolved information is very Dart
965 // specific. OTOH as it is planned now Angular results are not
966 // flushable.
964 CompilationUnit dartUnit = 967 CompilationUnit dartUnit =
965 _getResolvedCompilationUnitToResendNotification(context, source); 968 _getResolvedCompilationUnitToResendNotification(context, source);
966 if (dartUnit != null) { 969 if (dartUnit != null) {
967 switch (service) { 970 switch (service) {
968 case AnalysisService.HIGHLIGHTS: 971 case AnalysisService.HIGHLIGHTS:
969 sendAnalysisNotificationHighlights(this, file, dartUnit); 972 sendAnalysisNotificationHighlights(this, file, dartUnit);
970 break; 973 break;
971 case AnalysisService.NAVIGATION: 974 case AnalysisService.NAVIGATION:
972 // TODO(scheglov) consider support for one unit in 2+ libraries 975 sendAnalysisNotificationNavigation(this, context, source);
973 sendAnalysisNotificationNavigation(this, file, dartUnit);
974 break; 976 break;
975 case AnalysisService.OCCURRENCES: 977 case AnalysisService.OCCURRENCES:
976 sendAnalysisNotificationOccurrences(this, file, dartUnit); 978 sendAnalysisNotificationOccurrences(this, file, dartUnit);
977 break; 979 break;
978 case AnalysisService.OUTLINE: 980 case AnalysisService.OUTLINE:
979 AnalysisContext context = dartUnit.element.context; 981 AnalysisContext context = dartUnit.element.context;
980 LineInfo lineInfo = context.getLineInfo(source); 982 LineInfo lineInfo = context.getLineInfo(source);
981 sendAnalysisNotificationOutline(this, file, lineInfo, dartUnit); 983 sendAnalysisNotificationOutline(this, file, lineInfo, dartUnit);
982 break; 984 break;
983 case AnalysisService.OVERRIDES: 985 case AnalysisService.OVERRIDES:
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 /** 1559 /**
1558 * The [PerformanceTag] for time spent in server request handlers. 1560 * The [PerformanceTag] for time spent in server request handlers.
1559 */ 1561 */
1560 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1562 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1561 1563
1562 /** 1564 /**
1563 * The [PerformanceTag] for time spent in split store microtasks. 1565 * The [PerformanceTag] for time spent in split store microtasks.
1564 */ 1566 */
1565 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1567 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1566 } 1568 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/plugin/navigation.dart ('k') | pkg/analysis_server/lib/src/collections.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698