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

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

Issue 1502213002: Remove deprecated code (Closed) Base URL: https://github.com/dart-lang/sdk.git@analyzer-breaking-0.27
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
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 engine.testing.element_factory; 5 library engine.testing.element_factory;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/constant.dart'; 10 import 'package:analyzer/src/generated/constant.dart';
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 new PropertyAccessorElementImpl.forVariable(field); 402 new PropertyAccessorElementImpl.forVariable(field);
403 getter.getter = true; 403 getter.getter = true;
404 getter.variable = field; 404 getter.variable = field;
405 getter.returnType = type; 405 getter.returnType = type;
406 field.getter = getter; 406 field.getter = getter;
407 FunctionTypeImpl getterType = new FunctionTypeImpl(getter); 407 FunctionTypeImpl getterType = new FunctionTypeImpl(getter);
408 getter.type = getterType; 408 getter.type = getterType;
409 return getter; 409 return getter;
410 } 410 }
411 411
412 @deprecated
413 static HtmlElementImpl htmlUnit(AnalysisContext context, String fileName) {
414 Source source =
415 new NonExistingSource(fileName, toUri(fileName), UriKind.FILE_URI);
416 HtmlElementImpl unit = new HtmlElementImpl(context, fileName);
417 unit.source = source;
418 return unit;
419 }
420
421 static ImportElementImpl importFor( 412 static ImportElementImpl importFor(
422 LibraryElement importedLibrary, PrefixElement prefix, 413 LibraryElement importedLibrary, PrefixElement prefix,
423 [List<NamespaceCombinator> combinators = 414 [List<NamespaceCombinator> combinators =
424 NamespaceCombinator.EMPTY_LIST]) { 415 NamespaceCombinator.EMPTY_LIST]) {
425 ImportElementImpl spec = new ImportElementImpl(0); 416 ImportElementImpl spec = new ImportElementImpl(0);
426 spec.importedLibrary = importedLibrary; 417 spec.importedLibrary = importedLibrary;
427 spec.prefix = prefix; 418 spec.prefix = prefix;
428 spec.combinators = combinators; 419 spec.combinators = combinators;
429 return spec; 420 return spec;
430 } 421 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 } 608 }
618 609
619 static TypeParameterElementImpl typeParameterWithType(String name, 610 static TypeParameterElementImpl typeParameterWithType(String name,
620 [DartType bound]) { 611 [DartType bound]) {
621 TypeParameterElementImpl typeParameter = typeParameterElement(name); 612 TypeParameterElementImpl typeParameter = typeParameterElement(name);
622 typeParameter.type = new TypeParameterTypeImpl(typeParameter); 613 typeParameter.type = new TypeParameterTypeImpl(typeParameter);
623 typeParameter.bound = bound; 614 typeParameter.bound = bound;
624 return typeParameter; 615 return typeParameter;
625 } 616 }
626 } 617 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/source_io.dart ('k') | pkg/analyzer/lib/src/generated/testing/html_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698