| 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 import 'dart:core'; | 9 import 'dart:core'; |
| 10 import 'dart:io' as io; | 10 import 'dart:io' as io; |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 * path /foo/bar, then the innermost context containing /foo/bar/baz.dart is | 671 * path /foo/bar, then the innermost context containing /foo/bar/baz.dart is |
| 672 * the context for /foo/bar.) | 672 * the context for /foo/bar.) |
| 673 * | 673 * |
| 674 * If no context contains the given path, `null` is returned. | 674 * If no context contains the given path, `null` is returned. |
| 675 */ | 675 */ |
| 676 AnalysisContext getContainingContext(String path) { | 676 AnalysisContext getContainingContext(String path) { |
| 677 return contextManager.getContextFor(path); | 677 return contextManager.getContextFor(path); |
| 678 } | 678 } |
| 679 | 679 |
| 680 /** | 680 /** |
| 681 * Return the [nd.AnalysisDriver] for the "innermost" context whose associated |
| 682 * folder is or contains the given path. ("innermost" refers to the nesting |
| 683 * of contexts, so if there is a context for path /foo and a context for |
| 684 * path /foo/bar, then the innermost context containing /foo/bar/baz.dart is |
| 685 * the context for /foo/bar.) |
| 686 * |
| 687 * If no context contains the given path, `null` is returned. |
| 688 */ |
| 689 nd.AnalysisDriver getContainingDriver(String path) { |
| 690 return contextManager.getDriverFor(path); |
| 691 } |
| 692 |
| 693 /** |
| 681 * Return the primary [ContextSourcePair] representing the given [path]. | 694 * Return the primary [ContextSourcePair] representing the given [path]. |
| 682 * | 695 * |
| 683 * The [AnalysisContext] of this pair will be the context that explicitly | 696 * The [AnalysisContext] of this pair will be the context that explicitly |
| 684 * contains the path, if any such context exists, otherwise it will be the | 697 * contains the path, if any such context exists, otherwise it will be the |
| 685 * first context that implicitly analyzes it. | 698 * first context that implicitly analyzes it. |
| 686 * | 699 * |
| 687 * If the [path] is not analyzed by any context, a [ContextSourcePair] with | 700 * If the [path] is not analyzed by any context, a [ContextSourcePair] with |
| 688 * a `null` context and a `file` [Source] is returned. | 701 * a `null` context and a `file` [Source] is returned. |
| 689 * | 702 * |
| 690 * If the [path] doesn't represent a file, a [ContextSourcePair] with a `null` | 703 * If the [path] doesn't represent a file, a [ContextSourcePair] with a `null` |
| (...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 /** | 2138 /** |
| 2126 * The [PerformanceTag] for time spent in server request handlers. | 2139 * The [PerformanceTag] for time spent in server request handlers. |
| 2127 */ | 2140 */ |
| 2128 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 2141 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 2129 | 2142 |
| 2130 /** | 2143 /** |
| 2131 * The [PerformanceTag] for time spent in split store microtasks. | 2144 * The [PerformanceTag] for time spent in split store microtasks. |
| 2132 */ | 2145 */ |
| 2133 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 2146 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 2134 } | 2147 } |
| OLD | NEW |