mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PlatformUtils - avoid ContainerUtil (and Trove lib) dependency
GitOrigin-RevId: 4f90822b7707e22d906988db7b195ff82e63966b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f5617d3c4a
commit
67e3801a6c
@@ -1,9 +1,10 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.util;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationInfo;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@@ -34,10 +35,10 @@ public final class PlatformUtils {
|
||||
public static final String RIDER_PREFIX = "Rider";
|
||||
public static final String GOIDE_PREFIX = "GoLand";
|
||||
|
||||
private static final Set<String> COMMERCIAL_EDITIONS = ContainerUtil.immutableSet(IDEA_PREFIX, APPCODE_PREFIX, CLION_PREFIX,
|
||||
PYCHARM_PREFIX, RUBY_PREFIX, PHP_PREFIX,
|
||||
WEB_PREFIX, DBE_PREFIX, RIDER_PREFIX,
|
||||
GOIDE_PREFIX);
|
||||
private static final Set<String> COMMERCIAL_EDITIONS = new HashSet<>(Arrays.asList(IDEA_PREFIX, APPCODE_PREFIX, CLION_PREFIX,
|
||||
PYCHARM_PREFIX, RUBY_PREFIX, PHP_PREFIX,
|
||||
WEB_PREFIX, DBE_PREFIX, RIDER_PREFIX,
|
||||
GOIDE_PREFIX));
|
||||
|
||||
public static String getPlatformPrefix() {
|
||||
return getPlatformPrefix(IDEA_PREFIX);
|
||||
@@ -46,10 +47,10 @@ public final class PlatformUtils {
|
||||
public static String getPlatformPrefix(String defaultPrefix) {
|
||||
return System.getProperty(PLATFORM_PREFIX_KEY, defaultPrefix);
|
||||
}
|
||||
|
||||
|
||||
public static void setDefaultPrefixForCE() {
|
||||
//IJ CE doesn't have prefix if we start IDE from the source code.
|
||||
//The proper fix is to set the prefix in all CE run configurations but for keeping compatibility set it indirectly
|
||||
// IJ CE doesn't have prefix if we start IDE from the source code.
|
||||
// The proper fix is to set the prefix in all CE run configurations but for keeping compatibility set it indirectly
|
||||
System.setProperty(PLATFORM_PREFIX_KEY, getPlatformPrefix(IDEA_CE_PREFIX));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user