public static File getOrCreateConfigFile( final JpsFlexBuildConfiguration bc, final ProjectDescriptor projectDescriptor) throws IOException { final CompilerConfigGeneratorRt generator = new CompilerConfigGeneratorRt( bc, bc.getModule().getProperties().getModuleLevelCompilerOptions(), JpsFlexProjectLevelCompilerOptionsExtension.getProjectLevelCompilerOptions( bc.getModule().getProject()), projectDescriptor); String text = generator.generateConfigFileText(); if (bc.isTempBCForCompilation()) { final JpsFlexBuildConfiguration originalBC = bc.getModule().getProperties().findConfigurationByName(bc.getName()); final boolean makeExternalLibsMerged = FlexCommonUtils.isFlexUnitBC(bc) || (originalBC != null && originalBC.getOutputType() == OutputType.Library); final boolean makeIncludedLibsMerged = FlexCommonUtils.isRuntimeStyleSheetBC(bc); text = FlexCompilerConfigFileUtilBase.mergeWithCustomConfigFile( text, bc.getCompilerOptions().getAdditionalConfigFilePath(), makeExternalLibsMerged, makeIncludedLibsMerged); } final String name = getConfigFileName(bc, FlexCommonUtils.getBCSpecifier(bc)); return getOrCreateConfigFile(name, text); }
public void writeConfiguration(ProjectDescriptor pd, final PrintWriter out) { out.println("id: " + myId); out.println( JDOMUtil.writeElement(XmlSerializer.serialize(JpsFlexBCState.getState(myBC)), "\n")); final JpsFlexModuleOrProjectCompilerOptions moduleOptions = myBC.getModule().getProperties().getModuleLevelCompilerOptions(); out.println( JDOMUtil.writeElement( XmlSerializer.serialize(((JpsFlexCompilerOptionsImpl) moduleOptions).getState()), "\n")); final JpsFlexModuleOrProjectCompilerOptions projectOptions = JpsFlexProjectLevelCompilerOptionsExtension.getProjectLevelCompilerOptions( myBC.getModule().getProject()); out.println( JDOMUtil.writeElement( XmlSerializer.serialize(((JpsFlexCompilerOptionsImpl) projectOptions).getState()), "\n")); }