mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-188586 toolbox: respect the 'canOpenProject' flag
GitOrigin-RevId: 8c10f150cb5447c8f27474cae5bbfd0ceb26a913
This commit is contained in:
committed by
intellij-monorepo-bot
parent
882cbc3160
commit
9d2efbcf02
+4
-1
@@ -38,7 +38,10 @@ class OpenSelectedProjectsAction : RecentProjectsWelcomeScreenActionBase() {
|
||||
}
|
||||
|
||||
if (ActionPlaces.WELCOME_SCREEN == event.place) {
|
||||
presentation.isEnabledAndVisible = items.all { item -> item is RecentProjectItem || item is ProjectsGroupItem || item is ProviderRecentProjectItem }
|
||||
presentation.isEnabledAndVisible = items.all { item ->
|
||||
item is RecentProjectItem || item is ProjectsGroupItem ||
|
||||
item is ProviderRecentProjectItem && item.canOpenProject()
|
||||
}
|
||||
when {
|
||||
items.size == 1 && items.first() is ProjectsGroupItem -> presentation.setText(
|
||||
IdeBundle.messagePointer("action.presentation.OpenSelectedProjectsAction.text.open.all.projects.in.group")
|
||||
|
||||
+4
@@ -158,6 +158,10 @@ internal data class ProviderRecentProjectItem(
|
||||
val progressText: String? get() = recentProject.status.progressText
|
||||
val additionalActions: List<AnAction> get() = recentProject.additionalActions
|
||||
|
||||
fun canOpenProject() : Boolean {
|
||||
return recentProject.canOpenProject()
|
||||
}
|
||||
|
||||
fun openProject(actionEvent: AnActionEvent) {
|
||||
recentProject.openProject(actionEvent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user