Revert "Add knowledge about eap-1.3 channel to plugin (KT-25414)"
It's decided to migrate to scheme with two predefined channels:
`eap` and `eap-next`.
This reverts commit 4f1f1e6
This commit is contained in:
@@ -25,16 +25,15 @@ class KotlinUpdatesSettingsConfigurable : SearchableConfigurable, Configurable.N
|
||||
it.startsWith("https://plugins.jetbrains.com/plugins/") &&
|
||||
(it.endsWith("/6954") || it.endsWith(KotlinPluginUtil.KOTLIN_PLUGIN_ID.idString))
|
||||
}
|
||||
|
||||
EAPChannels.values().find { it.uiIndex == channel }?.let { eapChannel ->
|
||||
hosts.add(eapChannel.url)
|
||||
when (channel) {
|
||||
EAPChannels.EAP_1_3.uiIndex -> hosts.add(EAPChannels.EAP_1_3.url)
|
||||
EAPChannels.EAP_1_2.uiIndex -> hosts.add(EAPChannels.EAP_1_2.url)
|
||||
}
|
||||
}
|
||||
|
||||
enum class EAPChannels(val url: String, val uiIndex: Int) {
|
||||
EAP_1_2("https://plugins.jetbrains.com/plugins/eap-1.2/${KotlinPluginUtil.KOTLIN_PLUGIN_ID.idString}", 1),
|
||||
EAP_1_3("https://plugins.jetbrains.com/plugins/eap-1.3/${KotlinPluginUtil.KOTLIN_PLUGIN_ID.idString}", 2),
|
||||
EAP_NEXT("https://plugins.jetbrains.com/plugins/eap-next/${KotlinPluginUtil.KOTLIN_PLUGIN_ID.idString}", 3);
|
||||
EAP_1_3("https://plugins.jetbrains.com/plugins/eap-next/${KotlinPluginUtil.KOTLIN_PLUGIN_ID.idString}", 2);
|
||||
|
||||
private val hasChannel: Boolean get() = url in UpdateSettings.getInstance().pluginHosts
|
||||
|
||||
@@ -111,12 +110,7 @@ class KotlinUpdatesSettingsConfigurable : SearchableConfigurable, Configurable.N
|
||||
}
|
||||
}
|
||||
|
||||
savedChannel = EAPChannels.values().asSequence()
|
||||
.map { eapChannel -> eapChannel.indexIfAvailable() }
|
||||
.filterNotNull()
|
||||
.firstOrNull()
|
||||
?: 0
|
||||
|
||||
savedChannel = EAPChannels.EAP_1_3.indexIfAvailable() ?: EAPChannels.EAP_1_2.indexIfAvailable() ?: 0
|
||||
form.channelCombo.selectedIndex = savedChannel
|
||||
|
||||
form.channelCombo.addActionListener {
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
<item value="Stable"/>
|
||||
<item value="Early Access Preview 1.2.x"/>
|
||||
<item value="Early Access Preview 1.3"/>
|
||||
<item value="Early Access Preview (Next)"/>
|
||||
</model>
|
||||
</properties>
|
||||
</component>
|
||||
|
||||
Reference in New Issue
Block a user