Updating helpdoc such that it is aware of the new "multidimension"

also with respect to PWgui.
This commit is contained in:
Tone Kokalj 2019-03-01 17:55:37 +01:00
parent 7a8a7ffe09
commit c6627c4fbf
4 changed files with 36 additions and 15 deletions

View File

@ -67,7 +67,7 @@ proc ::helpdoc::getFontlockKeys {tree node action} {
lappend fontlock(namelists) $name
lappend defun($module,namelists) $name
}
var - dimension {
var - dimension - multidimension {
if { $inside_namelist } {
set bare_name [lindex [split $name \(] 0]; # strips "(index)" from variable's name if var is a dimension
lappend fontlock(vars) $bare_name

View File

@ -27,7 +27,10 @@
<!-- *** NAMELIST *** -->
<xsl:template match="namelist">
<xsl:apply-templates match="descendant::var | descendant::vargroup | descendant::dimension | descendant::dimensiongroup | descendant::table"/>
<xsl:apply-templates match="descendant::var | descendant::vargroup |
descendant::dimension | descendant::dimensiongroup |
descendant::multidimension | descendant::multidimensiongroup |
descendant::table"/>
</xsl:template>
@ -44,8 +47,10 @@
}
</xsl:if>
<xsl:apply-templates select="descendant::var | descendant::vargroup | descendant::dimension |
descendant::dimensiongroup | descendant::list | descendant::table"
<xsl:apply-templates select="descendant::var | descendant::vargroup |
descendant::dimension | descendant::dimensiongroup |
descendant::multidimension | descendant::multidimensiongroup |
descendant::list | descendant::table"
mode="card_description"/>
</xsl:template>
@ -59,17 +64,17 @@
</xsl:template>
<!-- *** VAR | DIMENSION | LIST *** -->
<!-- *** VAR | DIMENSION | MULTIDIMENSION | LIST *** -->
<xsl:template match="var | dimension | vargroup | dimensiongroup |
<xsl:template match="var | dimension | multidimension | vargroup | dimensiongroup | multidimensiongroup |
list | list/format" mode="card_description">
<xsl:if test="info != '' or options != '' or status != '' or see != ''">
<xsl:apply-templates select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="var | dimension">
<xsl:if test="name(..) != 'vargroup' and name(..) != 'dimensiongroup'">
<xsl:template match="var | dimension | multidimension">
<xsl:if test="name(..) != 'vargroup' and name(..) != 'dimensiongroup' and name(..) != 'multidimensiongroup'">
help <xsl:value-of select="@name"/> {
<ul>
<xsl:choose>
@ -79,6 +84,9 @@
<xsl:when test="name(.)='dimension'">
<li><xsl:text>&#160;</xsl:text> <em>Variables: </em> <big><b><xsl:value-of select="@name"/>(i), i=<xsl:value-of select="@start"/>,<xsl:value-of select="@end"/></b></big></li><br/>
</xsl:when>
<xsl:when test="name(.)='multidimension'">
<li><xsl:text>&#160;</xsl:text> <em>Variables: </em> <big><b><xsl:value-of select="@name"/>(<xsl:value-of select="@indexes"/>), (<xsl:value-of select="@indexes"/>) = (<xsl:value-of select="@start"/>) ... (<xsl:value-of select="@end"/>)</b></big></li><br/>
</xsl:when>
</xsl:choose>
<li><xsl:text>&#160;</xsl:text> <em>Type: </em> <xsl:value-of select="@type"/></li><br/>
@ -120,11 +128,11 @@
}
</xsl:template>
<!-- *** VARGROUP | DIMENSIONGROUP *** -->
<!-- *** VARGROUP | DIMENSIONGROUP | MULTIDIMENSIONGROUP *** -->
<xsl:template match="vargroup | dimensiongroup">
<xsl:template match="vargroup | dimensiongroup | multidimensiongroup">
grouphelp {
<xsl:for-each select="var | dimension">
<xsl:for-each select="var | dimension | multidimension">
<xsl:value-of select="@name"/><xsl:text> </xsl:text>
</xsl:for-each>
} {
@ -152,6 +160,19 @@
</li><br/>
</xsl:if>
<xsl:if test="name(.)='multidimensiongroup'">
<li><xsl:text>&#160;</xsl:text> <em>Variables: </em>
<big><b>
<xsl:for-each select="multidimension">
<xsl:value-of select="@name"/>(<xsl:value-of select="@indexes"/>),
<xsl:if test="position()=last()">
(<xsl:value-of select="@indexes"/>) = (<xsl:value-of select="@start"/>) ... (<xsl:value-of select="@end"/>)
</xsl:if>
</xsl:for-each>
</b></big>
</li><br/>
</xsl:if>
<li><xsl:text>&#160;</xsl:text> <em>Type: </em> <xsl:value-of select="@type"/></li><br/>
<xsl:apply-templates select="default"/>

View File

@ -306,7 +306,7 @@ proc ::helpdoc::def_registerItems {tree node action} {
set name [arr name]
switch -- $tag {
var - keyword - dimension - namelist - table {
var - keyword - dimension - multidimension - namelist - table {
def_registerItem_ $tag $name $attr
}
list {

View File

@ -28,7 +28,7 @@ namespace eval ::helpdoc::gui_help {
if { [info exists ::guib::moduleObj::module_item($name)] } {
if { $::guib::moduleObj::module_item(ident,$name) != "" } {
switch -- $::guib::moduleObj::module_item($name) {
var - dimension - table - text {
var - dimension - multidimension - table - text {
# important: we must pass from name to ident
addHelp_ $::guib::moduleObj::module_item(ident,$name) $helpTxt
@ -46,7 +46,7 @@ namespace eval ::helpdoc::gui_help {
if { [info exists ::guib::moduleObj::module_item($name)] } {
if { $::guib::moduleObj::module_item(ident,$name) != "" } {
switch -- $::guib::moduleObj::module_item($name) {
var - dimension - table {
var - dimension - multidimension - table {
lappend ok_names $::guib::moduleObj::module_item(ident,$name)
}
@ -62,7 +62,7 @@ namespace eval ::helpdoc::gui_help {
if { [info exists ::guib::moduleObj::module_item($name)] } {
if { $::guib::moduleObj::module_item(ident,$name) != "" } {
switch -- $::guib::moduleObj::module_item($name) {
var - dimension - table {
var - dimension - multidimension - table {
lappend ok_names $::guib::moduleObj::module_item(ident,$name)
}