mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
generate_descriptor_pages.main.kts: Support namespace
This commit is contained in:
parent
91f5d174d5
commit
40962c3a86
@ -165,6 +165,7 @@ fun StringBuilder.appendElement(
|
|||||||
appendReferences(element.references)
|
appendReferences(element.references)
|
||||||
element.description?.trim()?.let { appendLine("$it\n") }
|
element.description?.trim()?.let { appendLine("$it\n") }
|
||||||
appendDeprecationVersion(element.deprecatedSince)
|
appendDeprecationVersion(element.deprecatedSince)
|
||||||
|
appendNamespace(element.namespace)
|
||||||
appendSupportDetails(element.sdkDocsSupportDetails)
|
appendSupportDetails(element.sdkDocsSupportDetails)
|
||||||
appendRequirement(element.requirement)
|
appendRequirement(element.requirement)
|
||||||
appendDefaultValue(element.defaultValue)
|
appendDefaultValue(element.defaultValue)
|
||||||
@ -232,6 +233,15 @@ fun StringBuilder.appendDeprecationVersion(deprecatedSince: String?) {
|
|||||||
appendLine("since $deprecatedSince\n")
|
appendLine("since $deprecatedSince\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun StringBuilder.appendNamespace(namespace: String?) {
|
||||||
|
namespace ?: return
|
||||||
|
appendLine("{type=\"narrow\"}")
|
||||||
|
appendLine("Namespace")
|
||||||
|
appendLine(":")
|
||||||
|
appendLine("`$namespace`")
|
||||||
|
appendLine()
|
||||||
|
}
|
||||||
|
|
||||||
fun StringBuilder.appendSupportDetails(supportDetails: String?) {
|
fun StringBuilder.appendSupportDetails(supportDetails: String?) {
|
||||||
supportDetails ?: return
|
supportDetails ?: return
|
||||||
appendLine("{type=\"narrow\"}")
|
appendLine("{type=\"narrow\"}")
|
||||||
@ -524,6 +534,7 @@ data class Element(
|
|||||||
var name: String? = null,
|
var name: String? = null,
|
||||||
var descriptiveName: String? = null,
|
var descriptiveName: String? = null,
|
||||||
var sdkDocsFixedPath: List<String> = emptyList(),
|
var sdkDocsFixedPath: List<String> = emptyList(),
|
||||||
|
var namespace: String? = null,
|
||||||
var since: String? = null,
|
var since: String? = null,
|
||||||
var until: String? = null,
|
var until: String? = null,
|
||||||
var deprecatedSince: String? = null,
|
var deprecatedSince: String? = null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user