Fix remote repl state facade

This commit is contained in:
Ilya Chernikov
2017-02-07 12:50:39 +01:00
parent b23911fd59
commit 75234701c7
5 changed files with 17 additions and 9 deletions
@@ -68,8 +68,8 @@ open class KotlinRemoteReplCompilerClient(
RemoteReplCompilerState(compileService.replCreateState(sessionId).get(), lock)
override fun check(state: IReplStageState<*>, codeLine: ReplCodeLine): ReplCheckResult =
compileService.replCheck(sessionId, state.asState(RemoteReplCompilerState::class.java).replStateFacade.id, codeLine).get()
compileService.replCheck(sessionId, state.asState(RemoteReplCompilerState::class.java).replStateFacade.getId(), codeLine).get()
override fun compile(state: IReplStageState<*>, codeLine: ReplCodeLine): ReplCompileResult =
compileService.replCompile(sessionId, state.asState(RemoteReplCompilerState::class.java).replStateFacade.id, codeLine).get()
compileService.replCompile(sessionId, state.asState(RemoteReplCompilerState::class.java).replStateFacade.getId(), codeLine).get()
}
@@ -25,7 +25,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock
// TODO: verify that locla lock doesn't lead to any synch problems
class RemoteReplCompilerStateHistory(private val state: RemoteReplCompilerState) : IReplStageHistory<Unit>, AbstractList<ReplHistoryRecord<Unit>>() {
override val size: Int
get() = state.replStateFacade.historySize
get() = state.replStateFacade.getHistorySize()
override fun get(index: Int): ReplHistoryRecord<Unit> = ReplHistoryRecord(state.replStateFacade.historyGet(index), Unit)