| 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 | 8 |
| 9 import 'package:analysis_server/src/analysis_logger.dart'; | 9 import 'package:analysis_server/src/analysis_logger.dart'; |
| 10 import 'package:analysis_server/src/channel.dart'; | 10 import 'package:analysis_server/src/channel.dart'; |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 } | 336 } |
| 337 }); | 337 }); |
| 338 } | 338 } |
| 339 | 339 |
| 340 /** | 340 /** |
| 341 * Return the [AnalysisContext] that is used to analyze the given [path]. | 341 * Return the [AnalysisContext] that is used to analyze the given [path]. |
| 342 * Return `null` if there is no such context. | 342 * Return `null` if there is no such context. |
| 343 */ | 343 */ |
| 344 AnalysisContext _getAnalysisContext(String path) { | 344 AnalysisContext _getAnalysisContext(String path) { |
| 345 for (Folder folder in folderMap.keys) { | 345 for (Folder folder in folderMap.keys) { |
| 346 if (path.startsWith(folder.fullName)) { | 346 if (path.startsWith(folder.path)) { |
| 347 return folderMap[folder].context; | 347 return folderMap[folder].context; |
| 348 } | 348 } |
| 349 } | 349 } |
| 350 return null; | 350 return null; |
| 351 } | 351 } |
| 352 | 352 |
| 353 /** | 353 /** |
| 354 * Return the [Source] of the Dart file with the given [path]. | 354 * Return the [Source] of the Dart file with the given [path]. |
| 355 */ | 355 */ |
| 356 Source _getSource(String path) { | 356 Source _getSource(String path) { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 /** | 480 /** |
| 481 * An enumeration of the services provided by the server domain. | 481 * An enumeration of the services provided by the server domain. |
| 482 */ | 482 */ |
| 483 class ServerService extends Enum2<ServerService> { | 483 class ServerService extends Enum2<ServerService> { |
| 484 static const ServerService STATUS = const ServerService('STATUS', 0); | 484 static const ServerService STATUS = const ServerService('STATUS', 0); |
| 485 | 485 |
| 486 static const List<ServerService> VALUES = const [STATUS]; | 486 static const List<ServerService> VALUES = const [STATUS]; |
| 487 | 487 |
| 488 const ServerService(String name, int ordinal) : super(name, ordinal); | 488 const ServerService(String name, int ordinal) : super(name, ordinal); |
| 489 } | 489 } |
| OLD | NEW |