| 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.src.services.correction.fix_internal; | 5 library analysis_server.src.services.correction.fix_internal; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:core' hide Resource; | 9 import 'dart:core' hide Resource; |
| 10 | 10 |
| (...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 { | 1453 { |
| 1454 DartSdk sdk = context.sourceFactory.dartSdk; | 1454 DartSdk sdk = context.sourceFactory.dartSdk; |
| 1455 List<SdkLibrary> sdkLibraries = sdk.sdkLibraries; | 1455 List<SdkLibrary> sdkLibraries = sdk.sdkLibraries; |
| 1456 for (SdkLibrary sdkLibrary in sdkLibraries) { | 1456 for (SdkLibrary sdkLibrary in sdkLibraries) { |
| 1457 SourceFactory sdkSourceFactory = context.sourceFactory; | 1457 SourceFactory sdkSourceFactory = context.sourceFactory; |
| 1458 String libraryUri = sdkLibrary.shortName; | 1458 String libraryUri = sdkLibrary.shortName; |
| 1459 Source librarySource = | 1459 Source librarySource = |
| 1460 sdkSourceFactory.resolveUri(unitSource, libraryUri); | 1460 sdkSourceFactory.resolveUri(unitSource, libraryUri); |
| 1461 // prepare LibraryElement | 1461 // prepare LibraryElement |
| 1462 LibraryElement libraryElement = | 1462 LibraryElement libraryElement = |
| 1463 context.getResult(librarySource, LIBRARY_ELEMENT8); | 1463 context.getResult(librarySource, LIBRARY_ELEMENT1); |
| 1464 if (libraryElement == null) { | 1464 if (libraryElement == null) { |
| 1465 continue; | 1465 continue; |
| 1466 } | 1466 } |
| 1467 // prepare exported Element | 1467 // prepare exported Element |
| 1468 Element element = getExportedElement(libraryElement, name); | 1468 Element element = getExportedElement(libraryElement, name); |
| 1469 if (element == null) { | 1469 if (element == null) { |
| 1470 continue; | 1470 continue; |
| 1471 } | 1471 } |
| 1472 if (element is PropertyAccessorElement) { | 1472 if (element is PropertyAccessorElement) { |
| 1473 element = (element as PropertyAccessorElement).variable; | 1473 element = (element as PropertyAccessorElement).variable; |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2842 /** | 2842 /** |
| 2843 * Describes the location for a newly created [FieldDeclaration]. | 2843 * Describes the location for a newly created [FieldDeclaration]. |
| 2844 */ | 2844 */ |
| 2845 class _FieldLocation { | 2845 class _FieldLocation { |
| 2846 final String prefix; | 2846 final String prefix; |
| 2847 final int offset; | 2847 final int offset; |
| 2848 final String suffix; | 2848 final String suffix; |
| 2849 | 2849 |
| 2850 _FieldLocation(this.prefix, this.offset, this.suffix); | 2850 _FieldLocation(this.prefix, this.offset, this.suffix); |
| 2851 } | 2851 } |
| OLD | NEW |