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

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

Issue 2486923007: Create pkg/front_end/src/base and begin populating with general use classes. (Closed)
Patch Set: Fix formatting Created 4 years, 1 month 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/error/error.dart ('k') | pkg/analyzer/lib/src/generated/source.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) 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 analyzer.src.generated.engine; 5 library analyzer.src.generated.engine;
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 11 matching lines...) Expand all
22 import 'package:analyzer/src/generated/java_engine.dart'; 22 import 'package:analyzer/src/generated/java_engine.dart';
23 import 'package:analyzer/src/generated/resolver.dart'; 23 import 'package:analyzer/src/generated/resolver.dart';
24 import 'package:analyzer/src/generated/source.dart'; 24 import 'package:analyzer/src/generated/source.dart';
25 import 'package:analyzer/src/generated/utilities_general.dart'; 25 import 'package:analyzer/src/generated/utilities_general.dart';
26 import 'package:analyzer/src/plugin/command_line_plugin.dart'; 26 import 'package:analyzer/src/plugin/command_line_plugin.dart';
27 import 'package:analyzer/src/plugin/engine_plugin.dart'; 27 import 'package:analyzer/src/plugin/engine_plugin.dart';
28 import 'package:analyzer/src/plugin/options_plugin.dart'; 28 import 'package:analyzer/src/plugin/options_plugin.dart';
29 import 'package:analyzer/src/task/manager.dart'; 29 import 'package:analyzer/src/task/manager.dart';
30 import 'package:analyzer/task/dart.dart'; 30 import 'package:analyzer/task/dart.dart';
31 import 'package:analyzer/task/model.dart'; 31 import 'package:analyzer/task/model.dart';
32 import 'package:front_end/src/base/timestamped_data.dart';
32 import 'package:html/dom.dart' show Document; 33 import 'package:html/dom.dart' show Document;
33 import 'package:path/path.dart' as pathos; 34 import 'package:path/path.dart' as pathos;
34 import 'package:plugin/manager.dart'; 35 import 'package:plugin/manager.dart';
35 import 'package:plugin/plugin.dart'; 36 import 'package:plugin/plugin.dart';
36 37
37 export 'package:analyzer/error/listener.dart' show RecordingErrorListener; 38 export 'package:analyzer/error/listener.dart' show RecordingErrorListener;
39 export 'package:front_end/src/base/timestamped_data.dart' show TimestampedData;
38 40
39 /** 41 /**
40 * Used by [AnalysisOptions] to allow function bodies to be analyzed in some 42 * Used by [AnalysisOptions] to allow function bodies to be analyzed in some
41 * sources but not others. 43 * sources but not others.
42 */ 44 */
43 typedef bool AnalyzeFunctionBodiesPredicate(Source source); 45 typedef bool AnalyzeFunctionBodiesPredicate(Source source);
44 46
45 /** 47 /**
46 * A context in which a single analysis can be performed and incrementally 48 * A context in which a single analysis can be performed and incrementally
47 * maintained. The context includes such information as the version of the SDK 49 * maintained. The context includes such information as the version of the SDK
(...skipping 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 */ 2715 */
2714 bool get wereSourcesAdded => _changeSet.addedSources.length > 0; 2716 bool get wereSourcesAdded => _changeSet.addedSources.length > 0;
2715 2717
2716 /** 2718 /**
2717 * Return `true` if any sources were removed or deleted. 2719 * Return `true` if any sources were removed or deleted.
2718 */ 2720 */
2719 bool get wereSourcesRemoved => 2721 bool get wereSourcesRemoved =>
2720 _changeSet.removedSources.length > 0 || 2722 _changeSet.removedSources.length > 0 ||
2721 _changeSet.removedContainers.length > 0; 2723 _changeSet.removedContainers.length > 0;
2722 } 2724 }
2723
2724 /**
2725 * Analysis data for which we have a modification time.
2726 */
2727 class TimestampedData<E> {
2728 /**
2729 * The modification time of the source from which the data was created.
2730 */
2731 final int modificationTime;
2732
2733 /**
2734 * The data that was created from the source.
2735 */
2736 final E data;
2737
2738 /**
2739 * Initialize a newly created holder to associate the given [data] with the
2740 * given [modificationTime].
2741 */
2742 TimestampedData(this.modificationTime, this.data);
2743 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698