aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-17 22:32:22 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-18 12:01:49 +0200
commit7206b741923e2cc4fb56245dc9991bc2149d576b (patch)
tree4f28835334c5caa8261a4d9cb89476d9ffebabe1
parent03aaa89d69524fc922f40cf215e5b39da06305cf (diff)
downloaddokka-7206b741923e2cc4fb56245dc9991bc2149d576b.tar.gz
dokka-7206b741923e2cc4fb56245dc9991bc2149d576b.tar.bz2
dokka-7206b741923e2cc4fb56245dc9991bc2149d576b.zip
Remove old runners/xml folder
-rw-r--r--plugins/xml/build.gradle.kts3
-rw-r--r--plugins/xml/src/main/kotlin/XmlPlugin.kt63
-rw-r--r--plugins/xml/src/main/kotlin/utils.kt1
-rw-r--r--plugins/xml/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin1
4 files changed, 0 insertions, 68 deletions
diff --git a/plugins/xml/build.gradle.kts b/plugins/xml/build.gradle.kts
deleted file mode 100644
index 5d3984bc..00000000
--- a/plugins/xml/build.gradle.kts
+++ /dev/null
@@ -1,3 +0,0 @@
-import org.jetbrains.configurePublication
-
-configurePublication("xml-plugin") \ No newline at end of file
diff --git a/plugins/xml/src/main/kotlin/XmlPlugin.kt b/plugins/xml/src/main/kotlin/XmlPlugin.kt
deleted file mode 100644
index e19b76b3..00000000
--- a/plugins/xml/src/main/kotlin/XmlPlugin.kt
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.jetbrains.dokka.xml
-
-import org.jetbrains.dokka.CoreExtensions
-import org.jetbrains.dokka.model.Documentable
-import org.jetbrains.dokka.model.dfs
-import org.jetbrains.dokka.pages.*
-import org.jetbrains.dokka.plugability.DokkaContext
-import org.jetbrains.dokka.plugability.DokkaPlugin
-import org.jetbrains.dokka.plugability.single
-import org.jetbrains.dokka.transformers.descriptors.XMLMega
-import org.jetbrains.dokka.transformers.pages.PageNodeTransformer
-
-class XmlPlugin : DokkaPlugin() {
- val transformer by extending {
- CoreExtensions.pageTransformer providing ::XmlTransformer
- }
-}
-
-class XmlTransformer(private val dokkaContext: DokkaContext) : PageNodeTransformer {
- private val commentsToContentConverter by lazy { dokkaContext.single(CoreExtensions.commentsToContentConverter) }
-
- enum class XMLKind : Kind {
- Main, XmlList
- }
-
- override fun invoke(input: RootPageNode): RootPageNode =
- input.transformPageNodeTree { if (it is ModulePageNode) transformModule(it) else it }
-
- private fun transformModule(module: ModulePageNode) = module.transformContentPagesTree { node ->
- if (node !is ClasslikePageNode) node
- else {
- val refs =
- node.documentable?.extra?.filterIsInstance<XMLMega>()?.filter { it.key == "@attr ref" }
- .orEmpty()
- val elementsToAdd = mutableListOf<Documentable>()
-
- refs.forEach { ref ->
- module.documentable?.dfs { it.dri == ref.dri }?.let { elementsToAdd.add(it) }
- }
- val platformData = node.platforms().toSet()
- val refTable = DefaultPageContentBuilder.group(
- node.dri,
- platformData,
- XMLKind.XmlList,
- commentsToContentConverter,
- dokkaContext.logger
- ) {
- block("XML Attributes", 2, XMLKind.XmlList, elementsToAdd, platformData) { element ->
- link(element.dri, XMLKind.XmlList) {
- text(element.name ?: "<unnamed>", XMLKind.Main)
- }
- text(element.briefDocTagString, XMLKind.XmlList)
- }
- }
-
- val content = node.content as ContentGroup
- val children = (node.content as ContentGroup).children
- node.modified(content = content.copy(children = children + refTable))
- }
- }
-
- private fun ContentPage.platforms() = this.content.platforms.toList()
-} \ No newline at end of file
diff --git a/plugins/xml/src/main/kotlin/utils.kt b/plugins/xml/src/main/kotlin/utils.kt
deleted file mode 100644
index 2f5f1893..00000000
--- a/plugins/xml/src/main/kotlin/utils.kt
+++ /dev/null
@@ -1 +0,0 @@
-package org.jetbrains.dokka.xml \ No newline at end of file
diff --git a/plugins/xml/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/plugins/xml/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin
deleted file mode 100644
index ebc3e551..00000000
--- a/plugins/xml/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin
+++ /dev/null
@@ -1 +0,0 @@
-org.jetbrains.dokka.xml.XmlPlugin