/** * @return unmodifiable map of the parent environment, that will be passed to the process if isPassParentEnvironment() == true */ @NotNull public Map<String, String> getParentEnvironment() { return PlatformUtils.isAppCode() ? System.getenv() // Temporarily fix for OC-8606 : EnvironmentUtil.getEnvironmentMap(); }
public static boolean isSmallIde(){ return !PlatformUtils.isIntelliJ(); } }
public boolean isAnyMissing() { if (!notEnabledPlugins.isEmpty()) { return true; } if (PlatformUtils.isIdeaUltimate()) { return !notInstalledPlugins.isEmpty(); } for (PluginId pluginId : notInstalledPlugins) { if (!ULTIMATE_EDITION_ONLY.contains(pluginId.getIdString())) { return true; } } return false; }
@Override public boolean isDiscountTargetGroup() { LicensingFacade licensingFacade = LicensingFacade.getInstance(); return licensingFacade == null || licensingFacade.isEvaluationLicense() || PlatformUtils.isIdeaCommunity(); }
@NotNull @VisibleForTesting IntelliJPlatform getCurrentPlatform() { return IntelliJPlatform.fromPrefix(PlatformUtils.getPlatformPrefix()); }
public boolean isPrimaryGenerator() { return PlatformUtils.isPhpStorm(); }
public void testGetSuitableModules_returnsAllModules_whenModulesHaveNoAppEngineFacet() { if (!PlatformUtils.isIdeaUltimate()) { return; } Project project = getProject(); ModuleType moduleType = JavaModuleType.getModuleType(); String path = project.getBaseDir().getPath(); createModuleAt("module1", project, moduleType, path); createModuleAt("module2", project, moduleType, path); createModuleAt("module3", project, moduleType, path); List<Module> suitableModules = getAction().getModulesWithoutAppEngineSupport(project); assertEquals(3, suitableModules.size()); }
if (!PlatformUtils.isIdeaCommunity()) { return ImmutableList.of();
/** * Returns {@code true} if usage tracking is available. Usage tracking is excluded from Android * Studio. */ @Override public boolean isUsageTrackingAvailable() { return !"AndroidStudio".equals(PlatformUtils.getPlatformPrefix()) && getAnalyticsProperty() != null; }
public void testGetSuitableModules_returns_noAEFacetsModules_whenSomeModulesHaveAEFacet() { if (!PlatformUtils.isIdeaUltimate()) { return; } Project project = getProject(); ModuleType moduleType = JavaModuleType.getModuleType(); String path = project.getBaseDir().getPath(); createModuleAt("module1", project, moduleType, path); Module module2 = createModuleAt("module2", project, moduleType, path); Module module3 = createModuleAt("module3", project, moduleType, path); new WriteAction() { @Override protected void run(@NotNull Result result) throws Throwable { FacetType appEngineStandardFacet = AppEngineStandardFacet.getFacetType(); FacetManager.getInstance(module2) .addFacet(appEngineStandardFacet, appEngineStandardFacet.getPresentableName(), null); FacetType appEngineFlexibleFacet = AppEngineFlexibleFacet.getFacetType(); FacetManager.getInstance(module3) .addFacet(appEngineFlexibleFacet, appEngineFlexibleFacet.getPresentableName(), null); } }.execute(); List<Module> suitableModules = getAction().getModulesWithoutAppEngineSupport(project); assertEquals(1, suitableModules.size()); assertEquals("module1", suitableModules.get(0).getName()); } }
module -> { AppEngineGradleModule appEngineGradleModule = moduleNameToModel.get(module.getName()); if (PlatformUtils.isIdeaCommunity()) { AppEngineStandardGradleModuleComponent gradleModuleComponent = AppEngineStandardGradleModuleComponent.getInstance(module);
/** @return true if running platform is not Android Studio. */ @Override public boolean canCreateConfigurable() { // For now we can hide Google entirely if usage tracking isn't available as there are no // other Google related account settings in the IJ UI. // Create a sub-menu item for the cloud SDK and hide the usage tracker if not available return !"AndroidStudio".equals(PlatformUtils.getPlatformPrefix()) && UsageTrackingManagementService.getInstance().isUsageTrackingAvailable(); } }
PropertiesComponent.getInstance(project).setValue(SHOW_UNLINKED_GRADLE_POPUP, false); if (PlatformUtils.isIdeaUltimate()) { indicator.setText(HybrisI18NBundleUtils.message("hybris.project.import.facets")); if (isPluginActive(SPRING_PLUGIN_ID)) {
@NotNull private String getFailureLandingPage() { IntelliJPlatform currentPlatform = IntelliJPlatform.fromPrefix(PlatformUtils.getPlatformPrefix()); if (currentPlatform == IntelliJPlatform.ANDROID_STUDIO) { return LandingPages.ANDROID_STUDIO.getFailurePage(); } return LandingPages.INTELLIJ.getFailurePage(); }
@NotNull private String getSuccessLandingPage() { IntelliJPlatform currentPlatform = IntelliJPlatform.fromPrefix(PlatformUtils.getPlatformPrefix()); if (currentPlatform == IntelliJPlatform.ANDROID_STUDIO) { return LandingPages.ANDROID_STUDIO.getSuccessPage(); } return LandingPages.INTELLIJ.getSuccessPage(); } }
/** * Constructs a usage tracker configured with analytics and plugin name configured from its * environment. */ public GoogleUsageTrackerService() { analyticsId = UsageTrackingManagementService.getInstance().getAnalyticsProperty(); PluginInfoService pluginInfo = ServiceManager.getService(PluginInfoService.class); externalPluginName = pluginInfo.getExternalPluginName(); userAgent = pluginInfo.getUserAgent(); String intellijPlatformName = PlatformUtils.getPlatformPrefix(); String intellijPlatformVersion = ApplicationInfo.getInstance().getStrictVersion(); String cloudToolsPluginVersion = pluginInfo.getPluginVersion(); Map<String, String> systemMetadataMap = ImmutableMap.of( PLATFORM_NAME_KEY, METADATA_ESCAPER.escape(intellijPlatformName), PLATFORM_VERSION_KEY, METADATA_ESCAPER.escape(intellijPlatformVersion), JDK_VERSION_KEY, METADATA_ESCAPER.escape(JDK_VERSION_VALUE), OPERATING_SYSTEM_KEY, METADATA_ESCAPER.escape(OPERATING_SYSTEM_VALUE), PLUGIN_VERSION_KEY, METADATA_ESCAPER.escape(cloudToolsPluginVersion)); systemMetadataKeyValues = METADATA_JOINER.join(systemMetadataMap); }