OLD | NEW |
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 | 9 |
10 import 'package:analysis_server/src/analysis_logger.dart'; | 10 import 'package:analysis_server/src/analysis_logger.dart'; |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 CompilationUnit dartUnit = getResolvedCompilationUnitToResendNotificat
ion(file); | 474 CompilationUnit dartUnit = getResolvedCompilationUnitToResendNotificat
ion(file); |
475 if (dartUnit != null) { | 475 if (dartUnit != null) { |
476 switch (service) { | 476 switch (service) { |
477 case AnalysisService.HIGHLIGHTS: | 477 case AnalysisService.HIGHLIGHTS: |
478 sendAnalysisNotificationHighlights(this, file, dartUnit); | 478 sendAnalysisNotificationHighlights(this, file, dartUnit); |
479 break; | 479 break; |
480 case AnalysisService.NAVIGATION: | 480 case AnalysisService.NAVIGATION: |
481 // TODO(scheglov) consider support for one unit in 2+ libraries | 481 // TODO(scheglov) consider support for one unit in 2+ libraries |
482 sendAnalysisNotificationNavigation(this, file, dartUnit); | 482 sendAnalysisNotificationNavigation(this, file, dartUnit); |
483 break; | 483 break; |
| 484 case AnalysisService.OCCURRENCES: |
| 485 sendAnalysisNotificationOccurrences(this, file, dartUnit); |
| 486 break; |
484 case AnalysisService.OUTLINE: | 487 case AnalysisService.OUTLINE: |
485 sendAnalysisNotificationOutline(this, context, source, dartUnit)
; | 488 sendAnalysisNotificationOutline(this, context, source, dartUnit)
; |
486 break; | 489 break; |
487 } | 490 } |
488 } | 491 } |
489 } | 492 } |
490 } | 493 } |
491 }); | 494 }); |
492 // remember new subscriptions | 495 // remember new subscriptions |
493 this.analysisServices = subscriptions; | 496 this.analysisServices = subscriptions; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 void _schedulePerformOperation() { | 577 void _schedulePerformOperation() { |
575 new Future(performOperation); | 578 new Future(performOperation); |
576 } | 579 } |
577 } | 580 } |
578 | 581 |
579 | 582 |
580 /** | 583 /** |
581 * An enumeration of the services provided by the analysis domain. | 584 * An enumeration of the services provided by the analysis domain. |
582 */ | 585 */ |
583 class AnalysisService extends Enum2<AnalysisService> { | 586 class AnalysisService extends Enum2<AnalysisService> { |
584 static const AnalysisService ERRORS = const AnalysisService('ERRORS', 0); | 587 static const ERRORS = const AnalysisService('ERRORS', 0); |
585 static const AnalysisService HIGHLIGHTS = const AnalysisService('HIGHLIGHTS',
1); | 588 static const HIGHLIGHTS = const AnalysisService('HIGHLIGHTS', 1); |
586 static const AnalysisService NAVIGATION = const AnalysisService('NAVIGATION',
2); | 589 static const NAVIGATION = const AnalysisService('NAVIGATION', 2); |
587 static const AnalysisService OUTLINE = const AnalysisService('OUTLINE', 3); | 590 static const OCCURRENCES = const AnalysisService('OCCURRENCES', 3); |
| 591 static const OUTLINE = const AnalysisService('OUTLINE', 4); |
| 592 static const OVERRIDES = const AnalysisService('OVERRIDES', 5); |
588 | 593 |
589 static const List<AnalysisService> VALUES = | 594 static const List<AnalysisService> VALUES = |
590 const [ERRORS, HIGHLIGHTS, NAVIGATION, OUTLINE]; | 595 const [ERRORS, HIGHLIGHTS, NAVIGATION, OCCURRENCES, OUTLINE, OVERRIDES]; |
591 | 596 |
592 const AnalysisService(String name, int ordinal) : super(name, ordinal); | 597 const AnalysisService(String name, int ordinal) : super(name, ordinal); |
593 } | 598 } |
594 | 599 |
595 | 600 |
596 typedef void OptionUpdater(AnalysisOptionsImpl options); | 601 typedef void OptionUpdater(AnalysisOptionsImpl options); |
597 | 602 |
598 /** | 603 /** |
599 * An enumeration of the services provided by the server domain. | 604 * An enumeration of the services provided by the server domain. |
600 */ | 605 */ |
601 class ServerService extends Enum2<ServerService> { | 606 class ServerService extends Enum2<ServerService> { |
602 static const ServerService STATUS = const ServerService('STATUS', 0); | 607 static const ServerService STATUS = const ServerService('STATUS', 0); |
603 | 608 |
604 static const List<ServerService> VALUES = const [STATUS]; | 609 static const List<ServerService> VALUES = const [STATUS]; |
605 | 610 |
606 const ServerService(String name, int ordinal) : super(name, ordinal); | 611 const ServerService(String name, int ordinal) : super(name, ordinal); |
607 } | 612 } |
OLD | NEW |