PDA

View Full Version : ext-doc: ExtJS-style JavaScript comments processor



Pages : [1] 2

oxymoron
14 Dec 2008, 6:09 AM
A month ago I tried to find ExtJS-style help generator. Just to help my colleagues to be familiar with common javascript-classes I created for them with ExtJS. But I've not found anything in google... So I started my own project at google-code:

http://code.google.com/p/ext-doc/

It requires Java 1.6 and supports XSLT-based templates.

But I didn't know about jsdoc-tk-ext (http://extjs.com/forum/showthread.php?t=23347) when I started... :) I just tried once to use jsdoc-toolkit but I failed to generate Ext-help... Anyway, I've already started to use my help generator at work.

Just wanted to share

Here is example output (http://ext-doc.org/docs/)

Latest changes in version 1.0.104 (http://ext-doc.googlecode.com/files/ext-doc-1.0.104.zip):

Custom tags support: If you want to add a new tag specific for your project (like @author or @version) in class description or even to method or property description you just have to declare these tags in your project-xml file:


<doc>
<source>
...
</source>
<tags>
<tag name="author" title="Author"/>
<tag name="version" title="Class Version"/>
<tag name="note" format="&lt;i&gt;NOTE: {0}&lt;/i&gt;"/>
</tags>
</doc>


and then use it:



/**
* @class SamplePackage.SampleClass
* @extends Ext.Panel
* This is a sample class
* @author oxymoron
* @version 1.0.104
*/


Links to the source code from any class, method, property, etc.
If you click on the method(class, prop..) name, you can get the exact place in the source code where this declaration made. Script syntax highlighting is done with google-code-prettify (http://code.google.com/p/google-code-prettify/)
Some bug fixing...;)


Thanks, Marius (http://extjs.com/forum/showthread.php?p=261596#post261596) for your suggestions.

marius.ciotlos
15 Dec 2008, 2:37 AM
If you want to add a new tag specific for your project (like @author or @version) in class description or even to method or property description you just have to declare these tags in your project-xml file
This is a very very useful feature. We were in need of custom tags and the display for them.


/**
* Custom method to demonstrate custom tags
* @author Marius
*/
this.CustomFunction = function () {
...
}

This would put in the method box on the bottom Marius, would be nice to have author: Marius.

To achieve this you must use a different @mauthor (method author) or something similar and in the xml file put:


<tag name="mauthor" format="&lt;b&gt;author:&lt;/b&gt; {0}"/>

after this just document your methods like this:


/**
* Custom method to demonstrate custom tags
* @mauthor Marius
*/
this.CustomFunction = function () {
...
}

Would be maybe nice to remove the format when the tag is used for a class and use it when used for property or method, this would remove the need above to have the desired format :P




Script syntax highlighting is done with google-code-prettify (http://code.google.com/p/google-code-prettify/)
For some reason this did not work for all source code files.


tpl: new Ext.XTemplate (
'<tpl for=".">',
'<div class="x-combo-list-item"><span style="float: left">{value}</span><span style="float: right">{endtime}</span><br style="clear:both"/></div>',
'</tpl>'
),

The part of the code above in one of my files breaks the syntax highlight .


My other suggestions would be:

A way to have custom categories (like the Events / Methods / Properties) in the class tab.
The ones that I was thinking were:
Event handlers (events are click, hover or custom ones, and the handlers are the functions that are called when the events happen).
Callback functions (functions that are called when there is a callback from an ajax or after certain functions execute)

Some parameters (in the configuration xml maybe), to have a possibility to include or not the private functions in the documentation.
A way to use the format: &lt;a href='output/{0}.html' ext:cls='{0}'&gt;{0}&lt;/a&gt; inside custom tags and get the correct link on the class header also
Allow {@link PackageBase.Core.Class} inside custom tags :D




If there is a need I could try to help with the Wiki pages for some documentation for the project. At least some examples and such.

oxymoron
15 Dec 2008, 5:44 AM
Thanks for comments!

Some words about custom tags. It is just first attempt to implement this thing, so it is not fixed yet. Just wanna say that I assume that there are two ways for customizing docs for your project:

The first is changing your project-xml (http://ext-doc.googlecode.com/svn/trunk/sample/ext.xml) file (a kind of minor customization - there you just specify set of source files, declare extra tags, may be something else will be added like project name)

And the second way is deep customization with modifying template. Currently there is only one ext template, but I'm planning to make some more (at least one "plain" template:) ). Template contains a description file (http://ext-doc.googlecode.com/svn/trunk/template/ext/template.xml) where you can specify resources (just copied to target folder) and XSLT-templates for generating tree (http://ext-doc.googlecode.com/svn/trunk/template/ext/tpl/tree.xsl) and class (http://ext-doc.googlecode.com/svn/trunk/template/ext/tpl/class.xsl) pages.

Most difficult, but most important is class-xslt file. For example, if you want to use @author tag for class description, and also use the same tag for methods, and add it after parameters of the method, what you have to do is to change one line in class.xsl (line 182):



<div class="long">
<xsl:call-template name="check-if-static"/>
<xsl:value-of select="description/longDescr" disable-output-escaping="yes"/>
<xsl:call-template name="method-params-details"/>
<xsl:call-template name="custom-tags"/>
</div>


to this



<div class="long">
<xsl:call-template name="check-if-static"/>
<xsl:value-of select="description/longDescr" disable-output-escaping="yes"/>
<xsl:call-template name="method-params-details"/>
<xsl:if test="customTags"><b><xsl:value-of select="customTags/title"/></b> : <xsl:value-of select="customTags/value"/></xsl:if>
</div>


When ext-doc processes source file it generates internally XML that will be transformed to HTML using this XSL-transformation. It's not documented yet, but let's think that this post is the first step to ext-doc documentation :)

marius.ciotlos
16 Dec 2008, 6:30 AM
Thanks for the feedback. I was able to adapt the code and template to include some new categories for my liking (@callback and @eventhandler).
In my opinion a way to have this automatic (some kind of method categories) would be nice. To explain better what would be great:

User adds a new custom tag in myown.xml file for his project
User specifies this tag to be a method category
Ext-doc parses this new tag for processMethod and generates separate list for them (most of the time this will not be public)
The template to have a process for these kind of special methods to display them inside the class.xls using the title of tag for the category


The main issues that I still have are:


The @private functions are always skipped, and as this is oriented mostly for all collegues here we would like to have also private functions in there with a possibility to filter them out (like for parent functions) :) This looks like a big task from what i've seen as now the @private / @ignore just return;
The search in the API Home doesn't work properly becase the store behind (in docs.js) is linked to extjs.com


this.searchStore = new Ext.data.Store({
proxy: new Ext.data.ScriptTagProxy({
url: 'http://extjs.com/playpen/api.php'
}),

Links inside custom links {@link PackageBase.Core} or some way to use format also for the Class tags :)



Appreciate all the work, and if I can help with something give me a pm.

jsakalos
25 Jan 2009, 6:37 AM
I've just started to play with it so take me please as a complete beginner and excuse me stupid questions...

My idea is to generate docs from my extensions but do not include complete Ext doc to keep it simple. I'm able to generate the doc but it says "Extends Object" while it extends an Ext class in fact.

The ideal would be to generate doc that would contain links to on-line Ext documentation. E.g. my extension extends form, docs would correctly say "Extends Ext.form.FormPanel" and that would be the link to Ext.form.FormPanel on-line doc.

Am I only doing something wrong or such feature is not there? If the former is the case, what is the proper setup?

oxymoron
25 Jan 2009, 7:06 AM
Hello, Saki!
Initially ext-doc was made to be integrated with full ExtJS Library, and may be this use case was not considered... Unfortunatelly, I had no time for this project during last 2 months. But because of global crisis :) - I'll have a lot of free time soon, so I'm planning to make version 1.1, and I'll pay more attention to inheritance (and may be links to online ExtJS docs in inheritance tree will be there).

P.S.: Thank you, I've almost forgotten to release latest 1.0 version with *.js templates and command line support )

jsakalos
25 Jan 2009, 7:19 AM
Thanks for info, I'm looking forward.

I just don't get the P.S....

oxymoron
25 Jan 2009, 7:41 AM
Nevermind...
I've just remembered that in the latest version you have to specify all the JS source code files, but in the latest modifications (that I use), only "*.js" template is enough.

jsakalos
25 Jan 2009, 8:07 AM
Oh, I see.

BTW, I'm able to checkout svn but I don't know how to build jar file. Well, I've build jar with (jar cf ext-doc.js extdoc) but it doesn't work. Doest it make sense to use your svn version?

oxymoron
25 Jan 2009, 6:16 PM
I've uploaded latest ext-doc-1.0.128 (http://code.google.com/p/ext-doc/downloads/list) and added build from SVN section here (http://code.google.com/p/ext-doc/).

For building from SVN just use 1.0 branch and Apache Ant (http://ant.apache.org/).

crp_spaeth
26 Jan 2009, 12:21 AM
Hi,

I just tried to genarate the sample attached to the zipfile but it failed with the following exception:

*** COPY SOURCE FILES ***
Target folder: ../output\source
FEHLER: 'unknown protocol: c'
SCHER WIEGENDE FEHLER: 'Die Formatvorlage konnte nicht kompiliert werden.'
javax.xml.transform.TransformerConfigurationException: Die Formatvorlage konnten icht kompiliert werden.
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactory.Impl.newTemplates(Unknown Source)
at com.sun.jsdoc.processor.FileProcessor.saveToFolder(FileProcessor.java:997)
at extdoc.Main.main(Main.java :83)

.

oxymoron
26 Jan 2009, 1:03 AM
Looks like some path problem in "c:\..." expression or may be "/" and "\" processed in wrong way. I can not reproduce it, so could you, please, check:

1) java -version
2) OS
3) may be you can zip your folder and send to me (oxxxymoron@gmail.com)

Did you modified ext-doc.bat or ext.xml?

crp_spaeth
26 Jan 2009, 1:33 AM
It's a problem with blanks in the path.

Running the bat from the folder "c:/ext-doc-1.0.128" works like expected.

changing the folder name to "c:/ext doc" the exception occurs...

oxymoron
26 Jan 2009, 1:42 AM
OK, then it seems to be a java bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506304

jay@moduscreate.com
26 Jan 2009, 3:45 AM
Thanks for the contribution Oxy. I look forward to poking at this.

jsakalos
26 Jan 2009, 5:56 AM
I gave it a shot and here are my findings:
1) If I have a source directory with many *.js files, mostly named as Ext.ux.*.js and I set <source src="../../js" match="Ext*.js" /> then no files are found. However, match="*.js" works like expected. I'd guess the matcher is fooled by multiple dots in file names. The ideal would be regular expression matching.

2) I expect that you haven't worked on inheritance yet as w/o Ext sources it still shows "Extends: Object". I was thinking a bit about it and it is not a problem to include Ext source tree if it would be possible to suppress Ext docs generation on output - both tree and methods, props, events... I guess that this would be easiest to implement and also easiest to make links to Ext components working.

jsakalos
26 Jan 2009, 4:27 PM
Is there a documentation of all options, especially {@something} constructs that can be put in comments? All @somethig recognized, etc?

oxymoron
26 Jan 2009, 10:08 PM
1)
"Ext*.js" - no files are found

It's a bug! I've fixed that in SVN (revision 129). It was trying to match full file name like "c:/folder/ExtExtension.js" instead of just "ExtExtension.js". Now it should be fine.

Regarding regular expression matching... in fact, I convert wildcards like "Ext*.js" to regexp "^Ext.*\.js$" with pretty simple function (extdoc.jsdoc.util.StringUtils.wildcardToRegex()). IMHO, wildcards look more "natural". If it is really required, I can extend it in the future to support something like:
<source src="ux" match="^Ext.*\.js$" matchType="regexp"/>

2)
if it would be possible to suppress Ext docs generation on output

May be it is a little tricky, but you can try this with current version:

Edit template\ext\tpl\tree.xsl:



line 22:<xsl:for-each select="packages[@name='Ext' or starts-with(@fullName, 'Ext.ux')]">
line 26:<xsl:if test="count(packages[@name='Ext' or starts-with(@fullName, 'Ext.ux')])!=0 and count(classes[starts-with(className, 'Ext.ux')])!=0">,</xsl:if>
line 27:<xsl:for-each select="classes[starts-with(className, 'Ext.ux')]">


It will change only tree.js file that represents package hierarchy. And you have to include ExtJS sources when you generate docs to get proper inheritance tree. It will leave only classes and packages that starts with Ext.ux.

It is not the best, but the simplest way now.

3)
Is there a documentation of all options, especially {@something} constructs that can be put in comments? All @somethig recognized, etc?
There are no docs now. But there are a huge number of examples: all the ExtJS library :)

Here is the list of currently supported tags:

@extends: 127
@ignore: 8
@constructor: 121
@property: 128
@return: 685
@param: 2150
@member: 17
@cfg: 906
@class: 185
@static: 108
@type: 340
@singleton: 25
@event: 284
@hide: 247
@private: 82
@method: 203

+ user defined (custom) tags

I'll make a wiki page in google code, for tags syntax, but I'm not good in English, so any help will be appreciated!

jsakalos
26 Jan 2009, 11:35 PM
Thank you very much for this valuable info. Don't worry about your English - it is easily understandable.

jsakalos
26 Jan 2009, 11:43 PM
Some questions: 1) {@link} - I cannot make it working and 2) if I define custom tag as:


