Author: kmorin Date: 2009-04-17 13:57:12 +0000 (Fri, 17 Apr 2009) New Revision: 1330 Removed: guix/trunk/guix-compiler/src/test/java/org/codelutin/guix/AppTest.java Modified: guix/trunk/guix-compiler/src/main/java/org/codelutin/guix/GuixLauncher.java guix/trunk/guix-compiler/src/main/java/org/codelutin/guix/compiler/GuixCompiler.java Log: Modified: guix/trunk/guix-compiler/src/main/java/org/codelutin/guix/GuixLauncher.java =================================================================== --- guix/trunk/guix-compiler/src/main/java/org/codelutin/guix/GuixLauncher.java 2009-04-17 13:56:07 UTC (rev 1329) +++ guix/trunk/guix-compiler/src/main/java/org/codelutin/guix/GuixLauncher.java 2009-04-17 13:57:12 UTC (rev 1330) @@ -26,7 +26,7 @@ public class GuixLauncher { /** log */ - /*protected static final Log log = + /* protected static final Log log = LogFactory.getLog(GuixLauncher.class);*/ /** original list of files to compile */ protected final File[] files; @@ -45,6 +45,7 @@ /** CLassDescriptor met during the compilation */ protected List<ClassDescriptor> classDescriptors = new ArrayList<ClassDescriptor>(); + private List<File> compiledFiles = new ArrayList<File>(); protected int compilerCount; private File targetDirectory = new File("destination"); @@ -89,8 +90,10 @@ /*if (log.isDebugEnabled()) { log.debug("compile first pass for " + className); }*/ - //if (symbolTables.get(file) == null) { - compiled = true; + if (!compiledFiles.contains(file)) { + compiled = true; + compiledFiles.add(file); + } if (compilers.containsKey(className)) { //throw new CompilerException("Internal error: " + className + " is already being compiled, attempting to compile it again"); } @@ -242,7 +245,7 @@ i++; } //if the ClassDescriptor does not exist - if (i < classDescriptors.size()) { + if (i >= classDescriptors.size()) { classDescriptors.add(classDescriptor); return true; } Modified: guix/trunk/guix-compiler/src/main/java/org/codelutin/guix/compiler/GuixCompiler.java =================================================================== --- guix/trunk/guix-compiler/src/main/java/org/codelutin/guix/compiler/GuixCompiler.java 2009-04-17 13:56:07 UTC (rev 1329) +++ guix/trunk/guix-compiler/src/main/java/org/codelutin/guix/compiler/GuixCompiler.java 2009-04-17 13:57:12 UTC (rev 1330) @@ -77,10 +77,11 @@ xpp.nextToken(); if(xpp.getEventType() == XmlPullParser.COMMENT) doc.append(xpp.getText()); - } while(xpp.getEventType() == XmlPullParser.START_TAG); + } while(xpp.getEventType() != XmlPullParser.START_TAG); String nameSpace = xpp.getNamespace(); String localName = xpp.getName(); + System.out.println("start tag ? " + (xpp.getEventType() == XmlPullParser.START_TAG)); String packageName = getPackageName(nameSpace, localName); @@ -160,7 +161,7 @@ packageName = nameSpace.substring(0, nameSpace.length() - 2); } else { String fullClassName = TagManager.resolveClassName(localName); - packageName = fullClassName + packageName = (fullClassName == null) ? null : fullClassName .substring(0, fullClassName.lastIndexOf('.')); } return packageName; Deleted: guix/trunk/guix-compiler/src/test/java/org/codelutin/guix/AppTest.java =================================================================== --- guix/trunk/guix-compiler/src/test/java/org/codelutin/guix/AppTest.java 2009-04-17 13:56:07 UTC (rev 1329) +++ guix/trunk/guix-compiler/src/test/java/org/codelutin/guix/AppTest.java 2009-04-17 13:57:12 UTC (rev 1330) @@ -1,38 +0,0 @@ -package org.codelutin.guix; - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -/** - * Unit test for simple App. - */ -public class AppTest - extends TestCase -{ - /** - * Create the test case - * - * @param testName name of the test case - */ - public AppTest( String testName ) - { - super( testName ); - } - - /** - * @return the suite of tests being tested - */ - public static Test suite() - { - return new TestSuite( AppTest.class ); - } - - /** - * Rigourous Test :-) - */ - public void testApp() - { - assertTrue( true ); - } -}