You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/04/06 07:39:39 UTC

[17/26] fork a bunch of files from SDK's FB compiler integration. Several files are intact, but many have been gutted to reduce the number of files required. It appears that the Report isn't used for basic compilation, so removing all of the compilatio

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/dff3a518/flex-compiler-oem/src/flex2/compiler/common/Configuration.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/flex2/compiler/common/Configuration.java b/flex-compiler-oem/src/flex2/compiler/common/Configuration.java
new file mode 100644
index 0000000..952ec0b
--- /dev/null
+++ b/flex-compiler-oem/src/flex2/compiler/common/Configuration.java
@@ -0,0 +1,2031 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.
+ *
+ */
+
+package flex2.compiler.common;
+
+//import flash.localization.LocalizationManager;
+import flex2.compiler.common.FramesConfiguration.FrameInfo;
+import flex2.compiler.config.AdvancedConfigurationInfo;
+import flex2.compiler.config.CommandLineConfigurator;
+import flex2.compiler.config.ConfigurationException;
+import flex2.compiler.config.ConfigurationValue;
+import flex2.compiler.config.ConfigurationInfo;
+import flex2.compiler.io.VirtualFile;
+import flex2.compiler.util.QName;
+//import flex2.compiler.util.ThreadLocalToolkit;
+import flex2.linker.LinkerConfiguration;
+import flex2.tools.LicensesConfiguration;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Locale;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.io.File;
+
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.parsers.SAXParser;
+
+import macromedia.asc.util.ObjectList;
+
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * Tools like mxmlc and compc use configuration objects to store
+ * configuration options parsed from config files and command-line options.
+ *
+ * The configuration object is produced by
+ * flex2.tools.Mxmlc.processConfiguration().
+ * This method can produce instances of various subclasses:
+ *
+ *   Configuration
+ *     ToolsConfiguration
+ *       ASDocConfiguration (for asdoc command-line tool)
+ *       CommandLineConfiguration (for mxmlc command-line tool)
+ *       CompcConfiguration (for compc command-line tool)
+ *       ApplicationCompilerConfiguration (for OEM ApplicationCompiler)
+ *       LibraryCompilerConfiguration (for OEM LibraryCompiler)
+ *
+ * There are also "sub-configuration" classes such as
+ * CompilerConfiguration and MetadataConfiguration.
+ * Instances of these classes store dotted/nested config options.
+ * For example, the -compiler.library-path command line option
+ * (corresponding to <compiler><library-path>...</libraryPath></compiler>
+ * in an XML config file) is stored in CompilerConfiguration,
+ * which is owned by Configuration.
+ *
+ * A configuration class does not have to extend Configuration
+ * or implement any interface.
+ * Instead, configuration objects get populated with configuration
+ * information via reflection.
+ * A configuration class declares that it support a particular
+ * option such as -library-path / <library-path> simply by having
+ * the public methods getLibraryPathInfo() and cfgLibraryPath().
+ * (Note the change in spelling from library-path to LibraryPath.)
+ *
+ * A method like getLibraryPathInfo() returns a ConfigurationInfo object
+ * which has metadata about the option, such as its description,
+ * whether it can have a single value or multiple values, etc.
+ *
+ * After the ConfigurationBuffer has accumulated all ConfigurationValue
+ * objects parsed from various source by "configurators"
+ * such as DefaultsConfigurator, SystemPropertyConfiguration,
+ * FileConfigurator, and CommandLineConfigurator, it pushes these
+ * ConfigurationValues into the configuration objects that accept them
+ * via methods like cfgLibraryPath().
+ * The ConfigurationBuffer inspects the type of the second parameter
+ * of this method and can pass, for example, a String array
+ * in addition to the general ConfigurationValue.
+ * 
+ * Typically a cfgXXX() method will simply store the option value,
+ * or some transformed version of it, in a private field such as
+ * libraryPath.
+ * A public method such as getLibraryPath() -- whose name doesn't
+ * matter because it doesn't get called through reflection --
+ * then exposes the option to the tool.
+ * 
+ * You can force one configuration option to be set before another,
+ * and avoid race conditions, by using the
+ * ConfigurationInfo.getSoftPrerequisites() method.
+ *
+ * @author Roger Gonzalez
+ * @author Gordon Smith (notes below)
+ */
+public class Configuration implements LinkerConfiguration, Cloneable
+{
+    // ATTENTION:
+    // Please specify default values inside DefaultsConfigurator.
+
+    public Configuration()
+    {
+        this.compilerConfiguration = new CompilerConfiguration(this);
+        frames = new FramesConfiguration();
+        metadataConfiguration = new MetadataConfiguration();
+        licensesConfiguration = new LicensesConfiguration();
+        rslSettingsConfiguration = new RuntimeSharedLibrarySettingsConfiguration(this);
+    }
+
+    
+    /**
+     * 
+     * @param compilerConfig - may not be null
+     * @param configuration - may be null
+     * @return excluded libraries summed from all configuration options
+     */
+    public static VirtualFile[] getAllExcludedLibraries(CompilerConfiguration compilerConfig,
+    												Configuration configuration)
+    {
+    	return (VirtualFile[]) CompilerConfiguration.merge(
+                                           compilerConfig.getExternalLibraryPath(),
+                                           ((configuration == null) ? null
+                                                                    : configuration.getRslExcludedLibraries()),
+                                           VirtualFile.class);
+    }
+    
+    
+    /**
+     * The path of a given file name based on the context of the
+     * configuration value or the default output directory token.
+     * 
+     * @param cv
+     * @param fileName
+     * @return the full path of the file.
+     */
+    public static String getOutputPath(ConfigurationValue cv, String fileName)
+    {
+        String result = fileName;
+
+        if (fileName != null) 
+        {
+        	File file = new File(fileName);
+        	if (!file.isAbsolute())
+        	{
+	            String directory = cv.getBuffer().getToken(flex2.tools.oem.Configuration.DEFAULT_OUTPUT_DIRECTORY_TOKEN);
+	
+	            // if no default output directory, then use the configuration context.
+	            if (directory == null)
+	            {
+	                directory = cv.getContext();
+	            }
+	
+	            if (directory != null)
+	            {
+	                result = directory + File.separatorChar +  fileName;
+	            }
+        	}
+        }
+
+        return result;
+    }
+    
+    
+    protected ConfigurationPathResolver configResolver;
+
+    public void setConfigPathResolver( ConfigurationPathResolver resolver )
+    {
+        this.configResolver = resolver;
+        this.compilerConfiguration.setConfigPathResolver( resolver );
+        this.rslSettingsConfiguration.setConfigPathResolver(resolver);
+    }
+
+	static private Map<String, String> aliases = null;
+    
+    static public Map<String, String> getAliases()
+    {
+        if (aliases == null)
+        {
+            aliases = new HashMap<String, String>();
+
+            aliases.put( "l", "compiler.library-path" );
+            aliases.put( "el", "compiler.external-library-path" );
+            aliases.put( "sp", "compiler.source-path");
+            aliases.put( "rsl", "runtime-shared-libraries");
+            aliases.put( "keep", "compiler.keep-generated-actionscript");
+	        aliases.put( "o", "output" );
+	        aliases.put("rslp", "runtime-shared-library-path");
+	        aliases.put("static-rsls", "static-link-runtime-shared-libraries");
+            aliases.put("rsl-domain", "runtime-shared-library-settings.application-domain");
+        }
+        return aliases;
+    }
+
+ 	/**
+     * SWF width
+     */
+    
+    private String width = null;
+    private String widthPercent = null;
+   
+    public String width()
+    {
+        return width;
+    }
+
+    public String widthPercent()
+    {
+        return widthPercent;
+    }
+
+    public void setWidth( String width )
+    {
+        this.width = width;
+    }
+
+    public void setWidthPercent(String widthPercent)
+    {
+        this.widthPercent = widthPercent;
+    }
+
+    /**
+     * SWF height
+     */
+
+    private String height = null;
+    private String heightPercent = null;
+
+    public String height()
+    {
+        return height;
+    }
+
+    public String heightPercent()
+    {
+        return heightPercent;
+    }
+
+    public void setHeight( String height )
+    {
+        this.height = height;
+    }
+
+    public void setHeightPercent(String heightPercent)
+    {
+        this.heightPercent = heightPercent;
+    }
+    
+	/**
+     * Page title
+     */
+    
+    private String pageTitle = null;
+
+    public String pageTitle()
+    {
+        return pageTitle;
+    }
+
+    public void setPageTitle(String title)
+    {
+        this.pageTitle = title;
+    }
+
+	/**
+     * Root class name
+     */
+    
+    private String rootClassName;
+
+    public String getRootClassName()
+    {
+        return (rootClassName != null)? rootClassName : mainDefinition;
+    }
+
+    public void setRootClassName( String rootClassName )
+    {
+        this.rootClassName = rootClassName;
+    }
+
+	/**
+     * Main definition
+     */
+
+    private String mainDefinition;
+
+    public String getMainDefinition()
+    {
+        return mainDefinition;
+    }
+
+    public void setMainDefinition( String mainDefinition )
+    {
+        this.mainDefinition = mainDefinition;
+    }
+
+	/**
+     * Resource bundles
+     */
+
+	private SortedSet<String> resourceBundles = new TreeSet<String>();
+
+	// this list is just used for resourceBundleList.  See CU.resourceBundle for the
+	// names of resource bundles that are linked in
+	public SortedSet<String> getResourceBundles()
+	{
+		return resourceBundles;
+	}
+ 
+    /**
+     * Unresolved
+     */
+
+    private Set<String> unresolved = new HashSet<String>();
+
+	public Set<String> getUnresolved()
+    {
+        return unresolved;
+    }
+
+
+    //
+    // 'framework' option
+    //
+    private static final String DEFAULT_FRAMEWORK = "halo";
+
+    private String framework = DEFAULT_FRAMEWORK;
+
+    public String getFramework()
+    {
+        return framework;
+    }
+
+    public void cfgFramework(ConfigurationValue cv, String s)
+    {
+        framework = s;
+    }
+
+
+    //
+    // 'benchmark' option
+    //
+    
+    private boolean benchmark = false;
+
+    public boolean benchmark()
+    {
+        return benchmark;
+    }
+
+    public void cfgBenchmark(ConfigurationValue cv, boolean b)
+    {
+        benchmark = b;
+    }
+
+    public static ConfigurationInfo getBenchmarkInfo()
+    {
+        return new ConfigurationInfo() {
+
+            public boolean doChecksum()
+            {
+                return false;
+            }
+            
+        };
+    }
+
+    
+    private int benchmarkCompilerDetails;  // 0 = none, 1 = light, 5 = verbose
+    
+    public int getBenchmarkCompilerDetails()
+    {
+        return benchmarkCompilerDetails;
+    }
+    
+    /**
+     * @param cv
+     * @param b
+     */
+    public void cfgBenchmarkCompilerDetails(ConfigurationValue cv, int details)
+    {
+        benchmarkCompilerDetails = details;
+    }
+    
+    
+    public static ConfigurationInfo getBenchmarkCompilerDetailsInfo()
+    {
+        return new ConfigurationInfo() {
+
+            public boolean isHidden()
+            {
+                return true;
+            }
+
+            public boolean doChecksum()
+            {
+                return false;
+            }
+            
+        };
+    }
+
+    private long benchmarkTimeFilter;  // min time of units to log in ms
+    
+    public long getBenchmarkTimeFilter()
+    {
+        return benchmarkTimeFilter;
+    }
+    
+    /**
+     * @param cv
+     * @param b
+     */
+    public void cfgBenchmarkTimeFilter(ConfigurationValue cv, long timeFilter)
+    {
+        benchmarkTimeFilter = timeFilter;
+    }
+    
+    
+    public static ConfigurationInfo getBenchmarkTimeFilterInfo()
+    {
+        return new ConfigurationInfo() {
+
+            public boolean isHidden()
+            {
+                return true;
+            }
+
+            public boolean doChecksum()
+            {
+                return false;
+            }
+            
+        };
+    }
+
+
+    //
+    // 'compiler.*' options
+    //
+    
+    private CompilerConfiguration compilerConfiguration;
+
+    public CompilerConfiguration getCompilerConfiguration()
+    {
+        return compilerConfiguration;
+    }
+
+    public boolean debug()
+    {
+        return compilerConfiguration.debug();
+    }
+
+    public void setDebug(boolean debug)
+    {
+    	compilerConfiguration.setDebug(debug);
+    }
+
+    public boolean verboseStacktraces()
+    {
+        return compilerConfiguration.verboseStacktraces();
+    }
+
+    public boolean optimize()
+    {
+        return compilerConfiguration.optimize();
+    }
+
+    public void setOptimize(boolean optimize)
+    {
+    	compilerConfiguration.setOptimize(optimize);
+    }
+
+    /**
+     * Includes user specified metadata and extra metadata added by the linker.
+     */
+    public String[] getMetadataToKeep()
+    {
+        return getCompilerConfiguration().getKeepAs3Metadata();
+    }
+    
+    //
+    // 'debug-password' option
+    //
+    
+    private String debugPassword;
+
+    /**
+     * The password to include in debuggable swfs.
+     */
+    public String debugPassword()
+    {
+        return debugPassword;
+    }
+    
+    public void setDebugPassword(String debugPassword)
+    {
+        this.debugPassword = debugPassword;
+    }
+    
+    public void cfgDebugPassword( ConfigurationValue cv, String debugPassword )
+    {
+        this.debugPassword = debugPassword;
+    }
+    
+    public static ConfigurationInfo getDebugPasswordInfo()
+    {
+        return new AdvancedConfigurationInfo();
+    }
+
+    //
+    // 'default-background-color' option
+    //
+    
+    private int backgroundColor = 0x50727E;
+
+    public int backgroundColor()
+    {
+        return this.backgroundColor;
+    }
+
+    public void setBackgroundColor( int backgroundColor )
+    {
+        this.backgroundColor = backgroundColor;
+    }
+
+    public void cfgDefaultBackgroundColor( ConfigurationValue cv, int backgroundColor )
+    {
+        this.backgroundColor = backgroundColor;
+    }
+
+    public static ConfigurationInfo getDefaultBackgroundColorInfo()
+    {
+        return new AdvancedConfigurationInfo();
+    }
+
+    //
+    // 'default-frame-rate' option
+    //
+    
+    private int frameRate = 24;
+
+    public int getFrameRate()
+    {
+        return frameRate;
+    }
+    
+    public void setFrameRate( int rate )
+    {
+        frameRate = rate;
+    }
+
+    public void cfgDefaultFrameRate( ConfigurationValue cv, int rate )
+        throws ConfigurationException
+    {
+        if (rate <= 0)
+            throw new ConfigurationException.GreaterThanZero( cv.getVar(),
+                                              cv.getSource(), cv.getLine() );
+        frameRate = rate;
+    }
+
+    public static ConfigurationInfo getDefaultFrameRateInfo()
+    {
+        return new AdvancedConfigurationInfo();
+    }
+
+    //
+    // 'default-script-limits' option
+    //
+    
+    private int scriptLimit = 60;
+    private int scriptRecursionLimit = 1000;
+    private boolean scriptLimitsSet = false;
+
+    public int getScriptTimeLimit()
+    {
+        return scriptLimit;
+    }
+
+    public int getScriptRecursionLimit()
+    {
+        return scriptRecursionLimit;
+    }
+
+    public void setScriptTimeLimit( int scriptLimit )
+    {
+        scriptLimitsSet = true;
+        this.scriptLimit = scriptLimit;
+    }
+
+    public void setScriptRecursionLimit( int recursionLimit )
+    {
+        scriptLimitsSet = true;
+        this.scriptRecursionLimit = recursionLimit;
+    }
+
+    public boolean scriptLimitsSet()
+    {
+        return scriptLimitsSet;
+    }
+
+    public void cfgDefaultScriptLimits( ConfigurationValue cv, int maxRecursionDepth, int maxExecutionTime )
+        throws ConfigurationException
+    {
+        if (maxRecursionDepth <= 0)
+            throw new ConfigurationException.GreaterThanZero( cv.getVar(), cv.getSource(), cv.getLine() );
+
+        if (maxExecutionTime <= 0)
+            throw new ConfigurationException.GreaterThanZero( cv.getVar(),
+                                              cv.getSource(), cv.getLine() );
+
+        this.scriptLimitsSet = true;
+        this.scriptLimit = maxExecutionTime;
+        this.scriptRecursionLimit = maxRecursionDepth;
+    }
+
+    public static ConfigurationInfo getDefaultScriptLimitsInfo()
+    {
+        return new ConfigurationInfo( new String[] { "max-recursion-depth", "max-execution-time" } )
+        {
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+
+    }
+
+    //
+    // 'default-size' option
+    //
+    
+    private int defaultWidth = 500;
+    private int defaultHeight = 375;
+
+    public int defaultWidth()
+    {
+        return defaultWidth;
+    }
+
+    public int defaultHeight()
+    {
+        return defaultHeight;
+    }
+
+    public void cfgDefaultSize( ConfigurationValue cv, int width, int height )
+        throws ConfigurationException
+    {
+        if ((width < 1) || (width > 4096) || (height < 1) || (height > 4096))    // whatever
+        {
+           throw new ConfigurationException.IllegalDimensions( width, height, cv.getVar(), cv.getSource(), cv.getLine() );
+        }
+
+        this.defaultWidth = width;
+        this.defaultHeight = height;
+    }
+
+    public static ConfigurationInfo getDefaultSizeInfo()
+    {
+        return new ConfigurationInfo( new String[] {"width", "height"} )
+        {
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'externs' option
+    //
+    
+    private Set<String> externs = new HashSet<String>();
+
+    public Set<String> getExterns()
+    {
+        Collection<String> compilerExterns = compilerConfiguration.getExterns();
+
+        if (compilerExterns != null)
+        {
+            externs.addAll(compilerExterns);
+        }
+
+        return externs;
+    }
+
+    public void addExterns( Collection<String> externs )
+    {
+        this.externs.addAll( externs );
+    }
+    
+    public void addExterns(QName[] qNames)
+    {
+    	for (int i = 0, len = qNames == null ? 0 : qNames.length; i < len; i++)
+    	{
+    		this.externs.add(qNames[i].toString());
+    	}
+    }
+
+	public void cfgExterns( ConfigurationValue cfgval, List<String> vals )
+    {
+		externs.addAll(toQNameString(vals));
+    }
+
+    public static ConfigurationInfo getExternsInfo()
+    {
+        return new ConfigurationInfo( -1, "symbol" )
+        {
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+            
+            public boolean doChecksum()
+            {
+            	return false;
+            }
+        };
+    }
+
+    public void removeExterns(Collection<String> externs)
+    {
+        this.externs.removeAll(externs);
+    }
+
+    protected List<String> toQNameString(List<String> vals)
+    {
+    	for (int i = 0, size = vals == null ? 0 : vals.size(); i < size; i++)
+    	{
+            String name = vals.get(i);
+            if ((name.indexOf( ':' ) == -1) && (name.indexOf( '.' ) != -1))
+            {
+                int dot = name.lastIndexOf( '.' );
+                name = name.substring( 0, dot ) + ':' + name.substring( dot + 1 );
+            }
+            vals.set(i, name);
+    	}
+    	
+    	return vals;
+    }
+
+    //
+    // 'frames.*' options
+    //
+    
+    private FramesConfiguration frames;
+
+    public FramesConfiguration getFramesConfiguration()
+    {
+        return frames;
+    }
+
+    public List<FrameInfo> getFrameList()
+    {
+        return frames.getFrameList();
+    }
+
+    //
+    // 'generated-frame-loader' option (hidden)
+    //
+    
+    public boolean generateFrameLoader = true;
+    
+    public void cfgGenerateFrameLoader( ConfigurationValue cv, boolean value )
+    {
+        this.generateFrameLoader = value;
+    }
+
+    public static ConfigurationInfo getGenerateFrameLoaderInfo()
+    {
+        return new AdvancedConfigurationInfo()
+        {
+            public boolean isHidden()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'generated-output' option
+    //
+
+    /*
+    // TODO - enable this, add hooks to use it!
+    private String generatedOutput = null;
+
+    public String getGeneratedOutput()
+    {
+        return generatedOutput;
+    }
+
+    public void cfgGeneratedOutput( ConfigurationValue cfgVal, String path )
+    {
+        // We should probably resolve this here or in validate, but its kinda painful right now.
+        generatedOutput = path;
+    }
+
+    public static ConfigurationInfo getGeneratedOutputInfo()
+    {
+        return new ConfigurationInfo( 1, "directory" )
+        {
+            public boolean isHidden()
+			{
+				return true;
+			}
+
+            public String[] getPrerequisites()
+			{
+				return new String[] { "flexlib" };
+			}
+        };
+    }
+
+    */
+    
+    //
+    // 'includes' option
+    //
+    
+	private Set<String> includes = new LinkedHashSet<String>();
+
+	public Set<String> getIncludes()
+	{
+	    return includes;
+	}
+
+	public void addIncludes( Collection<String> includes )
+	{
+	    this.includes.addAll(includes);
+	}
+
+    public void cfgIncludes( ConfigurationValue cfgval, List<String> vals )
+    {
+    	includes.addAll(toQNameString(vals));
+    }
+
+    public static ConfigurationInfo getIncludesInfo()
+    {
+        return new ConfigurationInfo( -1, "symbol" )
+        {
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'lazy-init' option (hidden)
+    //
+    
+    private boolean lazyInit = false;
+
+    public boolean lazyInit()
+    {
+        return lazyInit;
+    }
+
+    public void cfgLazyInit(ConfigurationValue cv, boolean b)
+    {
+        lazyInit = b;
+    }
+
+    public static ConfigurationInfo getLazyInitInfo()
+    {
+        return new AdvancedConfigurationInfo()
+        {
+            public boolean isHidden()
+            {
+            	return true;
+            }
+        };
+    }
+
+    //
+    // 'link-report' option
+    //
+    
+    private String linkReportFileName = null;
+
+    public String getLinkReportFileName()
+    {
+        return linkReportFileName;
+    }
+    
+    public boolean generateLinkReport()
+    {
+    	return linkReportFileName != null;
+    }
+
+    public void cfgLinkReport( ConfigurationValue cv, String filename )
+    {
+       	this.linkReportFileName = getOutputPath(cv, filename);
+    }
+    
+    public static ConfigurationInfo getLinkReportInfo()
+    {
+        return new ConfigurationInfo(new String[] {"filename"})
+        {
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+    }
+    
+    //
+    // 'size-report' option
+    //
+    
+    private String sizeReportFileName = null;
+
+    public String getSizeReportFileName()
+    {
+        return sizeReportFileName;
+    }
+    
+    public boolean generateSizeReport()
+    {
+    	return sizeReportFileName != null;
+    }
+
+    public void cfgSizeReport( ConfigurationValue cv, String filename )
+    {
+       	this.sizeReportFileName = getOutputPath(cv, filename);
+    }
+    
+    public static ConfigurationInfo getSizeReportInfo()
+    {
+        return new ConfigurationInfo(new String[] {"filename"})
+        {
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'load-externs' option
+    //
+    
+    public void cfgLoadExterns( ConfigurationValue cfgval, String filename ) throws ConfigurationException
+    {
+        VirtualFile f = ConfigurationPathResolver.getVirtualFile( filename, configResolver, cfgval );
+
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(false);
+
+        try
+        {
+            SAXParser parser = factory.newSAXParser();
+            parser.parse(f.getInputStream(),
+                         new DefaultHandler()
+                         {
+                             public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
+                             {
+                                 if ("def".equals( qName ) || "pre".equals( qName ) || "ext".equals( qName ))
+                                 {
+                                     String id = attributes.getValue( "id" );
+                                     externs.add( id );
+                                 }
+                             }
+                         });
+        }
+        catch (Exception e)
+        {
+            throw new ConfigurationException.ConfigurationIOError( filename, cfgval.getVar(), cfgval.getSource(), cfgval.getLine() );
+        }
+    }
+    
+    public static ConfigurationInfo getLoadExternsInfo()
+    {
+        return new ConfigurationInfo( 1, "filename" )
+        {
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'metadata.*' options
+    //
+    
+    private MetadataConfiguration metadataConfiguration;
+
+    public MetadataConfiguration getMetadataConfiguration()
+    {
+        return metadataConfiguration;
+    }
+
+    //
+    // 'license.*' options.  These must be here rather than in 
+    // ToolsConfiguration so they can be discovered when
+    // introspection is done on Configuration.class to discover the options.
+    //
+    private LicensesConfiguration licensesConfiguration;
+ 
+    public LicensesConfiguration getLicensesConfiguration()
+    {
+        return licensesConfiguration;
+    }
+    
+    /**
+     *  The RuntimeSharedLibraryPathItem Configuration contains
+     *  options to modify runtime-shared-library-path options
+     *  the user has already specified.
+     */
+    private RuntimeSharedLibrarySettingsConfiguration rslSettingsConfiguration;
+    
+    public RuntimeSharedLibrarySettingsConfiguration getRuntimeSharedLibrarySettingsConfiguration()
+    {
+        return rslSettingsConfiguration;
+    }
+    
+    //
+    // 'raw-metadata' option
+    //
+    
+    private String metadata = null;
+
+    public String getMetadata()
+    {
+        return (metadata == null)? getMetadataConfiguration().toString() : metadata;
+    }
+
+    public void cfgRawMetadata( ConfigurationValue cv, String xml )
+            throws ConfigurationException
+    {
+        if (metadata != null)
+        {
+            throw new ConfigurationException.BadMetadataCombo( cv.getVar(), cv.getSource(), cv.getLine() );
+        }
+
+        this.metadata = xml;
+    }
+
+    public static ConfigurationInfo getRawMetadataInfo()
+    {
+        return new ConfigurationInfo( 1, "text" )
+        {
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'resource-bundle-list' option
+    //
+    
+	private String rbListFileName = null;
+
+	public String getRBListFileName()
+	{
+	    return rbListFileName;
+	}
+	
+	public boolean generateRBList()
+	{
+		return rbListFileName != null;
+	}
+
+	public void cfgResourceBundleList( ConfigurationValue cv, String filename )
+	{
+	    this.rbListFileName = getOutputPath(cv, filename);
+	}
+    
+	public static ConfigurationInfo getResourceBundleListInfo()
+	{
+	    return new ConfigurationInfo(new String[] {"filename"})
+	    {
+	        public boolean isAdvanced()
+	        {
+	            return true;
+	        }
+	    };
+	}
+
+    //
+    // 'resource-shared-libraries' option
+    //
+    
+    private List<String> rslList = new LinkedList<String>();
+    
+    public List<String> getRuntimeSharedLibraries()
+    {
+        return rslList;
+    }
+    
+    public void cfgRuntimeSharedLibraries( ConfigurationValue cfgval, String[] urls ) throws ConfigurationException
+    {
+        for (int i = 0; i < urls.length; ++i)
+        {
+            // can't really validate these easily...
+            rslList.add( urls[i] );
+        }
+    }
+
+    public static ConfigurationInfo getRuntimeSharedLibrariesInfo()
+    {
+        return new ConfigurationInfo( -1, new String[] { "url" } )
+        {
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'use-network' option
+    //
+    
+    private boolean useNetwork;
+
+    public boolean useNetwork()
+    {
+        return useNetwork;
+    }
+
+    public void cfgUseNetwork( ConfigurationValue cv, boolean b)
+    {
+        this.useNetwork = b;
+    }
+
+    
+
+	/**
+	 * Capture the information in one argument specifing -runtime-shared-libraries-path
+	 * information.
+	 * 
+	 * @author dloverin
+	 * 
+	 */
+	public class RslPathInfo
+	{
+		/**
+		 * The extension given to a signed RLS that is assumed to be signed.
+		 * Unsigned RSLs should use the standard "swf" extension.
+		 */
+		public static final String SIGNED_RSL_URL_EXTENSION = "swz";
+		public static final String SIGNED_RSL_URL_DOT_EXTENSION = "." + SIGNED_RSL_URL_EXTENSION;
+		
+		// path to swc to link against, this is logically added
+		// -external-library-path option
+		private String swcPath;
+		private VirtualFile swcVf;	// the swc's virtual file		
+		
+		// rsls in the order to load. The first if the primary rsl, the
+		// others are failover rsls.
+		private List<String> rslUrls;
+
+		// policy file urls, optional. The first in the list if applies to the
+		// first rsl in _rslUrls. The second in the list applies to the second
+		// in _rslUrls and so on. If there are more policy file urls than rsl
+		// urls,
+		// then display a warning.
+		private List<String> policyFileUrls;
+
+		//
+		// List of type Boolean. Entry i in this list tells if entry i in the list
+		// given by getRslUrls() is targeting a signed or unsigned rsl.
+		//
+		private List<Boolean> isSignedList;
+		
+		
+		/**
+		 * Create a new cross-domain RSL entry. The info specified the swc file to 
+		 * exclude put a list of RSL urls and policy file urls. The first RSL url/policy
+		 * file url pair are the primary urls. The remaining urls are failovers and are
+		 * only used if the primary RSL fails to load.
+		 *
+		 */
+		public RslPathInfo()
+		{
+			rslUrls = new ArrayList<String>();
+		}
+
+		/**
+		 * Test is the url is signed.
+		 * 
+		 * @param url url to test, the file specified by the url does not 
+		 * 			  need to exist.
+		 * @return true if the url specifies a signed rsl, false otherwise.
+		 */
+		public boolean isRslUrlSigned(String url) {
+			if (url == null) {
+				return false;
+			}
+			
+			return url.endsWith(SIGNED_RSL_URL_DOT_EXTENSION);
+		}
+
+		
+		/**
+		 * Set the path to the swc.
+		 * 
+		 * @param swcPath
+		 */
+		public void setSwcPath(String swcPath)
+		{
+			this.swcPath = swcPath;
+		}
+
+		/**
+		 * 
+		 * @return the path to the swc
+		 */
+		public String getSwcPath()
+		{
+			return swcPath;
+		}
+
+		/**
+		 * Set the virtual file associated with the swc path.
+		 * 
+		 * @param vf
+		 */
+		public void setSwcVf(VirtualFile vf)
+		{
+			swcVf = vf;
+		}
+		
+		
+		/**
+		 * 
+		 * @return 
+		 */
+		public VirtualFile getSwcVirtualFile() {
+			return swcVf;
+		}
+		
+		
+		/**
+		 * Add an RSL to the list of RSLs.
+		 * 
+		 * @param url url of the RSL, may not be null
+		 */
+		public void addRslUrl(String url)
+		{
+			if (url == null) {
+				throw new NullPointerException("url may not be null"); // $NON-NLS-1$
+			}
+			
+			rslUrls.add(url);
+			addSignedFlag(isRslUrlSigned(url));
+		}
+
+		/**
+		 * 
+		 * @return List of urls to RSLs. Each entry in the list is of type <code>String</code>.
+		 */
+		public List<String> getRslUrls()
+		{
+			return rslUrls;
+		}
+
+		
+		/**
+		 * Add a policy file to support the associated entry in the RSL URL list. Policy file
+		 * entries my be empty, but must be specified.
+		 * @param url url of the policy file.
+		 */
+		public void addPolicyFileUrl(String url)
+		{
+			if (policyFileUrls == null)
+			{
+				policyFileUrls = new ArrayList<String>();
+			}
+
+			policyFileUrls.add(url == null ? "" : url); // $NON-NLS-1$
+		}
+
+		/**
+		 * Get the list of policy files.
+		 * 
+		 * @return Listof policy file urls. Each entry in the list of type <code>String</code>
+		 */
+		public List<String> getPolicyFileUrls()
+		{
+			return policyFileUrls == null ? Collections.<String>emptyList() : policyFileUrls;
+		}
+		
+		
+		/**
+		 * Return a list of booleans that indicate if an RSL URL is signed or unsigned. There is a matching entry
+		 * is this list for every entry in the RSL URL list.
+		 * 
+		 * @return List of boolean signed flags for the RSL URL list. Each entry in the list is 
+		 * 		   of type <code>Boolean</code>.
+		 */
+		public List<Boolean> getSignedFlags() {
+			return isSignedList;
+		}
+		
+		/**
+		 * Add a signed flag to the list of flags. This flag is determines if the RSL URL
+		 * associated with this entry is considered signed or unsigned. 
+		 * 
+		 * @param isSigned true if the RSL URL is signed.
+		 */
+		private void addSignedFlag(boolean isSigned) {
+			if (isSignedList == null) {
+				isSignedList = new ArrayList<Boolean>();
+			}
+			
+			isSignedList.add(Boolean.valueOf(isSigned));
+		}
+
+	}
+
+	private List<RslPathInfo> rslPathInfoList; // list of CdRslInfo objects
+    private Set<String> loadedRsls;            // swc location of the rsls that will be loaded
+	
+	/**
+	 * @return List of of all the -runtime-shared-libraries-path options.
+	 * 	 	Each-runtime-shared-libraries-path option supplied results in 
+	 * 		a RslPathInfo object.
+	 * 		Each object in the list is of type RslPathInfo. 
+	 * 		The list will be empty if -static-link-runtime-shared-libraries=true.
+	 */
+	public List<RslPathInfo> getRslPathInfo() {
+		return rslPathInfoList == null ? Collections.<RslPathInfo>emptyList() : rslPathInfoList;
+	}
+
+	public VirtualFile[] getRslExcludedLibraries() {
+		
+		if (rslPathInfoList == null || getStaticLinkRsl()) {
+			return new VirtualFile[0];	
+		}
+		
+		List<VirtualFile> libraries = new ArrayList<VirtualFile>();
+
+		for (Iterator<RslPathInfo> iter = rslPathInfoList.iterator(); iter.hasNext();)
+		{
+			RslPathInfo info = iter.next();
+			libraries.add(info.getSwcVirtualFile());
+		}
+
+		return libraries.toArray(new VirtualFile[0]);
+	}
+
+	public void cfgRuntimeSharedLibraryPath(ConfigurationValue cfgval,
+			String[] urls) throws ConfigurationException
+	{
+
+		if (urls.length == 0) {
+			return;	// ignore option
+		}
+		
+		// Usage rule: if you use -rslp on the command line
+		// it will take effect unless you also specify -static-rsls=true on the command line.
+		if (CommandLineConfigurator.SOURCE_COMMAND_LINE.equals(cfgval.getSource())) {
+			setOverrideStaticLinkRsl(false);			
+		}
+		
+		// ignore rsl if told to
+		if (getStaticLinkRsl()) {
+			return;
+		}
+		
+		if (urls.length < 2)
+		{
+			// insufficent arguments
+			throw new ConfigurationException.MissingArgument("rsl-url",
+					"runtime-shared-library-path", cfgval.getSource(), 
+					cfgval.getLine());
+		}
+
+		RslPathInfo info = new RslPathInfo();
+
+		// validate the first argument, the swc or open directory, required.
+		VirtualFile include = ConfigurationPathResolver.getVirtualFile(urls[0],
+																	configResolver,
+																	cfgval );
+		
+		info.setSwcPath(urls[0]);
+		info.setSwcVf(include);
+		
+		// the rest of the args are: rsl-url, policy-file-url, rsl-url, policy-file-url,... 
+		for (int i = 1; i < urls.length; ++i)
+		{
+			if ((i + 1) % 2 == 0)
+			{
+				if (urls[i].length() == 0) {
+					// rsl urls is required
+					throw new ConfigurationException.MissingArgument("rsl-url",
+							"runtime-shared-library-path", cfgval.getSource(), 
+							cfgval.getLine());
+				}
+				info.addRslUrl(urls[i]);				
+			}
+			else {
+				info.addPolicyFileUrl(urls[i]);				
+			}
+		}
+
+		// if the last policy file was not specified, then add an empty one so
+		// there are always the same number of rsls and policy files.
+		if ((urls.length % 2) == 0) {
+			info.addPolicyFileUrl("");	// $NON-NLS-1$
+		}
+		
+		// take local variables and add to overall arguments.
+		if (rslPathInfoList == null)
+		{
+			rslPathInfoList = new ArrayList<RslPathInfo>();
+		}
+
+		rslPathInfoList.add(info);
+	}
+
+	public static ConfigurationInfo getRuntimeSharedLibraryPathInfo()
+	{
+		return new ConfigurationInfo()
+		{
+			public boolean allowMultiple()
+			{
+				return true;
+			}
+
+			public String[] getSoftPrerequisites()
+			{
+				return new String[] {"static-link-runtime-shared-libraries"};
+			}
+
+			public String getArgName(int argnum)
+			{
+				String argName = null;
+				
+				if (argnum == 0) 
+				{
+					argName = "path-element";
+				}
+				else 
+				{
+					argnum = (argnum + 1) % 2;
+					if (argnum == 0)
+					{
+						argName = "rsl-url";
+					}
+					else 
+					{
+						argName = "policy-file-url";
+					}
+				}
+				return argName;
+			}
+			
+			public boolean doChecksum()
+			{
+				return false;
+			}
+		};
+	}
+
+	//
+	// 'static-link-runtime-shared-libraries' option
+	// 
+	
+	private boolean staticLinkRsl = true;
+	private String staticLinkRslSource;
+	
+	
+	/**
+	 * 
+	 * @return true if -cd-rsl option should be used. False otherwise.
+	 */
+	public boolean getStaticLinkRsl()
+	{
+		return staticLinkRsl;
+	}
+	
+	
+	/**
+	 * Allow another option, namely -rslp to override the value of
+	 * static-rsls. But you can not override a -static-rsls option that came from the command line. 
+	 * 
+	 * @param staticLinkRsl
+	 */
+	protected void setOverrideStaticLinkRsl(boolean staticLinkRsl) 
+	{
+		if (CommandLineConfigurator.SOURCE_COMMAND_LINE.equals(staticLinkRslSource)) 
+		{
+			return;
+		}
+		
+		this.staticLinkRsl = staticLinkRsl;
+	}
+	
+	
+	/**
+	 * 
+	 * @param cv
+	 * @param b
+	 */
+	public void cfgStaticLinkRuntimeSharedLibraries(ConfigurationValue cv, boolean b)
+	{
+		staticLinkRsl = b;
+		staticLinkRslSource = cv.getSource();
+	}
+	
+	
+	//
+	// 'verify-digests' options
+	// 
+	
+	private boolean verifyDigests = true;
+	
+	/**
+	 * 
+	 * @return true if digest information associated with the  
+	 * 		  -cd-rsl option is used by the application at runtime. False otherwise.
+	 */
+	public boolean getVerifyDigests()
+	{
+		return verifyDigests;
+	}
+	
+	/**
+	 * 
+	 * @param cv
+	 * @param b
+	 */
+	public void cfgVerifyDigests(ConfigurationValue cv, boolean b)
+	{
+		verifyDigests = b;
+	}
+	
+	
+	public static ConfigurationInfo getVerifyDigestsInfo()
+	{
+		return new AdvancedConfigurationInfo();
+	}
+	
+    //
+    // 'remove-unused-rsls' option
+    // 
+    
+    private boolean removeUnusedRSLs = true;
+    
+    /**
+     * 
+     * @return true if the user wants to remove unused RSLs. Otherwise false.
+     */
+    public boolean getRemoveUnusedRsls()
+    {
+        return removeUnusedRSLs;
+    }
+    
+    /**
+     * 
+     * @param cv
+     * @param b
+     */
+    public void cfgRemoveUnusedRsls(ConfigurationValue cv, boolean b)
+    {
+        removeUnusedRSLs = b;
+    }
+    
+    
+    public static ConfigurationInfo getRemoveUnusedRslsInfo()
+    {
+        return new AdvancedConfigurationInfo();
+    }
+    
+    //
+    // '-include-inheritance-dependencies-only' option
+    // 
+    
+    private boolean includeInheritanceDependenciesOnly = false;
+    
+    /**
+     * 
+     * @return true if the user want to include inheritance dependencies only. 
+     */
+    public boolean getIncludeInheritanceDependenciesOnly()
+    {
+        return includeInheritanceDependenciesOnly;
+    }
+    
+    /**
+     * 
+     * @param cv
+     * @param b
+     */
+    public void cfgIncludeInheritanceDependenciesOnly(ConfigurationValue cv, boolean b)
+    {
+        includeInheritanceDependenciesOnly = b;
+    }
+    
+    
+    public static ConfigurationInfo getIncludeInheritanceDependenciesOnlyInfo()
+    {
+        return new AdvancedConfigurationInfo();
+    }
+    
+	//
+	// 'target-player' option
+	// 
+    
+    /**
+     * Returns the correct macromedia.asc.embedding.avmplus.Features.TARGET_AVM*
+     * for the current target player.
+     * 
+     * @see macromedia.asc.util.ContextStatics.getTargetAVM()
+     */
+    public int getTargetPlayerTargetAVM()
+    {
+        return getTargetPlayerTargetAVM(getTargetPlayerMajorVersion());
+    }
+    
+    /**
+     * Returns the correct macromedia.asc.embedding.avmplus.Features.TARGET_AVM*
+     * for the given target player major revision (e.g. 10).
+     * 
+     * @see macromedia.asc.util.ContextStatics.getTargetAVM()
+     */
+    public static int getTargetPlayerTargetAVM(int targetPlayerMajorVersion)
+    {
+        return 1; // ContextStatics.getTargetAVM(targetPlayerMajorVersion);
+    }
+    
+    /**
+     * Returns an ObjectList filled with the correct namespaces that need to be
+     * automagically opened for the current target player, e.g. flash10.
+     * 
+     * @see macromedia.asc.util.ContextStatics.use_namespaces
+     */
+    public ObjectList<String> getTargetPlayerRequiredUseNamespaces()
+    {
+        return getTargetPlayerRequiredUseNamespaces(getTargetPlayerMajorVersion());
+    }
+    
+    /**
+     * Returns an ObjectList filled with the correct namespaces that need to be
+     * automagically opened for the current target player, e.g. flash10.
+     * 
+     * @see macromedia.asc.util.ContextStatics.use_namespaces
+     */
+    public static ObjectList<String> getTargetPlayerRequiredUseNamespaces(int targetPlayerMajorVersion)
+    {
+        return new ObjectList<String>();
+    }
+    
+	// targeted player version (also set in DefaultsConfigurator)
+	private int majorVersionTarget = 11;
+	private int minorVersionTarget = 1;
+	private int revisionTarget = 0;
+	
+	/**
+	 * 
+	 * @return The major version of the player targeted by this application.
+	 * 		   The returned value will be greater to or equal to 9.  
+	 */
+	public int getTargetPlayerMajorVersion()
+	{
+		return majorVersionTarget;
+	}
+	
+	/**
+	 * 
+	 * @return The minor version of the player targeted by this application.
+	 * 		   The returned value will be greater to or equal to 0.  
+	 */
+	public int getTargetPlayerMinorVersion()
+	{
+		return minorVersionTarget;
+	}
+	
+	/**
+	 * 
+	 * @return The revision of the player targeted by this application.
+	 * 		   The returned value will be greater to or equal to 0.  
+	 */
+	public int getTargetPlayerRevision()
+	{
+		return revisionTarget;
+	}
+	
+	/**
+	 * 
+	 * @param cv
+	 * @param b
+	 */
+	public void cfgTargetPlayer(ConfigurationValue cv, String version)
+        throws ConfigurationException
+	{
+		if (version == null)
+		{
+			return;
+		}
+		
+		String[] results = version.split("\\.");
+		
+		if (results.length == 0)
+		{
+			throw new ConfigurationException.BadVersion(version, "target-player");
+
+		}
+		
+		for (int i = 0; i < results.length; i++)
+		{
+			int versionNum = 0;
+			
+			try
+			{
+				versionNum = Integer.parseInt(results[i]);
+			}
+			catch (NumberFormatException e)
+			{
+				throw new ConfigurationException.BadVersion(version, "target-player");				
+			}
+			
+			if (i == 0)
+			{
+				if (versionNum >= 9) 
+				{
+					this.majorVersionTarget = versionNum;
+				}
+				else 
+				{
+					throw new ConfigurationException.BadVersion(version, "target-player");
+				}				
+			}
+			else 
+			{
+				if (versionNum >= 0) 
+				{
+					if (i == 1)
+					{
+						this.minorVersionTarget = versionNum;						
+					}
+					else
+					{
+						this.revisionTarget = versionNum;
+					}
+				}
+				else 
+				{
+					throw new ConfigurationException.BadVersion(version, "target-player");
+				}				
+			}
+		}
+	}
+	
+	public static ConfigurationInfo getTargetPlayerInfo()
+	{
+		return new ConfigurationInfo(new String[] {"version"});
+	}
+	
+	//
+	// 'swf-version' option
+	//
+	
+	private int swfVersion = 14;
+	
+	public int getSwfVersion()
+	{
+		assert swfVersion > 0;
+		return swfVersion;
+	}
+	
+	public void setSwfVersion(final int version)
+	{
+		assert version > 0;
+		swfVersion = version;
+	}
+	
+	public void cfgSwfVersion(ConfigurationValue cv, int version)
+	{
+		setSwfVersion(version);
+	}
+	
+	public boolean getComputeDigest()
+	{
+		throw new InternalError("compute-digest");
+	}
+	
+	//
+	// 'use-direct-blit' option
+	//
+
+	private boolean useDirectBlit = false;
+	
+	public boolean getUseDirectBlit()
+	{
+		return useDirectBlit;
+	}
+	
+	public void setUseDirectBlit(boolean value)
+	{
+		useDirectBlit = value;
+	}
+	
+	public void cfgUseDirectBlit(ConfigurationValue cv, boolean value)
+	{
+		setUseDirectBlit(value);
+	}
+	
+	//
+	// 'use-gpu' option
+	//
+	
+	private boolean useGpu = false;
+	
+	public boolean getUseGpu()
+	{
+		return useGpu;
+	}
+	
+	public void setUseGpu(boolean value)
+	{
+		useGpu = value;
+	}
+	
+	public void cfgUseGpu(ConfigurationValue cv, boolean value)
+	{
+		setUseGpu(value);
+	}
+	
+	//
+	// 'swc-checksum' options
+	// 
+	
+	private boolean swcChecksumEnabled = true;
+	
+	/**
+	 * 
+	 * @return true if optimization using signature checksums are enabled.
+	 */
+	public boolean isSwcChecksumEnabled()
+	{
+		return swcChecksumEnabled;
+	}
+	
+	/**
+	 * 
+	 * @param cv
+	 * @param b
+	 */
+	public void cfgSwcChecksum(ConfigurationValue cv, boolean b)
+	{
+		swcChecksumEnabled = b;
+	}
+	
+	public static ConfigurationInfo getSwcChecksumInfo()
+	{
+		return new ConfigurationInfo() {
+
+			public boolean isHidden()
+			{
+				return true;
+			}
+
+			public boolean doChecksum()
+			{
+				return false;
+			}
+			
+		};
+	}
+
+	// cssArchiveFiles and l10nArchiveFiles
+	
+	private Map<String, VirtualFile> cssArchiveFiles;
+	private Map<String, VirtualFile> l10nArchiveFiles;
+	
+	public void addCSSArchiveFiles(Map<String, VirtualFile> m)
+	{
+		if (cssArchiveFiles == null)
+		{
+			cssArchiveFiles = new HashMap<String, VirtualFile>();
+		}
+		cssArchiveFiles.putAll(m);
+	}
+	
+	public Map<String, VirtualFile> getCSSArchiveFiles()
+	{
+		return cssArchiveFiles;
+	}
+	
+	public void addL10nArchiveFiles(Map<String, VirtualFile> m)
+	{
+		if (l10nArchiveFiles == null)
+		{
+			l10nArchiveFiles = new HashMap<String, VirtualFile>();
+		}
+		l10nArchiveFiles.putAll(m);
+	}
+	
+	public Map<String, VirtualFile> getL10NArchiveFiles()
+	{
+		return l10nArchiveFiles;
+	}
+
+
+    /**
+     * The compatibility version specified in the configuration.
+     */
+    public String getCompatibilityVersionString()
+    {
+        return compilerConfiguration.getCompatibilityVersionString();
+    }
+
+ 	public int getCompatibilityVersion()
+	{
+		return compilerConfiguration.getCompatibilityVersion();
+	}
+
+    /**
+     * The minimum supported library version specified in the configuration.
+     */
+    public String getMinimumSupportedVersionString()
+    {
+        return compilerConfiguration.getMinimumSupportedVersionString();
+    }
+
+    public int getMinimumSupportedVersion()
+    {
+        return compilerConfiguration.getMinimumSupportedVersion();
+    }
+    
+    public boolean getQualifiedTypeSelectors()
+    {
+        return compilerConfiguration.getQualifiedTypeSelectors();
+    }
+
+    /**
+     * Configures the LocalizationManager's locale, which is used when
+     * reporting compile time errors, warnings, and info.
+     *
+     * @param toolsLocale A locale in Java format.  For example, "en" or "ja_JP".
+     * @throws ConfigurationException When the specified toolsLocale is
+     *         not available a ToolsLocaleNotAvailable error is reported.
+    public void cfgToolsLocale(ConfigurationValue cv, String toolsLocale)
+        throws ConfigurationException
+    {
+        Locale[] locales = Locale.getAvailableLocales();
+
+        for (int i = 0; i < locales.length; i++)
+        {
+            if (locales[i].toString().equals(toolsLocale))
+            {
+                LocalizationManager localizationManager = ThreadLocalToolkit.getLocalizationManager();
+
+                if (localizationManager != null)
+                {
+                    localizationManager.setLocale(locales[i]);
+                }
+                else
+                {
+                    assert false : "LocalizationManager not setup yet.";
+                }
+
+                return;
+            }
+        }
+
+        throw new ConfigurationException.ToolsLocaleNotAvailable(cv.getVar(),
+                                                                 cv.getSource(),
+                                                                 cv.getLine() );
+    }
+     */
+    
+    public void setAdvancedTelemetry(boolean enableTelemetry)
+    {
+    	compilerConfiguration.setAdvancedTelemetry(enableTelemetry);
+    }
+
+
+ 	public boolean getAdvancedTelemetry()
+	{
+		return compilerConfiguration.getAdvancedTelemetry();
+	}
+
+ 	
+ 	@Override
+ 	public Configuration clone()
+ 	    throws CloneNotSupportedException
+ 	{
+ 	    Configuration cloneConfig = (Configuration) super.clone();
+ 	    CompilerConfiguration cloneCompilerConfiguration = (CompilerConfiguration) this.compilerConfiguration.clone();
+ 	    cloneConfig.compilerConfiguration = cloneCompilerConfiguration;
+ 	    return cloneConfig;
+ 	}
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/dff3a518/flex-compiler-oem/src/flex2/compiler/common/ConfigurationPathResolver.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/flex2/compiler/common/ConfigurationPathResolver.java b/flex-compiler-oem/src/flex2/compiler/common/ConfigurationPathResolver.java
new file mode 100644
index 0000000..cbc57e4
--- /dev/null
+++ b/flex-compiler-oem/src/flex2/compiler/common/ConfigurationPathResolver.java
@@ -0,0 +1,164 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.
+ *
+ */
+
+package flex2.compiler.common;
+
+import flex2.compiler.config.ConfigurationException;
+import flex2.compiler.config.ConfigurationValue;
+import flex2.compiler.io.FileUtil;
+import flex2.compiler.io.LocalFile;
+import flex2.compiler.io.VirtualFile;
+
+import java.io.File;
+
+/**
+ * Resolves files in a way specific to configuration files.  Or, as
+ * Roger, points out, this could be renamed RelativePathResolver or
+ * something, since it just resolves things relative to a root
+ * directory.
+ *
+ * @author Brian Deitte
+ */
+public class ConfigurationPathResolver implements SinglePathResolver
+{
+    private String root;
+
+    /**
+     * Set default root file.  For mxmlc, we only want the root to ever be the context of
+     * a ConfigurationValue.  For example, if a ConfigurationValue comes from
+     * "C:/flex/flex-config.xml", the root should be "C:/flex".  If a ConfigurationValue
+     * comes from the command line, the root should be null.
+     *
+     * This method is public, because it's used by Flex Builder.
+     */
+    public void setRoot( String root )
+    {
+        this.root = root;
+    }
+
+    /**
+     * Resolve the path as an absolute file or relative to the root or relative to the
+     * current working directory if the root is null.
+     */
+    public VirtualFile resolve( String path )
+    {
+        VirtualFile resolved = null;
+
+        File absoluteOrRelativeFile = FileUtil.openFile(path);
+
+        if ((absoluteOrRelativeFile != null) &&
+             absoluteOrRelativeFile.exists() &&
+             absoluteOrRelativeFile.isAbsolute())
+        {
+            resolved = new LocalFile(absoluteOrRelativeFile);
+        }
+        else if (root != null)
+        {
+            String rootRelativePath = root + File.separator + path;
+            File rootRelativeFile = FileUtil.openFile(rootRelativePath);
+            if ((rootRelativeFile != null) && rootRelativeFile.exists())
+            {
+                resolved = new LocalFile(rootRelativeFile);
+            }
+        }
+        else
+        {
+        	// C: must convert 'absoluteOrRelativeFile' into absolute before calling exists().
+            absoluteOrRelativeFile = absoluteOrRelativeFile.getAbsoluteFile();
+            if ((absoluteOrRelativeFile != null) &&
+                    absoluteOrRelativeFile.exists())
+                // && !FileUtils.isAbsolute(absoluteOrRelativeFile)
+            {
+            	resolved = new LocalFile(absoluteOrRelativeFile);
+            }
+        }
+
+        /*
+        if ((resolved != null) && Trace.pathResolver)
+        {
+            Trace.trace("ConfigurationPathResolver.resolve: resolved " + path + " to " + resolved.getName());
+        }
+        */
+        
+        return resolved;
+    }
+
+    
+    // This should be moved, simplified, destroyed, something.
+
+    public static VirtualFile getVirtualFile(String file,
+                                             ConfigurationPathResolver configResolver,
+                                             ConfigurationValue cfgval)
+        throws ConfigurationException
+    {
+        ConfigurationPathResolver relative = null;
+        String cfgContext = cfgval != null ? cfgval.getContext() : null;
+        if (cfgContext != null)
+        {
+            relative = new ConfigurationPathResolver();
+            relative.setRoot( cfgContext );
+        }
+
+        // check the PathResolver first and if nothing is found, then check the config
+        // resolver.  This is done so that Zorn/WebTier can resolve these files as they
+        // wish
+        VirtualFile vFile = new PathResolver().resolve(relative, file);
+
+        if (vFile == null)
+        {
+            String oldRoot = null;
+            boolean rootChanged = false;
+            try
+            {   
+                // If there is a configuration context for the configResolver, then use it.
+                // If there is no context, then let the configResolver use its own root.
+                if (cfgContext != null)
+                {
+                    oldRoot = configResolver.root;
+                    rootChanged = true;
+                    configResolver.setRoot(cfgContext);
+                }
+                vFile = configResolver.resolve(file);
+            }
+            finally
+            {
+                if (rootChanged)
+                {
+                    configResolver.setRoot(oldRoot);                
+                }
+            }
+        }
+        if (vFile == null)
+        {
+	        if (cfgval == null)
+	        {
+		        throw new ConfigurationException.CannotOpen( file, null, null, -1 );   
+	        }
+	        else
+	        {
+		        throw new ConfigurationException.CannotOpen( file, cfgval.getVar(), cfgval.getSource(), cfgval.getLine() );
+	        }
+        }
+        return vFile;
+    }
+
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/dff3a518/flex-compiler-oem/src/flex2/compiler/common/DefaultsConfigurator.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/flex2/compiler/common/DefaultsConfigurator.java b/flex-compiler-oem/src/flex2/compiler/common/DefaultsConfigurator.java
new file mode 100644
index 0000000..cda9657
--- /dev/null
+++ b/flex-compiler-oem/src/flex2/compiler/common/DefaultsConfigurator.java
@@ -0,0 +1,214 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.
+ *
+ */
+
+package flex2.compiler.common;
+
+import flex2.compiler.config.ConfigurationBuffer;
+import flex2.compiler.config.ConfigurationException;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * This class makes the default values go in through the configuration
+ * buffer instead of just the value set on the actual object.  This is
+ * useful for dependency checking and also for reporting the source
+ * location of a particular configuration value when there is some
+ * sort of a conflict between two values; i.e. "X (set in defaults)
+ * must be disabled to use Y (set on command line)"
+ *
+ * The other (main) reason it is used is for the
+ * FileConfigurator.formatBuffer - since getters aren't part of the
+ * config system, the only values that can be printed are ones set via
+ * the config setters.  Since its handy to be able to generate a full
+ * config file based on current settings, having the default values
+ * set here makes the defaults show up too.
+ *
+ * Although the decentralization of the various config objects is
+ * somewhat broken by this class, if you consider it to be basically a
+ * "baked in config file", then it might feel less strange.
+ *
+ * In the end, if it is too much of a pain, don't worry about it, just
+ * set your local defaults inside your configuration object.  No big
+ * deal.
+ *
+ * @author Roger Gonzalez
+ */
+public class DefaultsConfigurator
+{
+    static private void set( ConfigurationBuffer cfgbuf, String var, String val ) throws ConfigurationException
+    {
+        LinkedList<String> args = new LinkedList<String>();
+        args.add( val );
+        cfgbuf.setVar( var, args, "defaults", -1 );
+    }
+
+    static private void set( ConfigurationBuffer cfgbuf, String[] vars, String val ) throws ConfigurationException
+    {
+        for (int i = 0; i < vars.length; ++i)
+        {
+            set( cfgbuf, vars[i], val );
+        }
+    }
+
+	// load defaults for normal compile
+    static public void loadDefaults( ConfigurationBuffer cfgbuf ) throws ConfigurationException
+    {
+	    loadCommonDefaults( cfgbuf );
+	    set( cfgbuf, "compiler.debug", "false" );
+	    set( cfgbuf, "compiler.use-resource-bundle-metadata", "true" );
+    }
+
+	// load defaults for compc
+	static public void loadCompcDefaults( ConfigurationBuffer cfgbuf ) throws ConfigurationException
+	{
+		loadCommonDefaults( cfgbuf );
+		set( cfgbuf, "compiler.debug", "true" );
+		set( cfgbuf, "compiler.use-resource-bundle-metadata", "false" );
+		set( cfgbuf, "compiler.archive-classes-and-assets", "true" );
+		set (cfgbuf, "directory", "false" );
+	}
+
+	static public void loadASDocDefaults( ConfigurationBuffer cfgbuf ) throws ConfigurationException
+	{
+		loadCommonDefaults( cfgbuf );
+		set( cfgbuf, "compiler.debug", "false" );
+		set( cfgbuf, "compiler.use-resource-bundle-metadata", "false" );		
+		set( cfgbuf, "compiler.doc", "true" );
+		set( cfgbuf, "output", "asdoc-output" );
+		set( cfgbuf, "left-frameset-width", "-1" );
+	}
+
+	static public void loadOEMCompcDefaults( ConfigurationBuffer cfgbuf ) throws ConfigurationException
+	{
+		loadCommonDefaults( cfgbuf );
+		set( cfgbuf, "compiler.debug", "true" );
+		set( cfgbuf, "compiler.use-resource-bundle-metadata", "false" );
+		set( cfgbuf, "compiler.archive-classes-and-assets", "true" );
+	}
+
+	
+	static public void loadMinimumDefaults( ConfigurationBuffer cfgbuf ) throws ConfigurationException
+	{
+		List<String> args = new ArrayList<String>();
+		
+	    args.add( "${flexlib}/${configname}-config.xml" );
+	    // we should probably have a dedicated subclass of DefaultsConfigurator for
+	    // each product (i.e. webtier doesn't use this var), but for now, this seems
+	    // like such a seductively easy workaround, lets see if this is adequate:
+	    if (cfgbuf.isValidVar( "load-config" ))
+	        cfgbuf.setVar("load-config", args, "defaults", -1, null, false);
+		
+	}
+	
+	
+	private static void loadCommonDefaults( ConfigurationBuffer cfgbuf ) throws ConfigurationException
+	{
+        // specified in case people are using older flex-config.xml
+        // also specified in flex-config.xml
+        set( cfgbuf, "target-player", "11.1" );
+        set( cfgbuf, "swf-version", "14");
+
+	    set( cfgbuf,
+	         new String[]
+	         {
+                 "compiler.accessible",
+		         "compiler.es",
+		         "compiler.mobile",
+		         "compiler.verbose-stacktraces",
+	             "compiler.show-dependency-warnings",
+	             "compiler.keep-generated-actionscript",
+                 "compiler.keep-generated-signatures",
+                 "compiler.disable-incremental-optimizations",
+	             "compiler.allow-source-path-overlap",
+	         }, "false" );
+
+	    set( cfgbuf,
+	         new String[]
+	         {
+		         "lazy-init",
+                 "compiler.omit-trace-statements",
+		         "compiler.optimize",
+		         "compiler.strict",
+		         "compiler.show-actionscript-warnings",
+		         "compiler.as3",
+	             "compiler.show-deprecation-warnings",
+                 "compiler.show-shadowed-device-font-warnings",
+	             "compiler.show-binding-warnings",
+			     "compiler.fonts.advanced-anti-aliasing",
+	             "generate-frame-loader",
+		         "use-network",
+	         }, "true" );
+
+	    set( cfgbuf, "debug-password", "" );
+	    set( cfgbuf, "framework", "halo" );
+        // The Flex 4 default theme.
+        set( cfgbuf, "compiler.theme", "${flexlib}/themes/Spark/spark.css" );
+	    set( cfgbuf, "compiler.locale", java.util.Locale.getDefault().toString());
+	    set( cfgbuf, "compiler.translation-format", "flex2.compiler.i18n.PropertyTranslationFormat");
+
+	    set( cfgbuf, "default-frame-rate", "24" );
+	    set( cfgbuf, "default-background-color", "0xFFFFFF" );
+
+	    LinkedList<String> args = new LinkedList<String>();
+	    args.add( "500" );
+	    args.add( "375" );
+	    cfgbuf.setVar( "default-size", args, "defaults", -1 );
+
+	    args.clear();
+	    args.add( "${flexlib}/${configname}-config.xml" );
+	    // we should probably have a dedicated subclass of DefaultsConfigurator for
+	    // each product (i.e. webtier doesn't use this var), but for now, this seems
+	    // like such a seductively easy workaround, lets see if this is adequate:
+	    if (cfgbuf.isValidVar( "load-config" ))
+	        cfgbuf.setVar("load-config", args, "defaults", -1, null, false);
+
+	    args.clear();
+
+	    args.add( "1000" );
+	    args.add( "60" );
+	    cfgbuf.setVar( "default-script-limits", args, "defaults", -1 );
+
+	    // set( cfgbuf,  "compiler.context-root", "" );
+
+	    // Fonts
+	    set( cfgbuf, "compiler.fonts.max-cached-fonts", "20" );
+	    set( cfgbuf, "compiler.fonts.max-glyphs-per-face", "1000" );
+
+	    List<String> fontManagers = new ArrayList<String>();
+	    fontManagers.add( "flash.fonts.JREFontManager" );
+	    fontManagers.add( "flash.fonts.BatikFontManager" );
+	    cfgbuf.setVar( "compiler.fonts.managers", fontManagers, "defaults", -1 );
+
+        String os = System.getProperty("os.name");
+        if (os != null)
+        {
+            os = os.toLowerCase();
+            if (os.startsWith( "windows xp") )
+                set( cfgbuf, "compiler.fonts.local-fonts-snapshot", "${flexlib}/winFonts.ser" );
+            else if (os.startsWith("mac os x"))
+                set( cfgbuf, "compiler.fonts.local-fonts-snapshot", "${flexlib}/macFonts.ser" );
+            else
+                set( cfgbuf, "compiler.fonts.local-fonts-snapshot", "${flexlib}/localFonts.ser" );
+        }
+        else
+            set( cfgbuf, "compiler.fonts.local-fonts-snapshot", "${flexlib}/localFonts.ser" );
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/dff3a518/flex-compiler-oem/src/flex2/compiler/common/FontsConfiguration.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/flex2/compiler/common/FontsConfiguration.java b/flex-compiler-oem/src/flex2/compiler/common/FontsConfiguration.java
new file mode 100644
index 0000000..b8b17da
--- /dev/null
+++ b/flex-compiler-oem/src/flex2/compiler/common/FontsConfiguration.java
@@ -0,0 +1,307 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.
+ *
+ */
+
+package flex2.compiler.common;
+
+import flex2.compiler.config.AdvancedConfigurationInfo;
+import flex2.compiler.config.ConfigurationException;
+import flex2.compiler.config.ConfigurationInfo;
+import flex2.compiler.config.ConfigurationValue;
+import flex2.compiler.io.VirtualFile;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * This class defines the fonts related configuration options.  These
+ * options are typically set via flex-config.xml.
+ *
+ * @author Kyle Quevillon
+ * @author Peter Farland
+ */
+@SuppressWarnings("unchecked")
+public class FontsConfiguration
+{
+ 	private CompilerConfiguration compilerConfig;
+
+	public void setCompilerConfiguration(CompilerConfiguration compilerConfig)
+	{
+		this.compilerConfig = compilerConfig;
+	}
+	
+    private ConfigurationPathResolver configResolver;
+
+    public void setConfigPathResolver( ConfigurationPathResolver resolver )
+    {
+        this.configResolver = resolver;
+    }
+
+    /*
+    private FontManager topLevelManager;
+
+    /**
+     * Must be called <i>after</i> configuration is committed.
+     *
+     * @return the last of potentially several FontManagers in the manager list
+    public FontManager getTopLevelManager()
+    {
+        if (topLevelManager == null)
+        {
+            Map map = new HashMap();
+            map.put(CachedFontManager.MAX_CACHED_FONTS_KEY, max_cached_fonts);
+            map.put(CachedFontManager.MAX_GLYPHS_PER_FACE_KEY, max_glyphs_per_face);
+            map.put(CachedFontManager.COMPATIBILITY_VERSION, compilerConfig.getCompatibilityVersionString());
+
+            if (localFontsSnapshot != null)
+		        map.put(JREFontManager.LOCAL_FONTS_SNAPSHOT, localFontsSnapshot.getName());
+
+            if (resolvedLocalFontPaths != null)
+                map.put(FontManager.LOCAL_FONT_PATHS, resolvedLocalFontPaths);
+
+            topLevelManager = FontManager.create(managers, map, languages);
+        }
+
+        return topLevelManager;
+    }
+
+    public void setTopLevelManager(FontManager manager)
+    {
+        topLevelManager = manager;
+    }
+     */
+
+    //
+    // 'compiler.fonts.flash-type' option
+    //
+
+	private boolean flashType = true;
+
+	public boolean getFlashType()
+	{
+		return flashType;
+	}
+
+	public void cfgFlashType(ConfigurationValue cv, boolean val)
+	{
+	    this.flashType = val;
+	}
+
+	public static ConfigurationInfo getFlashTypeInfo()
+	{
+	    return new ConfigurationInfo()
+	    {
+	        public boolean isDeprecated()
+	        {
+	        	return true;
+	        }
+	        
+	        public String getDeprecatedReplacement()
+	        {
+	        	return "compiler.fonts.advanced-anti-aliasing";
+	        }
+	        
+	        public String getDeprecatedSince()
+	        {
+	        	//C: Don't change this to VersionInfo.getFlexVersion().
+	        	return "3.0";
+	        }
+	    };
+	}
+
+	public void cfgAdvancedAntiAliasing(ConfigurationValue cv, boolean val)
+	{
+	    cfgFlashType(cv, val);
+	}
+
+    //
+    // 'compiler.fonts.languages.language-range' option
+    //
+
+    private Languages languages = new Languages();
+
+    public Languages getLanguagesConfiguration()
+    {
+        return languages;
+    }
+
+    /**
+     * Defines a subconfiguration for font languages.  It contains
+     * only a single option, -compiler.fonts.languages.language-range.
+     */
+    public static class Languages extends Properties
+    {
+        private static final long serialVersionUID = 7123498355710868760L;
+
+        public void cfgLanguageRange(ConfigurationValue cv, String lang, String range)
+        {
+            setProperty(lang, range);
+        }
+
+        public static ConfigurationInfo getLanguageRangeInfo()
+        {
+            return new ConfigurationInfo(new String[]{"lang", "range"})
+            {
+                public boolean allowMultiple()
+                {
+                    return true;
+                }
+
+                public boolean isAdvanced()
+                {
+                    return true;
+                }
+            };
+        }
+    }
+
+    //
+    // 'compiler.fonts.local-fonts-snapshot' option
+    //
+
+    private VirtualFile localFontsSnapshot = null;
+    
+    public VirtualFile getLocalFontsSnapshot()
+    {
+    	return localFontsSnapshot;
+    }
+
+    public void cfgLocalFontsSnapshot(ConfigurationValue cv, String localFontsSnapshotPath)
+            throws ConfigurationException
+    {
+        localFontsSnapshot = ConfigurationPathResolver.getVirtualFile(localFontsSnapshotPath, configResolver, cv);
+    }
+    public static ConfigurationInfo getLocalFontsSnapshotInfo()
+    {
+        return new AdvancedConfigurationInfo();
+    }
+
+
+    //
+    // 'compiler.fonts.local-font-paths' option
+    //
+
+    private List<String> resolvedLocalFontPaths;
+
+    public List getLocalFontPaths()
+    {
+        return resolvedLocalFontPaths;
+    }
+
+    public void cfgLocalFontPaths(ConfigurationValue cv, List list)
+    {
+        resolvedLocalFontPaths = new ArrayList<String>();
+        if (list != null)
+        {
+            Iterator iterator = list.iterator();
+            while (iterator.hasNext())
+            {
+                String path = (String)iterator.next();
+                try
+                {
+                    VirtualFile file = ConfigurationPathResolver.getVirtualFile(path, configResolver, cv);
+                    resolvedLocalFontPaths.add(file.getName());
+                }
+                catch (ConfigurationException ex)
+                {
+                    // Invalid local font paths are ignored
+                }
+            }
+        }
+    }
+
+    public static ConfigurationInfo getLocalFontPathsInfo()
+    {
+        return new ConfigurationInfo(-1, "path-element")
+        {
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+    }
+
+    
+    //
+    // 'compiler.fonts.managers' option
+    //
+    
+    private List managers;
+
+    public List getManagers()
+    {
+        return managers;
+    }
+
+    public void cfgManagers(ConfigurationValue cv, List l)
+    {
+        managers = l;
+    }
+
+    public static ConfigurationInfo getManagersInfo()
+    {
+        return new ConfigurationInfo(-1, "manager-class")
+        {
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'compiler.fonts.max-cached-fonts' option
+    //
+
+    private String max_cached_fonts;
+
+    public String getMaxCachedFonts()
+    {
+        return max_cached_fonts;
+    }
+
+    public void cfgMaxCachedFonts(ConfigurationValue cv, String val)
+    {
+        this.max_cached_fonts = val;
+    }
+
+    public static ConfigurationInfo getMaxCachedFontsInfo()
+    {
+        return new AdvancedConfigurationInfo();
+    }
+
+    //
+    // 'compiler.fonts.max-glyphs-per-face' option
+    //
+
+    private String max_glyphs_per_face;
+
+    public String getMaxGlyphsPerFace()
+    {
+        return max_glyphs_per_face;
+    }
+
+    public void cfgMaxGlyphsPerFace(ConfigurationValue cv, String val)
+    {
+        this.max_glyphs_per_face = val;
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/dff3a518/flex-compiler-oem/src/flex2/compiler/common/FramesConfiguration.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/flex2/compiler/common/FramesConfiguration.java b/flex-compiler-oem/src/flex2/compiler/common/FramesConfiguration.java
new file mode 100644
index 0000000..55d419b
--- /dev/null
+++ b/flex-compiler-oem/src/flex2/compiler/common/FramesConfiguration.java
@@ -0,0 +1,109 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.
+ *
+ */
+
+package flex2.compiler.common;
+
+import flex2.compiler.config.ConfigurationException;
+import flex2.compiler.config.ConfigurationValue;
+import flex2.compiler.config.ConfigurationInfo;
+import flex2.compiler.util.NameFormatter;
+
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Iterator;
+
+/**
+ * This class defines the frame related configuration options.
+ * <PRE>
+ * <frames>
+ *   <frame>
+ *     <label>ick</label>
+ *     <className>foo</className>
+ *     <className>bar</className>
+ *   </frame>
+ *   <frame>
+ *     <label>asd</label>
+ *     <classname>moo</classname>
+ *   </frame>
+ * </frames>
+ * </PRE>
+ *
+ * @author Roger Gonzalez
+ */
+public class FramesConfiguration
+{
+    /**
+     * This value object represents a frame's name and classes.
+     */
+    public static class FrameInfo
+    {
+        public String label = null;
+        public List<String> frameClasses = new LinkedList<String>();
+    }
+    
+    //
+    // 'frames.frame' option
+    //
+    
+    private List<FrameInfo> frameList = new LinkedList<FrameInfo>();
+
+    public List<FrameInfo> getFrameList()
+    {
+        return frameList;
+    }
+
+    public void cfgFrame( ConfigurationValue cv, List args ) throws ConfigurationException
+    {
+        FrameInfo info = new FrameInfo();
+
+        if (args.size() < 2)
+            throw new ConfigurationException.BadFrameParameters( cv.getVar(), cv.getSource(), cv.getLine() );
+
+        for (Iterator it = args.iterator(); it.hasNext();)
+        {
+            if (info.label == null)
+            {
+                info.label = (String) it.next();
+            }
+            else
+            {
+	            String clsName = (String)it.next();
+                info.frameClasses.add( NameFormatter.toColon(clsName) );
+            }
+        }
+
+        frameList.add( info );
+    }
+
+    public static ConfigurationInfo getFrameInfo()
+    {
+        return new ConfigurationInfo( -1, new String[] {"label", "classname"} )
+        {
+            public boolean isAdvanced()
+            {
+                return true;
+            }
+
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/dff3a518/flex-compiler-oem/src/flex2/compiler/common/MetadataConfiguration.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/flex2/compiler/common/MetadataConfiguration.java b/flex-compiler-oem/src/flex2/compiler/common/MetadataConfiguration.java
new file mode 100644
index 0000000..58dad3a
--- /dev/null
+++ b/flex-compiler-oem/src/flex2/compiler/common/MetadataConfiguration.java
@@ -0,0 +1,353 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.
+ *
+ */
+
+package flex2.compiler.common;
+
+import flex2.compiler.config.ConfigurationValue;
+import flex2.compiler.config.ConfigurationInfo;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.Iterator;
+import java.util.Date;
+import java.text.DateFormat;
+
+/**
+ * This class handles metadata specific configuration options.
+ *
+ * @author Roger Gonzalez
+ */
+public class MetadataConfiguration
+{
+    public boolean isSet()
+    {
+        return ((localizedTitles.size() > 0) || (localizedDescriptions.size() > 0) ||
+		        (publishers.size() > 0) || (creators.size() > 0) || (contributors.size() > 0) || (langs.size() > 0) ||
+		        (date != null));
+    }
+    
+    private static String f( String in )
+    {
+        in = in.trim();
+        return ((in.indexOf('<') == -1) && (in.indexOf( '>') == -1))? in : ("<![CDATA[" + in + "]]>");
+    }
+    
+    public String toString()
+    {
+	    if (!isSet())
+	    {
+		    return null;
+	    }
+
+        StringBuilder sb = new StringBuilder();
+	    sb.append("<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>");
+	    sb.append("<rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/elements/1.1'>");
+	    sb.append("<dc:format>application/x-shockwave-flash</dc:format>");
+
+        if (localizedTitles.size() > 0)
+        {
+            if ((localizedTitles.size() == 1) && (localizedTitles.get("x-default") != null))
+            {
+                sb.append("<dc:title>" + f(localizedTitles.get("x-default")) + "</dc:title>");
+            }
+            else
+            {
+                sb.append("<dc:title><rdf:Alt>");
+                for (Iterator it = localizedTitles.entrySet().iterator(); it.hasNext();)
+                {
+                    Map.Entry e = (Map.Entry) it.next();
+                    sb.append("<rdf:li xml:lang='" + e.getKey() + "'>" + f((String) e.getValue()) + "</rdf:li>");
+                }
+                sb.append("</rdf:Alt></dc:title>");
+            }
+        }
+        if (localizedDescriptions.size() > 0)
+        {
+            if ((localizedDescriptions.size() == 1) && (localizedDescriptions.get("x-default") != null))
+            {
+                sb.append("<dc:description>" + f(localizedDescriptions.get("x-default")) + "</dc:description>");
+            }
+            else
+            {
+                sb.append("<dc:description><rdf:Alt>");
+                for (Iterator it = localizedDescriptions.entrySet().iterator(); it.hasNext();)
+                {
+                    Map.Entry e = (Map.Entry) it.next();
+                    sb.append("<rdf:li xml:lang='" + (String) e.getKey() + "'>" + f((String) e.getValue()) + "</rdf:li>");
+                }
+                sb.append("</rdf:Alt></dc:description>");
+            }
+        }
+        // FIXME - I suspect we need rdf:Bag for these when there are more than one?  --rg
+
+        for (Iterator<String> it = publishers.iterator(); it.hasNext();)
+        {
+            sb.append("<dc:publisher>" + f(it.next()) + "</dc:publisher>");
+        }
+
+        for (Iterator<String> it = creators.iterator(); it.hasNext();)
+        {
+            sb.append("<dc:creator>" + f(it.next()) + "</dc:creator>");
+        }
+
+        for (Iterator<String> it = contributors.iterator(); it.hasNext();)
+        {
+            sb.append("<dc:contributor>" + f(it.next()) + "</dc:contributor>");
+        }
+
+        for (Iterator<String> it = langs.iterator(); it.hasNext();)
+        {
+            sb.append("<dc:language>" + f(it.next()) + "</dc:language>");
+        }
+
+	    if (date == null)
+	    {
+		    date = DateFormat.getDateInstance().format(new Date());
+	    }
+
+        sb.append("<dc:date>" + f(date) + "</dc:date>");
+        sb.append("</rdf:Description></rdf:RDF>");
+        return sb.toString();
+    }
+
+    //
+    // 'metadata.contributor' option
+    //
+ 
+    private Set<String> contributors = new TreeSet<String>();
+
+    public void cfgContributor( ConfigurationValue cv, String name )
+    {
+        contributors.add( name );
+    }
+
+    public static ConfigurationInfo getContributorInfo()
+    {
+        return new ConfigurationInfo( 1, "name" )
+        {
+            public boolean isAdvanced()
+            {
+                return false;
+            }
+
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'metadata.creator' option
+    //
+ 
+    private Set<String> creators = new TreeSet<String>();
+
+    public void cfgCreator( ConfigurationValue cv, String name )
+    {
+        creators.add( name );
+    }
+
+    public static ConfigurationInfo getCreatorInfo()
+    {
+        return new ConfigurationInfo( 1, "name" )
+        {
+            public boolean isAdvanced()
+            {
+                return false;
+            }
+
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'metadata.date' option
+    //
+ 
+    public String date = null;
+    
+    public void cfgDate( ConfigurationValue cv, String text)
+    {
+        date = text;
+    }
+
+    public static ConfigurationInfo getDateInfo()
+    {
+        return new ConfigurationInfo( 1, "text" )
+        {
+            public boolean isAdvanced()
+            {
+                return false;
+            }
+        };
+    }
+
+    //
+    // 'metadata.description' option
+    //
+ 
+    private Map<String, String> localizedDescriptions = new HashMap<String, String>();
+
+    public void cfgDescription( ConfigurationValue cv, String text )
+    {
+        localizedDescriptions.put( "x-default", text );
+    }
+
+    public static ConfigurationInfo getDescriptionInfo()
+    {
+        return new ConfigurationInfo( 1, "text" )
+        {
+            public boolean isAdvanced()
+            {
+                return false;
+            }
+        };
+    }
+
+    //
+    // 'metadata.language' option
+    //
+ 
+    public TreeSet<String> langs = new TreeSet<String>();
+
+    public void cfgLanguage( ConfigurationValue cv, String code )
+    {
+        langs.add( code );
+    }
+
+    public static ConfigurationInfo getLanguageInfo()
+    {
+        return new ConfigurationInfo( 1, "code" )
+        {
+            public boolean isAdvanced()
+            {
+                return false;
+            }
+
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'metadata.localized-description' option
+    //
+ 
+    public void cfgLocalizedDescription( ConfigurationValue cv, String text, String lang )
+    {
+        localizedDescriptions.put( lang, text );
+    }
+
+    public static ConfigurationInfo getLocalizedDescriptionInfo()
+    {
+        return new ConfigurationInfo( 2, new String[] {"text", "lang"} )
+        {
+            public boolean isAdvanced()
+            {               
+			    return false;
+            }
+            
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'metadata.localized-title' option
+    //
+    
+   public void cfgLocalizedTitle( ConfigurationValue cv, String title, String lang )
+    {
+        localizedTitles.put( lang, title );
+    }
+
+    public static ConfigurationInfo getLocalizedTitleInfo()
+    {
+        return new ConfigurationInfo( 2, new String[] {"title", "lang"} )
+        {
+            public boolean isAdvanced()
+            {
+                return false;
+            }
+
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+        };
+    }
+
+    //
+    // 'metadata.publisher' option
+    //
+ 
+    private Set<String> publishers = new TreeSet<String>();
+
+    public void cfgPublisher( ConfigurationValue cv, String name )
+    {
+        publishers.add( name );
+    }
+
+    public static ConfigurationInfo getPublisherInfo()
+    {
+        return new ConfigurationInfo( 1, "name" )
+        {
+            public boolean isAdvanced()
+            {
+                return false;
+            }
+
+            public boolean allowMultiple()
+            {
+                return true;
+            }
+        };
+    }
+    //
+    // 'metadata.title' option
+    //
+    
+    private Map<String, String> localizedTitles = new HashMap<String, String>();
+
+    public void cfgTitle( ConfigurationValue cv, String title )
+    {
+        localizedTitles.put( "x-default", title );
+    }
+
+    public static ConfigurationInfo getTitleInfo()
+    {
+        return new ConfigurationInfo( 1, "text" )
+        {
+            public boolean isAdvanced()
+            {
+                return false;
+            }
+        };
+    }
+}