<tag name="demo" title="Demo" format="&lt;a href=&quot;{0}&quot;&gt;{0}&lt;/a&gt;" />
it doesn't produce <a> tag. Is it a bug or should I do it somehow else?

jsakalos
27 Jan 2009, 12:18 AM
Another... If I try to build svn with ant (on openSUSE 11.1) I get:


BUILD FAILED
/ddata1/software/extdoc/build.xml:34: java.lang.ClassNotFoundException: There's no JAXB 2.1 API in the classpath



Do you have an idea which package could be missing?

Condor
27 Jan 2009, 1:10 AM
The Apache JAXB implementation can be found here (http://ws.apache.org/jaxme/index.html).

oxymoron
27 Jan 2009, 1:29 AM
1.

1) {@link} - I cannot make it working

Inline tags have this format (and may be used only for cross-referrencies inside generated docs):
{@link [cls]#[attrib] [newName]}

cls - (optional) class name
attrib - (optional) cfg, method, property or event name
newName - (optional) text to be displayed

usage example:


/**
* @class SamplePackage.SampleClass
* @extends Ext.Panel
* This is a sample class <br/>
* {@link SamplePackage.SampleClass#methodOne this is method one} <br/>
* {@link SamplePackage.SampleClass#methodOne} <br/>
* {@link #methodOne another link} <br/>
* {@link #methodOne} <br/>
* {@link SamplePackage.SampleClass} <br/>
* {@link SamplePackage.SampleClass sample class} <br/>
* @author oxymoron
* @version 1.0.101
* @demo test
*/


The output will be:

This is a sample class
this is method one (http://localhost/ext-doc/output/SamplePackage.SampleClass.html#SamplePackage.SampleClass-methodOne)
SamplePackage.SampleClass.methodOne (http://localhost/ext-doc/output/SamplePackage.SampleClass.html#SamplePackage.SampleClass-methodOne)
another link (http://localhost/ext-doc/output/SamplePackage.SampleClass.html#SamplePackage.SampleClass-methodOne)
methodOne (http://localhost/ext-doc/output/SamplePackage.SampleClass.html#SamplePackage.SampleClass-methodOne)
SamplePackage.SampleClass (http://localhost/ext-doc/output/SamplePackage.SampleClass.html)
sample class (http://localhost/ext-doc/output/SamplePackage.SampleClass.html)

2.

if I define custom tag as:

<tag name="demo" title="Demo" format="&lt;a href=&quot;{0}&quot;&gt;{0}&lt;/a&gt;" />

it doesn't produce <a> tag. Is it a bug or should I do it somehow else?

I checked that - in my case @demo works fine... it generated exactly:



Package: SamplePackage
Defined In: sample.js
Class: SampleClass
Extends: Panel
Author: oxymoron
Class Version: 1.0.101
Demo: <a href="test">test</a>


The only one problem is that output string was escaped. It may be easily fixed:

in template\ext\tpl\class.xsl (line 381):



<xsl:template name="class-custom-tags">
<xsl:if test="customTags">
<xsl:for-each select="customTags">
<tr>
<td class="label"><xsl:value-of select="title"/>:</td>
<td class="hd-info"><xsl:value-of select="value" disable-output-escaping="yes"/></td>
</tr>
</xsl:for-each>
</xsl:if>
</xsl:template>


output will be:


Package: SamplePackage
Defined In: sample.js
Class: SampleClass
Extends: Panel
Author: oxymoron
Class Version: 1.0.101
Demo: test

If you want to use custom tags in attribute (method, property, etc.) description - you should also change class.xsl - to define how your custom tag will be presented in docs. May be it's not so easy to find something in this file, but if you are familiar with xslt - it's pretty easy.

jsakalos
29 Jan 2009, 10:23 PM
oxymoron, is it possible to document also functions with different authorship, version, etc. and custom tags? Let's say I have a singleton which contains utility functions that are written by different authors, have different versions, etc. Something like class documentation but on per-function basis, keeping params and return value as it is?

oxymoron
30 Jan 2009, 2:16 AM
I've checked in to SVN (rev 131) an example of how it may be done by modifying class.xsl. It will add athor and version to method description as shown.

jsakalos
30 Jan 2009, 8:41 AM
Is class.xsl enough or do I need to build the project?

I cannot install ant w/o destroying my OpenOffice installation so I'm not able to build jar. If you included built jar in svn it would be great.

jsakalos
30 Jan 2009, 8:42 AM
Question: Only Author and Version or all tags of class header and custom tags? I would also need something like @see <a href="....">xxx</a>, @date, @revision, etc....

oxymoron
30 Jan 2009, 8:54 AM
jar is not required, only class.xsl (and use sample.js and ext.xml as example). Anyway I've uploaded latest build (including Ext*.js bugfix) ext-doc-1.0.131 (http://code.google.com/p/ext-doc/downloads/list)

oxymoron
30 Jan 2009, 9:05 AM
<tags>
<tag name="author" title="Author"/>
<tag name="version" title="Version"/>
<tag name="note" format="&lt;i&gt;NOTE: {0}&lt;/i&gt;"/>
<tag name="demo" title="Demo" format="&lt;a href=&quot;{0}&quot;&gt;{0}&lt;/a&gt;" />
<tag name="see" title="See" format="&lt;a href=&quot;{0}&quot;&gt;{0}&lt;/a&gt;"/>
<tag name="date" title="Date"/>
<tag name="revision" title="SVN Revision"/>
</tags>




/**
* This is a method declaration
* @author oxymoron
* @see extjs.com
* @date 2009-01-31
* @revision 131
*/
methodOne : function(){},


Generated sample:

jsakalos
30 Jan 2009, 9:39 AM
Perfeeeeeeect. I'll try it soon. Thank you very much.

jsakalos
31 Jan 2009, 4:39 AM
Patches/improvements you made so far work very well. Nevertheless, I'll keep asking, may I?

I have namespace Perseus.Admin, Perseus.Stat, etc. If I document Perseus.Admin.ClientGrid class Admin is not created as separate branch in the tree but the class name is Admin.ClientGrid. I'd like to have tree branch Admin and class name ClientGrid. How do I do it?

oxymoron
31 Jan 2009, 5:10 AM
Feel free to ask if you have questions!
@namespace will help you with this. Here is detailed description (http://extjs.com/forum/showthread.php?p=261579#post261579)

jsakalos
31 Jan 2009, 5:43 AM
Thank you very much, works. :)

jsakalos
13 Feb 2009, 5:18 AM
How could I get info in which file is an error or what tag caused error. With the latest SVN (3093) I'm no longer able to build docs. It is positively caused by something in widgets directory (if I comment this dir out, it works). Here is the error log:



.... stripped out ....
@date: 94
@TODO: 2
@for: 2
Exception in thread "main" java.lang.NullPointerException
at java.lang.String.compareTo(String.java:1176)
at extdoc.jsdoc.docs.DocAttribute.compareTo(DocAttribute.java:19)
at extdoc.jsdoc.docs.DocAttribute.compareTo(DocAttribute.java:8)
at java.util.Arrays.mergeSort(Arrays.java:1157)
at java.util.Arrays.mergeSort(Arrays.java:1168)
at java.util.Arrays.mergeSort(Arrays.java:1169)
at java.util.Arrays.mergeSort(Arrays.java:1169)
at java.util.Arrays.mergeSort(Arrays.java:1168)
at java.util.Arrays.sort(Arrays.java:1092)
at java.util.Collections.sort(Collections.java:134)
at extdoc.jsdoc.processor.FileProcessor.injectInherited(FileProcessor.java:706)
at extdoc.jsdoc.processor.FileProcessor.process(FileProcessor.java:804)
at extdoc.Main.main(Main.java:79)

jsakalos
13 Feb 2009, 8:25 AM
I have also another inputs from visitors: http://extjs.com/forum/showthread.php?p=288328#post288328 From all those comments the most serious are wrong links to source code. If you want I can send you sources and my ext.xml file to analyze.

Thanks,
Saki

mjlecomte
13 Feb 2009, 12:38 PM
How could I get info in which file is an error or what tag caused error. With the latest SVN (3093) I'm no longer able to build docs. It is positively caused by something in widgets directory (if I comment this dir out, it works). Here is the error log:

[code]
.... stripped out ....
@date: 94
@TODO: 2
@for: 2
Exception in thread "main" java.lang.NullPointerException
...


Seems like it's a doc bug:
http://extjs.com/forum/showthread.php?p=288537#post288537

jsakalos
13 Feb 2009, 12:48 PM
Yes MJ, you're right. Anyway, the doc-gen tool should be able either to recover from such situation by putting a reasonable default there or to report the error with file and line number. I still wonder how could you have found it...

mjlecomte
13 Feb 2009, 1:09 PM
I have also another inputs from visitors: http://extjs.com/forum/showthread.php?p=288328#post288328 From all those comments the most serious are wrong links to source code. If you want I can send you sources and my ext.xml file to analyze.

Thanks,
Saki

I just made docs for Ext 3 locally. The links work, however the page that is linked is not prettified and only the comments show up (none of the source code). I didn't notice if I need to get prettify separately and/or issue a different command to generate the docs?

mjlecomte
13 Feb 2009, 4:21 PM
I just noticed that some of the classes the prettify and source code look fine (just like the demo you posted).

Ok, actually I see your demo exhibits same behavior. Go to GridPanel and click on any of the config options. It should take you to page like:
http://ext-doc.org/docs/source/GridPanel.html#cfg-Ext.grid.GridPanel-autoExpandColumn

I only see comments on that page, and no color.

oxymoron
13 Feb 2009, 10:28 PM
Exception in thread "main" java.lang.NullPointerException

It's ext-doc bug: there shouldn't be any unhandled exceptions - if you find something like that, please, submit issue (http://code.google.com/p/ext-doc/issues/list).


wrong links to source code
I checked your docs (http://extjs.eu/docs/) and found out that the problem is in file names with dots. It is also ext-doc bug.

I've just fixed both bugs (rev. 134 & 135) and added link to the latest build (http://ext-doc.org/upload/ext-doc-1.0-SNAPSHOT.zip) at main page (http://code.google.com/p/ext-doc/). You can just replace jar file with new one.

jsakalos
13 Feb 2009, 11:38 PM
Thank you very much, going to test it, will report result.

mjlecomte
14 Feb 2009, 4:39 AM
I just noticed that some of the classes the prettify and source code look fine (just like the demo you posted).

Ok, actually I see your demo exhibits same behavior. Go to GridPanel and click on any of the config options. It should take you to page like:
http://ext-doc.org/docs/source/GridPanel.html#cfg-Ext.grid.GridPanel-autoExpandColumn

I only see comments on that page, and no color.

The first bug looks to be patched. The problem above is still present though. Make sure you click on one of the GridPanel configs.

mjlecomte
14 Feb 2009, 5:40 AM
One more I just noticed.

Seems it's having issues trying to process html for <



Returns the grid's &lt;TD>


As an example see getCell in your online sample.

mjlecomte
14 Feb 2009, 6:03 AM
One more I just noticed.

Seems it's having issues trying to process html for <



Returns the grid's &lt;TD>


As an example see getCell in your online sample.

I think there's a general problem handling html tags in some places. Scan around, you'll see a few places where <b> tags are not processed as html either.

jsakalos
14 Feb 2009, 6:21 AM
Now it doesn't crash on missing cfg type and links to sources are correct too.

Animal
14 Feb 2009, 10:05 AM
I'm trying this on the latest code which I just committed, and I get



Exception in thread "main" java.lang.NullPointerException
at java.lang.String.compareTo(String.java:1168)
at extdoc.jsdoc.docs.DocAttribute.compareTo(DocAttribute.java:19)
at extdoc.jsdoc.docs.DocAttribute.compareTo(DocAttribute.java:8)
at java.util.Arrays.mergeSort(Arrays.java:1144)
at java.util.Arrays.mergeSort(Arrays.java:1156)
at java.util.Arrays.mergeSort(Arrays.java:1156)
at java.util.Arrays.mergeSort(Arrays.java:1155)
at java.util.Arrays.mergeSort(Arrays.java:1155)
at java.util.Arrays.sort(Arrays.java:1079)
at java.util.Collections.sort(Collections.java:117)
at extdoc.jsdoc.processor.FileProcessor.injectInherited(FileProcessor.java:706)
at extdoc.jsdoc.processor.FileProcessor.process(FileProcessor.java:804)
at extdoc.Main.main(Main.java:79)

jsakalos
14 Feb 2009, 10:31 AM
Isn't it that same reason of missing type of one @cfg in Panel.js that I've reported? 'Cause I got exactly same crash with the previous version.

Animal
14 Feb 2009, 10:48 AM
OK, MJ seems to have made it work!??

But it seems to have made a mistake in parsing some comments:

http://i131.photobucket.com/albums/p286/TimeTrialAnimal/docgenbug.jpg

jsakalos
14 Feb 2009, 10:52 AM
http://extjs.com/forum/showthread.php?p=278827#post278827 - take a look at "disable-output-escaping" in that post - it works for me fine.

Animal
14 Feb 2009, 10:53 AM
I also tried to insert a static member into Ext.grid.Column using the same annotations that are in Ext.Element to insert the fly method into the Ext class.

The code is



/*
* @property types
* @type Object
* @member Ext.grid.Column
* @static
* <p>An object containing predefined Column classes keyed by a mnemonic code which may be referenced
* by the {@link Ext.grid.ColumnModel#xtype xtype} config option of ColumnModel.</p>
* <p>This contains the following properties</p><div class="mdesc-details"><ul>
* <li>gridcolumn : <b>{@link Ext.grid.Column Column constructor}</b></li>
* <li>booleancolumn : <b>{@link Ext.grid.BooleanColumn BooleanColumn constructor}</b></li>
* <li>numbercolumn : <b>{@link Ext.grid.NumberColumn NumberColumn constructor}</b></li>
* <li>datecolumn : <b>{@link Ext.grid.DateColumn DateColumn constructor}</b></li>
* <li>templatecolumn : <b>{@link Ext.grid.TemplateColumn TemplateColumn constructor}</b></li>
* </ul></div>
*/


But the Column class does not list it as a property.

Animal
14 Feb 2009, 10:55 AM
http://extjs.com/forum/showthread.php?p=278827#post278827 - take a look at "disable-output-escaping" in that post - it works for me fine.

It already has that.

jsakalos
14 Feb 2009, 11:01 AM
Hmmm, oxymoron must step in in that case, I don't know more...

oxymoron
14 Feb 2009, 5:07 PM
Animal,

I think NullPointerException was fixed in the lates build (http://ext-doc.org/upload/ext-doc-1.0-SNAPSHOT.zip) (yesterday).

renderer property...

now it is (in rev 3098):


/**
* @property renderer
* @type Function
* A function which returns displayable data when passed the following parameters
...
*/


It would be fine if it were:


/**
* A function which returns displayable data when passed the following parameters
...
* @property renderer
* @type Function
*/

I don't like it, but ext-doc in fact is a kind of "reverse engineering" so previously there were no such cases. And there are no standards for documenting ExtJS code, i.e. may be for Ext3 comments grammar parsing should be changed.

oxymoron
14 Feb 2009, 5:14 PM
mjlecomte,


I think there's a general problem handling html tags in some places. Scan around, you'll see a few places where <b> tags are not processed as html either.

I can not find it, give me direct links, please.

mjlecomte
14 Feb 2009, 5:52 PM
example of problem with linked file:
http://ext-doc.org/docs/source/GridPanel.html#cfg-Ext.grid.GridPanel-autoExpandColumn

go to:
http://ext-doc.org/docs/?class=Ext.grid.GridView

dragZone (http://ext-doc.org/docs/?class=Ext.grid.GridView&member=dragZone)
getHeaderCell (http://ext-doc.org/docs/?class=Ext.grid.GridView&member=getHeaderCell)


http://ext-doc.org/docs/?class=Ext.Container

add (http://ext-doc.org/docs/?class=Ext.Container&member=add)


Appears to be inconsistent success handling html tags in the properties.

mjlecomte
16 Feb 2009, 8:57 AM
The NullPointerException was introduced again due to some recent code committed to svn that changed from this:


Ext.CompositeElement = function(els){
this.elements = [];
this.addElements(els);
};
Ext.CompositeElement.prototype = {
isComposite: true,

/**
* some comment
*/
addElements : function(els){
if(!els) return this;
if(typeof els == "string"){
els = Ext.Element.selectorFunction(els);
}
var yels = this.elements;
var index = yels.length-1;
for(var i = 0, len = els.length; i < len; i++) {
yels[++index] = Ext.get(els[i]);
}
return this;
},

to


Ext.apply(Ext.CompositeElement.prototype, {
/**
* Calls the passed function passing (el, this, index) for each element in this composite.
* @param {Function} fn The function to call
* @param {Object} scope (optional) The <i>this</i> object (defaults to the element)
* @return {CompositeElement} this
*/
each : function(fn, scope){
Ext.each(this.elements, function(e,i) {
return fn.call(scope || e, e, this, i)
}, this);
return this;
},


The comments inside the apply appear to be the culprit. If you want to reproduce on your system I think you can just alter the first line (to that in red) and it should throw the exception.

jay@moduscreate.com
16 Feb 2009, 10:04 AM
Feel free to include the following plugin :)

http://tdg-i.com/60/updates-to-the-tab-panel-scroller-menu-released-earlier-today
http://tdg-i.com/img/screencasts/2009-01-16_1559.png

BTW, are you considering opening this up to some other developers? I'm sure a few of us would be willing to contribute to some type of SVN Store :)

oxymoron
17 Feb 2009, 3:49 AM
MJ, I've reproduced the NullPointerException problem with the latest ext rev. 3151. And made a patch to avoid this (my continuous integration is building it now (rev 136) and will upload it to the latest build (http://ext-doc.org/upload/ext-doc-1.0-SNAPSHOT.zip)). The reason is that in new files there is no @class declaration before methods. I think it will be added later.

Jay, thanks for sharing plug-in! This project is opened for everybody who is interested in creating docs for their javascript projects and want to improve ext-doc functionality. So if you or anyone else wants to be a project member, just send me e-mail (oxxxymoron@gmail.com) with your google account (http://en.wikipedia.org/wiki/Google_Account). It is appreciated if you would mention what exactly you want to change or improve.
PS: Even if you are not a member you can send me svn diff patch.

mjlecomte
17 Feb 2009, 5:45 AM
@oxy

Thanks, the exception is gone now.

Have you noticed the latest "-more" and "core" folder monkey business in svn? Surely this will make the doc process trickier...or I guess there should be additional classes in the API. At any rate, the current set up for the doc utility does not appear to be prepped for this as I can't see associated properties from these files in the generated docs.

One more, but I suspect this is a js developer documentation problem. I see "Function" at the top level of the tree showing up twice.

mjlecomte
17 Feb 2009, 6:08 AM
Actually, I retract or modify about my prior remarks about the "-more". It sees those files. But I think the problem is some classes are split across multiple (2 files). I gather this is an attempt by the developers to create a "lite" version of the core.

aconran
20 Feb 2009, 3:14 PM
oxymoron -

Nice tool, this looks like a very flexible implementation of the doc generator and we are taking a look at it to see if it could help us in teh documentation process. I'm unable to compile it on my local machine and have attached the error log:


aaron@aaron-qx6850:~/ext-doc-read-only$ ant
Buildfile: build.xml

clean:
[delete] Deleting directory /home/aaron/ext-doc-read-only/build
[delete] Deleting directory /home/aaron/ext-doc-read-only/java/src/main/extdoc/jsdoc/schema
[delete] Deleting directory /home/aaron/ext-doc-read-only/java/src/main/extdoc/jsdoc/tplschema

compile:
[mkdir] Created dir: /home/aaron/ext-doc-read-only/build/classes
[xjc] Consider using <depends>/<produces> so that XJC won't do unnecessary compilation
[xjc] Compiling file:/home/aaron/ext-doc-read-only/schema/ext-doc.xsd
[xjc] Writing output to /home/aaron/ext-doc-read-only/java/src/main
[xjc] Consider using <depends>/<produces> so that XJC won't do unnecessary compilation
[xjc] Compiling file:/home/aaron/ext-doc-read-only/schema/template.xsd
[xjc] Writing output to /home/aaron/ext-doc-read-only/java/src/main
[javac] Compiling 54 source files to /home/aaron/ext-doc-read-only/build/classes
[javac] Note: /home/aaron/ext-doc-read-only/java/src/main/extdoc/jsdoc/tags/impl/Comment.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

compile-test:
[mkdir] Created dir: /home/aaron/ext-doc-read-only/build/test-classes
[javac] Compiling 2 source files to /home/aaron/ext-doc-read-only/build/test-classes

test:

BUILD FAILED
/home/aaron/ext-doc-read-only/build.xml:46: Problem: failed to create task or type junit
Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/share/ant/lib
-/home/aaron/.ant/lib
-a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem


Total time: 1 second


I have verified that junit-4.5.jar is in the lib folder and have also tried to put a copy in /usr/share/ant/lib but still get the same error.

I am trying to build on Ubuntu 8.04 with Java 6:


aaron@aaron-qx6850:~/ext-doc-read-only$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (build 1.6.0_0-b11)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)

oxymoron
20 Feb 2009, 5:15 PM
Aaron,

Which ant (http://ant.apache.org/) version do you use? I have no problems with:


C:\>ant -version
Apache Ant version 1.7.1 compiled on June 27 2008

Here you can find more information (http://ant.apache.org/faq.html#delegating-classloader)

oxymoron
20 Feb 2009, 5:28 PM
MJ,

I also noticed these "-more" files and I see two Functions in the class tree... It happens because @class Function is declared twice in Ext.js and Ext-more.js. And I can not do anything with this until I'll understand how to process this case.

mjlecomte
20 Feb 2009, 5:40 PM
MJ,

I also noticed these "-more" files and I see two Functions in the class tree... It happens because @class Function is declared twice in Ext.js and Ext-more.js. And I can not do anything with this until I'll understand how to process this case.

Hey oxymoron,

I know with the other js doc tool, I recall the workaround that SamuraiJack came up with was to put a @private on the 2nd instance of the class to silence it. I think the problem with the other doc tool was actually having a constructor and a class declaration, so the circumstances were slightly different I think.

I don't think using the @private as a hack will work in this case though. In the case of Function, it shows up twice. In the case of CompositeElement (as an example ... there are more), the second file adds more properties (methods, etc). So in the case of CompositeElement it is simply not documenting some of the properties in the second file (I think it's the 2nd, but maybe it's the other way around, and the 2nd one overwrites the first?).

As a check, were you able to confirm the problem with the html tags I mentioned earlier?

Let me know if there's any more info I can provide to help.

aconran
20 Feb 2009, 7:30 PM
Aaron,

Which ant (http://ant.apache.org/) version do you use? I have no problems with:


C:\>ant -version
Apache Ant version 1.7.1 compiled on June 27 2008

Here you can find more information (http://ant.apache.org/faq.html#delegating-classloader)


aaron@aaron-qx6850:~/ext-doc-read-only$ ant -version
Apache Ant version 1.7.0 compiled on August 29 2007


Hrmm I'll look into it and see if I can find out anything but I can't get it working at this point.

aconran
20 Feb 2009, 7:35 PM
http://speeves.erikin.com/2008/04/hardy-class-orgapachetoolsanttaskdefsop.html

Installing ant-optional on Ubuntu resolved this problem.

mjlecomte
20 Feb 2009, 10:00 PM
@oxymoron.

Ok, so I guess I am slow in the uptake. I see that for any classes split into two files, that we just need to specify the @class at the top and both files will be combined into the one class:



/**
* @class Ext.CompositeElement
*/
Ext.apply(Ext.CompositeElement.prototype, {


That just leaves the issue of fixing the navigation tree, which then shows the class two times in the tree.

Using trickery that SamuraiJack came up with I tried this:



/**
* @class Ext.CompositeElement
* @private
*/
Ext.apply(Ext.CompositeElement.prototype, {


Low and behold, one reference to the class shows up in the tree, and properties from both files for that class show up in the Class properties. Yippee!

One last bit I need assistance with for generating the docs is with the locale folder. WHen I issue the command for the source, can I give a directive to exclude some subfolders?

The easy way is to only include files in the source folder, but what I was doing, was something like this:


java -jar %EXT_DOC_JAR% -p %XML% -o %DOC_OUTPUT% -s %EXT_SOURCE% -t %TEMPLATE% /Q


So there I specify the svn src directory. I can easily have my batch file copy to another directory, but I wanted to check if there's a way to exclude some subfolder of the specified source directory.

oxymoron
20 Feb 2009, 10:17 PM
Currently there is no such functionality, but it seems to be useful. You can add this idea to the issue list (http://code.google.com/p/ext-doc/issues/list) as enhancement - and I'll remember about this when I'll modify code next time.

jay@moduscreate.com
22 Feb 2009, 6:22 AM
Oxymoron, I sent you an email regarding the account :)

oxymoron
22 Feb 2009, 6:42 AM
Hi, Jay!

Since now you are a member of ext-doc project! And you can commit to SVN. If you have any problems feel free to ask!

jay@moduscreate.com
22 Feb 2009, 6:57 AM
you da man! Thanks dude :)

jay@moduscreate.com
22 Feb 2009, 6:58 AM
BTW, mind if i blog about this project? do you have plans for the home page yet?

oxymoron
22 Feb 2009, 7:04 AM
You can blog of course, now I have ext-doc.org (http://www.ext-doc.org) domain, but I have no time to make a page for that... So currently there are just docs (http://ext-doc.org/docs) and latest build (http://ext-doc.org/upload/ext-doc-1.0-SNAPSHOT.zip).

jay@moduscreate.com
22 Feb 2009, 7:29 AM
Blog post: http://tdg-i.com/69/ext-docorg-making-ext-js-style-documentation-available-to-everyone

This is awesome.

jsakalos
22 Feb 2009, 7:56 AM
Jay & oxymoron, I think that integrating Jay's tabpanel menu to ext-doc would be perfect. Can you cooperate to put it in?

jay@moduscreate.com
22 Feb 2009, 7:57 AM
Saki, that's the goal ;)

jsakalos
22 Feb 2009, 7:58 AM
Perfect, good to hear. Let us informed when done... :) :) :)

mrsunshine
23 Feb 2009, 8:35 AM
Hi,
i want to use ext doc on Mac OSX i get the following error



Nils-MacBook-Pro:Ext Doc nd$ ant
Buildfile: build.xml

clean:
[delete] Deleting directory /Users/nd/Entwicklung /Workspaces/Ext Doc/build

compile:
[mkdir] Created dir: /Users/nd/Entwicklung /Workspaces/Ext Doc/build/classes

BUILD FAILED
java.lang.NoClassDefFoundError: javax.xml.bind.JAXBContext
at com.sun.tools.xjc.ClassLoaderBuilder.class$(ClassLoaderBuilder.java:71)
at com.sun.tools.xjc.ClassLoaderBuilder.createProtectiveClassLoader(ClassLoaderBuilder.java:71)
at com.sun.tools.xjc.XJCTask.createClassLoader(XJCTask.java:79)
at com.sun.istack.tools.ProtectedTask.execute(ProtectedTask.java:46)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds


Java version:


Nils-MacBook-Pro:Ext Doc nd$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
ant version:

Nils-MacBook-Pro:Ext Doc nd$ ant -version
Apache Ant version 1.7.1 compiled on June 27 2008Any idea what i have todo?

regards nils

mrsunshine
23 Feb 2009, 9:26 AM
Solved, i had to change the java version in eclipse while configure the ant run setup, now everthing works perfekt =D>

jay@moduscreate.com
23 Feb 2009, 10:07 AM
Cool, i'm going to be starting on this tonight or tomorrow. I have OSX as well, for the record ;)

mrsunshine
23 Feb 2009, 10:23 AM
Should i add a howto with screenshots to the wiki project site to documentate the configuartion things on macosx with eclipse?

jay@moduscreate.com
23 Feb 2009, 10:25 AM
It would help other OSX non-java types :)

mrsunshine
24 Feb 2009, 1:42 AM
After get extdoc compiling and running the java command on the terminal, every thing was createt succesfull i got one JS error. :-(

Firebug:

this.el is null
Action()("search")ext-all.js (Linie 58)
Action()(Object applyTo=search tpl=Object loadingText=Searching...)ext-all.js (Linie 58)
getViewWidth()()ext-base.js (Linie 9)
getViewWidth()()ext-base.js (Linie 9)
initSearch()()docs.js (Linie 239)
formatCodeToRegex()(Object tId=0 status=0 statusText=communication failure)ext-all.js (Linie 18)
getViewWidth()()ext-base.js (Linie 9)
constructor()(Object tId=0 status=0 statusText=communication failure, undefined)ext-all.js (Linie 17)
getViewWidth()()ext-base.js (Linie 10)
getViewWidth()()ext-base.js (Linie 10)

chrome://firebug/content/blank.gifExt.Component=function(B){B=B||{};if(B.i...)}});Ext.reg("component",Ext.Component);


anybody had the same problem?

mrsunshine
24 Feb 2009, 3:30 AM
While searching for my JS problem i stumble about some things which can optimize.

1. remove the favicon link from the index.html file


<link href="http://www.jackslocum.com/favicon.ico" rel="shortcut icon"/><link href="http://www.jackslocum.com/favicon.ico" rel="icon"/>

because this file does net exists (404) and does many request to jacks server which are not neccesary :-)

2. remove the out comment old tree from the index.html should save many unused lines of code :-)

oxymoron
24 Feb 2009, 3:43 AM
Should i add a howto with screenshots to the wiki project site to documentate the configuartion things on macosx with eclipse?

I think It's better to put MACOSX info here, after that may be it will be moved to something like project's FAQ.


i got one JS error ... anybody had the same problem?

I can guess that you use docs from your local folder. It should be deployed to some server (ex. apache).

mrsunshine
24 Feb 2009, 3:46 AM
I can guess that you use docs from your local folder. It should be deployed to some server (ex. apache).
Yes, that was exactly the problem, i solved it 5 Seconds before i read your post ;-)

mrsunshine
24 Feb 2009, 5:12 AM
Howto create ext-doc on Mac OSX with Eclipse 3.4

MacOSx use java 1.5 in default case. ext-doc require java 1.6, the next lines should show to use java 1.6 on mac osx to create a ext-doc from you files.

you can check your java version on the terminal with:


java -version
When you had check out the ext-doc from svn, click right on build.xml and choose


Run as > 3 Ant Build
12141
Choose the tab "JRE" and select the JVM 1.6 from the "Seperate JRE" Combobox.
if no Java 1.6 entry exist, add a "Mac OSX Default" one by clicking on the "Installed JREs" button.
12142

Now you can run the ant build and the folder should be created.

You can rename the "ext-doc.bat" in the "ext-doc/sample/" folder to "ext-doc.sh" and change the rights to make it executable.

Navigate to the "ext-doc.sh" with your terminal. Before execute the script you have to set the java version for the terminal to the 1.6 on. There for open you "Java-Preferences" and drop the "Java SE 6" in the "Java-Apllicationversion" list to the top.
12143

Now you can run the "ext-doc.sh".

Don't forget to copy your created documentation to a http server, if you test to open it out of your filesystem it will throw a JS error.

Hope the howto helps
Nils

marius.ciotlos
25 Feb 2009, 12:50 AM
Nice to see so many MacOSX users. I am a user myself, having used ext-doc since it's early release to the public. I'd like to help a bit more as I was cought up in work and could not contribute more.

Tho I can't help much with code I can offer a hand and help with the website setup and maybe a Netbeans on MacOSX setup.

Please contact me on ICQ Oxy about the website and I'll try to come back to my post and refresh it with an Netbeans FAQ.


Edit: Request for sticky as this is of great help and already including FAQs

mystix
25 Feb 2009, 1:08 AM
stickied the thread. :)

marius.ciotlos
25 Feb 2009, 2:04 AM
Thank you for sticky

Netbeans tutorial:
1. Checout project from SVN and create netbeans project

12169

12170

12171

12172

12173

see next post for rest of screenshots

marius.ciotlos
25 Feb 2009, 2:10 AM
12174

12175

12176

12177

2. Select Java platform as JDK 1.6
12178

see next post for rest of screenshots

marius.ciotlos
25 Feb 2009, 2:13 AM
3. Now that you have the project in there, you need to tell netbeans to use JDK 1.6 instead of 1.5 that it detects as default of the system.

To do this you must edit netbeans.conf file
12179

12180

12181

12182

Save the netbeans.conf and restart your Netbeans. Now you can build your project.

I've done this using the latest Netbeans development build, but I guess you can do this with latest stable 6.5 also. I recommend 7.0M for the interface improvement.

jay@moduscreate.com
25 Feb 2009, 4:01 AM
Marius those screenshots are really hard to read. I will try to create a screencast for this in some time.

marius.ciotlos
25 Feb 2009, 4:26 AM
Unfortunately you are right. The last ones from the text editor are a pain. I had them in good resolution, but didn't know that attaching them to the forum will make them smaller.

Oxymoron gave me access to the wikis on the project page so I will create a tutorial page there with proper size screenshots and better descriptions.

For reference until then the screenshots should be enough.

markpele
25 Feb 2009, 5:31 AM
I don't see the point in adding the 'tabpanel menu (http://tdg-i.com/69/ext-docorg-making-ext-js-style-documentation-available-to-everyone)' extension.
The original Ext docs with the tabpanel scrollbar are perfect and I don't understand why we should force the extension on it and make it more complicated to support and maintain.

Please, let's focus on improving this amazing project and not on making it more complicated.
IMO Jay is just trying to find a place to market his extension(and book) but that's not the place.

jsakalos
25 Feb 2009, 5:45 AM
@markpele, perhaps you haven't opened more that 2-3 tabs at once yet...

Also, before you accuse Jay of anything, show us please your work, your contribution to the community.

mrsunshine
25 Feb 2009, 5:59 AM
Oxymoron gave me access to the wikis on the project page so I will create a tutorial page there with proper size screenshots and better descriptions.

Feel free to add my howto also to the wiki

marius.ciotlos
25 Feb 2009, 6:01 AM
Feel free to add my howto also to the wiki

Yes, will add all the useful information in this thread (as much as i can) with reference to the owners :)

markpele
25 Feb 2009, 6:38 AM
@jsakalos
I've just opened 6 tabs and I can see them all.
I still think it's useless in this scenario.
If it is that usefull, why the ext team doesn't include this in the official ext docs???
You are in the support team, why don't you include it?

jsakalos
25 Feb 2009, 6:40 AM
You have forgotten to show your contribution to Ext community.

marius.ciotlos
25 Feb 2009, 6:43 AM
I would advise to keep off topic posts to a minimum as this post is for ext-doc.
For further arguments use private messages or open a different topic.

Now, if there are any other users that would like to contribute some FAQ or Guide please send me a private message and I'll add that also on the project's wiki.

mjlecomte
25 Feb 2009, 6:46 AM
@jsakalos
I've just opened 6 tabs and I can see them all.
I still think it's useless in this scenario.
If it is that usefull, why the ext team doesn't include this in the official ext docs???
You are in the support team, why don't you include it?

Actually there have been prior threads where not only do people have many tabs open at one time, but they also want the state saved so if they hit the back button by accident or close the browser, they have to recreate whatever state they had.

I can't find the thread where the code was posted to implement saving state.

Also, if you read through the thread you'll see where the Ext Developers (not the support team.....do not confuse the two) is considering utilizing this project for the official docs. People you see labeled as "Support Team" are typically volunteers.

jay@moduscreate.com
25 Feb 2009, 6:49 AM
I would advise to keep off topic posts to a minimum as this post is for ext-doc.
For further arguments use private messages or open a different topic.

Now, if there are any other users that would like to contribute some FAQ or Guide please send me a private message and I'll add that also on the project's wiki.

agreed. :)

oxymoron
26 Feb 2009, 1:39 AM
I'll be off for a while... (1-2 weeks) Someone stole my passport - I have to restore it in my parent's town, and... there is no internet :(

mrsunshine
27 Feb 2009, 4:59 AM
MJ, I've reproduced the NullPointerException problem with the latest ext rev. 3151. And made a patch to avoid this (my continuous integration is building it now (rev 136) and will upload it to the latest build (http://ext-doc.org/upload/ext-doc-1.0-SNAPSHOT.zip)). The reason is that in new files there is no @class declaration before methods. I think it will be added later.

I had also a NullPointerException's.

First reason was a ":" behind the @class.

In my case the following throw the exception



/**
* @class: SamplePackage.SampleClass
* @extends Ext.Panel
*/
without the ":" it works


/**
* @class SamplePackage.SampleClass
* @extends Ext.Panel
*/
Second reason for the exception was a other comment block above the comment block with the @class



/**
* Copyright Info ....
*/
/**
* @class SamplePackage.SampleClass
* @extends Ext.Panel
*/

mrsunshine
27 Feb 2009, 5:28 AM
Is it possible to configure the ext-doc to output the doc html files with utf-8 encoding?
Would be nice to render the german umlauts.

jsakalos
27 Feb 2009, 6:07 AM
I guess you need to add charset to some template(s).

mrsunshine
27 Feb 2009, 6:33 AM
I guess you need to add charset to some template(s).

Yes, i working on it. But at the moment i doesn't find all points. If any body news important places. let me know.

i aready addet the charset utf-8 to the template/ext/index.html

jsakalos
27 Feb 2009, 6:39 AM
Hopefully oxymoron will integrate your patches to the core - I also need docs utf-8 and I believe we are not the only two... ;)

keren9
2 Mar 2009, 1:49 PM
I'm getting the following exception:

FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile styleseet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.ewTemplates(TransformerFactoryImpl.java:825)
at extdoc.jsdoc.processor.FileProcessor.saveToFolder(FileProcessor.java: 817)
at extdoc.Main.main(Main.java:18)

Any idea what might be the cause?

Thanks!

jay@moduscreate.com
3 Mar 2009, 7:49 AM
Anyone else having isuses where extdoc.jsdoc.schema does not exist?

Seems that Context.java and FileProcessor.java are looking for this class. I can't find it under:

java -> src > main > extdoc> jsdoc

mrsunshine
3 Mar 2009, 8:10 AM
Anyone else having isuses where extdoc.jsdoc.schema does not exist?

Seems that Context.java and FileProcessor.java are looking for this class. I can't find it under:

java -> src > main > extdoc> jsdoc


the extdoc.jsdoc.schema is located in the schema folder on document root.
you can configure the path to schema in your build.properties file which is on your project root.

edit:
the build process creates a schema and tplschema folder in
java -> src > main > extdoc> jsdoc

jsakalos
3 Mar 2009, 11:45 AM
No issues here; I'm running *.bat file from the sample directory.

jay@moduscreate.com
3 Mar 2009, 11:50 AM
thx mrsunshine. I need to figure out what's going on. I'm not a java developer, but I feel this is a great opportunity for me to start :)

Saki, i thought you were a linux buff?

jsakalos
3 Mar 2009, 11:59 AM
Sure, it's enough to make *.bat executable and you have the runnable shell script. I run it in Linux. BTW, what is Window$?.

jay@moduscreate.com
3 Mar 2009, 12:02 PM
:) I only name .bat files in windows. else, in the land of unix/linux/etc it's .sh ;)

jsakalos
3 Mar 2009, 12:06 PM
Who would rename it... It's too much work... Just chmod 755 ext-doc.bat and here we go... ;)

jay@moduscreate.com
3 Mar 2009, 12:08 PM
LOL, i like your style Saki :)

jsakalos
3 Mar 2009, 12:12 PM
Thx, kidding all the time.... :D :D :D

keren9
3 Mar 2009, 12:23 PM
Is anyone getting this exception?


I'm getting the following exception:

FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile styleseet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.ewTemplates(TransformerFactoryImpl.java:825)
at extdoc.jsdoc.processor.FileProcessor.saveToFolder(FileProcessor.java: 817)
at extdoc.Main.main(Main.java:18)

Any idea what might be the cause?

Thanks!

arthurakay
9 Mar 2009, 2:33 PM
I'm also getting the "could not compile stylesheet" error.

I am using the following in the XML file:


<sources>
<source src="/Users/akay/Documents/TFS Workspaces/Basan/Basan-dev/Source/Basan.Web/Content/js" match="*.js"/>
</sources>


I've tried swapping the "/" for "\", as well as using "C:\" at the beginning... none of which help.

And the error I see is:


*** STATISTICS ***
*** COPY RESOURCES ***
*** COPY SOURCE FILES ***
Target folder: ../output\source
ERROR: 'unknown protocol: c'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at xtdoc.jsdoc.processor.FileProcessor.saveToFolder(FileProcessor.java: 1001)
at extdoc.Main.main(Main.java:83)

mrsunshine
10 Mar 2009, 12:50 AM
Do you tried to escape the whitespace in your path?
Or test it from a path without whitespaces?

arthurakay
10 Mar 2009, 6:51 AM
I've been trying a few things, but none seem to work... for example:



<source src="C:\Users\akay\Documents\TFS&nbsp;Workspaces\Basan\Basan-dev\Source\Basan.Web\Content\js" match="*.js"/>
Using the '&nbsp;' entity, I get the following errors:


javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: The entity "nbsp" was referenced, but not declared.]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source)
at extdoc.jsdoc.processor.FileProcessor.process(FileProcessor.java:769)
at extdoc.Main.main(Main.java:79)
Caused by: org.xml.sax.SAXParseException: The entity "nbsp" was referenced, but not declared.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
... 6 more
*** COPY RESOURCES ***
*** COPY SOURCE FILES ***
Target folder: ../output\source
ERROR: 'unknown protocol: c'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at extdoc.jsdoc.processor.FileProcessor.saveToFolder(FileProcessor.java:1001)
at extdoc.Main.main(Main.java:83)
I'm not a Java guy, so I'm a bit lost and I apologize if I'm doing something silly... for clarity, here's the code I'm running:

XML file:


<?xml version="1.0" encoding="UTF-8"?>
<doc>
<sources>
<source src="C:\Users\akay\Documents\TFS&nbsp;Workspaces\Basan\Basan-dev\Source\Basan.Web\Content\js" match="*.js"/>
</sources>
<tags>
<tag name="author" title="Author"/>
<tag name="version" title="Version"/>
<tag name="note" format="&lt;i&gt;NOTE: {0}&lt;/i&gt;"/>
<tag name="demo" title="Demo" format="&lt;a href=&quot;{0}&quot;&gt;{0}&lt;/a&gt;" />
</tags>
</doc>
Command line script (Windows) from the /samples/ directory of the unzipped project:


java -jar ../ext-doc.jar -p ext.xml -o ../output -t ../template/ext/template.xml -verbose


UPDATE:
It turns out the issue with the spaces has nothing to do the with XML file, but rather where I saved and opened the ZIP file from the Ext-Doc project.

I had saved it to something like C:\Arts Work\blah\foo\bar\, but moving it to C:\test\ allowed it to run just fine... even when I reference a folder on my drive with a space in the name. D'oh!

mrsunshine
10 Mar 2009, 7:05 AM
I've been trying a few things, but none seem to work... for example:



<source src="C:\Users\akay\Documents\TFS&nbsp;Workspaces\Basan\Basan-dev\Source\Basan.Web\Content\js" match="*.js"/>



&nbsp; Is a HTML entitie, that could not work.

Try to escape the whitespace like this


<source src="C:\Users\akay\Documents\TFS/ Workspaces\Basan\Basan-dev\Source\Basan.Web\Content\js" match="*.js"/>


or try to use relative paths like

<source src="../../public/javascripts/application.js" />

Foggy
10 Mar 2009, 7:41 AM
I got also an error after generating docs.
Firebug says:

attr is undefined
TreeFilter()(undefined)ext-all.js (Linie 105)
TreeFilter()([Node root] loaded=false loading=true childrenRendered=false)ext-all.js (Linie 105)
TreeFilter()([Node root] loaded=false loading=true childrenRendered=false, function())ext-all.js (Linie 105)
TreeNodeUI()(false, false, undefined)ext-all.js (Linie 103)
AsyncTreeNode()(undefined)ext-all.js (Linie 102)
TreeEventModel()()ext-all.js (Linie 99)
Action()(Object dom=body#docs.ext-gecko id=docs visibilityMode=1, "\n ")ext-all.js (Linie 58)
ContainerLayout()()ext-all.js (Linie 64)
getAnchorViewSize()(Object initialConfig=Object layout=Object events=Object, Object dom=body#docs.ext-gecko id=docs visibilityMode=1)ext-all.js (Linie 70)
onLayout()()ext-all.js (Linie 65)
ContainerLayout()(undefined)ext-all.js (Linie 64)
ContainerLayout()()ext-all.js (Linie 64)
Action()(Object layout=border items=[3])ext-all.js (Linie 58)
getViewWidth()()ext-base.js (Linie 9)
getViewWidth()()ext-base.js (Linie 9)
getViewWidth()()ext-base.js (Linie 9)
(?)()()docs.js (Linie 329)
EventManager()()ext-all.js (Linie 12)
camelFn()()ext-all.js (Linie 13)
[Break on this error] Ext.tree.TreeLoader=function(A){this.bas..."function"){A.callback(this,A.node)}}});
I open the docs over http://localhost/_extDocs/index.html
Can you help me with this iusse please?

@arthur
Have you tried something like this?

<source src="C:\Users\akay\Documents\TFS%20Workspaces\Basan\Basan-dev\Source\Basan.Web\Content\js" match="*.js"/>

oxymoron
22 Mar 2009, 1:15 PM
I'm back...

jay@moduscreate.com
22 Mar 2009, 1:37 PM
Welcome back dude.

aconran
23 Mar 2009, 10:48 AM
@oxymoron check your private messages; We would like to contribute some code back to the ext-doc project.

oxymoron
5 Apr 2009, 4:40 AM
I'm so happy to find docs generated for ExtJS 3.0 (http://extjs.com/products/extcore/docs/), but there are only core components as far as I understand. Unfortunately, I'm far away from office these days (and during next 2 months). So I can not get access to ExtJS SVN, could anyone send me (oxxxymoron@gmail.com) latest 3.0 trunk. Or I would be better if ext core team provide read-only access to ExtJS SVN for me to make ext-doc support 3.0 version.

jay@moduscreate.com
5 Apr 2009, 3:20 PM
Oxymoron,
The docs that you see are for Ext-core, not Ext JS 3.0/

oxymoron
5 Apr 2009, 11:50 PM
The docs that you see are for Ext-core, not Ext JS 3.0/

Oh... I see! Thanks, Jay!

oxymoron
8 Apr 2009, 9:33 AM
Today I've made a very simple first page for ext-doc project: http://ext-doc.org/.

I know that ext-doc requires more documentation or tutorials, when I'll have time for that - I'll put some more information to this site.

jsakalos
8 Apr 2009, 9:47 AM
Page looks very nice and aesthetic, I like it.

Keep on doing the great work.

jay@moduscreate.com
8 Apr 2009, 2:42 PM
May i suggest setting up wordpress or something similar so we can blog about changes/etc?

oxymoron
8 Apr 2009, 10:00 PM
Thanks for suggestion, Jay!

Actually, I'm trying to choose proper solution for the site. I thought about Joomla/Drupal/Wordpress/Wikimedia or something custom based on Zend Framework. I've had experience only with Joomla and Wikimedia, so installing wordpress would be interesting for me.

Funcracker
15 Apr 2009, 2:20 AM
Thanks for suggestion, Jay!

Actually, I'm trying to choose proper solution for the site. I thought about Joomla/Drupal/Wordpress/Wikimedia or something custom based on Zend Framework. I've had experience only with Joomla and Wikimedia, so installing wordpress would be interesting for me.

Well, as Wordpress is one of the popular choices today, it might be useful to actually try it for a change :) It's not hard, it's popularity led to the creation of sufficient documentation.

I personally prefer blog-sites over wiki variants, but that is just me. Both have their uses of course, but starting with a blog sounds alright.

Btw, I'm going to try and use to use ext-doc to document non-javascript code :O. I'm curious to see how to get that to work. I do have a related question: Is your Java source freely available? If so than that might make my life easier. If not, then I'll have to write some code to generate JS code from my own code, before being able to use your app.

I do love the custom tags btw! Nice work!!

mrsunshine
15 Apr 2009, 12:25 PM
@oxymoron Saw you add the utf-8 stuff to the SVN, thank you guy

oxymoron
15 Apr 2009, 8:31 PM
Funcracker,
Thanks for comments!


Is your Java source freely available?

ext-doc is available under GNU General Public License v3 (http://www.gnu.org/licenses/gpl.html) so you can freely modify source code if you don't want to distribute it after that, otherwise you have to share your modified source code with community. Refer to official GPL v.3 text for details.


mrsunshine,

Right - in rev.140, 141 I've made some changes related to UTF-8 support in source code. It is already there at http://ext-doc.org/ in Latest Snapshot.

Funcracker
16 Apr 2009, 1:56 AM
Thanks Oxymoron! One question remains though, where to get the java code? I can unjar the jar and get the class files. I can of course reverse them, but it would be nicer just to use the original files. Is this possible? Did I overlook something? If so then sorry for bothering you with this.

oxymoron
16 Apr 2009, 3:04 AM
where to get the java code?

ext-doc source code is available at Google Code (http://code.google.com/p/ext-doc/). To get full source code just follow the instructions in Build from SVN section.

Condor
16 Apr 2009, 3:06 AM
Thanks Oxymoron! One question remains though, where to get the java code? I can unjar the jar and get the class files. I can of course reverse them, but it would be nicer just to use the original files. Is this possible? Did I overlook something? If so then sorry for bothering you with this.

Just use a SubVersioN client to download the trunk from:

http://ext-doc.googlecode.com/svn/trunk/

Funcracker
17 Apr 2009, 7:05 AM
Thanks guys!

I thought I did that, but I must have missed something. Thanks for pointing that out!

oxymoron
19 Apr 2009, 8:44 AM
Correct, only Subversion (http://subversion.tigris.org/) is required, but current release is in http://ext-doc.googlecode.com/svn/branches/1.0/.

http://ext-doc.googlecode.com/svn/trunk/ - is used for experiments only... I hope, after some time there will be ext-doc v.1.1, based on ANTLR (http://www.antlr.org/), and may be by that time it will be possible to use it not only for JavaScript and ExtJS. I hope that in the nearest future one of my friends will join the project and help me with abstract grammar parsing.

nctag
23 Apr 2009, 12:38 AM
Nice work.

note: access per file:// is not supported. You have to copy it to a web server. I did this mistake.

question: I have some doubled entrys. For example Element. Could you give me some inputs why this is happening? Here is my documentation: http://luzern.nct.ch/api

nctag
1 May 2009, 2:57 AM
I have still this error. I haven't found any help yet. Can you help me please? Live demo still accessable: http://luzern.nct.ch/api. For example Function or Element are doubled. Why? How to avoid it?

I used the *.js entry in ext.xml and just added the whole Ext sources.

edit:


<sources>
<source src="ext/source" match="*.js"/>
<!--<source src="ext" match="Ext*.js"/>-->
<!--<source src="sample.js" />-->
</sources>

oxymoron
1 May 2009, 4:45 AM
nctag,
I see the problem. This problem occurs when you try to generate docs for ExtJS 3.0 only. For ExtJS 2.x it's OK. In PM aconran from ExtJS Development Team mentioned that they've some made changes in the parser to support "class partials" (for ExtJS 3.0 - this is the reason of duplicated classes) and they are ready to contribute it back. So I hope thay will contribute this changes back to ext-doc - and the problem will be resolved for ExtJS 3.0 docs, otherwise I'll try find my own way to resolve it.

nctag
1 May 2009, 4:53 AM
Thank you for you immediate reply. Now I think it was my fault to generate the 3.0 docs when it is not supported yet. I'll wait for the official support of 3.0. But if its the only one error... I can wait till you get the fix. Anyway nice work that you've done! Thanks.

drotechprog
4 May 2009, 5:54 AM
Nice work.

note: access per file:// is not supported. You have to copy it to a web server. I did this mistake.

question: I have some doubled entrys. For example Element. Could you give me some inputs why this is happening? Here is my documentation: http://luzern.nct.ch/api

I made the same mistake. Oxymoron, thanks for all your hard work on this project. It's been a big help to my company.

nctag
11 May 2009, 12:33 AM
Can somebody help me? I have a class and it generates the docs very suspicious.
I have the *.js mask and generate the docs from all files of Ext 3.0 and my file containing the following code:

It seems that I get some entries from a translation class :))

please take a look at the attached screenshot.

hint: there is only a problem with the public properties. Anything else goes well.



/**
* A SearchField that provides changeTriggerIcon method and
* specifies the event of the Ext.ux.form.TriggerField class.
*
* @class Ext.ux.form.SearchField
* @author Claudio Bernasconi
*/
Ext.ux.form.SearchField = Ext.extend( Ext.ux.form.TriggerField,{
/**
* @cfg {string} dataIndex The name of the column
*/
dataIndex : null,

/**
* Initializes a new event called triggerclick.
*/
initComponent : function(){
Ext.form.ComboBox.superclass.initComponent.call(this);
this.addEvents(
/**
* @event triggerclick
* Fires when the trigger is clicked
* @param {Ext.ux.form.SearchField} searchField This SearchField
* @param {string} value The value of the SearchField
* @param {string} dataIndex The dataIndex (column name)
* @param {string} action The action either 'search' or 'clear'
*/
'triggerclick'
);
},

/**
* Changes the trigger icon class.
* If the icon is x-form-search-trigger it will be x-form-clear-trigger.
* If the icon is x-form-clear-trigger it will be x-form-search-trigger.
*/
changeTriggerIcon : function(){ //new function
var cmp = Ext.fly( 'trigger-'+this.id );

if( this.triggerClass == "x-form-search-trigger" )
{
cmp.removeClass( "x-form-search-trigger" );
this.triggerClass = "x-form-clear-trigger";
}
else
{
cmp.removeClass( "x-form-clear-trigger" );
this.triggerClass = "x-form-search-trigger";
}

cmp.addClass( this.triggerClass );
},

/**
* Fires the triggerclick event.
* If the trigger was clicked when the field has shown a cross as trigger
* the value of the field will be reset.
*/
onTriggerClick : function(){ //override
if( this.disabled )
return;

if( this.triggerClass == "x-form-search-trigger" )
{
this.fireEvent("triggerclick", this, this.getValue(), this.dataIndex, "search" );
}
else
{
this.fireEvent("triggerclick", this, this.getValue(), this.dataIndex, "clear" );
this.setValue( "" );
}

this.changeTriggerIcon();
},

/**
* Renders the field like a standard Ext.form.TriggerField.
* The assigned triggerClass will be added to the trigger element.
*/
onRender : function(ct, position){ //override
Ext.form.TriggerField.superclass.onRender.call(this, ct, position);

this.wrap = this.el.wrap({cls: "x-form-field-wrap"});
this.trigger = this.wrap.createChild(this.triggerConfig ||
{tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass, id:'trigger-'+this.id });
//adds the additional triggerClass to the trigger element
if(this.hideTrigger){
this.trigger.setDisplayed(false);
}
this.initTrigger();
if(!this.width){
this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());
}
if(!this.editable){
this.editable = true;
this.setEditable(false);
}
},
});

stefanorg
15 May 2009, 7:30 AM
1)

It's a bug! I've fixed that in SVN (revision 129). It was trying to match full file name like "c:/folder/ExtExtension.js" instead of just "ExtExtension.js". Now it should be fine.

Regarding regular expression matching... in fact, I convert wildcards like "Ext*.js" to regexp "^Ext.*\.js$" with pretty simple function (extdoc.jsdoc.util.StringUtils.wildcardToRegex()). IMHO, wildcards look more "natural". If it is really required, I can extend it in the future to support something like:
<source src="ux" match="^Ext.*\.js$" matchType="regexp"/>

2)

May be it is a little tricky, but you can try this with current version:

Edit template\ext\tpl\tree.xsl:



line 22:<xsl:for-each select="packages[@name='Ext' or starts-with(@fullName, 'Ext.ux')]">
line 26:<xsl:if test="count(packages[@name='Ext' or starts-with(@fullName, 'Ext.ux')])!=0 and count(classes[starts-with(className, 'Ext.ux')])!=0">,</xsl:if>
line 27:<xsl:for-each select="classes[starts-with(className, 'Ext.ux')]">


It will change only tree.js file that represents package hierarchy. And you have to include ExtJS sources when you generate docs to get proper inheritance tree. It will leave only classes and packages that starts with Ext.ux.

It is not the best, but the simplest way now.

3)
There are no docs now. But there are a huge number of examples: all the ExtJS library :)

Here is the list of currently supported tags:

@extends: 127
@ignore: 8
@constructor: 121
@property: 128
@return: 685
@param: 2150
@member: 17
@cfg: 906
@class: 185
@static: 108
@type: 340
@singleton: 25
@event: 284
@hide: 247
@private: 82
@method: 203

+ user defined (custom) tags

I'll make a wiki page in google code, for tags syntax, but I'm not good in English, so any help will be appreciated!

Hi all,
i've a question regarding generation of doc without the Ext source (like saky say: "i want to keep it simple") I've modified the tree.xsl stylesheet like suggested and it worked.But i want also "remove" the reference to the Extended class of ext like saky's documentation. I've tried to remove in ext.xml the reference tu the ext source but i got an exeption. How i've to do?

ps: sorry for my english :((

stefanorg
15 May 2009, 1:00 PM
:-? sincerely i don't understand how :D maybe i was modifing the wrong copy of ext-doc/ext.xml but now removing the reference to ext source i'm able to generate only the doc for the class i want. Thank's



Hi all,
i've a question regarding generation of doc without the Ext source (like saky say: "i want to keep it simple") I've modified the tree.xsl stylesheet like suggested and it worked.But i want also "remove" the reference to the Extended class of ext like saky's documentation. I've tried to remove in ext.xml the reference tu the ext source but i got an exeption. How i've to do?

ps: sorry for my english :((

zig999
20 May 2009, 5:46 AM
Hello. Excelent project! Really cool to be able to generate such documentation.

I´m having some trouble with UTF-8 and latin characters such:


/**
* Deixa visível o ícone de verificado (ícone verde).
* @return {Ext.ux.PanelMsg} this
*/


The "í" character becomes Ã.

My .js file is UTF-8 encoded.

Any tips? Am I doing something wrong?
Thanks a lot.

oxymoron
20 May 2009, 6:51 AM
Try to use latest snapshot from http://ext-doc.org/. It supports UTF-8 in source files.

zig999
20 May 2009, 8:44 AM
Thanks a lot oxymoron.
I works perfectly.
And congratulations for the project. :D

Zig

markpele
20 May 2009, 9:25 AM
Is it possible to use ext-doc to produce docs for code in other languages not just javascript?
php, java... ?

thanks

oxymoron
20 May 2009, 6:59 PM
Is it possible to use ext-doc to produce docs for code in other languages not just javascript?
php, java... ?

Currently it is not possible. But we plan to support other languages in the future.

jay@moduscreate.com
10 Jun 2009, 5:59 AM
Woohoo!! i finally got the project to run under OS X with IntelliJ. :)

Now to add some UI coolness :)

oxymoron
10 Jun 2009, 6:45 AM
Good!

BTW, I also use IntelliJ IDEA!

jay@moduscreate.com
10 Jun 2009, 7:10 AM
BTW, i will be posting updated info via twitter using hash tag #ExtDdoc

http://twitter.com/#search?q=%23ExtDoc

arthurakay
24 Jun 2009, 12:53 PM
I tried this awhile back, and couldn't get it working. I've had some time this week to try again, but I'm still hitting a wall.

Running the .bat file on Vista, I'm including a single file with the following code:



Basan.URL = new function() {
/**
* @property keepAlive
*/
this.keepAlive = '/Home.mvc/' + 'KeepAlive';

/**
* @method formatSearchDto Correctly formats and serializes the search DTO object for methods that need it.
* @param {string} entity
* @param {GUID} companyCode
* @param {Array} searchData the search criteria
* @return An object
*/
this.formatSearchDto = function(entity, companyCode, searchData) {
return Ext.encode({
companyCode: companyCode,
SearchResultEntity: entity,
SearchItems: searchData
});
}
};


Running the .bat file, I get the following error in my Windows Console:


>>>java -jar ../ext-doc.jar -p ext.xml -o ../output -t ../template/ext/template.xml -verbose

Processing: sample.js
Exception in thread "main" java.lang.NullPointerException
at extdoc.jsdoc.processor.FileProcessor.processProperty(FileProcessor.java:366)
at extdoc.jsdoc.processor.FileProcessor.processComment(FileProcessor.java:500)
at extdoc.jsdoc.processor.FileProcessor.processFile(FileProcessor.java:590)
at extdoc.jsdoc.processor.FileProcessor.processDir(FileProcessor.java:747)
at extdoc.jsdoc.processor.FileProcessor.process(FileProcessor.java:786)
at extdoc.Main.main(Main.java:79)


I'm guessing that my documentation tags are somehow wrong, but the Google Code wiki doesn't really elaborate on most of the tags. If I remove my documentation comments completely, the parser runs just fine... but that doesn't do me much good B)

Any idea what I'm doing wrong here?

babsjr77
24 Jun 2009, 1:04 PM
Does adding a @class attribute to Basan.URL work?

arthurakay
24 Jun 2009, 1:11 PM
Does adding a @class attribute to Basan.URL work?

It sure does! Thanks for that... I'm was using JSDoc Toolkit for my documentation, and the tags are similar. I had @namespace above Basan.URL to begin with, but that didn't work so I just got rid of it. @class works, so I'm assuming it's required.

Thanks!

One more thing - how do I document method parameters which are objects? For example, I might pass "configObj" to a method, but "configObj" requires several attributes. In JSDoc Toolkit, I can just do:


/**
* @method myMethod
* @param {Object} configObj
* @param {Object} configObj.one
* @param {Object} configObj.two
*/
myMethod(configObj) {...}


...but ext-doc doesn't seem to recognize that they're part of the same object. It outputs that my method takes 3 parameters, not one parameter with 2 attributes.

mjlecomte
24 Jun 2009, 2:25 PM
Suggest you trying running some Ext code through it to verify it generates ok. I think you'll need to add a @class at a minimum.

marius.ciotlos
24 Jun 2009, 11:05 PM
One more thing - how do I document method parameters which are objects? For example, I might pass "configObj" to a method, but "configObj" requires several attributes. In JSDoc Toolkit, I can just do:


/**
* @method myMethod
* @param {Object} configObj
* @param {Object} configObj.one
* @param {Object} configObj.two
*/
myMethod(configObj) {...}


...but ext-doc doesn't seem to recognize that they're part of the same object. It outputs that my method takes 3 parameters, not one parameter with 2 attributes.

I was not around for some time, and I still didn't get myself enough time to do updates on the wiki (sorry oxy). IRL school and work issues.

Anyway, on other notes, as far as I know this is not supported, but there is a way to do it by adding it as a code inline comment:



/**
* @method myMethod
* @param {Object} configObj
* This configuration parameter must be of this type:
* <pre><code>
* configObj = {
* one: "first one,
* two: 2
* }
* </code></pre>
*/
myMethod(configObj) {...}



I know it's not elegant, but only Oxy knows of any better way or if he will implement this :P. I needed it too, but never thought about it being able to get defined like that.

In my opinion giving usage examples is also a very good idea (real data, not just strict params and name) because it's always more intuitive for the user.

oxymoron
24 Jun 2009, 11:39 PM
arthurakay,

ext-doc currently doesn't support documenting of attributes in object parameters for methods. If you have a proposal, how it may be done, please, add it to the issue list (http://code.google.com/p/ext-doc/issues/list) as enhancement. I also have not so much time now for ext-doc. Anyway, your proposal can make ext-doc better!

mjlecomte
25 Jun 2009, 4:29 AM
Suggest you trying running some Ext code through it to verify it generates ok. I think you'll need to add a @class at a minimum.

WTF? Looks like I responded well too late, sorry. Must have had the post sitting around a while. :">

arthurakay
25 Jun 2009, 5:53 AM
Thanks everyone. I added this to the issue list, though it got added as a "defect" and not an "enhancement" and I don't think I have the power to change that.

Loving the tool so far!

Dumas
19 Jul 2009, 8:51 AM
The Documentor is really cool, love it!

Is there a documentator for php as well in this extjs still with search function and all the other cool stuff?

thx
Dumas

jay@moduscreate.com
19 Jul 2009, 8:53 AM
google phpdoc

Dumas
20 Jul 2009, 4:16 PM
I wanted an php documentor in the same stlye as isjs documentor, not just any phpdoc...

oxymoron
20 Jul 2009, 4:23 PM
Dumas,
http://extjs.com/forum/showthread.php?p=332616#post332616

Dumas
21 Jul 2009, 6:13 AM
Dumas,
http://extjs.com/forum/showthread.php?p=332616#post332616
thx

roseroyce
5 Aug 2009, 6:38 AM
I am still very confuse with java..thus anybody knows how to make it little bit simple. :)

arthurakay
5 Aug 2009, 6:45 AM
Hi roseroyce,

I'm going to add a tutorial on getting Ext-Doc setup to the wiki. I meant to do that a while back but just haven't had time. I'll let you know when it's up... should be in a few minutes.

roseroyce
5 Aug 2009, 6:52 AM
Hi roseroyce,

I'm going to add a tutorial on getting Ext-Doc setup to the wiki. I meant to do that a while back but just haven't had time. I'll let you know when it's up... should be in a few minutes.

That would be great. Cheers :)

arthurakay
5 Aug 2009, 7:20 AM
I quickly put together this document: http://code.google.com/p/ext-doc/wiki/RunningExtDoc

Send me a PM or comment directly on the Wiki with questions. It's geared for Windows users and I'm hoping it's clear and concise.

steffenk
21 Aug 2009, 12:49 AM
Hi,

first of all many thanks for the excellent doumentator!


Currently it is not possible. But we plan to support other languages in the future.

could you specify what is future and what languages are planned for support?

I'm actually looking for a good php doc, as i'm not satisfied with the existing ones:
phpdocumentor, php_uml or Doxygen

Foggy
21 Aug 2009, 10:26 PM
Why you are not satisfied with phpdocumentor?
Do you know that there exists a ExtJS Template for it?
Download: http://code.google.com/p/zym/downloads/list
Example: http://www.zymengine.com/docs/0.5/api/

steffenk
22 Aug 2009, 2:32 AM
Hi Foggy,

didn't knew that, thx for the link!

The problem is that we have a project based on php 5.3 which use namespaces, and this is not supported by phpdocumentor.
Also i think it's not maintained anymore.

tonig84
1 Sep 2009, 10:13 AM
I'm running into the same trouble as jsakalos here:


...
My idea is to generate docs from my extensions but do not include complete Ext doc to keep it simple. I'm able to generate the doc but it says "Extends Object" while it extends an Ext class in fact.

The ideal would be to generate doc that would contain links to on-line Ext documentation. E.g. my extension extends form, docs would correctly say "Extends Ext.form.FormPanel" and that would be the link to Ext.form.FormPanel on-line doc.
...

I found a workaround:

1.- First, modify class.xsl for not generating "Extends:" when the parent class is not found.
Replace:

<tr>
<td class="label">Extends:</td><td class="hd-info">
<xsl:choose>
<xsl:when test="superClasses">
<a href="output/{superClasses[last()]/className}.html" ext:cls="{superClasses[last()]/className}" ext:member=""><xsl:value-of select="superClasses[last()]/shortClassName"/></a>
</xsl:when>
<xsl:otherwise>Object</xsl:otherwise>
</xsl:choose>
</td>
</tr>
with:



<xsl:choose>
<xsl:when test="superClasses">
<tr>
<td class="label">Extends:</td><td class="hd-info">
<a href="output/{superClasses[last()]/className}.html" ext:cls="{superClasses[last()]/className}" ext:member=""><xsl:value-of select="superClasses[last()]/shortClassName"/></a>
</td>
</tr>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
2.- Then add a custom tag for classes extending base extjs classes:


<tag name="extends-ext" title="Extends" format="&lt;a href=&quot;http://extjs.com/deploy/ext-2.2.1/docs/?class={0}&quot;&gt;{0}&lt;/a&gt;" />3.- Use @extends-ext instead of @extends for classes extending base extjs classes.

The only drawback is classes really extending Object would not generate the "Extends: Object" text, but that is fine for me.

anumanbalam
2 Sep 2009, 8:06 AM
"1.- First, modify class.xsl for not generating "Extends:" when the parent class is not found.
Replace:"

Exactly what I needed. Thanks

SonicBog
13 Sep 2009, 3:25 PM
Hi,

I have added some new methods and properties to the Date and Number classes and I would like to document them like ExtJS does for the extensions it provides.
However, when I do the API documentation has two entries for Number and Date which then mess up the navigation.

Any help on how to get around this or fix this would be appreciated.

Thanks
Darren

It's Okay. I have found the discussions on using the @private on the class declarations

jay@moduscreate.com
16 Sep 2009, 11:52 AM
some slight modifications, more to come: http://tdg-i.com/198/some-small-updates-to-the-ext-doc-project
http://tdg-i.com/img/screencasts/2009-09-16_1533.png

jay@moduscreate.com
18 Oct 2009, 11:33 AM
FYI all: I've updated ext-doc (r168) to allow it to properlly document class partials. Thank you so much Aaron and Sven for the contributions.
-Jay

hello2008
3 Nov 2009, 9:14 AM
FYI all: I've updated ext-doc (r168) to allow it to properlly document class partials. Thank you so much Aaron and Sven for the contributions.
-Jay

really perfect, thanks team, thanks ext-doc =D>

crp_spaeth
26 Nov 2009, 12:05 AM
Hey guys,
just gave the Ext-Doc another try. And it works really well! But i came up with some encoding problems you may can help me to solve...

The problem appears if you insert a special german character to the doc like
ä, ö, ü or ß.

For example a Documentation like:
"...enthält alle zum übersetzen..."
becomes
"...enth�lt alle zum �bersetzen..."

I am using Spket IDE for writing ExtJs Code and I use the default encoding for those files (utf-8).

May you have an idea how to get rid of it...
best regards Martin

oxymoron
26 Nov 2009, 4:27 AM
UTF-8 problems were fixed in revision 141

Try to use latest snapshot from http://ext-doc.org/upload/ext-doc-1.0-SNAPSHOT.zip

crp_spaeth
26 Nov 2009, 4:43 AM
Hey oxymoron,
I used the ext-doc-1.0-SNAPSHOT.zip I downloaded yesterday from your google code link.
And the Problem did apear in it.
After taking a look into the changelog it seems to me that those changes in rev140 just affect the source output nor the do affect the documentation it self.

I am talking about the files in the /output/output folder that get transformd via the xslt.

The issue appears in those files!

oxymoron
26 Nov 2009, 7:37 AM
You're right! Utf-8 was not working. Encoding was lost when we added support for ExtJS 3.0 in rev 168. I've made changes and it is at http://ext-doc.org/upload/ext-doc-1.0-SNAPSHOT.zip

crp_spaeth
26 Nov 2009, 8:10 AM
Jeah seems to work!
This makes even documention Funny!

Thank you so much!!!

Steffen Hiller
4 Dec 2009, 11:02 AM
Could anybody post the current steps for building the Ext JS docs from Ext JS svn trunk, please? Preferable on the Mac. (Hope this is the correct thread to ask for this.)
I find it a little unfortunate that Ext doesn't have a README file which includes such instructions.

Thanks!!

Steffen

jay@moduscreate.com
4 Dec 2009, 11:08 AM
Hi Steffen,

Download the snapshot and replace this script with the default:

replace: /www/extsvn/extdoc/build/dist/ with your directory



java -jar /www/extsvn/extdoc/build/dist/ext-doc-snapshot/ext-doc.jar -p /www/extsvn/extdoc/build/dist/ext-doc-snapshot/sample/ext.xml -o $1 -t /www/extsvn/extdoc/build/dist/ext-doc-snapshot/sample/../template/ext/template.xml -verbose


Here is the script that I use to do an svn checkout, jsbuilder, then ext-doc.


#!/bin/bash

defaultSource="/www/extsvn/ext3"
defaultDestination="/www/ext2play/ext3"
wrkDir="/Users/jgarcia/jsBuilder2"

myCWD=`pwd`

cd $wrkDir

echo "######### BEGIN SVN checkout ##############"
svn update http://code.extjs.com/svn/ext/trunk --username user here --password pass here $defaultSource

echo "######### BEGIN Build ##############"
cd $defaultDestination
echo "Deleting from $defaultDestination"
outDir=`grep deployDir $defaultSource/ext.jsb2 | awk -F: '{print $2}' | sed -e "s/[',\ ]//g"`
filesToDelete=`ls $defaultDestination | grep -v docs `
echo $filesToDelete
rm -rf $filesToDelete


echo "Building...."
java -jar $wrkDir/JSBuilder2.jar --projectFile $defaultSource/ext.jsb2 --homeDir $defaultDestination

echo "Moving Files from $defaultDestination/$outDir to $defaultDestination..."
mv $defaultDestination/$outDir/* $defaultDestination/

echo "Doing doc update..."
/www/extsvn/extdoc/build/dist/ext-doc-snapshot/sample/ext-doc.sh "$defaultDestination/docs"

Steffen Hiller
4 Dec 2009, 11:17 AM
Awesome Jay, I knew I can count on you! :-)

Stuff like this should be included in a README file: http://www.extjs.com/forum/showthread.php?t=87040

pinecone_web
16 Dec 2009, 12:18 AM
Hi Oxymoron,

There is an unwanted blank line appears after every comment line in the <pre><code> block.
For example, writing the following:

/*
* <p>A store configuration would be something like:<pre><code>
var store = new Ext.data.JsonStore({
// store configs
autoDestroy: true,
url: 'get-images.php',
storeId: 'myStore',
// reader configs
root: 'images',
idProperty: 'name',
fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
}); </code></pre>
*</p>
*/

gives the attached result.

jay@moduscreate.com
16 Dec 2009, 8:40 AM
As soon as Ext 3.1 drops, I will add it to the project ;)

jay@moduscreate.com
17 Dec 2009, 2:03 PM
Now at 3.1

http://tdg-i.com/img/screencasts/2009-12-17_1702.png

james.tucker
22 Dec 2009, 11:03 AM
Ok, dumb question. Which username and password do we use? Our support one, our forum one or a different one?

jay@moduscreate.com
22 Dec 2009, 11:53 AM
James, what are you talking about? What username and password?

james.tucker
22 Dec 2009, 12:27 PM
When I try to connect to the SVN. I decideded to just use the latest snapshot that has everything you discussed, so I am good.

I see that the search is going to your playpen area, is there an example of how the PHP search is running so we can create our own here?

jay@moduscreate.com
22 Dec 2009, 12:57 PM
If you're looking to learn how to use json_encode for PHP, there are better places like php.net

jay@moduscreate.com
22 Dec 2009, 12:57 PM
Btw, search is going to the Ext JS search php web service and does not belong to ext-doc.

james.tucker
22 Dec 2009, 1:01 PM
I know how to use JSON_ENCODE for PHP, so that is not the issue. I am looking for the basics of how your search is parsing the files, etc as there is no documentation for that part as far as I can tell.

jay@moduscreate.com
22 Dec 2009, 1:14 PM
No clue as to what it's doing. I have a feeling it's reading stuff out of a mysql db

james.tucker
22 Dec 2009, 1:19 PM
Ok, cool. Thanks for the info. For our usage I will disable it for the time being.

Also, thanks for providing such a nice tool!

artalat
3 Jan 2010, 6:03 AM
Hi, this may sound like a dumb question, but i cant seem to find a solution. How do u create nested packages?

jay@moduscreate.com
3 Jan 2010, 6:13 AM
Try creating nested namespace objects.

artalat
3 Jan 2010, 6:17 AM
do you mean

Ext.ns('pk1');
Ext.ns('pk1.pk2');

If thats the case then its not working for me :(

also, since youre replying, could u guide me how it port it to the ext 3 docs? im trying that myself, but your help would certainly speed up the process.

Thanks a lot..

jay@moduscreate.com
3 Jan 2010, 6:36 AM
try placing something in those packages.

Also, you need to update to the latest rev (r173). i ported 3.1 to it.

artalat
3 Jan 2010, 6:58 AM
I was already putting stuff in it. But ive found the problem.

It doesn't create a nested package if its name starts with an uppercase letter. For example the following creates nested packages:

Ext.ns('pk1');
Ext.ns('pk1.pk2');

But this doesnt:

Ext.ns('pk1');
Ext.ns('pk1.Pk2');

I don't know why this is so, but this is how it is, or at least the conclusion of my testing.

I have downloaded the latest version now. Thanks a lot.

jay@moduscreate.com
3 Jan 2010, 6:59 AM
Case should not matter, but I will look into it. None the less, it is encouraged that you follow the Java CamelCase naming scheme when coding.

artalat
3 Jan 2010, 7:02 AM
it is encouraged that you follow the Java CamelCase naming scheme when coding.

I'm not aware of that, only a student :). But ill surely look into it. Thanks a lot.

oxymoron
3 Jan 2010, 10:12 PM
To get more details about package name resolving refer to http://www.extjs.com/forum/showthread.php?p=261579#post261579. May be we need a kind of FAQ at project's site.

jay@moduscreate.com
8 Jan 2010, 6:17 AM
Unstickied and added to http://www.extjs.com/forum/showthread.php?t=71897

james.tucker
8 Jan 2010, 7:37 AM
Ok, been banging my head on my desk over this one, but I cannot seem to get any custom tags to work. I know it has to be a simple issue, but I cannot for the life of me find it.

Here is my Setting XML...


<tags>
<tag name="version" title="Version"/>
</tags>


The XSL has the following...


<xsl:if test="customTags">
<tr><td>HELLO</td></tr>
</xsl:if>


The results show that "customTags" is failing no matter what I have in the tags section of my setup XML.

Please provide any assistance you can.

It is important to note that this appears to only be a problem in the class header and not in the method details...

Here is an example of on of my class headers...


/**
* @class CIM.portal.modules.orgtree
* @version 9.12
* <p>Container for the Universal Portal Organization Tree Namespace and provides access to the {@link CIM.portal.modules.orgtree.Panel} created in the West Panel.
* Also supports the creation of the Agent level Report Selection menu.</p>
*
*/

Holger
18 Jan 2010, 5:38 AM
In the Ext Core Manual I found a new style to implement the constructor.
There are plans to implements this style for this great document generator?



/**
* @class Person
*/
Person = Ext.extend(Object, {

/**
* @constructor
* Create a person
* @param {String} first Firstname
* @param {String} last Lastname
*/
constructor: function(first, last){
this.firstName = first;
this.lastName = last;
}

});

ShadowZero3000
11 Feb 2010, 12:58 PM
Seems I came to ext-doc in the wrong direction (saw the google code before the post here). But I added an issue on the Wiki (and unfortunately it double posted).
Basically I've run into an issue related to one of Saki's early posts on files with multiple periods. When ext-doc generates the source html files for classes contained in a file such as 'Ext.ux.Class.js' they are written to a file named 'Ext.html' for some reason, which means that only the last class parsed has content in it, and making source links broken. I looked through the code, and without getting a java debugger running (time I don't have) I'm not sure I can fix it myself.
It appears that the Ext documentation does this either by keeping the periods, or removing them but keeping the name, but whatever the solution I have ended up with broken linkage, and any help would be appreciated!

Additionally, when you have the same class defined multiple places (I.E. ux-all-debug.js and the original ux file) The original Ext documentation puts a "Defined in: ux-all-debug.js, class.js" line, whereas this tool is making two entries in the tree, only one of which is selectable.

jay@moduscreate.com
11 Feb 2010, 1:00 PM
sorry - what OS? windows?

ShadowZero3000
11 Feb 2010, 1:30 PM
Indeed, windows 7, sorry about not adding that.
Edit:
For a quick test, simply add an Ext. to the front of the sample js file provided, it does the same thing.

jay@moduscreate.com
11 Feb 2010, 1:31 PM
I'm not a fan of not organizing files according to their namespace allocation.

Allbus
2 Apr 2010, 3:35 AM
I tried the latest snapshot.

The generation works, by the way the home page and the pages loaded via the tree items are always in a "loading" status.
No requests are made (with Firebug 1.5.3).

Is my fault or the development version is still not usable?

dreas
6 Apr 2010, 3:06 AM
No requests are made (with Firebug 1.5.3).

Are you sure you did...

5) Copy "output" to http server...?

Allbus
6 Apr 2010, 4:02 AM
Are you sure you did...
...?
No, I didn't! Thanks.

Simonici
9 Apr 2010, 5:08 AM
Is there a way to do Package descriptions?

1)In the Api on a package/folderNode Click, showing the Info somewhere in the WelcomeTab.
But where to put the Comments?

Or

2) somehow additional to the Header of the Package-Classes, maybe with a custom @package Tag?

radubrehar
23 Apr 2010, 5:25 AM
Hi,

I'm interested in including code samples in my documentation generated by ext-doc tool, but I haven't found any way to do it.
What I really want is to have something similar to the code snippets included with the ExtJS documentation. I haven't found any special tag or markup to generate the formatting specific to code-snippets.

Any suggestion?

jay@moduscreate.com
23 Apr 2010, 5:26 AM
Hi,

I'm interested in including code samples in my documentation generated by ext-doc tool, but I haven't found any way to do it.
What I really want is to have something similar to the code snippets included with the ExtJS documentation. I haven't found any special tag or markup to generate the formatting specific to code-snippets.

Any suggestion?

Yeah, look at the Ext JS source files and you'll see how they do it.

radubrehar
23 Apr 2010, 5:33 AM
Thanks.

I just looked in the source provided in the docs like http://www.extjs.com/deploy/dev/docs/source/Store.html#cls-Ext.data.Store and the <code> tags are stripped in this source-view.

jay@moduscreate.com
23 Apr 2010, 5:40 AM
No. I said look at the source. Meaning what you downloaded, now what was digested and parsed by a documentation engine.

radubrehar
23 Apr 2010, 6:13 AM
Exactly :) I understood this from your first post. I was just saying that previously I was looking at the sources in the online docs, which are parsed. Thanks again.

jay@moduscreate.com
23 Apr 2010, 6:19 AM
oh yeah. I never use the source view in the docs. I drop down to a bash shell and view it that way *or* in my IDE.

Simonici
26 Apr 2010, 6:50 AM
Hello,
I am using a ext-doc-1.0-SNAPSHOT.

1) Is there a way to get the custom Tags into the class descriptions?
is ist already there and should work, or is NOT there and everybody (xept me) knows that?

