mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[run dashboard] IJPL-208298 Respect configuration statuses on project reopening
GitOrigin-RevId: 88d21f97eeb2fc63c1b63140ef5922678d32a4bc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
941e5c1764
commit
bde5fe7446
@@ -51,9 +51,12 @@ internal class BackendRunDashboardManagerState(private val project: Project) {
|
||||
sharedSettings.value = RunDashboardSettingsDto(openRunningConfigInTab)
|
||||
}
|
||||
|
||||
fun fireStatusUpdated(backendService: RunDashboardService) {
|
||||
sharedStatuses.tryEmit(ServiceStatusDto(backendService.uuid,
|
||||
RunDashboardRunConfigurationStatus.getStatus(backendService.descriptor).id))
|
||||
fun fireStatusUpdated(backendService: RunDashboardService, persistedStatus: RunDashboardRunConfigurationStatus?) {
|
||||
val effectiveStatus = when {
|
||||
backendService.descriptor == null && persistedStatus != null -> persistedStatus
|
||||
else -> RunDashboardRunConfigurationStatus.getStatus(backendService.descriptor)
|
||||
}
|
||||
sharedStatuses.tryEmit(ServiceStatusDto(backendService.uuid, effectiveStatus.id))
|
||||
}
|
||||
|
||||
fun getStatuses(): Flow<ServiceStatusDto> {
|
||||
|
||||
@@ -485,7 +485,7 @@ public final class RunDashboardManagerImpl implements RunDashboardManager, Persi
|
||||
@Override
|
||||
public void updateDashboard(boolean withStructure) {
|
||||
for (RunDashboardService backendService : getRunConfigurations()) {
|
||||
mySharedState.fireStatusUpdated(backendService);
|
||||
mySharedState.fireStatusUpdated(backendService, getPersistedStatus(backendService.getConfigurationSettings().getConfiguration()));
|
||||
|
||||
var applicableCustomizers = getCustomizers(backendService.getConfigurationSettings(), backendService.getDescriptor());
|
||||
if (applicableCustomizers.isEmpty()) continue;
|
||||
|
||||
Reference in New Issue
Block a user