From 3faa3f2d1c7ca33ad8d98bc6c562e4fe6977225f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 27 Oct 2015 17:12:31 +0100 Subject: summarize signatures for overloaded stdlib functions --- src/Languages/JavaLanguageService.kt | 2 ++ src/Languages/LanguageService.kt | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src/Languages') diff --git a/src/Languages/JavaLanguageService.kt b/src/Languages/JavaLanguageService.kt index bcd058b5..cf0f127b 100644 --- a/src/Languages/JavaLanguageService.kt +++ b/src/Languages/JavaLanguageService.kt @@ -34,6 +34,8 @@ public class JavaLanguageService : LanguageService { } } + override fun summarizeSignatures(nodes: List): ContentNode? = null + private fun renderPackage(node: DocumentationNode): String { return "package ${node.name}" } diff --git a/src/Languages/LanguageService.kt b/src/Languages/LanguageService.kt index c587335a..b0f4bbc9 100644 --- a/src/Languages/LanguageService.kt +++ b/src/Languages/LanguageService.kt @@ -12,12 +12,18 @@ interface LanguageService { } /** - * Renders a [node](DocumentationNode) as a class, function, property or other signature in a target language. - * $node: A [DocumentationNode] to render - * $returns: [ContentNode] which is a root for a rich content tree suitable for formatting with [FormatService] + * Renders a [node] as a class, function, property or other signature in a target language. + * @param node A [DocumentationNode] to render + * @return [ContentNode] which is a root for a rich content tree suitable for formatting with [FormatService] */ fun render(node: DocumentationNode, renderMode: RenderMode = RenderMode.FULL): ContentNode + /** + * Tries to summarize the signatures of the specified documentation nodes in a compact representation. + * Returns the representation if successful, or null if the signatures could not be summarized. + */ + fun summarizeSignatures(nodes: List): ContentNode? + /** * Renders [node] as a named representation in the target language * -- cgit