@@ -18,6 +18,7 @@ private typealias DAPExceptionBreakpointsFilter = org.eclipse.lsp4j.debug.Except
18
18
private typealias DAPCompletionItem = org.eclipse.lsp4j.debug.CompletionItem
19
19
private typealias DAPCompletionItemType = org.eclipse.lsp4j.debug.CompletionItemType
20
20
private typealias DAPExceptionDetails = org.eclipse.lsp4j.debug.ExceptionDetails
21
+ private typealias DAPThreadEventReason = org.eclipse.lsp4j.debug.ThreadEventArgumentsReason
21
22
private typealias InternalSource = org.javacs.ktda.core.Source
22
23
private typealias InternalSourceBreakpoint = org.javacs.ktda.core.breakpoint.SourceBreakpoint
23
24
private typealias InternalExceptionBreakpoint = org.javacs.ktda.core.breakpoint.ExceptionBreakpoint
@@ -26,6 +27,7 @@ private typealias InternalStackFrame = org.javacs.ktda.core.stack.StackFrame
26
27
private typealias InternalCompletionItem = org.javacs.ktda.core.completion.CompletionItem
27
28
private typealias InternalCompletionItemType = org.javacs.ktda.core.completion.CompletionItemType
28
29
private typealias InternalException = org.javacs.ktda.core.exception.DebuggeeException
30
+ private typealias InternalThreadEventReason = org.javacs.ktda.core.event.ThreadEventReason
29
31
30
32
/* *
31
33
* Handles conversions between debug adapter types
@@ -137,4 +139,9 @@ class DAPConverter(
137
139
stackTrace = internalException.stackTrace
138
140
innerException = internalException.innerException?.let (::toDAPExceptionDetails)?.let { arrayOf(it) }
139
141
}
142
+
143
+ fun toDAPThreadEventReason (reason : InternalThreadEventReason ): String = when (reason) {
144
+ InternalThreadEventReason .STARTED -> DAPThreadEventReason .STARTED
145
+ InternalThreadEventReason .STOPPED -> DAPThreadEventReason .EXITED
146
+ }
140
147
}
0 commit comments