override fun currentSessionChanged()

in src/main/kotlin/org/jetbrains/plugins/feature/suggester/listeners/DebuggerListener.kt [31:40]


    override fun currentSessionChanged(previousSession: XDebugSession?, currentSession: XDebugSession?) {
        if (previousSession != null && curSessionListener != null) {
            previousSession.removeSessionListener(curSessionListener!!)
            curSessionListener = null
        }
        if (currentSession != null) {
            curSessionListener = DebugSessionListener(currentSession)
            currentSession.addSessionListener(curSessionListener!!)
        }
    }