From 78850b5786b7b2a767db1dbd7132a374b2f4f227 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Wed, 25 Nov 2020 11:54:20 +0100 Subject: Make searchbar an extension point (#1615) * Make searchbar an extension point * Change SearchbarDataInstaller to be a preprocessor * Split navigation and navigation search --- core/src/main/kotlin/pages/RendererSpecificPage.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/pages/RendererSpecificPage.kt b/core/src/main/kotlin/pages/RendererSpecificPage.kt index d7f4491a..a057b95e 100644 --- a/core/src/main/kotlin/pages/RendererSpecificPage.kt +++ b/core/src/main/kotlin/pages/RendererSpecificPage.kt @@ -5,7 +5,8 @@ import org.jetbrains.dokka.model.DisplaySourceSet import org.jetbrains.dokka.renderers.Renderer import kotlin.reflect.KClass -typealias LocationResolver = (DRI, Set) -> String +fun interface DriResolver: (DRI, Set) -> String? +fun interface PageResolver: (PageNode, PageNode?) -> String? interface RendererSpecificPage : PageNode { val strategy: RenderingStrategy @@ -33,7 +34,8 @@ sealed class RenderingStrategy { class Callback(val instructions: Renderer.(PageNode) -> String): RenderingStrategy() data class Copy(val from: String) : RenderingStrategy() data class Write(val text: String) : RenderingStrategy() - data class LocationResolvableWrite(val contentToResolve: (LocationResolver) -> String) : RenderingStrategy() + data class DriLocationResolvableWrite(val contentToResolve: (DriResolver) -> String) : RenderingStrategy() + data class PageLocationResolvableWrite(val contentToResolve: (PageResolver) -> String) : RenderingStrategy() object DoNothing : RenderingStrategy() companion object { -- cgit