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 engine; | 5 library engine; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 import 'dart:math' as math; | 9 import 'dart:math' as math; |
10 | 10 |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 /** | 584 /** |
585 * Return the element model corresponding to the compilation unit defined by | 585 * Return the element model corresponding to the compilation unit defined by |
586 * the given [unitSource] in the library defined by the given [librarySource], | 586 * the given [unitSource] in the library defined by the given [librarySource], |
587 * or `null` if the element model does not currently exist or if the library | 587 * or `null` if the element model does not currently exist or if the library |
588 * cannot be analyzed for some reason. | 588 * cannot be analyzed for some reason. |
589 */ | 589 */ |
590 CompilationUnitElement getCompilationUnitElement( | 590 CompilationUnitElement getCompilationUnitElement( |
591 Source unitSource, Source librarySource); | 591 Source unitSource, Source librarySource); |
592 | 592 |
593 /** | 593 /** |
594 * Return configuration data associated with the given key or `null` if no | 594 * Return configuration data associated with the given key or the [key]'s |
595 * state has been associated with the given [key]. | 595 * default value if no state has been associated. |
596 * | 596 * |
597 * See [setConfigurationData]. | 597 * See [setConfigurationData]. |
598 */ | 598 */ |
599 Object getConfigurationData(ResultDescriptor key); | 599 Object getConfigurationData(ResultDescriptor key); |
600 | 600 |
601 /** | 601 /** |
602 * Return the contents and timestamp of the given [source]. | 602 * Return the contents and timestamp of the given [source]. |
603 * | 603 * |
604 * This method should be used rather than the method [Source.getContents] | 604 * This method should be used rather than the method [Source.getContents] |
605 * because contexts can have local overrides of the content of a source that | 605 * because contexts can have local overrides of the content of a source that |
(...skipping 11505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12111 PendingFuture pendingFuture = | 12111 PendingFuture pendingFuture = |
12112 new PendingFuture<T>(_context, source, computeValue); | 12112 new PendingFuture<T>(_context, source, computeValue); |
12113 if (!pendingFuture.evaluate(sourceEntry)) { | 12113 if (!pendingFuture.evaluate(sourceEntry)) { |
12114 _context._pendingFutureSources | 12114 _context._pendingFutureSources |
12115 .putIfAbsent(source, () => <PendingFuture>[]) | 12115 .putIfAbsent(source, () => <PendingFuture>[]) |
12116 .add(pendingFuture); | 12116 .add(pendingFuture); |
12117 } | 12117 } |
12118 return pendingFuture.future; | 12118 return pendingFuture.future; |
12119 } | 12119 } |
12120 } | 12120 } |
OLD | NEW |