mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
The process is described in `ModulesSdkConfigurator` doc. GitOrigin-RevId: 1a21824e488a2d799b229d7c8355b60b0b177809
39 lines
1.2 KiB
Kotlin
39 lines
1.2 KiB
Kotlin
package com.intellij.python.sdkConfigurator.common.impl
|
|
|
|
import com.intellij.platform.project.ProjectId
|
|
import com.intellij.platform.rpc.RemoteApiProviderService
|
|
import com.intellij.platform.rpc.topics.ProjectRemoteTopic
|
|
import fleet.rpc.RemoteApi
|
|
import fleet.rpc.Rpc
|
|
import fleet.rpc.remoteApiDescriptor
|
|
|
|
/**
|
|
* Front calls back
|
|
*/
|
|
@Rpc
|
|
interface SdkConfiguratorBackEndApi : RemoteApi<Unit> {
|
|
/***
|
|
* Configure SDK for all modules in [projectId] if their names in [onlyModules]
|
|
*/
|
|
suspend fun configureSdkForModules(projectId: ProjectId, onlyModules: Set<ModuleName>)
|
|
|
|
/**
|
|
* Ask user about modules, then call [configureSdkForModules]
|
|
*/
|
|
suspend fun configureAskingUser(projectId: ProjectId)
|
|
}
|
|
|
|
|
|
/**
|
|
* Ask user to choose from [ModulesDTO] and then call [SdkConfiguratorBackEndApi.configureSdkForModules]
|
|
*/
|
|
val SHOW_SDK_CONFIG_UI_TOPIC: ProjectRemoteTopic<ModulesDTO> = ProjectRemoteTopic("PySDKConfigurationUITopic", ModulesDTO.serializer())
|
|
|
|
/**
|
|
* Module to parent (workspace) or null if module doesn't have a parent (not a part of workspace)
|
|
*/
|
|
|
|
/**
|
|
* [SdkConfiguratorBackEndApi] instance
|
|
*/
|
|
suspend fun SdkConfiguratorBackEndApi(): SdkConfiguratorBackEndApi = RemoteApiProviderService.resolve(remoteApiDescriptor<SdkConfiguratorBackEndApi>()) |