mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[devkit] IJPL-231755 Make AddComposeToIJModule action always visible in IntellIJ project
GitOrigin-RevId: cfcfb61bf1662e2faf67895349c91dc2e7072d56
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ca67f9d8f8
commit
b66ed5955f
@@ -36,11 +36,11 @@ internal class AddComposeToIJModuleAction : DumbAwareAction() {
|
||||
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT
|
||||
|
||||
override fun update(e: AnActionEvent) {
|
||||
val project = e.project
|
||||
val modules = e.getData(LangDataKeys.MODULE_CONTEXT_ARRAY)
|
||||
e.presentation.isEnabledAndVisible = project != null &&
|
||||
isIntelliJPlatformProject(project) &&
|
||||
!modules.isNullOrEmpty()
|
||||
val isRelevantProject = e.project?.let { isIntelliJPlatformProject(it) } ?: false
|
||||
|
||||
e.presentation.isVisible = isRelevantProject
|
||||
e.presentation.isEnabled = isRelevantProject && !modules.isNullOrEmpty()
|
||||
}
|
||||
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
|
||||
Reference in New Issue
Block a user