Permalink
Browse files

Merge pull request #50 from ffrizzo/flexmojos-4.x

Flexmojos 4.x
  • Loading branch information...
velo committed Feb 11, 2012
2 parents 37eab23 + 24788c8 commit 34cc55d91b15c66538a14c5b2a5de5c4f38649e2
View
@@ -24,4 +24,6 @@ target/
.svn/
bin/
-.scala_dependencies
+.scala_dependencies
+
+.DS_Store
@@ -60,7 +60,7 @@
<dependency>
<groupId>org.graniteds</groupId>
<artifactId>granite-generator</artifactId>
- <version>2.2.0.RC2</version><!-- FIXME refactor, use a property -->
+ <version>2.2.0.SP2</version><!-- FIXME refactor, use a property -->
<exclusions>
<exclusion>
<groupId>ant</groupId>
@@ -75,7 +75,7 @@
<dependency>
<groupId>org.graniteds</groupId>
<artifactId>granite-generator-share</artifactId>
- <version>2.2.0.RC2</version>
+ <version>2.2.0.SP2</version>
</dependency>
<!-- Dependencies of granite-generator -->
@@ -74,6 +74,12 @@
private String as3typefactory = null;
private boolean tide = false;
+
+ private boolean externalizeBigDecimal = false;
+
+ private boolean externalizeBigInteger = false;
+
+ private boolean externalizeLong = false;
private String transformer = null;
@@ -237,6 +243,23 @@ public final void generate( GenerationRequest request )
{
tide = new Boolean( useTide.trim() );
}
+
+ String useExternalizeLong = request.getExtraOptions().get( "externalizeLong" );
+ if ( useExternalizeLong != null )
+ {
+ externalizeLong = new Boolean( useExternalizeLong.trim() );
+ }
+ String useExternalizeBigDecimal = request.getExtraOptions().get( "externalizeBigDecimal" );
+ if ( useExternalizeBigDecimal != null )
+ {
+ externalizeBigDecimal = new Boolean( useExternalizeBigDecimal.trim() );
+ }
+ String useExternalizeBigInteger = request.getExtraOptions().get( "externalizeBigInteger" );
+ if ( useExternalizeBigInteger != null )
+ {
+ externalizeBigInteger = new Boolean( useExternalizeBigInteger.trim() );
+ }
+
uid = request.getExtraOptions().get( "uid" );
transformer = request.getExtraOptions().get( "transformer" );
@@ -279,6 +302,7 @@ public final void generate( GenerationRequest request )
if ( as3typefactory == null )
{
as3TypeFactoryImpl = new DefaultAs3TypeFactory();
+ as3TypeFactoryImpl.configure(externalizeLong, externalizeBigInteger, externalizeBigDecimal);
}
else
{
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ Copyright (C) 2008-2012 Marvin Froeder <marvin@flexmojos.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<!-- Copyright 2008 Edward Yakop Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
+ limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.sonatype.flexmojos</groupId>
+ <artifactId>flexmojos-generator</artifactId>
+ <version>4.2-beta-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>flexmojos-generator-graniteds-2.3.0</artifactId>
+
+ <name>Flexmojos Generator - graniteds 2.3.0</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>generate-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.sonatype.flexmojos</groupId>
+ <artifactId>flexmojos-generator-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.graniteds</groupId>
+ <artifactId>granite-generator</artifactId>
+ <version>2.3.0.GA</version><!-- FIXME refactor, use a property -->
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.graniteds</groupId>
+ <artifactId>granite-generator-share</artifactId>
+ <version>2.3.0.GA</version>
+ </dependency>
+
+ <!-- Dependencies of granite-generator -->
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>1.6.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>2.7.7</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.jdo</groupId>
+ <artifactId>jdo2-api</artifactId>
+ <version>2.3-ea</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>transaction-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
@@ -0,0 +1,101 @@
+/**
+ * Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
+ * Copyright (C) 2008-2012 Marvin Froeder <marvin@flexmojos.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.sonatype.flexmojos.generator.granitedsv2d3d0;
+
+import org.granite.generator.Input;
+import org.granite.generator.Listener;
+import org.granite.generator.Output;
+import org.sonatype.flexmojos.generator.GeneratorLogger;
+
+/**
+ * Logging <code>GenerationListener</code>.
+ *
+ * @author velo.br@gmail.com
+ */
+final class Gas3Listener
+ implements Listener
+{
+
+ private GeneratorLogger logger;
+
+ public Gas3Listener( GeneratorLogger generatorLogger )
+ {
+ this.logger = generatorLogger;
+ }
+
+ public void error( String message )
+ {
+ this.logger.error( message );
+ }
+
+ public void error( String message, Throwable e )
+ {
+ this.logger.error( message, e );
+ }
+
+ public void info( String message )
+ {
+ this.logger.info( message );
+ }
+
+ public void info( String message, Throwable e )
+ {
+ this.logger.info( message, e );
+ }
+
+ public void debug( String message )
+ {
+ this.logger.debug( message );
+ }
+
+ public void debug( String message, Throwable e )
+ {
+ this.logger.debug( message, e );
+ }
+
+ public void warn( String message )
+ {
+ this.logger.warn( message );
+ }
+
+ public void warn( String message, Throwable e )
+ {
+ this.logger.warn( message, e );
+ }
+
+ public void generating( Input<?> input, Output<?> output )
+ {
+ info( " Generating: " + output.getDescription() );
+ }
+
+ public void generating( String file, String message )
+ {
+ info( " Generating: " + file + " - " + message );
+ }
+
+ public void skipping( Input<?> input, Output<?> output )
+ {
+ info( " Skipping: " + output.getDescription() + " - " + output.getMessage() );
+ }
+
+ public void skipping( String file, String message )
+ {
+ info( " Skipping: " + file + " - " + message );
+ }
+
+}
Oops, something went wrong.

0 comments on commit 34cc55d

Please sign in to comment.