diff --git a/lib/src/model.dart b/lib/src/model.dart
index b70d0b945d..899934ff48 100644
--- a/lib/src/model.dart
+++ b/lib/src/model.dart
@@ -2289,6 +2289,15 @@ abstract class ModelElement extends Nameable
return "(${p.toUri(sourceFileName)})";
}
+ /// Returns a link to extended documentation, or the empty string if that
+ /// does not exist.
+ String get extendedDocLink {
+ if (hasExtendedDocumentation) {
+ return '[...]';
+ }
+ return '';
+ }
+
/// Returns the fully qualified name.
///
/// For example: libraryName.className.methodName
@@ -2415,7 +2424,8 @@ abstract class ModelElement extends Nameable
String get genericParameters => '';
@override
- String get oneLineDoc => _documentation.asOneLiner;
+ String get oneLineDoc =>
+ '${_documentation.asOneLiner}${extendedDocLink.isEmpty ? "" : " $extendedDocLink"}';
ModelElement get overriddenElement => null;
diff --git a/test/model_test.dart b/test/model_test.dart
index 1c4a172bec..e6b9be6f5b 100644
--- a/test/model_test.dart
+++ b/test/model_test.dart
@@ -207,7 +207,7 @@ void main() {
expect(
fakeLibrary.oneLineDoc,
equals(
- 'WOW FAKE PACKAGE IS BEST PACKAGE'));
+ 'WOW FAKE PACKAGE IS BEST PACKAGE [...]'));
});
test('has properties', () {
@@ -504,7 +504,7 @@ void main() {
expect(
add.oneLineDoc,
equals(
- 'Adds value
to the end of this list,\nextending the length by one.'));
+ 'Adds value
to the end of this list,\nextending the length by one. [...]'));
});
test(
diff --git a/testing/test_package_docs/ex/Apple-class.html b/testing/test_package_docs/ex/Apple-class.html
index 39453f50bd..81e2024800 100644
--- a/testing/test_package_docs/ex/Apple-class.html
+++ b/testing/test_package_docs/ex/Apple-class.html
@@ -166,7 +166,7 @@
Properties
- The getter for s
+ The getter for s
[...]
read / write
@@ -206,7 +206,7 @@ Methods
- This is a method.
+ This is a method. [...]
diff --git a/testing/test_package_docs/ex/B-class.html b/testing/test_package_docs/ex/B-class.html
index 14d9355a2e..26ffb43f76 100644
--- a/testing/test_package_docs/ex/B-class.html
+++ b/testing/test_package_docs/ex/B-class.html
@@ -240,7 +240,7 @@ Methods
- This is a method.
+ This is a method. [...]
diff --git a/testing/test_package_docs/ex/Dog-class.html b/testing/test_package_docs/ex/Dog-class.html
index 9ea3f91cc6..f1d038d0a6 100644
--- a/testing/test_package_docs/ex/Dog-class.html
+++ b/testing/test_package_docs/ex/Dog-class.html
@@ -313,7 +313,7 @@ Methods
- Macro method
+ Macro method [...]
diff --git a/testing/test_package_docs/ex/F-class.html b/testing/test_package_docs/ex/F-class.html
index 92867fa6f8..98ba68b23a 100644
--- a/testing/test_package_docs/ex/F-class.html
+++ b/testing/test_package_docs/ex/F-class.html
@@ -327,7 +327,7 @@ Methods
- Macro method
+ Macro method [...]
inherited
diff --git a/testing/test_package_docs/ex/ex-library.html b/testing/test_package_docs/ex/ex-library.html
index fd47c65904..359427be50 100644
--- a/testing/test_package_docs/ex/ex-library.html
+++ b/testing/test_package_docs/ex/ex-library.html
@@ -67,7 +67,7 @@ Classes
Apple
- Sample class String
+ Sample class String
[...]
aThingToDo
@@ -79,7 +79,7 @@ Classes
B
- Extends class Apple, use new Apple or new Apple.fromString
+ Extends class Apple, use new Apple or new Apple.fromString [...]
Cat
@@ -115,7 +115,7 @@ Classes
Dog
- implements Cat, E
+ implements Cat, E [...]
E
@@ -171,7 +171,7 @@ Classes
ShapeType
- Foo bar.
+ Foo bar. [...]
SpecializedDuration
diff --git a/testing/test_package_docs/fake/BaseForDocComments-class.html b/testing/test_package_docs/fake/BaseForDocComments-class.html
index 3fd7458492..13d917488f 100644
--- a/testing/test_package_docs/fake/BaseForDocComments-class.html
+++ b/testing/test_package_docs/fake/BaseForDocComments-class.html
@@ -186,7 +186,7 @@ Methods
- Takes a value
and returns a String.
+ Takes a value
and returns a String. [...]
diff --git a/testing/test_package_docs/fake/LongFirstLine-class.html b/testing/test_package_docs/fake/LongFirstLine-class.html
index 753357fe3a..2e40138e1e 100644
--- a/testing/test_package_docs/fake/LongFirstLine-class.html
+++ b/testing/test_package_docs/fake/LongFirstLine-class.html
@@ -174,7 +174,7 @@ Constructors
LongFirstLine.fromMap(Map data)
- Named constructors are awesome.
+ Named constructors are awesome. [...]
@@ -282,7 +282,7 @@ Methods
- In the super class.
+ In the super class. [...]
inherited
@@ -390,7 +390,7 @@ Static Methods
- Just a static method with no parameters.
+ Just a static method with no parameters. [...]
diff --git a/testing/test_package_docs/fake/SubForDocComments-class.html b/testing/test_package_docs/fake/SubForDocComments-class.html
index 8aface88da..4f016f30a7 100644
--- a/testing/test_package_docs/fake/SubForDocComments-class.html
+++ b/testing/test_package_docs/fake/SubForDocComments-class.html
@@ -200,7 +200,7 @@ Methods
- Takes a value
and returns a String.
+ Takes a value
and returns a String. [...]
inherited
diff --git a/testing/test_package_docs/fake/SuperAwesomeClass-class.html b/testing/test_package_docs/fake/SuperAwesomeClass-class.html
index 5b7ccc3ecd..654a2625cd 100644
--- a/testing/test_package_docs/fake/SuperAwesomeClass-class.html
+++ b/testing/test_package_docs/fake/SuperAwesomeClass-class.html
@@ -193,7 +193,7 @@ Methods
- In the super class.
+ In the super class. [...]
diff --git a/testing/test_package_docs/fake/WithGetterAndSetter-class.html b/testing/test_package_docs/fake/WithGetterAndSetter-class.html
index 48ee2a877d..cce530fe32 100644
--- a/testing/test_package_docs/fake/WithGetterAndSetter-class.html
+++ b/testing/test_package_docs/fake/WithGetterAndSetter-class.html
@@ -158,7 +158,7 @@ Properties
- Returns a length.
+ Returns a length. [...]
read / write
diff --git a/testing/test_package_docs/fake/fake-library.html b/testing/test_package_docs/fake/fake-library.html
index dbc0e918ea..eff709ce89 100644
--- a/testing/test_package_docs/fake/fake-library.html
+++ b/testing/test_package_docs/fake/fake-library.html
@@ -110,7 +110,7 @@ Classes
ConstantClass
- For make-better testing of constants.
+ For make-better testing of constants. [...]
Cool
@@ -160,7 +160,7 @@ Classes
This is a very long line spread
-across... wait for it... two physical lines.
+across... wait for it... two physical lines. [...]
MixMeIn
@@ -326,7 +326,7 @@ Constants
→ String
- Up is a direction.
+ Up is a direction. [...]
'up'
@@ -399,7 +399,7 @@
Properties
- The getter for setAndGet.
+ The getter for setAndGet. [...]
read / write
@@ -442,7 +442,7 @@ Functions
- This function has two parameters that are functions.
+ This function has two parameters that are functions. [...]
@@ -496,7 +496,7 @@ Functions
- Testing NAME_WITH_TWO_UNDERSCORES should not be italicized.
+ Testing NAME_WITH_TWO_UNDERSCORES should not be italicized. [...]
@@ -533,7 +533,7 @@ Functions
- Top-level function 3 params and 1 optional positional param.
+ Top-level function 3 params and 1 optional positional param. [...]
diff --git a/testing/test_package_docs/index.html b/testing/test_package_docs/index.html
index ae72e008fc..7d01c26f1a 100644
--- a/testing/test_package_docs/index.html
+++ b/testing/test_package_docs/index.html
@@ -93,7 +93,7 @@
Libraries
void main() {
// in Dart!
}
-
+
[...]
css
@@ -112,7 +112,7 @@ Libraries
fake
- WOW FAKE PACKAGE IS BEST PACKAGE
+ WOW FAKE PACKAGE IS BEST PACKAGE [...]
is_deprecated
diff --git a/testing/test_package_docs/two_exports/BaseClass-class.html b/testing/test_package_docs/two_exports/BaseClass-class.html
index 8d1c8a858e..129ce0f8a6 100644
--- a/testing/test_package_docs/two_exports/BaseClass-class.html
+++ b/testing/test_package_docs/two_exports/BaseClass-class.html
@@ -105,7 +105,7 @@ Properties
- Returns a length.
+ Returns a length. [...]
read / write, inherited
diff --git a/testing/test_package_docs/two_exports/ExtendingClass-class.html b/testing/test_package_docs/two_exports/ExtendingClass-class.html
index 1709124b66..8fdf466d3f 100644
--- a/testing/test_package_docs/two_exports/ExtendingClass-class.html
+++ b/testing/test_package_docs/two_exports/ExtendingClass-class.html
@@ -107,7 +107,7 @@ Properties
- Returns a length.
+ Returns a length. [...]
read / write, inherited
diff --git a/testing/test_package_docs/two_exports/two_exports-library.html b/testing/test_package_docs/two_exports/two_exports-library.html
index a9d9ec17d2..d06459f8b8 100644
--- a/testing/test_package_docs/two_exports/two_exports-library.html
+++ b/testing/test_package_docs/two_exports/two_exports-library.html
@@ -70,7 +70,7 @@ Classes
ExtendingClass
- Extending class extends BaseClass.
+ Extending class extends BaseClass. [...]