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

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

Issue 1359113002: Use IndexContributor(s) in LocalIndex. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 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_highlights2.dart'; 9 import 'package:analysis_server/src/computer/computer_highlights2.dart';
10 import 'package:analysis_server/src/computer/computer_outline.dart'; 10 import 'package:analysis_server/src/computer/computer_outline.dart';
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 @override 404 @override
405 ServerOperationPriority get priority { 405 ServerOperationPriority get priority {
406 return ServerOperationPriority.ANALYSIS_INDEX; 406 return ServerOperationPriority.ANALYSIS_INDEX;
407 } 407 }
408 408
409 @override 409 @override
410 void perform(AnalysisServer server) { 410 void perform(AnalysisServer server) {
411 ServerPerformanceStatistics.indexOperation.makeCurrentWhile(() { 411 ServerPerformanceStatistics.indexOperation.makeCurrentWhile(() {
412 try { 412 try {
413 Index index = server.index; 413 Index index = server.index;
414 index.indexUnit(context, unit); 414 index.index(context, unit);
415 } catch (exception, stackTrace) { 415 } catch (exception, stackTrace) {
416 server.sendServerErrorNotification(exception, stackTrace); 416 server.sendServerErrorNotification(exception, stackTrace);
417 } 417 }
418 }); 418 });
419 } 419 }
420 } 420 }
421 421
422 abstract class _DartNotificationOperation extends _SingleFileOperation { 422 abstract class _DartNotificationOperation extends _SingleFileOperation {
423 final CompilationUnit unit; 423 final CompilationUnit unit;
424 424
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 : super(context, file); 462 : super(context, file);
463 463
464 @override 464 @override
465 ServerOperationPriority get priority { 465 ServerOperationPriority get priority {
466 return ServerOperationPriority.ANALYSIS_INDEX; 466 return ServerOperationPriority.ANALYSIS_INDEX;
467 } 467 }
468 468
469 @override 469 @override
470 void perform(AnalysisServer server) { 470 void perform(AnalysisServer server) {
471 Index index = server.index; 471 Index index = server.index;
472 index.indexHtmlUnit(context, unit); 472 index.index(context, unit);
473 } 473 }
474 } 474 }
475 475
476 class _NotificationErrorsOperation extends _SingleFileOperation { 476 class _NotificationErrorsOperation extends _SingleFileOperation {
477 final LineInfo lineInfo; 477 final LineInfo lineInfo;
478 final List<AnalysisError> errors; 478 final List<AnalysisError> errors;
479 479
480 _NotificationErrorsOperation( 480 _NotificationErrorsOperation(
481 AnalysisContext context, String file, this.lineInfo, this.errors) 481 AnalysisContext context, String file, this.lineInfo, this.errors)
482 : super(context, file); 482 : super(context, file);
(...skipping 28 matching lines...) Expand all
511 abstract class _SingleFileOperation extends SourceSensitiveOperation { 511 abstract class _SingleFileOperation extends SourceSensitiveOperation {
512 final String file; 512 final String file;
513 513
514 _SingleFileOperation(AnalysisContext context, this.file) : super(context); 514 _SingleFileOperation(AnalysisContext context, this.file) : super(context);
515 515
516 @override 516 @override
517 bool shouldBeDiscardedOnSourceChange(Source source) { 517 bool shouldBeDiscardedOnSourceChange(Source source) {
518 return source.fullName == file; 518 return source.fullName == file;
519 } 519 }
520 } 520 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/plugin/index.dart ('k') | pkg/analysis_server/lib/src/plugin/server_plugin.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698