[Kst] extragear/graphics/kst/src/extensions/js
George Staikos
staikos at kde.org
Tue Jun 20 23:29:19 CEST 2006
SVN commit 553386 by staikos:
removing comments is not a good idea. Add @obsolete
M +5 -1 bind_label.h
M +28 -2 jsdocs-class.xsl
M +19 -5 jsdocs2xml.pl
--- trunk/extragear/graphics/kst/src/extensions/js/bind_label.h #553385:553386
@@ -127,7 +127,11 @@
void setScalarReplacement(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value scalarReplacement(KJS::ExecState *exec) const;
/* @property boolean autoResize
- @description Obsolete.
+ @description Automatically resizes the label to fit the text exactly.
+ May trigger a slight move of the label. It will not
+ automatically resize if the user resizes it manually via
+ the size property or layout mode.
+ @obsolete
*/
void setAutoResize(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value autoResize(KJS::ExecState *exec) const;
--- trunk/extragear/graphics/kst/src/extensions/js/jsdocs-class.xsl #553385:553386
@@ -37,6 +37,9 @@
<xsl:with-param name="typed" select="0"/>
</xsl:call-template>
<xsl:text> )</xsl:text>
+ <xsl:if test="@obsolete = 'true'">
+ <xsl:text> [Obsolete]</xsl:text>
+ </xsl:if>
<br/>
</xsl:for-each>
</ul>
@@ -47,12 +50,22 @@
<span class="title">Methods:</span>
<ul>
<xsl:for-each select="method">
- <a class="link" href="#method_{@name}"><xsl:value-of select="@name"/></a>
+ <xsl:choose>
+ <xsl:when test="@obsolete = 'true'">
+ <xsl:value-of select="@name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <a class="link" href="#method_{@name}"><xsl:value-of select="@name"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text> ( </xsl:text>
<xsl:call-template name="displayArgumentsInline">
<xsl:with-param name="typed" select="0"/>
</xsl:call-template>
<xsl:text> )</xsl:text>
+ <xsl:if test="@obsolete = 'true'">
+ <xsl:text> [Obsolete]</xsl:text>
+ </xsl:if>
<br/>
</xsl:for-each>
</ul>
@@ -63,7 +76,14 @@
<span class="title">Properties:</span>
<ul>
<xsl:for-each select="property">
- <a class="link" href="#property_{@name}"><xsl:value-of select="@name"/></a><br/>
+ <xsl:choose>
+ <xsl:when test="@obsolete = 'true'">
+ <xsl:value-of select="@name"/><xsl:text> [Obsolete]</xsl:text><br/>
+ </xsl:when>
+ <xsl:otherwise>
+ <a class="link" href="#property_{@name}"><xsl:value-of select="@name"/></a><br/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:for-each>
</ul>
</xsl:if>
@@ -109,6 +129,9 @@
<xsl:call-template name="displayArgumentsInline"/>
<xsl:text> )</xsl:text>
</b>
+ <xsl:if test="@obsolete = 'true'">
+ <xsl:text> [Obsolete]</xsl:text>
+ </xsl:if>
</span>
<br/>
@@ -134,6 +157,9 @@
<xsl:if test="@readonly = 'true'">
<xsl:text> [Read-Only]</xsl:text>
</xsl:if>
+ <xsl:if test="@obsolete = 'true'">
+ <xsl:text> [Obsolete]</xsl:text>
+ </xsl:if>
</b></span><br/>
<ul>
<p><xsl:value-of select="description" disable-output-escaping="yes"/></p>
--- trunk/extragear/graphics/kst/src/extensions/js/jsdocs2xml.pl #553385:553386
@@ -68,6 +68,8 @@
$_ = $2;
if (/^class$/) {
# do nothing
+ } elsif (/^obsolete$/) {
+ print $handle "$indent <obsolete/>\n";
} elsif (/^description$/) {
$_ = $rest;
if (/(.*?)(\@\w+.*|$)/s) {
@@ -120,9 +122,13 @@
$return = "";
$_ = $text;
if (/(.*?)\@returns\s+([\w\[\]]+)/) {
- $return = " type=\"$2\"";
+ $return = "type=\"$2\"";
}
- print $handle "$indent<$type name=\"$name\"$return>\n";
+ $obsolete = "";
+ if (/\@obsolete/) {
+ $obsolete = "obsolete=\"true\"";
+ }
+ print $handle "$indent<$type name=\"$name\" $return $obsolete>\n";
while ($text) {
$_ = $text;
if (/(.*?)\@(\w+)\s+(.*)/s) {
@@ -132,6 +138,8 @@
# do nothing
} elsif (/^returns$/) {
# do nothing
+ } elsif (/^obsolete$/) {
+ # do nothing
} elsif (/^description$/) {
$_ = $rest;
if (/(.*?)(\@\w+.*|$)/s) {
@@ -199,11 +207,15 @@
$indent = @_[4];
$handle = @_[0];
$_ = $text;
+ $readonly = "";
if (/\@readonly/) {
- print $handle "$indent<property name=\"$name\" type=\"$type\" readonly=\"true\">\n";
- } else {
- print $handle "$indent<property name=\"$name\" type=\"$type\">\n";
+ $readonly = "readonly=\"true\"";
}
+ $obsolete = "";
+ if (/\@obsolete/) {
+ $obsolete = "obsolete=\"true\"";
+ }
+ print $handle "$indent<property name=\"$name\" type=\"$type\" $readonly $obsolete>\n";
while ($text) {
$_ = $text;
if (/(.*?)\@(\w+)\s+(.*)/s) {
@@ -213,6 +225,8 @@
# do nothing
} elsif (/^readonly$/) {
# do nothing
+ } elsif (/^obsolete$/) {
+ # do nothing
} elsif (/^description$/) {
$_ = $rest;
if (/(.*?)(\@\w+.*|$)/s) {
More information about the Kst
mailing list