From 7d496e943b7428983216a286404aec5d640e2f7c Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Wed, 31 Mar 2010 23:53:39 +0200 Subject: fixed generated imports rudimentary (not DRY).. cleanup in work. --- .../sun/gluegen/opengl/BuildComposablePipeline.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/java') diff --git a/src/java/com/sun/gluegen/opengl/BuildComposablePipeline.java b/src/java/com/sun/gluegen/opengl/BuildComposablePipeline.java index 9750c13df..54aa759da 100644 --- a/src/java/com/sun/gluegen/opengl/BuildComposablePipeline.java +++ b/src/java/com/sun/gluegen/opengl/BuildComposablePipeline.java @@ -43,6 +43,7 @@ import com.sun.gluegen.*; import java.lang.reflect.*; import java.io.*; import java.util.*; +import java.util.ArrayList; public class BuildComposablePipeline { @@ -348,22 +349,19 @@ public class BuildComposablePipeline { clazzList.add(prologClassOpt); } - String[] importNames = new String[clazzList.size() + 2]; - { - int i = 0; - importNames[i++] = "java.io.*"; - importNames[i++] = "javax.media.opengl.*"; - for (Iterator> iter = clazzList.iterator(); iter.hasNext();) { - importNames[i++] = iter.next().getName(); - } + ArrayList imports = new ArrayList(); + imports.add("java.io.*"); + imports.add("javax.media.opengl.*"); + imports.add("com.jogamp.gluegen.runtime.*"); + for (Class clasS : clazzList) { + imports.add(clasS.getName()); } CodeGenUtils.emitJavaHeaders(output, outputPackage, outputClassName, - "com.jogamp.gluegen.runtime", // FIXME: should make configurable true, - importNames, + imports, new String[]{"public"}, ifNames, null, -- cgit v1.2.3