[vision] adjust PyCharmWhatsNewInVisionContentProvider to a new refactoring

GitOrigin-RevId: 2bceba3d009ef36b075b7d648a805c529dfefe9e
This commit is contained in:
Vladimir.Koshelev
2025-07-29 17:47:14 +02:00
committed by intellij-monorepo-bot
parent 0e44407518
commit 0761e7c4f2

View File

@@ -8,9 +8,17 @@ import com.intellij.util.PlatformUtils.isCommunityEdition
class PyCharmWhatsNewInVisionContentProvider : WhatsNewInVisionContentProvider() {
override fun getResourceNameByPath(path: String): String {
return "whatsNew/$path"
}
override fun getResource(resourceName: String): ContentSource {
return ResourceContentSource(PyCharmWhatsNewInVisionContentProvider::class.java.classLoader, resourceName)
}
override fun getResource(): ContentSource {
// return a vision file for the current version
val resourceName = if (isCommunityEdition()) "whatsNew/pycharmCE2024.2.json" else "whatsNew/pycharm2024.2.json"
val resourceName = if (isCommunityEdition()) "whatsNew/pycharmCE2025.2.json" else "whatsNew/pycharm2025.2.json"
val resourceContentSource = ResourceContentSource(PyCharmWhatsNewInVisionContentProvider::class.java.classLoader, resourceName)
return resourceContentSource
}