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

Unified Diff: pkg/analysis_server/lib/src/status/diagnostics.dart

Issue 2925463002: Add clientID and clientVersion to the diagnostics page. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « pkg/analysis_server/lib/src/server/driver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/status/diagnostics.dart
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index 93c38047fd19844e6e385edff62a39b6c3fc218d..ef0e2149950ea52666e1c3c0748a041ddd48f4a5 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -323,9 +323,18 @@ class FeedbackPage extends DiagnosticPage {
'what you think the expected behavior should have been',
], (line) => buf.writeln(line));
+ List<String> ideInfo = [];
+ if (server.options.clientId != null) {
+ ideInfo.add(server.options.clientId);
+ }
+ if (server.options.clientVersion != null) {
+ ideInfo.add(server.options.clientVersion);
+ }
+ String ideText = ideInfo.map((str) => '<code>$str</code>').join(', ');
+
p('Other data to include:');
ul([
- "the IDE you are using and it's version",
+ "the IDE you are using and it's version${ideText.isEmpty ? '' : ' ($ideText)'}",
'the Dart SDK version (<code>${escape(_sdkVersion)}</code>)',
'your operating system (<code>${escape(Platform.operatingSystem)}</code>)',
], (line) => buf.writeln(line));
@@ -809,12 +818,12 @@ class CompletionPage extends DiagnosticPageWithNav {
@override
void generateContent(Map<String, String> params) {
- CompletionDomainHandler domain = server.handlers.firstWhere(
+ CompletionDomainHandler completionDomain = server.handlers.firstWhere(
(handler) => handler is CompletionDomainHandler,
orElse: () => null);
- List<CompletionPerformance> completions = domain.performanceList.toList();
- completions.sort((a, b) => b.start.compareTo(a.start));
+ List<CompletionPerformance> completions =
+ completionDomain.performanceList.items.toList();
if (completions.isEmpty) {
blankslate('No completions recorded.');
« no previous file with comments | « pkg/analysis_server/lib/src/server/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698