2) I am getting the props and methods rendered twice (see screen)
Any ideas whats the reason for that?

thanks in advance
sim

the ext-doc tool is really a very useful tool


20155

radubrehar
26 Apr 2010, 6:55 AM
You should try to update to the latest version. For custom tags see the ext.xml file in <ext-doc-dir>/sample/

Simonici
26 Apr 2010, 9:03 AM
>>>> For custom tags see the ext.xml file

That's what I did. On Methods + Properties my custom-Tags are working fine. on class-level they don't.

In the ~\template\ext\tpl\class.xsl there is a Loop
<xsl:for-each select="properties">
...
<xsl:call-template name="custom-tags"/>
...
</xsl:for-each> which is linking to the custom Tags.
On class-level there ist'nt something like that, so I am wondering if custom-Tags should work on class-level in general.

florian_cargoet
30 Apr 2010, 2:02 AM
I have the same problem : custom tags works on methods but not on classes.

@Simonici :
There is a call-template : <xsl:call-template name="class-custom-tags"/> but it fails on the <xsl:if test="customTags">

Nesta
6 May 2010, 1:49 AM
Nice work!
But i am having problems opening the generated doc. Everything is created as expected but
when i open index.html in browser (IE & FF) the loading animation doesn't disappear
and i can't open any classes:

