mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[RDCT] GTW-7343: Fix switching focus between project windows
IJ-MR-130153 GitOrigin-RevId: 19d90502bd6bb1737f6e3628887ecf49289c8930
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d809db3ec4
commit
1f4f9ed7aa
@@ -217,6 +217,10 @@ open class RecentProjectsManagerBase(coroutineScope: CoroutineScope) :
|
||||
|
||||
protected open fun getProjectDisplayName(project: Project): String? = null
|
||||
|
||||
protected open fun focusProjectWindow(project: Project) {
|
||||
ProjectUtil.focusProjectWindow(project = project)
|
||||
}
|
||||
|
||||
fun getProjectIcon(path: String, isProjectValid: Boolean): Icon {
|
||||
return projectIconHelper.getProjectIcon(path, isProjectValid)
|
||||
}
|
||||
@@ -312,7 +316,7 @@ open class RecentProjectsManagerBase(coroutineScope: CoroutineScope) :
|
||||
projectManager.openProjects.firstOrNull { isSameProject(projectFile = projectFile, project = it) }?.let { project ->
|
||||
FUSProjectHotStartUpMeasurer.reportAlreadyOpenedProject()
|
||||
withContext(Dispatchers.EDT) {
|
||||
ProjectUtil.focusProjectWindow(project = project)
|
||||
focusProjectWindow(project)
|
||||
}
|
||||
return project
|
||||
}
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
package com.intellij.openapi.wm.impl.welcomeScreen.recentProjects
|
||||
|
||||
import com.intellij.CommonBundle
|
||||
import com.intellij.codeWithMe.ClientId
|
||||
import com.intellij.ide.*
|
||||
import com.intellij.ide.impl.OpenProjectTask
|
||||
import com.intellij.ide.lightEdit.LightEdit
|
||||
@@ -60,7 +61,7 @@ internal data class RecentProjectItem(
|
||||
|
||||
companion object {
|
||||
fun openProjectAndLogRecent(file: Path, options: OpenProjectTask, projectGroup: ProjectGroup?) {
|
||||
service<CoreUiCoroutineScopeHolder>().coroutineScope.launch {
|
||||
service<CoreUiCoroutineScopeHolder>().coroutineScope.launch(ClientId.coroutineContext()) {
|
||||
RecentProjectsManagerBase.getInstanceEx().openProject(file, options)
|
||||
for (extension in ProjectDetector.EXTENSION_POINT_NAME.extensions) {
|
||||
extension.logRecentProjectOpened(projectGroup)
|
||||
|
||||
Reference in New Issue
Block a user