| Index: pkg/analysis_server/tool/spec/from_html.dart
|
| diff --git a/pkg/analysis_server/tool/spec/from_html.dart b/pkg/analysis_server/tool/spec/from_html.dart
|
| index b2caf4bd1b49c5b7004b7c1eb90b6c5d0051bb95..b4f3905e698a60263761015cf5fb654cb49460a4 100644
|
| --- a/pkg/analysis_server/tool/spec/from_html.dart
|
| +++ b/pkg/analysis_server/tool/spec/from_html.dart
|
| @@ -395,8 +395,9 @@ Request requestFromHtml(dom.Element html, String context) {
|
| String method = html.attributes['method'];
|
| context = '$context.${method != null ? method : 'method'}';
|
| checkAttributes(html, ['method'], context,
|
| - optionalAttributes: ['experimental']);
|
| + optionalAttributes: ['experimental', 'deprecated']);
|
| bool experimental = html.attributes['experimental'] == 'true';
|
| + bool deprecated = html.attributes['deprecated'] == 'true';
|
| TypeDecl params;
|
| TypeDecl result;
|
| recurse(html, context, {
|
| @@ -408,7 +409,7 @@ Request requestFromHtml(dom.Element html, String context) {
|
| }
|
| });
|
| return new Request(domainName, method, params, result, html,
|
| - experimental: experimental);
|
| + experimental: experimental, deprecated: deprecated);
|
| }
|
|
|
| /**
|
| @@ -427,10 +428,12 @@ TypeDefinition typeDefinitionFromHtml(dom.Element html) {
|
| String name = html.attributes['name'];
|
| String context = name != null ? name : 'type';
|
| checkAttributes(html, ['name'], context,
|
| - optionalAttributes: ['experimental']);
|
| + optionalAttributes: ['experimental', 'deprecated']);
|
| TypeDecl type = processContentsAsType(html, context);
|
| bool experimental = html.attributes['experimental'] == 'true';
|
| - return new TypeDefinition(name, type, html, experimental: experimental);
|
| + bool deprecated = html.attributes['deprecated'] == 'true';
|
| + return new TypeDefinition(name, type, html,
|
| + experimental: experimental, deprecated: deprecated);
|
| }
|
|
|
| /**
|
| @@ -461,7 +464,8 @@ TypeEnum typeEnumFromHtml(dom.Element html, String context) {
|
| */
|
| TypeEnumValue typeEnumValueFromHtml(dom.Element html, String context) {
|
| checkName(html, 'value', context);
|
| - checkAttributes(html, [], context);
|
| + checkAttributes(html, [], context, optionalAttributes: ['deprecated']);
|
| + bool deprecated = html.attributes['deprecated'] == 'true';
|
| List<String> values = <String>[];
|
| recurse(html, context, {
|
| 'code': (dom.Element child) {
|
| @@ -472,7 +476,7 @@ TypeEnumValue typeEnumValueFromHtml(dom.Element html, String context) {
|
| if (values.length != 1) {
|
| throw new Exception('$context: Exactly one value must be specified');
|
| }
|
| - return new TypeEnumValue(values[0], html);
|
| + return new TypeEnumValue(values[0], html, deprecated: deprecated);
|
| }
|
|
|
| /**
|
| @@ -495,7 +499,8 @@ TypeObjectField typeObjectFieldFromHtml(dom.Element html, String context) {
|
| String name = html.attributes['name'];
|
| context = '$context.${name != null ? name : 'field'}';
|
| checkAttributes(html, ['name'], context,
|
| - optionalAttributes: ['optional', 'value']);
|
| + optionalAttributes: ['optional', 'value', 'deprecated']);
|
| + bool deprecated = html.attributes['deprecated'] == 'true';
|
| bool optional = false;
|
| String optionalString = html.attributes['optional'];
|
| if (optionalString != null) {
|
| @@ -514,7 +519,7 @@ TypeObjectField typeObjectFieldFromHtml(dom.Element html, String context) {
|
| String value = html.attributes['value'];
|
| TypeDecl type = processContentsAsType(html, context);
|
| return new TypeObjectField(name, type, html,
|
| - optional: optional, value: value);
|
| + optional: optional, value: value, deprecated: deprecated);
|
| }
|
|
|
| /**
|
|
|