File tree 3 files changed +3
-6
lines changed
3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
[versions ]
2
- toolbox-plugin-api = " 0.3 "
2
+ toolbox-plugin-api = " 0.6.2.6.0.37447 "
3
3
kotlin = " 2.0.10"
4
4
coroutines = " 1.7.3"
5
5
serialization = " 1.5.0"
Original file line number Diff line number Diff line change 1
1
package toolbox.gateway.sample
2
2
3
- import com.jetbrains.toolbox.api.core.ServiceLocator
4
3
import com.jetbrains.toolbox.api.remoteDev.AbstractRemoteProviderEnvironment
5
4
import com.jetbrains.toolbox.api.remoteDev.EnvironmentVisibilityState
6
5
import com.jetbrains.toolbox.api.remoteDev.environments.EnvironmentContentsView
7
- import com.jetbrains.toolbox.api.ui.observables.ObservablePropertiesFactory
8
6
import java.util.concurrent.CompletableFuture
9
7
10
8
class SampleRemoteEnvironment (
11
- serviceLocator : ServiceLocator ,
12
9
private val environment : EnvironmentDTO
13
- ) : AbstractRemoteProviderEnvironment(serviceLocator.getService( ObservablePropertiesFactory ::class.java) ) {
10
+ ) : AbstractRemoteProviderEnvironment() {
14
11
override fun getId (): String = environment.id
15
12
override fun getName (): String = environment.name
16
13
override fun getContentsView (): CompletableFuture <EnvironmentContentsView > {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class SampleRemoteProvider(
48
48
""" .trimIndent()
49
49
val dto = Json .decodeFromString(EnvironmentsDTO .serializer(), body)
50
50
try {
51
- consumer.consumeEnvironments(dto.environments.map { SampleRemoteEnvironment (serviceLocator, it) })
51
+ consumer.consumeEnvironments(dto.environments.map { SampleRemoteEnvironment (it) }, true )
52
52
} catch (_: CancellationException ) {
53
53
logger.debug(" Environments update cancelled" )
54
54
break
You can’t perform that action at this time.
0 commit comments