aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProviderFactory.kt
blob: 1918472b348b177fffa5c6c46a59402cf4732d81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package org.jetbrains.dokka.base.resolvers.local

import org.jetbrains.dokka.pages.MultimoduleRootPageNode
import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaContext

class DefaultLocationProviderFactory(private val context: DokkaContext) : LocationProviderFactory {

    override fun getLocationProvider(pageNode: RootPageNode) =
        if (pageNode.children.first() is MultimoduleRootPageNode) MultimoduleLocationProvider(pageNode, context)
        else DefaultLocationProvider(pageNode, context)
}