| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine; | 8 library engine; |
| 9 | 9 |
| 10 import 'dart:async'; | 10 import 'dart:async'; |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 * that are defined in it (via script tags) that also need to have a model | 481 * that are defined in it (via script tags) that also need to have a model |
| 482 * built for them. | 482 * built for them. |
| 483 * | 483 * |
| 484 * Throws AnalysisException if the element model could not be determined | 484 * Throws AnalysisException if the element model could not be determined |
| 485 * because the analysis could not be performed. | 485 * because the analysis could not be performed. |
| 486 * | 486 * |
| 487 * <b>Note:</b> This method cannot be used in an async environment. | 487 * <b>Note:</b> This method cannot be used in an async environment. |
| 488 * | 488 * |
| 489 * See [getHtmlElement]. | 489 * See [getHtmlElement]. |
| 490 */ | 490 */ |
| 491 @deprecated |
| 491 HtmlElement computeHtmlElement(Source source); | 492 HtmlElement computeHtmlElement(Source source); |
| 492 | 493 |
| 493 /** | 494 /** |
| 494 * Return the kind of the given [source], computing it's kind if it is not | 495 * Return the kind of the given [source], computing it's kind if it is not |
| 495 * already known. Return [SourceKind.UNKNOWN] if the source is not contained | 496 * already known. Return [SourceKind.UNKNOWN] if the source is not contained |
| 496 * in this context. | 497 * in this context. |
| 497 * | 498 * |
| 498 * <b>Note:</b> This method cannot be used in an async environment. | 499 * <b>Note:</b> This method cannot be used in an async environment. |
| 499 * | 500 * |
| 500 * See [getKindOf]. | 501 * See [getKindOf]. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 AnalysisErrorInfo getErrors(Source source); | 602 AnalysisErrorInfo getErrors(Source source); |
| 602 | 603 |
| 603 /** | 604 /** |
| 604 * Return the element model corresponding to the HTML file defined by the | 605 * Return the element model corresponding to the HTML file defined by the |
| 605 * given [source], or `null` if the source does not represent an HTML file, | 606 * given [source], or `null` if the source does not represent an HTML file, |
| 606 * the element representing the file has not yet been created, or the analysis | 607 * the element representing the file has not yet been created, or the analysis |
| 607 * of the HTML file failed for some reason. | 608 * of the HTML file failed for some reason. |
| 608 * | 609 * |
| 609 * See [computeHtmlElement]. | 610 * See [computeHtmlElement]. |
| 610 */ | 611 */ |
| 612 @deprecated |
| 611 HtmlElement getHtmlElement(Source source); | 613 HtmlElement getHtmlElement(Source source); |
| 612 | 614 |
| 613 /** | 615 /** |
| 614 * Return the sources for the HTML files that reference the compilation unit | 616 * Return the sources for the HTML files that reference the compilation unit |
| 615 * with the given [source]. If the source does not represent a Dart source or | 617 * with the given [source]. If the source does not represent a Dart source or |
| 616 * is not known to this context, the returned list will be empty. The contents | 618 * is not known to this context, the returned list will be empty. The contents |
| 617 * of the list can be incomplete. | 619 * of the list can be incomplete. |
| 618 */ | 620 */ |
| 619 List<Source> getHtmlFilesReferencing(Source source); | 621 List<Source> getHtmlFilesReferencing(Source source); |
| 620 | 622 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 */ | 703 */ |
| 702 CompilationUnit getResolvedCompilationUnit2( | 704 CompilationUnit getResolvedCompilationUnit2( |
| 703 Source unitSource, Source librarySource); | 705 Source unitSource, Source librarySource); |
| 704 | 706 |
| 705 /** | 707 /** |
| 706 * Return the fully resolved HTML unit defined by the given [htmlSource], or | 708 * Return the fully resolved HTML unit defined by the given [htmlSource], or |
| 707 * `null` if the resolved unit is not already computed. | 709 * `null` if the resolved unit is not already computed. |
| 708 * | 710 * |
| 709 * See [resolveHtmlUnit]. | 711 * See [resolveHtmlUnit]. |
| 710 */ | 712 */ |
| 713 @deprecated |
| 711 ht.HtmlUnit getResolvedHtmlUnit(Source htmlSource); | 714 ht.HtmlUnit getResolvedHtmlUnit(Source htmlSource); |
| 712 | 715 |
| 713 /** | 716 /** |
| 714 * Return a list of the sources being analyzed in this context whose full path | 717 * Return a list of the sources being analyzed in this context whose full path |
| 715 * is equal to the given [path]. | 718 * is equal to the given [path]. |
| 716 */ | 719 */ |
| 717 List<Source> getSourcesWithFullName(String path); | 720 List<Source> getSourcesWithFullName(String path); |
| 718 | 721 |
| 719 /** | 722 /** |
| 720 * Invalidates hints in the given [librarySource] and included parts. | 723 * Invalidates hints in the given [librarySource] and included parts. |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 } | 1688 } |
| 1686 } | 1689 } |
| 1687 return AnalysisError.NO_ERRORS; | 1690 return AnalysisError.NO_ERRORS; |
| 1688 } | 1691 } |
| 1689 | 1692 |
| 1690 @override | 1693 @override |
| 1691 List<Source> computeExportedLibraries(Source source) => _getDartParseData2( | 1694 List<Source> computeExportedLibraries(Source source) => _getDartParseData2( |
| 1692 source, DartEntry.EXPORTED_LIBRARIES, Source.EMPTY_LIST); | 1695 source, DartEntry.EXPORTED_LIBRARIES, Source.EMPTY_LIST); |
| 1693 | 1696 |
| 1694 @override | 1697 @override |
| 1698 @deprecated |
| 1695 HtmlElement computeHtmlElement(Source source) => | 1699 HtmlElement computeHtmlElement(Source source) => |
| 1696 _getHtmlResolutionData(source, HtmlEntry.ELEMENT, null); | 1700 _getHtmlResolutionData(source, HtmlEntry.ELEMENT, null); |
| 1697 | 1701 |
| 1698 @override | 1702 @override |
| 1699 List<Source> computeImportedLibraries(Source source) => _getDartParseData2( | 1703 List<Source> computeImportedLibraries(Source source) => _getDartParseData2( |
| 1700 source, DartEntry.IMPORTED_LIBRARIES, Source.EMPTY_LIST); | 1704 source, DartEntry.IMPORTED_LIBRARIES, Source.EMPTY_LIST); |
| 1701 | 1705 |
| 1702 @override | 1706 @override |
| 1703 SourceKind computeKindOf(Source source) { | 1707 SourceKind computeKindOf(Source source) { |
| 1704 SourceEntry sourceEntry = _getReadableSourceEntry(source); | 1708 SourceEntry sourceEntry = _getReadableSourceEntry(source); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 dartEntry.allErrors, dartEntry.getValue(SourceEntry.LINE_INFO)); | 1934 dartEntry.allErrors, dartEntry.getValue(SourceEntry.LINE_INFO)); |
| 1931 } else if (sourceEntry is HtmlEntry) { | 1935 } else if (sourceEntry is HtmlEntry) { |
| 1932 HtmlEntry htmlEntry = sourceEntry; | 1936 HtmlEntry htmlEntry = sourceEntry; |
| 1933 return new AnalysisErrorInfoImpl( | 1937 return new AnalysisErrorInfoImpl( |
| 1934 htmlEntry.allErrors, htmlEntry.getValue(SourceEntry.LINE_INFO)); | 1938 htmlEntry.allErrors, htmlEntry.getValue(SourceEntry.LINE_INFO)); |
| 1935 } | 1939 } |
| 1936 return new AnalysisErrorInfoImpl(AnalysisError.NO_ERRORS, null); | 1940 return new AnalysisErrorInfoImpl(AnalysisError.NO_ERRORS, null); |
| 1937 } | 1941 } |
| 1938 | 1942 |
| 1939 @override | 1943 @override |
| 1944 @deprecated |
| 1940 HtmlElement getHtmlElement(Source source) { | 1945 HtmlElement getHtmlElement(Source source) { |
| 1941 SourceEntry sourceEntry = getReadableSourceEntryOrNull(source); | 1946 SourceEntry sourceEntry = getReadableSourceEntryOrNull(source); |
| 1942 if (sourceEntry is HtmlEntry) { | 1947 if (sourceEntry is HtmlEntry) { |
| 1943 return sourceEntry.getValue(HtmlEntry.ELEMENT); | 1948 return sourceEntry.getValue(HtmlEntry.ELEMENT); |
| 1944 } | 1949 } |
| 1945 return null; | 1950 return null; |
| 1946 } | 1951 } |
| 1947 | 1952 |
| 1948 @override | 1953 @override |
| 1949 List<Source> getHtmlFilesReferencing(Source source) { | 1954 List<Source> getHtmlFilesReferencing(Source source) { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2128 Source unitSource, Source librarySource) { | 2133 Source unitSource, Source librarySource) { |
| 2129 SourceEntry sourceEntry = getReadableSourceEntryOrNull(unitSource); | 2134 SourceEntry sourceEntry = getReadableSourceEntryOrNull(unitSource); |
| 2130 if (sourceEntry is DartEntry) { | 2135 if (sourceEntry is DartEntry) { |
| 2131 return sourceEntry.getValueInLibrary( | 2136 return sourceEntry.getValueInLibrary( |
| 2132 DartEntry.RESOLVED_UNIT, librarySource); | 2137 DartEntry.RESOLVED_UNIT, librarySource); |
| 2133 } | 2138 } |
| 2134 return null; | 2139 return null; |
| 2135 } | 2140 } |
| 2136 | 2141 |
| 2137 @override | 2142 @override |
| 2143 @deprecated |
| 2138 ht.HtmlUnit getResolvedHtmlUnit(Source htmlSource) { | 2144 ht.HtmlUnit getResolvedHtmlUnit(Source htmlSource) { |
| 2139 SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource); | 2145 SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource); |
| 2140 if (sourceEntry is HtmlEntry) { | 2146 if (sourceEntry is HtmlEntry) { |
| 2141 HtmlEntry htmlEntry = sourceEntry; | 2147 HtmlEntry htmlEntry = sourceEntry; |
| 2142 return htmlEntry.getValue(HtmlEntry.RESOLVED_UNIT); | 2148 return htmlEntry.getValue(HtmlEntry.RESOLVED_UNIT); |
| 2143 } | 2149 } |
| 2144 return null; | 2150 return null; |
| 2145 } | 2151 } |
| 2146 | 2152 |
| 2147 @override | 2153 @override |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2533 } | 2539 } |
| 2534 return resolveCompilationUnit2(unitSource, library.source); | 2540 return resolveCompilationUnit2(unitSource, library.source); |
| 2535 } | 2541 } |
| 2536 | 2542 |
| 2537 @override | 2543 @override |
| 2538 CompilationUnit resolveCompilationUnit2( | 2544 CompilationUnit resolveCompilationUnit2( |
| 2539 Source unitSource, Source librarySource) => _getDartResolutionData2( | 2545 Source unitSource, Source librarySource) => _getDartResolutionData2( |
| 2540 unitSource, librarySource, DartEntry.RESOLVED_UNIT, null); | 2546 unitSource, librarySource, DartEntry.RESOLVED_UNIT, null); |
| 2541 | 2547 |
| 2542 @override | 2548 @override |
| 2549 @deprecated |
| 2543 ht.HtmlUnit resolveHtmlUnit(Source htmlSource) { | 2550 ht.HtmlUnit resolveHtmlUnit(Source htmlSource) { |
| 2544 computeHtmlElement(htmlSource); | 2551 computeHtmlElement(htmlSource); |
| 2545 return parseHtmlUnit(htmlSource); | 2552 return parseHtmlUnit(htmlSource); |
| 2546 } | 2553 } |
| 2547 | 2554 |
| 2548 @override | 2555 @override |
| 2549 void setChangedContents(Source source, String contents, int offset, | 2556 void setChangedContents(Source source, String contents, int offset, |
| 2550 int oldLength, int newLength) { | 2557 int oldLength, int newLength) { |
| 2551 if (_contentRangeChanged(source, contents, offset, oldLength, newLength)) { | 2558 if (_contentRangeChanged(source, contents, offset, oldLength, newLength)) { |
| 2552 _onSourcesChangedController.add(new SourcesChangedEvent.changedRange( | 2559 _onSourcesChangedController.add(new SourcesChangedEvent.changedRange( |
| (...skipping 9268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11821 PendingFuture pendingFuture = | 11828 PendingFuture pendingFuture = |
| 11822 new PendingFuture<T>(_context, source, computeValue); | 11829 new PendingFuture<T>(_context, source, computeValue); |
| 11823 if (!pendingFuture.evaluate(sourceEntry)) { | 11830 if (!pendingFuture.evaluate(sourceEntry)) { |
| 11824 _context._pendingFutureSources | 11831 _context._pendingFutureSources |
| 11825 .putIfAbsent(source, () => <PendingFuture>[]) | 11832 .putIfAbsent(source, () => <PendingFuture>[]) |
| 11826 .add(pendingFuture); | 11833 .add(pendingFuture); |
| 11827 } | 11834 } |
| 11828 return pendingFuture.future; | 11835 return pendingFuture.future; |
| 11829 } | 11836 } |
| 11830 } | 11837 } |
| OLD | NEW |