Search in sources :

Example 1 with ModifiableDependencyEntry

use of com.intellij.lang.javascript.flex.projectStructure.model.ModifiableDependencyEntry in project intellij-plugins by JetBrains.

the class FlexUnitRunnerParameters method checkAndGetModuleAndBC.

public Pair<Module, FlexBuildConfiguration> checkAndGetModuleAndBC(final Project project) throws RuntimeConfigurationError {
    final Pair<Module, FlexBuildConfiguration> moduleAndBC = super.checkAndGetModuleAndBC(project);
    doCheck(project, moduleAndBC);
    final ModifiableFlexBuildConfiguration overriddenBC = Factory.getTemporaryCopyForCompilation(moduleAndBC.second);
    overriddenBC.setOutputType(OutputType.Application);
    overriddenBC.setMainClass(FlexCommonUtils.FLEX_UNIT_LAUNCHER);
    overriddenBC.setOutputFileName("_flexunit.swf");
    overriddenBC.setOutputFolder(VfsUtilCore.urlToPath(CompilerModuleExtension.getInstance(moduleAndBC.first).getCompilerOutputUrlForTests()));
    overriddenBC.setUseHtmlWrapper(false);
    overriddenBC.setRLMs(Collections.emptyList());
    overriddenBC.setCssFilesToCompile(Collections.emptyList());
    overriddenBC.setSkipCompile(false);
    overriddenBC.getDependencies().setFrameworkLinkage(LinkageType.Merged);
    for (ModifiableDependencyEntry entry : overriddenBC.getDependencies().getModifiableEntries()) {
        if (entry.getDependencyType().getLinkageType() == LinkageType.External) {
            entry.getDependencyType().setLinkageType(LinkageType.Merged);
        }
    }
    return Pair.create(moduleAndBC.first, ((FlexBuildConfiguration) overriddenBC));
}
Also used : FlexBuildConfiguration(com.intellij.lang.javascript.flex.projectStructure.model.FlexBuildConfiguration) ModifiableFlexBuildConfiguration(com.intellij.lang.javascript.flex.projectStructure.model.ModifiableFlexBuildConfiguration) ModifiableDependencyEntry(com.intellij.lang.javascript.flex.projectStructure.model.ModifiableDependencyEntry) Module(com.intellij.openapi.module.Module) ModifiableFlexBuildConfiguration(com.intellij.lang.javascript.flex.projectStructure.model.ModifiableFlexBuildConfiguration)

Aggregations

FlexBuildConfiguration (com.intellij.lang.javascript.flex.projectStructure.model.FlexBuildConfiguration)1 ModifiableDependencyEntry (com.intellij.lang.javascript.flex.projectStructure.model.ModifiableDependencyEntry)1 ModifiableFlexBuildConfiguration (com.intellij.lang.javascript.flex.projectStructure.model.ModifiableFlexBuildConfiguration)1 Module (com.intellij.openapi.module.Module)1