I replaced the ext-all.js with ext-all-debug to see, where the error is but had no look:
- this.el is null @ ext-all-debug #9955 ( applyToMarkup : function(el) )
- if i add e breakpoint, everythink works fine so i guess the function is called before the view is ready
- opening any class i get Firebug Erro "Undefined Entity" and nothing happens (loading animation)

i tested with the download and checkout from svn. both with the same result. :(

radubrehar
6 May 2010, 1:58 AM
Have you put the generated documentation in a http server? (eg: apache or tomcat)

Nesta
6 May 2010, 2:05 AM
ty radubrehar. and sry for not reading ..

radubrehar
6 May 2010, 4:35 AM
No problem. It happened to me too. I posted exactly the same question some while ago :)

jay@moduscreate.com
6 May 2010, 9:49 AM
That happens often even for the Ext JS documentation provided by the SDK.

I have spent quite some time using ext-doc today and am hoping to add some features very soon!

sareko
18 May 2010, 12:39 PM
I have the same problem : custom tags works on methods but not on classes.

@Simonici :
There is a call-template : <xsl:call-template name="class-custom-tags"/> but it fails on the <xsl:if test="customTags">

The older versions worked fine for custom tags, but were not as robust. In the latest snapshot, i found that everything worked 100% perfectly and as expected, EXCEPT for custom tags. I made a custom template that output all the xml gathered, and the custom tags are simply not there, so obviously the template cannot find them :) Its a shame because my Java is a little too rusty to find whats wrong, while I could have fixed an XSL problem.

