| 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:analyzer/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 return null; | 544 return null; |
| 545 } | 545 } |
| 546 | 546 |
| 547 /** | 547 /** |
| 548 * Return the [Source] of the Dart file with the given [path]. | 548 * Return the [Source] of the Dart file with the given [path]. |
| 549 */ | 549 */ |
| 550 Source getSource(String path) { | 550 Source getSource(String path) { |
| 551 File file = contextDirectoryManager.resourceProvider.getResource(path); | 551 File file = contextDirectoryManager.resourceProvider.getResource(path); |
| 552 return file.createSource(UriKind.FILE_URI); | 552 return file.createSource(); |
| 553 } | 553 } |
| 554 | 554 |
| 555 /** | 555 /** |
| 556 * Returns the [CompilationUnit] of the Dart file with the given [path] that | 556 * Returns the [CompilationUnit] of the Dart file with the given [path] that |
| 557 * should be used to resend notifications for already resolved unit. | 557 * should be used to resend notifications for already resolved unit. |
| 558 * Returns `null` if the file is not a part of any context, library has not | 558 * Returns `null` if the file is not a part of any context, library has not |
| 559 * been yet resolved, or any problem happened. | 559 * been yet resolved, or any problem happened. |
| 560 */ | 560 */ |
| 561 CompilationUnit getResolvedCompilationUnitToResendNotification(String path) { | 561 CompilationUnit getResolvedCompilationUnitToResendNotification(String path) { |
| 562 // prepare AnalysisContext | 562 // prepare AnalysisContext |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 /** | 791 /** |
| 792 * An enumeration of the services provided by the server domain. | 792 * An enumeration of the services provided by the server domain. |
| 793 */ | 793 */ |
| 794 class ServerService extends Enum2<ServerService> { | 794 class ServerService extends Enum2<ServerService> { |
| 795 static const ServerService STATUS = const ServerService('STATUS', 0); | 795 static const ServerService STATUS = const ServerService('STATUS', 0); |
| 796 | 796 |
| 797 static const List<ServerService> VALUES = const [STATUS]; | 797 static const List<ServerService> VALUES = const [STATUS]; |
| 798 | 798 |
| 799 const ServerService(String name, int ordinal) : super(name, ordinal); | 799 const ServerService(String name, int ordinal) : super(name, ordinal); |
| 800 } | 800 } |
| OLD | NEW |