mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix MockPsiProject constructor
GitOrigin-RevId: b9438f58db0cb12dbf3d8198dd523b809fc82d14
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2a03d4476c
commit
daadf87255
@@ -4,20 +4,17 @@ import com.intellij.ide.plugins.ContainerDescriptor
|
||||
import com.intellij.ide.plugins.IdeaPluginDescriptorImpl
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.application.Application
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.serviceContainer.PlatformComponentManagerImpl
|
||||
|
||||
class MockPsiProject(application: Application, parentDisposable: Disposable = application) : PlatformComponentManagerImpl(application), Project {
|
||||
class MockPsiProject(application: Application, parentDisposable: Disposable = application) : PlatformComponentManagerImpl(application as PlatformComponentManagerImpl), Project {
|
||||
init {
|
||||
Disposer.register(parentDisposable, this)
|
||||
myPicoContainer.registerComponentInstance(Project::class.java, this)
|
||||
}
|
||||
|
||||
constructor() : this(ApplicationManager.getApplication())
|
||||
|
||||
override fun getContainerDescriptor(pluginDescriptor: IdeaPluginDescriptorImpl): ContainerDescriptor =
|
||||
pluginDescriptor.project
|
||||
|
||||
|
||||
Reference in New Issue
Block a user