mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
GTW-9908 IJPL-165684 Re-register a client session for every created default project because it may be disposed by a timer
(cherry picked from commit b78bb4f36796b094bc9b67e6bc7ccccc70092aad) IJ-CR-148844 GitOrigin-RevId: 1f20d22b8dcfd717c3cd876b119545205e9f0672
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ff519b67c6
commit
20fcc76547
@@ -29,6 +29,7 @@ import com.intellij.serviceContainer.ComponentManagerImpl
|
||||
import com.intellij.serviceContainer.coroutineScopeMethodType
|
||||
import com.intellij.serviceContainer.emptyConstructorMethodType
|
||||
import com.intellij.serviceContainer.findConstructorOrNull
|
||||
import com.intellij.util.application
|
||||
import com.intellij.util.messages.MessageBus
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import org.jetbrains.annotations.NonNls
|
||||
@@ -57,6 +58,7 @@ internal class DefaultProject : UserDataHolderBase(), Project, ComponentManagerE
|
||||
|
||||
public override fun init(project: Project) {
|
||||
(project as DefaultProjectImpl).init()
|
||||
application.messageBus.syncPublisher(DefaultProjectListener.TOPIC).defaultProjectImplCreated(project)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.project.impl
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.util.messages.Topic
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Internal
|
||||
interface DefaultProjectListener {
|
||||
companion object {
|
||||
val TOPIC: Topic<DefaultProjectListener> = Topic(DefaultProjectListener::class.java)
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun defaultProjectImplCreated(defaultProject: Project) {}
|
||||
}
|
||||
Reference in New Issue
Block a user