Skip to content

Commit 1f1e157

Browse files
committed
Merge branch 'master' into move_files
2 parents 6be14ce + 76f5b7c commit 1f1e157

File tree

6 files changed

+19
-33
lines changed

6 files changed

+19
-33
lines changed

README.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@
44

55
Use `dartdoc` to generate HTML documentaton for your Dart package.
66

7-
If you want to _contribute_ to the dartdoc project, see the
8-
[contributor docs][]. This page contains information about _using_ the dartdoc
9-
tool.
7+
For informtion about contributing to the dartdoc project, see the [contributor docs][].
108

119
## Installing dartdoc
1210

1311
### From the Dart SDK
1412

15-
[Download the Dart SDK](https://www.dartlang.org/downloads/), version
16-
1.12-dev.5.10 or later. If not already added, add the SDK's `bin` directory to
17-
your `PATH`.
13+
[Download the Dart SDK](https://www.dartlang.org/downloads/); if not already added,
14+
add the SDK's `bin` directory to your `PATH`.
1815

1916
### From pub.dartlang.org
2017

@@ -28,7 +25,7 @@ to the Dart SDK.
2825

2926
## Generating docs
3027

31-
Run `dartdoc` from the root directory of package. For example:
28+
Run `dartdoc` from the root directory of package. For example:
3229

3330
```
3431
$ dartdoc
@@ -96,18 +93,13 @@ File names are _case-sensitive_.
9693
Check out the
9794
[Effective Dart: Documentation guide](https://www.dartlang.org/effective-dart/documentation/).
9895

99-
The guide covers formatting, linking, markup, and general best practices
100-
when authoring doc comments for Dart with dartdoc.
96+
The guide covers formatting, linking, markup, and general best practices when
97+
authoring doc comments for Dart with `dartdoc`.
10198

10299
### Excluding from documentation
103100

104-
dartdoc will not generate documentation for a Dart element and its children that has
105-
the `<nodoc>` tag in the documentation comment.
106-
107-
## Older versions
108-
109-
As of Dart 1.12, `dartdoc` is shipped with the Dart SDK and replaces the
110-
older `docgen` tool.
101+
`dartdoc` will not generate documentation for a Dart element and its children that
102+
has the `<nodoc>` tag in the documentation comment.
111103

112104
## Issues and bugs
113105

example/dart_resource_loader.dart

Lines changed: 0 additions & 5 deletions
This file was deleted.

lib/src/element_type.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
library dartdoc.element_type;
77

88
import 'package:analyzer/dart/element/element.dart';
9-
import 'package:analyzer/src/generated/element.dart';
9+
import 'package:analyzer/dart/element/type.dart';
1010

1111
import 'model.dart';
1212

@@ -23,7 +23,7 @@ class ElementType {
2323

2424
bool get isParameterizedType {
2525
if (_type is FunctionType) {
26-
return (_type as FunctionType).boundTypeParameters.isNotEmpty;
26+
return (_type as FunctionType).typeFormals.isNotEmpty;
2727
} else if (_type is ParameterizedType) {
2828
return (_type as ParameterizedType).typeArguments.isNotEmpty;
2929
}
@@ -77,7 +77,7 @@ class ElementType {
7777
List<ElementType> get typeArguments {
7878
if (_type is FunctionType) {
7979
return (_type as FunctionType)
80-
.boundTypeParameters
80+
.typeFormals
8181
.map((f) => _getElementTypeFrom(f.type))
8282
.toList();
8383
} else {

lib/src/markdown_processor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ library dartdoc.markdown_processor;
99
import 'dart:convert';
1010

1111
import 'package:analyzer/dart/ast/ast.dart';
12-
import 'package:analyzer/src/generated/element.dart'
12+
import 'package:analyzer/dart/element/element.dart'
1313
show
1414
LibraryElement,
1515
Element,

lib/src/model.dart

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import 'dart:convert';
99

1010
import 'package:analyzer/dart/ast/ast.dart'
1111
show AnnotatedNode, Annotation, Declaration;
12-
import 'package:analyzer/src/generated/element.dart';
12+
import 'package:analyzer/dart/element/element.dart';
13+
import 'package:analyzer/dart/element/type.dart';
1314
import 'package:analyzer/src/generated/resolver.dart'
1415
show Namespace, NamespaceBuilder, InheritanceManager, MemberMap;
1516
import 'package:analyzer/src/generated/source_io.dart';
@@ -662,8 +663,7 @@ abstract class Documentable {
662663

663664
// TODO: how do we get rid of this class?
664665
class Dynamic extends ModelElement {
665-
Dynamic(DynamicElementImpl element, Library library)
666-
: super(element, library);
666+
Dynamic(Element element, Library library) : super(element, library);
667667

668668
ModelElement get enclosingElement => throw new UnsupportedError('');
669669

@@ -1221,7 +1221,7 @@ abstract class ModelElement implements Comparable, Nameable, Documentable {
12211221
ModelElement(this.element, this.library);
12221222

12231223
factory ModelElement.from(Element e, Library library) {
1224-
if (e is DynamicElementImpl) {
1224+
if (e.kind == ElementKind.DYNAMIC) {
12251225
return new Dynamic(e, library);
12261226
}
12271227
// Also handles enums
@@ -1940,9 +1940,7 @@ class TopLevelVariable extends ModelElement
19401940
}
19411941

19421942
String get constantValue {
1943-
var v = (_variable as ConstTopLevelVariableElementImpl)
1944-
.computeNode()
1945-
.toSource();
1943+
var v = _variable.computeNode().toSource();
19461944
if (v == null) return '';
19471945
var string = v.substring(v.indexOf('=') + 1, v.length).trim();
19481946
return string.replaceAll(modelType.name, modelType.linkedName);

lib/src/model_utils.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ library dartdoc.model_utils;
66

77
import 'dart:io';
88

9-
import 'package:analyzer/src/generated/element.dart';
9+
import 'package:analyzer/dart/element/element.dart';
10+
import 'package:analyzer/dart/element/type.dart';
1011
import 'package:analyzer/src/generated/engine.dart';
1112
import 'package:analyzer/src/generated/sdk.dart';
1213
import 'package:analyzer/src/generated/source_io.dart';

0 commit comments

Comments
 (0)