Revision: 3987
http://vexi.svn.sourceforge.net/vexi/?rev=3987&view=rev
Author: clrg
Date: 2010-12-22 04:03:48 +0000 (Wed, 22 Dec 2010)
Log Message:
-----------
Bit more documentation work
NB. why does vexi.js.Boolean appear in the docs but vexi.js.Number does not?
Modified Paths:
--------------
trunk/org.vexi-library.js/src/main/java/org/ibex/js/JSNumber.java
trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JS.jpp
trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSPrimitive.jpp
trunk/org.vexi-library.js/src/main/jpp/org/vexi/js/VexiJS.jpp
Modified: trunk/org.vexi-library.js/src/main/java/org/ibex/js/JSNumber.java
===================================================================
--- trunk/org.vexi-library.js/src/main/java/org/ibex/js/JSNumber.java
2010-12-22 03:10:38 UTC (rev 3986)
+++ trunk/org.vexi-library.js/src/main/java/org/ibex/js/JSNumber.java
2010-12-22 04:03:48 UTC (rev 3987)
@@ -37,7 +37,7 @@
*
* <p>TODO</p>
*
- * */
+ * */
//#end
return super.get(key);
}
@@ -89,7 +89,9 @@
//#noswitch - leave, needed for jsdoc
/*...@page(varname=Boolean,humanname=Booleans)
*
- * <p>TODO</p>
+ * <p>A simple <code>true</code> or <code>false</code> value.</p>
+ *
+ * <p>A boolean is a <a href="Primitive.html">Primitive</a>.</p>
*
* */
//#end
Modified: trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JS.jpp
===================================================================
--- trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JS.jpp 2010-12-22
03:10:38 UTC (rev 3986)
+++ trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JS.jpp 2010-12-22
04:03:48 UTC (rev 3987)
@@ -289,8 +289,7 @@
* <p>They may be useful in conjuction with Cloning to create
objects with a strict
* set of static or scoped properties.</p>
*
- * <pre>
- * var immutable = new vexi.js.Immutable();
+ * <pre> var immutable = new vexi.js.Immutable();
* var type = vexi.js.clone(immutable);
* var scopedprop = "foo";
* type.prop ++= function() { return scopedprop; };
Modified: trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSPrimitive.jpp
===================================================================
--- trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSPrimitive.jpp
2010-12-22 03:10:38 UTC (rev 3986)
+++ trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSPrimitive.jpp
2010-12-22 04:03:48 UTC (rev 3987)
@@ -4,7 +4,7 @@
package org.ibex.js;
-public class JSPrimitive extends JS.Immutable implements Constants,
JS.Copyable{
+public class JSPrimitive extends JS.Immutable implements Constants,
JS.Copyable {
// REMARK primitives are immutable
public JS deepcopy() { return this; }
@@ -60,7 +60,7 @@
return JSU.S(s.substring(a,b));
}
case "split":
- if(args.length==0) return new JSArray(this);
+ if (args.length==0) return new JSArray(this);
return
JSRegexp.stringSplit(this,args[0],args.length>1?args[1]:null);
case "substr": {
int start = args.length >= 1 ? JSU.toInt(args[0]) : 0;
@@ -196,7 +196,6 @@
* @param(name=end,optional=true)
* @return(String)
* */
-
case "slice": return METHOD;
/* <p>Splits the current string into separate strings, using the
sub-string
* defined by expression as a separator. Returns an array of limit
elements
@@ -229,11 +228,26 @@
* @return(String)
* */
case "substring": return METHOD;
- case "toExponential": return METHOD;
- case "toFixed": return METHOD;
+ /* <p>TODO</p>
+ *
+ * @method
+ * @return(String)
+ * */
+ case "toExponential": if (this instanceof JSNumber) return METHOD;
+ /* <p>TODO</p>
+ *
+ * @method
+ * @return(String)
+ * */
+ case "toPrecision": if (this instanceof JSNumber) return METHOD;
+ /* <p>TODO</p>
+ *
+ * @method
+ * @return(String)
+ * */
+ case "toFixed": if (this instanceof JSNumber) return METHOD;
/* Returns the lower-case equivalent of the current string.
@return(String) */
case "toLowerCase": return METHOD;
- case "toPrecision": return METHOD;
/* Returns the current string. @return(String) */
case "toString": return METHOD;
/* Returns the upper-case equivalent of the current string.
@return(String) */
Modified: trunk/org.vexi-library.js/src/main/jpp/org/vexi/js/VexiJS.jpp
===================================================================
--- trunk/org.vexi-library.js/src/main/jpp/org/vexi/js/VexiJS.jpp
2010-12-22 03:10:38 UTC (rev 3986)
+++ trunk/org.vexi-library.js/src/main/jpp/org/vexi/js/VexiJS.jpp
2010-12-22 04:03:48 UTC (rev 3987)
@@ -331,13 +331,34 @@
case "multiple": return METHOD;
case "nameOf": return METHOD;
case "pipe": return METHOD;
+ /* <p>Turns the specified string into a stream.</p>
+ *
+ * @param(string)
+ * @return(Stream)
+ * */
case "fromString": return METHOD;
case "unzip": return METHOD;
case "uncab": return METHOD;
+ /* <p>Provides a stream accessing content from the provided
url.</p>
+ *
+ * @param(url)
+ * @return(Stream)
+ * */
case "url": return METHOD;
/* @constructor @jpp(VexiJS) */
case "xmlwriter": return METHOD;
- /* @constructor @jpp(VexiJS) */
+ /* <p>Parses the given stream as XML using the user-specified
helper js object.
+ * This is a regular js object that should implement the following
named functions:</p>
+ *
+ * <ul><li>startElement</li>
+ * <li>endElement</li>
+ * <li>characters</li>
+ * <li>whitespace</li></ul>
+ *
+ * @param(stream)
+ * @param(js)
+ * @return(null)
+ * */
case "parsexml": return METHOD;
/* @constructor @jpp(VexiJS) */
case "utf8reader": return METHOD;
@@ -631,23 +652,6 @@
static private class XMLHelper extends XML {
final private JS characters, whitespace, endElement, startElement;
public XMLHelper(Scheduler scheduler, JS b) throws JSExn {
- // FIXME jsdoc does not like this location
-
- //#noswitch - leave, needed for jsdoc
- /* @PAGE(varname=parsexml,humanname=XML Parser) */
-
- /* @method @param() @return() */
- //also "startElement"
-
- /* @method @param() @return() */
- //also "endtElement"
-
- /* @method @param() @return() */
- //also "characters"
-
- /* @method @param() @return() */
- //also "whitespace"
-
super(BUFFER_SIZE, true);
startElement = scheduler.getAndTriggerTraps(b,SC_startElement);
endElement = scheduler.getAndTriggerTraps(b,SC_endElement);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months. Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn