mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +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,19 +23,12 @@ import org.jetbrains.concurrency.await
|
||||
|
||||
internal class WhatsNewAction : AnAction(), com.intellij.openapi.project.DumbAware {
|
||||
companion object {
|
||||
private val LOG = logger<WhatsNewAction>()
|
||||
internal const val PLACE = "WhatsNew"
|
||||
private const val REACTIONS_STATE = "whatsnew.reactions.state"
|
||||
private val reactionChecker = FUSReactionChecker(REACTIONS_STATE)
|
||||
|
||||
fun refresh() {
|
||||
reactionChecker.clearLikenessState()
|
||||
if (LOG.isTraceEnabled) {
|
||||
LOG.trace("EapWhatsNew reaction refresh")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val REACTIONS_STATE = "whatsnew.reactions.state"
|
||||
private val reactionChecker = FUSReactionChecker(REACTIONS_STATE)
|
||||
|
||||
private val hasWhatsNewContent by lazy {
|
||||
appScope.async {
|
||||
WhatsNewContent.hasWhatsNewContent()
|
||||
@@ -89,3 +82,5 @@ private fun Project.getScope() = this.service<ScopeProvider>().scope
|
||||
private class AppScopeProvider(val scope: CoroutineScope)
|
||||
private val appScope: CoroutineScope
|
||||
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)
|
||||
|
||||
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) {
|
||||
classLoader.getResourceAsStream(resourceName)
|
||||
}
|
||||
override suspend fun checkAvailability() = withContext(Dispatchers.IO) {
|
||||
override suspend fun checkAvailability(): Boolean = withContext(Dispatchers.IO) {
|
||||
classLoader.getResource(resourceName) != null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user