aboutsummaryrefslogtreecommitdiff
path: root/src/Languages
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-01-13 16:26:11 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2015-01-13 16:26:11 +0100
commit891cc8569d535c3ac5ade23d7fd56dbca619e05b (patch)
tree4a9d5eec58105cd5cf28e88613156c55f1adbb3f /src/Languages
parent19ec79c91350e91449d01d4e1823313af1dd81bc (diff)
parent1ce5373a1f6c99d01db2156a833fcd796ef53e27 (diff)
downloaddokka-891cc8569d535c3ac5ade23d7fd56dbca619e05b.tar.gz
dokka-891cc8569d535c3ac5ade23d7fd56dbca619e05b.tar.bz2
dokka-891cc8569d535c3ac5ade23d7fd56dbca619e05b.zip
Merge pull request #11 from orangy/enum-members
better display for enum members
Diffstat (limited to 'src/Languages')
-rw-r--r--src/Languages/JavaLanguageService.kt3
-rw-r--r--src/Languages/LanguageService.kt9
2 files changed, 10 insertions, 2 deletions
diff --git a/src/Languages/JavaLanguageService.kt b/src/Languages/JavaLanguageService.kt
index 8cc54d4a..7446b34f 100644
--- a/src/Languages/JavaLanguageService.kt
+++ b/src/Languages/JavaLanguageService.kt
@@ -1,12 +1,13 @@
package org.jetbrains.dokka
import org.jetbrains.dokka.DocumentationNode.*
+import org.jetbrains.dokka.LanguageService.RenderMode
/**
* Implements [LanguageService] and provides rendering of symbols in Java language
*/
public class JavaLanguageService : LanguageService {
- override fun render(node: DocumentationNode): ContentNode {
+ override fun render(node: DocumentationNode, renderMode: RenderMode): ContentNode {
return ContentText(when (node.kind) {
Kind.Package -> renderPackage(node)
Kind.Class,
diff --git a/src/Languages/LanguageService.kt b/src/Languages/LanguageService.kt
index 97f8e621..3508b48d 100644
--- a/src/Languages/LanguageService.kt
+++ b/src/Languages/LanguageService.kt
@@ -4,12 +4,19 @@ package org.jetbrains.dokka
* Provides facility for rendering [DocumentationNode] as a language-dependent declaration
*/
trait LanguageService {
+ enum class RenderMode {
+ /** Brief signature (used in a list of all members of the class). */
+ SUMMARY
+ /** Full signature (used in the page describing the member itself */
+ FULL
+ }
+
/**
* 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]
*/
- fun render(node: DocumentationNode): ContentNode
+ fun render(node: DocumentationNode, renderMode: RenderMode = RenderMode.FULL): ContentNode
/**
* Renders [node] as a named representation in the target language