Author: kentam
Date: Wed Aug 11 02:47:41 2004
New Revision: 36213
Modified:
incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/assembly/AssembleTask.java
incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlAnnotationProcessor.java
Log:
Comments & revert move of Control generation code between phases
Modified:
incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/assembly/AssembleTask.java
==============================================================================
---
incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/assembly/AssembleTask.java
(original)
+++
incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/assembly/AssembleTask.java
Wed Aug 11 02:47:41 2004
@@ -139,6 +139,9 @@
}
// Build classloader to do loading
+ //
+ // TODO: The module dir should probably be in the classpath, since
it seems reasonable
+ // for assemblers to want access to the classes in the module.
String[] classpaths = _classPath == null ? new String[0] :
_classPath.list();
ClassLoader cl = buildClassLoader( classpaths,
Assembler.class.getClassLoader() );
Modified:
incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlAnnotationProcessor.java
==============================================================================
---
incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlAnnotationProcessor.java
(original)
+++
incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlAnnotationProcessor.java
Wed Aug 11 02:47:41 2004
@@ -30,7 +30,6 @@
import com.sun.mirror.apt.AnnotationProcessor;
import com.sun.mirror.apt.AnnotationProcessorFactory;
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.apt.Filer;
import com.sun.mirror.declaration.AnnotationTypeDeclaration;
import com.sun.mirror.declaration.Declaration;
@@ -71,22 +70,6 @@
if (genClass != null)
{
_typeMap.put(decl, genClass);
-
- try
- {
- List<GeneratorOutput> genList =
genClass.getGeneratorOutput(env.getFiler());
- if (genList == null || genList.size() == 0)
- return;
-
- for (GeneratorOutput genOut : genList)
- {
- getGenerator().generate(genOut);
- }
- }
- catch (IOException ioe)
- {
- throw new CodeGenerationException("Type generation failure for
class=" + genClass, ioe);
- }
}
}
@@ -96,6 +79,23 @@
GenClass genClass = _typeMap.get(decl);
if (genClass == null)
return;
+
+ AnnotationProcessorEnvironment env =
getAnnotationProcessorEnvironment();
+ try
+ {
+ List<GeneratorOutput> genList =
genClass.getGeneratorOutput(env.getFiler());
+ if (genList == null || genList.size() == 0)
+ return;
+
+ for (GeneratorOutput genOut : genList)
+ {
+ getGenerator().generate(genOut);
+ }
+ }
+ catch (IOException ioe)
+ {
+ throw new CodeGenerationException("Code generation failure: ",
ioe);
+ }
}
/**