Skip to content

Commit 2fccbca

Browse files
committed
Merge pull request #1055 from keertip/ver
change version to dev
2 parents 2531e44 + e48e201 commit 2fccbca

File tree

268 files changed

+338
-323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+338
-323
lines changed

lib/dartdoc.dart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export 'src/package_meta.dart';
3939

4040
const String name = 'dartdoc';
4141
// Update when pubspec version changes.
42-
const String version = '0.8.3';
42+
const String version = '0.8.4-dev';
4343

4444
final String defaultOutDir = p.join('doc', 'api');
4545

@@ -192,10 +192,13 @@ class DartDoc {
192192
errorInfos.add(context.getErrors(source));
193193
}
194194

195-
List<_Error> errors = errorInfos.expand((AnalysisErrorInfo info) {
196-
return info.errors.map(
197-
(error) => new _Error(error, info.lineInfo, packageMeta.dir.path));
198-
}).where((_Error error) => error.isError).toList()..sort();
195+
List<_Error> errors = errorInfos
196+
.expand((AnalysisErrorInfo info) {
197+
return info.errors.map((error) =>
198+
new _Error(error, info.lineInfo, packageMeta.dir.path));
199+
})
200+
.where((_Error error) => error.isError)
201+
.toList()..sort();
199202

200203
double seconds = _stopwatch.elapsedMilliseconds / 1000.0;
201204
print("Parsed ${libraries.length} "

lib/src/element_type.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class ElementType {
2929
DartType get _returnTypeCore => (_type as FunctionType).returnType;
3030

3131
// TODO: this is probably a bug. Apparently, EVERYTHING is a parameterized type?
32-
bool get isParameterizedType => (_type is ParameterizedType) &&
32+
bool get isParameterizedType =>
33+
(_type is ParameterizedType) &&
3334
(_type as ParameterizedType).typeArguments.isNotEmpty;
3435

3536
String get _returnTypeName => _returnTypeCore.name;

lib/src/html/html_generator.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class HtmlGenerator extends Generator {
6767

6868
Future generate(Package package, Directory out) {
6969
return new HtmlGeneratorInstance(_toolVersion, _url, _templates, package,
70-
out, _onFileCreated, _relCanonicalPrefix).generate();
70+
out, _onFileCreated, _relCanonicalPrefix)
71+
.generate();
7172
}
7273
}

lib/src/html/template_data.dart

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ abstract class TemplateData<T extends Documentable> {
5050
Iterable<Subnav> getSubNavItems() => const Iterable<Subnav>.empty();
5151

5252
String _layoutTitle(String name, String kind, bool isDeprecated) {
53-
if (kind.isEmpty) kind =
54-
'&nbsp;'; // Ugly. fixes https://github.com/dart-lang/dartdoc/issues/695
53+
if (kind.isEmpty)
54+
kind =
55+
'&nbsp;'; // Ugly. fixes https://github.com/dart-lang/dartdoc/issues/695
5556
String str = '<span class="kind">$kind</span>';
5657
if (!isDeprecated) return '${str} ${name}';
5758
return '${str} <span class="deprecated">$name</span>';
@@ -97,19 +98,19 @@ class LibraryTemplateData extends TemplateData<Library> {
9798
'${library.name} library API docs, for the Dart programming language.';
9899
List get navLinks => [package];
99100
Iterable<Subnav> getSubNavItems() sync* {
100-
if (library.hasConstants) yield new Subnav(
101-
'Constants', '${library.href}#constants');
102-
if (library.hasTypedefs) yield new Subnav(
103-
'Typedefs', '${library.href}#typedefs');
104-
if (library.hasProperties) yield new Subnav(
105-
'Properties', '${library.href}#properties');
106-
if (library.hasFunctions) yield new Subnav(
107-
'Functions', '${library.href}#functions');
101+
if (library.hasConstants)
102+
yield new Subnav('Constants', '${library.href}#constants');
103+
if (library.hasTypedefs)
104+
yield new Subnav('Typedefs', '${library.href}#typedefs');
105+
if (library.hasProperties)
106+
yield new Subnav('Properties', '${library.href}#properties');
107+
if (library.hasFunctions)
108+
yield new Subnav('Functions', '${library.href}#functions');
108109
if (library.hasEnums) yield new Subnav('Enums', '${library.href}#enums');
109-
if (library.hasClasses) yield new Subnav(
110-
'Classes', '${library.href}#classes');
111-
if (library.hasExceptions) yield new Subnav(
112-
'Exceptions', '${library.href}#exceptions');
110+
if (library.hasClasses)
111+
yield new Subnav('Classes', '${library.href}#classes');
112+
if (library.hasExceptions)
113+
yield new Subnav('Exceptions', '${library.href}#exceptions');
113114
}
114115

115116
String get layoutTitle =>
@@ -140,20 +141,20 @@ class ClassTemplateData extends TemplateData<Class> {
140141
List get navLinks => [package, library];
141142
String get htmlBase => '..';
142143
Iterable<Subnav> getSubNavItems() sync* {
143-
if (clazz.hasConstants) yield new Subnav(
144-
'Constants', '${clazz.href}#constants');
145-
if (clazz.hasStaticProperties) yield new Subnav(
146-
'Static Properties', '${clazz.href}#static-properties');
147-
if (clazz.hasStaticMethods) yield new Subnav(
148-
'Static Methods', '${clazz.href}#static-methods');
149-
if (clazz.hasInstanceProperties) yield new Subnav(
150-
'Properties', '${clazz.href}#instance-properties');
151-
if (clazz.hasConstructors) yield new Subnav(
152-
'Constructors', '${clazz.href}#constructors');
153-
if (clazz.hasOperators) yield new Subnav(
154-
'Operators', '${clazz.href}#operators');
155-
if (clazz.hasInstanceMethods) yield new Subnav(
156-
'Methods', '${clazz.href}#instance-methods');
144+
if (clazz.hasConstants)
145+
yield new Subnav('Constants', '${clazz.href}#constants');
146+
if (clazz.hasStaticProperties)
147+
yield new Subnav('Static Properties', '${clazz.href}#static-properties');
148+
if (clazz.hasStaticMethods)
149+
yield new Subnav('Static Methods', '${clazz.href}#static-methods');
150+
if (clazz.hasInstanceProperties)
151+
yield new Subnav('Properties', '${clazz.href}#instance-properties');
152+
if (clazz.hasConstructors)
153+
yield new Subnav('Constructors', '${clazz.href}#constructors');
154+
if (clazz.hasOperators)
155+
yield new Subnav('Operators', '${clazz.href}#operators');
156+
if (clazz.hasInstanceMethods)
157+
yield new Subnav('Methods', '${clazz.href}#instance-methods');
157158
}
158159

159160
Class get objectType {

lib/src/model.dart

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@ class Package implements Nameable, Documentable {
545545

546546
Library lib = elementLibaryMap['${e.kind}.${e.name}'];
547547
if (lib != null) return lib;
548-
lib = libraries.firstWhere((l) => l.hasInExportedNamespace(e),
549-
orElse: () {});
548+
lib =
549+
libraries.firstWhere((l) => l.hasInExportedNamespace(e), orElse: () {});
550550
if (lib != null) {
551551
elementLibaryMap.putIfAbsent('${e.kind}.${e.name}', () => lib);
552552
return lib;
@@ -820,16 +820,20 @@ class Class extends ModelElement implements EnclosedElement {
820820
Package p = library.package;
821821
_modelType = new ElementType(_cls.type, this);
822822

823-
_mixins = _cls.mixins.map((f) {
824-
Library lib = new Library(f.element.library, p);
825-
ElementType t = new ElementType(f, new ModelElement.from(f.element, lib));
826-
bool exclude = t.element.element.isPrivate;
827-
if (exclude) {
828-
return null;
829-
} else {
830-
return t;
831-
}
832-
}).where((mixin) => mixin != null).toList(growable: false);
823+
_mixins = _cls.mixins
824+
.map((f) {
825+
Library lib = new Library(f.element.library, p);
826+
ElementType t =
827+
new ElementType(f, new ModelElement.from(f.element, lib));
828+
bool exclude = t.element.element.isPrivate;
829+
if (exclude) {
830+
return null;
831+
} else {
832+
return t;
833+
}
834+
})
835+
.where((mixin) => mixin != null)
836+
.toList(growable: false);
833837

834838
if (_cls.supertype != null && _cls.supertype.element.supertype != null) {
835839
Library lib = package._getLibraryFor(_cls.supertype.element);
@@ -850,16 +854,19 @@ class Class extends ModelElement implements EnclosedElement {
850854
}
851855
}
852856

853-
_interfaces = _cls.interfaces.map((f) {
854-
var lib = new Library(f.element.library, p);
855-
var t = new ElementType(f, new ModelElement.from(f.element, lib));
856-
var exclude = t.element.element.isPrivate;
857-
if (exclude) {
858-
return null;
859-
} else {
860-
return t;
861-
}
862-
}).where((it) => it != null).toList(growable: false);
857+
_interfaces = _cls.interfaces
858+
.map((f) {
859+
var lib = new Library(f.element.library, p);
860+
var t = new ElementType(f, new ModelElement.from(f.element, lib));
861+
var exclude = t.element.element.isPrivate;
862+
if (exclude) {
863+
return null;
864+
} else {
865+
return t;
866+
}
867+
})
868+
.where((it) => it != null)
869+
.toList(growable: false);
863870
}
864871

865872
/// Returns the library that encloses this element.
@@ -889,7 +896,8 @@ class Class extends ModelElement implements EnclosedElement {
889896

890897
bool get hasSupertype => supertype != null;
891898

892-
bool get hasModifiers => hasMixins ||
899+
bool get hasModifiers =>
900+
hasMixins ||
893901
hasAnnotations ||
894902
hasInterfaces ||
895903
hasSupertype ||
@@ -1283,7 +1291,8 @@ class Class extends ModelElement implements EnclosedElement {
12831291
return _cls.allSupertypes.any(_doCheck);
12841292
}
12851293

1286-
bool operator ==(o) => o is Class &&
1294+
bool operator ==(o) =>
1295+
o is Class &&
12871296
name == o.name &&
12881297
o.library.name == library.name &&
12891298
o.library.package.name == library.package.name;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dartdoc
22
# Also update the `version` field in lib/dartdoc.dart.
3-
version: 0.8.3-dev
3+
version: 0.8.4-dev
44
author: Dart Team <[email protected]>
55
description: A documentation generator for Dart.
66
homepage: https://github.com/dart-lang/dartdoc

test_package_docs/anonymous_library/anonymous_library-library.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<meta name="generator" content="made with love by dartdoc 0.8.3">
7+
<meta name="generator" content="made with love by dartdoc 0.8.4-dev">
88
<title>anonymous_library library - Dart API</title>
99
<!-- required because all the links are pseudo-absolute -->
1010
<base href="..">

test_package_docs/anonymous_library/doesStuff.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<meta name="generator" content="made with love by dartdoc 0.8.3">
7+
<meta name="generator" content="made with love by dartdoc 0.8.4-dev">
88
<title>doesStuff function - anonymous_library library - Dart API</title>
99
<!-- required because all the links are pseudo-absolute -->
1010
<base href="..">

test_package_docs/another_anonymous_lib/another_anonymous_lib-library.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<meta name="generator" content="made with love by dartdoc 0.8.3">
7+
<meta name="generator" content="made with love by dartdoc 0.8.4-dev">
88
<title>another_anonymous_lib library - Dart API</title>
99
<!-- required because all the links are pseudo-absolute -->
1010
<base href="..">

test_package_docs/another_anonymous_lib/greeting.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<meta name="generator" content="made with love by dartdoc 0.8.3">
7+
<meta name="generator" content="made with love by dartdoc 0.8.4-dev">
88
<title>greeting function - another_anonymous_lib library - Dart API</title>
99
<!-- required because all the links are pseudo-absolute -->
1010
<base href="..">

0 commit comments

Comments
 (0)