use of com.intellij.flex.model.bc.JpsFlexBuildConfigurationManager 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;
}
use of com.intellij.flex.model.bc.JpsFlexBuildConfigurationManager in project intellij-plugins by JetBrains.
the class JpsFlexModuleType method createModulePropertiesSerializer.
public static JpsModulePropertiesSerializer<JpsFlexBuildConfigurationManager> createModulePropertiesSerializer() {
return new JpsModulePropertiesSerializer<JpsFlexBuildConfigurationManager>(INSTANCE, ID, "FlexBuildConfigurationManager") {
@Override
public JpsFlexBuildConfigurationManager loadProperties(@Nullable final Element componentElement) {
final JpsFlexBuildConfigurationManagerImpl manager = new JpsFlexBuildConfigurationManagerImpl();
manager.loadState(XmlSerializer.deserialize(componentElement, JpsFlexBuildConfigurationManagerImpl.State.class));
return manager;
}
@Override
public void saveProperties(@NotNull final JpsFlexBuildConfigurationManager manager, @NotNull final Element componentElement) {
final JpsFlexBuildConfigurationManagerImpl.State state = ((JpsFlexBuildConfigurationManagerImpl) manager).getState();
XmlSerializer.serializeInto(state, componentElement);
}
};
}
Aggregations