| Index: pkg/analysis_server/lib/src/search/type_hierarchy.dart
|
| diff --git a/pkg/analysis_server/lib/src/search/type_hierarchy.dart b/pkg/analysis_server/lib/src/search/type_hierarchy.dart
|
| index 949cd204925ae1d64f6637d1237a373a505fdc64..c0c38ed1f638f1ef0c7bc0ac146dcb3a86aa46c7 100644
|
| --- a/pkg/analysis_server/lib/src/search/type_hierarchy.dart
|
| +++ b/pkg/analysis_server/lib/src/search/type_hierarchy.dart
|
| @@ -7,8 +7,8 @@ library analysis.type_hierarhy;
|
| import 'dart:async';
|
| import 'dart:collection';
|
|
|
| -import 'package:analysis_server/src/protocol_server.dart' show
|
| - TypeHierarchyItem, newElement_fromEngine;
|
| +import 'package:analysis_server/src/protocol_server.dart'
|
| + show TypeHierarchyItem, newElement_fromEngine;
|
| import 'package:analysis_server/src/services/search/hierarchy.dart';
|
| import 'package:analysis_server/src/services/search/search_engine.dart';
|
| import 'package:analyzer/src/generated/element.dart';
|
| @@ -56,8 +56,8 @@ class TypeHierarchyComputer {
|
| return new Future.value(null);
|
| }
|
|
|
| - Future _createSubclasses(TypeHierarchyItem item, int itemId,
|
| - InterfaceType type) {
|
| + Future _createSubclasses(
|
| + TypeHierarchyItem item, int itemId, InterfaceType type) {
|
| var future = getDirectSubClasses(_searchEngine, type.element);
|
| return future.then((Set<ClassElement> subElements) {
|
| List<int> subItemIds = <int>[];
|
| @@ -71,11 +71,10 @@ class TypeHierarchyComputer {
|
| }
|
| // create a subclass item
|
| ExecutableElement subMemberElement = _findMemberElement(subElement);
|
| - subItem = new TypeHierarchyItem(
|
| - newElement_fromEngine(subElement),
|
| - memberElement: subMemberElement != null ?
|
| - newElement_fromEngine(subMemberElement) :
|
| - null,
|
| + subItem = new TypeHierarchyItem(newElement_fromEngine(subElement),
|
| + memberElement: subMemberElement != null
|
| + ? newElement_fromEngine(subMemberElement)
|
| + : null,
|
| superclass: itemId);
|
| int subItemId = _items.length;
|
| // remember
|
| @@ -111,12 +110,11 @@ class TypeHierarchyComputer {
|
| }
|
| ClassElement classElement = type.element;
|
| ExecutableElement memberElement = _findMemberElement(classElement);
|
| - item = new TypeHierarchyItem(
|
| - newElement_fromEngine(classElement),
|
| + item = new TypeHierarchyItem(newElement_fromEngine(classElement),
|
| displayName: displayName,
|
| - memberElement: memberElement != null ?
|
| - newElement_fromEngine(memberElement) :
|
| - null);
|
| + memberElement: memberElement != null
|
| + ? newElement_fromEngine(memberElement)
|
| + : null);
|
| _elementItemMap[classElement] = item;
|
| itemId = _items.length;
|
| _items.add(item);
|
|
|