Search in sources :

Example 1 with JpsFlashRunnerParameters

use of com.intellij.flex.model.run.JpsFlashRunnerParameters in project intellij-plugins by JetBrains.

the class FlexBuildTargetType method computeAllTargets.

@NotNull
public List<FlexBuildTarget> computeAllTargets(@NotNull final JpsModel model) {
    final List<FlexBuildTarget> result = new ArrayList<>();
    final JpsProject project = model.getProject();
    for (JpsTypedRunConfiguration<JpsFlashRunnerParameters> runConfig : project.getRunConfigurations(JpsFlashRunConfigurationType.INSTANCE)) {
        ContainerUtilRt.addIfNotNull(result, FlexBuildTarget.create(project, runConfig.getType(), runConfig.getName()));
    }
    for (JpsTypedRunConfiguration<JpsFlexUnitRunnerParameters> runConfig : project.getRunConfigurations(JpsFlexUnitRunConfigurationType.INSTANCE)) {
        ContainerUtilRt.addIfNotNull(result, FlexBuildTarget.create(project, runConfig.getType(), runConfig.getName()));
    }
    for (JpsTypedModule<JpsFlexBuildConfigurationManager> module : project.getModules(JpsFlexModuleType.INSTANCE)) {
        for (JpsFlexBuildConfiguration bc : module.getProperties().getBuildConfigurations()) {
            result.add(FlexBuildTarget.create(bc, null));
            final BuildConfigurationNature nature = bc.getNature();
            if (nature.isApp() && (nature.isDesktopPlatform() || nature.isMobilePlatform())) {
                result.add(FlexBuildTarget.create(bc, Boolean.TRUE));
                result.add(FlexBuildTarget.create(bc, Boolean.FALSE));
            }
        }
    }
    return result;
}
Also used : BuildConfigurationNature(com.intellij.flex.model.bc.BuildConfigurationNature) JpsFlashRunnerParameters(com.intellij.flex.model.run.JpsFlashRunnerParameters) JpsFlexUnitRunnerParameters(com.intellij.flex.model.run.JpsFlexUnitRunnerParameters) JpsProject(org.jetbrains.jps.model.JpsProject) ArrayList(java.util.ArrayList) JpsFlexBuildConfiguration(com.intellij.flex.model.bc.JpsFlexBuildConfiguration) JpsFlexBuildConfigurationManager(com.intellij.flex.model.bc.JpsFlexBuildConfigurationManager) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

BuildConfigurationNature (com.intellij.flex.model.bc.BuildConfigurationNature)1 JpsFlexBuildConfiguration (com.intellij.flex.model.bc.JpsFlexBuildConfiguration)1 JpsFlexBuildConfigurationManager (com.intellij.flex.model.bc.JpsFlexBuildConfigurationManager)1 JpsFlashRunnerParameters (com.intellij.flex.model.run.JpsFlashRunnerParameters)1 JpsFlexUnitRunnerParameters (com.intellij.flex.model.run.JpsFlexUnitRunnerParameters)1 ArrayList (java.util.ArrayList)1 NotNull (org.jetbrains.annotations.NotNull)1 JpsProject (org.jetbrains.jps.model.JpsProject)1