aboutsummaryrefslogtreecommitdiff
path: root/src/Formats/StandardFormats.kt
blob: 94e1b115a19e3c903d5b050bece1eb5640ac1c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package org.jetbrains.dokka.Formats

import org.jetbrains.dokka.*

abstract class KotlinFormatDescriptorBase : FormatDescriptor {
    override val packageDocumentationBuilderClass = KotlinPackageDocumentationBuilder::class
    override val javaDocumentationBuilderClass = KotlinJavaDocumentationBuilder::class

    override val generatorServiceClass = FileGenerator::class
}

class HtmlFormatDescriptor : KotlinFormatDescriptorBase() {
    override val formatServiceClass = HtmlFormatService::class
    override val outlineServiceClass = HtmlFormatService::class
}

class HtmlAsJavaFormatDescriptor : FormatDescriptor {
    override val formatServiceClass = HtmlFormatService::class
    override val outlineServiceClass = HtmlFormatService::class
    override val generatorServiceClass = FileGenerator::class
    override val packageDocumentationBuilderClass = KotlinAsJavaDocumentationBuilder::class
    override val javaDocumentationBuilderClass = JavaPsiDocumentationBuilder::class
}

class KotlinWebsiteFormatDescriptor : KotlinFormatDescriptorBase() {
    override val formatServiceClass = KotlinWebsiteFormatService::class
    override val outlineServiceClass = YamlOutlineService::class
}

class JekyllFormatDescriptor : KotlinFormatDescriptorBase() {
    override val formatServiceClass = JekyllFormatService::class
    override val outlineServiceClass = null
}

class MarkdownFormatDescriptor : KotlinFormatDescriptorBase() {
    override val formatServiceClass = MarkdownFormatService::class
    override val outlineServiceClass = null
}