Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Unified Diff: pkg/analysis_server/lib/src/services/correction/assist_internal.dart

Issue 2532393008: Add libraries in corrections using SourceInfo instance of LibraryElement. (Closed)
Patch Set: Replace SourceInfo with Source. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/services/correction/assist_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index 989968174a3023da781e5f66ea40df12f0074ea2..73a4beef69a9690582eeb22eeb0a5d0ea316545b 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -233,7 +233,7 @@ class AssistProcessor {
DartType type = declaredIdentifier.identifier.bestType;
if (type is InterfaceType || type is FunctionType) {
_configureTargetLocation(node);
- Set<LibraryElement> librariesToImport = new Set<LibraryElement>();
+ Set<Source> librariesToImport = new Set<Source>();
typeSource = utils.getTypeSource(type, librariesToImport);
addLibraryImports(change, unitLibraryElement, librariesToImport);
} else {
@@ -285,7 +285,7 @@ class AssistProcessor {
String typeSource;
{
_configureTargetLocation(node);
- Set<LibraryElement> librariesToImport = new Set<LibraryElement>();
+ Set<Source> librariesToImport = new Set<Source>();
typeSource = utils.getTypeSource(type, librariesToImport);
addLibraryImports(change, unitLibraryElement, librariesToImport);
}
@@ -337,7 +337,7 @@ class AssistProcessor {
String typeSource;
if (type is InterfaceType || type is FunctionType) {
_configureTargetLocation(node);
- Set<LibraryElement> librariesToImport = new Set<LibraryElement>();
+ Set<Source> librariesToImport = new Set<Source>();
typeSource = utils.getTypeSource(type, librariesToImport);
addLibraryImports(change, unitLibraryElement, librariesToImport);
} else {
@@ -1002,7 +1002,7 @@ class AssistProcessor {
String name = (node as SimpleIdentifier).name;
// prepare type
DartType type = parameterElement.type;
- Set<LibraryElement> librariesToImport = new Set<LibraryElement>();
+ Set<Source> librariesToImport = new Set<Source>();
String typeCode = utils.getTypeSource(type, librariesToImport);
// replace parameter
if (type.isDynamic) {

Powered by Google App Engine
This is Rietveld 408576698