mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 15:01:30 +00:00
Regen the analysis server spec to include the diagnostic domain.
BUG= R=pquitslund@google.com Review URL: https://codereview.chromium.org/2521433002 .
This commit is contained in:
parent
f16a0a2a4d
commit
c4bcfb5a02
3 changed files with 30 additions and 16 deletions
|
@ -95,9 +95,6 @@ a:focus, a:hover {
|
|||
|
||||
/* Styles for index */
|
||||
|
||||
.subindex {
|
||||
}
|
||||
|
||||
.subindex ul {
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
|
@ -233,11 +230,12 @@ a:focus, a:hover {
|
|||
<ul>
|
||||
<li><a href="#domain_server">Server</a></li>
|
||||
<li><a href="#domain_analysis">Analysis</a></li>
|
||||
<li><a href="#domain_completion">Code Completion</a></li>
|
||||
<li><a href="#domain_completion">Completion</a></li>
|
||||
<li><a href="#domain_search">Search</a></li>
|
||||
<li><a href="#domain_edit">Edit</a></li>
|
||||
<li><a href="#domain_execution">Execution</a></li>
|
||||
</ul>
|
||||
<li><a href="#domain_diagnostic">Diagnostic</a></li>
|
||||
</ul>
|
||||
<p>
|
||||
The specifications of the API’s refer to data structures beyond
|
||||
the standard JSON primitives. These data structures are
|
||||
|
|
|
@ -125,14 +125,7 @@
|
|||
For convenience, the API is divided into domains. Each domain is
|
||||
specified in a separate section below:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="#domain_server">Server</a></li>
|
||||
<li><a href="#domain_analysis">Analysis</a></li>
|
||||
<li><a href="#domain_completion">Code Completion</a></li>
|
||||
<li><a href="#domain_search">Search</a></li>
|
||||
<li><a href="#domain_edit">Edit</a></li>
|
||||
<li><a href="#domain_execution">Execution</a></li>
|
||||
</ul>
|
||||
<toc></toc>
|
||||
<p>
|
||||
The specifications of the API’s refer to data structures beyond
|
||||
the standard JSON primitives. These data structures are
|
||||
|
|
|
@ -116,9 +116,6 @@ a:focus, a:hover {
|
|||
|
||||
/* Styles for index */
|
||||
|
||||
.subindex {
|
||||
}
|
||||
|
||||
.subindex ul {
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
|
@ -196,6 +193,7 @@ abstract class HtmlMixin {
|
|||
void head(void callback()) => element('head', {}, callback);
|
||||
void html(void callback()) => element('html', {}, callback);
|
||||
void i(void callback()) => element('i', {}, callback);
|
||||
void li(void callback()) => element('li', {}, callback);
|
||||
void link(String id, void callback()) {
|
||||
element('a', {'href': '#$id'}, callback);
|
||||
}
|
||||
|
@ -204,6 +202,7 @@ abstract class HtmlMixin {
|
|||
void pre(void callback()) => element('pre', {}, callback);
|
||||
void title(void callback()) => element('title', {}, callback);
|
||||
void tt(void callback()) => element('tt', {}, callback);
|
||||
void ul(void callback()) => element('ul', {}, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -270,6 +269,22 @@ class ToHtmlVisitor extends HierarchicalApiVisitor
|
|||
}
|
||||
}
|
||||
|
||||
void generateTableOfContents() {
|
||||
ul(() {
|
||||
writeln();
|
||||
|
||||
for (var domain in api.domains.where((domain) => !domain.experimental)) {
|
||||
write(' ');
|
||||
li(() {
|
||||
link('domain_${domain.name}', () {
|
||||
write(_toTitleCase(domain.name));
|
||||
});
|
||||
});
|
||||
writeln();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void generateIndex() {
|
||||
h3(() => write('Domains'));
|
||||
for (var domain in api.domains) {
|
||||
|
@ -425,6 +440,9 @@ class ToHtmlVisitor extends HierarchicalApiVisitor
|
|||
case 'version':
|
||||
translateHtml(node, squashParagraphs: squashParagraphs);
|
||||
break;
|
||||
case 'toc':
|
||||
generateTableOfContents();
|
||||
break;
|
||||
case 'index':
|
||||
generateIndex();
|
||||
break;
|
||||
|
@ -769,3 +787,8 @@ class TypeVisitor extends HierarchicalApiVisitor
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
String _toTitleCase(String str) {
|
||||
if (str.isEmpty) return str;
|
||||
return str.substring(0, 1).toUpperCase() + str.substring(1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue