| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine; | 3 library engine; |
| 4 import 'dart:collection' show HasNextIterator; | 4 import 'dart:collection' show HasNextIterator; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
| 7 import 'instrumentation.dart'; | 7 import 'instrumentation.dart'; |
| 8 import 'error.dart'; | 8 import 'error.dart'; |
| 9 import 'source.dart'; | 9 import 'source.dart'; |
| 10 import 'scanner.dart' show Token, CharBufferScanner, StringScanner; | 10 import 'scanner.dart' show Token, CharBufferScanner, StringScanner; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 /** | 75 /** |
| 76 * The logger that should receive information about errors within the analysis
engine. | 76 * The logger that should receive information about errors within the analysis
engine. |
| 77 */ | 77 */ |
| 78 Logger _logger = Logger.NULL; | 78 Logger _logger = Logger.NULL; |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * Create a new context in which analysis can be performed. | 81 * Create a new context in which analysis can be performed. |
| 82 * @return the analysis context that was created | 82 * @return the analysis context that was created |
| 83 */ | 83 */ |
| 84 AnalysisContext createAnalysisContext() { | 84 AnalysisContext createAnalysisContext() { |
| 85 if (Instrumentation.isNullLogger()) { | 85 if (Instrumentation.isNullLogger) { |
| 86 return new DelegatingAnalysisContextImpl(); | 86 return new DelegatingAnalysisContextImpl(); |
| 87 } else { | 87 } else { |
| 88 return new InstrumentedAnalysisContextImpl.con1(new DelegatingAnalysisCont
extImpl()); | 88 return new InstrumentedAnalysisContextImpl.con1(new DelegatingAnalysisCont
extImpl()); |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 /** | 92 /** |
| 93 * Return the logger that should receive information about errors within the a
nalysis engine. | 93 * Return the logger that should receive information about errors within the a
nalysis engine. |
| 94 * @return the logger that should receive information about errors within the
analysis engine | 94 * @return the logger that should receive information about errors within the
analysis engine |
| 95 */ | 95 */ |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 /** | 671 /** |
| 672 * Return a list containing the source containers that were removed. | 672 * Return a list containing the source containers that were removed. |
| 673 * @return a list containing the source containers that were removed | 673 * @return a list containing the source containers that were removed |
| 674 */ | 674 */ |
| 675 List<SourceContainer> get removedContainers => _removedContainers; | 675 List<SourceContainer> get removedContainers => _removedContainers; |
| 676 | 676 |
| 677 /** | 677 /** |
| 678 * Return `true` if this change set does not contain any changes. | 678 * Return `true` if this change set does not contain any changes. |
| 679 * @return `true` if this change set does not contain any changes | 679 * @return `true` if this change set does not contain any changes |
| 680 */ | 680 */ |
| 681 bool isEmpty() => _added2.isEmpty && _changed2.isEmpty && _removed2.isEmpty &&
_removedContainers.isEmpty; | 681 bool get isEmpty => _added2.isEmpty && _changed2.isEmpty && _removed2.isEmpty
&& _removedContainers.isEmpty; |
| 682 | 682 |
| 683 /** | 683 /** |
| 684 * Record that the specified source has been removed. | 684 * Record that the specified source has been removed. |
| 685 * @param source the source that was removed | 685 * @param source the source that was removed |
| 686 */ | 686 */ |
| 687 void removed3(Source source) { | 687 void removed3(Source source) { |
| 688 if (source != null) { | 688 if (source != null) { |
| 689 _removed2.add(source); | 689 _removed2.add(source); |
| 690 } | 690 } |
| 691 } | 691 } |
| (...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1877 | 1877 |
| 1878 /** | 1878 /** |
| 1879 * The number of times that the flushing of information from the cache has bee
n disabled without | 1879 * The number of times that the flushing of information from the cache has bee
n disabled without |
| 1880 * being re-enabled. | 1880 * being re-enabled. |
| 1881 */ | 1881 */ |
| 1882 int _cacheRemovalCount = 0; | 1882 int _cacheRemovalCount = 0; |
| 1883 void addSourceInfo(Source source, SourceEntry info) { | 1883 void addSourceInfo(Source source, SourceEntry info) { |
| 1884 _sourceMap[source] = info; | 1884 _sourceMap[source] = info; |
| 1885 } | 1885 } |
| 1886 void applyChanges(ChangeSet changeSet) { | 1886 void applyChanges(ChangeSet changeSet) { |
| 1887 if (changeSet.isEmpty()) { | 1887 if (changeSet.isEmpty) { |
| 1888 return; | 1888 return; |
| 1889 } | 1889 } |
| 1890 { | 1890 { |
| 1891 List<Source> removedSources = new List<Source>.from(changeSet.removed); | 1891 List<Source> removedSources = new List<Source>.from(changeSet.removed); |
| 1892 for (SourceContainer container in changeSet.removedContainers) { | 1892 for (SourceContainer container in changeSet.removedContainers) { |
| 1893 addSourcesInContainer(removedSources, container); | 1893 addSourcesInContainer(removedSources, container); |
| 1894 } | 1894 } |
| 1895 bool addedDartSource = false; | 1895 bool addedDartSource = false; |
| 1896 for (Source source in changeSet.added3) { | 1896 for (Source source in changeSet.added3) { |
| 1897 if (sourceAvailable(source)) { | 1897 if (sourceAvailable(source)) { |
| 1898 addedDartSource = true; | 1898 addedDartSource = true; |
| 1899 } | 1899 } |
| 1900 } | 1900 } |
| 1901 for (Source source in changeSet.changed3) { | 1901 for (Source source in changeSet.changed3) { |
| 1902 sourceChanged(source); | 1902 sourceChanged(source); |
| 1903 } | 1903 } |
| 1904 for (Source source in removedSources) { | 1904 for (Source source in removedSources) { |
| 1905 sourceRemoved(source); | 1905 sourceRemoved(source); |
| 1906 } | 1906 } |
| 1907 if (addedDartSource) { | 1907 if (addedDartSource) { |
| 1908 for (MapEntry<Source, SourceEntry> mapEntry in getMapEntrySet(_sourceMap
)) { | 1908 for (MapEntry<Source, SourceEntry> mapEntry in getMapEntrySet(_sourceMap
)) { |
| 1909 if (!mapEntry.getKey().isInSystemLibrary() && mapEntry.getValue() is D
artEntry) { | 1909 if (!mapEntry.getKey().isInSystemLibrary && mapEntry.getValue() is Dar
tEntry) { |
| 1910 DartEntryImpl dartCopy = ((mapEntry.getValue() as DartEntry)).writab
leCopy; | 1910 DartEntryImpl dartCopy = ((mapEntry.getValue() as DartEntry)).writab
leCopy; |
| 1911 dartCopy.invalidateAllResolutionInformation(); | 1911 dartCopy.invalidateAllResolutionInformation(); |
| 1912 mapEntry.setValue(dartCopy); | 1912 mapEntry.setValue(dartCopy); |
| 1913 } | 1913 } |
| 1914 } | 1914 } |
| 1915 } | 1915 } |
| 1916 } | 1916 } |
| 1917 } | 1917 } |
| 1918 String computeDocumentationComment(Element element) { | 1918 String computeDocumentationComment(Element element) { |
| 1919 if (element == null) { | 1919 if (element == null) { |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2165 return SourceKind.UNKNOWN; | 2165 return SourceKind.UNKNOWN; |
| 2166 } | 2166 } |
| 2167 return sourceEntry.kind; | 2167 return sourceEntry.kind; |
| 2168 } | 2168 } |
| 2169 List<Source> get launchableClientLibrarySources { | 2169 List<Source> get launchableClientLibrarySources { |
| 2170 List<Source> sources = new List<Source>(); | 2170 List<Source> sources = new List<Source>(); |
| 2171 { | 2171 { |
| 2172 for (MapEntry<Source, SourceEntry> entry in getMapEntrySet(_sourceMap)) { | 2172 for (MapEntry<Source, SourceEntry> entry in getMapEntrySet(_sourceMap)) { |
| 2173 Source source = entry.getKey(); | 2173 Source source = entry.getKey(); |
| 2174 SourceEntry sourceEntry = entry.getValue(); | 2174 SourceEntry sourceEntry = entry.getValue(); |
| 2175 if (identical(sourceEntry.kind, SourceKind.LIBRARY) && !source.isInSyste
mLibrary()) { | 2175 if (identical(sourceEntry.kind, SourceKind.LIBRARY) && !source.isInSyste
mLibrary) { |
| 2176 sources.add(source); | 2176 sources.add(source); |
| 2177 } | 2177 } |
| 2178 } | 2178 } |
| 2179 } | 2179 } |
| 2180 return new List.from(sources); | 2180 return new List.from(sources); |
| 2181 } | 2181 } |
| 2182 List<Source> get launchableServerLibrarySources { | 2182 List<Source> get launchableServerLibrarySources { |
| 2183 List<Source> sources = new List<Source>(); | 2183 List<Source> sources = new List<Source>(); |
| 2184 { | 2184 { |
| 2185 for (MapEntry<Source, SourceEntry> entry in getMapEntrySet(_sourceMap)) { | 2185 for (MapEntry<Source, SourceEntry> entry in getMapEntrySet(_sourceMap)) { |
| 2186 Source source = entry.getKey(); | 2186 Source source = entry.getKey(); |
| 2187 SourceEntry sourceEntry = entry.getValue(); | 2187 SourceEntry sourceEntry = entry.getValue(); |
| 2188 if (identical(sourceEntry.kind, SourceKind.LIBRARY) && !source.isInSyste
mLibrary()) { | 2188 if (identical(sourceEntry.kind, SourceKind.LIBRARY) && !source.isInSyste
mLibrary) { |
| 2189 sources.add(source); | 2189 sources.add(source); |
| 2190 } | 2190 } |
| 2191 } | 2191 } |
| 2192 } | 2192 } |
| 2193 return new List.from(sources); | 2193 return new List.from(sources); |
| 2194 } | 2194 } |
| 2195 List<Source> getLibrariesContaining(Source source) { | 2195 List<Source> getLibrariesContaining(Source source) { |
| 2196 { | 2196 { |
| 2197 List<Source> librarySources = new List<Source>(); | 2197 List<Source> librarySources = new List<Source>(); |
| 2198 for (MapEntry<Source, SourceEntry> entry in getMapEntrySet(_sourceMap)) { | 2198 for (MapEntry<Source, SourceEntry> entry in getMapEntrySet(_sourceMap)) { |
| (...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3493 class DelegatingAnalysisContextImpl extends AnalysisContextImpl { | 3493 class DelegatingAnalysisContextImpl extends AnalysisContextImpl { |
| 3494 | 3494 |
| 3495 /** | 3495 /** |
| 3496 * This references the [InternalAnalysisContext] held onto by the [DartSdk] wh
ich is | 3496 * This references the [InternalAnalysisContext] held onto by the [DartSdk] wh
ich is |
| 3497 * used (instead of this [AnalysisContext]) for SDK sources. This field is set
when | 3497 * used (instead of this [AnalysisContext]) for SDK sources. This field is set
when |
| 3498 * #setSourceFactory(SourceFactory) is called, and references the analysis con
text in the[DartUriResolver] in the [SourceFactory], this analysis context assum
es that there | 3498 * #setSourceFactory(SourceFactory) is called, and references the analysis con
text in the[DartUriResolver] in the [SourceFactory], this analysis context assum
es that there |
| 3499 * will be such a resolver. | 3499 * will be such a resolver. |
| 3500 */ | 3500 */ |
| 3501 InternalAnalysisContext _sdkAnalysisContext; | 3501 InternalAnalysisContext _sdkAnalysisContext; |
| 3502 void addSourceInfo(Source source, SourceEntry info) { | 3502 void addSourceInfo(Source source, SourceEntry info) { |
| 3503 if (source.isInSystemLibrary()) { | 3503 if (source.isInSystemLibrary) { |
| 3504 _sdkAnalysisContext.addSourceInfo(source, info); | 3504 _sdkAnalysisContext.addSourceInfo(source, info); |
| 3505 } else { | 3505 } else { |
| 3506 super.addSourceInfo(source, info); | 3506 super.addSourceInfo(source, info); |
| 3507 } | 3507 } |
| 3508 } | 3508 } |
| 3509 List<AnalysisError> computeErrors(Source source) { | 3509 List<AnalysisError> computeErrors(Source source) { |
| 3510 if (source.isInSystemLibrary()) { | 3510 if (source.isInSystemLibrary) { |
| 3511 return _sdkAnalysisContext.computeErrors(source); | 3511 return _sdkAnalysisContext.computeErrors(source); |
| 3512 } else { | 3512 } else { |
| 3513 return super.computeErrors(source); | 3513 return super.computeErrors(source); |
| 3514 } | 3514 } |
| 3515 } | 3515 } |
| 3516 HtmlElement computeHtmlElement(Source source) { | 3516 HtmlElement computeHtmlElement(Source source) { |
| 3517 if (source.isInSystemLibrary()) { | 3517 if (source.isInSystemLibrary) { |
| 3518 return _sdkAnalysisContext.computeHtmlElement(source); | 3518 return _sdkAnalysisContext.computeHtmlElement(source); |
| 3519 } else { | 3519 } else { |
| 3520 return super.computeHtmlElement(source); | 3520 return super.computeHtmlElement(source); |
| 3521 } | 3521 } |
| 3522 } | 3522 } |
| 3523 SourceKind computeKindOf(Source source) { | 3523 SourceKind computeKindOf(Source source) { |
| 3524 if (source.isInSystemLibrary()) { | 3524 if (source.isInSystemLibrary) { |
| 3525 return _sdkAnalysisContext.computeKindOf(source); | 3525 return _sdkAnalysisContext.computeKindOf(source); |
| 3526 } else { | 3526 } else { |
| 3527 return super.computeKindOf(source); | 3527 return super.computeKindOf(source); |
| 3528 } | 3528 } |
| 3529 } | 3529 } |
| 3530 LibraryElement computeLibraryElement(Source source) { | 3530 LibraryElement computeLibraryElement(Source source) { |
| 3531 if (source.isInSystemLibrary()) { | 3531 if (source.isInSystemLibrary) { |
| 3532 return _sdkAnalysisContext.computeLibraryElement(source); | 3532 return _sdkAnalysisContext.computeLibraryElement(source); |
| 3533 } else { | 3533 } else { |
| 3534 return super.computeLibraryElement(source); | 3534 return super.computeLibraryElement(source); |
| 3535 } | 3535 } |
| 3536 } | 3536 } |
| 3537 LineInfo computeLineInfo(Source source) { | 3537 LineInfo computeLineInfo(Source source) { |
| 3538 if (source.isInSystemLibrary()) { | 3538 if (source.isInSystemLibrary) { |
| 3539 return _sdkAnalysisContext.computeLineInfo(source); | 3539 return _sdkAnalysisContext.computeLineInfo(source); |
| 3540 } else { | 3540 } else { |
| 3541 return super.computeLineInfo(source); | 3541 return super.computeLineInfo(source); |
| 3542 } | 3542 } |
| 3543 } | 3543 } |
| 3544 CompilationUnit computeResolvableCompilationUnit(Source source) { | 3544 CompilationUnit computeResolvableCompilationUnit(Source source) { |
| 3545 if (source.isInSystemLibrary()) { | 3545 if (source.isInSystemLibrary) { |
| 3546 return _sdkAnalysisContext.computeResolvableCompilationUnit(source); | 3546 return _sdkAnalysisContext.computeResolvableCompilationUnit(source); |
| 3547 } else { | 3547 } else { |
| 3548 return super.computeResolvableCompilationUnit(source); | 3548 return super.computeResolvableCompilationUnit(source); |
| 3549 } | 3549 } |
| 3550 } | 3550 } |
| 3551 AnalysisErrorInfo getErrors(Source source) { | 3551 AnalysisErrorInfo getErrors(Source source) { |
| 3552 if (source.isInSystemLibrary()) { | 3552 if (source.isInSystemLibrary) { |
| 3553 return _sdkAnalysisContext.getErrors(source); | 3553 return _sdkAnalysisContext.getErrors(source); |
| 3554 } else { | 3554 } else { |
| 3555 return super.getErrors(source); | 3555 return super.getErrors(source); |
| 3556 } | 3556 } |
| 3557 } | 3557 } |
| 3558 HtmlElement getHtmlElement(Source source) { | 3558 HtmlElement getHtmlElement(Source source) { |
| 3559 if (source.isInSystemLibrary()) { | 3559 if (source.isInSystemLibrary) { |
| 3560 return _sdkAnalysisContext.getHtmlElement(source); | 3560 return _sdkAnalysisContext.getHtmlElement(source); |
| 3561 } else { | 3561 } else { |
| 3562 return super.getHtmlElement(source); | 3562 return super.getHtmlElement(source); |
| 3563 } | 3563 } |
| 3564 } | 3564 } |
| 3565 List<Source> getHtmlFilesReferencing(Source source) { | 3565 List<Source> getHtmlFilesReferencing(Source source) { |
| 3566 if (source.isInSystemLibrary()) { | 3566 if (source.isInSystemLibrary) { |
| 3567 return _sdkAnalysisContext.getHtmlFilesReferencing(source); | 3567 return _sdkAnalysisContext.getHtmlFilesReferencing(source); |
| 3568 } else { | 3568 } else { |
| 3569 return super.getHtmlFilesReferencing(source); | 3569 return super.getHtmlFilesReferencing(source); |
| 3570 } | 3570 } |
| 3571 } | 3571 } |
| 3572 SourceKind getKindOf(Source source) { | 3572 SourceKind getKindOf(Source source) { |
| 3573 if (source.isInSystemLibrary()) { | 3573 if (source.isInSystemLibrary) { |
| 3574 return _sdkAnalysisContext.getKindOf(source); | 3574 return _sdkAnalysisContext.getKindOf(source); |
| 3575 } else { | 3575 } else { |
| 3576 return super.getKindOf(source); | 3576 return super.getKindOf(source); |
| 3577 } | 3577 } |
| 3578 } | 3578 } |
| 3579 List<Source> getLibrariesContaining(Source source) { | 3579 List<Source> getLibrariesContaining(Source source) { |
| 3580 if (source.isInSystemLibrary()) { | 3580 if (source.isInSystemLibrary) { |
| 3581 return _sdkAnalysisContext.getLibrariesContaining(source); | 3581 return _sdkAnalysisContext.getLibrariesContaining(source); |
| 3582 } else { | 3582 } else { |
| 3583 return super.getLibrariesContaining(source); | 3583 return super.getLibrariesContaining(source); |
| 3584 } | 3584 } |
| 3585 } | 3585 } |
| 3586 List<Source> getLibrariesDependingOn(Source librarySource) { | 3586 List<Source> getLibrariesDependingOn(Source librarySource) { |
| 3587 if (librarySource.isInSystemLibrary()) { | 3587 if (librarySource.isInSystemLibrary) { |
| 3588 return _sdkAnalysisContext.getLibrariesDependingOn(librarySource); | 3588 return _sdkAnalysisContext.getLibrariesDependingOn(librarySource); |
| 3589 } else { | 3589 } else { |
| 3590 return super.getLibrariesDependingOn(librarySource); | 3590 return super.getLibrariesDependingOn(librarySource); |
| 3591 } | 3591 } |
| 3592 } | 3592 } |
| 3593 LibraryElement getLibraryElement(Source source) { | 3593 LibraryElement getLibraryElement(Source source) { |
| 3594 if (source.isInSystemLibrary()) { | 3594 if (source.isInSystemLibrary) { |
| 3595 return _sdkAnalysisContext.getLibraryElement(source); | 3595 return _sdkAnalysisContext.getLibraryElement(source); |
| 3596 } else { | 3596 } else { |
| 3597 return super.getLibraryElement(source); | 3597 return super.getLibraryElement(source); |
| 3598 } | 3598 } |
| 3599 } | 3599 } |
| 3600 List<Source> get librarySources => ArrayUtils.addAll(super.librarySources, _sd
kAnalysisContext.librarySources); | 3600 List<Source> get librarySources => ArrayUtils.addAll(super.librarySources, _sd
kAnalysisContext.librarySources); |
| 3601 LineInfo getLineInfo(Source source) { | 3601 LineInfo getLineInfo(Source source) { |
| 3602 if (source.isInSystemLibrary()) { | 3602 if (source.isInSystemLibrary) { |
| 3603 return _sdkAnalysisContext.getLineInfo(source); | 3603 return _sdkAnalysisContext.getLineInfo(source); |
| 3604 } else { | 3604 } else { |
| 3605 return super.getLineInfo(source); | 3605 return super.getLineInfo(source); |
| 3606 } | 3606 } |
| 3607 } | 3607 } |
| 3608 Namespace getPublicNamespace(LibraryElement library) { | 3608 Namespace getPublicNamespace(LibraryElement library) { |
| 3609 Source source = library.source; | 3609 Source source = library.source; |
| 3610 if (source.isInSystemLibrary()) { | 3610 if (source.isInSystemLibrary) { |
| 3611 return _sdkAnalysisContext.getPublicNamespace(library); | 3611 return _sdkAnalysisContext.getPublicNamespace(library); |
| 3612 } else { | 3612 } else { |
| 3613 return super.getPublicNamespace(library); | 3613 return super.getPublicNamespace(library); |
| 3614 } | 3614 } |
| 3615 } | 3615 } |
| 3616 Namespace getPublicNamespace2(Source source) { | 3616 Namespace getPublicNamespace2(Source source) { |
| 3617 if (source.isInSystemLibrary()) { | 3617 if (source.isInSystemLibrary) { |
| 3618 return _sdkAnalysisContext.getPublicNamespace2(source); | 3618 return _sdkAnalysisContext.getPublicNamespace2(source); |
| 3619 } else { | 3619 } else { |
| 3620 return super.getPublicNamespace2(source); | 3620 return super.getPublicNamespace2(source); |
| 3621 } | 3621 } |
| 3622 } | 3622 } |
| 3623 CompilationUnit getResolvedCompilationUnit(Source unitSource, LibraryElement l
ibrary) { | 3623 CompilationUnit getResolvedCompilationUnit(Source unitSource, LibraryElement l
ibrary) { |
| 3624 if (unitSource.isInSystemLibrary()) { | 3624 if (unitSource.isInSystemLibrary) { |
| 3625 return _sdkAnalysisContext.getResolvedCompilationUnit(unitSource, library)
; | 3625 return _sdkAnalysisContext.getResolvedCompilationUnit(unitSource, library)
; |
| 3626 } else { | 3626 } else { |
| 3627 return super.getResolvedCompilationUnit(unitSource, library); | 3627 return super.getResolvedCompilationUnit(unitSource, library); |
| 3628 } | 3628 } |
| 3629 } | 3629 } |
| 3630 CompilationUnit getResolvedCompilationUnit2(Source unitSource, Source libraryS
ource) { | 3630 CompilationUnit getResolvedCompilationUnit2(Source unitSource, Source libraryS
ource) { |
| 3631 if (unitSource.isInSystemLibrary()) { | 3631 if (unitSource.isInSystemLibrary) { |
| 3632 return _sdkAnalysisContext.getResolvedCompilationUnit2(unitSource, library
Source); | 3632 return _sdkAnalysisContext.getResolvedCompilationUnit2(unitSource, library
Source); |
| 3633 } else { | 3633 } else { |
| 3634 return super.getResolvedCompilationUnit2(unitSource, librarySource); | 3634 return super.getResolvedCompilationUnit2(unitSource, librarySource); |
| 3635 } | 3635 } |
| 3636 } | 3636 } |
| 3637 bool isClientLibrary(Source librarySource) { | 3637 bool isClientLibrary(Source librarySource) { |
| 3638 if (librarySource.isInSystemLibrary()) { | 3638 if (librarySource.isInSystemLibrary) { |
| 3639 return _sdkAnalysisContext.isClientLibrary(librarySource); | 3639 return _sdkAnalysisContext.isClientLibrary(librarySource); |
| 3640 } else { | 3640 } else { |
| 3641 return super.isClientLibrary(librarySource); | 3641 return super.isClientLibrary(librarySource); |
| 3642 } | 3642 } |
| 3643 } | 3643 } |
| 3644 bool isServerLibrary(Source librarySource) { | 3644 bool isServerLibrary(Source librarySource) { |
| 3645 if (librarySource.isInSystemLibrary()) { | 3645 if (librarySource.isInSystemLibrary) { |
| 3646 return _sdkAnalysisContext.isServerLibrary(librarySource); | 3646 return _sdkAnalysisContext.isServerLibrary(librarySource); |
| 3647 } else { | 3647 } else { |
| 3648 return super.isServerLibrary(librarySource); | 3648 return super.isServerLibrary(librarySource); |
| 3649 } | 3649 } |
| 3650 } | 3650 } |
| 3651 CompilationUnit parseCompilationUnit(Source source) { | 3651 CompilationUnit parseCompilationUnit(Source source) { |
| 3652 if (source.isInSystemLibrary()) { | 3652 if (source.isInSystemLibrary) { |
| 3653 return _sdkAnalysisContext.parseCompilationUnit(source); | 3653 return _sdkAnalysisContext.parseCompilationUnit(source); |
| 3654 } else { | 3654 } else { |
| 3655 return super.parseCompilationUnit(source); | 3655 return super.parseCompilationUnit(source); |
| 3656 } | 3656 } |
| 3657 } | 3657 } |
| 3658 HtmlUnit parseHtmlUnit(Source source) { | 3658 HtmlUnit parseHtmlUnit(Source source) { |
| 3659 if (source.isInSystemLibrary()) { | 3659 if (source.isInSystemLibrary) { |
| 3660 return _sdkAnalysisContext.parseHtmlUnit(source); | 3660 return _sdkAnalysisContext.parseHtmlUnit(source); |
| 3661 } else { | 3661 } else { |
| 3662 return super.parseHtmlUnit(source); | 3662 return super.parseHtmlUnit(source); |
| 3663 } | 3663 } |
| 3664 } | 3664 } |
| 3665 void recordLibraryElements(Map<Source, LibraryElement> elementMap) { | 3665 void recordLibraryElements(Map<Source, LibraryElement> elementMap) { |
| 3666 if (elementMap.isEmpty) { | 3666 if (elementMap.isEmpty) { |
| 3667 return; | 3667 return; |
| 3668 } | 3668 } |
| 3669 Source source = new JavaIterator(elementMap.keys.toSet()).next(); | 3669 Source source = new JavaIterator(elementMap.keys.toSet()).next(); |
| 3670 if (source.isInSystemLibrary()) { | 3670 if (source.isInSystemLibrary) { |
| 3671 _sdkAnalysisContext.recordLibraryElements(elementMap); | 3671 _sdkAnalysisContext.recordLibraryElements(elementMap); |
| 3672 } else { | 3672 } else { |
| 3673 super.recordLibraryElements(elementMap); | 3673 super.recordLibraryElements(elementMap); |
| 3674 } | 3674 } |
| 3675 } | 3675 } |
| 3676 CompilationUnit resolveCompilationUnit(Source source, LibraryElement library)
{ | 3676 CompilationUnit resolveCompilationUnit(Source source, LibraryElement library)
{ |
| 3677 if (source.isInSystemLibrary()) { | 3677 if (source.isInSystemLibrary) { |
| 3678 return _sdkAnalysisContext.resolveCompilationUnit(source, library); | 3678 return _sdkAnalysisContext.resolveCompilationUnit(source, library); |
| 3679 } else { | 3679 } else { |
| 3680 return super.resolveCompilationUnit(source, library); | 3680 return super.resolveCompilationUnit(source, library); |
| 3681 } | 3681 } |
| 3682 } | 3682 } |
| 3683 CompilationUnit resolveCompilationUnit2(Source unitSource, Source librarySourc
e) { | 3683 CompilationUnit resolveCompilationUnit2(Source unitSource, Source librarySourc
e) { |
| 3684 if (unitSource.isInSystemLibrary()) { | 3684 if (unitSource.isInSystemLibrary) { |
| 3685 return _sdkAnalysisContext.resolveCompilationUnit2(unitSource, librarySour
ce); | 3685 return _sdkAnalysisContext.resolveCompilationUnit2(unitSource, librarySour
ce); |
| 3686 } else { | 3686 } else { |
| 3687 return super.resolveCompilationUnit2(unitSource, librarySource); | 3687 return super.resolveCompilationUnit2(unitSource, librarySource); |
| 3688 } | 3688 } |
| 3689 } | 3689 } |
| 3690 HtmlUnit resolveHtmlUnit(Source unitSource) { | 3690 HtmlUnit resolveHtmlUnit(Source unitSource) { |
| 3691 if (unitSource.isInSystemLibrary()) { | 3691 if (unitSource.isInSystemLibrary) { |
| 3692 return _sdkAnalysisContext.resolveHtmlUnit(unitSource); | 3692 return _sdkAnalysisContext.resolveHtmlUnit(unitSource); |
| 3693 } else { | 3693 } else { |
| 3694 return super.resolveHtmlUnit(unitSource); | 3694 return super.resolveHtmlUnit(unitSource); |
| 3695 } | 3695 } |
| 3696 } | 3696 } |
| 3697 void setContents(Source source, String contents) { | 3697 void setContents(Source source, String contents) { |
| 3698 if (source.isInSystemLibrary()) { | 3698 if (source.isInSystemLibrary) { |
| 3699 _sdkAnalysisContext.setContents(source, contents); | 3699 _sdkAnalysisContext.setContents(source, contents); |
| 3700 } else { | 3700 } else { |
| 3701 super.setContents(source, contents); | 3701 super.setContents(source, contents); |
| 3702 } | 3702 } |
| 3703 } | 3703 } |
| 3704 void set sourceFactory(SourceFactory factory) { | 3704 void set sourceFactory(SourceFactory factory) { |
| 3705 super.sourceFactory = factory; | 3705 super.sourceFactory = factory; |
| 3706 DartSdk sdk = factory.dartSdk; | 3706 DartSdk sdk = factory.dartSdk; |
| 3707 if (sdk != null) { | 3707 if (sdk != null) { |
| 3708 _sdkAnalysisContext = sdk.context as InternalAnalysisContext; | 3708 _sdkAnalysisContext = sdk.context as InternalAnalysisContext; |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4431 } | 4431 } |
| 4432 void logError2(String message, Exception exception) { | 4432 void logError2(String message, Exception exception) { |
| 4433 } | 4433 } |
| 4434 void logError3(Exception exception) { | 4434 void logError3(Exception exception) { |
| 4435 } | 4435 } |
| 4436 void logInformation(String message) { | 4436 void logInformation(String message) { |
| 4437 } | 4437 } |
| 4438 void logInformation2(String message, Exception exception) { | 4438 void logInformation2(String message, Exception exception) { |
| 4439 } | 4439 } |
| 4440 } | 4440 } |
| OLD | NEW |