tonedeaf
4 Jun 2010, 9:19 AM
Is there a tutorial somewhere on how to generate ext-doc documentation for ext extensions I've written.
The ext-doc on googlecode only lists the following steps:


Install Subversion client

Install Ant

1. svn checkout http://ext-doc.googlecode.com/svn/branches/1.0/ ext-doc-read-only
2. cd ext-doc-read-only
3. ant

For someone who has not used ant before (I've used subversion), is there a detailed step-by-step guide on how generate ext-doc? I understand the code comment tag requirements and I've used on the extensions I've written.

Nesta
4 Jun 2010, 9:51 AM
4. cd build
5.a cp ext-doc-snapshot.zip /some/where/else and extract it
5.b use build/dist content (same as the zip)
6. README.txt / sample dir

tonedeaf
5 Jun 2010, 12:17 AM
Got it, thanks!
Also, found this link: http://code.google.com/p/ext-doc/wiki/RunningExtDoc

elinu
26 Aug 2010, 12:07 AM
Hi,
I'm trying to build my extdoc using ant, see script below.
When I run the script I get the exception below.
I know that C:\InterBids\IB4\dev\interbids\interbids\jsdoc\jsdoc.xml AND C:\InterBids\IB4\dev\interbids\interbids\jsdoc\template.xml exist. I can also run extdoc using the same files as long as I run from my command prompt.
Any help with this would be much appreciated.
Thanks!



[java] java.io.FileNotFoundException: C:\InterBids\IB4\dev\interbids\interbids\jsdoc\ C:\InterBids\IB4\dev\interbids\interbids\jsdoc\jsdoc.xml (The filename, directory name, or volume label syntax is incorrect)
[java] at java.io.FileInputStream.open(Native Method)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:106)
[java] at extdoc.jsdoc.processor.FileProcessor.process(FileProcessor.java:764)
[java] at extdoc.Main.main(Main.java:79)
[java] java.io.FileNotFoundException: C:\InterBids\IB4\dev\interbids\interbids\jsdoc\ C:\InterBids\IB4\dev\interbids\interbids\jsdoc\template.xml (The filename, directory name, or volume label syntax is incorrect)
[java] at java.io.FileInputStream.open(Native Method)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:106)
[java] at extdoc.jsdoc.processor.FileProcessor.saveToFolder(FileProcessor.java:925)
[java] at extdoc.Main.main(Main.java:83)




