selfmade javadoc

S

Stefan Poehn

Hi

is there any tool that can extract javadoc-comments from Visual Basic
programs? If not, does javadoc have an interface that handles the
HTML-output, so I could write a simple VB parser and feed javadoc with
VB-javadoc-comments?

Thanks
Stefan
 
R

Roedy Green

is there any tool that can extract javadoc-comments from Visual Basic
programs? If not, does javadoc have an interface that handles the
HTML-output, so I could write a simple VB parser and feed javadoc with
VB-javadoc-comments?

you could obviously embed JavaDoc inside VB, but the Javadoc processor
combines information from the method headers with your Javadoc. What
you would need is something that would parse the VB, extract the VB
function headers, and create the equivalent Java ones. Then feed that
to Javadoc.
 
S

Stefan Poehn

Roedy Green said:
you could obviously embed JavaDoc inside VB, but the Javadoc processor
combines information from the method headers with your Javadoc.
Done.

What
you would need is something that would parse the VB, extract the VB
function headers,

This part is very easy with "VB Extensibility". You can read the VB modules
line by line.
and create the equivalent Java ones. Then feed that
to Javadoc.

I assume the bigger problem is feeding the javadoc processor, I have no clue
how to start it and to format the information I have extracted from VB
modules.
 
S

Stefan Ram

Stefan Poehn said:
is there any tool that can extract javadoc-comments from Visual Basic
programs? If not, does javadoc have an interface that handles the
HTML-output, so I could write a simple VB parser and feed javadoc with
VB-javadoc-comments?

VB doxygen is a Visual Basic addin that converts VB code
into java like syntax for processing through the doxygen
documentation generator. This allows the production of
advanced documentation for Visual Basic.

http://sourceforge.net/projects/vbdoxygen/
 
R

Roedy Green

I assume the bigger problem is feeding the javadoc processor, I have no clue
how to start it and to format the information I have extracted from VB
modules.

see http://mindprod.com/jgloss/javadoc.html

It is pretty simple. Just start by naming a single *.java module.

javadoc.exe MyClass.java

and gradually add options, and looking to see what they do.
 
R

Roedy Green

I assume the bigger problem is feeding the javadoc processor, I have no clue
how to start it and to format the information I have extracted from VB
modules.

You have to make it look like Java, though all the method bodies can
be empty.

I don't know VB, so I can't give you an example of before and after.

But for a simple method called add that takes two parameters you need
to generate something like this to feed to JavDoc.exe

/**
* adds two integers
* @param a first number
* @param b second number
* @return sum of a + b
*/
public int add ( int a, int b );
 
S

Stefan Poehn

Roedy Green said:
You have to make it look like Java, though all the method bodies can
be empty.

You can write doclets for javadoc processing which is just the other end of
javadoc. The javadoc processor has gathered all important info from the
source and now you can use this info in your doclets.

What I had in mind: Use the standard doclet and replace javadoc's java
parser by a (very simple) VB parser. Is this possible?

Since there is already a fantastic software (vbdox) for writing
javadoc-pages from VB source code, there is no need for writing this parser,
it is just an interesting thing to know.

Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top