Skip to content

Commit

Permalink
Updates EnumEntry extras in documentable translators
Browse files Browse the repository at this point in the history
  • Loading branch information
BarkingBad committed Jan 17, 2022
1 parent 175ca17 commit 253024a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Expand Up @@ -82,7 +82,6 @@ open class DokkaLocationProvider(
val driWithSourceSets = DRIWithSourceSets(dri, setOfNotNull(sourceSet))
getLocalLocation(driWithSourceSets, context)
?: getLocalLocation(driWithSourceSets.copy(dri = dri.copy(target = PointingToDeclaration)), context)
?: getLocalLocation(driWithSourceSets.copy(dri = dri.copy(target = PointingToDeclaration, extra = null)), context)
// Not found in PageGraph, that means it's an external link
?: getExternalLocation(dri, sourceSets)
?: getExternalLocation(dri.copy(target = PointingToDeclaration), sourceSets)
Expand Down
Expand Up @@ -306,7 +306,7 @@ private class DokkaDescriptorVisitor(
val classlikes = async { descriptorsWithKind.classlikes.visitClasslikes(driWithPlatform) }

DEnumEntry(
dri = driWithPlatform.dri,
dri = driWithPlatform.dri.copy(extra = DRIExtraContainer().also { it[EnumEntryDRIExtra] = EnumEntryDRIExtra }.encode()),
name = descriptor.name.asString(),
documentation = descriptor.resolveDescriptorData(),
functions = functions.await(),
Expand Down
Expand Up @@ -269,7 +269,7 @@ class DefaultPsiToDocumentableTranslator(
name.orEmpty(),
fields.filterIsInstance<PsiEnumConstant>().map { entry ->
DEnumEntry(
dri.withClass(entry.name),
dri.withClass(entry.name).copy(extra = DRIExtraContainer().also { it[EnumEntryDRIExtra] = EnumEntryDRIExtra }.encode()),
entry.name,
javadocParser.parseDocumentation(entry).toSourceSetDependent(),
null,
Expand Down

0 comments on commit 253024a

Please sign in to comment.