<?xml version="1.0" encoding="UTF-8"?>
<project default="generate-war" name="Generate CrewWeb JSDoc">

<property name="name" value="jsdoc" />

<property name="war-name" value="${name}.war" />
<property name="top.dir" location="../" />

<property name="jsdoc.dir" location="." />
<property name="war.file" value="${top.dir}/target/jsdoc.war" />

<property name="extDocXMLFile" value="${jsdoc.dir}/jsdoc.xml" />
<property name="extDocJarFile" value="${jsdoc.dir}/lib/ext-doc.jar" />
<property name="extDocTemplate" value="${jsdoc.dir}/template.xml" />
<property name="outputFolder" value="${jsdoc.dir}/target/jsdoc" />


<path id="ext.doc.path">
<pathelement location="${jsdoc.dir}/lib/commons-cli-1.1.jar"/>
</path>

<target name="generate-html" depends="init">
<echoproperties></echoproperties>
<echo>${extDocXMLFile}</echo>
<!-- java -jar %extDocJarFile% -p %extDocXMLFile% -o %outputFolder% -t %extDocTemplate% -verbose -->
<java fork="true" dir="${jsdoc.dir}" failonerror="true" classname="extdoc.Main"> <!--jar="${extDocJarFile}"-->
<!--arg value="-p ${extDocXMLFile}"/-->
<arg value="-p ${extDocXMLFile}"/>
<arg value="-o ${outputFolder}"/>
<arg value="-t ${extDocTemplate}"/>
<classpath>
<pathelement location="${jsdoc.dir}/lib/commons-cli-1.1.jar"/>
<pathelement location="${jsdoc.dir}/lib/ext-doc.jar"/>
<pathelement location="${jsdoc.dir}/lib/org.apache.servicemix.bundles.jaxb-impl-2.1.6_1.jar"/>
</classpath>
</java>

