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

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

Issue 367793002: Update Element/navigation/outline to use Location. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgotten file Created 6 years, 5 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 | Annotate | Revision Log
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 operation.analysis; 5 library operation.analysis;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analysis_server/src/computer/computer_highlights.dart'; 8 import 'package:analysis_server/src/computer/computer_highlights.dart';
9 import 'package:analysis_server/src/computer/computer_navigation.dart'; 9 import 'package:analysis_server/src/computer/computer_navigation.dart';
10 import 'package:analysis_server/src/computer/computer_outline.dart'; 10 import 'package:analysis_server/src/computer/computer_outline.dart';
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void sendAnalysisNotificationNavigation(AnalysisServer server, String file, 77 void sendAnalysisNotificationNavigation(AnalysisServer server, String file,
78 CompilationUnit dartUnit) { 78 CompilationUnit dartUnit) {
79 Notification notification = new Notification(ANALYSIS_NAVIGATION); 79 Notification notification = new Notification(ANALYSIS_NAVIGATION);
80 notification.setParameter(FILE, file); 80 notification.setParameter(FILE, file);
81 notification.setParameter(REGIONS, new DartUnitNavigationComputer( 81 notification.setParameter(REGIONS, new DartUnitNavigationComputer(
82 dartUnit).compute()); 82 dartUnit).compute());
83 server.sendNotification(notification); 83 server.sendNotification(notification);
84 } 84 }
85 85
86 86
87 void sendAnalysisNotificationOutline(AnalysisServer server, String file, 87 void sendAnalysisNotificationOutline(AnalysisServer server,
88 CompilationUnit dartUnit) { 88 AnalysisContext context, Source source, CompilationUnit dartUnit) {
89 Notification notification = new Notification(ANALYSIS_OUTLINE); 89 Notification notification = new Notification(ANALYSIS_OUTLINE);
90 notification.setParameter(FILE, file); 90 notification.setParameter(FILE, source.fullName);
91 notification.setParameter(OUTLINE, new DartUnitOutlineComputer( 91 notification.setParameter(OUTLINE, new DartUnitOutlineComputer(context,
92 dartUnit).compute()); 92 source, dartUnit).compute());
93 server.sendNotification(notification); 93 server.sendNotification(notification);
94 } 94 }
95 95
96 96
97 /** 97 /**
98 * Instances of [PerformAnalysisOperation] perform a single analysis task. 98 * Instances of [PerformAnalysisOperation] perform a single analysis task.
99 */ 99 */
100 class PerformAnalysisOperation extends ServerOperation { 100 class PerformAnalysisOperation extends ServerOperation {
101 final AnalysisContext context; 101 final AnalysisContext context;
102 final bool isContinue; 102 final bool isContinue;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Dart 146 // Dart
147 CompilationUnit dartUnit = notice.compilationUnit; 147 CompilationUnit dartUnit = notice.compilationUnit;
148 if (dartUnit != null) { 148 if (dartUnit != null) {
149 if (server.hasAnalysisSubscription(AnalysisService.HIGHLIGHTS, file)) { 149 if (server.hasAnalysisSubscription(AnalysisService.HIGHLIGHTS, file)) {
150 sendAnalysisNotificationHighlights(server, file, dartUnit); 150 sendAnalysisNotificationHighlights(server, file, dartUnit);
151 } 151 }
152 if (server.hasAnalysisSubscription(AnalysisService.NAVIGATION, file)) { 152 if (server.hasAnalysisSubscription(AnalysisService.NAVIGATION, file)) {
153 sendAnalysisNotificationNavigation(server, file, dartUnit); 153 sendAnalysisNotificationNavigation(server, file, dartUnit);
154 } 154 }
155 if (server.hasAnalysisSubscription(AnalysisService.OUTLINE, file)) { 155 if (server.hasAnalysisSubscription(AnalysisService.OUTLINE, file)) {
156 sendAnalysisNotificationOutline(server, file, dartUnit); 156 sendAnalysisNotificationOutline(server, context, source, dartUnit);
157 } 157 }
158 } 158 }
159 // TODO(scheglov) use default subscriptions 159 // TODO(scheglov) use default subscriptions
160 if (!source.isInSystemLibrary) { 160 if (!source.isInSystemLibrary) {
161 sendAnalysisNotificationErrors(server, file, notice.lineInfo, 161 sendAnalysisNotificationErrors(server, file, notice.lineInfo,
162 notice.errors); 162 notice.errors);
163 } 163 }
164 } 164 }
165 } 165 }
166 166
(...skipping 12 matching lines...) Expand all
179 // HTML 179 // HTML
180 { 180 {
181 HtmlUnit htmlUnit = notice.htmlUnit; 181 HtmlUnit htmlUnit = notice.htmlUnit;
182 if (htmlUnit != null) { 182 if (htmlUnit != null) {
183 index.indexHtmlUnit(context, htmlUnit); 183 index.indexHtmlUnit(context, htmlUnit);
184 } 184 }
185 } 185 }
186 } 186 }
187 } 187 }
188 } 188 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/computer/element.dart ('k') | pkg/analysis_server/test/abstract_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698