Chromium Code Reviews| 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 6793753e24444d0bd580fd0358b870078b107bed..da43b614c8cbc4570a279a72660a5796b30e305c 100644 |
| --- a/pkg/analysis_server/lib/src/computer/computer_outline.dart |
| +++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart |
| @@ -4,6 +4,7 @@ |
| library computer.outline; |
| +import 'package:analysis_server/src/collections.dart'; |
| import 'package:analysis_server/src/protocol.dart'; |
| import 'package:analyzer/src/generated/ast.dart'; |
| import 'package:analyzer/src/generated/element.dart' as engine; |
| @@ -178,7 +179,7 @@ class DartUnitOutlineComputer { |
| element, |
| sourceRegion.offset, |
| sourceRegion.length, |
| - children: classContents.isEmpty ? null : classContents); |
| + children: nullIfEmpty(classContents)); |
|
scheglov
2014/10/06 17:53:35
Actually, we could probably change the Outline con
|
| } |
| Outline _newClassTypeAlias(ClassTypeAlias alias) { |
| @@ -226,7 +227,7 @@ class DartUnitOutlineComputer { |
| element, |
| sourceRegion.offset, |
| sourceRegion.length, |
| - children: contents.isEmpty ? null : contents); |
| + children: nullIfEmpty(contents)); |
| return outline; |
| } |
| @@ -262,7 +263,7 @@ class DartUnitOutlineComputer { |
| element, |
| sourceRegion.offset, |
| sourceRegion.length, |
| - children: contents.isEmpty ? null : contents); |
| + children: nullIfEmpty(contents)); |
| return outline; |
| } |
| @@ -318,7 +319,7 @@ class DartUnitOutlineComputer { |
| element, |
| sourceRegion.offset, |
| sourceRegion.length, |
| - children: contents.isEmpty ? null : contents); |
| + children: nullIfEmpty(contents)); |
| return outline; |
| } |
| @@ -332,7 +333,7 @@ class DartUnitOutlineComputer { |
| element, |
| _unit.offset, |
| _unit.length, |
| - children: unitContents.isEmpty ? null : unitContents); |
| + children: nullIfEmpty(unitContents)); |
| } |
| Outline _newVariableOutline(String typeName, ElementKind kind, |