@@ -18,6 +18,7 @@ private typealias DAPExceptionBreakpointsFilter = org.eclipse.lsp4j.debug.Except
1818private typealias DAPCompletionItem = org.eclipse.lsp4j.debug.CompletionItem
1919private typealias DAPCompletionItemType = org.eclipse.lsp4j.debug.CompletionItemType
2020private typealias DAPExceptionDetails = org.eclipse.lsp4j.debug.ExceptionDetails
21+ private typealias DAPThreadEventReason = org.eclipse.lsp4j.debug.ThreadEventArgumentsReason
2122private typealias InternalSource = org.javacs.ktda.core.Source
2223private typealias InternalSourceBreakpoint = org.javacs.ktda.core.breakpoint.SourceBreakpoint
2324private typealias InternalExceptionBreakpoint = org.javacs.ktda.core.breakpoint.ExceptionBreakpoint
@@ -26,6 +27,7 @@ private typealias InternalStackFrame = org.javacs.ktda.core.stack.StackFrame
2627private typealias InternalCompletionItem = org.javacs.ktda.core.completion.CompletionItem
2728private typealias InternalCompletionItemType = org.javacs.ktda.core.completion.CompletionItemType
2829private typealias InternalException = org.javacs.ktda.core.exception.DebuggeeException
30+ private typealias InternalThreadEventReason = org.javacs.ktda.core.event.ThreadEventReason
2931
3032/* *
3133 * Handles conversions between debug adapter types
@@ -137,4 +139,9 @@ class DAPConverter(
137139 stackTrace = internalException.stackTrace
138140 innerException = internalException.innerException?.let (::toDAPExceptionDetails)?.let { arrayOf(it) }
139141 }
142+
143+ fun toDAPThreadEventReason (reason : InternalThreadEventReason ): String = when (reason) {
144+ InternalThreadEventReason .STARTED -> DAPThreadEventReason .STARTED
145+ InternalThreadEventReason .STOPPED -> DAPThreadEventReason .EXITED
146+ }
140147}
0 commit comments