</target>


<target name="prepare-war" description="create WEB-INF">
<copydir dest="${outputFolder}" src="${jsdoc.dir}"></copydir>
</target>

<target name="generate-war" depends="clean,init,prepare-war,generate-html">
<!-- jar cvf jsdoc.war %warcontent% -verbose -->
<jar destfile="${war.file}" basedir="${outputFolder}"></jar>
</target>

<target name="init">
<mkdir dir="${outputFolder}" />
</target>

<target name="clean">
<delete dir="${outputFolder}" />
<delete file="${war.file}" />
</target>


</project>

bergstyle
24 Sep 2010, 1:10 AM
Didn't find this posted in the thread but I was able to get the docs working localy without a web server by including the localXHR.js from this thread (http://www.sencha.com/forum/showthread.php?83223-API-Documentation-on-local-computer&p=412739#post412739) and the update to that ext-basex from this thread (http://www.sencha.com/forum/showthread.php?21681-ext-basex-JIT-4.0-adapter-extensions-Ajax-enhancements-and-more.). Got both working in FireFox and Safari on Mac but not Chrome :(

juandj
27 Sep 2010, 9:10 PM
This is pretty good, but I was wondering what tool the ExtJS team uses for the official documentation? Is that not available as open source?


Just wondering... ;)

