Skip to content

Commit 6db39f7

Browse files
authored
Wrap comments to 80 chars in model_element.dart (dart-lang#2725)
1 parent 6994256 commit 6db39f7

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

lib/src/model/model_element.dart

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,31 +73,33 @@ ModelElement resolveMultiplyInheritedElement(
7373
}
7474

7575
/// This class is the foundation of Dartdoc's model for source code.
76+
///
7677
/// All ModelElements are contained within a [PackageGraph], and laid out in a
7778
/// structure that mirrors the availability of identifiers in the various
78-
/// namespaces within that package. For example, multiple [Class] objects
79-
/// for a particular identifier ([ModelElement.element]) may show up in
80-
/// different [Library]s as the identifier is reexported.
79+
/// namespaces within that package. For example, multiple [Class] objects for a
80+
/// particular identifier ([ModelElement.element]) may show up in different
81+
/// [Library]s as the identifier is reexported.
8182
///
8283
/// However, ModelElements have an additional concept vital to generating
8384
/// documentation: canonicalization.
8485
///
8586
/// A ModelElement is canonical if it is the element in the namespace where that
86-
/// element 'comes from' in the public interface to this [PackageGraph]. That often
87-
/// means the [ModelElement.library] is contained in [PackageGraph.libraries], but
88-
/// there are many exceptions and ambiguities the code tries to address here.
87+
/// element 'comes from' in the public interface to this [PackageGraph]. That
88+
/// often means the [ModelElement.library] is contained in
89+
/// [PackageGraph.libraries], but there are many exceptions and ambiguities the
90+
/// code tries to address here.
8991
///
9092
/// Non-canonical elements should refer to their canonical counterparts, making
91-
/// it easy to calculate links via [ModelElement.href] without having to
92-
/// know in a particular namespace which elements are canonical or not.
93-
/// A number of [PackageGraph] methods, such as [PackageGraph.findCanonicalModelElementFor]
93+
/// it easy to calculate links via [ModelElement.href] without having to know in
94+
/// a particular namespace which elements are canonical or not. A number of
95+
/// [PackageGraph] methods, such as [PackageGraph.findCanonicalModelElementFor]
9496
/// can help with this.
9597
///
9698
/// When documenting, Dartdoc should only write out files corresponding to
9799
/// canonical instances of ModelElement ([ModelElement.isCanonical]). This
98100
/// helps prevent subtle bugs as generated output for a non-canonical
99-
/// ModelElement will reference itself as part of the "wrong" [Library]
100-
/// from the public interface perspective.
101+
/// ModelElement will reference itself as part of the "wrong" [Library] from the
102+
/// public interface perspective.
101103
abstract class ModelElement extends Canonicalization
102104
with
103105
CommentReferable,
@@ -628,8 +630,9 @@ abstract class ModelElement extends Canonicalization
628630
if ((this as Inheritable).isInherited &&
629631
_canonicalLibrary == null &&
630632
packageGraph.publicLibraries.contains(library)) {
631-
// In the event we've inherited a field from an object that isn't directly reexported,
632-
// we may need to pretend we are canonical for this.
633+
// In the event we've inherited a field from an object that isn't
634+
// directly reexported, we may need to pretend we are canonical for
635+
// this.
633636
_canonicalLibrary = library;
634637
}
635638
}
@@ -939,8 +942,8 @@ abstract class ModelElement extends Canonicalization
939942

940943
List<Parameter> _allParameters;
941944

942-
// TODO(jcollins-g): This is in the wrong place. Move parts to GetterSetterCombo,
943-
// elsewhere as appropriate?
945+
// TODO(jcollins-g): This is in the wrong place. Move parts to
946+
// [GetterSetterCombo], elsewhere as appropriate?
944947
List<Parameter> get allParameters {
945948
if (_allParameters == null) {
946949
var recursedParameters = <Parameter>{};
@@ -977,7 +980,8 @@ abstract class ModelElement extends Canonicalization
977980

978981
List<Parameter> get parameters {
979982
if (!isCallable) {
980-
throw StateError('$element cannot have parameters');
983+
throw StateError(
984+
'$element (${element.runtimeType}) cannot have parameters');
981985
}
982986

983987
if (_parameters == null) {

0 commit comments

Comments
 (0)