mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[vision] adjust PyCharmWhatsNewInVisionContentProvider to a new refactoring
GitOrigin-RevId: 2bceba3d009ef36b075b7d648a805c529dfefe9e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0e44407518
commit
0761e7c4f2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user