From 57d3d3f9f9475ae167cd9d33c9450eea66439fd2 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Tue, 8 Jun 2010 19:22:00 +0200 Subject: continued with jackpot code transformations. - added buildscript to test transformed results - added more renaming transformations --- tools/jackpotc/bttf | 13 +- tools/jackpotc/jogl1Tojogl2.hint | 26 +- tools/jackpotc/test/oldgears/.gitignore | 1 + tools/jackpotc/test/oldgears/build.xml | 90 +-- .../test/oldgears/nbproject/build-impl.xml | 883 --------------------- .../test/oldgears/nbproject/genfiles.properties | 8 - .../test/oldgears/nbproject/project.properties | 74 -- tools/jackpotc/test/oldgears/nbproject/project.xml | 77 +- .../test/oldgears/src/jogl111/gears/Gears.java | 6 +- 9 files changed, 125 insertions(+), 1053 deletions(-) delete mode 100644 tools/jackpotc/test/oldgears/nbproject/build-impl.xml delete mode 100644 tools/jackpotc/test/oldgears/nbproject/genfiles.properties delete mode 100644 tools/jackpotc/test/oldgears/nbproject/project.properties (limited to 'tools') diff --git a/tools/jackpotc/bttf b/tools/jackpotc/bttf index 4971c9160..ba384702f 100755 --- a/tools/jackpotc/bttf +++ b/tools/jackpotc/bttf @@ -1,7 +1,9 @@ #!/bin/bash -SRC="./test/oldgears/src/" -LIBS="./test/oldgears/lib/old/jogl.jar:./test/oldgears/lib/new/jogl.all.jar:./test/oldgears/lib/new/jogl.awt.jar" -OUTPUT="./test/oldgears/build" +PROJECT="./test/oldgears" +SRC="$PROJECT/src" +GENSRC="$PROJECT/gensrc" +LIBS="$PROJECT/lib/old/jogl.jar:$PROJECT/lib/new/jogl.all.jar:$PROJECT/lib/new/jogl.awt.jar" +OUTPUT="$PROJECT/build" FILESET=`find $SRC -type f -name "*.java"` echo "Back to the Future" @@ -10,6 +12,9 @@ mkdir $OUTPUT ./lib/jackpotc -sourcepath $SRC -cp $LIBS -d $OUTPUT -Ajackpot30_extra_hints=./jogl1Tojogl2.hint $FILESET echo "patching..." -patch -o ${OUTPUT}/Patched.java $FILESET ${OUTPUT}/META-INF/upgrade/upgrade.diff +mkdir "$GENSRC" +mkdir "$GENSRC/jogl2/" +mkdir "$GENSRC/jogl2/gears/" +patch -o $GENSRC/jogl2/gears/Gears.java $FILESET ${OUTPUT}/META-INF/upgrade/upgrade.diff echo "done" diff --git a/tools/jackpotc/jogl1Tojogl2.hint b/tools/jackpotc/jogl1Tojogl2.hint index 9352c959e..9fa7d39dc 100644 --- a/tools/jackpotc/jogl1Tojogl2.hint +++ b/tools/jackpotc/jogl1Tojogl2.hint @@ -1,14 +1,30 @@ -// rules for automatic jogl 1.1.1 -> jogl 2 refactorings +// rules for automatic jogl 1.1.1 -> jogl 2 code transformation -//'JOGL2 API change: javax.media.opengl.GLCanvas -> javax.media.opengl.awt.GLCanvas': -//javax.media.opengl.GLCanvas=>javax.media.opengl.awt.GLCanvas;; +// - - - simple move/rename refactorings - - - +'JOGL2 API change: javax.media.opengl.GLCanvas -> javax.media.opengl.awt.GLCanvas': +javax.media.opengl.GLCanvas=>javax.media.opengl.awt.GLCanvas;; -//'JOGL2 API change: javax.media.opengl.GLJPanel -> javax.media.opengl.awt.GLJPanel': -//javax.media.opengl.GLJPanel=>javax.media.opengl.awt.GLJPanel;; +'JOGL2 API change: javax.media.opengl.GLJPanel -> javax.media.opengl.awt.GLJPanel': +javax.media.opengl.GLJPanel=>javax.media.opengl.awt.GLJPanel;; + +// causes an error: +// dummy.java:1: illegal character: \8203 +// SEVERE: null +// java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCNewClass cannot be cast to com.sun.source.tree.ClassTree +//'JOGL2 API change: com.sun.opengl.util.Animator -> com.​jogamp.​opengl.​util.Animator': +//com.sun.opengl.util.Animator=>com.​jogamp.​opengl.​util.Animator;; 'JOGL2 API change: javax.media.opengl.GL -> javax.media.opengl.GL2': javax.media.opengl.GL=>javax.media.opengl.GL2;; +'JOGL2 API change: javax.media.opengl.DebugGL -> javax.media.opengl.DebugGL2': +javax.media.opengl.DebugGL=>javax.media.opengl.DebugGL2;; + +'JOGL2 API change: javax.media.opengl.TraceGL -> javax.media.opengl.TraceGL2': +javax.media.opengl.TraceGL=>javax.media.opengl.TraceGL2;; + + +// - - - API changes - - - 'JOGL2 API change: new javax.media.opengl.GLCapabilities(javax.media.opengl.GLProfile)': new javax.media.opengl.GLCapabilities()=> new javax.media.opengl.GLCapabilities(javax.media.opengl.GLProfile.get(javax.media.opengl.GLProfile.GL2));; diff --git a/tools/jackpotc/test/oldgears/.gitignore b/tools/jackpotc/test/oldgears/.gitignore index 7fda8a712..563e9d62c 100644 --- a/tools/jackpotc/test/oldgears/.gitignore +++ b/tools/jackpotc/test/oldgears/.gitignore @@ -1,3 +1,4 @@ build +gensrc dist nbproject/private diff --git a/tools/jackpotc/test/oldgears/build.xml b/tools/jackpotc/test/oldgears/build.xml index 4234a96e6..80a045cb4 100644 --- a/tools/jackpotc/test/oldgears/build.xml +++ b/tools/jackpotc/test/oldgears/build.xml @@ -1,74 +1,28 @@ - - - - - - - - - - Builds, tests, and runs the project oldgears. - - + + Builds, tests, and runs the project oldgears. - Another way to customize the build is by overriding existing main targets. - The targets of interest are: - - -init-macrodef-javac: defines macro for javac compilation - -init-macrodef-junit: defines macro for junit execution - -init-macrodef-debug: defines macro for class debugging - -init-macrodef-java: defines macro for class execution - -do-jar-with-manifest: JAR building (if you are using a manifest) - -do-jar-without-manifest: JAR building (if you are not using a manifest) - run: execution of project - -javadoc-build: Javadoc generation - test-report: JUnit report generation - - An example of overriding the target for project execution could look like this: - - - - - - - - Notice that the overridden target depends on the jar target and not only on - the compile target as the regular run target does. Again, for a list of available - properties which you can use, check the target you are overriding in the - nbproject/build-impl.xml file. + + + + + + + + + + + + + + + + - --> diff --git a/tools/jackpotc/test/oldgears/nbproject/build-impl.xml b/tools/jackpotc/test/oldgears/nbproject/build-impl.xml deleted file mode 100644 index 80f4e3647..000000000 --- a/tools/jackpotc/test/oldgears/nbproject/build-impl.xml +++ /dev/null @@ -1,883 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - - - - - - java -cp "${run.classpath.with.dist.jar}" ${main.class} - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/jackpotc/test/oldgears/nbproject/genfiles.properties b/tools/jackpotc/test/oldgears/nbproject/genfiles.properties deleted file mode 100644 index ece6336ba..000000000 --- a/tools/jackpotc/test/oldgears/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=b54c0362 -build.xml.script.CRC32=4f6e4669 -build.xml.stylesheet.CRC32=958a1d3e@1.32.1.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=b54c0362 -nbproject/build-impl.xml.script.CRC32=dff725e7 -nbproject/build-impl.xml.stylesheet.CRC32=c75ce636@1.38.0.45 diff --git a/tools/jackpotc/test/oldgears/nbproject/project.properties b/tools/jackpotc/test/oldgears/nbproject/project.properties deleted file mode 100644 index 956bfe6ba..000000000 --- a/tools/jackpotc/test/oldgears/nbproject/project.properties +++ /dev/null @@ -1,74 +0,0 @@ -application.title=oldgears -application.vendor=the jogamp guy -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.run.all.processors=true - -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/oldgears.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.gluegen-rt.jar=lib/old/gluegen-rt.jar -file.reference.jogl.jar=lib/old/jogl.jar -includes=** -jar.compress=false -javac.classpath=\ - ${file.reference.gluegen-rt.jar}:\ - ${file.reference.jogl.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.5 -javac.target=1.5 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api" -main.class= -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value -# or test-sys-prop.name=value to set system properties for unit tests): -run.jvmargs= -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/tools/jackpotc/test/oldgears/nbproject/project.xml b/tools/jackpotc/test/oldgears/nbproject/project.xml index 7ab06952e..45d9265df 100644 --- a/tools/jackpotc/test/oldgears/nbproject/project.xml +++ b/tools/jackpotc/test/oldgears/nbproject/project.xml @@ -1,15 +1,74 @@ - org.netbeans.modules.java.j2seproject + org.netbeans.modules.ant.freeform - + + oldgears - - - - - - - + + + + + java + src/jogl111 + + + + java + gensrc/jogl2 + + + + + build + + + clean + + + clean + build + + + + folder + build + build + + + + + + src/jogl111 + + + + gensrc/jogl2 + + + build.xml + + + + + + + + + + + + + gensrc/jogl2 + lib/new/gluegen-rt.jar:lib/new/jogl.all.jar:lib/new/jogl.awt.jar + build + 1.4 + + + src/jogl111 + lib/old/gluegen-rt.jar:lib/old/jogl.jar + 1.4 + + diff --git a/tools/jackpotc/test/oldgears/src/jogl111/gears/Gears.java b/tools/jackpotc/test/oldgears/src/jogl111/gears/Gears.java index 8f2cb7441..37ca60c0c 100644 --- a/tools/jackpotc/test/oldgears/src/jogl111/gears/Gears.java +++ b/tools/jackpotc/test/oldgears/src/jogl111/gears/Gears.java @@ -1,4 +1,4 @@ -package jogl111.gears; +package gears; import java.awt.*; import java.awt.event.*; @@ -7,6 +7,8 @@ import javax.media.opengl.*; import com.sun.opengl.util.*; /** + * slightly modified Gears demo used as jackpot testing purposes. + * - - - * Gears.java
* author: Brian Paul (converted to Java by Ron Cemer and Sven Goethel)

* @@ -49,7 +51,7 @@ public class Gears implements GLEventListener, MouseListener, MouseMotionListene public void init(GLAutoDrawable drawable) { // Use debug pipeline - // drawable.setGL(new DebugGL(drawable.getGL())); + drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); -- cgit v1.2.3