diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html index ab38556b71a..a3f8ce1bef0 100644 --- a/pkg/analysis_server/doc/api.html +++ b/pkg/analysis_server/doc/api.html @@ -3713,7 +3713,7 @@ a:focus, a:hover { An enumeration of the kinds of elements.
-A description of an executable file.
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart index aebb4165298..0315200e687 100644 --- a/pkg/analysis_server/lib/src/computer/computer_outline.dart +++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart @@ -42,6 +42,9 @@ class DartUnitOutlineComputer { constantOutlines.add(_newEnumConstant(constant)); } unitContents.add(_newEnumOutline(enumDeclaration, constantOutlines)); + } else if (unitMember is ExtensionDeclaration) { + unitContents.add(_newExtensionOutline( + unitMember, _outlinesForMembers(unitMember.members))); } else if (unitMember is TopLevelVariableDeclaration) { TopLevelVariableDeclaration fieldDeclaration = unitMember; VariableDeclarationList fields = fieldDeclaration.variables; @@ -92,7 +95,6 @@ class DartUnitOutlineComputer { } Outline _newClassOutline(ClassDeclaration node, List
The absolute, normalized path of a file.
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
index 82891af510b..75ea6641a52 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
@@ -1903,6 +1903,7 @@ class Element implements HasToJson {
* CONSTRUCTOR_INVOCATION
* ENUM
* ENUM_CONSTANT
+ * EXTENSION
* FIELD
* FILE
* FUNCTION
@@ -1944,6 +1945,8 @@ class ElementKind implements Enum {
static const ElementKind ENUM_CONSTANT = const ElementKind._("ENUM_CONSTANT");
+ static const ElementKind EXTENSION = const ElementKind._("EXTENSION");
+
static const ElementKind FIELD = const ElementKind._("FIELD");
static const ElementKind FILE = const ElementKind._("FILE");
@@ -2000,6 +2003,7 @@ class ElementKind implements Enum {
CONSTRUCTOR_INVOCATION,
ENUM,
ENUM_CONSTANT,
+ EXTENSION,
FIELD,
FILE,
FUNCTION,
@@ -2042,6 +2046,8 @@ class ElementKind implements Enum {
return ENUM;
case "ENUM_CONSTANT":
return ENUM_CONSTANT;
+ case "EXTENSION":
+ return EXTENSION;
case "FIELD":
return FIELD;
case "FILE":
diff --git a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
index d7aeda74e09..58cb27cec7d 100644
--- a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
+++ b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
@@ -271,6 +271,7 @@ final Matcher isElement =
* CONSTRUCTOR_INVOCATION
* ENUM
* ENUM_CONSTANT
+ * EXTENSION
* FIELD
* FILE
* FUNCTION
@@ -300,6 +301,7 @@ final Matcher isElementKind = new MatchesEnum("ElementKind", [
"CONSTRUCTOR_INVOCATION",
"ENUM",
"ENUM_CONSTANT",
+ "EXTENSION",
"FIELD",
"FILE",
"FUNCTION",
diff --git a/pkg/analyzer_plugin/tool/spec/common_types_spec.html b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
index aac0a52a51f..812c4492390 100644
--- a/pkg/analyzer_plugin/tool/spec/common_types_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
@@ -530,6 +530,7 @@
CONSTRUCTOR_INVOCATIONENUMENUM_CONSTANTEXTENSIONFIELDFILEFUNCTION