Index: pkg/analysis_server/lib/src/get_handler.dart |
diff --git a/pkg/analysis_server/lib/src/get_handler.dart b/pkg/analysis_server/lib/src/get_handler.dart |
index 7300d102610ae12da6155477397d141da584bea2..4a48d8430b6e74f8c071ddbf2ebc73e2d55018b3 100644 |
--- a/pkg/analysis_server/lib/src/get_handler.dart |
+++ b/pkg/analysis_server/lib/src/get_handler.dart |
@@ -174,8 +174,8 @@ class GetHandler { |
if (analysisServer == null) { |
return null; |
} |
- return analysisServer.handlers.firstWhere( |
- (h) => h is CompletionDomainHandler, orElse: () => null); |
+ return analysisServer.handlers |
+ .firstWhere((h) => h is CompletionDomainHandler, orElse: () => null); |
} |
/** |
@@ -218,7 +218,8 @@ class GetHandler { |
*/ |
Folder _findFolder(AnalysisServer analysisServer, String contextFilter) { |
return analysisServer.folderMap.keys.firstWhere( |
- (Folder folder) => folder.path == contextFilter, orElse: () => null); |
+ (Folder folder) => folder.path == contextFilter, |
+ orElse: () => null); |
} |
/** |
@@ -299,12 +300,15 @@ class GetHandler { |
buffer.write('<p><b>Task performace data</b></p>'); |
buffer.write( |
'<table style="border-collapse: separate; border-spacing: 10px 5px;">'); |
- _writeRow(buffer, [ |
- 'Task Name', |
- 'Count', |
- 'Total Time (in ms)', |
- 'Average Time (in ms)' |
- ], header: true); |
+ _writeRow( |
+ buffer, |
+ [ |
+ 'Task Name', |
+ 'Count', |
+ 'Total Time (in ms)', |
+ 'Average Time (in ms)' |
+ ], |
+ header: true); |
Map<Type, int> countMap = newTask.AnalysisTask.countMap; |
Map<Type, Stopwatch> stopwatchMap = newTask.AnalysisTask.stopwatchMap; |
@@ -324,7 +328,12 @@ class GetHandler { |
count, |
taskTime, |
count <= 0 ? '-' : (taskTime / count).toStringAsFixed(3) |
- ], classes: [null, "right", "right", "right"]); |
+ ], classes: [ |
+ null, |
+ "right", |
+ "right", |
+ "right" |
+ ]); |
}); |
_writeRow(buffer, ['Total', '-', totalTime, '-'], |
classes: [null, "right", "right", "right"]); |
@@ -392,10 +401,8 @@ class GetHandler { |
AnalysisContextImpl context = analysisServer.folderMap[folder]; |
_writeResponse(request, (StringBuffer buffer) { |
- _writePage(buffer, 'Analysis Server - AST Structure', [ |
- 'Context: $contextFilter', |
- 'File: $sourceUri' |
- ], (HttpResponse) { |
+ _writePage(buffer, 'Analysis Server - AST Structure', |
+ ['Context: $contextFilter', 'File: $sourceUri'], (HttpResponse) { |
Source source = context.sourceFactory.forUri(sourceUri); |
if (source == null) { |
buffer.write('<p>Not found.</p>'); |
@@ -465,10 +472,8 @@ class GetHandler { |
AnalysisContextImpl context = analysisServer.folderMap[folder]; |
_writeResponse(request, (StringBuffer buffer) { |
- _writePage(buffer, 'Analysis Server - Cache Entry', [ |
- 'Context: $contextFilter', |
- 'File: $sourceUri' |
- ], (HttpResponse) { |
+ _writePage(buffer, 'Analysis Server - Cache Entry', |
+ ['Context: $contextFilter', 'File: $sourceUri'], (HttpResponse) { |
buffer.write('<h3>Analyzing Contexts</h3><p>'); |
bool first = true; |
allContexts.forEach((Folder folder) { |
@@ -482,10 +487,13 @@ class GetHandler { |
if (analyzingContext == context) { |
buffer.write(folder.path); |
} else { |
- buffer.write(makeLink(CACHE_ENTRY_PATH, { |
- CONTEXT_QUERY_PARAM: folder.path, |
- SOURCE_QUERY_PARAM: sourceUri |
- }, HTML_ESCAPE.convert(folder.path))); |
+ buffer.write(makeLink( |
+ CACHE_ENTRY_PATH, |
+ { |
+ CONTEXT_QUERY_PARAM: folder.path, |
+ SOURCE_QUERY_PARAM: sourceUri |
+ }, |
+ HTML_ESCAPE.convert(folder.path))); |
} |
if (entryMap[folder].explicitlyAdded) { |
buffer.write(' (explicit)'); |
@@ -512,7 +520,9 @@ class GetHandler { |
for (Source librarySource in entry.containingLibraries) { |
String libraryName = HTML_ESCAPE.convert(librarySource.fullName); |
buffer.write('<h3>In library $libraryName:</h3>'); |
- _writeDescriptorTable(buffer, entry.libraryDescriptors, |
+ _writeDescriptorTable( |
+ buffer, |
+ entry.libraryDescriptors, |
(DataDescriptor descriptor) => |
entry.getStateInLibrary(descriptor, librarySource), |
(DataDescriptor descriptor) => |
@@ -575,10 +585,13 @@ class GetHandler { |
if (state != stateFilter || rowDesc.toString() != descriptorFilter) { |
return; |
} |
- String link = makeLink(CACHE_ENTRY_PATH, { |
- CONTEXT_QUERY_PARAM: folder.path, |
- SOURCE_QUERY_PARAM: source.uri.toString() |
- }, HTML_ESCAPE.convert(source.fullName)); |
+ String link = makeLink( |
+ CACHE_ENTRY_PATH, |
+ { |
+ CONTEXT_QUERY_PARAM: folder.path, |
+ SOURCE_QUERY_PARAM: source.uri.toString() |
+ }, |
+ HTML_ESCAPE.convert(source.fullName)); |
links.add(link); |
}); |
@@ -717,10 +730,14 @@ class GetHandler { |
if (exception != null) { |
exceptions.add(exception); |
} |
- String link = makeLink(CACHE_ENTRY_PATH, { |
- CONTEXT_QUERY_PARAM: folder.path, |
- SOURCE_QUERY_PARAM: source.uri.toString() |
- }, sourceName, exception != null); |
+ String link = makeLink( |
+ CACHE_ENTRY_PATH, |
+ { |
+ CONTEXT_QUERY_PARAM: folder.path, |
+ SOURCE_QUERY_PARAM: source.uri.toString() |
+ }, |
+ sourceName, |
+ exception != null); |
if (sourceEntry.explicitlyAdded) { |
explicitNames.add(sourceName); |
} else { |
@@ -759,8 +776,9 @@ class GetHandler { |
} |
_writeResponse(request, (StringBuffer buffer) { |
- _writePage(buffer, 'Analysis Server - Context', |
- ['Context: $contextFilter'], (StringBuffer buffer) { |
+ _writePage( |
+ buffer, 'Analysis Server - Context', ['Context: $contextFilter'], |
+ (StringBuffer buffer) { |
List headerRowText = ['Context']; |
headerRowText.addAll(CacheState.values); |
buffer.write('<h3>Summary</h3>'); |
@@ -884,8 +902,8 @@ class GetHandler { |
buffer.write('<table border="1">'); |
_writeRow(buffer, ['Element', 'Relationship', 'Location'], |
header: true); |
- relations.forEach((List<String> elementPath, |
- List<InspectLocation> relations) { |
+ relations.forEach( |
+ (List<String> elementPath, List<InspectLocation> relations) { |
String elementLocation = elementPath.join(' '); |
relations.forEach((InspectLocation location) { |
var relString = location.relationship.identifier; |
@@ -1041,9 +1059,8 @@ class GetHandler { |
buffer.write('<br>'); |
} |
String key = folder.shortName; |
- buffer.write(makeLink(CONTEXT_PATH, { |
- CONTEXT_QUERY_PARAM: folder.path |
- }, key, _hasException(folderMap[folder]))); |
+ buffer.write(makeLink(CONTEXT_PATH, {CONTEXT_QUERY_PARAM: folder.path}, |
+ key, _hasException(folderMap[folder]))); |
}); |
buffer.write('</p>'); |
@@ -1130,24 +1147,26 @@ class GetHandler { |
return; |
} |
buffer.write('<table>'); |
- _writeRow(buffer, [ |
- 'Start Time', |
- '', |
- 'First (ms)', |
- '', |
- 'Complete (ms)', |
- '', |
- '# Notifications', |
- '', |
- '# Suggestions', |
- '', |
- 'Snippet' |
- ], header: true); |
+ _writeRow( |
+ buffer, |
+ [ |
+ 'Start Time', |
+ '', |
+ 'First (ms)', |
+ '', |
+ 'Complete (ms)', |
+ '', |
+ '# Notifications', |
+ '', |
+ '# Suggestions', |
+ '', |
+ 'Snippet' |
+ ], |
+ header: true); |
int index = 0; |
for (CompletionPerformance performance in handler.performanceList) { |
- String link = makeLink(COMPLETION_PATH, { |
- 'index': '$index' |
- }, '${performance.startTimeAndMs}'); |
+ String link = makeLink(COMPLETION_PATH, {'index': '$index'}, |
+ '${performance.startTimeAndMs}'); |
_writeRow(buffer, [ |
link, |
' ', |
@@ -1189,9 +1208,12 @@ class GetHandler { |
* [linkParameters] will be used if the value is too large to be displayed on |
* the current page and needs to be linked to a separate page. |
*/ |
- void _writeDescriptorTable(StringBuffer buffer, |
- List<DataDescriptor> descriptors, CacheState getState(DataDescriptor), |
- dynamic getValue(DataDescriptor), Map<String, String> linkParameters) { |
+ void _writeDescriptorTable( |
+ StringBuffer buffer, |
+ List<DataDescriptor> descriptors, |
+ CacheState getState(DataDescriptor), |
+ dynamic getValue(DataDescriptor), |
+ Map<String, String> linkParameters) { |
buffer.write('<dl>'); |
for (DataDescriptor descriptor in descriptors) { |
String descriptorName = HTML_ESCAPE.convert(descriptor.toString()); |