Skip to content

Commit 2e8a2b7

Browse files
committed
Added doclet and changed comments in PApplet.java
1 parent d7a7ed6 commit 2e8a2b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3964
-423
lines changed

core/src/processing/core/PApplet.java

Lines changed: 614 additions & 423 deletions
Large diffs are not rendered by default.

doclet/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Writing a custom doclet. The problem is including a custom jar (for json).
2+
3+
I'm running ant in the command line (ant compile) to build the doclet first and there are 2 options for running the doclet.
4+
5+
1. by running the processingrefBuild.sh
6+
7+
```
8+
./processingrefBuild.sh
9+
```
10+
11+
this gives "javadoc: error - In doclet class ProcessingWeblet, method start has thrown an exception java.lang.reflect.InvocationTargetException
12+
java.lang.NoClassDefFoundError: org/json/JSONObject..." which I think means that the json jar needs to be included in the classpath also when running the javadoc comamand in the processingrefBuild.sh and I tried adding -classpath lib/ to the javadoc command and adding the lib to CLASSPATH in the terminal but didn't work. But maybe something else is a problem and not adding the lib to the classpath (this post https://javarevisited.blogspot.com/2011/06/noclassdeffounderror-exception-in.html has a bunch of reasons why this might be happening but nothing seems to be applicable or i tried it in a wrong way).
13+
14+
2. through ant by running the command
15+
16+
```
17+
ant rundoc
18+
```
19+
20+
this gives an error "javadoc: error - invalid flag: -d" so I'm guessing that the javadoc and doclet is not written correctly. If I remove the destdir from the javadoc tag it "works" in a sense that it doesn't give the flag error but then obviously there is no destdir so nothing happens
21+
22+
(this would also be the prefered option to do this in order to have everything in one place)
23+
24+
25+
Additional info:
26+
- Using JAVA 1.8 and Ant 1.10.8
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="Tools"/>
5+
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
6+
<classpathentry exported="true" kind="lib" path="lib/org.json.jar"/>
7+
<classpathentry kind="lib" path="Tools/tools.jar"/>
8+
<classpathentry kind="output" path="bin"/>
9+
</classpath>

doclet/ReferenceGenerator/.profile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/
2+
export JAVA_HOME;
3+

doclet/ReferenceGenerator/.project

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ReferenceGenerator</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
<linkedResources>
18+
<link>
19+
<name>Tools</name>
20+
<type>2</type>
21+
<location>/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/lib</location>
22+
</link>
23+
</linkedResources>
24+
</projectDescription>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#Wed Sep 12 09:51:20 EDT 2012
2+
eclipse.preferences.version=1
3+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6+
org.eclipse.jdt.core.compiler.compliance=1.6
7+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.source=1.6
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
#remove everything old
3+
rm -rf ../tmp
4+
#generate everything anew
5+
javadoc -doclet ProcessingWeblet -docletpath bin/ -public \
6+
-webref ../tmp/web-android \
7+
-localref ../tmp/local-android \
8+
-includeXMLTag android \
9+
-templatedir ../templates \
10+
-examplesdir ../api_examples \
11+
-includedir ../api_examples/include \
12+
-imagedir images \
13+
-corepackage processing.xml \
14+
-rootclass PGraphics \
15+
-rootclass PConstants \
16+
../../../processing/android/core/src/processing/android/core/*.java \
17+
../../../processing/android/core/src/processing/android/xml/*.java \
18+
../../../processing/net/src/processing/net/*.java \
19+
../../../processing/serial/src/processing/serial/*.java
20+
# ../../../processing/video/src/processing/video/*.java \
21+
22+
#copy over the css and sample images
23+
cp -r ../../css ../tmp/web-android
24+
cp -r ../../css ../tmp/local-android
25+
mkdir ../tmp/web-android/images
26+
mkdir ../tmp/local-android/images
27+
cp -r ../../content/api_media/*.jpg ../tmp/web-android/images/
28+
cp -r ../../content/api_media/*.gif ../tmp/web-android/images/
29+
cp -r ../../content/api_media/*.png ../tmp/web-android/images/
30+
cp -r ../../content/api_media/*.jpg ../tmp/local-android/images/
31+
cp -r ../../content/api_media/*.gif ../tmp/local-android/images/
32+
cp -r ../../content/api_media/*.png ../tmp/local-android/images/
4.49 KB
Binary file not shown.
13.7 KB
Binary file not shown.
4.45 KB
Binary file not shown.

0 commit comments

Comments
 (0)