private static String computeID(final String kind) { String id = kind; for (int i = 0; getPlatformByID(id) != null; i++) { id = kind + '_' + i; } return id; }
/** Typically bundled JRuby. */ public static RubyPlatform getDefaultPlatform() { RubyPlatform defaultPlatform = RubyPlatformManager.getPlatformByID(PLATFORM_ID_DEFAULT); if (defaultPlatform == null) { LOGGER.fine("Default platform is not installed"); } return defaultPlatform; }
public static void preselectPlatform(final JComboBox platforms, final String preferencePlatformIDKey) { String lastPlatformID = RubyPreferences.getPreferences().get(preferencePlatformIDKey, null); if (lastPlatformID != null) { RubyPlatform platform = RubyPlatformManager.getPlatformByID(lastPlatformID); if (platform != null) { platforms.setSelectedItem(platform); } } }
private void refreshPlatformList() { if (platformsList.getModel().getSize() > 0) { platformsList.setSelectedIndex(0); if (lastSelectedPlatformID != null) { RubyPlatform lastPlaf = RubyPlatformManager.getPlatformByID(lastSelectedPlatformID); if (lastPlaf != null) { platformsList.setSelectedValue(lastPlaf, true); } } } refreshPlatform(); }
public static RubyPlatform getPlatform(String id) { ensurePlatformsReady(); RubyPlatform platform = id == null ? RubyPlatformManager.getDefaultPlatform() : RubyPlatformManager.getPlatformByID(id); if (platform == null) { platform = RubyPlatformManager.getDefaultPlatform(); if (LOGGED_WARNINGS.get(id) == null) { LOGGER.info("Platform with id '" + id + "' does not exist. Using default platform."); LOGGED_WARNINGS.put(id, Boolean.TRUE); } } return platform; }
activePlatformID = def.get(RubyProjectProperties.PLATFORM_ACTIVE); platforms.setSelectedItem(RubyPlatformManager.getPlatformByID(activePlatformID));
activePlatformID = def.get(RailsProjectProperties.PLATFORM_ACTIVE); platforms.setSelectedItem(RubyPlatformManager.getPlatformByID(activePlatformID));