qickrooms / flex-mojos

Automatically exported from code.google.com/p/flex-mojos
0 stars 0 forks source link

Generator enhancements #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The attached diff has two enhancements to the generator and one bug fix.

The bug fix is to fix a problem I was having generating AS3 types from
classes that implemented a custom interface that isn't going to be
generated.  The cause of the problem was that the
Gas3GroovyTransformer.getJavaTypeInterfaces() was not checking whether or
not  the interface is being generated before including it in the interface
list.  When looking at the GraniteDS supplied JavaAs3GroovyTransformer, it
looked like it was better just to not even override the behavior or
getJavaTypeInterfaces, accept, getAs3Type, and getJavaTypeSuperclass.

One enhancement I added was the addition of a new flag on the generator
that I called "outputEnumToBaseOutputDirectory" which controls whether or
not the generated enum files should be output to the baseOutputDirectory or
the outputDirectory.  I left the default value as false since that is the
way that the generator currently works.

The second enhancement I added was the ability to specify a list of output
classes in addition to the input classes.  The output classes controls what
files are actually output by the generator.  The use case for this is that
I've got several jar projects that contain java classes that I want to
generate into AS3 but I want to output each jar into its own SWC file. 
However, for the generator to function properly, the include classes needs
to include all of the dependent types as well as the types I want generated
since there are dependencies between them.  Therefore, the easiest way to
get this working was to include all of the types in the includeClasses so
that they are available to GraniteDS and then to filter the output using an
outputClasses list.

Original issue reported on code.google.com by tommy.o...@gmail.com on 28 Oct 2008 at 2:50

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed at revision 841

Original comment by velo...@gmail.com on 28 Oct 2008 at 4:52