@@ -170,15 +170,14 @@ class PackageGraph with CommentReferable, Nameable {
170
170
e.canonicalModelElement == null ||
171
171
e is Library ||
172
172
e.enclosingElement! .isCanonical) {
173
- for (var d in e.documentationFrom
174
- .where ((d) => d.hasDocumentationComment)) {
173
+ for (var d
174
+ in e.documentationFrom .where ((d) => d.hasDocumentationComment)) {
175
175
if (d.needsPrecache && ! precachedElements.contains (d)) {
176
176
precachedElements.add (d as ModelElement );
177
177
futures.add (d.precacheLocalDocs ());
178
178
// [TopLevelVariable]s get their documentation from getters and
179
179
// setters, so should be precached if either has a template.
180
- if (e is TopLevelVariable &&
181
- ! precachedElements.contains (e)) {
180
+ if (e is TopLevelVariable && ! precachedElements.contains (e)) {
182
181
precachedElements.add (e);
183
182
futures.add (e.precacheLocalDocs ());
184
183
}
@@ -647,7 +646,8 @@ class PackageGraph with CommentReferable, Nameable {
647
646
checkAndAddContainer (modelElement, container);
648
647
}
649
648
} else if (container is Mixin ) {
650
- for (var modelElement in container.superclassConstraints.modelElements) {
649
+ for (var modelElement
650
+ in container.superclassConstraints.modelElements) {
651
651
checkAndAddContainer (modelElement, container);
652
652
}
653
653
}
@@ -752,8 +752,7 @@ class PackageGraph with CommentReferable, Nameable {
752
752
// TODO(keertip): Find a better way to exclude members of extensions
753
753
// when libraries are specified using the "--include" flag.
754
754
if (library != null && library.isDocumented) {
755
- return getModelFor (e, library,
756
- enclosingContainer: preferredClass);
755
+ return getModelFor (e, library, enclosingContainer: preferredClass);
757
756
}
758
757
}
759
758
// TODO(jcollins-g): The data structures should be changed to eliminate
@@ -778,8 +777,7 @@ class PackageGraph with CommentReferable, Nameable {
778
777
var setterElement = setter2 == null
779
778
? null
780
779
: getModelFor (setter2, library) as Accessor ;
781
- canonicalModelElement = getModelForPropertyInducingElement (
782
- e, library,
780
+ canonicalModelElement = getModelForPropertyInducingElement (e, library,
783
781
getter: getterElement, setter: setterElement);
784
782
} else {
785
783
canonicalModelElement = getModelFor (e, library);
@@ -791,8 +789,7 @@ class PackageGraph with CommentReferable, Nameable {
791
789
}
792
790
}
793
791
// Prefer fields and top-level variables.
794
- if (e is PropertyAccessorElement2 &&
795
- canonicalModelElement is Accessor ) {
792
+ if (e is PropertyAccessorElement2 && canonicalModelElement is Accessor ) {
796
793
canonicalModelElement = canonicalModelElement.enclosingCombo;
797
794
}
798
795
return canonicalModelElement;
@@ -804,8 +801,8 @@ class PackageGraph with CommentReferable, Nameable {
804
801
var elem = modelElement.element;
805
802
var candidates = < ModelElement > {};
806
803
if (lib != null ) {
807
- var constructedWithKey = allConstructedModelElements[
808
- ConstructedModelElementsKey (elem, null )];
804
+ var constructedWithKey =
805
+ allConstructedModelElements[ ConstructedModelElementsKey (elem, null )];
809
806
if (constructedWithKey != null ) {
810
807
candidates.add (constructedWithKey);
811
808
}
@@ -909,38 +906,6 @@ class PackageGraph with CommentReferable, Nameable {
909
906
return allElements;
910
907
}
911
908
912
- /// Cache of 'nodoc' configurations.
913
- ///
914
- /// Glob lookups can be expensive, so cache per filename.
915
- final _configSetsNodocFor = HashMap <String , bool >();
916
-
917
- /// Given an element's [fullName] , look up the nodoc configuration data and
918
- /// determine whether to unconditionally treat the element as "nodoc", an
919
- /// attribute indicating that documentation should not be included in
920
- /// dartdoc's generated output.
921
- ///
922
- /// This configuration setting is deprecated.
923
- bool configSetsNodocFor (String fullName) {
924
- return _configSetsNodocFor.putIfAbsent (fullName, () {
925
- var file = resourceProvider.getFile (fullName);
926
- // Direct lookup instead of generating a custom context will save some
927
- // cycles. We can't use the element's [DartdocOptionContext] because that
928
- // might not be where the element was defined, which is what's important
929
- // for nodoc's semantics. Looking up the defining element just to pull
930
- // a context is again, slow.
931
- var globs = (config.optionSet['nodoc' ].valueAt (file.parent) as List )
932
- .cast <String >();
933
- if (globs.isNotEmpty) {
934
- packageGraph.defaultPackage.warn (
935
- PackageWarning .deprecated,
936
- message:
937
- "The '--nodoc' option is deprecated, and will soon be removed." ,
938
- );
939
- }
940
- return utils.matchGlobs (globs, fullName);
941
- });
942
- }
943
-
944
909
/// Returns a macro by [name] , or `null` if no macro is found.
945
910
String ? getMacro (String name) {
946
911
assert (_localDocumentationBuilt);
0 commit comments