mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
What's New: code & warning cleanup
(cherry picked from commit 2d6cc4600e3548e856d6d7327ce37706fbec2971) GitOrigin-RevId: f71d90b69e19c44aaa14b9a1e17355fc82503fb9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4ca8a2cfb8
commit
613b7dbb14
@@ -23,18 +23,11 @@ import org.jetbrains.concurrency.await
|
|||||||
|
|
||||||
internal class WhatsNewAction : AnAction(), com.intellij.openapi.project.DumbAware {
|
internal class WhatsNewAction : AnAction(), com.intellij.openapi.project.DumbAware {
|
||||||
companion object {
|
companion object {
|
||||||
private val LOG = logger<WhatsNewAction>()
|
|
||||||
internal const val PLACE = "WhatsNew"
|
internal const val PLACE = "WhatsNew"
|
||||||
private const val REACTIONS_STATE = "whatsnew.reactions.state"
|
}
|
||||||
private val reactionChecker = FUSReactionChecker(REACTIONS_STATE)
|
|
||||||
|
|
||||||
fun refresh() {
|
private val REACTIONS_STATE = "whatsnew.reactions.state"
|
||||||
reactionChecker.clearLikenessState()
|
private val reactionChecker = FUSReactionChecker(REACTIONS_STATE)
|
||||||
if (LOG.isTraceEnabled) {
|
|
||||||
LOG.trace("EapWhatsNew reaction refresh")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private val hasWhatsNewContent by lazy {
|
private val hasWhatsNewContent by lazy {
|
||||||
appScope.async {
|
appScope.async {
|
||||||
@@ -89,3 +82,5 @@ private fun Project.getScope() = this.service<ScopeProvider>().scope
|
|||||||
private class AppScopeProvider(val scope: CoroutineScope)
|
private class AppScopeProvider(val scope: CoroutineScope)
|
||||||
private val appScope: CoroutineScope
|
private val appScope: CoroutineScope
|
||||||
get() = service<AppScopeProvider>().scope
|
get() = service<AppScopeProvider>().scope
|
||||||
|
|
||||||
|
private val LOG = logger<WhatsNewAction>()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
@file:OptIn(ExperimentalSerializationApi::class)
|
@file:OptIn(ExperimentalSerializationApi::class)
|
||||||
|
|
||||||
package com.intellij.platform.whatsNew
|
package com.intellij.platform.whatsNew
|
||||||
@@ -100,7 +100,7 @@ class ResourceContentSource(private val classLoader: ClassLoader, private val re
|
|||||||
override suspend fun openStream(): InputStream? = withContext(Dispatchers.IO) {
|
override suspend fun openStream(): InputStream? = withContext(Dispatchers.IO) {
|
||||||
classLoader.getResourceAsStream(resourceName)
|
classLoader.getResourceAsStream(resourceName)
|
||||||
}
|
}
|
||||||
override suspend fun checkAvailability() = withContext(Dispatchers.IO) {
|
override suspend fun checkAvailability(): Boolean = withContext(Dispatchers.IO) {
|
||||||
classLoader.getResource(resourceName) != null
|
classLoader.getResource(resourceName) != null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user