From 694ee3796641d64c40f38a92c8be254870711dc4 Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Mon, 10 Jul 2017 08:55:29 -0700 Subject: [PATCH 1/6] Remove old nodoc support and rename isPublic/isPrivate to something more indicative of the limited features of each --- lib/dartdoc.dart | 2 +- lib/src/model.dart | 34 +++++++++++++++++----------------- lib/src/model_utils.dart | 27 ++------------------------- 3 files changed, 20 insertions(+), 43 deletions(-) diff --git a/lib/dartdoc.dart b/lib/dartdoc.dart index 5f4852cf4f..be88aa2f7c 100644 --- a/lib/dartdoc.dart +++ b/lib/dartdoc.dart @@ -487,7 +487,7 @@ class DartDoc { sources.add(source); if (context.computeKindOf(source) == SourceKind.LIBRARY) { LibraryElement library = context.computeLibraryElement(source); - if (!isPrivate(library)) libraries.add(library); + if (!hasPrivateName(library)) libraries.add(library); } } diff --git a/lib/src/model.dart b/lib/src/model.dart index e646c37f03..6262f5aaf3 100644 --- a/lib/src/model.dart +++ b/lib/src/model.dart @@ -473,7 +473,7 @@ class Class extends ModelElement implements EnclosedElement { List get constructors { if (_constructors != null) return _constructors; - _constructors = _cls.constructors.where(isPublic).map((e) { + _constructors = _cls.constructors.where(hasPublicName).map((e) { return new ModelElement.from(e, library); }).toList(growable: true) ..sort(byName); @@ -589,7 +589,7 @@ class Class extends ModelElement implements EnclosedElement { for (ExecutableElement value in values) { if (value != null && value is MethodElement && - isPublic(value) && + hasPublicName(value) && !value.isOperator && value.enclosingElement != null) { if (!package.isDocumented(value.enclosingElement)) { @@ -734,7 +734,7 @@ class Class extends ModelElement implements EnclosedElement { List filterNonPublicTypes(List rawTypes) { List publicList = []; for (ElementType type in rawTypes) { - if (!isPrivate(type.element.element)) publicList.add(type); + if (!hasPrivateName(type.element.element)) publicList.add(type); } return publicList; } @@ -841,14 +841,14 @@ class Class extends ModelElement implements EnclosedElement { inheritedAccessors.addAll(cmap.values .where((e) => e is PropertyAccessorElement) .map((e) => Package.getBasestElement(e) as PropertyAccessorElement) - .where(isPublic)); + .where(hasPublicName)); // Interfaces are subordinate to members inherited from classes, so don't // add this to our accessor set if we already have something inherited from classes. inheritedAccessors.addAll(imap.values .where((e) => e is PropertyAccessorElement && !cmap.containsKey(e.name)) .map((e) => Package.getBasestElement(e) as PropertyAccessorElement) - .where(isPublic)); + .where(hasPublicName)); assert(!inheritedAccessors.any((e) => e is Member)); // This structure keeps track of inherited accessors, allowing lookup @@ -863,7 +863,7 @@ class Class extends ModelElement implements EnclosedElement { // For half-inherited fields, the analyzer only links the non-inherited // to the [FieldElement]. Compose our [Field] class by hand by looking up // inherited accessors that may be related. - for (FieldElement f in _cls.fields.where(isPublic)) { + for (FieldElement f in _cls.fields.where(hasPublicName)) { PropertyAccessorElement getterElement = f.getter; if (getterElement == null && accessorMap.containsKey(f.name)) { getterElement = accessorMap[f.name] @@ -950,7 +950,7 @@ class Class extends ModelElement implements EnclosedElement { List get _methods { if (_allMethods != null) return _allMethods; - _allMethods = _cls.methods.where(isPublic).map((e) { + _allMethods = _cls.methods.where(hasPublicName).map((e) { return new ModelElement.from(e, library); }).toList(growable: false) ..sort(byName); @@ -1078,7 +1078,7 @@ class Enum extends Class { _enumFields = []; for (FieldElement f - in _cls.fields.where(isPublic).where((f) => f.isConst)) { + in _cls.fields.where(hasPublicName).where((f) => f.isConst)) { // Enums do not have inheritance. Accessor accessor = new ModelElement.from(f.getter, library); _enumFields.add( @@ -1595,7 +1595,7 @@ class Library extends ModelElement { enumClasses.addAll(_exportedNamespace.definedNames.values .where((element) => element is ClassElement && element.isEnum)); _enums = enumClasses - .where(isPublic) + .where(hasPublicName) .map((e) => new ModelElement.from(e, this)) .toList(growable: false) ..sort(byName); @@ -1623,7 +1623,7 @@ class Library extends ModelElement { elements.addAll(_exportedNamespace.definedNames.values .where((element) => element is FunctionElement)); - _functions = elements.where(isPublic).map((e) { + _functions = elements.where(hasPublicName).map((e) { return new ModelElement.from(e, this); }).toList(growable: false) ..sort(byName); @@ -1738,7 +1738,7 @@ class Library extends ModelElement { elements.addAll(_exportedNamespace.definedNames.values .where((element) => element is FunctionTypeAliasElement)); - elements..removeWhere(isPrivate); + elements..removeWhere(hasPrivateName); _typeDefs = elements .map((e) => new ModelElement.from(e, this)) .toList(growable: false) @@ -1765,7 +1765,7 @@ class Library extends ModelElement { .where((element) => element is ClassElement && !element.isEnum)); _classes = types - .where(isPublic) + .where(hasPublicName) .map((e) => new ModelElement.from(e, this)) .toList(growable: false) ..sort(byName); @@ -1805,7 +1805,7 @@ class Library extends ModelElement { } }); _variables = []; - for (TopLevelVariableElement element in elements.where(isPublic)) { + for (TopLevelVariableElement element in elements.where(hasPublicName)) { Accessor getter; if (element.getter != null) getter = new ModelElement.from(element.getter, this); @@ -2962,7 +2962,7 @@ abstract class ModelElement extends Nameable (this.element is TypeDefiningElement && (this.element as TypeDefiningElement).type.name == "dynamic")); - if (isPrivate(element)) { + if (hasPrivateName(element)) { return HTML_ESCAPE.convert(name); } @@ -3555,7 +3555,7 @@ class Package extends Nameable implements Documentable { _packageWarningCounter = new PackageWarningCounter(_packageWarningOptions); libraryElements.forEach((element) { // add only if the element should be included in the public api - if (isPublic(element)) { + if (hasPublicName(element)) { var lib = new Library._(element, this); _libraries.add(lib); allLibraries[element] = lib; @@ -3757,7 +3757,7 @@ class Package extends Nameable implements Documentable { final library = package.findLibraryFor(modelTypeElement.element); if (library == null && modelTypeElement.library != null && - !isPrivate(modelTypeElement.library.element) && + !hasPrivateName(modelTypeElement.library.element) && modelTypeElement.library.canonicalLibrary == null && !libraryElements.contains(modelTypeElement.library.element)) { libraryElements.add(modelTypeElement.library.element); @@ -3963,7 +3963,7 @@ class Package extends Nameable implements Documentable { bool isDocumented(Element element) { // If this isn't a private element and we have a canonical Library for it, // this element will be documented. - if (isPrivate(element)) return false; + if (hasPrivateName(element)) return false; return findCanonicalLibraryFor(element) != null; } diff --git a/lib/src/model_utils.dart b/lib/src/model_utils.dart index 916b47610a..66e2739e0d 100644 --- a/lib/src/model_utils.dart +++ b/lib/src/model_utils.dart @@ -53,7 +53,7 @@ bool isInExportedLibraries( } final RegExp slashes = new RegExp('[\/]'); -bool isPrivate(Element e) { +bool hasPrivateName(Element e) { if (e.name.startsWith('_') || (e is LibraryElement && (e.identifier == 'dart:_internal' || @@ -70,30 +70,7 @@ bool isPrivate(Element e) { return false; } -// TODO(jcollins-g): this does not take into account inheritance -bool isPublic(Element e) { - if (isPrivate(e)) return false; - // check to see if element is part of the public api, that is it does not - // have a '' or '@nodoc' in the documentation comment - if (e is PropertyAccessorElement && e.isSynthetic) { - var accessor = (e as PropertyAccessorElement); - if (accessor.correspondingSetter != null && - !accessor.correspondingSetter.isSynthetic) { - e = accessor.correspondingSetter; - } else if (accessor.correspondingGetter != null && - !accessor.correspondingGetter.isSynthetic) { - e = accessor.correspondingGetter; - } else if (accessor.variable != null) { - e = accessor.variable; - } - } - - var docComment = e.documentationComment; - if (docComment != null && - (docComment.contains('') || docComment.contains('@nodoc'))) - return false; - return true; -} +bool hasPublicName(Element e) => !hasPrivateName(e); /// Strip leading dartdoc comments from the given source code. String stripDartdocCommentsFromSource(String source) { From c35c44d7030870286fde1900eef57b20d5fa0786 Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Tue, 11 Jul 2017 08:02:22 -0700 Subject: [PATCH 2/6] Getting there, but still need to work out fields/TopLevelVariables --- lib/src/model.dart | 91 ++++++++++++++++++------------ testing/test_package/lib/fake.dart | 16 ++++++ 2 files changed, 71 insertions(+), 36 deletions(-) diff --git a/lib/src/model.dart b/lib/src/model.dart index 6262f5aaf3..20e1a8989f 100644 --- a/lib/src/model.dart +++ b/lib/src/model.dart @@ -106,6 +106,7 @@ abstract class Inheritable { ModelElement get enclosingElement; Package get package; bool get isInherited; + bool get isPublic; bool _canonicalEnclosingClassIsSet = false; Class _canonicalEnclosingClass; Class _definingEnclosingClass; @@ -140,7 +141,7 @@ abstract class Inheritable { } } } - if (definingEnclosingElement.isCanonical) { + if (definingEnclosingElement.isCanonical && isPublic) { assert(definingEnclosingElement == _canonicalEnclosingClass); } } else { @@ -473,9 +474,9 @@ class Class extends ModelElement implements EnclosedElement { List get constructors { if (_constructors != null) return _constructors; - _constructors = _cls.constructors.where(hasPublicName).map((e) { + _constructors = _cls.constructors.map((e) { return new ModelElement.from(e, library); - }).toList(growable: true) + }).where((e) => e.isPublic).toList(growable: true) ..sort(byName); return _constructors; @@ -589,17 +590,18 @@ class Class extends ModelElement implements EnclosedElement { for (ExecutableElement value in values) { if (value != null && value is MethodElement && - hasPublicName(value) && !value.isOperator && value.enclosingElement != null) { + Method m; if (!package.isDocumented(value.enclosingElement)) { - Method m = - new ModelElement.from(value, library, enclosingClass: this); - _inheritedMethods.add(m); - _genPageMethods.add(m); + m = new ModelElement.from(value, library, enclosingClass: this); + if (m.isPublic) { + _inheritedMethods.add(m); + _genPageMethods.add(m); + } } else { - _inheritedMethods - .add(new ModelElement.from(value, library, enclosingClass: this)); + m = new ModelElement.from(value, library, enclosingClass: this); + if (m.isPublic) _inheritedMethods.add(m); } } } @@ -840,15 +842,13 @@ class Class extends ModelElement implements EnclosedElement { Set inheritedAccessors = new Set(); inheritedAccessors.addAll(cmap.values .where((e) => e is PropertyAccessorElement) - .map((e) => Package.getBasestElement(e) as PropertyAccessorElement) - .where(hasPublicName)); + .map((e) => Package.getBasestElement(e) as PropertyAccessorElement)); // Interfaces are subordinate to members inherited from classes, so don't // add this to our accessor set if we already have something inherited from classes. inheritedAccessors.addAll(imap.values .where((e) => e is PropertyAccessorElement && !cmap.containsKey(e.name)) - .map((e) => Package.getBasestElement(e) as PropertyAccessorElement) - .where(hasPublicName)); + .map((e) => Package.getBasestElement(e) as PropertyAccessorElement)); assert(!inheritedAccessors.any((e) => e is Member)); // This structure keeps track of inherited accessors, allowing lookup @@ -863,7 +863,7 @@ class Class extends ModelElement implements EnclosedElement { // For half-inherited fields, the analyzer only links the non-inherited // to the [FieldElement]. Compose our [Field] class by hand by looking up // inherited accessors that may be related. - for (FieldElement f in _cls.fields.where(hasPublicName)) { + for (FieldElement f in _cls.fields) { PropertyAccessorElement getterElement = f.getter; if (getterElement == null && accessorMap.containsKey(f.name)) { getterElement = accessorMap[f.name] @@ -930,18 +930,20 @@ class Class extends ModelElement implements EnclosedElement { } } } + Field field; if ((getter == null || getter.isInherited) && (setter == null || setter.isInherited)) { // Field is 100% inherited. - _fields.add(new ModelElement.from(f, library, - enclosingClass: this, getter: getter, setter: setter)); + field = new ModelElement.from(f, library, enclosingClass: this, getter: getter, setter: setter); } else { // Field is <100% inherited (could be half-inherited). // TODO(jcollins-g): Navigation is probably still confusing for // half-inherited fields when traversing the inheritance tree. Make // this better, somehow. - _fields.add( - new ModelElement.from(f, library, getter: getter, setter: setter)); + field = new ModelElement.from(f, library, getter: getter, setter: setter); + } + if (field.isPublic) { + _fields.add(field); } } @@ -950,9 +952,9 @@ class Class extends ModelElement implements EnclosedElement { List get _methods { if (_allMethods != null) return _allMethods; - _allMethods = _cls.methods.where(hasPublicName).map((e) { + _allMethods = _cls.methods.map((e) { return new ModelElement.from(e, library); - }).toList(growable: false) + }).where((e) => e.isPublic).toList(growable: false) ..sort(byName); return _allMethods; @@ -1078,11 +1080,11 @@ class Enum extends Class { _enumFields = []; for (FieldElement f - in _cls.fields.where(hasPublicName).where((f) => f.isConst)) { + in _cls.fields.where((f) => f.isConst)) { // Enums do not have inheritance. Accessor accessor = new ModelElement.from(f.getter, library); - _enumFields.add( - new ModelElement.from(f, library, index: index++, getter: accessor)); + EnumField enumField = new ModelElement.from(f, library, index: index++, getter: accessor); + if (enumField.isPublic) _enumFields.add(enumField); } _enumFields.sort(byName); @@ -1341,15 +1343,18 @@ abstract class GetterSetterCombo implements ModelElement { return false; } + @override + bool get isPublic => getter.isPublic || setter.isPublic; + @override List get documentationFrom { if (_documentationFrom == null) { _documentationFrom = []; - if (getter != null) { + if (getter != null && getter.isPublic) { _documentationFrom.addAll(getter.documentationFrom.where((e) => e.computeDocumentationComment != computeDocumentationComment)); } - if (setter != null) + if (setter != null && setter.isPublic) _documentationFrom.addAll(setter.documentationFrom.where((e) => e.computeDocumentationComment != computeDocumentationComment)); if (_documentationFrom.length == 0 || @@ -1595,8 +1600,8 @@ class Library extends ModelElement { enumClasses.addAll(_exportedNamespace.definedNames.values .where((element) => element is ClassElement && element.isEnum)); _enums = enumClasses - .where(hasPublicName) .map((e) => new ModelElement.from(e, this)) + .where((e) => e.isPublic) .toList(growable: false) ..sort(byName); @@ -1623,9 +1628,9 @@ class Library extends ModelElement { elements.addAll(_exportedNamespace.definedNames.values .where((element) => element is FunctionElement)); - _functions = elements.where(hasPublicName).map((e) { + _functions = elements.map((e) { return new ModelElement.from(e, this); - }).toList(growable: false) + }).where((e) => e.isPublic).toList(growable: false) ..sort(byName); return _functions; @@ -1765,8 +1770,8 @@ class Library extends ModelElement { .where((element) => element is ClassElement && !element.isEnum)); _classes = types - .where(hasPublicName) .map((e) => new ModelElement.from(e, this)) + .where((e) => e.isPublic) .toList(growable: false) ..sort(byName); @@ -1805,15 +1810,15 @@ class Library extends ModelElement { } }); _variables = []; - for (TopLevelVariableElement element in elements.where(hasPublicName)) { + for (TopLevelVariableElement element in elements) { Accessor getter; if (element.getter != null) getter = new ModelElement.from(element.getter, this); Accessor setter; if (element.setter != null) setter = new ModelElement.from(element.setter, this); - _variables.add( - new ModelElement.from(element, this, getter: getter, setter: setter)); + ModelElement me = new ModelElement.from(element, this, getter: getter, setter: setter); + if (me.isPublic) _variables.add(me); } _variables.sort(byName); @@ -2339,6 +2344,19 @@ abstract class ModelElement extends Nameable }).toList(growable: false); } + bool _isPublic; + bool get isPublic { + if (_isPublic == null) { + String docComment = computeDocumentationComment; + if (docComment == null) { + _isPublic = hasPublicName(element); + } else { + _isPublic = hasPublicName(element) && !(docComment.contains('@nodoc') || docComment.contains('')); + } + } + return _isPublic; + } + Set get features { Set all_features = new Set(); all_features.addAll(annotations); @@ -2962,7 +2980,7 @@ abstract class ModelElement extends Nameable (this.element is TypeDefiningElement && (this.element as TypeDefiningElement).type.name == "dynamic")); - if (hasPrivateName(element)) { + if (!isPublic) { return HTML_ESCAPE.convert(name); } @@ -3555,8 +3573,8 @@ class Package extends Nameable implements Documentable { _packageWarningCounter = new PackageWarningCounter(_packageWarningOptions); libraryElements.forEach((element) { // add only if the element should be included in the public api - if (hasPublicName(element)) { - var lib = new Library._(element, this); + var lib = new Library._(element, this); + if (lib.isPublic) { _libraries.add(lib); allLibraries[element] = lib; assert(!_elementToLibrary.containsKey(lib.element)); @@ -3960,6 +3978,7 @@ class Package extends Nameable implements Documentable { return foundLibrary; } + /// @deprecated('Whether something is documented should be a ModelElement property') bool isDocumented(Element element) { // If this isn't a private element and we have a canonical Library for it, // this element will be documented. diff --git a/testing/test_package/lib/fake.dart b/testing/test_package/lib/fake.dart index 23450dc779..0329488908 100644 --- a/testing/test_package/lib/fake.dart +++ b/testing/test_package/lib/fake.dart @@ -191,6 +191,18 @@ class ImplicitProperties { /// A simple property to inherit. int forInheriting; + /// @nodoc for you + String get explicitNonDocumentedGetter => "something"; + + /// @nodoc for you but check downstream + String get explicitNonDocumentedInBaseClassGetter => "something else"; + + /// but documented here. + double get explicitPartiallyDocumentedField => 1.3; + /// @nodoc here. + set explicitPartiallyDocumentedField(double foo) {} + + /// Explicit getter for inheriting. int get explicitGetterSetterForInheriting => 12; @@ -213,6 +225,10 @@ class ClassWithUnusualProperties extends ImplicitProperties { myCoolTypedef _aFunction; + /// Since I have a different doc, I should be documented. + @override + String get explicitNonDocumentedInBaseClassGetter => "something else"; + /// Getter doc for explicitGetterSetter. myCoolTypedef get explicitGetterSetter { return _aFunction; From 21daf10b61299712dcb38fa931e0f82451617c29 Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Tue, 11 Jul 2017 10:01:44 -0700 Subject: [PATCH 3/6] Integration tests --- lib/src/model.dart | 61 ++++--- lib/templates/_property.html | 8 +- testing/test_package/lib/fake.dart | 32 +++- .../fake/Annotation-class.html | 2 + .../fake/AnotherInterface-class.html | 2 + .../fake/BaseForDocComments-class.html | 2 + .../fake/CUSTOM_CLASS-constant.html | 2 + testing/test_package_docs/fake/Callback2.html | 2 + .../ClassWithUnusualProperties-class.html | 29 +++ .../ClassWithUnusualProperties.html | 3 + .../ClassWithUnusualProperties/aMethod.html | 3 + .../documentedPartialFieldInSubclassOnly.html | 120 +++++++++++++ .../explicitGetter.html | 3 + .../explicitGetterImplicitSetter.html | 3 + .../explicitGetterSetter.html | 3 + ...xplicitNonDocumentedInBaseClassGetter.html | 120 +++++++++++++ .../explicitSetter.html | 3 + .../finalProperty.html | 3 + .../implicitGetterExplicitSetter.html | 3 + .../implicitReadWrite.html | 3 + .../test_package_docs/fake/Color-class.html | 2 + .../fake/ConstantClass-class.html | 2 + .../test_package_docs/fake/Cool-class.html | 2 + .../test_package_docs/fake/DOWN-constant.html | 2 + testing/test_package_docs/fake/Doh-class.html | 2 + .../fake/ExtraSpecialList-class.html | 2 + .../test_package_docs/fake/FakeProcesses.html | 2 + .../test_package_docs/fake/Foo2-class.html | 2 + .../fake/GenericTypedef.html | 2 + .../fake/HasGenericWithExtends-class.html | 2 + .../fake/HasGenerics-class.html | 2 + .../fake/ImplicitProperties-class.html | 11 ++ .../ImplicitProperties.html | 1 + .../explicitGetterImplicitSetter.html | 1 + .../explicitGetterSetterForInheriting.html | 1 + .../explicitPartiallyDocumentedField.html | 112 ++++++++++++ .../ImplicitProperties/forInheriting.html | 1 + .../fake/ImplicitProperties/hashCode.html | 1 + .../implicitGetterExplicitSetter.html | 1 + .../fake/ImplicitProperties/noSuchMethod.html | 1 + .../ImplicitProperties/operator_equals.html | 1 + .../fake/ImplicitProperties/runtimeType.html | 1 + .../fake/ImplicitProperties/toString.html | 1 + .../fake/Interface-class.html | 2 + .../fake/LongFirstLine-class.html | 2 + .../fake/LotsAndLotsOfParameters.html | 2 + .../test_package_docs/fake/MixMeIn-class.html | 2 + .../fake/NAME_SINGLEUNDERSCORE-constant.html | 2 + .../NAME_WITH_TWO_UNDERSCORES-constant.html | 2 + .../fake/NewGenericTypedef.html | 2 + .../test_package_docs/fake/Oops-class.html | 2 + .../fake/OperatorReferenceClass-class.html | 2 + .../fake/OtherGenericsThing-class.html | 2 + .../test_package_docs/fake/PI-constant.html | 2 + .../fake/SpecialList-class.html | 2 + .../fake/SubForDocComments-class.html | 2 + .../fake/SuperAwesomeClass-class.html | 2 + .../test_package_docs/fake/UP-constant.html | 2 + .../test_package_docs/fake/VoidCallback.html | 2 + .../fake/WithGetterAndSetter-class.html | 2 + .../test_package_docs/fake/ZERO-constant.html | 2 + .../test_package_docs/fake/addCallback.html | 2 + .../test_package_docs/fake/addCallback2.html | 2 + .../test_package_docs/fake/dynamicGetter.html | 2 + .../test_package_docs/fake/fake-library.html | 19 ++ .../fake/functionWithFunctionParameters.html | 2 + .../fake/getterSetterNodocGetter.html | 166 ++++++++++++++++++ .../fake/getterSetterNodocSetter.html | 165 +++++++++++++++++ .../fake/greatAnnotation-constant.html | 2 + .../fake/greatestAnnotation-constant.html | 2 + .../fake/incorrectDocReference-constant.html | 2 + .../test_package_docs/fake/justGetter.html | 2 + .../test_package_docs/fake/justSetter.html | 2 + .../fake/mapWithDynamicKeys.html | 2 + .../test_package_docs/fake/meaningOfLife.html | 2 + .../test_package_docs/fake/myCoolTypedef.html | 2 + .../fake/myGenericFunction.html | 2 + .../onlyPositionalWithNoDefaultNoType.html | 2 + .../test_package_docs/fake/paintImage1.html | 2 + .../test_package_docs/fake/paintImage2.html | 2 + .../fake/paramFromAnotherLib.html | 2 + .../fake/required-constant.html | 2 + testing/test_package_docs/fake/setAndGet.html | 2 + testing/test_package_docs/fake/short.html | 2 + .../fake/simpleProperty.html | 2 + testing/test_package_docs/fake/soIntense.html | 2 + ...testingCodeSyntaxInOneLiners-constant.html | 2 + .../fake/thisIsAlsoAsync.html | 2 + .../test_package_docs/fake/thisIsAsync.html | 2 + .../fake/topLevelFunction.html | 2 + testing/test_package_docs/index.json | 55 ++++++ 91 files changed, 1020 insertions(+), 35 deletions(-) create mode 100644 testing/test_package_docs/fake/ClassWithUnusualProperties/documentedPartialFieldInSubclassOnly.html create mode 100644 testing/test_package_docs/fake/ClassWithUnusualProperties/explicitNonDocumentedInBaseClassGetter.html create mode 100644 testing/test_package_docs/fake/ImplicitProperties/explicitPartiallyDocumentedField.html create mode 100644 testing/test_package_docs/fake/getterSetterNodocGetter.html create mode 100644 testing/test_package_docs/fake/getterSetterNodocSetter.html diff --git a/lib/src/model.dart b/lib/src/model.dart index 20e1a8989f..463a92f8d0 100644 --- a/lib/src/model.dart +++ b/lib/src/model.dart @@ -1206,7 +1206,7 @@ class Field extends ModelElement String get documentation { // Verify that hasSetter and hasGetterNoSetter are mutually exclusive, // to prevent displaying more or less than one summary. - Set assertCheck = new Set()..addAll([hasSetter, hasGetterNoSetter]); + Set assertCheck = new Set()..addAll([hasPublicSetter, hasPublicGetterNoSetter]); assert(assertCheck.containsAll([true, false])); return super.documentation; } @@ -1291,7 +1291,7 @@ class Field extends ModelElement if (readOnly && !isFinal && !isConst) all_features.add('read-only'); if (writeOnly) all_features.add('write-only'); if (readWrite) all_features.add('read / write'); - if (getter != null && setter != null) { + if (hasPublicGetter && hasPublicSetter) { if (getter.isInherited && setter.isInherited) { all_features.add('inherited'); } else { @@ -1336,25 +1336,28 @@ abstract class GetterSetterCombo implements ModelElement { /// Returns true if both accessors are synthetic. bool get hasSyntheticAccessors { - if ((getter != null && getter.element.isSynthetic) || - (setter != null && setter.element.isSynthetic)) { + if ((hasPublicGetter && getter.element.isSynthetic) || + (hasPublicSetter && setter.element.isSynthetic)) { return true; } return false; } + bool get hasPublicGetter => hasGetter && getter.isPublic; + bool get hasPublicSetter => hasSetter && setter.isPublic; + @override - bool get isPublic => getter.isPublic || setter.isPublic; + bool get isPublic => hasPublicGetter || hasPublicSetter; @override List get documentationFrom { if (_documentationFrom == null) { _documentationFrom = []; - if (getter != null && getter.isPublic) { + if (hasPublicGetter) { _documentationFrom.addAll(getter.documentationFrom.where((e) => e.computeDocumentationComment != computeDocumentationComment)); } - if (setter != null && setter.isPublic) + if (hasPublicSetter) _documentationFrom.addAll(setter.documentationFrom.where((e) => e.computeDocumentationComment != computeDocumentationComment)); if (_documentationFrom.length == 0 || @@ -1369,23 +1372,23 @@ abstract class GetterSetterCombo implements ModelElement { String get oneLineDoc { if (_oneLineDoc == null) { bool hasAccessorsWithDocs = - (getter != null && getter.oneLineDoc.isNotEmpty || - setter != null && setter.oneLineDoc.isNotEmpty); + (hasPublicGetter && getter.oneLineDoc.isNotEmpty || + hasPublicSetter && setter.oneLineDoc.isNotEmpty); if (!hasAccessorsWithDocs) { _oneLineDoc = _documentation.asOneLiner; } else { StringBuffer buffer = new StringBuffer(); bool getterSetterBothAvailable = false; - if (getter != null && + if (hasPublicGetter && getter.oneLineDoc.isNotEmpty && - setter != null && + hasPublicSetter && setter.oneLineDoc.isNotEmpty) { getterSetterBothAvailable = true; } - if (getter != null && getter.oneLineDoc.isNotEmpty) { + if (hasPublicGetter && getter.oneLineDoc.isNotEmpty) { buffer.write('${getter.oneLineDoc}'); } - if (setter != null && setter.oneLineDoc.isNotEmpty) { + if (hasPublicSetter && setter.oneLineDoc.isNotEmpty) { buffer.write('${getterSetterBothAvailable ? "": setter.oneLineDoc}'); } _oneLineDoc = buffer.toString(); @@ -1397,13 +1400,13 @@ abstract class GetterSetterCombo implements ModelElement { String get getterSetterDocumentationComment { var buffer = new StringBuffer(); - if (hasGetter && !getter.element.isSynthetic) { + if (hasPublicGetter && !getter.element.isSynthetic) { assert(getter.documentationFrom.length == 1); String docs = getter.documentationFrom.first.computeDocumentationComment; if (docs != null) buffer.write(docs); } - if (hasSetter && !setter.element.isSynthetic) { + if (hasPublicSetter && !setter.element.isSynthetic) { assert(setter.documentationFrom.length == 1); String docs = setter.documentationFrom.first.computeDocumentationComment; if (docs != null) { @@ -1437,10 +1440,10 @@ abstract class GetterSetterCombo implements ModelElement { return null; } - bool get hasExplicitGetter => hasGetter && !getter.element.isSynthetic; + bool get hasExplicitGetter => hasPublicGetter && !getter.element.isSynthetic; - bool get hasExplicitSetter => hasSetter && !setter.element.isSynthetic; - bool get hasImplicitSetter => hasSetter && setter.element.isSynthetic; + bool get hasExplicitSetter => hasPublicSetter && !setter.element.isSynthetic; + bool get hasImplicitSetter => hasPublicSetter && setter.element.isSynthetic; bool get hasGetter => getter != null; @@ -1448,7 +1451,7 @@ abstract class GetterSetterCombo implements ModelElement { bool get hasSetter => setter != null; - bool get hasGetterNoSetter => (hasGetter && !hasSetter); + bool get hasPublicGetterNoSetter => (hasPublicGetter && !hasPublicSetter); String get arrow { // → @@ -1458,15 +1461,15 @@ abstract class GetterSetterCombo implements ModelElement { // ↔ if (readWrite) return r'↔'; // A GetterSetterCombo should always be one of readOnly, writeOnly, - // or readWrite. - assert(false); + // or readWrite (if documented). + assert(!isPublic); return null; } - bool get readOnly => hasGetter && !hasSetter; - bool get readWrite => hasGetter && hasSetter; + bool get readOnly => hasPublicGetter && !hasPublicSetter; + bool get readWrite => hasPublicGetter && hasPublicSetter; - bool get writeOnly => hasSetter && !hasGetter; + bool get writeOnly => hasPublicSetter && !hasPublicGetter; Accessor get setter; } @@ -1507,11 +1510,11 @@ class Library extends ModelElement { Accessor getter; Accessor setter; if (e is GetterSetterCombo) { - if (e.getter != null) { + if (e.hasGetter) { getter = new ModelElement.from(e.getter.element, package.findOrCreateLibraryFor(e.getter.element)); } - if (e.setter != null) { + if (e.hasSetter) { setter = new ModelElement.from(e.setter.element, package.findOrCreateLibraryFor(e.setter.element)); } @@ -2411,11 +2414,11 @@ abstract class ModelElement extends Nameable InheritableAccessor newSetter; if (this is GetterSetterCombo) { GetterSetterCombo thisAsCombo = this as GetterSetterCombo; - if (thisAsCombo.getter != null) { + if (thisAsCombo.hasGetter) { newGetter = new ModelElement.from( thisAsCombo.getter.element, thisAsCombo.getter.definingLibrary); } - if (thisAsCombo.setter != null) { + if (thisAsCombo.hasSetter) { newSetter = new ModelElement.from( thisAsCombo.setter.element, thisAsCombo.setter.definingLibrary); } @@ -4419,7 +4422,7 @@ class TopLevelVariable extends ModelElement String get documentation { // Verify that hasSetter and hasGetterNoSetter are mutually exclusive, // to prevent displaying more or less than one summary. - Set assertCheck = new Set()..addAll([hasSetter, hasGetterNoSetter]); + Set assertCheck = new Set()..addAll([hasPublicSetter, hasPublicGetterNoSetter]); assert(assertCheck.containsAll([true, false])); return super.documentation; } diff --git a/lib/templates/_property.html b/lib/templates/_property.html index df574b2cd9..4d88ba4bbc 100644 --- a/lib/templates/_property.html +++ b/lib/templates/_property.html @@ -1,16 +1,16 @@ -{{ #hasSetter }} +{{ #hasPublicSetter }}
{{{linkedName}}}{{{genericParameters}}} {{{ arrow }}} {{ #hasExplicitSetter }} {{{ linkedParamsNoMetadata }}} {{/hasExplicitSetter}} {{#hasImplicitSetter}} {{{linkedParamsNoMetadataOrNames}}} {{/hasImplicitSetter}}
-{{ /hasSetter }} -{{ #hasGetterNoSetter }} +{{ /hasPublicSetter }} +{{ #hasPublicGetterNoSetter }}
{{{linkedName}}} {{{ arrow }}} {{{ linkedReturnType }}}
-{{ /hasGetterNoSetter }} +{{ /hasPublicGetterNoSetter }} {{{ oneLineDoc }}} {{>features}} diff --git a/testing/test_package/lib/fake.dart b/testing/test_package/lib/fake.dart index 0329488908..1e556165ce 100644 --- a/testing/test_package/lib/fake.dart +++ b/testing/test_package/lib/fake.dart @@ -199,9 +199,11 @@ class ImplicitProperties { /// but documented here. double get explicitPartiallyDocumentedField => 1.3; - /// @nodoc here. + /// @nodoc here, you should never see this set explicitPartiallyDocumentedField(double foo) {} + /// @nodoc here, you should never see this + String documentedPartialFieldInSubclassOnly; /// Explicit getter for inheriting. int get explicitGetterSetterForInheriting => 12; @@ -215,11 +217,14 @@ class ImplicitProperties { /// Or rather, dartdoc used to think they didn't exist. Check the variations /// on inheritance and overrides here. class ClassWithUnusualProperties extends ImplicitProperties { + /// This getter is documented, so we should see a read-only property here. @override - set implicitGetterExplicitSetter(String x) {} + String get documentedPartialFieldInSubclassOnly => "overridden getter"; @override + set implicitGetterExplicitSetter(String x) {} + @override /// Getter doc for explicitGetterImplicitSetter List get explicitGetterImplicitSetter => new List(); @@ -234,6 +239,11 @@ class ClassWithUnusualProperties extends ImplicitProperties { return _aFunction; } + /// @nodoc on setter + set explicitNodocGetterSetter(String s) {} + /// @nodoc on getter + String get explicitNodocGetterSetter => "something"; + /// This property is not synthetic, so it might reference [f] -- display it. set explicitGetterSetter(myCoolTypedef f) => _aFunction = f; @@ -378,6 +388,24 @@ final int meaningOfLife = 42; /// Simple property String simpleProperty; +/// Simple @nodoc property. +String simplePropertyHidden; + +/// Setter docs should be shown. +set getterSetterNodocGetter(int value) {} +/// @nodoc on getter. +int get getterSetterNodocGetter => 3; + +/// @nodoc on setter +set getterSetterNodocSetter(int value) {} +/// Getter docs should be shown. +int get getterSetterNodocSetter => 4; + +/// @nodoc on the setter +set getterSetterNodocBoth(String value) {} +/// And @nodoc on the getter, so entire TopLevelVariable should be invisible. +String get getterSetterNodocBoth => "I do not exist"; + /// Just a setter. No partner getter. void set justSetter(int value) {} diff --git a/testing/test_package_docs/fake/Annotation-class.html b/testing/test_package_docs/fake/Annotation-class.html index a0a4b98c87..bbc97af50d 100644 --- a/testing/test_package_docs/fake/Annotation-class.html +++ b/testing/test_package_docs/fake/Annotation-class.html @@ -76,6 +76,8 @@
library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/AnotherInterface-class.html b/testing/test_package_docs/fake/AnotherInterface-class.html index c145f62edc..3ecd7d6fd7 100644 --- a/testing/test_package_docs/fake/AnotherInterface-class.html +++ b/testing/test_package_docs/fake/AnotherInterface-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/BaseForDocComments-class.html b/testing/test_package_docs/fake/BaseForDocComments-class.html index 13d917488f..1e3606e25c 100644 --- a/testing/test_package_docs/fake/BaseForDocComments-class.html +++ b/testing/test_package_docs/fake/BaseForDocComments-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/CUSTOM_CLASS-constant.html b/testing/test_package_docs/fake/CUSTOM_CLASS-constant.html index 1656bdc9c5..5e215af16f 100644 --- a/testing/test_package_docs/fake/CUSTOM_CLASS-constant.html +++ b/testing/test_package_docs/fake/CUSTOM_CLASS-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/Callback2.html b/testing/test_package_docs/fake/Callback2.html index 1ebcb050c1..62b4e03737 100644 --- a/testing/test_package_docs/fake/Callback2.html +++ b/testing/test_package_docs/fake/Callback2.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties-class.html b/testing/test_package_docs/fake/ClassWithUnusualProperties-class.html index 9a85d3ea76..e6ce456dd4 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties-class.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • @@ -156,6 +158,14 @@

    Constructors

    Properties

    +
    + documentedPartialFieldInSubclassOnly + → String +
    +
    + This getter is documented, so we should see a read-only property here. +
    @override, read-only
    +
    explicitGetter myCoolTypedef @@ -181,6 +191,14 @@

    Properties

    Getter doc for explicitGetterSetter.
    read / write
    +
    +
    + explicitNonDocumentedInBaseClassGetter + → String +
    +
    + Since I have a different doc, I should be documented. +
    @override, read-only
    explicitSetter @@ -225,6 +243,14 @@

    Properties

    Explicit getter for inheriting.
    read / write, inherited
    +
    +
    + explicitPartiallyDocumentedField + → double +
    +
    + but documented here. +
    read-only, inherited
    forInheriting @@ -316,14 +342,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/ClassWithUnusualProperties.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/ClassWithUnusualProperties.html index 5b6c866ed3..b784722c4c 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/ClassWithUnusualProperties.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/ClassWithUnusualProperties.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/aMethod.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/aMethod.html index bcdc5e5f65..bb26a5d857 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/aMethod.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/aMethod.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/documentedPartialFieldInSubclassOnly.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/documentedPartialFieldInSubclassOnly.html new file mode 100644 index 0000000000..1f56330a24 --- /dev/null +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/documentedPartialFieldInSubclassOnly.html @@ -0,0 +1,120 @@ + + + + + + + + documentedPartialFieldInSubclassOnly property - ClassWithUnusualProperties class - fake library - Dart API + + + + + + + + + + + + +
    + +
    + + +
    documentedPartialFieldInSubclassOnly
    + +
    + +
    + + + +
    + + +
    + +
    + String + documentedPartialFieldInSubclassOnly
    + +
    +

    This getter is documented, so we should see a read-only property here.

    +
    +
    + + + +
    + + + +
    + +
    + + test_package 0.0.1 + + • + + cc license + + +
    + + + + + + + + + + + diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetter.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetter.html index d494724926..03da41aba3 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetter.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetter.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetterImplicitSetter.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetterImplicitSetter.html index b546a63fce..a3e64aeb82 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetterImplicitSetter.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetterImplicitSetter.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetterSetter.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetterSetter.html index 54e1180cc3..2eeacbca28 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetterSetter.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitGetterSetter.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitNonDocumentedInBaseClassGetter.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitNonDocumentedInBaseClassGetter.html new file mode 100644 index 0000000000..86173da72a --- /dev/null +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitNonDocumentedInBaseClassGetter.html @@ -0,0 +1,120 @@ + + + + + + + + explicitNonDocumentedInBaseClassGetter property - ClassWithUnusualProperties class - fake library - Dart API + + + + + + + + + + + + +
    + +
    + + +
    explicitNonDocumentedInBaseClassGetter
    + +
    + +
    + + + +
    + + +
    + +
    + String + explicitNonDocumentedInBaseClassGetter
    + +
    +

    Since I have a different doc, I should be documented.

    +
    +
    + + + +
    + + + +
    + +
    + + test_package 0.0.1 + + • + + cc license + + +
    + + + + + + + + + + + diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitSetter.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitSetter.html index 9056e53c68..a7dd215017 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitSetter.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/explicitSetter.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/finalProperty.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/finalProperty.html index d7493cf9cc..fdb30c2978 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/finalProperty.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/finalProperty.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/implicitGetterExplicitSetter.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/implicitGetterExplicitSetter.html index 75edcb7bf5..db5be00531 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/implicitGetterExplicitSetter.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/implicitGetterExplicitSetter.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/ClassWithUnusualProperties/implicitReadWrite.html b/testing/test_package_docs/fake/ClassWithUnusualProperties/implicitReadWrite.html index d0848bb7bc..caae8d17fd 100644 --- a/testing/test_package_docs/fake/ClassWithUnusualProperties/implicitReadWrite.html +++ b/testing/test_package_docs/fake/ClassWithUnusualProperties/implicitReadWrite.html @@ -45,14 +45,17 @@
    class ClassWithUnusualProperties
  • Properties
  • +
  • documentedPartialFieldInSubclassOnly
  • explicitGetter
  • explicitGetterImplicitSetter
  • explicitGetterSetter
  • +
  • explicitNonDocumentedInBaseClassGetter
  • explicitSetter
  • finalProperty
  • implicitGetterExplicitSetter
  • implicitReadWrite
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • hashCode
  • runtimeType
  • diff --git a/testing/test_package_docs/fake/Color-class.html b/testing/test_package_docs/fake/Color-class.html index be002cb086..b7221867a0 100644 --- a/testing/test_package_docs/fake/Color-class.html +++ b/testing/test_package_docs/fake/Color-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/ConstantClass-class.html b/testing/test_package_docs/fake/ConstantClass-class.html index aedf9ff1f7..c225a9e9bf 100644 --- a/testing/test_package_docs/fake/ConstantClass-class.html +++ b/testing/test_package_docs/fake/ConstantClass-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/Cool-class.html b/testing/test_package_docs/fake/Cool-class.html index 8c449b5653..0489df3319 100644 --- a/testing/test_package_docs/fake/Cool-class.html +++ b/testing/test_package_docs/fake/Cool-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/DOWN-constant.html b/testing/test_package_docs/fake/DOWN-constant.html index afa9b451fb..fdc34fe319 100644 --- a/testing/test_package_docs/fake/DOWN-constant.html +++ b/testing/test_package_docs/fake/DOWN-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/Doh-class.html b/testing/test_package_docs/fake/Doh-class.html index ffecf6d6d4..4f9e3044b2 100644 --- a/testing/test_package_docs/fake/Doh-class.html +++ b/testing/test_package_docs/fake/Doh-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/ExtraSpecialList-class.html b/testing/test_package_docs/fake/ExtraSpecialList-class.html index c73e21e31b..1983144682 100644 --- a/testing/test_package_docs/fake/ExtraSpecialList-class.html +++ b/testing/test_package_docs/fake/ExtraSpecialList-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/FakeProcesses.html b/testing/test_package_docs/fake/FakeProcesses.html index 2bed805653..27b7238765 100644 --- a/testing/test_package_docs/fake/FakeProcesses.html +++ b/testing/test_package_docs/fake/FakeProcesses.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/Foo2-class.html b/testing/test_package_docs/fake/Foo2-class.html index 9a3bba8bca..fc3295a68c 100644 --- a/testing/test_package_docs/fake/Foo2-class.html +++ b/testing/test_package_docs/fake/Foo2-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/GenericTypedef.html b/testing/test_package_docs/fake/GenericTypedef.html index bed574e414..db5f4752dd 100644 --- a/testing/test_package_docs/fake/GenericTypedef.html +++ b/testing/test_package_docs/fake/GenericTypedef.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/HasGenericWithExtends-class.html b/testing/test_package_docs/fake/HasGenericWithExtends-class.html index cc6024e343..1d1bbd8081 100644 --- a/testing/test_package_docs/fake/HasGenericWithExtends-class.html +++ b/testing/test_package_docs/fake/HasGenericWithExtends-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/HasGenerics-class.html b/testing/test_package_docs/fake/HasGenerics-class.html index 423019d589..0396bc4927 100644 --- a/testing/test_package_docs/fake/HasGenerics-class.html +++ b/testing/test_package_docs/fake/HasGenerics-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties-class.html b/testing/test_package_docs/fake/ImplicitProperties-class.html index 7b7219e4e1..d2c26ec4d1 100644 --- a/testing/test_package_docs/fake/ImplicitProperties-class.html +++ b/testing/test_package_docs/fake/ImplicitProperties-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • @@ -170,6 +172,14 @@

    Properties

    Explicit getter for inheriting.
    read / write
    +
    +
    + explicitPartiallyDocumentedField + → double +
    +
    + but documented here. +
    read-only
    forInheriting @@ -263,6 +273,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/ImplicitProperties.html b/testing/test_package_docs/fake/ImplicitProperties/ImplicitProperties.html index 43474a0af6..6749898bc0 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/ImplicitProperties.html +++ b/testing/test_package_docs/fake/ImplicitProperties/ImplicitProperties.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/explicitGetterImplicitSetter.html b/testing/test_package_docs/fake/ImplicitProperties/explicitGetterImplicitSetter.html index 98eb5907d1..9b35143a8c 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/explicitGetterImplicitSetter.html +++ b/testing/test_package_docs/fake/ImplicitProperties/explicitGetterImplicitSetter.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/explicitGetterSetterForInheriting.html b/testing/test_package_docs/fake/ImplicitProperties/explicitGetterSetterForInheriting.html index c719875796..1394f6468f 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/explicitGetterSetterForInheriting.html +++ b/testing/test_package_docs/fake/ImplicitProperties/explicitGetterSetterForInheriting.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/explicitPartiallyDocumentedField.html b/testing/test_package_docs/fake/ImplicitProperties/explicitPartiallyDocumentedField.html new file mode 100644 index 0000000000..11c9258f56 --- /dev/null +++ b/testing/test_package_docs/fake/ImplicitProperties/explicitPartiallyDocumentedField.html @@ -0,0 +1,112 @@ + + + + + + + + explicitPartiallyDocumentedField property - ImplicitProperties class - fake library - Dart API + + + + + + + + + + + + +
    + +
    + + +
    explicitPartiallyDocumentedField
    + +
    + +
    + + + +
    + + +
    + +
    + double + explicitPartiallyDocumentedField
    + +
    +

    but documented here.

    +
    +
    + + + +
    + + + +
    + +
    + + test_package 0.0.1 + + • + + cc license + + +
    + + + + + + + + + + + diff --git a/testing/test_package_docs/fake/ImplicitProperties/forInheriting.html b/testing/test_package_docs/fake/ImplicitProperties/forInheriting.html index 1091af5790..a228fda810 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/forInheriting.html +++ b/testing/test_package_docs/fake/ImplicitProperties/forInheriting.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/hashCode.html b/testing/test_package_docs/fake/ImplicitProperties/hashCode.html index b904ac04c9..03e71bd2b4 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/hashCode.html +++ b/testing/test_package_docs/fake/ImplicitProperties/hashCode.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/implicitGetterExplicitSetter.html b/testing/test_package_docs/fake/ImplicitProperties/implicitGetterExplicitSetter.html index 65fd06e0b0..3a36c823cd 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/implicitGetterExplicitSetter.html +++ b/testing/test_package_docs/fake/ImplicitProperties/implicitGetterExplicitSetter.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/noSuchMethod.html b/testing/test_package_docs/fake/ImplicitProperties/noSuchMethod.html index ac0da0ec06..b97652832b 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/noSuchMethod.html +++ b/testing/test_package_docs/fake/ImplicitProperties/noSuchMethod.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/operator_equals.html b/testing/test_package_docs/fake/ImplicitProperties/operator_equals.html index 01a4351e84..eb290faed7 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/operator_equals.html +++ b/testing/test_package_docs/fake/ImplicitProperties/operator_equals.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/runtimeType.html b/testing/test_package_docs/fake/ImplicitProperties/runtimeType.html index 256299bcd4..9ee4c335c9 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/runtimeType.html +++ b/testing/test_package_docs/fake/ImplicitProperties/runtimeType.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/ImplicitProperties/toString.html b/testing/test_package_docs/fake/ImplicitProperties/toString.html index 6dfe4d25f4..05ffedbf6f 100644 --- a/testing/test_package_docs/fake/ImplicitProperties/toString.html +++ b/testing/test_package_docs/fake/ImplicitProperties/toString.html @@ -47,6 +47,7 @@
    class ImplicitProperties
  • explicitGetterImplicitSetter
  • explicitGetterSetterForInheriting
  • +
  • explicitPartiallyDocumentedField
  • forInheriting
  • implicitGetterExplicitSetter
  • hashCode
  • diff --git a/testing/test_package_docs/fake/Interface-class.html b/testing/test_package_docs/fake/Interface-class.html index 95f86e1207..abc59f78ac 100644 --- a/testing/test_package_docs/fake/Interface-class.html +++ b/testing/test_package_docs/fake/Interface-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/LongFirstLine-class.html b/testing/test_package_docs/fake/LongFirstLine-class.html index 2e40138e1e..811ed759eb 100644 --- a/testing/test_package_docs/fake/LongFirstLine-class.html +++ b/testing/test_package_docs/fake/LongFirstLine-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/LotsAndLotsOfParameters.html b/testing/test_package_docs/fake/LotsAndLotsOfParameters.html index f7dc986a57..cb89f03f11 100644 --- a/testing/test_package_docs/fake/LotsAndLotsOfParameters.html +++ b/testing/test_package_docs/fake/LotsAndLotsOfParameters.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/MixMeIn-class.html b/testing/test_package_docs/fake/MixMeIn-class.html index e22f346c0f..47cd09b73d 100644 --- a/testing/test_package_docs/fake/MixMeIn-class.html +++ b/testing/test_package_docs/fake/MixMeIn-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/NAME_SINGLEUNDERSCORE-constant.html b/testing/test_package_docs/fake/NAME_SINGLEUNDERSCORE-constant.html index 292254ceec..468972161c 100644 --- a/testing/test_package_docs/fake/NAME_SINGLEUNDERSCORE-constant.html +++ b/testing/test_package_docs/fake/NAME_SINGLEUNDERSCORE-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/NAME_WITH_TWO_UNDERSCORES-constant.html b/testing/test_package_docs/fake/NAME_WITH_TWO_UNDERSCORES-constant.html index 6aec9bb9a4..8144535668 100644 --- a/testing/test_package_docs/fake/NAME_WITH_TWO_UNDERSCORES-constant.html +++ b/testing/test_package_docs/fake/NAME_WITH_TWO_UNDERSCORES-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/NewGenericTypedef.html b/testing/test_package_docs/fake/NewGenericTypedef.html index c53e3990e8..f6c23c4165 100644 --- a/testing/test_package_docs/fake/NewGenericTypedef.html +++ b/testing/test_package_docs/fake/NewGenericTypedef.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/Oops-class.html b/testing/test_package_docs/fake/Oops-class.html index cd58e71fcc..b238c23699 100644 --- a/testing/test_package_docs/fake/Oops-class.html +++ b/testing/test_package_docs/fake/Oops-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/OperatorReferenceClass-class.html b/testing/test_package_docs/fake/OperatorReferenceClass-class.html index e56798a4fb..a689822b73 100644 --- a/testing/test_package_docs/fake/OperatorReferenceClass-class.html +++ b/testing/test_package_docs/fake/OperatorReferenceClass-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/OtherGenericsThing-class.html b/testing/test_package_docs/fake/OtherGenericsThing-class.html index 2e2dd80c66..16eec14d94 100644 --- a/testing/test_package_docs/fake/OtherGenericsThing-class.html +++ b/testing/test_package_docs/fake/OtherGenericsThing-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/PI-constant.html b/testing/test_package_docs/fake/PI-constant.html index da265f7b53..eaf3e9154a 100644 --- a/testing/test_package_docs/fake/PI-constant.html +++ b/testing/test_package_docs/fake/PI-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/SpecialList-class.html b/testing/test_package_docs/fake/SpecialList-class.html index 7541873cd5..724523956a 100644 --- a/testing/test_package_docs/fake/SpecialList-class.html +++ b/testing/test_package_docs/fake/SpecialList-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/SubForDocComments-class.html b/testing/test_package_docs/fake/SubForDocComments-class.html index 4f016f30a7..79931e9d68 100644 --- a/testing/test_package_docs/fake/SubForDocComments-class.html +++ b/testing/test_package_docs/fake/SubForDocComments-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/SuperAwesomeClass-class.html b/testing/test_package_docs/fake/SuperAwesomeClass-class.html index 654a2625cd..363270bd4d 100644 --- a/testing/test_package_docs/fake/SuperAwesomeClass-class.html +++ b/testing/test_package_docs/fake/SuperAwesomeClass-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/UP-constant.html b/testing/test_package_docs/fake/UP-constant.html index cf67602e83..63e1d39055 100644 --- a/testing/test_package_docs/fake/UP-constant.html +++ b/testing/test_package_docs/fake/UP-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/VoidCallback.html b/testing/test_package_docs/fake/VoidCallback.html index 9425e7b941..38b92ad76a 100644 --- a/testing/test_package_docs/fake/VoidCallback.html +++ b/testing/test_package_docs/fake/VoidCallback.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/WithGetterAndSetter-class.html b/testing/test_package_docs/fake/WithGetterAndSetter-class.html index cce530fe32..0905560b46 100644 --- a/testing/test_package_docs/fake/WithGetterAndSetter-class.html +++ b/testing/test_package_docs/fake/WithGetterAndSetter-class.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/ZERO-constant.html b/testing/test_package_docs/fake/ZERO-constant.html index 0591c8ab8b..94ee42ef97 100644 --- a/testing/test_package_docs/fake/ZERO-constant.html +++ b/testing/test_package_docs/fake/ZERO-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/addCallback.html b/testing/test_package_docs/fake/addCallback.html index 707edaef4a..30657c03a4 100644 --- a/testing/test_package_docs/fake/addCallback.html +++ b/testing/test_package_docs/fake/addCallback.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/addCallback2.html b/testing/test_package_docs/fake/addCallback2.html index 887a3b68c8..e827557788 100644 --- a/testing/test_package_docs/fake/addCallback2.html +++ b/testing/test_package_docs/fake/addCallback2.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/dynamicGetter.html b/testing/test_package_docs/fake/dynamicGetter.html index 0d7ffb6d01..f855e49f80 100644 --- a/testing/test_package_docs/fake/dynamicGetter.html +++ b/testing/test_package_docs/fake/dynamicGetter.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/fake-library.html b/testing/test_package_docs/fake/fake-library.html index 2662c0c910..18da1c5cd9 100644 --- a/testing/test_package_docs/fake/fake-library.html +++ b/testing/test_package_docs/fake/fake-library.html @@ -358,6 +358,23 @@

    Properties

    A dynamic getter.
    read-only
    +
    +
    + getterSetterNodocGetter + int value + +
    +
    + Setter docs should be shown. +
    write-only
    +
    +
    + getterSetterNodocSetter + → int +
    +
    + Getter docs should be shown. +
    read-only
    justGetter @@ -684,6 +701,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/functionWithFunctionParameters.html b/testing/test_package_docs/fake/functionWithFunctionParameters.html index 18c79a34f0..4c84e6a8cd 100644 --- a/testing/test_package_docs/fake/functionWithFunctionParameters.html +++ b/testing/test_package_docs/fake/functionWithFunctionParameters.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/getterSetterNodocGetter.html b/testing/test_package_docs/fake/getterSetterNodocGetter.html new file mode 100644 index 0000000000..de9610d7b8 --- /dev/null +++ b/testing/test_package_docs/fake/getterSetterNodocGetter.html @@ -0,0 +1,166 @@ + + + + + + + + getterSetterNodocGetter property - fake library - Dart API + + + + + + + + + + + + +
    + +
    + + +
    getterSetterNodocGetter
    + +
    + +
    + + + +
    + + + +
    + +
    + void + getterSetterNodocGetter=(int value) +
    + +
    +

    Setter docs should be shown.

    +
    +
    + + +
    + + + +
    + +
    + + test_package 0.0.1 + + • + + cc license + + +
    + + + + + + + + + + + diff --git a/testing/test_package_docs/fake/getterSetterNodocSetter.html b/testing/test_package_docs/fake/getterSetterNodocSetter.html new file mode 100644 index 0000000000..a00a701da1 --- /dev/null +++ b/testing/test_package_docs/fake/getterSetterNodocSetter.html @@ -0,0 +1,165 @@ + + + + + + + + getterSetterNodocSetter property - fake library - Dart API + + + + + + + + + + + + +
    + +
    + + +
    getterSetterNodocSetter
    + +
    + +
    + + + +
    + + +
    + +
    + int + getterSetterNodocSetter
    + +
    +

    Getter docs should be shown.

    +
    +
    + + + +
    + + + +
    + +
    + + test_package 0.0.1 + + • + + cc license + + +
    + + + + + + + + + + + diff --git a/testing/test_package_docs/fake/greatAnnotation-constant.html b/testing/test_package_docs/fake/greatAnnotation-constant.html index 24d73b1540..da95b07e4b 100644 --- a/testing/test_package_docs/fake/greatAnnotation-constant.html +++ b/testing/test_package_docs/fake/greatAnnotation-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/greatestAnnotation-constant.html b/testing/test_package_docs/fake/greatestAnnotation-constant.html index 7ed4035fe7..ac4b582791 100644 --- a/testing/test_package_docs/fake/greatestAnnotation-constant.html +++ b/testing/test_package_docs/fake/greatestAnnotation-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/incorrectDocReference-constant.html b/testing/test_package_docs/fake/incorrectDocReference-constant.html index 32a91a0162..9ea053ed60 100644 --- a/testing/test_package_docs/fake/incorrectDocReference-constant.html +++ b/testing/test_package_docs/fake/incorrectDocReference-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/justGetter.html b/testing/test_package_docs/fake/justGetter.html index df7d163d1a..9ee305379b 100644 --- a/testing/test_package_docs/fake/justGetter.html +++ b/testing/test_package_docs/fake/justGetter.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/justSetter.html b/testing/test_package_docs/fake/justSetter.html index 86fd29348f..219b30bcfd 100644 --- a/testing/test_package_docs/fake/justSetter.html +++ b/testing/test_package_docs/fake/justSetter.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/mapWithDynamicKeys.html b/testing/test_package_docs/fake/mapWithDynamicKeys.html index a385b7d46f..754d81060d 100644 --- a/testing/test_package_docs/fake/mapWithDynamicKeys.html +++ b/testing/test_package_docs/fake/mapWithDynamicKeys.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/meaningOfLife.html b/testing/test_package_docs/fake/meaningOfLife.html index f593117ee6..696729705e 100644 --- a/testing/test_package_docs/fake/meaningOfLife.html +++ b/testing/test_package_docs/fake/meaningOfLife.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/myCoolTypedef.html b/testing/test_package_docs/fake/myCoolTypedef.html index 4d674110d5..24b05eb189 100644 --- a/testing/test_package_docs/fake/myCoolTypedef.html +++ b/testing/test_package_docs/fake/myCoolTypedef.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/myGenericFunction.html b/testing/test_package_docs/fake/myGenericFunction.html index 7a60f1db49..6b55b64f9d 100644 --- a/testing/test_package_docs/fake/myGenericFunction.html +++ b/testing/test_package_docs/fake/myGenericFunction.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/onlyPositionalWithNoDefaultNoType.html b/testing/test_package_docs/fake/onlyPositionalWithNoDefaultNoType.html index 2883b156dc..c9fae7b5ae 100644 --- a/testing/test_package_docs/fake/onlyPositionalWithNoDefaultNoType.html +++ b/testing/test_package_docs/fake/onlyPositionalWithNoDefaultNoType.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/paintImage1.html b/testing/test_package_docs/fake/paintImage1.html index faa3ea041f..938e702e81 100644 --- a/testing/test_package_docs/fake/paintImage1.html +++ b/testing/test_package_docs/fake/paintImage1.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/paintImage2.html b/testing/test_package_docs/fake/paintImage2.html index b1019e17c2..59d5be413c 100644 --- a/testing/test_package_docs/fake/paintImage2.html +++ b/testing/test_package_docs/fake/paintImage2.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/paramFromAnotherLib.html b/testing/test_package_docs/fake/paramFromAnotherLib.html index c2ea313554..d32230246d 100644 --- a/testing/test_package_docs/fake/paramFromAnotherLib.html +++ b/testing/test_package_docs/fake/paramFromAnotherLib.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/required-constant.html b/testing/test_package_docs/fake/required-constant.html index b2d7840975..c3c43bbef0 100644 --- a/testing/test_package_docs/fake/required-constant.html +++ b/testing/test_package_docs/fake/required-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/setAndGet.html b/testing/test_package_docs/fake/setAndGet.html index 2364869081..7fea3b7dd1 100644 --- a/testing/test_package_docs/fake/setAndGet.html +++ b/testing/test_package_docs/fake/setAndGet.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/short.html b/testing/test_package_docs/fake/short.html index cf99a1f0dd..93bc91a657 100644 --- a/testing/test_package_docs/fake/short.html +++ b/testing/test_package_docs/fake/short.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/simpleProperty.html b/testing/test_package_docs/fake/simpleProperty.html index 3198774b10..8ac0da81a2 100644 --- a/testing/test_package_docs/fake/simpleProperty.html +++ b/testing/test_package_docs/fake/simpleProperty.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/soIntense.html b/testing/test_package_docs/fake/soIntense.html index 1adc1a76b3..2d03fc1b7f 100644 --- a/testing/test_package_docs/fake/soIntense.html +++ b/testing/test_package_docs/fake/soIntense.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/testingCodeSyntaxInOneLiners-constant.html b/testing/test_package_docs/fake/testingCodeSyntaxInOneLiners-constant.html index de26d5b856..27ce6f25cb 100644 --- a/testing/test_package_docs/fake/testingCodeSyntaxInOneLiners-constant.html +++ b/testing/test_package_docs/fake/testingCodeSyntaxInOneLiners-constant.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/thisIsAlsoAsync.html b/testing/test_package_docs/fake/thisIsAlsoAsync.html index 5f0e36fa7f..f042409853 100644 --- a/testing/test_package_docs/fake/thisIsAlsoAsync.html +++ b/testing/test_package_docs/fake/thisIsAlsoAsync.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/thisIsAsync.html b/testing/test_package_docs/fake/thisIsAsync.html index 678171ae51..461cd0b5c3 100644 --- a/testing/test_package_docs/fake/thisIsAsync.html +++ b/testing/test_package_docs/fake/thisIsAsync.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/fake/topLevelFunction.html b/testing/test_package_docs/fake/topLevelFunction.html index e03e2d51d1..fb3f2a9948 100644 --- a/testing/test_package_docs/fake/topLevelFunction.html +++ b/testing/test_package_docs/fake/topLevelFunction.html @@ -76,6 +76,8 @@
    library fake
  • Properties
  • dynamicGetter
  • +
  • getterSetterNodocGetter
  • +
  • getterSetterNodocSetter
  • justGetter
  • justSetter
  • mapWithDynamicKeys
  • diff --git a/testing/test_package_docs/index.json b/testing/test_package_docs/index.json index 7e925df6fe..59525ba546 100644 --- a/testing/test_package_docs/index.json +++ b/testing/test_package_docs/index.json @@ -3363,6 +3363,17 @@ "type": "class" } }, + { + "name": "documentedPartialFieldInSubclassOnly", + "qualifiedName": "fake.ClassWithUnusualProperties.documentedPartialFieldInSubclassOnly", + "href": "fake/ClassWithUnusualProperties/documentedPartialFieldInSubclassOnly.html", + "type": "property", + "overriddenDepth": 0, + "enclosedBy": { + "name": "ClassWithUnusualProperties", + "type": "class" + } + }, { "name": "explicitGetter", "qualifiedName": "fake.ClassWithUnusualProperties.explicitGetter", @@ -3396,6 +3407,17 @@ "type": "class" } }, + { + "name": "explicitNonDocumentedInBaseClassGetter", + "qualifiedName": "fake.ClassWithUnusualProperties.explicitNonDocumentedInBaseClassGetter", + "href": "fake/ClassWithUnusualProperties/explicitNonDocumentedInBaseClassGetter.html", + "type": "property", + "overriddenDepth": 0, + "enclosedBy": { + "name": "ClassWithUnusualProperties", + "type": "class" + } + }, { "name": "explicitSetter", "qualifiedName": "fake.ClassWithUnusualProperties.explicitSetter", @@ -4210,6 +4232,17 @@ "type": "class" } }, + { + "name": "explicitPartiallyDocumentedField", + "qualifiedName": "fake.ImplicitProperties.explicitPartiallyDocumentedField", + "href": "fake/ImplicitProperties/explicitPartiallyDocumentedField.html", + "type": "property", + "overriddenDepth": 0, + "enclosedBy": { + "name": "ImplicitProperties", + "type": "class" + } + }, { "name": "forInheriting", "qualifiedName": "fake.ImplicitProperties.forInheriting", @@ -5915,6 +5948,28 @@ "type": "library" } }, + { + "name": "getterSetterNodocGetter", + "qualifiedName": "fake.getterSetterNodocGetter", + "href": "fake/getterSetterNodocGetter.html", + "type": "top-level property", + "overriddenDepth": 0, + "enclosedBy": { + "name": "fake", + "type": "library" + } + }, + { + "name": "getterSetterNodocSetter", + "qualifiedName": "fake.getterSetterNodocSetter", + "href": "fake/getterSetterNodocSetter.html", + "type": "top-level property", + "overriddenDepth": 0, + "enclosedBy": { + "name": "fake", + "type": "library" + } + }, { "name": "greatAnnotation", "qualifiedName": "fake.greatAnnotation", From 796b4c2c5664ed800f13353605b39168a280ab25 Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Tue, 11 Jul 2017 10:31:20 -0700 Subject: [PATCH 4/6] Add unit tests for nodoc --- test/model_test.dart | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/test/model_test.dart b/test/model_test.dart index 506d5a7245..dab4e310df 100644 --- a/test/model_test.dart +++ b/test/model_test.dart @@ -1207,6 +1207,8 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, Field sFromApple, mFromApple, mInB, autoCompress; Field isEmpty; Field implicitGetterExplicitSetter, explicitGetterImplicitSetter; + Field explicitNonDocumentedInBaseClassGetter; + Field documentedPartialFieldInSubclassOnly; setUp(() { c = exLibrary.classes.firstWhere((c) => c.name == 'Apple'); @@ -1223,6 +1225,10 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, .firstWhere((e) => e.name == 'implicitGetterExplicitSetter'); explicitGetterImplicitSetter = UnusualProperties.allModelElements .firstWhere((e) => e.name == 'explicitGetterImplicitSetter'); + explicitNonDocumentedInBaseClassGetter = UnusualProperties.allModelElements + .firstWhere((e) => e.name == 'explicitNonDocumentedInBaseClassGetter'); + documentedPartialFieldInSubclassOnly = UnusualProperties.allModelElements + .firstWhere((e) => e.name == 'documentedPartialFieldInSubclassOnly'); isEmpty = CatString.allInstanceProperties .firstWhere((p) => p.name == 'isEmpty'); @@ -1254,6 +1260,25 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, .firstWhere((p) => p.name == 'autoCompress'); }); + test('@nodoc on explicit getters/setters hides entire field', () { + Field explicitNodocGetterSetter = UnusualProperties.allModelElements.firstWhere((e) => e.name == 'explicitNodocGetterSetter', orElse: () => null); + expect(explicitNodocGetterSetter, isNull); + }); + + test('@nodoc overridden in subclass with explicit getter over simple property works', () { + expect(documentedPartialFieldInSubclassOnly.isPublic, isTrue); + expect(documentedPartialFieldInSubclassOnly.readOnly, isTrue); + expect(documentedPartialFieldInSubclassOnly.computeDocumentationComment, contains('This getter is documented')); + expect(documentedPartialFieldInSubclassOnly.annotations.contains('inherited-setter'), isFalse); + }); + + test('@nodoc overridden in subclass for getter works', () { + expect(explicitNonDocumentedInBaseClassGetter.isPublic, isTrue); + expect(explicitNonDocumentedInBaseClassGetter.hasPublicGetter, isTrue); + expect(explicitNonDocumentedInBaseClassGetter.computeDocumentationComment, contains('I should be documented')); + expect(explicitNonDocumentedInBaseClassGetter.readOnly, isTrue); + }); + test('split inheritance with explicit setter works', () { expect(implicitGetterExplicitSetter.getter.isInherited, isTrue); expect(implicitGetterExplicitSetter.setter.isInherited, isFalse); @@ -1453,10 +1478,15 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, TopLevelVariable v; TopLevelVariable v3, justGetter, justSetter; TopLevelVariable setAndGet, mapWithDynamicKeys; + TopLevelVariable nodocGetter, nodocSetter; setUp(() { v = exLibrary.properties.firstWhere((p) => p.name == 'number'); v3 = exLibrary.properties.firstWhere((p) => p.name == 'y'); + nodocGetter = + fakeLibrary.properties.firstWhere((p) => p.name == 'getterSetterNodocGetter'); + nodocSetter = + fakeLibrary.properties.firstWhere((p) => p.name == 'getterSetterNodocSetter'); justGetter = fakeLibrary.properties.firstWhere((p) => p.name == 'justGetter'); justSetter = @@ -1467,6 +1497,28 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, .firstWhere((p) => p.name == 'mapWithDynamicKeys'); }); + test('@nodoc on simple property works', () { + TopLevelVariable nodocSimple = fakeLibrary.properties.firstWhere((p) => p.name == 'simplePropertyHidden', orElse: () => null); + expect(nodocSimple, isNull); + }); + + test('@nodoc on both hides both', () { + TopLevelVariable nodocBoth = fakeLibrary.properties.firstWhere((p) => p.name == 'getterSetterNodocBoth', orElse: () => null); + expect(nodocBoth, isNull); + }); + + test('@nodoc on setter only works', () { + expect(nodocSetter.isPublic, isTrue); + expect(nodocSetter.readOnly, isTrue); + expect(nodocSetter.computeDocumentationComment, equals('Getter docs should be shown.')); + }); + + test('@nodoc on getter only works', () { + expect(nodocGetter.isPublic, isTrue); + expect(nodocGetter.writeOnly, isTrue); + expect(nodocGetter.computeDocumentationComment, equals('Setter docs should be shown.')); + }); + test('has a fully qualified name', () { expect(justGetter.fullyQualifiedName, 'fake.justGetter'); }); From d996e11acab848355fb7c62835acceaa3a8df376 Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Tue, 11 Jul 2017 10:35:04 -0700 Subject: [PATCH 5/6] A few more tests --- test/model_test.dart | 5 +++++ testing/test_package/lib/fake.dart | 3 +++ 2 files changed, 8 insertions(+) diff --git a/test/model_test.dart b/test/model_test.dart index dab4e310df..12cad9f9c4 100644 --- a/test/model_test.dart +++ b/test/model_test.dart @@ -1260,6 +1260,11 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, .firstWhere((p) => p.name == 'autoCompress'); }); + test('@nodoc on simple property works', () { + Field simpleHidden = UnusualProperties.allModelElements.firstWhere((e) => e.name == 'simpleHidden', orElse: () => null); + expect(simpleHidden, isNull); + }); + test('@nodoc on explicit getters/setters hides entire field', () { Field explicitNodocGetterSetter = UnusualProperties.allModelElements.firstWhere((e) => e.name == 'explicitNodocGetterSetter', orElse: () => null); expect(explicitNodocGetterSetter, isNull); diff --git a/testing/test_package/lib/fake.dart b/testing/test_package/lib/fake.dart index 1e556165ce..6631ce08d1 100644 --- a/testing/test_package/lib/fake.dart +++ b/testing/test_package/lib/fake.dart @@ -239,6 +239,9 @@ class ClassWithUnusualProperties extends ImplicitProperties { return _aFunction; } + /// @nodoc for a simple hidden property. + String simpleHidden; + /// @nodoc on setter set explicitNodocGetterSetter(String s) {} /// @nodoc on getter From 453e0d09fb6fe0ac76c3993c9ba5aa01aeb10ead Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Tue, 11 Jul 2017 10:35:15 -0700 Subject: [PATCH 6/6] dartfmt --- lib/src/model.dart | 54 +++++++++++++++++++----------- test/model_test.dart | 49 ++++++++++++++++++--------- testing/test_package/lib/fake.dart | 6 ++++ 3 files changed, 73 insertions(+), 36 deletions(-) diff --git a/lib/src/model.dart b/lib/src/model.dart index 463a92f8d0..a9cb1a8e4a 100644 --- a/lib/src/model.dart +++ b/lib/src/model.dart @@ -474,10 +474,13 @@ class Class extends ModelElement implements EnclosedElement { List get constructors { if (_constructors != null) return _constructors; - _constructors = _cls.constructors.map((e) { - return new ModelElement.from(e, library); - }).where((e) => e.isPublic).toList(growable: true) - ..sort(byName); + _constructors = _cls.constructors + .map((e) { + return new ModelElement.from(e, library); + }) + .where((e) => e.isPublic) + .toList(growable: true) + ..sort(byName); return _constructors; } @@ -934,7 +937,8 @@ class Class extends ModelElement implements EnclosedElement { if ((getter == null || getter.isInherited) && (setter == null || setter.isInherited)) { // Field is 100% inherited. - field = new ModelElement.from(f, library, enclosingClass: this, getter: getter, setter: setter); + field = new ModelElement.from(f, library, + enclosingClass: this, getter: getter, setter: setter); } else { // Field is <100% inherited (could be half-inherited). // TODO(jcollins-g): Navigation is probably still confusing for @@ -952,10 +956,13 @@ class Class extends ModelElement implements EnclosedElement { List get _methods { if (_allMethods != null) return _allMethods; - _allMethods = _cls.methods.map((e) { - return new ModelElement.from(e, library); - }).where((e) => e.isPublic).toList(growable: false) - ..sort(byName); + _allMethods = _cls.methods + .map((e) { + return new ModelElement.from(e, library); + }) + .where((e) => e.isPublic) + .toList(growable: false) + ..sort(byName); return _allMethods; } @@ -1079,11 +1086,11 @@ class Enum extends Class { var index = -1; _enumFields = []; - for (FieldElement f - in _cls.fields.where((f) => f.isConst)) { + for (FieldElement f in _cls.fields.where((f) => f.isConst)) { // Enums do not have inheritance. Accessor accessor = new ModelElement.from(f.getter, library); - EnumField enumField = new ModelElement.from(f, library, index: index++, getter: accessor); + EnumField enumField = + new ModelElement.from(f, library, index: index++, getter: accessor); if (enumField.isPublic) _enumFields.add(enumField); } _enumFields.sort(byName); @@ -1206,7 +1213,8 @@ class Field extends ModelElement String get documentation { // Verify that hasSetter and hasGetterNoSetter are mutually exclusive, // to prevent displaying more or less than one summary. - Set assertCheck = new Set()..addAll([hasPublicSetter, hasPublicGetterNoSetter]); + Set assertCheck = new Set() + ..addAll([hasPublicSetter, hasPublicGetterNoSetter]); assert(assertCheck.containsAll([true, false])); return super.documentation; } @@ -1631,10 +1639,13 @@ class Library extends ModelElement { elements.addAll(_exportedNamespace.definedNames.values .where((element) => element is FunctionElement)); - _functions = elements.map((e) { - return new ModelElement.from(e, this); - }).where((e) => e.isPublic).toList(growable: false) - ..sort(byName); + _functions = elements + .map((e) { + return new ModelElement.from(e, this); + }) + .where((e) => e.isPublic) + .toList(growable: false) + ..sort(byName); return _functions; } @@ -1820,7 +1831,8 @@ class Library extends ModelElement { Accessor setter; if (element.setter != null) setter = new ModelElement.from(element.setter, this); - ModelElement me = new ModelElement.from(element, this, getter: getter, setter: setter); + ModelElement me = + new ModelElement.from(element, this, getter: getter, setter: setter); if (me.isPublic) _variables.add(me); } @@ -2354,7 +2366,8 @@ abstract class ModelElement extends Nameable if (docComment == null) { _isPublic = hasPublicName(element); } else { - _isPublic = hasPublicName(element) && !(docComment.contains('@nodoc') || docComment.contains('')); + _isPublic = hasPublicName(element) && + !(docComment.contains('@nodoc') || docComment.contains('')); } } return _isPublic; @@ -4422,7 +4435,8 @@ class TopLevelVariable extends ModelElement String get documentation { // Verify that hasSetter and hasGetterNoSetter are mutually exclusive, // to prevent displaying more or less than one summary. - Set assertCheck = new Set()..addAll([hasPublicSetter, hasPublicGetterNoSetter]); + Set assertCheck = new Set() + ..addAll([hasPublicSetter, hasPublicGetterNoSetter]); assert(assertCheck.containsAll([true, false])); return super.documentation; } diff --git a/test/model_test.dart b/test/model_test.dart index 12cad9f9c4..dc6eca538c 100644 --- a/test/model_test.dart +++ b/test/model_test.dart @@ -1225,8 +1225,9 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, .firstWhere((e) => e.name == 'implicitGetterExplicitSetter'); explicitGetterImplicitSetter = UnusualProperties.allModelElements .firstWhere((e) => e.name == 'explicitGetterImplicitSetter'); - explicitNonDocumentedInBaseClassGetter = UnusualProperties.allModelElements - .firstWhere((e) => e.name == 'explicitNonDocumentedInBaseClassGetter'); + explicitNonDocumentedInBaseClassGetter = + UnusualProperties.allModelElements.firstWhere( + (e) => e.name == 'explicitNonDocumentedInBaseClassGetter'); documentedPartialFieldInSubclassOnly = UnusualProperties.allModelElements .firstWhere((e) => e.name == 'documentedPartialFieldInSubclassOnly'); @@ -1261,26 +1262,36 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, }); test('@nodoc on simple property works', () { - Field simpleHidden = UnusualProperties.allModelElements.firstWhere((e) => e.name == 'simpleHidden', orElse: () => null); + Field simpleHidden = UnusualProperties.allModelElements + .firstWhere((e) => e.name == 'simpleHidden', orElse: () => null); expect(simpleHidden, isNull); }); test('@nodoc on explicit getters/setters hides entire field', () { - Field explicitNodocGetterSetter = UnusualProperties.allModelElements.firstWhere((e) => e.name == 'explicitNodocGetterSetter', orElse: () => null); + Field explicitNodocGetterSetter = UnusualProperties.allModelElements + .firstWhere((e) => e.name == 'explicitNodocGetterSetter', + orElse: () => null); expect(explicitNodocGetterSetter, isNull); }); - test('@nodoc overridden in subclass with explicit getter over simple property works', () { + test( + '@nodoc overridden in subclass with explicit getter over simple property works', + () { expect(documentedPartialFieldInSubclassOnly.isPublic, isTrue); expect(documentedPartialFieldInSubclassOnly.readOnly, isTrue); - expect(documentedPartialFieldInSubclassOnly.computeDocumentationComment, contains('This getter is documented')); - expect(documentedPartialFieldInSubclassOnly.annotations.contains('inherited-setter'), isFalse); + expect(documentedPartialFieldInSubclassOnly.computeDocumentationComment, + contains('This getter is documented')); + expect( + documentedPartialFieldInSubclassOnly.annotations + .contains('inherited-setter'), + isFalse); }); test('@nodoc overridden in subclass for getter works', () { expect(explicitNonDocumentedInBaseClassGetter.isPublic, isTrue); expect(explicitNonDocumentedInBaseClassGetter.hasPublicGetter, isTrue); - expect(explicitNonDocumentedInBaseClassGetter.computeDocumentationComment, contains('I should be documented')); + expect(explicitNonDocumentedInBaseClassGetter.computeDocumentationComment, + contains('I should be documented')); expect(explicitNonDocumentedInBaseClassGetter.readOnly, isTrue); }); @@ -1488,10 +1499,10 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, setUp(() { v = exLibrary.properties.firstWhere((p) => p.name == 'number'); v3 = exLibrary.properties.firstWhere((p) => p.name == 'y'); - nodocGetter = - fakeLibrary.properties.firstWhere((p) => p.name == 'getterSetterNodocGetter'); - nodocSetter = - fakeLibrary.properties.firstWhere((p) => p.name == 'getterSetterNodocSetter'); + nodocGetter = fakeLibrary.properties + .firstWhere((p) => p.name == 'getterSetterNodocGetter'); + nodocSetter = fakeLibrary.properties + .firstWhere((p) => p.name == 'getterSetterNodocSetter'); justGetter = fakeLibrary.properties.firstWhere((p) => p.name == 'justGetter'); justSetter = @@ -1503,25 +1514,31 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans, }); test('@nodoc on simple property works', () { - TopLevelVariable nodocSimple = fakeLibrary.properties.firstWhere((p) => p.name == 'simplePropertyHidden', orElse: () => null); + TopLevelVariable nodocSimple = fakeLibrary.properties.firstWhere( + (p) => p.name == 'simplePropertyHidden', + orElse: () => null); expect(nodocSimple, isNull); }); test('@nodoc on both hides both', () { - TopLevelVariable nodocBoth = fakeLibrary.properties.firstWhere((p) => p.name == 'getterSetterNodocBoth', orElse: () => null); + TopLevelVariable nodocBoth = fakeLibrary.properties.firstWhere( + (p) => p.name == 'getterSetterNodocBoth', + orElse: () => null); expect(nodocBoth, isNull); }); test('@nodoc on setter only works', () { expect(nodocSetter.isPublic, isTrue); expect(nodocSetter.readOnly, isTrue); - expect(nodocSetter.computeDocumentationComment, equals('Getter docs should be shown.')); + expect(nodocSetter.computeDocumentationComment, + equals('Getter docs should be shown.')); }); test('@nodoc on getter only works', () { expect(nodocGetter.isPublic, isTrue); expect(nodocGetter.writeOnly, isTrue); - expect(nodocGetter.computeDocumentationComment, equals('Setter docs should be shown.')); + expect(nodocGetter.computeDocumentationComment, + equals('Setter docs should be shown.')); }); test('has a fully qualified name', () { diff --git a/testing/test_package/lib/fake.dart b/testing/test_package/lib/fake.dart index 6631ce08d1..91b42e9ce1 100644 --- a/testing/test_package/lib/fake.dart +++ b/testing/test_package/lib/fake.dart @@ -199,6 +199,7 @@ class ImplicitProperties { /// but documented here. double get explicitPartiallyDocumentedField => 1.3; + /// @nodoc here, you should never see this set explicitPartiallyDocumentedField(double foo) {} @@ -225,6 +226,7 @@ class ClassWithUnusualProperties extends ImplicitProperties { set implicitGetterExplicitSetter(String x) {} @override + /// Getter doc for explicitGetterImplicitSetter List get explicitGetterImplicitSetter => new List(); @@ -244,6 +246,7 @@ class ClassWithUnusualProperties extends ImplicitProperties { /// @nodoc on setter set explicitNodocGetterSetter(String s) {} + /// @nodoc on getter String get explicitNodocGetterSetter => "something"; @@ -396,16 +399,19 @@ String simplePropertyHidden; /// Setter docs should be shown. set getterSetterNodocGetter(int value) {} + /// @nodoc on getter. int get getterSetterNodocGetter => 3; /// @nodoc on setter set getterSetterNodocSetter(int value) {} + /// Getter docs should be shown. int get getterSetterNodocSetter => 4; /// @nodoc on the setter set getterSetterNodocBoth(String value) {} + /// And @nodoc on the getter, so entire TopLevelVariable should be invisible. String get getterSetterNodocBoth => "I do not exist";