Minor: fix typo EventManger->EventManager

This commit is contained in:
Alexey Tsvetkov
2017-01-13 09:44:52 +03:00
parent 39b37b85e3
commit 7a29c00ec3
3 changed files with 12 additions and 12 deletions
@@ -73,11 +73,11 @@ interface CompilerSelector {
operator fun get(targetPlatform: CompileService.TargetPlatform): CLICompiler<*>
}
interface EventManger {
interface EventManager {
fun onCompilationFinished(f : () -> Unit)
}
private class EventMangerImpl : EventManger {
private class EventManagerImpl : EventManager {
private val onCompilationFinished = arrayListOf<() -> Unit>()
override fun onCompilationFinished(f: () -> Unit) {
@@ -659,12 +659,12 @@ class CompileServiceImpl(
compilerMessagesStreamProxy: RemoteOutputStream,
serviceOutputStreamProxy: RemoteOutputStream,
operationsTracer: RemoteOperationsTracer?,
body: (PrintStream, EventManger, Profiler) -> ExitCode): CompileService.CallResult<Int> =
body: (PrintStream, EventManager, Profiler) -> ExitCode): CompileService.CallResult<Int> =
ifAlive {
withValidClientOrSessionProxy(sessionId) { session ->
operationsTracer?.before("compile")
val rpcProfiler = if (daemonOptions.reportPerf) WallAndThreadTotalProfiler() else DummyProfiler()
val eventManger = EventMangerImpl()
val eventManger = EventManagerImpl()
val compilerMessagesStream = PrintStream(BufferedOutputStream(RemoteOutputStreamClient(compilerMessagesStreamProxy, rpcProfiler), REMOTE_STREAM_BUFFER_SIZE))
val serviceOutputStream = PrintStream(BufferedOutputStream(RemoteOutputStreamClient(serviceOutputStreamProxy, rpcProfiler), REMOTE_STREAM_BUFFER_SIZE))
try {
@@ -689,12 +689,12 @@ class CompileServiceImpl(
private fun doCompile(sessionId: Int,
daemonMessageReporter: DaemonMessageReporter,
tracer: RemoteOperationsTracer?,
body: (EventManger, Profiler) -> ExitCode): CompileService.CallResult<Int> =
body: (EventManager, Profiler) -> ExitCode): CompileService.CallResult<Int> =
ifAlive {
withValidClientOrSessionProxy(sessionId) { session ->
tracer?.before("compile")
val rpcProfiler = if (daemonOptions.reportPerf) WallAndThreadTotalProfiler() else DummyProfiler()
val eventManger = EventMangerImpl()
val eventManger = EventManagerImpl()
try {
val exitCode = checkedCompile(daemonMessageReporter, rpcProfiler) {
body(eventManger, rpcProfiler).code
@@ -708,10 +708,10 @@ class CompileServiceImpl(
}
}
private fun createCompileServices(facade: CompilerCallbackServicesFacade, eventManger: EventManger, rpcProfiler: Profiler): Services {
private fun createCompileServices(facade: CompilerCallbackServicesFacade, eventManager: EventManager, rpcProfiler: Profiler): Services {
val builder = Services.Builder()
if (facade.hasIncrementalCaches() || facade.hasLookupTracker()) {
builder.register(IncrementalCompilationComponents::class.java, RemoteIncrementalCompilationComponentsClient(facade, eventManger, rpcProfiler))
builder.register(IncrementalCompilationComponents::class.java, RemoteIncrementalCompilationComponentsClient(facade, eventManager, rpcProfiler))
}
if (facade.hasCompilationCanceledStatus()) {
builder.register(CompilationCanceledStatus::class.java, RemoteCompilationCanceledStatusClient(facade, rpcProfiler))
@@ -25,8 +25,8 @@ import org.jetbrains.kotlin.daemon.common.DummyProfiler
import org.jetbrains.kotlin.daemon.common.Profiler
class RemoteIncrementalCompilationComponentsClient(val facade: CompilerCallbackServicesFacade, eventManger: EventManger, val profiler: Profiler = DummyProfiler()) : IncrementalCompilationComponents {
val remoteLookupTrackerClient = RemoteLookupTrackerClient(facade, eventManger, profiler)
class RemoteIncrementalCompilationComponentsClient(val facade: CompilerCallbackServicesFacade, eventManager: EventManager, val profiler: Profiler = DummyProfiler()) : IncrementalCompilationComponents {
val remoteLookupTrackerClient = RemoteLookupTrackerClient(facade, eventManager, profiler)
override fun getIncrementalCache(target: TargetId): IncrementalCache = RemoteIncrementalCacheClient(facade, target, profiler)
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.incremental.components.Position
import org.jetbrains.kotlin.incremental.components.ScopeKind
class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, eventManger: EventManger, val profiler: Profiler = DummyProfiler()) : LookupTracker {
class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, eventManager: EventManager, val profiler: Profiler = DummyProfiler()) : LookupTracker {
private val isDoNothing = profiler.withMeasure(this) { facade.lookupTracker_isDoNothing() }
private val lookups = hashSetOf<LookupInfo>()
@@ -45,7 +45,7 @@ class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, even
}
init {
eventManger.onCompilationFinished { flush() }
eventManager.onCompilationFinished { flush() }
}
private fun flush() {