QD-9246 Remove "Qodana" prefix, use "qodana.application" to define if Qodana is in headless run

GitOrigin-RevId: f56172ce17b5c3581df1249876d722716d57da46
This commit is contained in:
alexey.afanasiev
2024-06-06 00:54:55 +02:00
committed by intellij-monorepo-bot
parent b76e7618df
commit c672589e5e
5 changed files with 4 additions and 17 deletions

View File

@@ -77,13 +77,7 @@ internal class ModuleBasedProductLoadingStrategy(internal val moduleRepository:
zipFilePool: ZipFilePool,
mainClassLoader: ClassLoader,
): List<Deferred<IdeaPluginDescriptorImpl?>> {
val platformPrefixProperty = PlatformUtils.getPlatformPrefix()
val platformPrefix = if (platformPrefixProperty == PlatformUtils.QODANA_PREFIX) {
System.getProperty("idea.parent.prefix", PlatformUtils.IDEA_PREFIX)
}
else {
platformPrefixProperty
}
val platformPrefix = PlatformUtils.getPlatformPrefix()
val result = java.util.ArrayList<Deferred<IdeaPluginDescriptorImpl?>>()
val isInDevServerMode = AppMode.isDevServer()

View File

@@ -54,7 +54,7 @@ public final class ApplicationNamesInfo {
}
else {
// Gateway started from another IntelliJ-based IDE; same for Qodana
if (prefix.equals(PlatformUtils.GATEWAY_PREFIX) || prefix.equals(PlatformUtils.QODANA_PREFIX)) {
if (prefix.equals(PlatformUtils.GATEWAY_PREFIX) || "true".equals(System.getProperty("qodana.application"))) {
String customAppInfo = System.getProperty("idea.application.info.value");
if (customAppInfo != null) {
try {

View File

@@ -60,7 +60,6 @@ public final class PlatformUtils {
public static final String CWM_GUEST_PREFIX = "CodeWithMeGuest";
public static final String JETBRAINS_CLIENT_PREFIX = "JetBrainsClient";
public static final String GATEWAY_PREFIX = "Gateway";
public static final String QODANA_PREFIX = "Qodana";
@SuppressWarnings("SSBasedInspection") private static final Set<String> COMMERCIAL_EDITIONS = new HashSet<>(Arrays.asList(
IDEA_PREFIX, APPCODE_PREFIX, CLION_PREFIX, MOBILE_IDE_PREFIX, PYCHARM_PREFIX, DATASPELL_PREFIX, RUBY_PREFIX, PHP_PREFIX, WEB_PREFIX,

View File

@@ -550,13 +550,7 @@ internal fun CoroutineScope.loadPluginDescriptorsImpl(
customPluginDir: Path,
bundledPluginDir: Path?,
): List<Deferred<IdeaPluginDescriptorImpl?>> {
val platformPrefixProperty = PlatformUtils.getPlatformPrefix()
val platformPrefix = if (platformPrefixProperty == PlatformUtils.QODANA_PREFIX) {
System.getProperty("idea.parent.prefix", PlatformUtils.IDEA_PREFIX)
}
else {
platformPrefixProperty
}
val platformPrefix = PlatformUtils.getPlatformPrefix()
val result = ArrayList<Deferred<IdeaPluginDescriptorImpl?>>()
if (isUnitTestMode) {

View File

@@ -15,7 +15,7 @@ import org.jetbrains.annotations.VisibleForTesting
// If a plugin does not include any module dependency tags in its plugin.xml,
// it's assumed to be a legacy plugin and is loaded only in IntelliJ IDEA.
@ApiStatus.Internal
class PluginLoadingResult(private val checkModuleDependencies: Boolean = !PlatformUtils.isIntelliJ() && PlatformUtils.getPlatformPrefix() != PlatformUtils.QODANA_PREFIX) {
class PluginLoadingResult(private val checkModuleDependencies: Boolean = !PlatformUtils.isIntelliJ()) {
private val incompletePlugins = HashMap<PluginId, IdeaPluginDescriptorImpl>()
@JvmField