mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[rd debugger] IJPL-233101 Pass executionId to FE so that the tab reuse works as expected
GitOrigin-RevId: 77ef862cdf4b30a72405cbcee4cbc5f52500539f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e9c7d989d4
commit
a46fdb746f
@@ -21,6 +21,7 @@ import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@Serializable
|
||||
data class ExecutionEnvironmentProxyDto(
|
||||
val executionId: Long,
|
||||
val runProfileName: @NlsSafe String,
|
||||
val runConfigurationTypeId: String,
|
||||
val environmentContentToReuseDescriptorId: RunContentDescriptorIdImpl?,
|
||||
@@ -44,6 +45,7 @@ fun ExecutionEnvironment.toDto(cs: CoroutineScope): ExecutionEnvironmentProxyDto
|
||||
}
|
||||
}
|
||||
return ExecutionEnvironmentProxyDto(
|
||||
environment.executionId,
|
||||
proxy.getRunProfileName(), proxy.getRunConfigurationTypeId(),
|
||||
environment.contentToReuse?.id as RunContentDescriptorIdImpl?,
|
||||
proxy.getIcon().rpcId(), proxy.getRerunIcon().rpcId(),
|
||||
|
||||
+11
-6
@@ -357,12 +357,6 @@ class FrontendXDebuggerSession(
|
||||
proxy.onTabInitialized(this)
|
||||
}
|
||||
}
|
||||
|
||||
tabScope.launch(Dispatchers.EDT) {
|
||||
tabInfo.showTab.await()
|
||||
tab.showTab()
|
||||
}
|
||||
|
||||
val runContentDescriptor = tab.runContentDescriptor
|
||||
if (runContentDescriptor == null) {
|
||||
onTabClosed()
|
||||
@@ -372,6 +366,17 @@ class FrontendXDebuggerSession(
|
||||
runContentDescriptor.coroutineScope.awaitCancellationAndInvoke {
|
||||
onTabClosed()
|
||||
}
|
||||
|
||||
val executionEnvDto = tabInfo.executionEnvironmentProxyDto
|
||||
if (executionEnvDto != null) {
|
||||
runContentDescriptor.executionId = executionEnvDto.executionId
|
||||
}
|
||||
|
||||
tabScope.launch(Dispatchers.EDT) {
|
||||
tabInfo.showTab.await()
|
||||
tab.showTab()
|
||||
}
|
||||
|
||||
// don't subscribe on additional tabs if we have [ExecutionEnvironment] (it means this is Monolith)
|
||||
if (tabInfo.executionEnvironmentProxyDto?.executionEnvironment == null) {
|
||||
subscribeOnAdditionalTabs(tabScope, tab, tabInfo.additionalTabsComponentManagerId)
|
||||
|
||||
Reference in New Issue
Block a user