private synchronized RubyPlatform getPlatform() { if (platform == null) { platform = platformProvider.getPlatform(); } return platform; }
public RubyPlatform getPlatform() { String id = evaluator.getProperty("platform.active"); // NOI18N return getPlatform(id); }
/** * Tries to find a {@link RubyPlatform platform} for a given project. Might * return <tt>null</tt>. */ @CheckForNull public static RubyPlatform platformFor(final Project project) { RubyPlatformProvider rpp = project.getLookup().lookup(RubyPlatformProvider.class); RubyPlatform result = rpp == null ? null : rpp.getPlatform(); if (result == null && LOGGER.isLoggable(Level.FINE)) { LOGGER.fine("Could not resolve a platform for " + project + ". " + "Platform provider: " + rpp); } return result; }
private GemManager getGemManager() { // TODO: cache it(?) return new RubyPlatformProvider(evaluator).getPlatform().getGemManager(); }
@Override public void propertyChange(PropertyChangeEvent evt) { if ((evt.getSource() == RubyInstallation.getInstance() && evt.getPropertyName().equals("roots")) || evt.getSource() == RubyPreferences.getInstance() && evt.getPropertyName().equals(RubyPreferences.VENDOR_GEMS_PROPERTY)) { resetCache(); } if (evt.getPropertyName().equals(SharedRubyProjectProperties.PLATFORM_ACTIVE)) { platform = RubyPlatformProvider.getPlatform((String) evt.getNewValue()); resetCache(); } if (evt.getPropertyName().equals(RequiredGems.REQUIRED_GEMS_TESTS_PROPERTY) && forTests) { requiredGems.setRequiredGems((String) evt.getNewValue()); resetCache(); } if (evt.getPropertyName().equals(RequiredGems.REQUIRED_GEMS_PROPERTY) && !forTests) { requiredGems.setRequiredGems((String) evt.getNewValue()); resetCache(); } }
RubyPlatform platform = new RubyPlatformProvider(evaluator).getPlatform(); if (platform == null) { LOGGER.severe("Cannot resolve platform for project");