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

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

Issue 1418323002: WorkItem detail diagnostics. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | 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/get_handler.dart
diff --git a/pkg/analysis_server/lib/src/status/get_handler.dart b/pkg/analysis_server/lib/src/status/get_handler.dart
index e40b9e07e9e6fb8dcb3636d443be74d1a3676e18..df4ac9993fed096a2a78e29552a9acba18956290 100644
--- a/pkg/analysis_server/lib/src/status/get_handler.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler.dart
@@ -1069,13 +1069,19 @@ class GetHandler {
buffer.write('<p>$description</p>');
});
+ String _describe(WorkItem item) {
+ if (item == null) {
+ return 'None';
+ }
+ return '${item.descriptor?.name} computing ${item.spawningResult?.name} for ${item.target?.toString()}';
+ }
+
buffer.write('<h3>Work Items</h3>');
buffer.write(
- '<p><b>Current: ${driver.currentWorkOrder?.current?.descriptor?.name}</b></p>');
- buffer.write('<br>');
+ '<p><b>Current:</b> ${_describe(driver.currentWorkOrder?.current)}</p>');
if (workItems != null) {
- buffer.writeAll(workItems
- .map((item) => '<p>${item.descriptor?.name}</p>')
+ buffer.writeAll(workItems.reversed
+ .map((item) => '<p>${_describe(item)}</p>')
?.toList());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698