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

Side by Side Diff: pkg/analysis_server/lib/src/domain_kythe.dart

Issue 3006693002: Add an integration test for kythe support with bug fixes (Closed)
Patch Set: Created 3 years, 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:core'; 6 import 'dart:core';
7 7
8 import 'package:analysis_server/protocol/protocol.dart'; 8 import 'package:analysis_server/protocol/protocol.dart';
9 import 'package:analysis_server/protocol/protocol_constants.dart'; 9 import 'package:analysis_server/protocol/protocol_constants.dart';
10 import 'package:analysis_server/protocol/protocol_generated.dart'; 10 import 'package:analysis_server/protocol/protocol_generated.dart';
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Compute entries generated by server. 52 // Compute entries generated by server.
53 // 53 //
54 List<KytheGetKytheEntriesResult> allResults = 54 List<KytheGetKytheEntriesResult> allResults =
55 <KytheGetKytheEntriesResult>[]; 55 <KytheGetKytheEntriesResult>[];
56 AnalysisResult result = await server.getAnalysisResult(file); 56 AnalysisResult result = await server.getAnalysisResult(file);
57 CompilationUnit unit = result?.unit; 57 CompilationUnit unit = result?.unit;
58 if (unit != null && result.exists) { 58 if (unit != null && result.exists) {
59 List<KytheEntry> entries = <KytheEntry>[]; 59 List<KytheEntry> entries = <KytheEntry>[];
60 // TODO(brianwilkerson) Figure out how to get the list of files. 60 // TODO(brianwilkerson) Figure out how to get the list of files.
61 List<String> files = <String>[]; 61 List<String> files = <String>[];
62 result.unit.accept(new KytheDartVisitor(entries, file, 62 result.unit.accept(new KytheDartVisitor(
63 new InheritanceManager(result.libraryElement), result.content)); 63 server.resourceProvider,
64 entries,
65 file,
66 new InheritanceManager(result.libraryElement),
67 result.content));
64 allResults.add(new KytheGetKytheEntriesResult(entries, files)); 68 allResults.add(new KytheGetKytheEntriesResult(entries, files));
65 } 69 }
66 // 70 //
67 // Add the entries produced by plugins to the server-generated entries. 71 // Add the entries produced by plugins to the server-generated entries.
68 // 72 //
69 if (pluginFutures != null) { 73 if (pluginFutures != null) {
70 List<plugin.Response> responses = await waitForResponses(pluginFutures, 74 List<plugin.Response> responses = await waitForResponses(pluginFutures,
71 requestParameters: requestParams); 75 requestParameters: requestParams);
72 for (plugin.Response response in responses) { 76 for (plugin.Response response in responses) {
73 plugin.KytheGetKytheEntriesResult result = 77 plugin.KytheGetKytheEntriesResult result =
(...skipping 27 matching lines...) Expand all
101 if (requestName == KYTHE_REQUEST_GET_KYTHE_ENTRIES) { 105 if (requestName == KYTHE_REQUEST_GET_KYTHE_ENTRIES) {
102 getKytheEntries(request); 106 getKytheEntries(request);
103 return Response.DELAYED_RESPONSE; 107 return Response.DELAYED_RESPONSE;
104 } 108 }
105 } on RequestFailure catch (exception) { 109 } on RequestFailure catch (exception) {
106 return exception.response; 110 return exception.response;
107 } 111 }
108 return null; 112 return null;
109 } 113 }
110 } 114 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698