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

Unified Diff: pkg/analysis_server/lib/src/computer/computer_outline.dart

Issue 482573004: Change analysis server protocol to omit empty lists when optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify constructor invocations. Created 6 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/computer/computer_overrides.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/computer/computer_outline.dart
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index 8b55cd302b99bb8fa36b1f473ed8a6ff9917a8c3..8a9f8a7b59294bf7c597f036f821bcdb99c08653 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -164,8 +164,7 @@ class DartUnitOutlineComputer {
isAbstract: classDeclaration.isAbstract),
location: _getLocationNode(nameNode));
return new Outline(element, sourceRegion.offset,
- sourceRegion.length,
- children: classContents.isNotEmpty ? classContents : null);
+ sourceRegion.length, children: classContents);
}
Outline _newClassTypeAlias(ClassTypeAlias alias) {
@@ -204,7 +203,7 @@ class DartUnitOutlineComputer {
parameters: parametersStr);
List<Outline> contents = _addLocalFunctionOutlines(constructor.body);
Outline outline = new Outline(element, sourceRegion.offset,
- sourceRegion.length, children: contents.isNotEmpty ? contents : null);
+ sourceRegion.length, children: contents);
return outline;
}
@@ -232,7 +231,7 @@ class DartUnitOutlineComputer {
returnType: returnTypeStr);
List<Outline> contents = _addLocalFunctionOutlines(functionExpression.body);
Outline outline = new Outline(element, sourceRegion.offset,
- sourceRegion.length, children: contents.isNotEmpty ? contents : null);
+ sourceRegion.length, children: contents);
return outline;
}
@@ -276,7 +275,7 @@ class DartUnitOutlineComputer {
parameters: parametersStr, returnType: returnTypeStr);
List<Outline> contents = _addLocalFunctionOutlines(method.body);
Outline outline = new Outline(element, sourceRegion.offset,
- sourceRegion.length, children: contents.isNotEmpty ? contents : null);
+ sourceRegion.length, children: contents);
return outline;
}
@@ -284,7 +283,7 @@ class DartUnitOutlineComputer {
Element element = new Element(ElementKind.COMPILATION_UNIT, '<unit>',
Element.makeFlags(), location: _getLocationNode(_unit));
return new Outline(element, _unit.offset, _unit.length,
- children: unitContents.isNotEmpty ? unitContents : null);
+ children: unitContents);
}
Outline _newVariableOutline(String typeName, ElementKind kind,
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/computer/computer_overrides.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698