[stats] API cleanup: remove deprecated API (IDEA-271555)

GitOrigin-RevId: 1ba5c507efd5668cdf364aa49ddf193286edbd57
This commit is contained in:
Nikolay Chashnikov
2021-09-10 19:21:22 +03:00
committed by intellij-monorepo-bot
parent 840b28f16e
commit cfdbb375a6
3 changed files with 0 additions and 93 deletions

View File

@@ -1,51 +0,0 @@
// 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.completion.settings;
import com.intellij.stats.completion.sender.SenderPreloadingActivityKt;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
* @deprecated Use {@link com.intellij.completion.ml.settings.CompletionMLRankingSettings} instead.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
public final class CompletionMLRankingSettings {
private static final CompletionMLRankingSettings instance = new CompletionMLRankingSettings();
private final com.intellij.completion.ml.settings.CompletionMLRankingSettings actualInstance =
com.intellij.completion.ml.settings.CompletionMLRankingSettings.getInstance();
@NotNull
public static CompletionMLRankingSettings getInstance() {
return instance;
}
public boolean isRankingEnabled() {
return actualInstance.isRankingEnabled();
}
public void setRankingEnabled(boolean value) {
actualInstance.setRankingEnabled(value);
}
public boolean isLanguageEnabled(@NotNull String rankerId) {
return actualInstance.isLanguageEnabled(rankerId);
}
public void setLanguageEnabled(@NotNull String rankerId, boolean isEnabled) {
actualInstance.setLanguageEnabled(rankerId, isEnabled);
}
public boolean isShowDiffEnabled() {
return actualInstance.isShowDiffEnabled();
}
public void setShowDiffEnabled(boolean isEnabled) {
actualInstance.setShowDiffEnabled(isEnabled);
}
public boolean isCompletionLogsSendAllowed() {
return SenderPreloadingActivityKt.isCompletionLogsSendAllowed();
}
}

View File

@@ -1,16 +0,0 @@
// 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.stats.experiment
import com.intellij.lang.Language
import org.jetbrains.annotations.ApiStatus
@Deprecated("Left for compatibility. Will be removed in future release.")
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
class EmulatedExperiment {
companion object {
fun shouldRank(language: Language, experimentVersion: Int): Boolean = false
fun isInsideExperiment(experimentVersion: Int): Boolean = false
}
fun emulate(experimentVersion: Int, performExperiment: Boolean, salt: String): Int? = null
}

View File

@@ -1,26 +0,0 @@
// 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.stats.experiment
import org.jetbrains.annotations.ApiStatus
@Deprecated("Left for compatibility. Will be removed in future release.")
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
interface WebServiceStatus {
companion object {
private val fakeWebServiceStatus = object : WebServiceStatus {
override fun isServerOk(): Boolean = false
override fun dataServerUrl(): String = ""
override fun isExperimentOnCurrentIDE(): Boolean = false
override fun experimentVersion(): Int = 2
override fun updateStatus() = Unit
}
fun getInstance() = fakeWebServiceStatus
}
fun isServerOk(): Boolean
fun dataServerUrl(): String
fun isExperimentOnCurrentIDE(): Boolean
fun experimentVersion(): Int
fun updateStatus()
}