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

Unified Diff: pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart

Issue 2997833002: Initial Kythe support for plugins (Closed)
Patch Set: Created 3 years, 4 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
Index: pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart
diff --git a/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart b/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart
new file mode 100644
index 0000000000000000000000000000000000000000..66dfed7b5efc404b2a9281c728c4dd703050b975
--- /dev/null
+++ b/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart
@@ -0,0 +1,47 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/utilities/kythe/entries.dart';
+
+/**
+ * A concrete implementation of [EntryRequest].
+ */
+class DartEntryRequestImpl implements DartEntryRequest {
+ @override
+ final ResourceProvider resourceProvider;
+
+ @override
+ final ResolveResult result;
+
+ /**
+ * Initialize a newly create request with the given data.
+ */
+ DartEntryRequestImpl(this.resourceProvider, this.result);
+
+ @override
+ String get path => result.path;
+}
+
+/**
+ * A concrete implementation of [EntryCollector].
+ */
+class EntryCollectorImpl implements EntryCollector {
+ /**
+ * A list of entries.
+ */
+ final List<KytheEntry> entries = <KytheEntry>[];
+
+ /**
+ * A list of paths to files.
+ */
+ final List<String> files = <String>[];
+
+ @override
+ void addEntry(KytheEntry entry) {
+ entries.add(entry);
+ }
+}
« no previous file with comments | « pkg/analyzer_plugin/lib/plugin/kythe_mixin.dart ('k') | pkg/analyzer_plugin/lib/utilities/kythe/entries.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698