void ProjectContentComponent::openInIDE (int exporterIndex, bool saveFirst) { if (saveFirst) saveProject(); int i = 0; if (project != nullptr) for (Project::ExporterIterator exporter (*project); exporter.next();) if (exporter->canLaunchProject()) if (i++ == exporterIndex && exporter->launchProject()) break; }
void ProjectContentComponent::openInSelectedIDE (bool saveFirst) { if (project != nullptr) { if (auto* headerComp = dynamic_cast<HeaderComponent*> (header.get())) { auto selectedIDE = headerComp->getSelectedExporterName(); for (Project::ExporterIterator exporter (*project); exporter.next();) { if (exporter->canLaunchProject() && exporter->getName() == selectedIDE) { if (saveFirst && ! saveProject (exporter->isXcode())) return; exporter->launchProject(); break; } } } } }