P5Doclet
for Proce55ing
P5Doclet ver. 0.1
(C) Kenta Cho(ABA."Saba")
This is a tool for creating the applet of the processing(proce55ing) application. It works as the 'Export to web' function in the processing sketchbook, but there are some differences.
- You can use the html template file of the applet page and the source code page.
- Write the description for the application in comments in the source code and it is written into the applet page.
- You can generate the API document of your processing application.
- It works as the doclet(Javadoc) so it can be integrated into the Eclipse platform.
P5Doclet works with the J2SDK1.4.2_04 javadoc.
Download
P5Doclet is the free software.
Create bclasses.jar
First, you have to create 'bclasses.jar' that contains the base classes of the processing applet.
To create 'bclasses.jar', with the processing sketchbook(processing.exe),
- [File] -> [New]
- [File] -> [Rename] and input 'bclasses'
- [File] -> [Export to web]
bclasses.jar is created at '{processing root}/sketchbook/default/bclasses/applet/bclasses.jar'.
Using with Eclipse
- Create the project for the processing application
(see P5 vs Eclipse)
- Write your application
- You can use the '@p5' tag in the comment to specify the string that are written into output html files
- Copy these files to '{project home}'
- applet_template.html - template file of the applet page
- source_template.html - template file of the source code page
- bclasses.jar - jar file including base classes of the processing application
- Generate the Javadoc for this project
- [Project] -> [Generate Javadoc]
- Check [Use Custom Doclet]
- Set [Doclet name] as 'jp.gr.java_conf.abagames.p5doclet.P5Doclet'
- Set [Doclet classs path] as '{where you unpack p5doclet.zip}/p5doclet/p5doclet.jar'
- Press [Finish]
All html files and the jar file are created under '{project home}/doc/'.
If you want to add the API document of your source,
- Edit the 'applet_template.html' and add the '[[javadochtml]]' tag to create the link to the API document
(e.g., <a href="[[javadochtml]]">API Document</a>)
- Generate the Javadoc
- Check [Create Javadoc for members with visibility] [Package]
- Press [Next]
- Add '-apidoc' at [Extra Javadoc options]
- Press [Finish]
Using with sketchbook
- Write your application
- Use [Export to web]
- Copy these files to '{project home}/applet/'
- applet_template.html - template file of the applet page
- source_template.html - template file of the source code page
- p5doclet.jar - p5doclet jar file
- p5doclet.bat - batch file to launch the doclet
- Edit the 'p5doclet.bat' and set the 'TARGET_FILE' variable to the name of your java file name
- Launch 'p5doclet.bat'
All html files and the jar file are created under '{project home}/applet/doc/'.
Comments
If you have any comments, please mail to cs8k-cyu@asahi-net.or.jp.