madkris
12 Oct 2010, 3:51 AM
Hi guys,

Im having a little trouble here since i have no xml & ant knowledge. I wanted to recreate the sample output (http://ext-doc.org/docs/) and go from there. I have checked out the latest code from the svn branch. And used ant to generate a snapshot, from there i followed Nesta's instructions. Following the README file from the snapshot i was able to generate a documentation but most of the classes where missing.

Any help would be greatly appreciated.

Regards,
kris

EDIT: Could it be cause while trying to build the snapshot I encountered the error below?

[javac] C:\ext-doc\build.xml:37: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable buildsIf so any idea what I am missing?

Found a solution for the error I mentioned aboved. It can be fixed by adding includeantruntime="false". (for Ant 1.8 up)


I have downloaded the snapshot from google-code. Uncommented out the section below.

<source src="ext" match="Ext*.js"/>I was able to generate the ext docs along with the sample.js file but had some problem of having duplicates since I was using an Ext 3 source. Digging some more I was able to find out that jgarcia has committed an update solving this issue.

After fixing the ant bug, I tried the same thing, this time using the snapshot generated from the build. It only shows a couple for documents.

SOLVED: in ext.xml change path to the dir you placed the ext source

<source src="ext/path" match="*.js"/>

rafaelberrocalj
5 Nov 2010, 3:18 PM
Hi, this just works with java? have someone trying runing on asp.net?

it's kind of complicated 'converting' to another plataform's?
just want to know some steps i could take to 'convert' for another plataform (in my case asp.net).

thanks

madkris
29 Nov 2010, 9:50 PM
Hi,

Im having trouble getting @extends doc tag to work. It outputs Extends: Object. Does anyone know how I can fix this?

Regards,
madkris

EDIT: solution (http://www.sencha.com/forum/showthread.php?55214-ext-doc-ExtJS-style-JavaScript-comments-processor&p=381703#post381703)

zeruyo
14 Dec 2010, 5:35 AM
no news about custom tags at class level?

wwwtd
15 Dec 2010, 1:47 AM
hi,ALL:
I have a problem with this .when I used java (version 1.6.0_22)run this program it display error java.lang.UnsupportedClassVersionError:Bad version number in .class file .how to solved this error? Thank you !