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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1918923003: Remove unnecessary casts and general code clean-up (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: clean-up Created 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer.src.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 } 368 }
369 return sources; 369 return sources;
370 } 370 }
371 371
372 @override 372 @override
373 List<Source> get launchableServerLibrarySources { 373 List<Source> get launchableServerLibrarySources {
374 List<Source> sources = <Source>[]; 374 List<Source> sources = <Source>[];
375 for (Source source in _cache.sources) { 375 for (Source source in _cache.sources) {
376 CacheEntry entry = _cache.get(source); 376 CacheEntry entry = _cache.get(source);
377 if (source is Source && 377 if (entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY &&
378 entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY &&
379 !source.isInSystemLibrary && 378 !source.isInSystemLibrary &&
380 isServerLibrary(source)) { 379 isServerLibrary(source)) {
381 sources.add(source); 380 sources.add(source);
382 } 381 }
383 } 382 }
384 return sources; 383 return sources;
385 } 384 }
386 385
387 @override 386 @override
388 List<Source> get librarySources => _getSources(SourceKind.LIBRARY); 387 List<Source> get librarySources => _getSources(SourceKind.LIBRARY);
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 } 2195 }
2197 DartSdk sdk = factory.dartSdk; 2196 DartSdk sdk = factory.dartSdk;
2198 if (sdk == null) { 2197 if (sdk == null) {
2199 throw new IllegalArgumentException( 2198 throw new IllegalArgumentException(
2200 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2199 "The source factory for an SDK analysis context must have a DartUriRes olver");
2201 } 2200 }
2202 return new AnalysisCache( 2201 return new AnalysisCache(
2203 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2202 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2204 } 2203 }
2205 } 2204 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698