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

Unified Diff: pkg/analyzer/lib/src/generated/testing/element_factory.dart

Issue 1135073004: Fix for 'Create part' Quick Fix. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 months 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/testing/element_factory.dart
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index 29d6bbbc0b53d83340ec80de921cd13046d1327a..d82da2a3331c1063ac6cd35ac7ab0d533df080da 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -17,6 +17,7 @@ import 'package:analyzer/src/generated/java_core.dart';
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:path/path.dart';
/**
* The class `ElementFactory` defines utility methods used to create elements for testing
@@ -84,7 +85,8 @@ class ElementFactory {
static CompilationUnitElementImpl compilationUnit(String fileName,
[Source librarySource]) {
- Source source = new NonExistingSource(fileName, UriKind.FILE_URI);
+ Source source =
+ new NonExistingSource(fileName, toUri(fileName), UriKind.FILE_URI);
CompilationUnitElementImpl unit = new CompilationUnitElementImpl(fileName);
unit.source = source;
if (librarySource == null) {
@@ -362,7 +364,8 @@ class ElementFactory {
}
static HtmlElementImpl htmlUnit(AnalysisContext context, String fileName) {
- Source source = new NonExistingSource(fileName, UriKind.FILE_URI);
+ Source source =
+ new NonExistingSource(fileName, toUri(fileName), UriKind.FILE_URI);
HtmlElementImpl unit = new HtmlElementImpl(context, fileName);
unit.source = source;
return unit;
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698