* for default platform.
* @return active {@link ScalaPlatform} or null if the project's platform
* is broken
*/
public static ScalaPlatform getActivePlatform (final String activePlatformId) {
final ScalaPlatformManager pm = ScalaPlatformManager.getDefault();
if (activePlatformId == null) {
return pm.getDefaultPlatform();
}
else {
ScalaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification ("std",null)); //NOI18N
for (int i=0; i<installedPlatforms.length; i++) {
String antName = (String) installedPlatforms[i].getProperties().get("scala.platform.ant.name"); //NOI18N
if (antName != null && antName.equals(activePlatformId)) {
return installedPlatforms[i];
}