From 59f3f44663ebe038abbf0dc0fdeaa226943edf97 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Wed, 18 Jun 2025 14:31:45 +0200 Subject: [PATCH 01/57] Initial commit --- .gitignore | 3 + README.md | 8 + adapter/Python/README.md | 3 + adapter/Python/dependency-reduced-pom.xml | 74 + adapter/Python/pom.xml | 83 + adapter/Python/properties.json | 565 ++ adapter/Python/properties_gen.sh | 18 + .../monitor/adapter/python/Breakpoint.java | 7 + .../adapter/python/BreakpointHandler.java | 7 + .../monitor/adapter/python/DebugpyClient.java | 340 ++ .../monitor/adapter/python/MessageMapper.java | 26 + .../adapter/python/PyEvalExBuilder.java | 18 + .../monitor/adapter/python/PythonAdapter.java | 187 + .../python/dap/AttachRequestArguments.java | 111 + .../adapter/python/dap/Breakpoint.java | 490 ++ .../python/dap/BreakpointLocation.java | 201 + .../dap/BreakpointLocationsArguments.java | 238 + .../adapter/python/dap/CancelArguments.java | 142 + .../adapter/python/dap/Capabilities.java | 1287 +++++ .../monitor/adapter/python/dap/Checksum.java | 192 + .../adapter/python/dap/ColumnDescriptor.java | 287 + .../adapter/python/dap/CompletionItem.java | 421 ++ .../python/dap/CompletionsArguments.java | 204 + .../adapter/python/dap/Configuration.java | 73 + .../dap/ConfigurationDoneArguments.java | 73 + .../adapter/python/dap/ContinueArguments.java | 139 + .../monitor/adapter/python/dap/DAPEvent.java | 4 + .../adapter/python/dap/DAPRequest.java | 4 + .../adapter/python/dap/DAPResponse.java | 5 + .../adapter/python/dap/DataBreakpoint.java | 253 + .../dap/DataBreakpointInfoArguments.java | 173 + .../adapter/python/dap/DebugProtocol.java | 4569 ++++++++++++++++ .../python/dap/DisassembleArguments.java | 238 + .../python/dap/DisassembledInstruction.java | 449 ++ .../python/dap/DisconnectArguments.java | 179 + .../use/monitor/adapter/python/dap/Env.java | 73 + .../adapter/python/dap/EvaluateArguments.java | 201 + .../dap/ExceptionBreakpointsFilter.java | 266 + .../adapter/python/dap/ExceptionDetails.java | 262 + .../python/dap/ExceptionFilterOptions.java | 142 + .../python/dap/ExceptionInfoArguments.java | 108 + .../adapter/python/dap/ExceptionOptions.java | 156 + .../python/dap/ExceptionPathSegment.java | 142 + .../python/dap/FunctionBreakpoint.java | 179 + .../adapter/python/dap/GotoArguments.java | 142 + .../adapter/python/dap/GotoTarget.java | 301 ++ .../python/dap/GotoTargetsArguments.java | 176 + .../dap/InitializeRequestArguments.java | 573 ++ .../python/dap/InstructionBreakpoint.java | 216 + .../python/dap/LaunchRequestArguments.java | 142 + .../python/dap/LoadedSourcesArguments.java | 73 + .../monitor/adapter/python/dap/Message.java | 300 ++ .../monitor/adapter/python/dap/Module.java | 396 ++ .../adapter/python/dap/ModulesArguments.java | 136 + .../adapter/python/dap/NextArguments.java | 219 + .../adapter/python/dap/PauseArguments.java | 108 + .../adapter/python/dap/ProtocolMessage.java | 144 + .../python/dap/ReadMemoryArguments.java | 173 + .../adapter/python/dap/RestartArguments.java | 105 + .../python/dap/RestartFrameArguments.java | 108 + .../python/dap/ReverseContinueArguments.java | 139 + .../dap/RunInTerminalRequestArguments.java | 316 ++ .../use/monitor/adapter/python/dap/Scope.java | 433 ++ .../adapter/python/dap/ScopesArguments.java | 108 + .../python/dap/SetBreakpointsArguments.java | 206 + .../dap/SetDataBreakpointsArguments.java | 110 + .../dap/SetExceptionBreakpointsArguments.java | 175 + .../python/dap/SetExpressionArguments.java | 204 + .../dap/SetFunctionBreakpointsArguments.java | 110 + .../SetInstructionBreakpointsArguments.java | 110 + .../python/dap/SetVariableArguments.java | 207 + .../monitor/adapter/python/dap/Source.java | 393 ++ .../adapter/python/dap/SourceArguments.java | 145 + .../adapter/python/dap/SourceBreakpoint.java | 253 + .../adapter/python/dap/StackFrame.java | 486 ++ .../python/dap/StackTraceArguments.java | 188 + .../dap/StartDebuggingRequestArguments.java | 190 + .../adapter/python/dap/StepBackArguments.java | 170 + .../adapter/python/dap/StepInArguments.java | 201 + .../adapter/python/dap/StepInTarget.java | 266 + .../python/dap/StepInTargetsArguments.java | 108 + .../adapter/python/dap/StepOutArguments.java | 170 + .../python/dap/TerminateArguments.java | 105 + .../python/dap/TerminateThreadsArguments.java | 107 + .../monitor/adapter/python/dap/Thread.java | 142 + .../adapter/python/dap/ValueFormat.java | 105 + .../monitor/adapter/python/dap/Variable.java | 394 ++ .../python/dap/VariablePresentationHint.java | 206 + .../monitor/adapter/python/dap/Variables.java | 73 + .../python/dap/VariablesArguments.java | 286 + .../python/dap/WriteMemoryArguments.java | 207 + .../adapter/python/tmp/AttachRequest.java | 114 + .../adapter/python/tmp/AttachResponse.java | 9 + .../adapter/python/tmp/BreakpointEvent.java | 6 + .../adapter/python/tmp/Capabilities.java | 381 ++ .../adapter/python/tmp/DAPMessage.java | 45 + .../adapter/python/tmp/EvaluateArguments.java | 31 + .../adapter/python/tmp/EvaluateRequest.java | 27 + .../use/monitor/adapter/python/tmp/Event.java | 58 + .../adapter/python/tmp/InitializeRequest.java | 207 + .../python/tmp/InitializeResponse.java | 37 + .../adapter/python/tmp/InitializedEvent.java | 12 + .../monitor/adapter/python/tmp/Request.java | 32 + .../monitor/adapter/python/tmp/Response.java | 70 + .../monitor/adapter/python/tmp/Thread.java | 22 + .../adapter/python/tmp/ThreadsResponse.java | 34 + .../plugins/monitor/vm/mm/python/PyBase.java | 17 + .../plugins/monitor/vm/mm/python/PyField.java | 51 + .../monitor/vm/mm/python/PyFieldRaw.java | 37 + .../monitor/vm/mm/python/PyMethod.java | 49 + .../monitor/vm/mm/python/PyMethodRaw.java | 42 + .../monitor/vm/mm/python/PyObject.java | 63 + .../monitor/vm/mm/python/PyObjectRaw.java | 13 + .../plugins/monitor/vm/mm/python/PyType.java | 76 + .../monitor/vm/mm/python/PyTypeRaw.java | 38 + .../resources/protocol/debugProtocol.json | 4753 +++++++++++++++++ monitor/pom.xml | 77 + .../monitor/AbstractMonitorStateListener.java | 0 .../use/plugins/monitor/AdapterRegistry.java | 32 +- .../monitor/IdentifierMappingHelper.java | 0 .../tzi/use/plugins/monitor/LogListener.java | 0 .../use/plugins/monitor/ModelBreakpoint.java | 0 .../org/tzi/use/plugins/monitor/Monitor.java | 2 +- .../use/plugins/monitor/MonitorException.java | 0 .../use/plugins/monitor/MonitorPlugin.java | 0 .../plugins/monitor/MonitorStateListener.java | 0 .../tzi/use/plugins/monitor/ProgressArgs.java | 0 .../use/plugins/monitor/ProgressListener.java | 0 .../monitor/cmd/AbstractMonitorCmd.java | 0 .../plugins/monitor/cmd/EndMonitorCmd.java | 0 .../plugins/monitor/cmd/PauseMonitorCmd.java | 0 .../plugins/monitor/cmd/ResumeMonitorCmd.java | 0 .../plugins/monitor/cmd/StartMonitorCmd.java | 44 +- .../monitor/gui/ActionShowMonitorControl.java | 0 .../monitor/gui/MonitorControlView.java | 0 .../monitor/vm/adapter/AbstractVMAdapter.java | 0 .../adapter/InvalidAdapterConfiguration.java | 0 .../monitor/vm/adapter/VMAccessException.java | 0 .../plugins/monitor/vm/adapter/VMAdapter.java | 0 .../monitor/vm/adapter/VMAdapterSetting.java | 0 .../monitor/vm/adapter/jvm/JVMAdapter.java | 2 + .../use/plugins/monitor/vm/mm/VMField.java | 0 .../plugins/monitor/vm/mm/VMIdentifiable.java | 0 .../use/plugins/monitor/vm/mm/VMMethod.java | 0 .../plugins/monitor/vm/mm/VMMethodCall.java | 0 .../use/plugins/monitor/vm/mm/VMObject.java | 0 .../tzi/use/plugins/monitor/vm/mm/VMType.java | 0 .../use/plugins/monitor/vm/mm/VMValue.java | 0 .../plugins/monitor/vm/mm/impl/VMBase.java | 0 .../monitor/vm/mm/impl/VMFieldImpl.java | 0 .../plugins/monitor/vm/mm/jvm/JVMBase.java | 0 .../plugins/monitor/vm/mm/jvm/JVMField.java | 0 .../plugins/monitor/vm/mm/jvm/JVMMethod.java | 0 .../monitor/vm/mm/jvm/JVMMethodCall.java | 0 .../plugins/monitor/vm/mm/jvm/JVMObject.java | 0 .../plugins/monitor/vm/mm/jvm/JVMType.java | 0 .../{ => src/main}/resources/Attributes.gif | Bin .../{ => src/main}/resources/MAssociation.gif | Bin monitor/{ => src/main}/resources/MClass.gif | Bin monitor/{ => src/main}/resources/Monitor.png | Bin .../{ => src/main}/resources/Operations.gif | Bin monitor/{ => src/main}/resources/pause.png | Bin monitor/{ => src/main}/resources/play.png | Bin monitor/{ => src/main}/resources/stop.png | Bin pom.xml | 46 + 165 files changed, 28612 insertions(+), 40 deletions(-) create mode 100644 .gitignore create mode 100644 adapter/Python/README.md create mode 100644 adapter/Python/dependency-reduced-pom.xml create mode 100644 adapter/Python/pom.xml create mode 100644 adapter/Python/properties.json create mode 100755 adapter/Python/properties_gen.sh create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Breakpoint.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Breakpoint.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocation.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Capabilities.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Checksum.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ColumnDescriptor.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItem.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Configuration.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpoint.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DebugProtocol.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstruction.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Env.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakpointsFilter.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionDetails.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionFilterOptions.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionOptions.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionPathSegment.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/FunctionBreakpoint.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTarget.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InstructionBreakpoint.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Message.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Module.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProtocolMessage.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Scope.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTarget.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Thread.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ValueFormat.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variables.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachRequest.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachResponse.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/BreakpointEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Capabilities.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/DAPMessage.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateRequest.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Event.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeRequest.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeResponse.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializedEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Request.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Response.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Thread.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/ThreadsResponse.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyBase.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java create mode 100644 adapter/Python/src/main/resources/protocol/debugProtocol.json create mode 100644 monitor/pom.xml rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/AbstractMonitorStateListener.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/AdapterRegistry.java (74%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/IdentifierMappingHelper.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/LogListener.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/ModelBreakpoint.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/Monitor.java (96%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/MonitorException.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/MonitorPlugin.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/MonitorStateListener.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/ProgressArgs.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/ProgressListener.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/cmd/AbstractMonitorCmd.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/cmd/EndMonitorCmd.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/cmd/PauseMonitorCmd.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/cmd/ResumeMonitorCmd.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/cmd/StartMonitorCmd.java (55%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/gui/ActionShowMonitorControl.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/gui/MonitorControlView.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/adapter/AbstractVMAdapter.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/adapter/InvalidAdapterConfiguration.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/adapter/VMAccessException.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/adapter/VMAdapter.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/adapter/VMAdapterSetting.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/adapter/jvm/JVMAdapter.java (97%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/VMField.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/VMIdentifiable.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/VMMethod.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/VMMethodCall.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/VMObject.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/VMType.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/VMValue.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/impl/VMBase.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/impl/VMFieldImpl.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMBase.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMField.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethod.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethodCall.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMObject.java (100%) rename monitor/src/{ => main/java}/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMType.java (100%) rename monitor/{ => src/main}/resources/Attributes.gif (100%) rename monitor/{ => src/main}/resources/MAssociation.gif (100%) rename monitor/{ => src/main}/resources/MClass.gif (100%) rename monitor/{ => src/main}/resources/Monitor.png (100%) rename monitor/{ => src/main}/resources/Operations.gif (100%) rename monitor/{ => src/main}/resources/pause.png (100%) rename monitor/{ => src/main}/resources/play.png (100%) rename monitor/{ => src/main}/resources/stop.png (100%) create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f83e8cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +target +*.iml diff --git a/README.md b/README.md index b092564..b54d925 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ ## USE Monitor The USE monitor allows for monitoring running applications and to verify the applications behave as defined in a USE model. + +### Requirements + +Add the following vm argument to the `use` start script: + +``` +--add-exports=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED +``` diff --git a/adapter/Python/README.md b/adapter/Python/README.md new file mode 100644 index 0000000..545d564 --- /dev/null +++ b/adapter/Python/README.md @@ -0,0 +1,3 @@ +# Python Adapter + +> `jsonschema2pojo` does not resolve definitions unless they are referenced in a schema's properties. diff --git a/adapter/Python/dependency-reduced-pom.xml b/adapter/Python/dependency-reduced-pom.xml new file mode 100644 index 0000000..45a1a16 --- /dev/null +++ b/adapter/Python/dependency-reduced-pom.xml @@ -0,0 +1,74 @@ + + + + plugin_monitor + org.tzi.use + 1.0-SNAPSHOT + ../../pom.xml + + 4.0.0 + MonitorAdapter_Python + 1.0-SNAPSHOT + + + + maven-jar-plugin + 3.2.2 + + + maven-shade-plugin + 3.5.0 + + + package + + shade + + + + + + org.jsonschema2pojo + jsonschema2pojo-maven-plugin + 1.2.2 + + + + generate + + + + + ${basedir}/src/main/resources/protocol/debugProtocol.json + org.tzi.use.monitor.adapter.python.dap + + + + + + + org.tzi.use + use-core + 7.1.1 + provided + + + org.tzi.use + use-gui + 7.1.1 + provided + + + org.tzi.use + monitor + 1.0-SNAPSHOT + provided + + + lablib-checkboxtree + it.cnr.imaa.essi + + + + + diff --git a/adapter/Python/pom.xml b/adapter/Python/pom.xml new file mode 100644 index 0000000..310e93e --- /dev/null +++ b/adapter/Python/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + + + org.tzi.use + plugin_monitor + 1.0-SNAPSHOT + ../../pom.xml + + + MonitorAdapter_Python + 1.0-SNAPSHOT + + + + org.tzi.use + use-core + + + org.tzi.use + use-gui + + + org.tzi.use + monitor + + + com.fasterxml.jackson.core + jackson-annotations + 2.19.0 + compile + + + com.fasterxml.jackson.core + jackson-databind + 2.19.0 + compile + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + org.apache.maven.plugins + maven-shade-plugin + 3.5.0 + + + package + + shade + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/adapter/Python/properties.json b/adapter/Python/properties.json new file mode 100644 index 0000000..b309b59 --- /dev/null +++ b/adapter/Python/properties.json @@ -0,0 +1,565 @@ +{ + "properties": { + "AttachRequest": { + "$ref": "#/definitions/AttachRequest" + }, + "AttachRequestArguments": { + "$ref": "#/definitions/AttachRequestArguments" + }, + "AttachResponse": { + "$ref": "#/definitions/AttachResponse" + }, + "Breakpoint": { + "$ref": "#/definitions/Breakpoint" + }, + "BreakpointEvent": { + "$ref": "#/definitions/BreakpointEvent" + }, + "BreakpointLocation": { + "$ref": "#/definitions/BreakpointLocation" + }, + "BreakpointLocationsArguments": { + "$ref": "#/definitions/BreakpointLocationsArguments" + }, + "BreakpointLocationsRequest": { + "$ref": "#/definitions/BreakpointLocationsRequest" + }, + "BreakpointLocationsResponse": { + "$ref": "#/definitions/BreakpointLocationsResponse" + }, + "CancelArguments": { + "$ref": "#/definitions/CancelArguments" + }, + "CancelRequest": { + "$ref": "#/definitions/CancelRequest" + }, + "CancelResponse": { + "$ref": "#/definitions/CancelResponse" + }, + "Capabilities": { + "$ref": "#/definitions/Capabilities" + }, + "CapabilitiesEvent": { + "$ref": "#/definitions/CapabilitiesEvent" + }, + "Checksum": { + "$ref": "#/definitions/Checksum" + }, + "ChecksumAlgorithm": { + "$ref": "#/definitions/ChecksumAlgorithm" + }, + "ColumnDescriptor": { + "$ref": "#/definitions/ColumnDescriptor" + }, + "CompletionItem": { + "$ref": "#/definitions/CompletionItem" + }, + "CompletionItemType": { + "$ref": "#/definitions/CompletionItemType" + }, + "CompletionsArguments": { + "$ref": "#/definitions/CompletionsArguments" + }, + "CompletionsRequest": { + "$ref": "#/definitions/CompletionsRequest" + }, + "CompletionsResponse": { + "$ref": "#/definitions/CompletionsResponse" + }, + "ConfigurationDoneArguments": { + "$ref": "#/definitions/ConfigurationDoneArguments" + }, + "ConfigurationDoneRequest": { + "$ref": "#/definitions/ConfigurationDoneRequest" + }, + "ConfigurationDoneResponse": { + "$ref": "#/definitions/ConfigurationDoneResponse" + }, + "ContinueArguments": { + "$ref": "#/definitions/ContinueArguments" + }, + "ContinueRequest": { + "$ref": "#/definitions/ContinueRequest" + }, + "ContinueResponse": { + "$ref": "#/definitions/ContinueResponse" + }, + "ContinuedEvent": { + "$ref": "#/definitions/ContinuedEvent" + }, + "DataBreakpoint": { + "$ref": "#/definitions/DataBreakpoint" + }, + "DataBreakpointAccessType": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "DataBreakpointInfoArguments": { + "$ref": "#/definitions/DataBreakpointInfoArguments" + }, + "DataBreakpointInfoRequest": { + "$ref": "#/definitions/DataBreakpointInfoRequest" + }, + "DataBreakpointInfoResponse": { + "$ref": "#/definitions/DataBreakpointInfoResponse" + }, + "DisassembleArguments": { + "$ref": "#/definitions/DisassembleArguments" + }, + "DisassembleRequest": { + "$ref": "#/definitions/DisassembleRequest" + }, + "DisassembleResponse": { + "$ref": "#/definitions/DisassembleResponse" + }, + "DisassembledInstruction": { + "$ref": "#/definitions/DisassembledInstruction" + }, + "DisconnectArguments": { + "$ref": "#/definitions/DisconnectArguments" + }, + "DisconnectRequest": { + "$ref": "#/definitions/DisconnectRequest" + }, + "DisconnectResponse": { + "$ref": "#/definitions/DisconnectResponse" + }, + "ErrorResponse": { + "$ref": "#/definitions/ErrorResponse" + }, + "EvaluateArguments": { + "$ref": "#/definitions/EvaluateArguments" + }, + "EvaluateRequest": { + "$ref": "#/definitions/EvaluateRequest" + }, + "EvaluateResponse": { + "$ref": "#/definitions/EvaluateResponse" + }, + "Event": { + "$ref": "#/definitions/Event" + }, + "ExceptionBreakMode": { + "$ref": "#/definitions/ExceptionBreakMode" + }, + "ExceptionBreakpointsFilter": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" + }, + "ExceptionDetails": { + "$ref": "#/definitions/ExceptionDetails" + }, + "ExceptionFilterOptions": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "ExceptionInfoArguments": { + "$ref": "#/definitions/ExceptionInfoArguments" + }, + "ExceptionInfoRequest": { + "$ref": "#/definitions/ExceptionInfoRequest" + }, + "ExceptionInfoResponse": { + "$ref": "#/definitions/ExceptionInfoResponse" + }, + "ExceptionOptions": { + "$ref": "#/definitions/ExceptionOptions" + }, + "ExceptionPathSegment": { + "$ref": "#/definitions/ExceptionPathSegment" + }, + "ExitedEvent": { + "$ref": "#/definitions/ExitedEvent" + }, + "FunctionBreakpoint": { + "$ref": "#/definitions/FunctionBreakpoint" + }, + "GotoArguments": { + "$ref": "#/definitions/GotoArguments" + }, + "GotoRequest": { + "$ref": "#/definitions/GotoRequest" + }, + "GotoResponse": { + "$ref": "#/definitions/GotoResponse" + }, + "GotoTarget": { + "$ref": "#/definitions/GotoTarget" + }, + "GotoTargetsArguments": { + "$ref": "#/definitions/GotoTargetsArguments" + }, + "GotoTargetsRequest": { + "$ref": "#/definitions/GotoTargetsRequest" + }, + "GotoTargetsResponse": { + "$ref": "#/definitions/GotoTargetsResponse" + }, + "InitializeRequest": { + "$ref": "#/definitions/InitializeRequest" + }, + "InitializeRequestArguments": { + "$ref": "#/definitions/InitializeRequestArguments" + }, + "InitializeResponse": { + "$ref": "#/definitions/InitializeResponse" + }, + "InitializedEvent": { + "$ref": "#/definitions/InitializedEvent" + }, + "InstructionBreakpoint": { + "$ref": "#/definitions/InstructionBreakpoint" + }, + "InvalidatedAreas": { + "$ref": "#/definitions/InvalidatedAreas" + }, + "InvalidatedEvent": { + "$ref": "#/definitions/InvalidatedEvent" + }, + "LaunchRequest": { + "$ref": "#/definitions/LaunchRequest" + }, + "LaunchRequestArguments": { + "$ref": "#/definitions/LaunchRequestArguments" + }, + "LaunchResponse": { + "$ref": "#/definitions/LaunchResponse" + }, + "LoadedSourceEvent": { + "$ref": "#/definitions/LoadedSourceEvent" + }, + "LoadedSourcesArguments": { + "$ref": "#/definitions/LoadedSourcesArguments" + }, + "LoadedSourcesRequest": { + "$ref": "#/definitions/LoadedSourcesRequest" + }, + "LoadedSourcesResponse": { + "$ref": "#/definitions/LoadedSourcesResponse" + }, + "MemoryEvent": { + "$ref": "#/definitions/MemoryEvent" + }, + "Message": { + "$ref": "#/definitions/Message" + }, + "Module": { + "$ref": "#/definitions/Module" + }, + "ModuleEvent": { + "$ref": "#/definitions/ModuleEvent" + }, + "ModulesArguments": { + "$ref": "#/definitions/ModulesArguments" + }, + "ModulesRequest": { + "$ref": "#/definitions/ModulesRequest" + }, + "ModulesResponse": { + "$ref": "#/definitions/ModulesResponse" + }, + "NextArguments": { + "$ref": "#/definitions/NextArguments" + }, + "NextRequest": { + "$ref": "#/definitions/NextRequest" + }, + "NextResponse": { + "$ref": "#/definitions/NextResponse" + }, + "OutputEvent": { + "$ref": "#/definitions/OutputEvent" + }, + "PauseArguments": { + "$ref": "#/definitions/PauseArguments" + }, + "PauseRequest": { + "$ref": "#/definitions/PauseRequest" + }, + "PauseResponse": { + "$ref": "#/definitions/PauseResponse" + }, + "ProcessEvent": { + "$ref": "#/definitions/ProcessEvent" + }, + "ProgressEndEvent": { + "$ref": "#/definitions/ProgressEndEvent" + }, + "ProgressStartEvent": { + "$ref": "#/definitions/ProgressStartEvent" + }, + "ProgressUpdateEvent": { + "$ref": "#/definitions/ProgressUpdateEvent" + }, + "ProtocolMessage": { + "$ref": "#/definitions/ProtocolMessage" + }, + "ReadMemoryArguments": { + "$ref": "#/definitions/ReadMemoryArguments" + }, + "ReadMemoryRequest": { + "$ref": "#/definitions/ReadMemoryRequest" + }, + "ReadMemoryResponse": { + "$ref": "#/definitions/ReadMemoryResponse" + }, + "Request": { + "$ref": "#/definitions/Request" + }, + "Response": { + "$ref": "#/definitions/Response" + }, + "RestartArguments": { + "$ref": "#/definitions/RestartArguments" + }, + "RestartFrameArguments": { + "$ref": "#/definitions/RestartFrameArguments" + }, + "RestartFrameRequest": { + "$ref": "#/definitions/RestartFrameRequest" + }, + "RestartFrameResponse": { + "$ref": "#/definitions/RestartFrameResponse" + }, + "RestartRequest": { + "$ref": "#/definitions/RestartRequest" + }, + "RestartResponse": { + "$ref": "#/definitions/RestartResponse" + }, + "ReverseContinueArguments": { + "$ref": "#/definitions/ReverseContinueArguments" + }, + "ReverseContinueRequest": { + "$ref": "#/definitions/ReverseContinueRequest" + }, + "ReverseContinueResponse": { + "$ref": "#/definitions/ReverseContinueResponse" + }, + "RunInTerminalRequest": { + "$ref": "#/definitions/RunInTerminalRequest" + }, + "RunInTerminalRequestArguments": { + "$ref": "#/definitions/RunInTerminalRequestArguments" + }, + "RunInTerminalResponse": { + "$ref": "#/definitions/RunInTerminalResponse" + }, + "Scope": { + "$ref": "#/definitions/Scope" + }, + "ScopesArguments": { + "$ref": "#/definitions/ScopesArguments" + }, + "ScopesRequest": { + "$ref": "#/definitions/ScopesRequest" + }, + "ScopesResponse": { + "$ref": "#/definitions/ScopesResponse" + }, + "SetBreakpointsArguments": { + "$ref": "#/definitions/SetBreakpointsArguments" + }, + "SetBreakpointsRequest": { + "$ref": "#/definitions/SetBreakpointsRequest" + }, + "SetBreakpointsResponse": { + "$ref": "#/definitions/SetBreakpointsResponse" + }, + "SetDataBreakpointsArguments": { + "$ref": "#/definitions/SetDataBreakpointsArguments" + }, + "SetDataBreakpointsRequest": { + "$ref": "#/definitions/SetDataBreakpointsRequest" + }, + "SetDataBreakpointsResponse": { + "$ref": "#/definitions/SetDataBreakpointsResponse" + }, + "SetExceptionBreakpointsArguments": { + "$ref": "#/definitions/SetExceptionBreakpointsArguments" + }, + "SetExceptionBreakpointsRequest": { + "$ref": "#/definitions/SetExceptionBreakpointsRequest" + }, + "SetExceptionBreakpointsResponse": { + "$ref": "#/definitions/SetExceptionBreakpointsResponse" + }, + "SetExpressionArguments": { + "$ref": "#/definitions/SetExpressionArguments" + }, + "SetExpressionRequest": { + "$ref": "#/definitions/SetExpressionRequest" + }, + "SetExpressionResponse": { + "$ref": "#/definitions/SetExpressionResponse" + }, + "SetFunctionBreakpointsArguments": { + "$ref": "#/definitions/SetFunctionBreakpointsArguments" + }, + "SetFunctionBreakpointsRequest": { + "$ref": "#/definitions/SetFunctionBreakpointsRequest" + }, + "SetFunctionBreakpointsResponse": { + "$ref": "#/definitions/SetFunctionBreakpointsResponse" + }, + "SetInstructionBreakpointsArguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" + }, + "SetInstructionBreakpointsRequest": { + "$ref": "#/definitions/SetInstructionBreakpointsRequest" + }, + "SetInstructionBreakpointsResponse": { + "$ref": "#/definitions/SetInstructionBreakpointsResponse" + }, + "SetVariableArguments": { + "$ref": "#/definitions/SetVariableArguments" + }, + "SetVariableRequest": { + "$ref": "#/definitions/SetVariableRequest" + }, + "SetVariableResponse": { + "$ref": "#/definitions/SetVariableResponse" + }, + "Source": { + "$ref": "#/definitions/Source" + }, + "SourceArguments": { + "$ref": "#/definitions/SourceArguments" + }, + "SourceBreakpoint": { + "$ref": "#/definitions/SourceBreakpoint" + }, + "SourceRequest": { + "$ref": "#/definitions/SourceRequest" + }, + "SourceResponse": { + "$ref": "#/definitions/SourceResponse" + }, + "StackFrame": { + "$ref": "#/definitions/StackFrame" + }, + "StackFrameFormat": { + "$ref": "#/definitions/StackFrameFormat" + }, + "StackTraceArguments": { + "$ref": "#/definitions/StackTraceArguments" + }, + "StackTraceRequest": { + "$ref": "#/definitions/StackTraceRequest" + }, + "StackTraceResponse": { + "$ref": "#/definitions/StackTraceResponse" + }, + "StartDebuggingRequest": { + "$ref": "#/definitions/StartDebuggingRequest" + }, + "StartDebuggingRequestArguments": { + "$ref": "#/definitions/StartDebuggingRequestArguments" + }, + "StartDebuggingResponse": { + "$ref": "#/definitions/StartDebuggingResponse" + }, + "StepBackArguments": { + "$ref": "#/definitions/StepBackArguments" + }, + "StepBackRequest": { + "$ref": "#/definitions/StepBackRequest" + }, + "StepBackResponse": { + "$ref": "#/definitions/StepBackResponse" + }, + "StepInArguments": { + "$ref": "#/definitions/StepInArguments" + }, + "StepInRequest": { + "$ref": "#/definitions/StepInRequest" + }, + "StepInResponse": { + "$ref": "#/definitions/StepInResponse" + }, + "StepInTarget": { + "$ref": "#/definitions/StepInTarget" + }, + "StepInTargetsArguments": { + "$ref": "#/definitions/StepInTargetsArguments" + }, + "StepInTargetsRequest": { + "$ref": "#/definitions/StepInTargetsRequest" + }, + "StepInTargetsResponse": { + "$ref": "#/definitions/StepInTargetsResponse" + }, + "StepOutArguments": { + "$ref": "#/definitions/StepOutArguments" + }, + "StepOutRequest": { + "$ref": "#/definitions/StepOutRequest" + }, + "StepOutResponse": { + "$ref": "#/definitions/StepOutResponse" + }, + "SteppingGranularity": { + "$ref": "#/definitions/SteppingGranularity" + }, + "StoppedEvent": { + "$ref": "#/definitions/StoppedEvent" + }, + "TerminateArguments": { + "$ref": "#/definitions/TerminateArguments" + }, + "TerminateRequest": { + "$ref": "#/definitions/TerminateRequest" + }, + "TerminateResponse": { + "$ref": "#/definitions/TerminateResponse" + }, + "TerminateThreadsArguments": { + "$ref": "#/definitions/TerminateThreadsArguments" + }, + "TerminateThreadsRequest": { + "$ref": "#/definitions/TerminateThreadsRequest" + }, + "TerminateThreadsResponse": { + "$ref": "#/definitions/TerminateThreadsResponse" + }, + "TerminatedEvent": { + "$ref": "#/definitions/TerminatedEvent" + }, + "Thread": { + "$ref": "#/definitions/Thread" + }, + "ThreadEvent": { + "$ref": "#/definitions/ThreadEvent" + }, + "ThreadsRequest": { + "$ref": "#/definitions/ThreadsRequest" + }, + "ThreadsResponse": { + "$ref": "#/definitions/ThreadsResponse" + }, + "ValueFormat": { + "$ref": "#/definitions/ValueFormat" + }, + "Variable": { + "$ref": "#/definitions/Variable" + }, + "VariablePresentationHint": { + "$ref": "#/definitions/VariablePresentationHint" + }, + "VariablesArguments": { + "$ref": "#/definitions/VariablesArguments" + }, + "VariablesRequest": { + "$ref": "#/definitions/VariablesRequest" + }, + "VariablesResponse": { + "$ref": "#/definitions/VariablesResponse" + }, + "WriteMemoryArguments": { + "$ref": "#/definitions/WriteMemoryArguments" + }, + "WriteMemoryRequest": { + "$ref": "#/definitions/WriteMemoryRequest" + }, + "WriteMemoryResponse": { + "$ref": "#/definitions/WriteMemoryResponse" + } + } +} diff --git a/adapter/Python/properties_gen.sh b/adapter/Python/properties_gen.sh new file mode 100755 index 0000000..07545e8 --- /dev/null +++ b/adapter/Python/properties_gen.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +INPUT_SCHEMA="$1" + +OUTPUT_FILE="references.json" + +if [ ! -f "$INPUT_SCHEMA" ]; then + echo "Error: File '$INPUT_SCHEMA' not found." + exit 1 +fi + +jq ' + .definitions + | keys + | map({ key: ., value: { "$ref": "#/definitions/\(. )" } }) + | from_entries + | { properties: . } +' "$INPUT_SCHEMA" > "$OUTPUT_FILE" diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Breakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Breakpoint.java new file mode 100644 index 0000000..3147669 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Breakpoint.java @@ -0,0 +1,7 @@ +package org.tzi.use.monitor.adapter.python; + +public enum Breakpoint { + METHOD_CALL, + METHOD_EXIT, + MODIFICATION +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java new file mode 100644 index 0000000..433018e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java @@ -0,0 +1,7 @@ +package org.tzi.use.monitor.adapter.python; + +import org.tzi.use.monitor.adapter.python.tmp.BreakpointEvent; + +public interface BreakpointHandler { + void handleBreakpoint(BreakpointEvent event); +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java new file mode 100644 index 0000000..7ad76d5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -0,0 +1,340 @@ +package org.tzi.use.monitor.adapter.python; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.tzi.use.monitor.adapter.python.dap.*; +import org.tzi.use.monitor.adapter.python.tmp.*; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyTypeRaw; + +import java.io.*; +import java.net.Socket; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.*; + +/** + * @author Sergio Jimenez + */ +public class DebugpyClient { + private static final String WORKSPACE = "/Users/srgj/git/uni/ba/dpy-server"; + + private static int REQUEST_COUNTER = 1; + + private final Socket socket; + private final BufferedReader in; + private final BufferedWriter out; + private final BreakpointHandler breakpointHandler; + private final ObjectMapper mapper = new ObjectMapper(); + private CompletableFuture futureResp; + private CompletableFuture initEvent; + private CompletableFuture stoppedEvent; + + DebugpyClient(String host, int port, BreakpointHandler breakpointHandler) throws IOException { + this.socket = new Socket(host, port); + this.in = new BufferedReader(new InputStreamReader(socket.getInputStream())); + this.out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); + this.breakpointHandler = breakpointHandler; + startReaderThread(); + } + + boolean attach(String host, int port) { + initEvent = new CompletableFuture<>(); + + // Initialize + var initArgs = new InitializeRequestArguments(); + initArgs.setAdapterID("USE"); + initArgs.setLinesStartAt1(true); + initArgs.setColumnsStartAt1(true); + initArgs.setPathFormat("path"); +// var initArgs = new InitializeRequest.InitializeRequestArguments(); +// initArgs.setAdapterID("USE"); +// initArgs.setLinesStartAt1(true); +// initArgs.setColumnsStartAt1(true); +// initArgs.setPathFormat("path"); +// var initReq = new InitializeRequest(REQUEST_COUNTER++, initArgs); +// var initResp = (InitializeResponse) sendRequest(initReq); + + // Attach + var attachArgs = new AttachRequest.AttachRequestArguments(); + attachArgs.setConnect(Map.of("host", host, "port", port)); + attachArgs.setPathMappings(List.of(Map.of("localRoot", WORKSPACE, "remoteRoot", "."))); + attachArgs.setClientOS(System.getProperty("os.name")); + attachArgs.setDebugOptions(List.of("RedirectOutput", "ShowReturnValue")); + attachArgs.setShowReturnValue(true); + attachArgs.setJustMyCode(true); + attachArgs.setWorkspaceFolder(WORKSPACE); + attachArgs.setSessionId(UUID.randomUUID().toString()); + var attachReq = new AttachRequest(REQUEST_COUNTER++, attachArgs); + sendAsyncRequest(attachReq); + +// arguments.put("name", "DebugpyClient"); +// arguments.put("type", "debugpy"); +// arguments.put("request", "attach"); +// var connect = arguments.putObject("connect"); +// connect.put("host", host); +// connect.put("port", port); +// // TODO: Add localRoot setting +// ArrayNode pathMappings = mapper.createArrayNode(); +// ObjectNode mapping = mapper.createObjectNode(); +// mapping.put("localRoot", WORKSPACE); +// mapping.put("remoteRoot", "."); +// pathMappings.add(mapping); +// arguments.set("pathMappings", pathMappings); +// arguments.put("__configurationTarget", 6); +// arguments.put("clientOS", "unix"); +// var debugOptions = arguments.putArray("debugOptions"); +// debugOptions.add("RedirectOutput"); +// debugOptions.add("ShowReturnValue"); +// arguments.put("justMyCode", true); +// arguments.put("showReturnValue", true); +// arguments.put("workspaceFolder", WORKSPACE); +// arguments.put("__sessionId", UUID.randomUUID().toString()); +// attachReq.setArguments(arguments); +// sendAsyncRequest(attachReq); +// + // TODO wait for init event + try { + System.out.println("Waiting for init event..."); + initEvent.get(); + System.out.println("Got init event..."); + } catch (InterruptedException | ExecutionException e) { + return false; + } +// +// System.out.println("Sending configuration done..."); +// //Configuration Done +// var confDoneReq = new Request(); +// var confMsg = new DAPMessage(); +// confMsg.setSeq(currReqSeq++); +// confMsg.setType("request"); +// confDoneReq.setProtocolMessage(confMsg); +// confDoneReq.setCommand("configurationDone"); +// // TODO Fix should not be async request +// //Response confDoneResp = (Response) sendRequest(confDoneReq); +// sendAsyncRequest(confDoneReq); +// +// // Wait for attach async response +// // TODO FIX! responseQueue instead of single slot +// //Response attachResponse = (Response) waitForAsyncResponse(); +// //return initResp.getSuccess() && attachResponse.getSuccess() && confDoneResp.getSuccess(); +// try { +// java.lang.Thread.sleep(1000); +// } catch (InterruptedException e) { +// throw new RuntimeException(e); +// } +// return initResp.getSuccess(); + return true; + } + + PyTypeRaw getVMType(String qualifiedClassName) { +// // Pause +// pause(); +// +// Request dapRequest = new Request(); +// var msg = new DAPMessage(); +// msg.setSeq(currReqSeq++); +// msg.setType("request"); +// dapRequest.setCommand("evaluate"); +// dapRequest.setProtocolMessage(msg); +// var evalExp = PyEvalExBuilder.getClassFieldTypesExp(qualifiedClassName); +// ObjectNode arguments = mapper.createObjectNode(); +// // arguments.put("context", "watch"); // Not required? +// arguments.put("expression", evalExp); +// // arguments.put("frameId", getCurrentFrameId(getThreadId("MainThread"))); // Not required? +// EvaluateRequest req = new EvaluateRequest(); +// dapRequest.setArguments(arguments); +// req.setDapRequest(dapRequest); +// DAPResponse evalResp = sendRequest(req); +// +// // New internal PyType +// var rawType = new PyTypeRaw(qualifiedClassName); +// var rawField1 = new PyFieldRaw("name", "string", null); +// var rawField2 = new PyFieldRaw("salary", "int", null); +// rawType.setFields(List.of(rawField1, rawField2)); +// +// // Resume +// return rawType; + return null; + } + + private DAPResponse pause() { +// stoppedEvent = new CompletableFuture<>(); +// var tid = getThreadId("MainThread"); +// Request pauseReq = new Request(); +// pauseReq.setCommand("pause"); +// var msg = new DAPMessage(); +// msg.setSeq(currReqSeq++); +// msg.setType("request"); +// ObjectNode arguments = mapper.createObjectNode(); +// arguments.put("threadId", tid); +// pauseReq.setArguments(arguments); +// pauseReq.setProtocolMessage(msg); +// var res = sendRequest(pauseReq); +// try { +// System.out.println("Waiting for stopped event..."); +// stoppedEvent.get(); +// } catch (InterruptedException | ExecutionException e) { +// throw new RuntimeException(e); +// } +// return res; + return null; + } + + private int getThreadId(String threadName) { +// System.out.println("Getting thread id: " + threadName); +// Request dapRequest = new Request(); +// var msg = new DAPMessage(); +// msg.setSeq(currReqSeq++); +// msg.setType("request"); +// dapRequest.setCommand("threads"); +// dapRequest.setProtocolMessage(msg); +// ThreadsResponse threadsResponse = (ThreadsResponse) sendRequest(dapRequest); +// JsonNode body = threadsResponse.getResponse().getBody(); +// JsonNode threadsNode = body.get("threads"); +// +// ObjectMapper mapper = new ObjectMapper(); +// List threads = mapper.convertValue( +// threadsNode, +// new TypeReference<>() {} +// ); +// for (Thread thread : threads) { +// if (thread.getName().equals(threadName)) { +// System.out.println("Found thread: " + thread.getName() + " with id: " + thread.getId()); +// return thread.getId(); +// } +// } + return -1; + } + + private int getCurrentFrameId(int threadId) { +// Request stackTraceReq = new Request(); +// var msg = new DAPMessage(); +// msg.setSeq(currReqSeq++); +// msg.setType("request"); +// stackTraceReq.setProtocolMessage(msg); +// stackTraceReq.setCommand("stackTrace"); +// ObjectNode arguments = mapper.createObjectNode(); +// arguments.put("threadId", threadId); +// stackTraceReq.setArguments(arguments); +// Response resp = (Response) sendRequest(stackTraceReq); +// return resp.getBody().get("stackFrames").get(0).get("id").asInt(); + return 1; + } + + private void getStackStrace() { + + } + + private DAPResponse sendRequest(DAPRequest dapRequest) { + sendAsyncRequest(dapRequest); + return waitForAsyncResponse(); + } + + private DAPResponse waitForAsyncResponse() { + DAPResponse res; + try { + System.out.println("Waiting for response..."); + res = futureResp.get(); + System.out.println("Finished waiting for response..."); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + return res; + } + + private void sendAsyncRequest(DAPRequest DAPRequest) { + futureResp = new CompletableFuture<>(); + + String json; + try { + json = mapper.writeValueAsString(DAPRequest); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + + String header = "Content-Length: " + json.length() + "\r\n\r\n"; + + try { + System.out.println("Sending request: " + header + json); + out.write(header + json); + out.flush(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private void startReaderThread() { + var readerThread = new java.lang.Thread(() -> { + System.out.println("Reader thread started..."); + try { + while (true) { + String line; + int contentLength = 0; + while (!(line = in.readLine()).isEmpty()) { + contentLength = Integer.parseInt(line.substring("Content-Length:".length()).trim()); + } + char[] body = new char[contentLength]; + int read = 0; + while (read < contentLength) { + int r = in.read(body, read, contentLength - read); + if (r == -1) throw new IOException("Unexpected end of stream"); + read += r; + } + String json = new String(body); + System.out.println("Received json response: " + json); + if (json.contains("\"type\": \"event\"")) { + continue; + } + DAPMessage msg = MessageMapper.parseMessage(json); + System.out.println("Parsed json response to object..."); + if (msg == null) { + System.out.println("Skipping unknown message type..."); + continue; + } + if (msg instanceof DAPResponse) { + System.out.println("Response instance: " + msg); + // TODO FIX workaround + // int reqSeq = ((DAPResponse) msg).getRequestSequence(); + //if (reqSeq == currReqSeq - 1) { + System.out.println("Matched response: " + json); + if (futureResp.complete((DAPResponse) msg)) { + System.out.println("Response completed!"); + } + //} else { + // System.out.println("Ignored async message: " + json); + //} + } + if (msg instanceof DAPEvent) { + if (msg instanceof InitializedEvent) { + initEvent.complete((DAPEvent) msg); + } + } +// if (msg instanceof DAPEvent) { +// System.out.println("Event instance: " + msg); +// if (msg instanceof Event) { +// if (((Event) msg).getEvent().equals("initialized")) { +// initEvent.complete((Event) msg); +// } +// if (((Event) msg).getEvent().equals("stopped")) { +// stoppedEvent.complete((Event) msg); +// } +// } +// if (msg instanceof BreakpointEvent) { +// handleBreakpoint((BreakpointEvent) msg); +// } +// } + } + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + readerThread.setDaemon(true); + readerThread.start(); + } + + private void handleBreakpoint(BreakpointEvent event) { + breakpointHandler.handleBreakpoint(event); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java new file mode 100644 index 0000000..419cc23 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -0,0 +1,26 @@ +package org.tzi.use.monitor.adapter.python; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.tzi.use.monitor.adapter.python.tmp.DAPMessage; +import org.tzi.use.monitor.adapter.python.tmp.Event; +import org.tzi.use.monitor.adapter.python.tmp.Response; + +/** + * Maps a DAP json message to its respective POJO + */ +public class MessageMapper { + + private static final ObjectMapper mapper = new ObjectMapper(); + + public static DAPMessage parseMessage(String json) throws Exception { + JsonNode tree = mapper.readTree(json); + String type = tree.get("type").asText(); + return switch (type) { + case "response" -> mapper.readValue(json, Response.class); + case "event" -> mapper.readValue(json, Event.class); + default -> null; + }; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java new file mode 100644 index 0000000..0d3898f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python; + +public class PyEvalExBuilder { + + public static String getClassFieldTypesExp(String qualifiedClassName) { + int lastDot = qualifiedClassName.lastIndexOf('.'); + if (lastDot == -1) { + throw new IllegalArgumentException("Qualified class name must contain at least one dot."); + } + String moduleName = qualifiedClassName.substring(0, lastDot); + String className = qualifiedClassName.substring(lastDot + 1); + return String.format( + "getattr(__import__('sys').modules['%s'], '%s').__annotations__", + moduleName, + className + ); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java new file mode 100644 index 0000000..b8015d3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -0,0 +1,187 @@ +package org.tzi.use.monitor.adapter.python; + +import org.tzi.use.monitor.adapter.python.tmp.BreakpointEvent; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObject; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObjectRaw; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyType; +import org.tzi.use.plugins.monitor.MonitorException; +import org.tzi.use.plugins.monitor.vm.adapter.AbstractVMAdapter; +import org.tzi.use.plugins.monitor.vm.adapter.InvalidAdapterConfiguration; +import org.tzi.use.plugins.monitor.vm.adapter.VMAdapterSetting; +import org.tzi.use.plugins.monitor.vm.mm.*; +import org.tzi.use.uml.ocl.value.Value; + +import java.util.*; +import java.util.logging.Level; + +/** + * @author Sergio Jimenez + */ +public class PythonAdapter extends AbstractVMAdapter { + + private static final int SETTING_HOST_IDX = 0; + private static final int SETTING_PORT_IDX = 1; + + private String host; + private int port; + private boolean isConnected; + private DebugpyClient debugpyClient; + private Map typeMapping; + private HashMap> breakpoints; + + public Set readInstances(PyType type) { + var pyObjectRaw = new PyObjectRaw(); // TODO construct from client call instead + pyObjectRaw.setRawType(type.getRawType()); + pyObjectRaw.getRawType().getFields().get(0).setValue("John Doe"); + pyObjectRaw.getRawType().getFields().get(1).setValue("60000"); // TODO Fix is not getting set... + Set vmObjects = new HashSet<>(); + for (PyObjectRaw ref : Set.of(pyObjectRaw)) { + PyObject pyObj = new PyObject(this, ref); + vmObjects.add(pyObj); + } + return vmObjects; + } + + @Override + protected void validateSettings() throws InvalidAdapterConfiguration { + System.out.println("Validating PythonAdapter settings..."); + List settings = getSettings(); + + String settingHostVal = settings.get(SETTING_HOST_IDX).value; + if (settingHostVal == null || settingHostVal.isBlank()) { + throw new InvalidAdapterConfiguration("Host is missing!"); + } + host = settingHostVal; + + try { + port = Integer.parseInt(settings.get(SETTING_PORT_IDX).value); + } catch (NumberFormatException e) { + throw new InvalidAdapterConfiguration("Port must be a number!"); + } + } + + @Override + protected void createSettings(List settings) { + System.out.println("Creating Python adapter settings..."); + settings.add(SETTING_HOST_IDX, new VMAdapterSetting("Host", "localhost")); + settings.add(SETTING_PORT_IDX, new VMAdapterSetting("Port", "5678")); + } + + @Override + public void attachToVM() throws MonitorException { + System.out.println("Connecting to debugpy server..."); + + typeMapping = new HashMap<>(); + breakpoints = new HashMap<>(); + + try { + debugpyClient = new DebugpyClient(host, port, new Handler()); + } catch (Exception e) { + throw new MonitorException("Failed to create socket!", e); + } + + System.out.println("Debugpy socket created!"); + + if (debugpyClient.attach(host, port)) { + isConnected = true; + System.out.println("Connected to debugpy server!"); + } else { + System.out.println("Failed to attach to debugpy server!"); + } + } + + @Override + public void resume() { + System.out.println("Resuming debugpy server..."); + + } + + @Override + public void suspend() { + System.out.println("Suspending debugpy server..."); + } + + @Override + public void stop() { + System.out.println("Stopping debugpy server..."); + + isConnected = false; + } + + @Override + public VMType getVMType(String name) { + System.out.println("Getting VMType '" + name + "'..."); + PyType res = null; + if (!typeMapping.containsKey(name)) { + var rawType = debugpyClient.getVMType(name); + if (rawType != null) { + res = new PyType(this, rawType); + } + typeMapping.put(name, res); + } + return typeMapping.get(name); + } + + @Override + public void registerClassPrepareEvent(String javaClassName) { + + } + + @Override + public void unregisterClassPrepareInterest(Object adapterEventInformation) { + + } + + @Override + public boolean isVMTypeLoaded(String javaClassName) { + return getVMType(javaClassName) != null; + } + + @Override + public void registerOperationCallInterest(VMMethod m) { + + } + + @Override + public void registerMethodExit(VMMethodCall call) { + + } + + @Override + public void unregisterOperationeExit(Object adapterExitInformation) { + + } + + @Override + public Value getMethodResultValue(Object adapterExitInformation) { + return null; + } + + @Override + public void registerConstructorCallInterest(VMType vmType) { + PyType type = (PyType) vmType; + for (VMMethod m : type.getMethodsByName("__init__")) { + controller.newLogMessage(this, Level.FINE, "Registering constructor " + m.toString()); + // set breakpoints via debugpy for constructor + } + } + + @Override + public void registerFieldModificationInterest(VMField f) { + + } + + private class Handler implements BreakpointHandler { + + @Override + public void handleBreakpoint(BreakpointEvent event) { + // TODO + } + } + + @Override + public String toString() { + return "PythonAdapter"; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArguments.java new file mode 100644 index 0000000..1766a35 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArguments.java @@ -0,0 +1,111 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `attach` request. Additional attributes are implementation specific. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "__restart" +}) +@Generated("jsonschema2pojo") +public class AttachRequestArguments { + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + * + */ + @JsonProperty("__restart") + @JsonPropertyDescription("Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact.") + private Object restart; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + * + */ + @JsonProperty("__restart") + public Object getRestart() { + return restart; + } + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + * + */ + @JsonProperty("__restart") + public void setRestart(Object restart) { + this.restart = restart; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(AttachRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("restart"); + sb.append('='); + sb.append(((this.restart == null)?"":this.restart)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.restart == null)? 0 :this.restart.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof AttachRequestArguments) == false) { + return false; + } + AttachRequestArguments rhs = ((AttachRequestArguments) other); + return (((this.restart == rhs.restart)||((this.restart!= null)&&this.restart.equals(rhs.restart)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Breakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Breakpoint.java new file mode 100644 index 0000000..406ae07 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Breakpoint.java @@ -0,0 +1,490 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "verified", + "message", + "source", + "line", + "column", + "endLine", + "endColumn", + "instructionReference", + "offset", + "reason" +}) +@Generated("jsonschema2pojo") +public class Breakpoint { + + /** + * The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. + * + */ + @JsonProperty("id") + @JsonPropertyDescription("The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints.") + private Integer id; + /** + * If true, the breakpoint could be set (but not necessarily at the desired location). + * (Required) + * + */ + @JsonProperty("verified") + @JsonPropertyDescription("If true, the breakpoint could be set (but not necessarily at the desired location).") + private Boolean verified; + /** + * A message about the state of the breakpoint. + * This is shown to the user and can be used to explain why a breakpoint could not be verified. + * + */ + @JsonProperty("message") + @JsonPropertyDescription("A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified.") + private String message; + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source source; + /** + * The start line of the actual range covered by the breakpoint. + * + */ + @JsonProperty("line") + @JsonPropertyDescription("The start line of the actual range covered by the breakpoint.") + private Integer line; + /** + * Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer column; + /** + * The end line of the actual range covered by the breakpoint. + * + */ + @JsonProperty("endLine") + @JsonPropertyDescription("The end line of the actual range covered by the breakpoint.") + private Integer endLine; + /** + * End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * If no end line is given, then the end column is assumed to be in the start line. + * + */ + @JsonProperty("endColumn") + @JsonPropertyDescription("End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line.") + private Integer endColumn; + /** + * A memory reference to where the breakpoint is set. + * + */ + @JsonProperty("instructionReference") + @JsonPropertyDescription("A memory reference to where the breakpoint is set.") + private String instructionReference; + /** + * The offset from the instruction reference. + * This can be negative. + * + */ + @JsonProperty("offset") + @JsonPropertyDescription("The offset from the instruction reference.\nThis can be negative.") + private Integer offset; + /** + * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: + * + * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. + * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. + * + */ + @JsonProperty("reason") + @JsonPropertyDescription("A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:\n\n- `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.\n - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.") + private Reason reason; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. + * + */ + @JsonProperty("id") + public Integer getId() { + return id; + } + + /** + * The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. + * + */ + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * If true, the breakpoint could be set (but not necessarily at the desired location). + * (Required) + * + */ + @JsonProperty("verified") + public Boolean getVerified() { + return verified; + } + + /** + * If true, the breakpoint could be set (but not necessarily at the desired location). + * (Required) + * + */ + @JsonProperty("verified") + public void setVerified(Boolean verified) { + this.verified = verified; + } + + /** + * A message about the state of the breakpoint. + * This is shown to the user and can be used to explain why a breakpoint could not be verified. + * + */ + @JsonProperty("message") + public String getMessage() { + return message; + } + + /** + * A message about the state of the breakpoint. + * This is shown to the user and can be used to explain why a breakpoint could not be verified. + * + */ + @JsonProperty("message") + public void setMessage(String message) { + this.message = message; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + public Source getSource() { + return source; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + public void setSource(Source source) { + this.source = source; + } + + /** + * The start line of the actual range covered by the breakpoint. + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * The start line of the actual range covered by the breakpoint. + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * The end line of the actual range covered by the breakpoint. + * + */ + @JsonProperty("endLine") + public Integer getEndLine() { + return endLine; + } + + /** + * The end line of the actual range covered by the breakpoint. + * + */ + @JsonProperty("endLine") + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + /** + * End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * If no end line is given, then the end column is assumed to be in the start line. + * + */ + @JsonProperty("endColumn") + public Integer getEndColumn() { + return endColumn; + } + + /** + * End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * If no end line is given, then the end column is assumed to be in the start line. + * + */ + @JsonProperty("endColumn") + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + /** + * A memory reference to where the breakpoint is set. + * + */ + @JsonProperty("instructionReference") + public String getInstructionReference() { + return instructionReference; + } + + /** + * A memory reference to where the breakpoint is set. + * + */ + @JsonProperty("instructionReference") + public void setInstructionReference(String instructionReference) { + this.instructionReference = instructionReference; + } + + /** + * The offset from the instruction reference. + * This can be negative. + * + */ + @JsonProperty("offset") + public Integer getOffset() { + return offset; + } + + /** + * The offset from the instruction reference. + * This can be negative. + * + */ + @JsonProperty("offset") + public void setOffset(Integer offset) { + this.offset = offset; + } + + /** + * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: + * + * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. + * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. + * + */ + @JsonProperty("reason") + public Reason getReason() { + return reason; + } + + /** + * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: + * + * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. + * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. + * + */ + @JsonProperty("reason") + public void setReason(Reason reason) { + this.reason = reason; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Breakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("verified"); + sb.append('='); + sb.append(((this.verified == null)?"":this.verified)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("source"); + sb.append('='); + sb.append(((this.source == null)?"":this.source)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("instructionReference"); + sb.append('='); + sb.append(((this.instructionReference == null)?"":this.instructionReference)); + sb.append(','); + sb.append("offset"); + sb.append('='); + sb.append(((this.offset == null)?"":this.offset)); + sb.append(','); + sb.append("reason"); + sb.append('='); + sb.append(((this.reason == null)?"":this.reason)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.reason == null)? 0 :this.reason.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + result = ((result* 31)+((this.instructionReference == null)? 0 :this.instructionReference.hashCode())); + result = ((result* 31)+((this.verified == null)? 0 :this.verified.hashCode())); + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Breakpoint) == false) { + return false; + } + Breakpoint rhs = ((Breakpoint) other); + return (((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.reason == rhs.reason)||((this.reason!= null)&&this.reason.equals(rhs.reason))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.instructionReference == rhs.instructionReference)||((this.instructionReference!= null)&&this.instructionReference.equals(rhs.instructionReference))))&&((this.verified == rhs.verified)||((this.verified!= null)&&this.verified.equals(rhs.verified))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message)))); + } + + + /** + * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: + * + * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. + * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. + * + */ + @Generated("jsonschema2pojo") + public enum Reason { + + PENDING("pending"), + FAILED("failed"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Reason c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Reason(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static Reason fromValue(String value) { + Reason constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocation.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocation.java new file mode 100644 index 0000000..d6639d4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocation.java @@ -0,0 +1,201 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Properties of a breakpoint location returned from the `breakpointLocations` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "line", + "column", + "endLine", + "endColumn" +}) +@Generated("jsonschema2pojo") +public class BreakpointLocation { + + /** + * Start line of breakpoint location. + * (Required) + * + */ + @JsonProperty("line") + @JsonPropertyDescription("Start line of breakpoint location.") + private Integer line; + /** + * The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer column; + /** + * The end line of breakpoint location if the location covers a range. + * + */ + @JsonProperty("endLine") + @JsonPropertyDescription("The end line of breakpoint location if the location covers a range.") + private Integer endLine; + /** + * The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + @JsonPropertyDescription("The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer endColumn; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Start line of breakpoint location. + * (Required) + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * Start line of breakpoint location. + * (Required) + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * The end line of breakpoint location if the location covers a range. + * + */ + @JsonProperty("endLine") + public Integer getEndLine() { + return endLine; + } + + /** + * The end line of breakpoint location if the location covers a range. + * + */ + @JsonProperty("endLine") + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + /** + * The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + public Integer getEndColumn() { + return endColumn; + } + + /** + * The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(BreakpointLocation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof BreakpointLocation) == false) { + return false; + } + BreakpointLocation rhs = ((BreakpointLocation) other); + return ((((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArguments.java new file mode 100644 index 0000000..2bf9507 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArguments.java @@ -0,0 +1,238 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `breakpointLocations` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "source", + "line", + "column", + "endLine", + "endColumn" +}) +@Generated("jsonschema2pojo") +public class BreakpointLocationsArguments { + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source source; + /** + * Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. + * (Required) + * + */ + @JsonProperty("line") + @JsonPropertyDescription("Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.") + private Integer line; + /** + * Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed.") + private Integer column; + /** + * End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. + * + */ + @JsonProperty("endLine") + @JsonPropertyDescription("End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.") + private Integer endLine; + /** + * End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed. + * + */ + @JsonProperty("endColumn") + @JsonPropertyDescription("End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed.") + private Integer endColumn; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + public Source getSource() { + return source; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + public void setSource(Source source) { + this.source = source; + } + + /** + * Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. + * (Required) + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. + * (Required) + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. + * + */ + @JsonProperty("endLine") + public Integer getEndLine() { + return endLine; + } + + /** + * End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. + * + */ + @JsonProperty("endLine") + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + /** + * End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed. + * + */ + @JsonProperty("endColumn") + public Integer getEndColumn() { + return endColumn; + } + + /** + * End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed. + * + */ + @JsonProperty("endColumn") + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(BreakpointLocationsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("source"); + sb.append('='); + sb.append(((this.source == null)?"":this.source)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof BreakpointLocationsArguments) == false) { + return false; + } + BreakpointLocationsArguments rhs = ((BreakpointLocationsArguments) other); + return (((((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArguments.java new file mode 100644 index 0000000..6645b27 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArguments.java @@ -0,0 +1,142 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `cancel` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "requestId", + "progressId" +}) +@Generated("jsonschema2pojo") +public class CancelArguments { + + /** + * The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + * + */ + @JsonProperty("requestId") + @JsonPropertyDescription("The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request.") + private Integer requestId; + /** + * The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + * + */ + @JsonProperty("progressId") + @JsonPropertyDescription("The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request.") + private String progressId; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + * + */ + @JsonProperty("requestId") + public Integer getRequestId() { + return requestId; + } + + /** + * The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + * + */ + @JsonProperty("requestId") + public void setRequestId(Integer requestId) { + this.requestId = requestId; + } + + /** + * The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + * + */ + @JsonProperty("progressId") + public String getProgressId() { + return progressId; + } + + /** + * The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + * + */ + @JsonProperty("progressId") + public void setProgressId(String progressId) { + this.progressId = progressId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(CancelArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("requestId"); + sb.append('='); + sb.append(((this.requestId == null)?"":this.requestId)); + sb.append(','); + sb.append("progressId"); + sb.append('='); + sb.append(((this.progressId == null)?"":this.progressId)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.progressId == null)? 0 :this.progressId.hashCode())); + result = ((result* 31)+((this.requestId == null)? 0 :this.requestId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof CancelArguments) == false) { + return false; + } + CancelArguments rhs = ((CancelArguments) other); + return ((((this.progressId == rhs.progressId)||((this.progressId!= null)&&this.progressId.equals(rhs.progressId)))&&((this.requestId == rhs.requestId)||((this.requestId!= null)&&this.requestId.equals(rhs.requestId))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Capabilities.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Capabilities.java new file mode 100644 index 0000000..2dce39b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Capabilities.java @@ -0,0 +1,1287 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Types + *

+ * Information about the capabilities of a debug adapter. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "supportsConfigurationDoneRequest", + "supportsFunctionBreakpoints", + "supportsConditionalBreakpoints", + "supportsHitConditionalBreakpoints", + "supportsEvaluateForHovers", + "exceptionBreakpointFilters", + "supportsStepBack", + "supportsSetVariable", + "supportsRestartFrame", + "supportsGotoTargetsRequest", + "supportsStepInTargetsRequest", + "supportsCompletionsRequest", + "completionTriggerCharacters", + "supportsModulesRequest", + "additionalModuleColumns", + "supportedChecksumAlgorithms", + "supportsRestartRequest", + "supportsExceptionOptions", + "supportsValueFormattingOptions", + "supportsExceptionInfoRequest", + "supportTerminateDebuggee", + "supportSuspendDebuggee", + "supportsDelayedStackTraceLoading", + "supportsLoadedSourcesRequest", + "supportsLogPoints", + "supportsTerminateThreadsRequest", + "supportsSetExpression", + "supportsTerminateRequest", + "supportsDataBreakpoints", + "supportsReadMemoryRequest", + "supportsWriteMemoryRequest", + "supportsDisassembleRequest", + "supportsCancelRequest", + "supportsBreakpointLocationsRequest", + "supportsClipboardContext", + "supportsSteppingGranularity", + "supportsInstructionBreakpoints", + "supportsExceptionFilterOptions", + "supportsSingleThreadExecutionRequests" +}) +@Generated("jsonschema2pojo") +public class Capabilities { + + /** + * The debug adapter supports the `configurationDone` request. + * + */ + @JsonProperty("supportsConfigurationDoneRequest") + @JsonPropertyDescription("The debug adapter supports the `configurationDone` request.") + private Boolean supportsConfigurationDoneRequest; + /** + * The debug adapter supports function breakpoints. + * + */ + @JsonProperty("supportsFunctionBreakpoints") + @JsonPropertyDescription("The debug adapter supports function breakpoints.") + private Boolean supportsFunctionBreakpoints; + /** + * The debug adapter supports conditional breakpoints. + * + */ + @JsonProperty("supportsConditionalBreakpoints") + @JsonPropertyDescription("The debug adapter supports conditional breakpoints.") + private Boolean supportsConditionalBreakpoints; + /** + * The debug adapter supports breakpoints that break execution after a specified number of hits. + * + */ + @JsonProperty("supportsHitConditionalBreakpoints") + @JsonPropertyDescription("The debug adapter supports breakpoints that break execution after a specified number of hits.") + private Boolean supportsHitConditionalBreakpoints; + /** + * The debug adapter supports a (side effect free) `evaluate` request for data hovers. + * + */ + @JsonProperty("supportsEvaluateForHovers") + @JsonPropertyDescription("The debug adapter supports a (side effect free) `evaluate` request for data hovers.") + private Boolean supportsEvaluateForHovers; + /** + * Available exception filter options for the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("exceptionBreakpointFilters") + @JsonPropertyDescription("Available exception filter options for the `setExceptionBreakpoints` request.") + private List exceptionBreakpointFilters = new ArrayList(); + /** + * The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests. + * + */ + @JsonProperty("supportsStepBack") + @JsonPropertyDescription("The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests.") + private Boolean supportsStepBack; + /** + * The debug adapter supports setting a variable to a value. + * + */ + @JsonProperty("supportsSetVariable") + @JsonPropertyDescription("The debug adapter supports setting a variable to a value.") + private Boolean supportsSetVariable; + /** + * The debug adapter supports restarting a frame. + * + */ + @JsonProperty("supportsRestartFrame") + @JsonPropertyDescription("The debug adapter supports restarting a frame.") + private Boolean supportsRestartFrame; + /** + * The debug adapter supports the `gotoTargets` request. + * + */ + @JsonProperty("supportsGotoTargetsRequest") + @JsonPropertyDescription("The debug adapter supports the `gotoTargets` request.") + private Boolean supportsGotoTargetsRequest; + /** + * The debug adapter supports the `stepInTargets` request. + * + */ + @JsonProperty("supportsStepInTargetsRequest") + @JsonPropertyDescription("The debug adapter supports the `stepInTargets` request.") + private Boolean supportsStepInTargetsRequest; + /** + * The debug adapter supports the `completions` request. + * + */ + @JsonProperty("supportsCompletionsRequest") + @JsonPropertyDescription("The debug adapter supports the `completions` request.") + private Boolean supportsCompletionsRequest; + /** + * The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character. + * + */ + @JsonProperty("completionTriggerCharacters") + @JsonPropertyDescription("The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character.") + private List completionTriggerCharacters = new ArrayList(); + /** + * The debug adapter supports the `modules` request. + * + */ + @JsonProperty("supportsModulesRequest") + @JsonPropertyDescription("The debug adapter supports the `modules` request.") + private Boolean supportsModulesRequest; + /** + * The set of additional module information exposed by the debug adapter. + * + */ + @JsonProperty("additionalModuleColumns") + @JsonPropertyDescription("The set of additional module information exposed by the debug adapter.") + private List additionalModuleColumns = new ArrayList(); + /** + * Checksum algorithms supported by the debug adapter. + * + */ + @JsonProperty("supportedChecksumAlgorithms") + @JsonPropertyDescription("Checksum algorithms supported by the debug adapter.") + private List supportedChecksumAlgorithms = new ArrayList(); + /** + * The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request. + * + */ + @JsonProperty("supportsRestartRequest") + @JsonPropertyDescription("The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request.") + private Boolean supportsRestartRequest; + /** + * The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("supportsExceptionOptions") + @JsonPropertyDescription("The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request.") + private Boolean supportsExceptionOptions; + /** + * The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests. + * + */ + @JsonProperty("supportsValueFormattingOptions") + @JsonPropertyDescription("The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests.") + private Boolean supportsValueFormattingOptions; + /** + * The debug adapter supports the `exceptionInfo` request. + * + */ + @JsonProperty("supportsExceptionInfoRequest") + @JsonPropertyDescription("The debug adapter supports the `exceptionInfo` request.") + private Boolean supportsExceptionInfoRequest; + /** + * The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. + * + */ + @JsonProperty("supportTerminateDebuggee") + @JsonPropertyDescription("The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request.") + private Boolean supportTerminateDebuggee; + /** + * The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. + * + */ + @JsonProperty("supportSuspendDebuggee") + @JsonPropertyDescription("The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request.") + private Boolean supportSuspendDebuggee; + /** + * The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported. + * + */ + @JsonProperty("supportsDelayedStackTraceLoading") + @JsonPropertyDescription("The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported.") + private Boolean supportsDelayedStackTraceLoading; + /** + * The debug adapter supports the `loadedSources` request. + * + */ + @JsonProperty("supportsLoadedSourcesRequest") + @JsonPropertyDescription("The debug adapter supports the `loadedSources` request.") + private Boolean supportsLoadedSourcesRequest; + /** + * The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`. + * + */ + @JsonProperty("supportsLogPoints") + @JsonPropertyDescription("The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`.") + private Boolean supportsLogPoints; + /** + * The debug adapter supports the `terminateThreads` request. + * + */ + @JsonProperty("supportsTerminateThreadsRequest") + @JsonPropertyDescription("The debug adapter supports the `terminateThreads` request.") + private Boolean supportsTerminateThreadsRequest; + /** + * The debug adapter supports the `setExpression` request. + * + */ + @JsonProperty("supportsSetExpression") + @JsonPropertyDescription("The debug adapter supports the `setExpression` request.") + private Boolean supportsSetExpression; + /** + * The debug adapter supports the `terminate` request. + * + */ + @JsonProperty("supportsTerminateRequest") + @JsonPropertyDescription("The debug adapter supports the `terminate` request.") + private Boolean supportsTerminateRequest; + /** + * The debug adapter supports data breakpoints. + * + */ + @JsonProperty("supportsDataBreakpoints") + @JsonPropertyDescription("The debug adapter supports data breakpoints.") + private Boolean supportsDataBreakpoints; + /** + * The debug adapter supports the `readMemory` request. + * + */ + @JsonProperty("supportsReadMemoryRequest") + @JsonPropertyDescription("The debug adapter supports the `readMemory` request.") + private Boolean supportsReadMemoryRequest; + /** + * The debug adapter supports the `writeMemory` request. + * + */ + @JsonProperty("supportsWriteMemoryRequest") + @JsonPropertyDescription("The debug adapter supports the `writeMemory` request.") + private Boolean supportsWriteMemoryRequest; + /** + * The debug adapter supports the `disassemble` request. + * + */ + @JsonProperty("supportsDisassembleRequest") + @JsonPropertyDescription("The debug adapter supports the `disassemble` request.") + private Boolean supportsDisassembleRequest; + /** + * The debug adapter supports the `cancel` request. + * + */ + @JsonProperty("supportsCancelRequest") + @JsonPropertyDescription("The debug adapter supports the `cancel` request.") + private Boolean supportsCancelRequest; + /** + * The debug adapter supports the `breakpointLocations` request. + * + */ + @JsonProperty("supportsBreakpointLocationsRequest") + @JsonPropertyDescription("The debug adapter supports the `breakpointLocations` request.") + private Boolean supportsBreakpointLocationsRequest; + /** + * The debug adapter supports the `clipboard` context value in the `evaluate` request. + * + */ + @JsonProperty("supportsClipboardContext") + @JsonPropertyDescription("The debug adapter supports the `clipboard` context value in the `evaluate` request.") + private Boolean supportsClipboardContext; + /** + * The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests. + * + */ + @JsonProperty("supportsSteppingGranularity") + @JsonPropertyDescription("The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests.") + private Boolean supportsSteppingGranularity; + /** + * The debug adapter supports adding breakpoints based on instruction references. + * + */ + @JsonProperty("supportsInstructionBreakpoints") + @JsonPropertyDescription("The debug adapter supports adding breakpoints based on instruction references.") + private Boolean supportsInstructionBreakpoints; + /** + * The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("supportsExceptionFilterOptions") + @JsonPropertyDescription("The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request.") + private Boolean supportsExceptionFilterOptions; + /** + * The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). + * + */ + @JsonProperty("supportsSingleThreadExecutionRequests") + @JsonPropertyDescription("The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`).") + private Boolean supportsSingleThreadExecutionRequests; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The debug adapter supports the `configurationDone` request. + * + */ + @JsonProperty("supportsConfigurationDoneRequest") + public Boolean getSupportsConfigurationDoneRequest() { + return supportsConfigurationDoneRequest; + } + + /** + * The debug adapter supports the `configurationDone` request. + * + */ + @JsonProperty("supportsConfigurationDoneRequest") + public void setSupportsConfigurationDoneRequest(Boolean supportsConfigurationDoneRequest) { + this.supportsConfigurationDoneRequest = supportsConfigurationDoneRequest; + } + + /** + * The debug adapter supports function breakpoints. + * + */ + @JsonProperty("supportsFunctionBreakpoints") + public Boolean getSupportsFunctionBreakpoints() { + return supportsFunctionBreakpoints; + } + + /** + * The debug adapter supports function breakpoints. + * + */ + @JsonProperty("supportsFunctionBreakpoints") + public void setSupportsFunctionBreakpoints(Boolean supportsFunctionBreakpoints) { + this.supportsFunctionBreakpoints = supportsFunctionBreakpoints; + } + + /** + * The debug adapter supports conditional breakpoints. + * + */ + @JsonProperty("supportsConditionalBreakpoints") + public Boolean getSupportsConditionalBreakpoints() { + return supportsConditionalBreakpoints; + } + + /** + * The debug adapter supports conditional breakpoints. + * + */ + @JsonProperty("supportsConditionalBreakpoints") + public void setSupportsConditionalBreakpoints(Boolean supportsConditionalBreakpoints) { + this.supportsConditionalBreakpoints = supportsConditionalBreakpoints; + } + + /** + * The debug adapter supports breakpoints that break execution after a specified number of hits. + * + */ + @JsonProperty("supportsHitConditionalBreakpoints") + public Boolean getSupportsHitConditionalBreakpoints() { + return supportsHitConditionalBreakpoints; + } + + /** + * The debug adapter supports breakpoints that break execution after a specified number of hits. + * + */ + @JsonProperty("supportsHitConditionalBreakpoints") + public void setSupportsHitConditionalBreakpoints(Boolean supportsHitConditionalBreakpoints) { + this.supportsHitConditionalBreakpoints = supportsHitConditionalBreakpoints; + } + + /** + * The debug adapter supports a (side effect free) `evaluate` request for data hovers. + * + */ + @JsonProperty("supportsEvaluateForHovers") + public Boolean getSupportsEvaluateForHovers() { + return supportsEvaluateForHovers; + } + + /** + * The debug adapter supports a (side effect free) `evaluate` request for data hovers. + * + */ + @JsonProperty("supportsEvaluateForHovers") + public void setSupportsEvaluateForHovers(Boolean supportsEvaluateForHovers) { + this.supportsEvaluateForHovers = supportsEvaluateForHovers; + } + + /** + * Available exception filter options for the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("exceptionBreakpointFilters") + public List getExceptionBreakpointFilters() { + return exceptionBreakpointFilters; + } + + /** + * Available exception filter options for the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("exceptionBreakpointFilters") + public void setExceptionBreakpointFilters(List exceptionBreakpointFilters) { + this.exceptionBreakpointFilters = exceptionBreakpointFilters; + } + + /** + * The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests. + * + */ + @JsonProperty("supportsStepBack") + public Boolean getSupportsStepBack() { + return supportsStepBack; + } + + /** + * The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests. + * + */ + @JsonProperty("supportsStepBack") + public void setSupportsStepBack(Boolean supportsStepBack) { + this.supportsStepBack = supportsStepBack; + } + + /** + * The debug adapter supports setting a variable to a value. + * + */ + @JsonProperty("supportsSetVariable") + public Boolean getSupportsSetVariable() { + return supportsSetVariable; + } + + /** + * The debug adapter supports setting a variable to a value. + * + */ + @JsonProperty("supportsSetVariable") + public void setSupportsSetVariable(Boolean supportsSetVariable) { + this.supportsSetVariable = supportsSetVariable; + } + + /** + * The debug adapter supports restarting a frame. + * + */ + @JsonProperty("supportsRestartFrame") + public Boolean getSupportsRestartFrame() { + return supportsRestartFrame; + } + + /** + * The debug adapter supports restarting a frame. + * + */ + @JsonProperty("supportsRestartFrame") + public void setSupportsRestartFrame(Boolean supportsRestartFrame) { + this.supportsRestartFrame = supportsRestartFrame; + } + + /** + * The debug adapter supports the `gotoTargets` request. + * + */ + @JsonProperty("supportsGotoTargetsRequest") + public Boolean getSupportsGotoTargetsRequest() { + return supportsGotoTargetsRequest; + } + + /** + * The debug adapter supports the `gotoTargets` request. + * + */ + @JsonProperty("supportsGotoTargetsRequest") + public void setSupportsGotoTargetsRequest(Boolean supportsGotoTargetsRequest) { + this.supportsGotoTargetsRequest = supportsGotoTargetsRequest; + } + + /** + * The debug adapter supports the `stepInTargets` request. + * + */ + @JsonProperty("supportsStepInTargetsRequest") + public Boolean getSupportsStepInTargetsRequest() { + return supportsStepInTargetsRequest; + } + + /** + * The debug adapter supports the `stepInTargets` request. + * + */ + @JsonProperty("supportsStepInTargetsRequest") + public void setSupportsStepInTargetsRequest(Boolean supportsStepInTargetsRequest) { + this.supportsStepInTargetsRequest = supportsStepInTargetsRequest; + } + + /** + * The debug adapter supports the `completions` request. + * + */ + @JsonProperty("supportsCompletionsRequest") + public Boolean getSupportsCompletionsRequest() { + return supportsCompletionsRequest; + } + + /** + * The debug adapter supports the `completions` request. + * + */ + @JsonProperty("supportsCompletionsRequest") + public void setSupportsCompletionsRequest(Boolean supportsCompletionsRequest) { + this.supportsCompletionsRequest = supportsCompletionsRequest; + } + + /** + * The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character. + * + */ + @JsonProperty("completionTriggerCharacters") + public List getCompletionTriggerCharacters() { + return completionTriggerCharacters; + } + + /** + * The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character. + * + */ + @JsonProperty("completionTriggerCharacters") + public void setCompletionTriggerCharacters(List completionTriggerCharacters) { + this.completionTriggerCharacters = completionTriggerCharacters; + } + + /** + * The debug adapter supports the `modules` request. + * + */ + @JsonProperty("supportsModulesRequest") + public Boolean getSupportsModulesRequest() { + return supportsModulesRequest; + } + + /** + * The debug adapter supports the `modules` request. + * + */ + @JsonProperty("supportsModulesRequest") + public void setSupportsModulesRequest(Boolean supportsModulesRequest) { + this.supportsModulesRequest = supportsModulesRequest; + } + + /** + * The set of additional module information exposed by the debug adapter. + * + */ + @JsonProperty("additionalModuleColumns") + public List getAdditionalModuleColumns() { + return additionalModuleColumns; + } + + /** + * The set of additional module information exposed by the debug adapter. + * + */ + @JsonProperty("additionalModuleColumns") + public void setAdditionalModuleColumns(List additionalModuleColumns) { + this.additionalModuleColumns = additionalModuleColumns; + } + + /** + * Checksum algorithms supported by the debug adapter. + * + */ + @JsonProperty("supportedChecksumAlgorithms") + public List getSupportedChecksumAlgorithms() { + return supportedChecksumAlgorithms; + } + + /** + * Checksum algorithms supported by the debug adapter. + * + */ + @JsonProperty("supportedChecksumAlgorithms") + public void setSupportedChecksumAlgorithms(List supportedChecksumAlgorithms) { + this.supportedChecksumAlgorithms = supportedChecksumAlgorithms; + } + + /** + * The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request. + * + */ + @JsonProperty("supportsRestartRequest") + public Boolean getSupportsRestartRequest() { + return supportsRestartRequest; + } + + /** + * The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request. + * + */ + @JsonProperty("supportsRestartRequest") + public void setSupportsRestartRequest(Boolean supportsRestartRequest) { + this.supportsRestartRequest = supportsRestartRequest; + } + + /** + * The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("supportsExceptionOptions") + public Boolean getSupportsExceptionOptions() { + return supportsExceptionOptions; + } + + /** + * The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("supportsExceptionOptions") + public void setSupportsExceptionOptions(Boolean supportsExceptionOptions) { + this.supportsExceptionOptions = supportsExceptionOptions; + } + + /** + * The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests. + * + */ + @JsonProperty("supportsValueFormattingOptions") + public Boolean getSupportsValueFormattingOptions() { + return supportsValueFormattingOptions; + } + + /** + * The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests. + * + */ + @JsonProperty("supportsValueFormattingOptions") + public void setSupportsValueFormattingOptions(Boolean supportsValueFormattingOptions) { + this.supportsValueFormattingOptions = supportsValueFormattingOptions; + } + + /** + * The debug adapter supports the `exceptionInfo` request. + * + */ + @JsonProperty("supportsExceptionInfoRequest") + public Boolean getSupportsExceptionInfoRequest() { + return supportsExceptionInfoRequest; + } + + /** + * The debug adapter supports the `exceptionInfo` request. + * + */ + @JsonProperty("supportsExceptionInfoRequest") + public void setSupportsExceptionInfoRequest(Boolean supportsExceptionInfoRequest) { + this.supportsExceptionInfoRequest = supportsExceptionInfoRequest; + } + + /** + * The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. + * + */ + @JsonProperty("supportTerminateDebuggee") + public Boolean getSupportTerminateDebuggee() { + return supportTerminateDebuggee; + } + + /** + * The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. + * + */ + @JsonProperty("supportTerminateDebuggee") + public void setSupportTerminateDebuggee(Boolean supportTerminateDebuggee) { + this.supportTerminateDebuggee = supportTerminateDebuggee; + } + + /** + * The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. + * + */ + @JsonProperty("supportSuspendDebuggee") + public Boolean getSupportSuspendDebuggee() { + return supportSuspendDebuggee; + } + + /** + * The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. + * + */ + @JsonProperty("supportSuspendDebuggee") + public void setSupportSuspendDebuggee(Boolean supportSuspendDebuggee) { + this.supportSuspendDebuggee = supportSuspendDebuggee; + } + + /** + * The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported. + * + */ + @JsonProperty("supportsDelayedStackTraceLoading") + public Boolean getSupportsDelayedStackTraceLoading() { + return supportsDelayedStackTraceLoading; + } + + /** + * The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported. + * + */ + @JsonProperty("supportsDelayedStackTraceLoading") + public void setSupportsDelayedStackTraceLoading(Boolean supportsDelayedStackTraceLoading) { + this.supportsDelayedStackTraceLoading = supportsDelayedStackTraceLoading; + } + + /** + * The debug adapter supports the `loadedSources` request. + * + */ + @JsonProperty("supportsLoadedSourcesRequest") + public Boolean getSupportsLoadedSourcesRequest() { + return supportsLoadedSourcesRequest; + } + + /** + * The debug adapter supports the `loadedSources` request. + * + */ + @JsonProperty("supportsLoadedSourcesRequest") + public void setSupportsLoadedSourcesRequest(Boolean supportsLoadedSourcesRequest) { + this.supportsLoadedSourcesRequest = supportsLoadedSourcesRequest; + } + + /** + * The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`. + * + */ + @JsonProperty("supportsLogPoints") + public Boolean getSupportsLogPoints() { + return supportsLogPoints; + } + + /** + * The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`. + * + */ + @JsonProperty("supportsLogPoints") + public void setSupportsLogPoints(Boolean supportsLogPoints) { + this.supportsLogPoints = supportsLogPoints; + } + + /** + * The debug adapter supports the `terminateThreads` request. + * + */ + @JsonProperty("supportsTerminateThreadsRequest") + public Boolean getSupportsTerminateThreadsRequest() { + return supportsTerminateThreadsRequest; + } + + /** + * The debug adapter supports the `terminateThreads` request. + * + */ + @JsonProperty("supportsTerminateThreadsRequest") + public void setSupportsTerminateThreadsRequest(Boolean supportsTerminateThreadsRequest) { + this.supportsTerminateThreadsRequest = supportsTerminateThreadsRequest; + } + + /** + * The debug adapter supports the `setExpression` request. + * + */ + @JsonProperty("supportsSetExpression") + public Boolean getSupportsSetExpression() { + return supportsSetExpression; + } + + /** + * The debug adapter supports the `setExpression` request. + * + */ + @JsonProperty("supportsSetExpression") + public void setSupportsSetExpression(Boolean supportsSetExpression) { + this.supportsSetExpression = supportsSetExpression; + } + + /** + * The debug adapter supports the `terminate` request. + * + */ + @JsonProperty("supportsTerminateRequest") + public Boolean getSupportsTerminateRequest() { + return supportsTerminateRequest; + } + + /** + * The debug adapter supports the `terminate` request. + * + */ + @JsonProperty("supportsTerminateRequest") + public void setSupportsTerminateRequest(Boolean supportsTerminateRequest) { + this.supportsTerminateRequest = supportsTerminateRequest; + } + + /** + * The debug adapter supports data breakpoints. + * + */ + @JsonProperty("supportsDataBreakpoints") + public Boolean getSupportsDataBreakpoints() { + return supportsDataBreakpoints; + } + + /** + * The debug adapter supports data breakpoints. + * + */ + @JsonProperty("supportsDataBreakpoints") + public void setSupportsDataBreakpoints(Boolean supportsDataBreakpoints) { + this.supportsDataBreakpoints = supportsDataBreakpoints; + } + + /** + * The debug adapter supports the `readMemory` request. + * + */ + @JsonProperty("supportsReadMemoryRequest") + public Boolean getSupportsReadMemoryRequest() { + return supportsReadMemoryRequest; + } + + /** + * The debug adapter supports the `readMemory` request. + * + */ + @JsonProperty("supportsReadMemoryRequest") + public void setSupportsReadMemoryRequest(Boolean supportsReadMemoryRequest) { + this.supportsReadMemoryRequest = supportsReadMemoryRequest; + } + + /** + * The debug adapter supports the `writeMemory` request. + * + */ + @JsonProperty("supportsWriteMemoryRequest") + public Boolean getSupportsWriteMemoryRequest() { + return supportsWriteMemoryRequest; + } + + /** + * The debug adapter supports the `writeMemory` request. + * + */ + @JsonProperty("supportsWriteMemoryRequest") + public void setSupportsWriteMemoryRequest(Boolean supportsWriteMemoryRequest) { + this.supportsWriteMemoryRequest = supportsWriteMemoryRequest; + } + + /** + * The debug adapter supports the `disassemble` request. + * + */ + @JsonProperty("supportsDisassembleRequest") + public Boolean getSupportsDisassembleRequest() { + return supportsDisassembleRequest; + } + + /** + * The debug adapter supports the `disassemble` request. + * + */ + @JsonProperty("supportsDisassembleRequest") + public void setSupportsDisassembleRequest(Boolean supportsDisassembleRequest) { + this.supportsDisassembleRequest = supportsDisassembleRequest; + } + + /** + * The debug adapter supports the `cancel` request. + * + */ + @JsonProperty("supportsCancelRequest") + public Boolean getSupportsCancelRequest() { + return supportsCancelRequest; + } + + /** + * The debug adapter supports the `cancel` request. + * + */ + @JsonProperty("supportsCancelRequest") + public void setSupportsCancelRequest(Boolean supportsCancelRequest) { + this.supportsCancelRequest = supportsCancelRequest; + } + + /** + * The debug adapter supports the `breakpointLocations` request. + * + */ + @JsonProperty("supportsBreakpointLocationsRequest") + public Boolean getSupportsBreakpointLocationsRequest() { + return supportsBreakpointLocationsRequest; + } + + /** + * The debug adapter supports the `breakpointLocations` request. + * + */ + @JsonProperty("supportsBreakpointLocationsRequest") + public void setSupportsBreakpointLocationsRequest(Boolean supportsBreakpointLocationsRequest) { + this.supportsBreakpointLocationsRequest = supportsBreakpointLocationsRequest; + } + + /** + * The debug adapter supports the `clipboard` context value in the `evaluate` request. + * + */ + @JsonProperty("supportsClipboardContext") + public Boolean getSupportsClipboardContext() { + return supportsClipboardContext; + } + + /** + * The debug adapter supports the `clipboard` context value in the `evaluate` request. + * + */ + @JsonProperty("supportsClipboardContext") + public void setSupportsClipboardContext(Boolean supportsClipboardContext) { + this.supportsClipboardContext = supportsClipboardContext; + } + + /** + * The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests. + * + */ + @JsonProperty("supportsSteppingGranularity") + public Boolean getSupportsSteppingGranularity() { + return supportsSteppingGranularity; + } + + /** + * The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests. + * + */ + @JsonProperty("supportsSteppingGranularity") + public void setSupportsSteppingGranularity(Boolean supportsSteppingGranularity) { + this.supportsSteppingGranularity = supportsSteppingGranularity; + } + + /** + * The debug adapter supports adding breakpoints based on instruction references. + * + */ + @JsonProperty("supportsInstructionBreakpoints") + public Boolean getSupportsInstructionBreakpoints() { + return supportsInstructionBreakpoints; + } + + /** + * The debug adapter supports adding breakpoints based on instruction references. + * + */ + @JsonProperty("supportsInstructionBreakpoints") + public void setSupportsInstructionBreakpoints(Boolean supportsInstructionBreakpoints) { + this.supportsInstructionBreakpoints = supportsInstructionBreakpoints; + } + + /** + * The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("supportsExceptionFilterOptions") + public Boolean getSupportsExceptionFilterOptions() { + return supportsExceptionFilterOptions; + } + + /** + * The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("supportsExceptionFilterOptions") + public void setSupportsExceptionFilterOptions(Boolean supportsExceptionFilterOptions) { + this.supportsExceptionFilterOptions = supportsExceptionFilterOptions; + } + + /** + * The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). + * + */ + @JsonProperty("supportsSingleThreadExecutionRequests") + public Boolean getSupportsSingleThreadExecutionRequests() { + return supportsSingleThreadExecutionRequests; + } + + /** + * The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). + * + */ + @JsonProperty("supportsSingleThreadExecutionRequests") + public void setSupportsSingleThreadExecutionRequests(Boolean supportsSingleThreadExecutionRequests) { + this.supportsSingleThreadExecutionRequests = supportsSingleThreadExecutionRequests; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Capabilities.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("supportsConfigurationDoneRequest"); + sb.append('='); + sb.append(((this.supportsConfigurationDoneRequest == null)?"":this.supportsConfigurationDoneRequest)); + sb.append(','); + sb.append("supportsFunctionBreakpoints"); + sb.append('='); + sb.append(((this.supportsFunctionBreakpoints == null)?"":this.supportsFunctionBreakpoints)); + sb.append(','); + sb.append("supportsConditionalBreakpoints"); + sb.append('='); + sb.append(((this.supportsConditionalBreakpoints == null)?"":this.supportsConditionalBreakpoints)); + sb.append(','); + sb.append("supportsHitConditionalBreakpoints"); + sb.append('='); + sb.append(((this.supportsHitConditionalBreakpoints == null)?"":this.supportsHitConditionalBreakpoints)); + sb.append(','); + sb.append("supportsEvaluateForHovers"); + sb.append('='); + sb.append(((this.supportsEvaluateForHovers == null)?"":this.supportsEvaluateForHovers)); + sb.append(','); + sb.append("exceptionBreakpointFilters"); + sb.append('='); + sb.append(((this.exceptionBreakpointFilters == null)?"":this.exceptionBreakpointFilters)); + sb.append(','); + sb.append("supportsStepBack"); + sb.append('='); + sb.append(((this.supportsStepBack == null)?"":this.supportsStepBack)); + sb.append(','); + sb.append("supportsSetVariable"); + sb.append('='); + sb.append(((this.supportsSetVariable == null)?"":this.supportsSetVariable)); + sb.append(','); + sb.append("supportsRestartFrame"); + sb.append('='); + sb.append(((this.supportsRestartFrame == null)?"":this.supportsRestartFrame)); + sb.append(','); + sb.append("supportsGotoTargetsRequest"); + sb.append('='); + sb.append(((this.supportsGotoTargetsRequest == null)?"":this.supportsGotoTargetsRequest)); + sb.append(','); + sb.append("supportsStepInTargetsRequest"); + sb.append('='); + sb.append(((this.supportsStepInTargetsRequest == null)?"":this.supportsStepInTargetsRequest)); + sb.append(','); + sb.append("supportsCompletionsRequest"); + sb.append('='); + sb.append(((this.supportsCompletionsRequest == null)?"":this.supportsCompletionsRequest)); + sb.append(','); + sb.append("completionTriggerCharacters"); + sb.append('='); + sb.append(((this.completionTriggerCharacters == null)?"":this.completionTriggerCharacters)); + sb.append(','); + sb.append("supportsModulesRequest"); + sb.append('='); + sb.append(((this.supportsModulesRequest == null)?"":this.supportsModulesRequest)); + sb.append(','); + sb.append("additionalModuleColumns"); + sb.append('='); + sb.append(((this.additionalModuleColumns == null)?"":this.additionalModuleColumns)); + sb.append(','); + sb.append("supportedChecksumAlgorithms"); + sb.append('='); + sb.append(((this.supportedChecksumAlgorithms == null)?"":this.supportedChecksumAlgorithms)); + sb.append(','); + sb.append("supportsRestartRequest"); + sb.append('='); + sb.append(((this.supportsRestartRequest == null)?"":this.supportsRestartRequest)); + sb.append(','); + sb.append("supportsExceptionOptions"); + sb.append('='); + sb.append(((this.supportsExceptionOptions == null)?"":this.supportsExceptionOptions)); + sb.append(','); + sb.append("supportsValueFormattingOptions"); + sb.append('='); + sb.append(((this.supportsValueFormattingOptions == null)?"":this.supportsValueFormattingOptions)); + sb.append(','); + sb.append("supportsExceptionInfoRequest"); + sb.append('='); + sb.append(((this.supportsExceptionInfoRequest == null)?"":this.supportsExceptionInfoRequest)); + sb.append(','); + sb.append("supportTerminateDebuggee"); + sb.append('='); + sb.append(((this.supportTerminateDebuggee == null)?"":this.supportTerminateDebuggee)); + sb.append(','); + sb.append("supportSuspendDebuggee"); + sb.append('='); + sb.append(((this.supportSuspendDebuggee == null)?"":this.supportSuspendDebuggee)); + sb.append(','); + sb.append("supportsDelayedStackTraceLoading"); + sb.append('='); + sb.append(((this.supportsDelayedStackTraceLoading == null)?"":this.supportsDelayedStackTraceLoading)); + sb.append(','); + sb.append("supportsLoadedSourcesRequest"); + sb.append('='); + sb.append(((this.supportsLoadedSourcesRequest == null)?"":this.supportsLoadedSourcesRequest)); + sb.append(','); + sb.append("supportsLogPoints"); + sb.append('='); + sb.append(((this.supportsLogPoints == null)?"":this.supportsLogPoints)); + sb.append(','); + sb.append("supportsTerminateThreadsRequest"); + sb.append('='); + sb.append(((this.supportsTerminateThreadsRequest == null)?"":this.supportsTerminateThreadsRequest)); + sb.append(','); + sb.append("supportsSetExpression"); + sb.append('='); + sb.append(((this.supportsSetExpression == null)?"":this.supportsSetExpression)); + sb.append(','); + sb.append("supportsTerminateRequest"); + sb.append('='); + sb.append(((this.supportsTerminateRequest == null)?"":this.supportsTerminateRequest)); + sb.append(','); + sb.append("supportsDataBreakpoints"); + sb.append('='); + sb.append(((this.supportsDataBreakpoints == null)?"":this.supportsDataBreakpoints)); + sb.append(','); + sb.append("supportsReadMemoryRequest"); + sb.append('='); + sb.append(((this.supportsReadMemoryRequest == null)?"":this.supportsReadMemoryRequest)); + sb.append(','); + sb.append("supportsWriteMemoryRequest"); + sb.append('='); + sb.append(((this.supportsWriteMemoryRequest == null)?"":this.supportsWriteMemoryRequest)); + sb.append(','); + sb.append("supportsDisassembleRequest"); + sb.append('='); + sb.append(((this.supportsDisassembleRequest == null)?"":this.supportsDisassembleRequest)); + sb.append(','); + sb.append("supportsCancelRequest"); + sb.append('='); + sb.append(((this.supportsCancelRequest == null)?"":this.supportsCancelRequest)); + sb.append(','); + sb.append("supportsBreakpointLocationsRequest"); + sb.append('='); + sb.append(((this.supportsBreakpointLocationsRequest == null)?"":this.supportsBreakpointLocationsRequest)); + sb.append(','); + sb.append("supportsClipboardContext"); + sb.append('='); + sb.append(((this.supportsClipboardContext == null)?"":this.supportsClipboardContext)); + sb.append(','); + sb.append("supportsSteppingGranularity"); + sb.append('='); + sb.append(((this.supportsSteppingGranularity == null)?"":this.supportsSteppingGranularity)); + sb.append(','); + sb.append("supportsInstructionBreakpoints"); + sb.append('='); + sb.append(((this.supportsInstructionBreakpoints == null)?"":this.supportsInstructionBreakpoints)); + sb.append(','); + sb.append("supportsExceptionFilterOptions"); + sb.append('='); + sb.append(((this.supportsExceptionFilterOptions == null)?"":this.supportsExceptionFilterOptions)); + sb.append(','); + sb.append("supportsSingleThreadExecutionRequests"); + sb.append('='); + sb.append(((this.supportsSingleThreadExecutionRequests == null)?"":this.supportsSingleThreadExecutionRequests)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.supportsSetExpression == null)? 0 :this.supportsSetExpression.hashCode())); + result = ((result* 31)+((this.supportsDisassembleRequest == null)? 0 :this.supportsDisassembleRequest.hashCode())); + result = ((result* 31)+((this.supportsRestartFrame == null)? 0 :this.supportsRestartFrame.hashCode())); + result = ((result* 31)+((this.supportsTerminateRequest == null)? 0 :this.supportsTerminateRequest.hashCode())); + result = ((result* 31)+((this.supportsConfigurationDoneRequest == null)? 0 :this.supportsConfigurationDoneRequest.hashCode())); + result = ((result* 31)+((this.supportSuspendDebuggee == null)? 0 :this.supportSuspendDebuggee.hashCode())); + result = ((result* 31)+((this.supportsRestartRequest == null)? 0 :this.supportsRestartRequest.hashCode())); + result = ((result* 31)+((this.supportsGotoTargetsRequest == null)? 0 :this.supportsGotoTargetsRequest.hashCode())); + result = ((result* 31)+((this.supportsConditionalBreakpoints == null)? 0 :this.supportsConditionalBreakpoints.hashCode())); + result = ((result* 31)+((this.supportsModulesRequest == null)? 0 :this.supportsModulesRequest.hashCode())); + result = ((result* 31)+((this.supportsCancelRequest == null)? 0 :this.supportsCancelRequest.hashCode())); + result = ((result* 31)+((this.supportsHitConditionalBreakpoints == null)? 0 :this.supportsHitConditionalBreakpoints.hashCode())); + result = ((result* 31)+((this.supportsLogPoints == null)? 0 :this.supportsLogPoints.hashCode())); + result = ((result* 31)+((this.supportedChecksumAlgorithms == null)? 0 :this.supportedChecksumAlgorithms.hashCode())); + result = ((result* 31)+((this.supportsReadMemoryRequest == null)? 0 :this.supportsReadMemoryRequest.hashCode())); + result = ((result* 31)+((this.supportsExceptionFilterOptions == null)? 0 :this.supportsExceptionFilterOptions.hashCode())); + result = ((result* 31)+((this.exceptionBreakpointFilters == null)? 0 :this.exceptionBreakpointFilters.hashCode())); + result = ((result* 31)+((this.supportsStepInTargetsRequest == null)? 0 :this.supportsStepInTargetsRequest.hashCode())); + result = ((result* 31)+((this.supportsLoadedSourcesRequest == null)? 0 :this.supportsLoadedSourcesRequest.hashCode())); + result = ((result* 31)+((this.supportsTerminateThreadsRequest == null)? 0 :this.supportsTerminateThreadsRequest.hashCode())); + result = ((result* 31)+((this.supportsExceptionInfoRequest == null)? 0 :this.supportsExceptionInfoRequest.hashCode())); + result = ((result* 31)+((this.completionTriggerCharacters == null)? 0 :this.completionTriggerCharacters.hashCode())); + result = ((result* 31)+((this.supportsValueFormattingOptions == null)? 0 :this.supportsValueFormattingOptions.hashCode())); + result = ((result* 31)+((this.supportsCompletionsRequest == null)? 0 :this.supportsCompletionsRequest.hashCode())); + result = ((result* 31)+((this.supportTerminateDebuggee == null)? 0 :this.supportTerminateDebuggee.hashCode())); + result = ((result* 31)+((this.supportsSteppingGranularity == null)? 0 :this.supportsSteppingGranularity.hashCode())); + result = ((result* 31)+((this.supportsDelayedStackTraceLoading == null)? 0 :this.supportsDelayedStackTraceLoading.hashCode())); + result = ((result* 31)+((this.supportsSingleThreadExecutionRequests == null)? 0 :this.supportsSingleThreadExecutionRequests.hashCode())); + result = ((result* 31)+((this.supportsDataBreakpoints == null)? 0 :this.supportsDataBreakpoints.hashCode())); + result = ((result* 31)+((this.supportsEvaluateForHovers == null)? 0 :this.supportsEvaluateForHovers.hashCode())); + result = ((result* 31)+((this.additionalModuleColumns == null)? 0 :this.additionalModuleColumns.hashCode())); + result = ((result* 31)+((this.supportsFunctionBreakpoints == null)? 0 :this.supportsFunctionBreakpoints.hashCode())); + result = ((result* 31)+((this.supportsBreakpointLocationsRequest == null)? 0 :this.supportsBreakpointLocationsRequest.hashCode())); + result = ((result* 31)+((this.supportsInstructionBreakpoints == null)? 0 :this.supportsInstructionBreakpoints.hashCode())); + result = ((result* 31)+((this.supportsStepBack == null)? 0 :this.supportsStepBack.hashCode())); + result = ((result* 31)+((this.supportsExceptionOptions == null)? 0 :this.supportsExceptionOptions.hashCode())); + result = ((result* 31)+((this.supportsSetVariable == null)? 0 :this.supportsSetVariable.hashCode())); + result = ((result* 31)+((this.supportsClipboardContext == null)? 0 :this.supportsClipboardContext.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.supportsWriteMemoryRequest == null)? 0 :this.supportsWriteMemoryRequest.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Capabilities) == false) { + return false; + } + Capabilities rhs = ((Capabilities) other); + return (((((((((((((((((((((((((((((((((((((((((this.supportsSetExpression == rhs.supportsSetExpression)||((this.supportsSetExpression!= null)&&this.supportsSetExpression.equals(rhs.supportsSetExpression)))&&((this.supportsDisassembleRequest == rhs.supportsDisassembleRequest)||((this.supportsDisassembleRequest!= null)&&this.supportsDisassembleRequest.equals(rhs.supportsDisassembleRequest))))&&((this.supportsRestartFrame == rhs.supportsRestartFrame)||((this.supportsRestartFrame!= null)&&this.supportsRestartFrame.equals(rhs.supportsRestartFrame))))&&((this.supportsTerminateRequest == rhs.supportsTerminateRequest)||((this.supportsTerminateRequest!= null)&&this.supportsTerminateRequest.equals(rhs.supportsTerminateRequest))))&&((this.supportsConfigurationDoneRequest == rhs.supportsConfigurationDoneRequest)||((this.supportsConfigurationDoneRequest!= null)&&this.supportsConfigurationDoneRequest.equals(rhs.supportsConfigurationDoneRequest))))&&((this.supportSuspendDebuggee == rhs.supportSuspendDebuggee)||((this.supportSuspendDebuggee!= null)&&this.supportSuspendDebuggee.equals(rhs.supportSuspendDebuggee))))&&((this.supportsRestartRequest == rhs.supportsRestartRequest)||((this.supportsRestartRequest!= null)&&this.supportsRestartRequest.equals(rhs.supportsRestartRequest))))&&((this.supportsGotoTargetsRequest == rhs.supportsGotoTargetsRequest)||((this.supportsGotoTargetsRequest!= null)&&this.supportsGotoTargetsRequest.equals(rhs.supportsGotoTargetsRequest))))&&((this.supportsConditionalBreakpoints == rhs.supportsConditionalBreakpoints)||((this.supportsConditionalBreakpoints!= null)&&this.supportsConditionalBreakpoints.equals(rhs.supportsConditionalBreakpoints))))&&((this.supportsModulesRequest == rhs.supportsModulesRequest)||((this.supportsModulesRequest!= null)&&this.supportsModulesRequest.equals(rhs.supportsModulesRequest))))&&((this.supportsCancelRequest == rhs.supportsCancelRequest)||((this.supportsCancelRequest!= null)&&this.supportsCancelRequest.equals(rhs.supportsCancelRequest))))&&((this.supportsHitConditionalBreakpoints == rhs.supportsHitConditionalBreakpoints)||((this.supportsHitConditionalBreakpoints!= null)&&this.supportsHitConditionalBreakpoints.equals(rhs.supportsHitConditionalBreakpoints))))&&((this.supportsLogPoints == rhs.supportsLogPoints)||((this.supportsLogPoints!= null)&&this.supportsLogPoints.equals(rhs.supportsLogPoints))))&&((this.supportedChecksumAlgorithms == rhs.supportedChecksumAlgorithms)||((this.supportedChecksumAlgorithms!= null)&&this.supportedChecksumAlgorithms.equals(rhs.supportedChecksumAlgorithms))))&&((this.supportsReadMemoryRequest == rhs.supportsReadMemoryRequest)||((this.supportsReadMemoryRequest!= null)&&this.supportsReadMemoryRequest.equals(rhs.supportsReadMemoryRequest))))&&((this.supportsExceptionFilterOptions == rhs.supportsExceptionFilterOptions)||((this.supportsExceptionFilterOptions!= null)&&this.supportsExceptionFilterOptions.equals(rhs.supportsExceptionFilterOptions))))&&((this.exceptionBreakpointFilters == rhs.exceptionBreakpointFilters)||((this.exceptionBreakpointFilters!= null)&&this.exceptionBreakpointFilters.equals(rhs.exceptionBreakpointFilters))))&&((this.supportsStepInTargetsRequest == rhs.supportsStepInTargetsRequest)||((this.supportsStepInTargetsRequest!= null)&&this.supportsStepInTargetsRequest.equals(rhs.supportsStepInTargetsRequest))))&&((this.supportsLoadedSourcesRequest == rhs.supportsLoadedSourcesRequest)||((this.supportsLoadedSourcesRequest!= null)&&this.supportsLoadedSourcesRequest.equals(rhs.supportsLoadedSourcesRequest))))&&((this.supportsTerminateThreadsRequest == rhs.supportsTerminateThreadsRequest)||((this.supportsTerminateThreadsRequest!= null)&&this.supportsTerminateThreadsRequest.equals(rhs.supportsTerminateThreadsRequest))))&&((this.supportsExceptionInfoRequest == rhs.supportsExceptionInfoRequest)||((this.supportsExceptionInfoRequest!= null)&&this.supportsExceptionInfoRequest.equals(rhs.supportsExceptionInfoRequest))))&&((this.completionTriggerCharacters == rhs.completionTriggerCharacters)||((this.completionTriggerCharacters!= null)&&this.completionTriggerCharacters.equals(rhs.completionTriggerCharacters))))&&((this.supportsValueFormattingOptions == rhs.supportsValueFormattingOptions)||((this.supportsValueFormattingOptions!= null)&&this.supportsValueFormattingOptions.equals(rhs.supportsValueFormattingOptions))))&&((this.supportsCompletionsRequest == rhs.supportsCompletionsRequest)||((this.supportsCompletionsRequest!= null)&&this.supportsCompletionsRequest.equals(rhs.supportsCompletionsRequest))))&&((this.supportTerminateDebuggee == rhs.supportTerminateDebuggee)||((this.supportTerminateDebuggee!= null)&&this.supportTerminateDebuggee.equals(rhs.supportTerminateDebuggee))))&&((this.supportsSteppingGranularity == rhs.supportsSteppingGranularity)||((this.supportsSteppingGranularity!= null)&&this.supportsSteppingGranularity.equals(rhs.supportsSteppingGranularity))))&&((this.supportsDelayedStackTraceLoading == rhs.supportsDelayedStackTraceLoading)||((this.supportsDelayedStackTraceLoading!= null)&&this.supportsDelayedStackTraceLoading.equals(rhs.supportsDelayedStackTraceLoading))))&&((this.supportsSingleThreadExecutionRequests == rhs.supportsSingleThreadExecutionRequests)||((this.supportsSingleThreadExecutionRequests!= null)&&this.supportsSingleThreadExecutionRequests.equals(rhs.supportsSingleThreadExecutionRequests))))&&((this.supportsDataBreakpoints == rhs.supportsDataBreakpoints)||((this.supportsDataBreakpoints!= null)&&this.supportsDataBreakpoints.equals(rhs.supportsDataBreakpoints))))&&((this.supportsEvaluateForHovers == rhs.supportsEvaluateForHovers)||((this.supportsEvaluateForHovers!= null)&&this.supportsEvaluateForHovers.equals(rhs.supportsEvaluateForHovers))))&&((this.additionalModuleColumns == rhs.additionalModuleColumns)||((this.additionalModuleColumns!= null)&&this.additionalModuleColumns.equals(rhs.additionalModuleColumns))))&&((this.supportsFunctionBreakpoints == rhs.supportsFunctionBreakpoints)||((this.supportsFunctionBreakpoints!= null)&&this.supportsFunctionBreakpoints.equals(rhs.supportsFunctionBreakpoints))))&&((this.supportsBreakpointLocationsRequest == rhs.supportsBreakpointLocationsRequest)||((this.supportsBreakpointLocationsRequest!= null)&&this.supportsBreakpointLocationsRequest.equals(rhs.supportsBreakpointLocationsRequest))))&&((this.supportsInstructionBreakpoints == rhs.supportsInstructionBreakpoints)||((this.supportsInstructionBreakpoints!= null)&&this.supportsInstructionBreakpoints.equals(rhs.supportsInstructionBreakpoints))))&&((this.supportsStepBack == rhs.supportsStepBack)||((this.supportsStepBack!= null)&&this.supportsStepBack.equals(rhs.supportsStepBack))))&&((this.supportsExceptionOptions == rhs.supportsExceptionOptions)||((this.supportsExceptionOptions!= null)&&this.supportsExceptionOptions.equals(rhs.supportsExceptionOptions))))&&((this.supportsSetVariable == rhs.supportsSetVariable)||((this.supportsSetVariable!= null)&&this.supportsSetVariable.equals(rhs.supportsSetVariable))))&&((this.supportsClipboardContext == rhs.supportsClipboardContext)||((this.supportsClipboardContext!= null)&&this.supportsClipboardContext.equals(rhs.supportsClipboardContext))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.supportsWriteMemoryRequest == rhs.supportsWriteMemoryRequest)||((this.supportsWriteMemoryRequest!= null)&&this.supportsWriteMemoryRequest.equals(rhs.supportsWriteMemoryRequest)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Checksum.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Checksum.java new file mode 100644 index 0000000..24bdaf1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Checksum.java @@ -0,0 +1,192 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * The checksum of an item calculated by the specified algorithm. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "algorithm", + "checksum" +}) +@Generated("jsonschema2pojo") +public class Checksum { + + /** + * Names of checksum algorithms that may be supported by a debug adapter. + * (Required) + * + */ + @JsonProperty("algorithm") + @JsonPropertyDescription("Names of checksum algorithms that may be supported by a debug adapter.") + private ChecksumAlgorithm algorithm; + /** + * Value of the checksum, encoded as a hexadecimal value. + * (Required) + * + */ + @JsonProperty("checksum") + @JsonPropertyDescription("Value of the checksum, encoded as a hexadecimal value.") + private String checksum; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Names of checksum algorithms that may be supported by a debug adapter. + * (Required) + * + */ + @JsonProperty("algorithm") + public ChecksumAlgorithm getAlgorithm() { + return algorithm; + } + + /** + * Names of checksum algorithms that may be supported by a debug adapter. + * (Required) + * + */ + @JsonProperty("algorithm") + public void setAlgorithm(ChecksumAlgorithm algorithm) { + this.algorithm = algorithm; + } + + /** + * Value of the checksum, encoded as a hexadecimal value. + * (Required) + * + */ + @JsonProperty("checksum") + public String getChecksum() { + return checksum; + } + + /** + * Value of the checksum, encoded as a hexadecimal value. + * (Required) + * + */ + @JsonProperty("checksum") + public void setChecksum(String checksum) { + this.checksum = checksum; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Checksum.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("algorithm"); + sb.append('='); + sb.append(((this.algorithm == null)?"":this.algorithm)); + sb.append(','); + sb.append("checksum"); + sb.append('='); + sb.append(((this.checksum == null)?"":this.checksum)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.checksum == null)? 0 :this.checksum.hashCode())); + result = ((result* 31)+((this.algorithm == null)? 0 :this.algorithm.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Checksum) == false) { + return false; + } + Checksum rhs = ((Checksum) other); + return ((((this.checksum == rhs.checksum)||((this.checksum!= null)&&this.checksum.equals(rhs.checksum)))&&((this.algorithm == rhs.algorithm)||((this.algorithm!= null)&&this.algorithm.equals(rhs.algorithm))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + + + /** + * Names of checksum algorithms that may be supported by a debug adapter. + * + */ + @Generated("jsonschema2pojo") + public enum ChecksumAlgorithm { + + MD_5("MD5"), + SHA_1("SHA1"), + SHA_256("SHA256"), + TIMESTAMP("timestamp"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (ChecksumAlgorithm c: values()) { + CONSTANTS.put(c.value, c); + } + } + + ChecksumAlgorithm(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static ChecksumAlgorithm fromValue(String value) { + ChecksumAlgorithm constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ColumnDescriptor.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ColumnDescriptor.java new file mode 100644 index 0000000..827957a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ColumnDescriptor.java @@ -0,0 +1,287 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, + * and what the column's label should be. + * It is only used if the underlying UI actually supports this level of customization. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "attributeName", + "label", + "format", + "type", + "width" +}) +@Generated("jsonschema2pojo") +public class ColumnDescriptor { + + /** + * Name of the attribute rendered in this column. + * (Required) + * + */ + @JsonProperty("attributeName") + @JsonPropertyDescription("Name of the attribute rendered in this column.") + private String attributeName; + /** + * Header UI label of column. + * (Required) + * + */ + @JsonProperty("label") + @JsonPropertyDescription("Header UI label of column.") + private String label; + /** + * Format to use for the rendered values in this column. TBD how the format strings looks like. + * + */ + @JsonProperty("format") + @JsonPropertyDescription("Format to use for the rendered values in this column. TBD how the format strings looks like.") + private String format; + /** + * Datatype of values in this column. Defaults to `string` if not specified. + * + */ + @JsonProperty("type") + @JsonPropertyDescription("Datatype of values in this column. Defaults to `string` if not specified.") + private Type type; + /** + * Width of this column in characters (hint only). + * + */ + @JsonProperty("width") + @JsonPropertyDescription("Width of this column in characters (hint only).") + private Integer width; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Name of the attribute rendered in this column. + * (Required) + * + */ + @JsonProperty("attributeName") + public String getAttributeName() { + return attributeName; + } + + /** + * Name of the attribute rendered in this column. + * (Required) + * + */ + @JsonProperty("attributeName") + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + /** + * Header UI label of column. + * (Required) + * + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * Header UI label of column. + * (Required) + * + */ + @JsonProperty("label") + public void setLabel(String label) { + this.label = label; + } + + /** + * Format to use for the rendered values in this column. TBD how the format strings looks like. + * + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Format to use for the rendered values in this column. TBD how the format strings looks like. + * + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + /** + * Datatype of values in this column. Defaults to `string` if not specified. + * + */ + @JsonProperty("type") + public Type getType() { + return type; + } + + /** + * Datatype of values in this column. Defaults to `string` if not specified. + * + */ + @JsonProperty("type") + public void setType(Type type) { + this.type = type; + } + + /** + * Width of this column in characters (hint only). + * + */ + @JsonProperty("width") + public Integer getWidth() { + return width; + } + + /** + * Width of this column in characters (hint only). + * + */ + @JsonProperty("width") + public void setWidth(Integer width) { + this.width = width; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ColumnDescriptor.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("attributeName"); + sb.append('='); + sb.append(((this.attributeName == null)?"":this.attributeName)); + sb.append(','); + sb.append("label"); + sb.append('='); + sb.append(((this.label == null)?"":this.label)); + sb.append(','); + sb.append("format"); + sb.append('='); + sb.append(((this.format == null)?"":this.format)); + sb.append(','); + sb.append("type"); + sb.append('='); + sb.append(((this.type == null)?"":this.type)); + sb.append(','); + sb.append("width"); + sb.append('='); + sb.append(((this.width == null)?"":this.width)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); + result = ((result* 31)+((this.width == null)? 0 :this.width.hashCode())); + result = ((result* 31)+((this.attributeName == null)? 0 :this.attributeName.hashCode())); + result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ColumnDescriptor) == false) { + return false; + } + ColumnDescriptor rhs = ((ColumnDescriptor) other); + return (((((((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format)))&&((this.width == rhs.width)||((this.width!= null)&&this.width.equals(rhs.width))))&&((this.attributeName == rhs.attributeName)||((this.attributeName!= null)&&this.attributeName.equals(rhs.attributeName))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type)))); + } + + + /** + * Datatype of values in this column. Defaults to `string` if not specified. + * + */ + @Generated("jsonschema2pojo") + public enum Type { + + STRING("string"), + NUMBER("number"), + BOOLEAN("boolean"), + UNIX_TIMESTAMP_UTC("unixTimestampUTC"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Type c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Type(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static Type fromValue(String value) { + Type constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItem.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItem.java new file mode 100644 index 0000000..f4f7de8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItem.java @@ -0,0 +1,421 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * `CompletionItems` are the suggestions returned from the `completions` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "label", + "text", + "sortText", + "detail", + "type", + "start", + "length", + "selectionStart", + "selectionLength" +}) +@Generated("jsonschema2pojo") +public class CompletionItem { + + /** + * The label of this completion item. By default this is also the text that is inserted when selecting this completion. + * (Required) + * + */ + @JsonProperty("label") + @JsonPropertyDescription("The label of this completion item. By default this is also the text that is inserted when selecting this completion.") + private String label; + /** + * If text is returned and not an empty string, then it is inserted instead of the label. + * + */ + @JsonProperty("text") + @JsonPropertyDescription("If text is returned and not an empty string, then it is inserted instead of the label.") + private String text; + /** + * A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead. + * + */ + @JsonProperty("sortText") + @JsonPropertyDescription("A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead.") + private String sortText; + /** + * A human-readable string with additional information about this item, like type or symbol information. + * + */ + @JsonProperty("detail") + @JsonPropertyDescription("A human-readable string with additional information about this item, like type or symbol information.") + private String detail; + /** + * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. + * + */ + @JsonProperty("type") + @JsonPropertyDescription("Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.") + private CompletionItemType type; + /** + * Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request. + * + */ + @JsonProperty("start") + @JsonPropertyDescription("Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request.") + private Integer start; + /** + * Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted. + * + */ + @JsonProperty("length") + @JsonPropertyDescription("Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted.") + private Integer length; + /** + * Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text. + * + */ + @JsonProperty("selectionStart") + @JsonPropertyDescription("Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text.") + private Integer selectionStart; + /** + * Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0. + * + */ + @JsonProperty("selectionLength") + @JsonPropertyDescription("Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0.") + private Integer selectionLength; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The label of this completion item. By default this is also the text that is inserted when selecting this completion. + * (Required) + * + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * The label of this completion item. By default this is also the text that is inserted when selecting this completion. + * (Required) + * + */ + @JsonProperty("label") + public void setLabel(String label) { + this.label = label; + } + + /** + * If text is returned and not an empty string, then it is inserted instead of the label. + * + */ + @JsonProperty("text") + public String getText() { + return text; + } + + /** + * If text is returned and not an empty string, then it is inserted instead of the label. + * + */ + @JsonProperty("text") + public void setText(String text) { + this.text = text; + } + + /** + * A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead. + * + */ + @JsonProperty("sortText") + public String getSortText() { + return sortText; + } + + /** + * A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead. + * + */ + @JsonProperty("sortText") + public void setSortText(String sortText) { + this.sortText = sortText; + } + + /** + * A human-readable string with additional information about this item, like type or symbol information. + * + */ + @JsonProperty("detail") + public String getDetail() { + return detail; + } + + /** + * A human-readable string with additional information about this item, like type or symbol information. + * + */ + @JsonProperty("detail") + public void setDetail(String detail) { + this.detail = detail; + } + + /** + * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. + * + */ + @JsonProperty("type") + public CompletionItemType getType() { + return type; + } + + /** + * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. + * + */ + @JsonProperty("type") + public void setType(CompletionItemType type) { + this.type = type; + } + + /** + * Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request. + * + */ + @JsonProperty("start") + public Integer getStart() { + return start; + } + + /** + * Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request. + * + */ + @JsonProperty("start") + public void setStart(Integer start) { + this.start = start; + } + + /** + * Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted. + * + */ + @JsonProperty("length") + public Integer getLength() { + return length; + } + + /** + * Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted. + * + */ + @JsonProperty("length") + public void setLength(Integer length) { + this.length = length; + } + + /** + * Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text. + * + */ + @JsonProperty("selectionStart") + public Integer getSelectionStart() { + return selectionStart; + } + + /** + * Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text. + * + */ + @JsonProperty("selectionStart") + public void setSelectionStart(Integer selectionStart) { + this.selectionStart = selectionStart; + } + + /** + * Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0. + * + */ + @JsonProperty("selectionLength") + public Integer getSelectionLength() { + return selectionLength; + } + + /** + * Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0. + * + */ + @JsonProperty("selectionLength") + public void setSelectionLength(Integer selectionLength) { + this.selectionLength = selectionLength; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(CompletionItem.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("label"); + sb.append('='); + sb.append(((this.label == null)?"":this.label)); + sb.append(','); + sb.append("text"); + sb.append('='); + sb.append(((this.text == null)?"":this.text)); + sb.append(','); + sb.append("sortText"); + sb.append('='); + sb.append(((this.sortText == null)?"":this.sortText)); + sb.append(','); + sb.append("detail"); + sb.append('='); + sb.append(((this.detail == null)?"":this.detail)); + sb.append(','); + sb.append("type"); + sb.append('='); + sb.append(((this.type == null)?"":this.type)); + sb.append(','); + sb.append("start"); + sb.append('='); + sb.append(((this.start == null)?"":this.start)); + sb.append(','); + sb.append("length"); + sb.append('='); + sb.append(((this.length == null)?"":this.length)); + sb.append(','); + sb.append("selectionStart"); + sb.append('='); + sb.append(((this.selectionStart == null)?"":this.selectionStart)); + sb.append(','); + sb.append("selectionLength"); + sb.append('='); + sb.append(((this.selectionLength == null)?"":this.selectionLength)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.selectionStart == null)? 0 :this.selectionStart.hashCode())); + result = ((result* 31)+((this.sortText == null)? 0 :this.sortText.hashCode())); + result = ((result* 31)+((this.start == null)? 0 :this.start.hashCode())); + result = ((result* 31)+((this.length == null)? 0 :this.length.hashCode())); + result = ((result* 31)+((this.selectionLength == null)? 0 :this.selectionLength.hashCode())); + result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); + result = ((result* 31)+((this.text == null)? 0 :this.text.hashCode())); + result = ((result* 31)+((this.detail == null)? 0 :this.detail.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof CompletionItem) == false) { + return false; + } + CompletionItem rhs = ((CompletionItem) other); + return (((((((((((this.selectionStart == rhs.selectionStart)||((this.selectionStart!= null)&&this.selectionStart.equals(rhs.selectionStart)))&&((this.sortText == rhs.sortText)||((this.sortText!= null)&&this.sortText.equals(rhs.sortText))))&&((this.start == rhs.start)||((this.start!= null)&&this.start.equals(rhs.start))))&&((this.length == rhs.length)||((this.length!= null)&&this.length.equals(rhs.length))))&&((this.selectionLength == rhs.selectionLength)||((this.selectionLength!= null)&&this.selectionLength.equals(rhs.selectionLength))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.text == rhs.text)||((this.text!= null)&&this.text.equals(rhs.text))))&&((this.detail == rhs.detail)||((this.detail!= null)&&this.detail.equals(rhs.detail))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type)))); + } + + + /** + * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. + * + */ + @Generated("jsonschema2pojo") + public enum CompletionItemType { + + METHOD("method"), + FUNCTION("function"), + CONSTRUCTOR("constructor"), + FIELD("field"), + VARIABLE("variable"), + CLASS("class"), + INTERFACE("interface"), + MODULE("module"), + PROPERTY("property"), + UNIT("unit"), + VALUE("value"), + ENUM("enum"), + KEYWORD("keyword"), + SNIPPET("snippet"), + TEXT("text"), + COLOR("color"), + FILE("file"), + REFERENCE("reference"), + CUSTOMCOLOR("customcolor"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (CompletionItemType c: values()) { + CONSTANTS.put(c.value, c); + } + } + + CompletionItemType(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static CompletionItemType fromValue(String value) { + CompletionItemType constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArguments.java new file mode 100644 index 0000000..cb1f434 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArguments.java @@ -0,0 +1,204 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `completions` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "frameId", + "text", + "column", + "line" +}) +@Generated("jsonschema2pojo") +public class CompletionsArguments { + + /** + * Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. + * + */ + @JsonProperty("frameId") + @JsonPropertyDescription("Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope.") + private Integer frameId; + /** + * One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion. + * (Required) + * + */ + @JsonProperty("text") + @JsonPropertyDescription("One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion.") + private String text; + /** + * The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * (Required) + * + */ + @JsonProperty("column") + @JsonPropertyDescription("The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer column; + /** + * A line for which to determine the completion proposals. If missing the first line of the text is assumed. + * + */ + @JsonProperty("line") + @JsonPropertyDescription("A line for which to determine the completion proposals. If missing the first line of the text is assumed.") + private Integer line; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. + * + */ + @JsonProperty("frameId") + public Integer getFrameId() { + return frameId; + } + + /** + * Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. + * + */ + @JsonProperty("frameId") + public void setFrameId(Integer frameId) { + this.frameId = frameId; + } + + /** + * One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion. + * (Required) + * + */ + @JsonProperty("text") + public String getText() { + return text; + } + + /** + * One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion. + * (Required) + * + */ + @JsonProperty("text") + public void setText(String text) { + this.text = text; + } + + /** + * The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * (Required) + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * (Required) + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * A line for which to determine the completion proposals. If missing the first line of the text is assumed. + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * A line for which to determine the completion proposals. If missing the first line of the text is assumed. + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(CompletionsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("frameId"); + sb.append('='); + sb.append(((this.frameId == null)?"":this.frameId)); + sb.append(','); + sb.append("text"); + sb.append('='); + sb.append(((this.text == null)?"":this.text)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.text == null)? 0 :this.text.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof CompletionsArguments) == false) { + return false; + } + CompletionsArguments rhs = ((CompletionsArguments) other); + return ((((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.text == rhs.text)||((this.text!= null)&&this.text.equals(rhs.text))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Configuration.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Configuration.java new file mode 100644 index 0000000..9eba30a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Configuration.java @@ -0,0 +1,73 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + +}) +@Generated("jsonschema2pojo") +public class Configuration { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Configuration.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Configuration) == false) { + return false; + } + Configuration rhs = ((Configuration) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneArguments.java new file mode 100644 index 0000000..d246517 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneArguments.java @@ -0,0 +1,73 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `configurationDone` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + +}) +@Generated("jsonschema2pojo") +public class ConfigurationDoneArguments { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ConfigurationDoneArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ConfigurationDoneArguments) == false) { + return false; + } + ConfigurationDoneArguments rhs = ((ConfigurationDoneArguments) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArguments.java new file mode 100644 index 0000000..fcfc621 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArguments.java @@ -0,0 +1,139 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `continue` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId", + "singleThread" +}) +@Generated("jsonschema2pojo") +public class ContinueArguments { + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed. + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed.") + private Integer threadId; + /** + * If this flag is true, execution is resumed only for the thread with given `threadId`. + * + */ + @JsonProperty("singleThread") + @JsonPropertyDescription("If this flag is true, execution is resumed only for the thread with given `threadId`.") + private Boolean singleThread; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed. + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed. + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + /** + * If this flag is true, execution is resumed only for the thread with given `threadId`. + * + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { + return singleThread; + } + + /** + * If this flag is true, execution is resumed only for the thread with given `threadId`. + * + */ + @JsonProperty("singleThread") + public void setSingleThread(Boolean singleThread) { + this.singleThread = singleThread; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ContinueArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("singleThread"); + sb.append('='); + sb.append(((this.singleThread == null)?"":this.singleThread)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ContinueArguments) == false) { + return false; + } + ContinueArguments rhs = ((ContinueArguments) other); + return ((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java new file mode 100644 index 0000000..f79c800 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java @@ -0,0 +1,4 @@ +package org.tzi.use.monitor.adapter.python.dap; + +public interface DAPEvent { +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java new file mode 100644 index 0000000..9988b7c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java @@ -0,0 +1,4 @@ +package org.tzi.use.monitor.adapter.python.dap; + +public interface DAPRequest { +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java new file mode 100644 index 0000000..273899e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java @@ -0,0 +1,5 @@ +package org.tzi.use.monitor.adapter.python.dap; + +public interface DAPResponse { + int getRequestSequence(); +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpoint.java new file mode 100644 index 0000000..8db7d1d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpoint.java @@ -0,0 +1,253 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * Properties of a data breakpoint passed to the `setDataBreakpoints` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "dataId", + "accessType", + "condition", + "hitCondition" +}) +@Generated("jsonschema2pojo") +public class DataBreakpoint { + + /** + * An id representing the data. This id is returned from the `dataBreakpointInfo` request. + * (Required) + * + */ + @JsonProperty("dataId") + @JsonPropertyDescription("An id representing the data. This id is returned from the `dataBreakpointInfo` request.") + private String dataId; + /** + * This enumeration defines all possible access types for data breakpoints. + * + */ + @JsonProperty("accessType") + @JsonPropertyDescription("This enumeration defines all possible access types for data breakpoints.") + private DataBreakpointAccessType accessType; + /** + * An expression for conditional breakpoints. + * + */ + @JsonProperty("condition") + @JsonPropertyDescription("An expression for conditional breakpoints.") + private String condition; + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * + */ + @JsonProperty("hitCondition") + @JsonPropertyDescription("An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.") + private String hitCondition; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * An id representing the data. This id is returned from the `dataBreakpointInfo` request. + * (Required) + * + */ + @JsonProperty("dataId") + public String getDataId() { + return dataId; + } + + /** + * An id representing the data. This id is returned from the `dataBreakpointInfo` request. + * (Required) + * + */ + @JsonProperty("dataId") + public void setDataId(String dataId) { + this.dataId = dataId; + } + + /** + * This enumeration defines all possible access types for data breakpoints. + * + */ + @JsonProperty("accessType") + public DataBreakpointAccessType getAccessType() { + return accessType; + } + + /** + * This enumeration defines all possible access types for data breakpoints. + * + */ + @JsonProperty("accessType") + public void setAccessType(DataBreakpointAccessType accessType) { + this.accessType = accessType; + } + + /** + * An expression for conditional breakpoints. + * + */ + @JsonProperty("condition") + public String getCondition() { + return condition; + } + + /** + * An expression for conditional breakpoints. + * + */ + @JsonProperty("condition") + public void setCondition(String condition) { + this.condition = condition; + } + + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * + */ + @JsonProperty("hitCondition") + public String getHitCondition() { + return hitCondition; + } + + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * + */ + @JsonProperty("hitCondition") + public void setHitCondition(String hitCondition) { + this.hitCondition = hitCondition; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DataBreakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("dataId"); + sb.append('='); + sb.append(((this.dataId == null)?"":this.dataId)); + sb.append(','); + sb.append("accessType"); + sb.append('='); + sb.append(((this.accessType == null)?"":this.accessType)); + sb.append(','); + sb.append("condition"); + sb.append('='); + sb.append(((this.condition == null)?"":this.condition)); + sb.append(','); + sb.append("hitCondition"); + sb.append('='); + sb.append(((this.hitCondition == null)?"":this.hitCondition)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.accessType == null)? 0 :this.accessType.hashCode())); + result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); + result = ((result* 31)+((this.hitCondition == null)? 0 :this.hitCondition.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.dataId == null)? 0 :this.dataId.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DataBreakpoint) == false) { + return false; + } + DataBreakpoint rhs = ((DataBreakpoint) other); + return ((((((this.accessType == rhs.accessType)||((this.accessType!= null)&&this.accessType.equals(rhs.accessType)))&&((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition))))&&((this.hitCondition == rhs.hitCondition)||((this.hitCondition!= null)&&this.hitCondition.equals(rhs.hitCondition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.dataId == rhs.dataId)||((this.dataId!= null)&&this.dataId.equals(rhs.dataId)))); + } + + + /** + * This enumeration defines all possible access types for data breakpoints. + * + */ + @Generated("jsonschema2pojo") + public enum DataBreakpointAccessType { + + READ("read"), + WRITE("write"), + READ_WRITE("readWrite"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (DataBreakpointAccessType c: values()) { + CONSTANTS.put(c.value, c); + } + } + + DataBreakpointAccessType(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static DataBreakpointAccessType fromValue(String value) { + DataBreakpointAccessType constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArguments.java new file mode 100644 index 0000000..bcca4b5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArguments.java @@ -0,0 +1,173 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `dataBreakpointInfo` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "variablesReference", + "name", + "frameId" +}) +@Generated("jsonschema2pojo") +public class DataBreakpointInfoArguments { + + /** + * Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * + */ + @JsonProperty("variablesReference") + @JsonPropertyDescription("Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") + private Integer variablesReference; + /** + * The name of the variable's child to obtain data breakpoint information for. + * If `variablesReference` isn't specified, this can be an expression. + * (Required) + * + */ + @JsonProperty("name") + @JsonPropertyDescription("The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression.") + private String name; + /** + * When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect. + * + */ + @JsonProperty("frameId") + @JsonPropertyDescription("When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect.") + private Integer frameId; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * + */ + @JsonProperty("variablesReference") + public Integer getVariablesReference() { + return variablesReference; + } + + /** + * Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * + */ + @JsonProperty("variablesReference") + public void setVariablesReference(Integer variablesReference) { + this.variablesReference = variablesReference; + } + + /** + * The name of the variable's child to obtain data breakpoint information for. + * If `variablesReference` isn't specified, this can be an expression. + * (Required) + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * The name of the variable's child to obtain data breakpoint information for. + * If `variablesReference` isn't specified, this can be an expression. + * (Required) + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect. + * + */ + @JsonProperty("frameId") + public Integer getFrameId() { + return frameId; + } + + /** + * When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect. + * + */ + @JsonProperty("frameId") + public void setFrameId(Integer frameId) { + this.frameId = frameId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DataBreakpointInfoArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("variablesReference"); + sb.append('='); + sb.append(((this.variablesReference == null)?"":this.variablesReference)); + sb.append(','); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("frameId"); + sb.append('='); + sb.append(((this.frameId == null)?"":this.frameId)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); + result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DataBreakpointInfoArguments) == false) { + return false; + } + DataBreakpointInfoArguments rhs = ((DataBreakpointInfoArguments) other); + return (((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference))))&&((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DebugProtocol.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DebugProtocol.java new file mode 100644 index 0000000..af054fe --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DebugProtocol.java @@ -0,0 +1,4569 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * Debug Adapter Protocol + *

+ * The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "AttachRequest", + "AttachRequestArguments", + "AttachResponse", + "Breakpoint", + "BreakpointEvent", + "BreakpointLocation", + "BreakpointLocationsArguments", + "BreakpointLocationsRequest", + "BreakpointLocationsResponse", + "CancelArguments", + "CancelRequest", + "CancelResponse", + "Capabilities", + "CapabilitiesEvent", + "Checksum", + "ChecksumAlgorithm", + "ColumnDescriptor", + "CompletionItem", + "CompletionItemType", + "CompletionsArguments", + "CompletionsRequest", + "CompletionsResponse", + "ConfigurationDoneArguments", + "ConfigurationDoneRequest", + "ConfigurationDoneResponse", + "ContinueArguments", + "ContinueRequest", + "ContinueResponse", + "ContinuedEvent", + "DataBreakpoint", + "DataBreakpointAccessType", + "DataBreakpointInfoArguments", + "DataBreakpointInfoRequest", + "DataBreakpointInfoResponse", + "DisassembleArguments", + "DisassembleRequest", + "DisassembleResponse", + "DisassembledInstruction", + "DisconnectArguments", + "DisconnectRequest", + "DisconnectResponse", + "ErrorResponse", + "EvaluateArguments", + "EvaluateRequest", + "EvaluateResponse", + "Event", + "ExceptionBreakMode", + "ExceptionBreakpointsFilter", + "ExceptionDetails", + "ExceptionFilterOptions", + "ExceptionInfoArguments", + "ExceptionInfoRequest", + "ExceptionInfoResponse", + "ExceptionOptions", + "ExceptionPathSegment", + "ExitedEvent", + "FunctionBreakpoint", + "GotoArguments", + "GotoRequest", + "GotoResponse", + "GotoTarget", + "GotoTargetsArguments", + "GotoTargetsRequest", + "GotoTargetsResponse", + "InitializeRequest", + "InitializeRequestArguments", + "InitializeResponse", + "InitializedEvent", + "InstructionBreakpoint", + "InvalidatedAreas", + "InvalidatedEvent", + "LaunchRequest", + "LaunchRequestArguments", + "LaunchResponse", + "LoadedSourceEvent", + "LoadedSourcesArguments", + "LoadedSourcesRequest", + "LoadedSourcesResponse", + "MemoryEvent", + "Message", + "Module", + "ModuleEvent", + "ModulesArguments", + "ModulesRequest", + "ModulesResponse", + "NextArguments", + "NextRequest", + "NextResponse", + "OutputEvent", + "PauseArguments", + "PauseRequest", + "PauseResponse", + "ProcessEvent", + "ProgressEndEvent", + "ProgressStartEvent", + "ProgressUpdateEvent", + "ProtocolMessage", + "ReadMemoryArguments", + "ReadMemoryRequest", + "ReadMemoryResponse", + "Request", + "Response", + "RestartArguments", + "RestartFrameArguments", + "RestartFrameRequest", + "RestartFrameResponse", + "RestartRequest", + "RestartResponse", + "ReverseContinueArguments", + "ReverseContinueRequest", + "ReverseContinueResponse", + "RunInTerminalRequest", + "RunInTerminalRequestArguments", + "RunInTerminalResponse", + "Scope", + "ScopesArguments", + "ScopesRequest", + "ScopesResponse", + "SetBreakpointsArguments", + "SetBreakpointsRequest", + "SetBreakpointsResponse", + "SetDataBreakpointsArguments", + "SetDataBreakpointsRequest", + "SetDataBreakpointsResponse", + "SetExceptionBreakpointsArguments", + "SetExceptionBreakpointsRequest", + "SetExceptionBreakpointsResponse", + "SetExpressionArguments", + "SetExpressionRequest", + "SetExpressionResponse", + "SetFunctionBreakpointsArguments", + "SetFunctionBreakpointsRequest", + "SetFunctionBreakpointsResponse", + "SetInstructionBreakpointsArguments", + "SetInstructionBreakpointsRequest", + "SetInstructionBreakpointsResponse", + "SetVariableArguments", + "SetVariableRequest", + "SetVariableResponse", + "Source", + "SourceArguments", + "SourceBreakpoint", + "SourceRequest", + "SourceResponse", + "StackFrame", + "StackFrameFormat", + "StackTraceArguments", + "StackTraceRequest", + "StackTraceResponse", + "StartDebuggingRequest", + "StartDebuggingRequestArguments", + "StartDebuggingResponse", + "StepBackArguments", + "StepBackRequest", + "StepBackResponse", + "StepInArguments", + "StepInRequest", + "StepInResponse", + "StepInTarget", + "StepInTargetsArguments", + "StepInTargetsRequest", + "StepInTargetsResponse", + "StepOutArguments", + "StepOutRequest", + "StepOutResponse", + "SteppingGranularity", + "StoppedEvent", + "TerminateArguments", + "TerminateRequest", + "TerminateResponse", + "TerminateThreadsArguments", + "TerminateThreadsRequest", + "TerminateThreadsResponse", + "TerminatedEvent", + "Thread", + "ThreadEvent", + "ThreadsRequest", + "ThreadsResponse", + "ValueFormat", + "Variable", + "VariablePresentationHint", + "VariablesArguments", + "VariablesRequest", + "VariablesResponse", + "WriteMemoryArguments", + "WriteMemoryRequest", + "WriteMemoryResponse" +}) +@Generated("jsonschema2pojo") +public class DebugProtocol { + + @JsonProperty("AttachRequest") + private Object attachRequest; + /** + * Arguments for `attach` request. Additional attributes are implementation specific. + * + */ + @JsonProperty("AttachRequestArguments") + @JsonPropertyDescription("Arguments for `attach` request. Additional attributes are implementation specific.") + private AttachRequestArguments attachRequestArguments; + @JsonProperty("AttachResponse") + private Object attachResponse; + /** + * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. + * + */ + @JsonProperty("Breakpoint") + @JsonPropertyDescription("Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.") + private Breakpoint breakpoint; + @JsonProperty("BreakpointEvent") + private Object breakpointEvent; + /** + * Properties of a breakpoint location returned from the `breakpointLocations` request. + * + */ + @JsonProperty("BreakpointLocation") + @JsonPropertyDescription("Properties of a breakpoint location returned from the `breakpointLocations` request.") + private BreakpointLocation breakpointLocation; + /** + * Arguments for `breakpointLocations` request. + * + */ + @JsonProperty("BreakpointLocationsArguments") + @JsonPropertyDescription("Arguments for `breakpointLocations` request.") + private BreakpointLocationsArguments breakpointLocationsArguments; + @JsonProperty("BreakpointLocationsRequest") + private Object breakpointLocationsRequest; + @JsonProperty("BreakpointLocationsResponse") + private Object breakpointLocationsResponse; + /** + * Arguments for `cancel` request. + * + */ + @JsonProperty("CancelArguments") + @JsonPropertyDescription("Arguments for `cancel` request.") + private CancelArguments cancelArguments; + @JsonProperty("CancelRequest") + private Object cancelRequest; + @JsonProperty("CancelResponse") + private Object cancelResponse; + /** + * Types + *

+ * Information about the capabilities of a debug adapter. + * + */ + @JsonProperty("Capabilities") + @JsonPropertyDescription("Information about the capabilities of a debug adapter.") + private Capabilities capabilities; + @JsonProperty("CapabilitiesEvent") + private Object capabilitiesEvent; + /** + * The checksum of an item calculated by the specified algorithm. + * + */ + @JsonProperty("Checksum") + @JsonPropertyDescription("The checksum of an item calculated by the specified algorithm.") + private Checksum checksum; + /** + * Names of checksum algorithms that may be supported by a debug adapter. + * + */ + @JsonProperty("ChecksumAlgorithm") + @JsonPropertyDescription("Names of checksum algorithms that may be supported by a debug adapter.") + private Checksum.ChecksumAlgorithm checksumAlgorithm; + /** + * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, + * and what the column's label should be. + * It is only used if the underlying UI actually supports this level of customization. + * + */ + @JsonProperty("ColumnDescriptor") + @JsonPropertyDescription("A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.") + private ColumnDescriptor columnDescriptor; + /** + * `CompletionItems` are the suggestions returned from the `completions` request. + * + */ + @JsonProperty("CompletionItem") + @JsonPropertyDescription("`CompletionItems` are the suggestions returned from the `completions` request.") + private CompletionItem completionItem; + /** + * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. + * + */ + @JsonProperty("CompletionItemType") + @JsonPropertyDescription("Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.") + private CompletionItem.CompletionItemType completionItemType; + /** + * Arguments for `completions` request. + * + */ + @JsonProperty("CompletionsArguments") + @JsonPropertyDescription("Arguments for `completions` request.") + private CompletionsArguments completionsArguments; + @JsonProperty("CompletionsRequest") + private Object completionsRequest; + @JsonProperty("CompletionsResponse") + private Object completionsResponse; + /** + * Arguments for `configurationDone` request. + * + */ + @JsonProperty("ConfigurationDoneArguments") + @JsonPropertyDescription("Arguments for `configurationDone` request.") + private ConfigurationDoneArguments configurationDoneArguments; + @JsonProperty("ConfigurationDoneRequest") + private Object configurationDoneRequest; + @JsonProperty("ConfigurationDoneResponse") + private Object configurationDoneResponse; + /** + * Arguments for `continue` request. + * + */ + @JsonProperty("ContinueArguments") + @JsonPropertyDescription("Arguments for `continue` request.") + private ContinueArguments continueArguments; + @JsonProperty("ContinueRequest") + private Object continueRequest; + @JsonProperty("ContinueResponse") + private Object continueResponse; + @JsonProperty("ContinuedEvent") + private Object continuedEvent; + /** + * Properties of a data breakpoint passed to the `setDataBreakpoints` request. + * + */ + @JsonProperty("DataBreakpoint") + @JsonPropertyDescription("Properties of a data breakpoint passed to the `setDataBreakpoints` request.") + private DataBreakpoint dataBreakpoint; + /** + * This enumeration defines all possible access types for data breakpoints. + * + */ + @JsonProperty("DataBreakpointAccessType") + @JsonPropertyDescription("This enumeration defines all possible access types for data breakpoints.") + private DataBreakpoint.DataBreakpointAccessType dataBreakpointAccessType; + /** + * Arguments for `dataBreakpointInfo` request. + * + */ + @JsonProperty("DataBreakpointInfoArguments") + @JsonPropertyDescription("Arguments for `dataBreakpointInfo` request.") + private DataBreakpointInfoArguments dataBreakpointInfoArguments; + @JsonProperty("DataBreakpointInfoRequest") + private Object dataBreakpointInfoRequest; + @JsonProperty("DataBreakpointInfoResponse") + private Object dataBreakpointInfoResponse; + /** + * Arguments for `disassemble` request. + * + */ + @JsonProperty("DisassembleArguments") + @JsonPropertyDescription("Arguments for `disassemble` request.") + private DisassembleArguments disassembleArguments; + @JsonProperty("DisassembleRequest") + private Object disassembleRequest; + @JsonProperty("DisassembleResponse") + private Object disassembleResponse; + /** + * Represents a single disassembled instruction. + * + */ + @JsonProperty("DisassembledInstruction") + @JsonPropertyDescription("Represents a single disassembled instruction.") + private DisassembledInstruction disassembledInstruction; + /** + * Arguments for `disconnect` request. + * + */ + @JsonProperty("DisconnectArguments") + @JsonPropertyDescription("Arguments for `disconnect` request.") + private DisconnectArguments disconnectArguments; + @JsonProperty("DisconnectRequest") + private Object disconnectRequest; + @JsonProperty("DisconnectResponse") + private Object disconnectResponse; + @JsonProperty("ErrorResponse") + private Object errorResponse; + /** + * Arguments for `evaluate` request. + * + */ + @JsonProperty("EvaluateArguments") + @JsonPropertyDescription("Arguments for `evaluate` request.") + private EvaluateArguments evaluateArguments; + @JsonProperty("EvaluateRequest") + private Object evaluateRequest; + @JsonProperty("EvaluateResponse") + private Object evaluateResponse; + @JsonProperty("Event") + private Object event; + /** + * This enumeration defines all possible conditions when a thrown exception should result in a break. + * never: never breaks, + * always: always breaks, + * unhandled: breaks when exception unhandled, + * userUnhandled: breaks if the exception is not handled by user code. + * + */ + @JsonProperty("ExceptionBreakMode") + @JsonPropertyDescription("This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.") + private ExceptionBreakMode exceptionBreakMode; + /** + * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. + * + */ + @JsonProperty("ExceptionBreakpointsFilter") + @JsonPropertyDescription("An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with.") + private ExceptionBreakpointsFilter exceptionBreakpointsFilter; + /** + * Detailed information about an exception that has occurred. + * + */ + @JsonProperty("ExceptionDetails") + @JsonPropertyDescription("Detailed information about an exception that has occurred.") + private ExceptionDetails exceptionDetails; + /** + * An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("ExceptionFilterOptions") + @JsonPropertyDescription("An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.") + private ExceptionFilterOptions exceptionFilterOptions; + /** + * Arguments for `exceptionInfo` request. + * + */ + @JsonProperty("ExceptionInfoArguments") + @JsonPropertyDescription("Arguments for `exceptionInfo` request.") + private ExceptionInfoArguments exceptionInfoArguments; + @JsonProperty("ExceptionInfoRequest") + private Object exceptionInfoRequest; + @JsonProperty("ExceptionInfoResponse") + private Object exceptionInfoResponse; + /** + * An `ExceptionOptions` assigns configuration options to a set of exceptions. + * + */ + @JsonProperty("ExceptionOptions") + @JsonPropertyDescription("An `ExceptionOptions` assigns configuration options to a set of exceptions.") + private ExceptionOptions exceptionOptions; + /** + * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. + * If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. + * + */ + @JsonProperty("ExceptionPathSegment") + @JsonPropertyDescription("An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true.") + private ExceptionPathSegment exceptionPathSegment; + @JsonProperty("ExitedEvent") + private Object exitedEvent; + /** + * Properties of a breakpoint passed to the `setFunctionBreakpoints` request. + * + */ + @JsonProperty("FunctionBreakpoint") + @JsonPropertyDescription("Properties of a breakpoint passed to the `setFunctionBreakpoints` request.") + private FunctionBreakpoint functionBreakpoint; + /** + * Arguments for `goto` request. + * + */ + @JsonProperty("GotoArguments") + @JsonPropertyDescription("Arguments for `goto` request.") + private GotoArguments gotoArguments; + @JsonProperty("GotoRequest") + private Object gotoRequest; + @JsonProperty("GotoResponse") + private Object gotoResponse; + /** + * A `GotoTarget` describes a code location that can be used as a target in the `goto` request. + * The possible goto targets can be determined via the `gotoTargets` request. + * + */ + @JsonProperty("GotoTarget") + @JsonPropertyDescription("A `GotoTarget` describes a code location that can be used as a target in the `goto` request.\nThe possible goto targets can be determined via the `gotoTargets` request.") + private GotoTarget gotoTarget; + /** + * Arguments for `gotoTargets` request. + * + */ + @JsonProperty("GotoTargetsArguments") + @JsonPropertyDescription("Arguments for `gotoTargets` request.") + private GotoTargetsArguments gotoTargetsArguments; + @JsonProperty("GotoTargetsRequest") + private Object gotoTargetsRequest; + @JsonProperty("GotoTargetsResponse") + private Object gotoTargetsResponse; + @JsonProperty("InitializeRequest") + private Object initializeRequest; + /** + * Arguments for `initialize` request. + * + */ + @JsonProperty("InitializeRequestArguments") + @JsonPropertyDescription("Arguments for `initialize` request.") + private InitializeRequestArguments initializeRequestArguments; + @JsonProperty("InitializeResponse") + private Object initializeResponse; + @JsonProperty("InitializedEvent") + private Object initializedEvent; + /** + * Properties of a breakpoint passed to the `setInstructionBreakpoints` request + * + */ + @JsonProperty("InstructionBreakpoint") + @JsonPropertyDescription("Properties of a breakpoint passed to the `setInstructionBreakpoints` request") + private InstructionBreakpoint instructionBreakpoint; + /** + * Logical areas that can be invalidated by the `invalidated` event. + * + */ + @JsonProperty("InvalidatedAreas") + @JsonPropertyDescription("Logical areas that can be invalidated by the `invalidated` event.") + private String invalidatedAreas; + @JsonProperty("InvalidatedEvent") + private Object invalidatedEvent; + @JsonProperty("LaunchRequest") + private Object launchRequest; + /** + * Arguments for `launch` request. Additional attributes are implementation specific. + * + */ + @JsonProperty("LaunchRequestArguments") + @JsonPropertyDescription("Arguments for `launch` request. Additional attributes are implementation specific.") + private LaunchRequestArguments launchRequestArguments; + @JsonProperty("LaunchResponse") + private Object launchResponse; + @JsonProperty("LoadedSourceEvent") + private Object loadedSourceEvent; + /** + * Arguments for `loadedSources` request. + * + */ + @JsonProperty("LoadedSourcesArguments") + @JsonPropertyDescription("Arguments for `loadedSources` request.") + private LoadedSourcesArguments loadedSourcesArguments; + @JsonProperty("LoadedSourcesRequest") + private Object loadedSourcesRequest; + @JsonProperty("LoadedSourcesResponse") + private Object loadedSourcesResponse; + @JsonProperty("MemoryEvent") + private Object memoryEvent; + /** + * A structured message object. Used to return errors from requests. + * + */ + @JsonProperty("Message") + @JsonPropertyDescription("A structured message object. Used to return errors from requests.") + private Message message; + /** + * A Module object represents a row in the modules view. + * The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. + * The `name` attribute is used to minimally render the module in the UI. + * + * Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. + * + * To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. + * + */ + @JsonProperty("Module") + @JsonPropertyDescription("A Module object represents a row in the modules view.\nThe `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting.\nThe `name` attribute is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.") + private Module module; + @JsonProperty("ModuleEvent") + private Object moduleEvent; + /** + * Arguments for `modules` request. + * + */ + @JsonProperty("ModulesArguments") + @JsonPropertyDescription("Arguments for `modules` request.") + private ModulesArguments modulesArguments; + @JsonProperty("ModulesRequest") + private Object modulesRequest; + @JsonProperty("ModulesResponse") + private Object modulesResponse; + /** + * Arguments for `next` request. + * + */ + @JsonProperty("NextArguments") + @JsonPropertyDescription("Arguments for `next` request.") + private NextArguments nextArguments; + @JsonProperty("NextRequest") + private Object nextRequest; + @JsonProperty("NextResponse") + private Object nextResponse; + @JsonProperty("OutputEvent") + private Object outputEvent; + /** + * Arguments for `pause` request. + * + */ + @JsonProperty("PauseArguments") + @JsonPropertyDescription("Arguments for `pause` request.") + private PauseArguments pauseArguments; + @JsonProperty("PauseRequest") + private Object pauseRequest; + @JsonProperty("PauseResponse") + private Object pauseResponse; + @JsonProperty("ProcessEvent") + private Object processEvent; + @JsonProperty("ProgressEndEvent") + private Object progressEndEvent; + @JsonProperty("ProgressStartEvent") + private Object progressStartEvent; + @JsonProperty("ProgressUpdateEvent") + private Object progressUpdateEvent; + /** + * Base Protocol + *

+ * Base class of requests, responses, and events. + * + */ + @JsonProperty("ProtocolMessage") + @JsonPropertyDescription("Base class of requests, responses, and events.") + private ProtocolMessage protocolMessage; + /** + * Arguments for `readMemory` request. + * + */ + @JsonProperty("ReadMemoryArguments") + @JsonPropertyDescription("Arguments for `readMemory` request.") + private ReadMemoryArguments readMemoryArguments; + @JsonProperty("ReadMemoryRequest") + private Object readMemoryRequest; + @JsonProperty("ReadMemoryResponse") + private Object readMemoryResponse; + @JsonProperty("Request") + private Object request; + @JsonProperty("Response") + private Object response; + /** + * Arguments for `restart` request. + * + */ + @JsonProperty("RestartArguments") + @JsonPropertyDescription("Arguments for `restart` request.") + private RestartArguments restartArguments; + /** + * Arguments for `restartFrame` request. + * + */ + @JsonProperty("RestartFrameArguments") + @JsonPropertyDescription("Arguments for `restartFrame` request.") + private RestartFrameArguments restartFrameArguments; + @JsonProperty("RestartFrameRequest") + private Object restartFrameRequest; + @JsonProperty("RestartFrameResponse") + private Object restartFrameResponse; + @JsonProperty("RestartRequest") + private Object restartRequest; + @JsonProperty("RestartResponse") + private Object restartResponse; + /** + * Arguments for `reverseContinue` request. + * + */ + @JsonProperty("ReverseContinueArguments") + @JsonPropertyDescription("Arguments for `reverseContinue` request.") + private ReverseContinueArguments reverseContinueArguments; + @JsonProperty("ReverseContinueRequest") + private Object reverseContinueRequest; + @JsonProperty("ReverseContinueResponse") + private Object reverseContinueResponse; + @JsonProperty("RunInTerminalRequest") + private Object runInTerminalRequest; + /** + * Arguments for `runInTerminal` request. + * + */ + @JsonProperty("RunInTerminalRequestArguments") + @JsonPropertyDescription("Arguments for `runInTerminal` request.") + private RunInTerminalRequestArguments runInTerminalRequestArguments; + @JsonProperty("RunInTerminalResponse") + private Object runInTerminalResponse; + /** + * A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. + * + */ + @JsonProperty("Scope") + @JsonPropertyDescription("A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source.") + private Scope scope; + /** + * Arguments for `scopes` request. + * + */ + @JsonProperty("ScopesArguments") + @JsonPropertyDescription("Arguments for `scopes` request.") + private ScopesArguments scopesArguments; + @JsonProperty("ScopesRequest") + private Object scopesRequest; + @JsonProperty("ScopesResponse") + private Object scopesResponse; + /** + * Arguments for `setBreakpoints` request. + * + */ + @JsonProperty("SetBreakpointsArguments") + @JsonPropertyDescription("Arguments for `setBreakpoints` request.") + private SetBreakpointsArguments setBreakpointsArguments; + @JsonProperty("SetBreakpointsRequest") + private Object setBreakpointsRequest; + @JsonProperty("SetBreakpointsResponse") + private Object setBreakpointsResponse; + /** + * Arguments for `setDataBreakpoints` request. + * + */ + @JsonProperty("SetDataBreakpointsArguments") + @JsonPropertyDescription("Arguments for `setDataBreakpoints` request.") + private SetDataBreakpointsArguments setDataBreakpointsArguments; + @JsonProperty("SetDataBreakpointsRequest") + private Object setDataBreakpointsRequest; + @JsonProperty("SetDataBreakpointsResponse") + private Object setDataBreakpointsResponse; + /** + * Arguments for `setExceptionBreakpoints` request. + * + */ + @JsonProperty("SetExceptionBreakpointsArguments") + @JsonPropertyDescription("Arguments for `setExceptionBreakpoints` request.") + private SetExceptionBreakpointsArguments setExceptionBreakpointsArguments; + @JsonProperty("SetExceptionBreakpointsRequest") + private Object setExceptionBreakpointsRequest; + @JsonProperty("SetExceptionBreakpointsResponse") + private Object setExceptionBreakpointsResponse; + /** + * Arguments for `setExpression` request. + * + */ + @JsonProperty("SetExpressionArguments") + @JsonPropertyDescription("Arguments for `setExpression` request.") + private SetExpressionArguments setExpressionArguments; + @JsonProperty("SetExpressionRequest") + private Object setExpressionRequest; + @JsonProperty("SetExpressionResponse") + private Object setExpressionResponse; + /** + * Arguments for `setFunctionBreakpoints` request. + * + */ + @JsonProperty("SetFunctionBreakpointsArguments") + @JsonPropertyDescription("Arguments for `setFunctionBreakpoints` request.") + private SetFunctionBreakpointsArguments setFunctionBreakpointsArguments; + @JsonProperty("SetFunctionBreakpointsRequest") + private Object setFunctionBreakpointsRequest; + @JsonProperty("SetFunctionBreakpointsResponse") + private Object setFunctionBreakpointsResponse; + /** + * Arguments for `setInstructionBreakpoints` request + * + */ + @JsonProperty("SetInstructionBreakpointsArguments") + @JsonPropertyDescription("Arguments for `setInstructionBreakpoints` request") + private SetInstructionBreakpointsArguments setInstructionBreakpointsArguments; + @JsonProperty("SetInstructionBreakpointsRequest") + private Object setInstructionBreakpointsRequest; + @JsonProperty("SetInstructionBreakpointsResponse") + private Object setInstructionBreakpointsResponse; + /** + * Arguments for `setVariable` request. + * + */ + @JsonProperty("SetVariableArguments") + @JsonPropertyDescription("Arguments for `setVariable` request.") + private SetVariableArguments setVariableArguments; + @JsonProperty("SetVariableRequest") + private Object setVariableRequest; + @JsonProperty("SetVariableResponse") + private Object setVariableResponse; + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("Source") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source source; + /** + * Arguments for `source` request. + * + */ + @JsonProperty("SourceArguments") + @JsonPropertyDescription("Arguments for `source` request.") + private SourceArguments sourceArguments; + /** + * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. + * + */ + @JsonProperty("SourceBreakpoint") + @JsonPropertyDescription("Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.") + private SourceBreakpoint sourceBreakpoint; + @JsonProperty("SourceRequest") + private Object sourceRequest; + @JsonProperty("SourceResponse") + private Object sourceResponse; + /** + * A Stackframe contains the source location. + * + */ + @JsonProperty("StackFrame") + @JsonPropertyDescription("A Stackframe contains the source location.") + private StackFrame stackFrame; + @JsonProperty("StackFrameFormat") + private Object stackFrameFormat; + /** + * Arguments for `stackTrace` request. + * + */ + @JsonProperty("StackTraceArguments") + @JsonPropertyDescription("Arguments for `stackTrace` request.") + private StackTraceArguments stackTraceArguments; + @JsonProperty("StackTraceRequest") + private Object stackTraceRequest; + @JsonProperty("StackTraceResponse") + private Object stackTraceResponse; + @JsonProperty("StartDebuggingRequest") + private Object startDebuggingRequest; + /** + * Arguments for `startDebugging` request. + * + */ + @JsonProperty("StartDebuggingRequestArguments") + @JsonPropertyDescription("Arguments for `startDebugging` request.") + private StartDebuggingRequestArguments startDebuggingRequestArguments; + @JsonProperty("StartDebuggingResponse") + private Object startDebuggingResponse; + /** + * Arguments for `stepBack` request. + * + */ + @JsonProperty("StepBackArguments") + @JsonPropertyDescription("Arguments for `stepBack` request.") + private StepBackArguments stepBackArguments; + @JsonProperty("StepBackRequest") + private Object stepBackRequest; + @JsonProperty("StepBackResponse") + private Object stepBackResponse; + /** + * Arguments for `stepIn` request. + * + */ + @JsonProperty("StepInArguments") + @JsonPropertyDescription("Arguments for `stepIn` request.") + private StepInArguments stepInArguments; + @JsonProperty("StepInRequest") + private Object stepInRequest; + @JsonProperty("StepInResponse") + private Object stepInResponse; + /** + * A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. + * + */ + @JsonProperty("StepInTarget") + @JsonPropertyDescription("A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.") + private StepInTarget stepInTarget; + /** + * Arguments for `stepInTargets` request. + * + */ + @JsonProperty("StepInTargetsArguments") + @JsonPropertyDescription("Arguments for `stepInTargets` request.") + private StepInTargetsArguments stepInTargetsArguments; + @JsonProperty("StepInTargetsRequest") + private Object stepInTargetsRequest; + @JsonProperty("StepInTargetsResponse") + private Object stepInTargetsResponse; + /** + * Arguments for `stepOut` request. + * + */ + @JsonProperty("StepOutArguments") + @JsonPropertyDescription("Arguments for `stepOut` request.") + private StepOutArguments stepOutArguments; + @JsonProperty("StepOutRequest") + private Object stepOutRequest; + @JsonProperty("StepOutResponse") + private Object stepOutResponse; + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("SteppingGranularity") + @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") + private NextArguments.SteppingGranularity steppingGranularity; + @JsonProperty("StoppedEvent") + private Object stoppedEvent; + /** + * Arguments for `terminate` request. + * + */ + @JsonProperty("TerminateArguments") + @JsonPropertyDescription("Arguments for `terminate` request.") + private TerminateArguments terminateArguments; + @JsonProperty("TerminateRequest") + private Object terminateRequest; + @JsonProperty("TerminateResponse") + private Object terminateResponse; + /** + * Arguments for `terminateThreads` request. + * + */ + @JsonProperty("TerminateThreadsArguments") + @JsonPropertyDescription("Arguments for `terminateThreads` request.") + private TerminateThreadsArguments terminateThreadsArguments; + @JsonProperty("TerminateThreadsRequest") + private Object terminateThreadsRequest; + @JsonProperty("TerminateThreadsResponse") + private Object terminateThreadsResponse; + @JsonProperty("TerminatedEvent") + private Object terminatedEvent; + /** + * A Thread + * + */ + @JsonProperty("Thread") + @JsonPropertyDescription("A Thread") + private Thread thread; + @JsonProperty("ThreadEvent") + private Object threadEvent; + @JsonProperty("ThreadsRequest") + private Object threadsRequest; + @JsonProperty("ThreadsResponse") + private Object threadsResponse; + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("ValueFormat") + @JsonPropertyDescription("Provides formatting information for a value.") + private ValueFormat valueFormat; + /** + * A Variable is a name/value pair. + * The `type` attribute is shown if space permits or when hovering over the variable's name. + * The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. + * If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. + * If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("Variable") + @JsonPropertyDescription("A Variable is a name/value pair.\nThe `type` attribute is shown if space permits or when hovering over the variable's name.\nThe `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.\nIf the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.") + private Variable variable; + /** + * Properties of a variable that can be used to determine how to render the variable in the UI. + * + */ + @JsonProperty("VariablePresentationHint") + @JsonPropertyDescription("Properties of a variable that can be used to determine how to render the variable in the UI.") + private VariablePresentationHint variablePresentationHint; + /** + * Arguments for `variables` request. + * + */ + @JsonProperty("VariablesArguments") + @JsonPropertyDescription("Arguments for `variables` request.") + private VariablesArguments variablesArguments; + @JsonProperty("VariablesRequest") + private Object variablesRequest; + @JsonProperty("VariablesResponse") + private Object variablesResponse; + /** + * Arguments for `writeMemory` request. + * + */ + @JsonProperty("WriteMemoryArguments") + @JsonPropertyDescription("Arguments for `writeMemory` request.") + private WriteMemoryArguments writeMemoryArguments; + @JsonProperty("WriteMemoryRequest") + private Object writeMemoryRequest; + @JsonProperty("WriteMemoryResponse") + private Object writeMemoryResponse; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonProperty("AttachRequest") + public Object getAttachRequest() { + return attachRequest; + } + + @JsonProperty("AttachRequest") + public void setAttachRequest(Object attachRequest) { + this.attachRequest = attachRequest; + } + + /** + * Arguments for `attach` request. Additional attributes are implementation specific. + * + */ + @JsonProperty("AttachRequestArguments") + public AttachRequestArguments getAttachRequestArguments() { + return attachRequestArguments; + } + + /** + * Arguments for `attach` request. Additional attributes are implementation specific. + * + */ + @JsonProperty("AttachRequestArguments") + public void setAttachRequestArguments(AttachRequestArguments attachRequestArguments) { + this.attachRequestArguments = attachRequestArguments; + } + + @JsonProperty("AttachResponse") + public Object getAttachResponse() { + return attachResponse; + } + + @JsonProperty("AttachResponse") + public void setAttachResponse(Object attachResponse) { + this.attachResponse = attachResponse; + } + + /** + * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. + * + */ + @JsonProperty("Breakpoint") + public Breakpoint getBreakpoint() { + return breakpoint; + } + + /** + * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. + * + */ + @JsonProperty("Breakpoint") + public void setBreakpoint(Breakpoint breakpoint) { + this.breakpoint = breakpoint; + } + + @JsonProperty("BreakpointEvent") + public Object getBreakpointEvent() { + return breakpointEvent; + } + + @JsonProperty("BreakpointEvent") + public void setBreakpointEvent(Object breakpointEvent) { + this.breakpointEvent = breakpointEvent; + } + + /** + * Properties of a breakpoint location returned from the `breakpointLocations` request. + * + */ + @JsonProperty("BreakpointLocation") + public BreakpointLocation getBreakpointLocation() { + return breakpointLocation; + } + + /** + * Properties of a breakpoint location returned from the `breakpointLocations` request. + * + */ + @JsonProperty("BreakpointLocation") + public void setBreakpointLocation(BreakpointLocation breakpointLocation) { + this.breakpointLocation = breakpointLocation; + } + + /** + * Arguments for `breakpointLocations` request. + * + */ + @JsonProperty("BreakpointLocationsArguments") + public BreakpointLocationsArguments getBreakpointLocationsArguments() { + return breakpointLocationsArguments; + } + + /** + * Arguments for `breakpointLocations` request. + * + */ + @JsonProperty("BreakpointLocationsArguments") + public void setBreakpointLocationsArguments(BreakpointLocationsArguments breakpointLocationsArguments) { + this.breakpointLocationsArguments = breakpointLocationsArguments; + } + + @JsonProperty("BreakpointLocationsRequest") + public Object getBreakpointLocationsRequest() { + return breakpointLocationsRequest; + } + + @JsonProperty("BreakpointLocationsRequest") + public void setBreakpointLocationsRequest(Object breakpointLocationsRequest) { + this.breakpointLocationsRequest = breakpointLocationsRequest; + } + + @JsonProperty("BreakpointLocationsResponse") + public Object getBreakpointLocationsResponse() { + return breakpointLocationsResponse; + } + + @JsonProperty("BreakpointLocationsResponse") + public void setBreakpointLocationsResponse(Object breakpointLocationsResponse) { + this.breakpointLocationsResponse = breakpointLocationsResponse; + } + + /** + * Arguments for `cancel` request. + * + */ + @JsonProperty("CancelArguments") + public CancelArguments getCancelArguments() { + return cancelArguments; + } + + /** + * Arguments for `cancel` request. + * + */ + @JsonProperty("CancelArguments") + public void setCancelArguments(CancelArguments cancelArguments) { + this.cancelArguments = cancelArguments; + } + + @JsonProperty("CancelRequest") + public Object getCancelRequest() { + return cancelRequest; + } + + @JsonProperty("CancelRequest") + public void setCancelRequest(Object cancelRequest) { + this.cancelRequest = cancelRequest; + } + + @JsonProperty("CancelResponse") + public Object getCancelResponse() { + return cancelResponse; + } + + @JsonProperty("CancelResponse") + public void setCancelResponse(Object cancelResponse) { + this.cancelResponse = cancelResponse; + } + + /** + * Types + *

+ * Information about the capabilities of a debug adapter. + * + */ + @JsonProperty("Capabilities") + public Capabilities getCapabilities() { + return capabilities; + } + + /** + * Types + *

+ * Information about the capabilities of a debug adapter. + * + */ + @JsonProperty("Capabilities") + public void setCapabilities(Capabilities capabilities) { + this.capabilities = capabilities; + } + + @JsonProperty("CapabilitiesEvent") + public Object getCapabilitiesEvent() { + return capabilitiesEvent; + } + + @JsonProperty("CapabilitiesEvent") + public void setCapabilitiesEvent(Object capabilitiesEvent) { + this.capabilitiesEvent = capabilitiesEvent; + } + + /** + * The checksum of an item calculated by the specified algorithm. + * + */ + @JsonProperty("Checksum") + public Checksum getChecksum() { + return checksum; + } + + /** + * The checksum of an item calculated by the specified algorithm. + * + */ + @JsonProperty("Checksum") + public void setChecksum(Checksum checksum) { + this.checksum = checksum; + } + + /** + * Names of checksum algorithms that may be supported by a debug adapter. + * + */ + @JsonProperty("ChecksumAlgorithm") + public Checksum.ChecksumAlgorithm getChecksumAlgorithm() { + return checksumAlgorithm; + } + + /** + * Names of checksum algorithms that may be supported by a debug adapter. + * + */ + @JsonProperty("ChecksumAlgorithm") + public void setChecksumAlgorithm(Checksum.ChecksumAlgorithm checksumAlgorithm) { + this.checksumAlgorithm = checksumAlgorithm; + } + + /** + * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, + * and what the column's label should be. + * It is only used if the underlying UI actually supports this level of customization. + * + */ + @JsonProperty("ColumnDescriptor") + public ColumnDescriptor getColumnDescriptor() { + return columnDescriptor; + } + + /** + * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, + * and what the column's label should be. + * It is only used if the underlying UI actually supports this level of customization. + * + */ + @JsonProperty("ColumnDescriptor") + public void setColumnDescriptor(ColumnDescriptor columnDescriptor) { + this.columnDescriptor = columnDescriptor; + } + + /** + * `CompletionItems` are the suggestions returned from the `completions` request. + * + */ + @JsonProperty("CompletionItem") + public CompletionItem getCompletionItem() { + return completionItem; + } + + /** + * `CompletionItems` are the suggestions returned from the `completions` request. + * + */ + @JsonProperty("CompletionItem") + public void setCompletionItem(CompletionItem completionItem) { + this.completionItem = completionItem; + } + + /** + * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. + * + */ + @JsonProperty("CompletionItemType") + public CompletionItem.CompletionItemType getCompletionItemType() { + return completionItemType; + } + + /** + * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. + * + */ + @JsonProperty("CompletionItemType") + public void setCompletionItemType(CompletionItem.CompletionItemType completionItemType) { + this.completionItemType = completionItemType; + } + + /** + * Arguments for `completions` request. + * + */ + @JsonProperty("CompletionsArguments") + public CompletionsArguments getCompletionsArguments() { + return completionsArguments; + } + + /** + * Arguments for `completions` request. + * + */ + @JsonProperty("CompletionsArguments") + public void setCompletionsArguments(CompletionsArguments completionsArguments) { + this.completionsArguments = completionsArguments; + } + + @JsonProperty("CompletionsRequest") + public Object getCompletionsRequest() { + return completionsRequest; + } + + @JsonProperty("CompletionsRequest") + public void setCompletionsRequest(Object completionsRequest) { + this.completionsRequest = completionsRequest; + } + + @JsonProperty("CompletionsResponse") + public Object getCompletionsResponse() { + return completionsResponse; + } + + @JsonProperty("CompletionsResponse") + public void setCompletionsResponse(Object completionsResponse) { + this.completionsResponse = completionsResponse; + } + + /** + * Arguments for `configurationDone` request. + * + */ + @JsonProperty("ConfigurationDoneArguments") + public ConfigurationDoneArguments getConfigurationDoneArguments() { + return configurationDoneArguments; + } + + /** + * Arguments for `configurationDone` request. + * + */ + @JsonProperty("ConfigurationDoneArguments") + public void setConfigurationDoneArguments(ConfigurationDoneArguments configurationDoneArguments) { + this.configurationDoneArguments = configurationDoneArguments; + } + + @JsonProperty("ConfigurationDoneRequest") + public Object getConfigurationDoneRequest() { + return configurationDoneRequest; + } + + @JsonProperty("ConfigurationDoneRequest") + public void setConfigurationDoneRequest(Object configurationDoneRequest) { + this.configurationDoneRequest = configurationDoneRequest; + } + + @JsonProperty("ConfigurationDoneResponse") + public Object getConfigurationDoneResponse() { + return configurationDoneResponse; + } + + @JsonProperty("ConfigurationDoneResponse") + public void setConfigurationDoneResponse(Object configurationDoneResponse) { + this.configurationDoneResponse = configurationDoneResponse; + } + + /** + * Arguments for `continue` request. + * + */ + @JsonProperty("ContinueArguments") + public ContinueArguments getContinueArguments() { + return continueArguments; + } + + /** + * Arguments for `continue` request. + * + */ + @JsonProperty("ContinueArguments") + public void setContinueArguments(ContinueArguments continueArguments) { + this.continueArguments = continueArguments; + } + + @JsonProperty("ContinueRequest") + public Object getContinueRequest() { + return continueRequest; + } + + @JsonProperty("ContinueRequest") + public void setContinueRequest(Object continueRequest) { + this.continueRequest = continueRequest; + } + + @JsonProperty("ContinueResponse") + public Object getContinueResponse() { + return continueResponse; + } + + @JsonProperty("ContinueResponse") + public void setContinueResponse(Object continueResponse) { + this.continueResponse = continueResponse; + } + + @JsonProperty("ContinuedEvent") + public Object getContinuedEvent() { + return continuedEvent; + } + + @JsonProperty("ContinuedEvent") + public void setContinuedEvent(Object continuedEvent) { + this.continuedEvent = continuedEvent; + } + + /** + * Properties of a data breakpoint passed to the `setDataBreakpoints` request. + * + */ + @JsonProperty("DataBreakpoint") + public DataBreakpoint getDataBreakpoint() { + return dataBreakpoint; + } + + /** + * Properties of a data breakpoint passed to the `setDataBreakpoints` request. + * + */ + @JsonProperty("DataBreakpoint") + public void setDataBreakpoint(DataBreakpoint dataBreakpoint) { + this.dataBreakpoint = dataBreakpoint; + } + + /** + * This enumeration defines all possible access types for data breakpoints. + * + */ + @JsonProperty("DataBreakpointAccessType") + public DataBreakpoint.DataBreakpointAccessType getDataBreakpointAccessType() { + return dataBreakpointAccessType; + } + + /** + * This enumeration defines all possible access types for data breakpoints. + * + */ + @JsonProperty("DataBreakpointAccessType") + public void setDataBreakpointAccessType(DataBreakpoint.DataBreakpointAccessType dataBreakpointAccessType) { + this.dataBreakpointAccessType = dataBreakpointAccessType; + } + + /** + * Arguments for `dataBreakpointInfo` request. + * + */ + @JsonProperty("DataBreakpointInfoArguments") + public DataBreakpointInfoArguments getDataBreakpointInfoArguments() { + return dataBreakpointInfoArguments; + } + + /** + * Arguments for `dataBreakpointInfo` request. + * + */ + @JsonProperty("DataBreakpointInfoArguments") + public void setDataBreakpointInfoArguments(DataBreakpointInfoArguments dataBreakpointInfoArguments) { + this.dataBreakpointInfoArguments = dataBreakpointInfoArguments; + } + + @JsonProperty("DataBreakpointInfoRequest") + public Object getDataBreakpointInfoRequest() { + return dataBreakpointInfoRequest; + } + + @JsonProperty("DataBreakpointInfoRequest") + public void setDataBreakpointInfoRequest(Object dataBreakpointInfoRequest) { + this.dataBreakpointInfoRequest = dataBreakpointInfoRequest; + } + + @JsonProperty("DataBreakpointInfoResponse") + public Object getDataBreakpointInfoResponse() { + return dataBreakpointInfoResponse; + } + + @JsonProperty("DataBreakpointInfoResponse") + public void setDataBreakpointInfoResponse(Object dataBreakpointInfoResponse) { + this.dataBreakpointInfoResponse = dataBreakpointInfoResponse; + } + + /** + * Arguments for `disassemble` request. + * + */ + @JsonProperty("DisassembleArguments") + public DisassembleArguments getDisassembleArguments() { + return disassembleArguments; + } + + /** + * Arguments for `disassemble` request. + * + */ + @JsonProperty("DisassembleArguments") + public void setDisassembleArguments(DisassembleArguments disassembleArguments) { + this.disassembleArguments = disassembleArguments; + } + + @JsonProperty("DisassembleRequest") + public Object getDisassembleRequest() { + return disassembleRequest; + } + + @JsonProperty("DisassembleRequest") + public void setDisassembleRequest(Object disassembleRequest) { + this.disassembleRequest = disassembleRequest; + } + + @JsonProperty("DisassembleResponse") + public Object getDisassembleResponse() { + return disassembleResponse; + } + + @JsonProperty("DisassembleResponse") + public void setDisassembleResponse(Object disassembleResponse) { + this.disassembleResponse = disassembleResponse; + } + + /** + * Represents a single disassembled instruction. + * + */ + @JsonProperty("DisassembledInstruction") + public DisassembledInstruction getDisassembledInstruction() { + return disassembledInstruction; + } + + /** + * Represents a single disassembled instruction. + * + */ + @JsonProperty("DisassembledInstruction") + public void setDisassembledInstruction(DisassembledInstruction disassembledInstruction) { + this.disassembledInstruction = disassembledInstruction; + } + + /** + * Arguments for `disconnect` request. + * + */ + @JsonProperty("DisconnectArguments") + public DisconnectArguments getDisconnectArguments() { + return disconnectArguments; + } + + /** + * Arguments for `disconnect` request. + * + */ + @JsonProperty("DisconnectArguments") + public void setDisconnectArguments(DisconnectArguments disconnectArguments) { + this.disconnectArguments = disconnectArguments; + } + + @JsonProperty("DisconnectRequest") + public Object getDisconnectRequest() { + return disconnectRequest; + } + + @JsonProperty("DisconnectRequest") + public void setDisconnectRequest(Object disconnectRequest) { + this.disconnectRequest = disconnectRequest; + } + + @JsonProperty("DisconnectResponse") + public Object getDisconnectResponse() { + return disconnectResponse; + } + + @JsonProperty("DisconnectResponse") + public void setDisconnectResponse(Object disconnectResponse) { + this.disconnectResponse = disconnectResponse; + } + + @JsonProperty("ErrorResponse") + public Object getErrorResponse() { + return errorResponse; + } + + @JsonProperty("ErrorResponse") + public void setErrorResponse(Object errorResponse) { + this.errorResponse = errorResponse; + } + + /** + * Arguments for `evaluate` request. + * + */ + @JsonProperty("EvaluateArguments") + public EvaluateArguments getEvaluateArguments() { + return evaluateArguments; + } + + /** + * Arguments for `evaluate` request. + * + */ + @JsonProperty("EvaluateArguments") + public void setEvaluateArguments(EvaluateArguments evaluateArguments) { + this.evaluateArguments = evaluateArguments; + } + + @JsonProperty("EvaluateRequest") + public Object getEvaluateRequest() { + return evaluateRequest; + } + + @JsonProperty("EvaluateRequest") + public void setEvaluateRequest(Object evaluateRequest) { + this.evaluateRequest = evaluateRequest; + } + + @JsonProperty("EvaluateResponse") + public Object getEvaluateResponse() { + return evaluateResponse; + } + + @JsonProperty("EvaluateResponse") + public void setEvaluateResponse(Object evaluateResponse) { + this.evaluateResponse = evaluateResponse; + } + + @JsonProperty("Event") + public Object getEvent() { + return event; + } + + @JsonProperty("Event") + public void setEvent(Object event) { + this.event = event; + } + + /** + * This enumeration defines all possible conditions when a thrown exception should result in a break. + * never: never breaks, + * always: always breaks, + * unhandled: breaks when exception unhandled, + * userUnhandled: breaks if the exception is not handled by user code. + * + */ + @JsonProperty("ExceptionBreakMode") + public ExceptionBreakMode getExceptionBreakMode() { + return exceptionBreakMode; + } + + /** + * This enumeration defines all possible conditions when a thrown exception should result in a break. + * never: never breaks, + * always: always breaks, + * unhandled: breaks when exception unhandled, + * userUnhandled: breaks if the exception is not handled by user code. + * + */ + @JsonProperty("ExceptionBreakMode") + public void setExceptionBreakMode(ExceptionBreakMode exceptionBreakMode) { + this.exceptionBreakMode = exceptionBreakMode; + } + + /** + * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. + * + */ + @JsonProperty("ExceptionBreakpointsFilter") + public ExceptionBreakpointsFilter getExceptionBreakpointsFilter() { + return exceptionBreakpointsFilter; + } + + /** + * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. + * + */ + @JsonProperty("ExceptionBreakpointsFilter") + public void setExceptionBreakpointsFilter(ExceptionBreakpointsFilter exceptionBreakpointsFilter) { + this.exceptionBreakpointsFilter = exceptionBreakpointsFilter; + } + + /** + * Detailed information about an exception that has occurred. + * + */ + @JsonProperty("ExceptionDetails") + public ExceptionDetails getExceptionDetails() { + return exceptionDetails; + } + + /** + * Detailed information about an exception that has occurred. + * + */ + @JsonProperty("ExceptionDetails") + public void setExceptionDetails(ExceptionDetails exceptionDetails) { + this.exceptionDetails = exceptionDetails; + } + + /** + * An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("ExceptionFilterOptions") + public ExceptionFilterOptions getExceptionFilterOptions() { + return exceptionFilterOptions; + } + + /** + * An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. + * + */ + @JsonProperty("ExceptionFilterOptions") + public void setExceptionFilterOptions(ExceptionFilterOptions exceptionFilterOptions) { + this.exceptionFilterOptions = exceptionFilterOptions; + } + + /** + * Arguments for `exceptionInfo` request. + * + */ + @JsonProperty("ExceptionInfoArguments") + public ExceptionInfoArguments getExceptionInfoArguments() { + return exceptionInfoArguments; + } + + /** + * Arguments for `exceptionInfo` request. + * + */ + @JsonProperty("ExceptionInfoArguments") + public void setExceptionInfoArguments(ExceptionInfoArguments exceptionInfoArguments) { + this.exceptionInfoArguments = exceptionInfoArguments; + } + + @JsonProperty("ExceptionInfoRequest") + public Object getExceptionInfoRequest() { + return exceptionInfoRequest; + } + + @JsonProperty("ExceptionInfoRequest") + public void setExceptionInfoRequest(Object exceptionInfoRequest) { + this.exceptionInfoRequest = exceptionInfoRequest; + } + + @JsonProperty("ExceptionInfoResponse") + public Object getExceptionInfoResponse() { + return exceptionInfoResponse; + } + + @JsonProperty("ExceptionInfoResponse") + public void setExceptionInfoResponse(Object exceptionInfoResponse) { + this.exceptionInfoResponse = exceptionInfoResponse; + } + + /** + * An `ExceptionOptions` assigns configuration options to a set of exceptions. + * + */ + @JsonProperty("ExceptionOptions") + public ExceptionOptions getExceptionOptions() { + return exceptionOptions; + } + + /** + * An `ExceptionOptions` assigns configuration options to a set of exceptions. + * + */ + @JsonProperty("ExceptionOptions") + public void setExceptionOptions(ExceptionOptions exceptionOptions) { + this.exceptionOptions = exceptionOptions; + } + + /** + * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. + * If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. + * + */ + @JsonProperty("ExceptionPathSegment") + public ExceptionPathSegment getExceptionPathSegment() { + return exceptionPathSegment; + } + + /** + * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. + * If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. + * + */ + @JsonProperty("ExceptionPathSegment") + public void setExceptionPathSegment(ExceptionPathSegment exceptionPathSegment) { + this.exceptionPathSegment = exceptionPathSegment; + } + + @JsonProperty("ExitedEvent") + public Object getExitedEvent() { + return exitedEvent; + } + + @JsonProperty("ExitedEvent") + public void setExitedEvent(Object exitedEvent) { + this.exitedEvent = exitedEvent; + } + + /** + * Properties of a breakpoint passed to the `setFunctionBreakpoints` request. + * + */ + @JsonProperty("FunctionBreakpoint") + public FunctionBreakpoint getFunctionBreakpoint() { + return functionBreakpoint; + } + + /** + * Properties of a breakpoint passed to the `setFunctionBreakpoints` request. + * + */ + @JsonProperty("FunctionBreakpoint") + public void setFunctionBreakpoint(FunctionBreakpoint functionBreakpoint) { + this.functionBreakpoint = functionBreakpoint; + } + + /** + * Arguments for `goto` request. + * + */ + @JsonProperty("GotoArguments") + public GotoArguments getGotoArguments() { + return gotoArguments; + } + + /** + * Arguments for `goto` request. + * + */ + @JsonProperty("GotoArguments") + public void setGotoArguments(GotoArguments gotoArguments) { + this.gotoArguments = gotoArguments; + } + + @JsonProperty("GotoRequest") + public Object getGotoRequest() { + return gotoRequest; + } + + @JsonProperty("GotoRequest") + public void setGotoRequest(Object gotoRequest) { + this.gotoRequest = gotoRequest; + } + + @JsonProperty("GotoResponse") + public Object getGotoResponse() { + return gotoResponse; + } + + @JsonProperty("GotoResponse") + public void setGotoResponse(Object gotoResponse) { + this.gotoResponse = gotoResponse; + } + + /** + * A `GotoTarget` describes a code location that can be used as a target in the `goto` request. + * The possible goto targets can be determined via the `gotoTargets` request. + * + */ + @JsonProperty("GotoTarget") + public GotoTarget getGotoTarget() { + return gotoTarget; + } + + /** + * A `GotoTarget` describes a code location that can be used as a target in the `goto` request. + * The possible goto targets can be determined via the `gotoTargets` request. + * + */ + @JsonProperty("GotoTarget") + public void setGotoTarget(GotoTarget gotoTarget) { + this.gotoTarget = gotoTarget; + } + + /** + * Arguments for `gotoTargets` request. + * + */ + @JsonProperty("GotoTargetsArguments") + public GotoTargetsArguments getGotoTargetsArguments() { + return gotoTargetsArguments; + } + + /** + * Arguments for `gotoTargets` request. + * + */ + @JsonProperty("GotoTargetsArguments") + public void setGotoTargetsArguments(GotoTargetsArguments gotoTargetsArguments) { + this.gotoTargetsArguments = gotoTargetsArguments; + } + + @JsonProperty("GotoTargetsRequest") + public Object getGotoTargetsRequest() { + return gotoTargetsRequest; + } + + @JsonProperty("GotoTargetsRequest") + public void setGotoTargetsRequest(Object gotoTargetsRequest) { + this.gotoTargetsRequest = gotoTargetsRequest; + } + + @JsonProperty("GotoTargetsResponse") + public Object getGotoTargetsResponse() { + return gotoTargetsResponse; + } + + @JsonProperty("GotoTargetsResponse") + public void setGotoTargetsResponse(Object gotoTargetsResponse) { + this.gotoTargetsResponse = gotoTargetsResponse; + } + + @JsonProperty("InitializeRequest") + public Object getInitializeRequest() { + return initializeRequest; + } + + @JsonProperty("InitializeRequest") + public void setInitializeRequest(Object initializeRequest) { + this.initializeRequest = initializeRequest; + } + + /** + * Arguments for `initialize` request. + * + */ + @JsonProperty("InitializeRequestArguments") + public InitializeRequestArguments getInitializeRequestArguments() { + return initializeRequestArguments; + } + + /** + * Arguments for `initialize` request. + * + */ + @JsonProperty("InitializeRequestArguments") + public void setInitializeRequestArguments(InitializeRequestArguments initializeRequestArguments) { + this.initializeRequestArguments = initializeRequestArguments; + } + + @JsonProperty("InitializeResponse") + public Object getInitializeResponse() { + return initializeResponse; + } + + @JsonProperty("InitializeResponse") + public void setInitializeResponse(Object initializeResponse) { + this.initializeResponse = initializeResponse; + } + + @JsonProperty("InitializedEvent") + public Object getInitializedEvent() { + return initializedEvent; + } + + @JsonProperty("InitializedEvent") + public void setInitializedEvent(Object initializedEvent) { + this.initializedEvent = initializedEvent; + } + + /** + * Properties of a breakpoint passed to the `setInstructionBreakpoints` request + * + */ + @JsonProperty("InstructionBreakpoint") + public InstructionBreakpoint getInstructionBreakpoint() { + return instructionBreakpoint; + } + + /** + * Properties of a breakpoint passed to the `setInstructionBreakpoints` request + * + */ + @JsonProperty("InstructionBreakpoint") + public void setInstructionBreakpoint(InstructionBreakpoint instructionBreakpoint) { + this.instructionBreakpoint = instructionBreakpoint; + } + + /** + * Logical areas that can be invalidated by the `invalidated` event. + * + */ + @JsonProperty("InvalidatedAreas") + public String getInvalidatedAreas() { + return invalidatedAreas; + } + + /** + * Logical areas that can be invalidated by the `invalidated` event. + * + */ + @JsonProperty("InvalidatedAreas") + public void setInvalidatedAreas(String invalidatedAreas) { + this.invalidatedAreas = invalidatedAreas; + } + + @JsonProperty("InvalidatedEvent") + public Object getInvalidatedEvent() { + return invalidatedEvent; + } + + @JsonProperty("InvalidatedEvent") + public void setInvalidatedEvent(Object invalidatedEvent) { + this.invalidatedEvent = invalidatedEvent; + } + + @JsonProperty("LaunchRequest") + public Object getLaunchRequest() { + return launchRequest; + } + + @JsonProperty("LaunchRequest") + public void setLaunchRequest(Object launchRequest) { + this.launchRequest = launchRequest; + } + + /** + * Arguments for `launch` request. Additional attributes are implementation specific. + * + */ + @JsonProperty("LaunchRequestArguments") + public LaunchRequestArguments getLaunchRequestArguments() { + return launchRequestArguments; + } + + /** + * Arguments for `launch` request. Additional attributes are implementation specific. + * + */ + @JsonProperty("LaunchRequestArguments") + public void setLaunchRequestArguments(LaunchRequestArguments launchRequestArguments) { + this.launchRequestArguments = launchRequestArguments; + } + + @JsonProperty("LaunchResponse") + public Object getLaunchResponse() { + return launchResponse; + } + + @JsonProperty("LaunchResponse") + public void setLaunchResponse(Object launchResponse) { + this.launchResponse = launchResponse; + } + + @JsonProperty("LoadedSourceEvent") + public Object getLoadedSourceEvent() { + return loadedSourceEvent; + } + + @JsonProperty("LoadedSourceEvent") + public void setLoadedSourceEvent(Object loadedSourceEvent) { + this.loadedSourceEvent = loadedSourceEvent; + } + + /** + * Arguments for `loadedSources` request. + * + */ + @JsonProperty("LoadedSourcesArguments") + public LoadedSourcesArguments getLoadedSourcesArguments() { + return loadedSourcesArguments; + } + + /** + * Arguments for `loadedSources` request. + * + */ + @JsonProperty("LoadedSourcesArguments") + public void setLoadedSourcesArguments(LoadedSourcesArguments loadedSourcesArguments) { + this.loadedSourcesArguments = loadedSourcesArguments; + } + + @JsonProperty("LoadedSourcesRequest") + public Object getLoadedSourcesRequest() { + return loadedSourcesRequest; + } + + @JsonProperty("LoadedSourcesRequest") + public void setLoadedSourcesRequest(Object loadedSourcesRequest) { + this.loadedSourcesRequest = loadedSourcesRequest; + } + + @JsonProperty("LoadedSourcesResponse") + public Object getLoadedSourcesResponse() { + return loadedSourcesResponse; + } + + @JsonProperty("LoadedSourcesResponse") + public void setLoadedSourcesResponse(Object loadedSourcesResponse) { + this.loadedSourcesResponse = loadedSourcesResponse; + } + + @JsonProperty("MemoryEvent") + public Object getMemoryEvent() { + return memoryEvent; + } + + @JsonProperty("MemoryEvent") + public void setMemoryEvent(Object memoryEvent) { + this.memoryEvent = memoryEvent; + } + + /** + * A structured message object. Used to return errors from requests. + * + */ + @JsonProperty("Message") + public Message getMessage() { + return message; + } + + /** + * A structured message object. Used to return errors from requests. + * + */ + @JsonProperty("Message") + public void setMessage(Message message) { + this.message = message; + } + + /** + * A Module object represents a row in the modules view. + * The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. + * The `name` attribute is used to minimally render the module in the UI. + * + * Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. + * + * To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. + * + */ + @JsonProperty("Module") + public Module getModule() { + return module; + } + + /** + * A Module object represents a row in the modules view. + * The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. + * The `name` attribute is used to minimally render the module in the UI. + * + * Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. + * + * To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. + * + */ + @JsonProperty("Module") + public void setModule(Module module) { + this.module = module; + } + + @JsonProperty("ModuleEvent") + public Object getModuleEvent() { + return moduleEvent; + } + + @JsonProperty("ModuleEvent") + public void setModuleEvent(Object moduleEvent) { + this.moduleEvent = moduleEvent; + } + + /** + * Arguments for `modules` request. + * + */ + @JsonProperty("ModulesArguments") + public ModulesArguments getModulesArguments() { + return modulesArguments; + } + + /** + * Arguments for `modules` request. + * + */ + @JsonProperty("ModulesArguments") + public void setModulesArguments(ModulesArguments modulesArguments) { + this.modulesArguments = modulesArguments; + } + + @JsonProperty("ModulesRequest") + public Object getModulesRequest() { + return modulesRequest; + } + + @JsonProperty("ModulesRequest") + public void setModulesRequest(Object modulesRequest) { + this.modulesRequest = modulesRequest; + } + + @JsonProperty("ModulesResponse") + public Object getModulesResponse() { + return modulesResponse; + } + + @JsonProperty("ModulesResponse") + public void setModulesResponse(Object modulesResponse) { + this.modulesResponse = modulesResponse; + } + + /** + * Arguments for `next` request. + * + */ + @JsonProperty("NextArguments") + public NextArguments getNextArguments() { + return nextArguments; + } + + /** + * Arguments for `next` request. + * + */ + @JsonProperty("NextArguments") + public void setNextArguments(NextArguments nextArguments) { + this.nextArguments = nextArguments; + } + + @JsonProperty("NextRequest") + public Object getNextRequest() { + return nextRequest; + } + + @JsonProperty("NextRequest") + public void setNextRequest(Object nextRequest) { + this.nextRequest = nextRequest; + } + + @JsonProperty("NextResponse") + public Object getNextResponse() { + return nextResponse; + } + + @JsonProperty("NextResponse") + public void setNextResponse(Object nextResponse) { + this.nextResponse = nextResponse; + } + + @JsonProperty("OutputEvent") + public Object getOutputEvent() { + return outputEvent; + } + + @JsonProperty("OutputEvent") + public void setOutputEvent(Object outputEvent) { + this.outputEvent = outputEvent; + } + + /** + * Arguments for `pause` request. + * + */ + @JsonProperty("PauseArguments") + public PauseArguments getPauseArguments() { + return pauseArguments; + } + + /** + * Arguments for `pause` request. + * + */ + @JsonProperty("PauseArguments") + public void setPauseArguments(PauseArguments pauseArguments) { + this.pauseArguments = pauseArguments; + } + + @JsonProperty("PauseRequest") + public Object getPauseRequest() { + return pauseRequest; + } + + @JsonProperty("PauseRequest") + public void setPauseRequest(Object pauseRequest) { + this.pauseRequest = pauseRequest; + } + + @JsonProperty("PauseResponse") + public Object getPauseResponse() { + return pauseResponse; + } + + @JsonProperty("PauseResponse") + public void setPauseResponse(Object pauseResponse) { + this.pauseResponse = pauseResponse; + } + + @JsonProperty("ProcessEvent") + public Object getProcessEvent() { + return processEvent; + } + + @JsonProperty("ProcessEvent") + public void setProcessEvent(Object processEvent) { + this.processEvent = processEvent; + } + + @JsonProperty("ProgressEndEvent") + public Object getProgressEndEvent() { + return progressEndEvent; + } + + @JsonProperty("ProgressEndEvent") + public void setProgressEndEvent(Object progressEndEvent) { + this.progressEndEvent = progressEndEvent; + } + + @JsonProperty("ProgressStartEvent") + public Object getProgressStartEvent() { + return progressStartEvent; + } + + @JsonProperty("ProgressStartEvent") + public void setProgressStartEvent(Object progressStartEvent) { + this.progressStartEvent = progressStartEvent; + } + + @JsonProperty("ProgressUpdateEvent") + public Object getProgressUpdateEvent() { + return progressUpdateEvent; + } + + @JsonProperty("ProgressUpdateEvent") + public void setProgressUpdateEvent(Object progressUpdateEvent) { + this.progressUpdateEvent = progressUpdateEvent; + } + + /** + * Base Protocol + *

+ * Base class of requests, responses, and events. + * + */ + @JsonProperty("ProtocolMessage") + public ProtocolMessage getProtocolMessage() { + return protocolMessage; + } + + /** + * Base Protocol + *

+ * Base class of requests, responses, and events. + * + */ + @JsonProperty("ProtocolMessage") + public void setProtocolMessage(ProtocolMessage protocolMessage) { + this.protocolMessage = protocolMessage; + } + + /** + * Arguments for `readMemory` request. + * + */ + @JsonProperty("ReadMemoryArguments") + public ReadMemoryArguments getReadMemoryArguments() { + return readMemoryArguments; + } + + /** + * Arguments for `readMemory` request. + * + */ + @JsonProperty("ReadMemoryArguments") + public void setReadMemoryArguments(ReadMemoryArguments readMemoryArguments) { + this.readMemoryArguments = readMemoryArguments; + } + + @JsonProperty("ReadMemoryRequest") + public Object getReadMemoryRequest() { + return readMemoryRequest; + } + + @JsonProperty("ReadMemoryRequest") + public void setReadMemoryRequest(Object readMemoryRequest) { + this.readMemoryRequest = readMemoryRequest; + } + + @JsonProperty("ReadMemoryResponse") + public Object getReadMemoryResponse() { + return readMemoryResponse; + } + + @JsonProperty("ReadMemoryResponse") + public void setReadMemoryResponse(Object readMemoryResponse) { + this.readMemoryResponse = readMemoryResponse; + } + + @JsonProperty("Request") + public Object getRequest() { + return request; + } + + @JsonProperty("Request") + public void setRequest(Object request) { + this.request = request; + } + + @JsonProperty("Response") + public Object getResponse() { + return response; + } + + @JsonProperty("Response") + public void setResponse(Object response) { + this.response = response; + } + + /** + * Arguments for `restart` request. + * + */ + @JsonProperty("RestartArguments") + public RestartArguments getRestartArguments() { + return restartArguments; + } + + /** + * Arguments for `restart` request. + * + */ + @JsonProperty("RestartArguments") + public void setRestartArguments(RestartArguments restartArguments) { + this.restartArguments = restartArguments; + } + + /** + * Arguments for `restartFrame` request. + * + */ + @JsonProperty("RestartFrameArguments") + public RestartFrameArguments getRestartFrameArguments() { + return restartFrameArguments; + } + + /** + * Arguments for `restartFrame` request. + * + */ + @JsonProperty("RestartFrameArguments") + public void setRestartFrameArguments(RestartFrameArguments restartFrameArguments) { + this.restartFrameArguments = restartFrameArguments; + } + + @JsonProperty("RestartFrameRequest") + public Object getRestartFrameRequest() { + return restartFrameRequest; + } + + @JsonProperty("RestartFrameRequest") + public void setRestartFrameRequest(Object restartFrameRequest) { + this.restartFrameRequest = restartFrameRequest; + } + + @JsonProperty("RestartFrameResponse") + public Object getRestartFrameResponse() { + return restartFrameResponse; + } + + @JsonProperty("RestartFrameResponse") + public void setRestartFrameResponse(Object restartFrameResponse) { + this.restartFrameResponse = restartFrameResponse; + } + + @JsonProperty("RestartRequest") + public Object getRestartRequest() { + return restartRequest; + } + + @JsonProperty("RestartRequest") + public void setRestartRequest(Object restartRequest) { + this.restartRequest = restartRequest; + } + + @JsonProperty("RestartResponse") + public Object getRestartResponse() { + return restartResponse; + } + + @JsonProperty("RestartResponse") + public void setRestartResponse(Object restartResponse) { + this.restartResponse = restartResponse; + } + + /** + * Arguments for `reverseContinue` request. + * + */ + @JsonProperty("ReverseContinueArguments") + public ReverseContinueArguments getReverseContinueArguments() { + return reverseContinueArguments; + } + + /** + * Arguments for `reverseContinue` request. + * + */ + @JsonProperty("ReverseContinueArguments") + public void setReverseContinueArguments(ReverseContinueArguments reverseContinueArguments) { + this.reverseContinueArguments = reverseContinueArguments; + } + + @JsonProperty("ReverseContinueRequest") + public Object getReverseContinueRequest() { + return reverseContinueRequest; + } + + @JsonProperty("ReverseContinueRequest") + public void setReverseContinueRequest(Object reverseContinueRequest) { + this.reverseContinueRequest = reverseContinueRequest; + } + + @JsonProperty("ReverseContinueResponse") + public Object getReverseContinueResponse() { + return reverseContinueResponse; + } + + @JsonProperty("ReverseContinueResponse") + public void setReverseContinueResponse(Object reverseContinueResponse) { + this.reverseContinueResponse = reverseContinueResponse; + } + + @JsonProperty("RunInTerminalRequest") + public Object getRunInTerminalRequest() { + return runInTerminalRequest; + } + + @JsonProperty("RunInTerminalRequest") + public void setRunInTerminalRequest(Object runInTerminalRequest) { + this.runInTerminalRequest = runInTerminalRequest; + } + + /** + * Arguments for `runInTerminal` request. + * + */ + @JsonProperty("RunInTerminalRequestArguments") + public RunInTerminalRequestArguments getRunInTerminalRequestArguments() { + return runInTerminalRequestArguments; + } + + /** + * Arguments for `runInTerminal` request. + * + */ + @JsonProperty("RunInTerminalRequestArguments") + public void setRunInTerminalRequestArguments(RunInTerminalRequestArguments runInTerminalRequestArguments) { + this.runInTerminalRequestArguments = runInTerminalRequestArguments; + } + + @JsonProperty("RunInTerminalResponse") + public Object getRunInTerminalResponse() { + return runInTerminalResponse; + } + + @JsonProperty("RunInTerminalResponse") + public void setRunInTerminalResponse(Object runInTerminalResponse) { + this.runInTerminalResponse = runInTerminalResponse; + } + + /** + * A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. + * + */ + @JsonProperty("Scope") + public Scope getScope() { + return scope; + } + + /** + * A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. + * + */ + @JsonProperty("Scope") + public void setScope(Scope scope) { + this.scope = scope; + } + + /** + * Arguments for `scopes` request. + * + */ + @JsonProperty("ScopesArguments") + public ScopesArguments getScopesArguments() { + return scopesArguments; + } + + /** + * Arguments for `scopes` request. + * + */ + @JsonProperty("ScopesArguments") + public void setScopesArguments(ScopesArguments scopesArguments) { + this.scopesArguments = scopesArguments; + } + + @JsonProperty("ScopesRequest") + public Object getScopesRequest() { + return scopesRequest; + } + + @JsonProperty("ScopesRequest") + public void setScopesRequest(Object scopesRequest) { + this.scopesRequest = scopesRequest; + } + + @JsonProperty("ScopesResponse") + public Object getScopesResponse() { + return scopesResponse; + } + + @JsonProperty("ScopesResponse") + public void setScopesResponse(Object scopesResponse) { + this.scopesResponse = scopesResponse; + } + + /** + * Arguments for `setBreakpoints` request. + * + */ + @JsonProperty("SetBreakpointsArguments") + public SetBreakpointsArguments getSetBreakpointsArguments() { + return setBreakpointsArguments; + } + + /** + * Arguments for `setBreakpoints` request. + * + */ + @JsonProperty("SetBreakpointsArguments") + public void setSetBreakpointsArguments(SetBreakpointsArguments setBreakpointsArguments) { + this.setBreakpointsArguments = setBreakpointsArguments; + } + + @JsonProperty("SetBreakpointsRequest") + public Object getSetBreakpointsRequest() { + return setBreakpointsRequest; + } + + @JsonProperty("SetBreakpointsRequest") + public void setSetBreakpointsRequest(Object setBreakpointsRequest) { + this.setBreakpointsRequest = setBreakpointsRequest; + } + + @JsonProperty("SetBreakpointsResponse") + public Object getSetBreakpointsResponse() { + return setBreakpointsResponse; + } + + @JsonProperty("SetBreakpointsResponse") + public void setSetBreakpointsResponse(Object setBreakpointsResponse) { + this.setBreakpointsResponse = setBreakpointsResponse; + } + + /** + * Arguments for `setDataBreakpoints` request. + * + */ + @JsonProperty("SetDataBreakpointsArguments") + public SetDataBreakpointsArguments getSetDataBreakpointsArguments() { + return setDataBreakpointsArguments; + } + + /** + * Arguments for `setDataBreakpoints` request. + * + */ + @JsonProperty("SetDataBreakpointsArguments") + public void setSetDataBreakpointsArguments(SetDataBreakpointsArguments setDataBreakpointsArguments) { + this.setDataBreakpointsArguments = setDataBreakpointsArguments; + } + + @JsonProperty("SetDataBreakpointsRequest") + public Object getSetDataBreakpointsRequest() { + return setDataBreakpointsRequest; + } + + @JsonProperty("SetDataBreakpointsRequest") + public void setSetDataBreakpointsRequest(Object setDataBreakpointsRequest) { + this.setDataBreakpointsRequest = setDataBreakpointsRequest; + } + + @JsonProperty("SetDataBreakpointsResponse") + public Object getSetDataBreakpointsResponse() { + return setDataBreakpointsResponse; + } + + @JsonProperty("SetDataBreakpointsResponse") + public void setSetDataBreakpointsResponse(Object setDataBreakpointsResponse) { + this.setDataBreakpointsResponse = setDataBreakpointsResponse; + } + + /** + * Arguments for `setExceptionBreakpoints` request. + * + */ + @JsonProperty("SetExceptionBreakpointsArguments") + public SetExceptionBreakpointsArguments getSetExceptionBreakpointsArguments() { + return setExceptionBreakpointsArguments; + } + + /** + * Arguments for `setExceptionBreakpoints` request. + * + */ + @JsonProperty("SetExceptionBreakpointsArguments") + public void setSetExceptionBreakpointsArguments(SetExceptionBreakpointsArguments setExceptionBreakpointsArguments) { + this.setExceptionBreakpointsArguments = setExceptionBreakpointsArguments; + } + + @JsonProperty("SetExceptionBreakpointsRequest") + public Object getSetExceptionBreakpointsRequest() { + return setExceptionBreakpointsRequest; + } + + @JsonProperty("SetExceptionBreakpointsRequest") + public void setSetExceptionBreakpointsRequest(Object setExceptionBreakpointsRequest) { + this.setExceptionBreakpointsRequest = setExceptionBreakpointsRequest; + } + + @JsonProperty("SetExceptionBreakpointsResponse") + public Object getSetExceptionBreakpointsResponse() { + return setExceptionBreakpointsResponse; + } + + @JsonProperty("SetExceptionBreakpointsResponse") + public void setSetExceptionBreakpointsResponse(Object setExceptionBreakpointsResponse) { + this.setExceptionBreakpointsResponse = setExceptionBreakpointsResponse; + } + + /** + * Arguments for `setExpression` request. + * + */ + @JsonProperty("SetExpressionArguments") + public SetExpressionArguments getSetExpressionArguments() { + return setExpressionArguments; + } + + /** + * Arguments for `setExpression` request. + * + */ + @JsonProperty("SetExpressionArguments") + public void setSetExpressionArguments(SetExpressionArguments setExpressionArguments) { + this.setExpressionArguments = setExpressionArguments; + } + + @JsonProperty("SetExpressionRequest") + public Object getSetExpressionRequest() { + return setExpressionRequest; + } + + @JsonProperty("SetExpressionRequest") + public void setSetExpressionRequest(Object setExpressionRequest) { + this.setExpressionRequest = setExpressionRequest; + } + + @JsonProperty("SetExpressionResponse") + public Object getSetExpressionResponse() { + return setExpressionResponse; + } + + @JsonProperty("SetExpressionResponse") + public void setSetExpressionResponse(Object setExpressionResponse) { + this.setExpressionResponse = setExpressionResponse; + } + + /** + * Arguments for `setFunctionBreakpoints` request. + * + */ + @JsonProperty("SetFunctionBreakpointsArguments") + public SetFunctionBreakpointsArguments getSetFunctionBreakpointsArguments() { + return setFunctionBreakpointsArguments; + } + + /** + * Arguments for `setFunctionBreakpoints` request. + * + */ + @JsonProperty("SetFunctionBreakpointsArguments") + public void setSetFunctionBreakpointsArguments(SetFunctionBreakpointsArguments setFunctionBreakpointsArguments) { + this.setFunctionBreakpointsArguments = setFunctionBreakpointsArguments; + } + + @JsonProperty("SetFunctionBreakpointsRequest") + public Object getSetFunctionBreakpointsRequest() { + return setFunctionBreakpointsRequest; + } + + @JsonProperty("SetFunctionBreakpointsRequest") + public void setSetFunctionBreakpointsRequest(Object setFunctionBreakpointsRequest) { + this.setFunctionBreakpointsRequest = setFunctionBreakpointsRequest; + } + + @JsonProperty("SetFunctionBreakpointsResponse") + public Object getSetFunctionBreakpointsResponse() { + return setFunctionBreakpointsResponse; + } + + @JsonProperty("SetFunctionBreakpointsResponse") + public void setSetFunctionBreakpointsResponse(Object setFunctionBreakpointsResponse) { + this.setFunctionBreakpointsResponse = setFunctionBreakpointsResponse; + } + + /** + * Arguments for `setInstructionBreakpoints` request + * + */ + @JsonProperty("SetInstructionBreakpointsArguments") + public SetInstructionBreakpointsArguments getSetInstructionBreakpointsArguments() { + return setInstructionBreakpointsArguments; + } + + /** + * Arguments for `setInstructionBreakpoints` request + * + */ + @JsonProperty("SetInstructionBreakpointsArguments") + public void setSetInstructionBreakpointsArguments(SetInstructionBreakpointsArguments setInstructionBreakpointsArguments) { + this.setInstructionBreakpointsArguments = setInstructionBreakpointsArguments; + } + + @JsonProperty("SetInstructionBreakpointsRequest") + public Object getSetInstructionBreakpointsRequest() { + return setInstructionBreakpointsRequest; + } + + @JsonProperty("SetInstructionBreakpointsRequest") + public void setSetInstructionBreakpointsRequest(Object setInstructionBreakpointsRequest) { + this.setInstructionBreakpointsRequest = setInstructionBreakpointsRequest; + } + + @JsonProperty("SetInstructionBreakpointsResponse") + public Object getSetInstructionBreakpointsResponse() { + return setInstructionBreakpointsResponse; + } + + @JsonProperty("SetInstructionBreakpointsResponse") + public void setSetInstructionBreakpointsResponse(Object setInstructionBreakpointsResponse) { + this.setInstructionBreakpointsResponse = setInstructionBreakpointsResponse; + } + + /** + * Arguments for `setVariable` request. + * + */ + @JsonProperty("SetVariableArguments") + public SetVariableArguments getSetVariableArguments() { + return setVariableArguments; + } + + /** + * Arguments for `setVariable` request. + * + */ + @JsonProperty("SetVariableArguments") + public void setSetVariableArguments(SetVariableArguments setVariableArguments) { + this.setVariableArguments = setVariableArguments; + } + + @JsonProperty("SetVariableRequest") + public Object getSetVariableRequest() { + return setVariableRequest; + } + + @JsonProperty("SetVariableRequest") + public void setSetVariableRequest(Object setVariableRequest) { + this.setVariableRequest = setVariableRequest; + } + + @JsonProperty("SetVariableResponse") + public Object getSetVariableResponse() { + return setVariableResponse; + } + + @JsonProperty("SetVariableResponse") + public void setSetVariableResponse(Object setVariableResponse) { + this.setVariableResponse = setVariableResponse; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("Source") + public Source getSource() { + return source; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("Source") + public void setSource(Source source) { + this.source = source; + } + + /** + * Arguments for `source` request. + * + */ + @JsonProperty("SourceArguments") + public SourceArguments getSourceArguments() { + return sourceArguments; + } + + /** + * Arguments for `source` request. + * + */ + @JsonProperty("SourceArguments") + public void setSourceArguments(SourceArguments sourceArguments) { + this.sourceArguments = sourceArguments; + } + + /** + * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. + * + */ + @JsonProperty("SourceBreakpoint") + public SourceBreakpoint getSourceBreakpoint() { + return sourceBreakpoint; + } + + /** + * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. + * + */ + @JsonProperty("SourceBreakpoint") + public void setSourceBreakpoint(SourceBreakpoint sourceBreakpoint) { + this.sourceBreakpoint = sourceBreakpoint; + } + + @JsonProperty("SourceRequest") + public Object getSourceRequest() { + return sourceRequest; + } + + @JsonProperty("SourceRequest") + public void setSourceRequest(Object sourceRequest) { + this.sourceRequest = sourceRequest; + } + + @JsonProperty("SourceResponse") + public Object getSourceResponse() { + return sourceResponse; + } + + @JsonProperty("SourceResponse") + public void setSourceResponse(Object sourceResponse) { + this.sourceResponse = sourceResponse; + } + + /** + * A Stackframe contains the source location. + * + */ + @JsonProperty("StackFrame") + public StackFrame getStackFrame() { + return stackFrame; + } + + /** + * A Stackframe contains the source location. + * + */ + @JsonProperty("StackFrame") + public void setStackFrame(StackFrame stackFrame) { + this.stackFrame = stackFrame; + } + + @JsonProperty("StackFrameFormat") + public Object getStackFrameFormat() { + return stackFrameFormat; + } + + @JsonProperty("StackFrameFormat") + public void setStackFrameFormat(Object stackFrameFormat) { + this.stackFrameFormat = stackFrameFormat; + } + + /** + * Arguments for `stackTrace` request. + * + */ + @JsonProperty("StackTraceArguments") + public StackTraceArguments getStackTraceArguments() { + return stackTraceArguments; + } + + /** + * Arguments for `stackTrace` request. + * + */ + @JsonProperty("StackTraceArguments") + public void setStackTraceArguments(StackTraceArguments stackTraceArguments) { + this.stackTraceArguments = stackTraceArguments; + } + + @JsonProperty("StackTraceRequest") + public Object getStackTraceRequest() { + return stackTraceRequest; + } + + @JsonProperty("StackTraceRequest") + public void setStackTraceRequest(Object stackTraceRequest) { + this.stackTraceRequest = stackTraceRequest; + } + + @JsonProperty("StackTraceResponse") + public Object getStackTraceResponse() { + return stackTraceResponse; + } + + @JsonProperty("StackTraceResponse") + public void setStackTraceResponse(Object stackTraceResponse) { + this.stackTraceResponse = stackTraceResponse; + } + + @JsonProperty("StartDebuggingRequest") + public Object getStartDebuggingRequest() { + return startDebuggingRequest; + } + + @JsonProperty("StartDebuggingRequest") + public void setStartDebuggingRequest(Object startDebuggingRequest) { + this.startDebuggingRequest = startDebuggingRequest; + } + + /** + * Arguments for `startDebugging` request. + * + */ + @JsonProperty("StartDebuggingRequestArguments") + public StartDebuggingRequestArguments getStartDebuggingRequestArguments() { + return startDebuggingRequestArguments; + } + + /** + * Arguments for `startDebugging` request. + * + */ + @JsonProperty("StartDebuggingRequestArguments") + public void setStartDebuggingRequestArguments(StartDebuggingRequestArguments startDebuggingRequestArguments) { + this.startDebuggingRequestArguments = startDebuggingRequestArguments; + } + + @JsonProperty("StartDebuggingResponse") + public Object getStartDebuggingResponse() { + return startDebuggingResponse; + } + + @JsonProperty("StartDebuggingResponse") + public void setStartDebuggingResponse(Object startDebuggingResponse) { + this.startDebuggingResponse = startDebuggingResponse; + } + + /** + * Arguments for `stepBack` request. + * + */ + @JsonProperty("StepBackArguments") + public StepBackArguments getStepBackArguments() { + return stepBackArguments; + } + + /** + * Arguments for `stepBack` request. + * + */ + @JsonProperty("StepBackArguments") + public void setStepBackArguments(StepBackArguments stepBackArguments) { + this.stepBackArguments = stepBackArguments; + } + + @JsonProperty("StepBackRequest") + public Object getStepBackRequest() { + return stepBackRequest; + } + + @JsonProperty("StepBackRequest") + public void setStepBackRequest(Object stepBackRequest) { + this.stepBackRequest = stepBackRequest; + } + + @JsonProperty("StepBackResponse") + public Object getStepBackResponse() { + return stepBackResponse; + } + + @JsonProperty("StepBackResponse") + public void setStepBackResponse(Object stepBackResponse) { + this.stepBackResponse = stepBackResponse; + } + + /** + * Arguments for `stepIn` request. + * + */ + @JsonProperty("StepInArguments") + public StepInArguments getStepInArguments() { + return stepInArguments; + } + + /** + * Arguments for `stepIn` request. + * + */ + @JsonProperty("StepInArguments") + public void setStepInArguments(StepInArguments stepInArguments) { + this.stepInArguments = stepInArguments; + } + + @JsonProperty("StepInRequest") + public Object getStepInRequest() { + return stepInRequest; + } + + @JsonProperty("StepInRequest") + public void setStepInRequest(Object stepInRequest) { + this.stepInRequest = stepInRequest; + } + + @JsonProperty("StepInResponse") + public Object getStepInResponse() { + return stepInResponse; + } + + @JsonProperty("StepInResponse") + public void setStepInResponse(Object stepInResponse) { + this.stepInResponse = stepInResponse; + } + + /** + * A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. + * + */ + @JsonProperty("StepInTarget") + public StepInTarget getStepInTarget() { + return stepInTarget; + } + + /** + * A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. + * + */ + @JsonProperty("StepInTarget") + public void setStepInTarget(StepInTarget stepInTarget) { + this.stepInTarget = stepInTarget; + } + + /** + * Arguments for `stepInTargets` request. + * + */ + @JsonProperty("StepInTargetsArguments") + public StepInTargetsArguments getStepInTargetsArguments() { + return stepInTargetsArguments; + } + + /** + * Arguments for `stepInTargets` request. + * + */ + @JsonProperty("StepInTargetsArguments") + public void setStepInTargetsArguments(StepInTargetsArguments stepInTargetsArguments) { + this.stepInTargetsArguments = stepInTargetsArguments; + } + + @JsonProperty("StepInTargetsRequest") + public Object getStepInTargetsRequest() { + return stepInTargetsRequest; + } + + @JsonProperty("StepInTargetsRequest") + public void setStepInTargetsRequest(Object stepInTargetsRequest) { + this.stepInTargetsRequest = stepInTargetsRequest; + } + + @JsonProperty("StepInTargetsResponse") + public Object getStepInTargetsResponse() { + return stepInTargetsResponse; + } + + @JsonProperty("StepInTargetsResponse") + public void setStepInTargetsResponse(Object stepInTargetsResponse) { + this.stepInTargetsResponse = stepInTargetsResponse; + } + + /** + * Arguments for `stepOut` request. + * + */ + @JsonProperty("StepOutArguments") + public StepOutArguments getStepOutArguments() { + return stepOutArguments; + } + + /** + * Arguments for `stepOut` request. + * + */ + @JsonProperty("StepOutArguments") + public void setStepOutArguments(StepOutArguments stepOutArguments) { + this.stepOutArguments = stepOutArguments; + } + + @JsonProperty("StepOutRequest") + public Object getStepOutRequest() { + return stepOutRequest; + } + + @JsonProperty("StepOutRequest") + public void setStepOutRequest(Object stepOutRequest) { + this.stepOutRequest = stepOutRequest; + } + + @JsonProperty("StepOutResponse") + public Object getStepOutResponse() { + return stepOutResponse; + } + + @JsonProperty("StepOutResponse") + public void setStepOutResponse(Object stepOutResponse) { + this.stepOutResponse = stepOutResponse; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("SteppingGranularity") + public NextArguments.SteppingGranularity getSteppingGranularity() { + return steppingGranularity; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("SteppingGranularity") + public void setSteppingGranularity(NextArguments.SteppingGranularity steppingGranularity) { + this.steppingGranularity = steppingGranularity; + } + + @JsonProperty("StoppedEvent") + public Object getStoppedEvent() { + return stoppedEvent; + } + + @JsonProperty("StoppedEvent") + public void setStoppedEvent(Object stoppedEvent) { + this.stoppedEvent = stoppedEvent; + } + + /** + * Arguments for `terminate` request. + * + */ + @JsonProperty("TerminateArguments") + public TerminateArguments getTerminateArguments() { + return terminateArguments; + } + + /** + * Arguments for `terminate` request. + * + */ + @JsonProperty("TerminateArguments") + public void setTerminateArguments(TerminateArguments terminateArguments) { + this.terminateArguments = terminateArguments; + } + + @JsonProperty("TerminateRequest") + public Object getTerminateRequest() { + return terminateRequest; + } + + @JsonProperty("TerminateRequest") + public void setTerminateRequest(Object terminateRequest) { + this.terminateRequest = terminateRequest; + } + + @JsonProperty("TerminateResponse") + public Object getTerminateResponse() { + return terminateResponse; + } + + @JsonProperty("TerminateResponse") + public void setTerminateResponse(Object terminateResponse) { + this.terminateResponse = terminateResponse; + } + + /** + * Arguments for `terminateThreads` request. + * + */ + @JsonProperty("TerminateThreadsArguments") + public TerminateThreadsArguments getTerminateThreadsArguments() { + return terminateThreadsArguments; + } + + /** + * Arguments for `terminateThreads` request. + * + */ + @JsonProperty("TerminateThreadsArguments") + public void setTerminateThreadsArguments(TerminateThreadsArguments terminateThreadsArguments) { + this.terminateThreadsArguments = terminateThreadsArguments; + } + + @JsonProperty("TerminateThreadsRequest") + public Object getTerminateThreadsRequest() { + return terminateThreadsRequest; + } + + @JsonProperty("TerminateThreadsRequest") + public void setTerminateThreadsRequest(Object terminateThreadsRequest) { + this.terminateThreadsRequest = terminateThreadsRequest; + } + + @JsonProperty("TerminateThreadsResponse") + public Object getTerminateThreadsResponse() { + return terminateThreadsResponse; + } + + @JsonProperty("TerminateThreadsResponse") + public void setTerminateThreadsResponse(Object terminateThreadsResponse) { + this.terminateThreadsResponse = terminateThreadsResponse; + } + + @JsonProperty("TerminatedEvent") + public Object getTerminatedEvent() { + return terminatedEvent; + } + + @JsonProperty("TerminatedEvent") + public void setTerminatedEvent(Object terminatedEvent) { + this.terminatedEvent = terminatedEvent; + } + + /** + * A Thread + * + */ + @JsonProperty("Thread") + public Thread getThread() { + return thread; + } + + /** + * A Thread + * + */ + @JsonProperty("Thread") + public void setThread(Thread thread) { + this.thread = thread; + } + + @JsonProperty("ThreadEvent") + public Object getThreadEvent() { + return threadEvent; + } + + @JsonProperty("ThreadEvent") + public void setThreadEvent(Object threadEvent) { + this.threadEvent = threadEvent; + } + + @JsonProperty("ThreadsRequest") + public Object getThreadsRequest() { + return threadsRequest; + } + + @JsonProperty("ThreadsRequest") + public void setThreadsRequest(Object threadsRequest) { + this.threadsRequest = threadsRequest; + } + + @JsonProperty("ThreadsResponse") + public Object getThreadsResponse() { + return threadsResponse; + } + + @JsonProperty("ThreadsResponse") + public void setThreadsResponse(Object threadsResponse) { + this.threadsResponse = threadsResponse; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("ValueFormat") + public ValueFormat getValueFormat() { + return valueFormat; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("ValueFormat") + public void setValueFormat(ValueFormat valueFormat) { + this.valueFormat = valueFormat; + } + + /** + * A Variable is a name/value pair. + * The `type` attribute is shown if space permits or when hovering over the variable's name. + * The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. + * If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. + * If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("Variable") + public Variable getVariable() { + return variable; + } + + /** + * A Variable is a name/value pair. + * The `type` attribute is shown if space permits or when hovering over the variable's name. + * The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. + * If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. + * If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("Variable") + public void setVariable(Variable variable) { + this.variable = variable; + } + + /** + * Properties of a variable that can be used to determine how to render the variable in the UI. + * + */ + @JsonProperty("VariablePresentationHint") + public VariablePresentationHint getVariablePresentationHint() { + return variablePresentationHint; + } + + /** + * Properties of a variable that can be used to determine how to render the variable in the UI. + * + */ + @JsonProperty("VariablePresentationHint") + public void setVariablePresentationHint(VariablePresentationHint variablePresentationHint) { + this.variablePresentationHint = variablePresentationHint; + } + + /** + * Arguments for `variables` request. + * + */ + @JsonProperty("VariablesArguments") + public VariablesArguments getVariablesArguments() { + return variablesArguments; + } + + /** + * Arguments for `variables` request. + * + */ + @JsonProperty("VariablesArguments") + public void setVariablesArguments(VariablesArguments variablesArguments) { + this.variablesArguments = variablesArguments; + } + + @JsonProperty("VariablesRequest") + public Object getVariablesRequest() { + return variablesRequest; + } + + @JsonProperty("VariablesRequest") + public void setVariablesRequest(Object variablesRequest) { + this.variablesRequest = variablesRequest; + } + + @JsonProperty("VariablesResponse") + public Object getVariablesResponse() { + return variablesResponse; + } + + @JsonProperty("VariablesResponse") + public void setVariablesResponse(Object variablesResponse) { + this.variablesResponse = variablesResponse; + } + + /** + * Arguments for `writeMemory` request. + * + */ + @JsonProperty("WriteMemoryArguments") + public WriteMemoryArguments getWriteMemoryArguments() { + return writeMemoryArguments; + } + + /** + * Arguments for `writeMemory` request. + * + */ + @JsonProperty("WriteMemoryArguments") + public void setWriteMemoryArguments(WriteMemoryArguments writeMemoryArguments) { + this.writeMemoryArguments = writeMemoryArguments; + } + + @JsonProperty("WriteMemoryRequest") + public Object getWriteMemoryRequest() { + return writeMemoryRequest; + } + + @JsonProperty("WriteMemoryRequest") + public void setWriteMemoryRequest(Object writeMemoryRequest) { + this.writeMemoryRequest = writeMemoryRequest; + } + + @JsonProperty("WriteMemoryResponse") + public Object getWriteMemoryResponse() { + return writeMemoryResponse; + } + + @JsonProperty("WriteMemoryResponse") + public void setWriteMemoryResponse(Object writeMemoryResponse) { + this.writeMemoryResponse = writeMemoryResponse; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DebugProtocol.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("attachRequest"); + sb.append('='); + sb.append(((this.attachRequest == null)?"":this.attachRequest)); + sb.append(','); + sb.append("attachRequestArguments"); + sb.append('='); + sb.append(((this.attachRequestArguments == null)?"":this.attachRequestArguments)); + sb.append(','); + sb.append("attachResponse"); + sb.append('='); + sb.append(((this.attachResponse == null)?"":this.attachResponse)); + sb.append(','); + sb.append("breakpoint"); + sb.append('='); + sb.append(((this.breakpoint == null)?"":this.breakpoint)); + sb.append(','); + sb.append("breakpointEvent"); + sb.append('='); + sb.append(((this.breakpointEvent == null)?"":this.breakpointEvent)); + sb.append(','); + sb.append("breakpointLocation"); + sb.append('='); + sb.append(((this.breakpointLocation == null)?"":this.breakpointLocation)); + sb.append(','); + sb.append("breakpointLocationsArguments"); + sb.append('='); + sb.append(((this.breakpointLocationsArguments == null)?"":this.breakpointLocationsArguments)); + sb.append(','); + sb.append("breakpointLocationsRequest"); + sb.append('='); + sb.append(((this.breakpointLocationsRequest == null)?"":this.breakpointLocationsRequest)); + sb.append(','); + sb.append("breakpointLocationsResponse"); + sb.append('='); + sb.append(((this.breakpointLocationsResponse == null)?"":this.breakpointLocationsResponse)); + sb.append(','); + sb.append("cancelArguments"); + sb.append('='); + sb.append(((this.cancelArguments == null)?"":this.cancelArguments)); + sb.append(','); + sb.append("cancelRequest"); + sb.append('='); + sb.append(((this.cancelRequest == null)?"":this.cancelRequest)); + sb.append(','); + sb.append("cancelResponse"); + sb.append('='); + sb.append(((this.cancelResponse == null)?"":this.cancelResponse)); + sb.append(','); + sb.append("capabilities"); + sb.append('='); + sb.append(((this.capabilities == null)?"":this.capabilities)); + sb.append(','); + sb.append("capabilitiesEvent"); + sb.append('='); + sb.append(((this.capabilitiesEvent == null)?"":this.capabilitiesEvent)); + sb.append(','); + sb.append("checksum"); + sb.append('='); + sb.append(((this.checksum == null)?"":this.checksum)); + sb.append(','); + sb.append("checksumAlgorithm"); + sb.append('='); + sb.append(((this.checksumAlgorithm == null)?"":this.checksumAlgorithm)); + sb.append(','); + sb.append("columnDescriptor"); + sb.append('='); + sb.append(((this.columnDescriptor == null)?"":this.columnDescriptor)); + sb.append(','); + sb.append("completionItem"); + sb.append('='); + sb.append(((this.completionItem == null)?"":this.completionItem)); + sb.append(','); + sb.append("completionItemType"); + sb.append('='); + sb.append(((this.completionItemType == null)?"":this.completionItemType)); + sb.append(','); + sb.append("completionsArguments"); + sb.append('='); + sb.append(((this.completionsArguments == null)?"":this.completionsArguments)); + sb.append(','); + sb.append("completionsRequest"); + sb.append('='); + sb.append(((this.completionsRequest == null)?"":this.completionsRequest)); + sb.append(','); + sb.append("completionsResponse"); + sb.append('='); + sb.append(((this.completionsResponse == null)?"":this.completionsResponse)); + sb.append(','); + sb.append("configurationDoneArguments"); + sb.append('='); + sb.append(((this.configurationDoneArguments == null)?"":this.configurationDoneArguments)); + sb.append(','); + sb.append("configurationDoneRequest"); + sb.append('='); + sb.append(((this.configurationDoneRequest == null)?"":this.configurationDoneRequest)); + sb.append(','); + sb.append("configurationDoneResponse"); + sb.append('='); + sb.append(((this.configurationDoneResponse == null)?"":this.configurationDoneResponse)); + sb.append(','); + sb.append("continueArguments"); + sb.append('='); + sb.append(((this.continueArguments == null)?"":this.continueArguments)); + sb.append(','); + sb.append("continueRequest"); + sb.append('='); + sb.append(((this.continueRequest == null)?"":this.continueRequest)); + sb.append(','); + sb.append("continueResponse"); + sb.append('='); + sb.append(((this.continueResponse == null)?"":this.continueResponse)); + sb.append(','); + sb.append("continuedEvent"); + sb.append('='); + sb.append(((this.continuedEvent == null)?"":this.continuedEvent)); + sb.append(','); + sb.append("dataBreakpoint"); + sb.append('='); + sb.append(((this.dataBreakpoint == null)?"":this.dataBreakpoint)); + sb.append(','); + sb.append("dataBreakpointAccessType"); + sb.append('='); + sb.append(((this.dataBreakpointAccessType == null)?"":this.dataBreakpointAccessType)); + sb.append(','); + sb.append("dataBreakpointInfoArguments"); + sb.append('='); + sb.append(((this.dataBreakpointInfoArguments == null)?"":this.dataBreakpointInfoArguments)); + sb.append(','); + sb.append("dataBreakpointInfoRequest"); + sb.append('='); + sb.append(((this.dataBreakpointInfoRequest == null)?"":this.dataBreakpointInfoRequest)); + sb.append(','); + sb.append("dataBreakpointInfoResponse"); + sb.append('='); + sb.append(((this.dataBreakpointInfoResponse == null)?"":this.dataBreakpointInfoResponse)); + sb.append(','); + sb.append("disassembleArguments"); + sb.append('='); + sb.append(((this.disassembleArguments == null)?"":this.disassembleArguments)); + sb.append(','); + sb.append("disassembleRequest"); + sb.append('='); + sb.append(((this.disassembleRequest == null)?"":this.disassembleRequest)); + sb.append(','); + sb.append("disassembleResponse"); + sb.append('='); + sb.append(((this.disassembleResponse == null)?"":this.disassembleResponse)); + sb.append(','); + sb.append("disassembledInstruction"); + sb.append('='); + sb.append(((this.disassembledInstruction == null)?"":this.disassembledInstruction)); + sb.append(','); + sb.append("disconnectArguments"); + sb.append('='); + sb.append(((this.disconnectArguments == null)?"":this.disconnectArguments)); + sb.append(','); + sb.append("disconnectRequest"); + sb.append('='); + sb.append(((this.disconnectRequest == null)?"":this.disconnectRequest)); + sb.append(','); + sb.append("disconnectResponse"); + sb.append('='); + sb.append(((this.disconnectResponse == null)?"":this.disconnectResponse)); + sb.append(','); + sb.append("errorResponse"); + sb.append('='); + sb.append(((this.errorResponse == null)?"":this.errorResponse)); + sb.append(','); + sb.append("evaluateArguments"); + sb.append('='); + sb.append(((this.evaluateArguments == null)?"":this.evaluateArguments)); + sb.append(','); + sb.append("evaluateRequest"); + sb.append('='); + sb.append(((this.evaluateRequest == null)?"":this.evaluateRequest)); + sb.append(','); + sb.append("evaluateResponse"); + sb.append('='); + sb.append(((this.evaluateResponse == null)?"":this.evaluateResponse)); + sb.append(','); + sb.append("event"); + sb.append('='); + sb.append(((this.event == null)?"":this.event)); + sb.append(','); + sb.append("exceptionBreakMode"); + sb.append('='); + sb.append(((this.exceptionBreakMode == null)?"":this.exceptionBreakMode)); + sb.append(','); + sb.append("exceptionBreakpointsFilter"); + sb.append('='); + sb.append(((this.exceptionBreakpointsFilter == null)?"":this.exceptionBreakpointsFilter)); + sb.append(','); + sb.append("exceptionDetails"); + sb.append('='); + sb.append(((this.exceptionDetails == null)?"":this.exceptionDetails)); + sb.append(','); + sb.append("exceptionFilterOptions"); + sb.append('='); + sb.append(((this.exceptionFilterOptions == null)?"":this.exceptionFilterOptions)); + sb.append(','); + sb.append("exceptionInfoArguments"); + sb.append('='); + sb.append(((this.exceptionInfoArguments == null)?"":this.exceptionInfoArguments)); + sb.append(','); + sb.append("exceptionInfoRequest"); + sb.append('='); + sb.append(((this.exceptionInfoRequest == null)?"":this.exceptionInfoRequest)); + sb.append(','); + sb.append("exceptionInfoResponse"); + sb.append('='); + sb.append(((this.exceptionInfoResponse == null)?"":this.exceptionInfoResponse)); + sb.append(','); + sb.append("exceptionOptions"); + sb.append('='); + sb.append(((this.exceptionOptions == null)?"":this.exceptionOptions)); + sb.append(','); + sb.append("exceptionPathSegment"); + sb.append('='); + sb.append(((this.exceptionPathSegment == null)?"":this.exceptionPathSegment)); + sb.append(','); + sb.append("exitedEvent"); + sb.append('='); + sb.append(((this.exitedEvent == null)?"":this.exitedEvent)); + sb.append(','); + sb.append("functionBreakpoint"); + sb.append('='); + sb.append(((this.functionBreakpoint == null)?"":this.functionBreakpoint)); + sb.append(','); + sb.append("gotoArguments"); + sb.append('='); + sb.append(((this.gotoArguments == null)?"":this.gotoArguments)); + sb.append(','); + sb.append("gotoRequest"); + sb.append('='); + sb.append(((this.gotoRequest == null)?"":this.gotoRequest)); + sb.append(','); + sb.append("gotoResponse"); + sb.append('='); + sb.append(((this.gotoResponse == null)?"":this.gotoResponse)); + sb.append(','); + sb.append("gotoTarget"); + sb.append('='); + sb.append(((this.gotoTarget == null)?"":this.gotoTarget)); + sb.append(','); + sb.append("gotoTargetsArguments"); + sb.append('='); + sb.append(((this.gotoTargetsArguments == null)?"":this.gotoTargetsArguments)); + sb.append(','); + sb.append("gotoTargetsRequest"); + sb.append('='); + sb.append(((this.gotoTargetsRequest == null)?"":this.gotoTargetsRequest)); + sb.append(','); + sb.append("gotoTargetsResponse"); + sb.append('='); + sb.append(((this.gotoTargetsResponse == null)?"":this.gotoTargetsResponse)); + sb.append(','); + sb.append("initializeRequest"); + sb.append('='); + sb.append(((this.initializeRequest == null)?"":this.initializeRequest)); + sb.append(','); + sb.append("initializeRequestArguments"); + sb.append('='); + sb.append(((this.initializeRequestArguments == null)?"":this.initializeRequestArguments)); + sb.append(','); + sb.append("initializeResponse"); + sb.append('='); + sb.append(((this.initializeResponse == null)?"":this.initializeResponse)); + sb.append(','); + sb.append("initializedEvent"); + sb.append('='); + sb.append(((this.initializedEvent == null)?"":this.initializedEvent)); + sb.append(','); + sb.append("instructionBreakpoint"); + sb.append('='); + sb.append(((this.instructionBreakpoint == null)?"":this.instructionBreakpoint)); + sb.append(','); + sb.append("invalidatedAreas"); + sb.append('='); + sb.append(((this.invalidatedAreas == null)?"":this.invalidatedAreas)); + sb.append(','); + sb.append("invalidatedEvent"); + sb.append('='); + sb.append(((this.invalidatedEvent == null)?"":this.invalidatedEvent)); + sb.append(','); + sb.append("launchRequest"); + sb.append('='); + sb.append(((this.launchRequest == null)?"":this.launchRequest)); + sb.append(','); + sb.append("launchRequestArguments"); + sb.append('='); + sb.append(((this.launchRequestArguments == null)?"":this.launchRequestArguments)); + sb.append(','); + sb.append("launchResponse"); + sb.append('='); + sb.append(((this.launchResponse == null)?"":this.launchResponse)); + sb.append(','); + sb.append("loadedSourceEvent"); + sb.append('='); + sb.append(((this.loadedSourceEvent == null)?"":this.loadedSourceEvent)); + sb.append(','); + sb.append("loadedSourcesArguments"); + sb.append('='); + sb.append(((this.loadedSourcesArguments == null)?"":this.loadedSourcesArguments)); + sb.append(','); + sb.append("loadedSourcesRequest"); + sb.append('='); + sb.append(((this.loadedSourcesRequest == null)?"":this.loadedSourcesRequest)); + sb.append(','); + sb.append("loadedSourcesResponse"); + sb.append('='); + sb.append(((this.loadedSourcesResponse == null)?"":this.loadedSourcesResponse)); + sb.append(','); + sb.append("memoryEvent"); + sb.append('='); + sb.append(((this.memoryEvent == null)?"":this.memoryEvent)); + sb.append(','); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("module"); + sb.append('='); + sb.append(((this.module == null)?"":this.module)); + sb.append(','); + sb.append("moduleEvent"); + sb.append('='); + sb.append(((this.moduleEvent == null)?"":this.moduleEvent)); + sb.append(','); + sb.append("modulesArguments"); + sb.append('='); + sb.append(((this.modulesArguments == null)?"":this.modulesArguments)); + sb.append(','); + sb.append("modulesRequest"); + sb.append('='); + sb.append(((this.modulesRequest == null)?"":this.modulesRequest)); + sb.append(','); + sb.append("modulesResponse"); + sb.append('='); + sb.append(((this.modulesResponse == null)?"":this.modulesResponse)); + sb.append(','); + sb.append("nextArguments"); + sb.append('='); + sb.append(((this.nextArguments == null)?"":this.nextArguments)); + sb.append(','); + sb.append("nextRequest"); + sb.append('='); + sb.append(((this.nextRequest == null)?"":this.nextRequest)); + sb.append(','); + sb.append("nextResponse"); + sb.append('='); + sb.append(((this.nextResponse == null)?"":this.nextResponse)); + sb.append(','); + sb.append("outputEvent"); + sb.append('='); + sb.append(((this.outputEvent == null)?"":this.outputEvent)); + sb.append(','); + sb.append("pauseArguments"); + sb.append('='); + sb.append(((this.pauseArguments == null)?"":this.pauseArguments)); + sb.append(','); + sb.append("pauseRequest"); + sb.append('='); + sb.append(((this.pauseRequest == null)?"":this.pauseRequest)); + sb.append(','); + sb.append("pauseResponse"); + sb.append('='); + sb.append(((this.pauseResponse == null)?"":this.pauseResponse)); + sb.append(','); + sb.append("processEvent"); + sb.append('='); + sb.append(((this.processEvent == null)?"":this.processEvent)); + sb.append(','); + sb.append("progressEndEvent"); + sb.append('='); + sb.append(((this.progressEndEvent == null)?"":this.progressEndEvent)); + sb.append(','); + sb.append("progressStartEvent"); + sb.append('='); + sb.append(((this.progressStartEvent == null)?"":this.progressStartEvent)); + sb.append(','); + sb.append("progressUpdateEvent"); + sb.append('='); + sb.append(((this.progressUpdateEvent == null)?"":this.progressUpdateEvent)); + sb.append(','); + sb.append("protocolMessage"); + sb.append('='); + sb.append(((this.protocolMessage == null)?"":this.protocolMessage)); + sb.append(','); + sb.append("readMemoryArguments"); + sb.append('='); + sb.append(((this.readMemoryArguments == null)?"":this.readMemoryArguments)); + sb.append(','); + sb.append("readMemoryRequest"); + sb.append('='); + sb.append(((this.readMemoryRequest == null)?"":this.readMemoryRequest)); + sb.append(','); + sb.append("readMemoryResponse"); + sb.append('='); + sb.append(((this.readMemoryResponse == null)?"":this.readMemoryResponse)); + sb.append(','); + sb.append("request"); + sb.append('='); + sb.append(((this.request == null)?"":this.request)); + sb.append(','); + sb.append("response"); + sb.append('='); + sb.append(((this.response == null)?"":this.response)); + sb.append(','); + sb.append("restartArguments"); + sb.append('='); + sb.append(((this.restartArguments == null)?"":this.restartArguments)); + sb.append(','); + sb.append("restartFrameArguments"); + sb.append('='); + sb.append(((this.restartFrameArguments == null)?"":this.restartFrameArguments)); + sb.append(','); + sb.append("restartFrameRequest"); + sb.append('='); + sb.append(((this.restartFrameRequest == null)?"":this.restartFrameRequest)); + sb.append(','); + sb.append("restartFrameResponse"); + sb.append('='); + sb.append(((this.restartFrameResponse == null)?"":this.restartFrameResponse)); + sb.append(','); + sb.append("restartRequest"); + sb.append('='); + sb.append(((this.restartRequest == null)?"":this.restartRequest)); + sb.append(','); + sb.append("restartResponse"); + sb.append('='); + sb.append(((this.restartResponse == null)?"":this.restartResponse)); + sb.append(','); + sb.append("reverseContinueArguments"); + sb.append('='); + sb.append(((this.reverseContinueArguments == null)?"":this.reverseContinueArguments)); + sb.append(','); + sb.append("reverseContinueRequest"); + sb.append('='); + sb.append(((this.reverseContinueRequest == null)?"":this.reverseContinueRequest)); + sb.append(','); + sb.append("reverseContinueResponse"); + sb.append('='); + sb.append(((this.reverseContinueResponse == null)?"":this.reverseContinueResponse)); + sb.append(','); + sb.append("runInTerminalRequest"); + sb.append('='); + sb.append(((this.runInTerminalRequest == null)?"":this.runInTerminalRequest)); + sb.append(','); + sb.append("runInTerminalRequestArguments"); + sb.append('='); + sb.append(((this.runInTerminalRequestArguments == null)?"":this.runInTerminalRequestArguments)); + sb.append(','); + sb.append("runInTerminalResponse"); + sb.append('='); + sb.append(((this.runInTerminalResponse == null)?"":this.runInTerminalResponse)); + sb.append(','); + sb.append("scope"); + sb.append('='); + sb.append(((this.scope == null)?"":this.scope)); + sb.append(','); + sb.append("scopesArguments"); + sb.append('='); + sb.append(((this.scopesArguments == null)?"":this.scopesArguments)); + sb.append(','); + sb.append("scopesRequest"); + sb.append('='); + sb.append(((this.scopesRequest == null)?"":this.scopesRequest)); + sb.append(','); + sb.append("scopesResponse"); + sb.append('='); + sb.append(((this.scopesResponse == null)?"":this.scopesResponse)); + sb.append(','); + sb.append("setBreakpointsArguments"); + sb.append('='); + sb.append(((this.setBreakpointsArguments == null)?"":this.setBreakpointsArguments)); + sb.append(','); + sb.append("setBreakpointsRequest"); + sb.append('='); + sb.append(((this.setBreakpointsRequest == null)?"":this.setBreakpointsRequest)); + sb.append(','); + sb.append("setBreakpointsResponse"); + sb.append('='); + sb.append(((this.setBreakpointsResponse == null)?"":this.setBreakpointsResponse)); + sb.append(','); + sb.append("setDataBreakpointsArguments"); + sb.append('='); + sb.append(((this.setDataBreakpointsArguments == null)?"":this.setDataBreakpointsArguments)); + sb.append(','); + sb.append("setDataBreakpointsRequest"); + sb.append('='); + sb.append(((this.setDataBreakpointsRequest == null)?"":this.setDataBreakpointsRequest)); + sb.append(','); + sb.append("setDataBreakpointsResponse"); + sb.append('='); + sb.append(((this.setDataBreakpointsResponse == null)?"":this.setDataBreakpointsResponse)); + sb.append(','); + sb.append("setExceptionBreakpointsArguments"); + sb.append('='); + sb.append(((this.setExceptionBreakpointsArguments == null)?"":this.setExceptionBreakpointsArguments)); + sb.append(','); + sb.append("setExceptionBreakpointsRequest"); + sb.append('='); + sb.append(((this.setExceptionBreakpointsRequest == null)?"":this.setExceptionBreakpointsRequest)); + sb.append(','); + sb.append("setExceptionBreakpointsResponse"); + sb.append('='); + sb.append(((this.setExceptionBreakpointsResponse == null)?"":this.setExceptionBreakpointsResponse)); + sb.append(','); + sb.append("setExpressionArguments"); + sb.append('='); + sb.append(((this.setExpressionArguments == null)?"":this.setExpressionArguments)); + sb.append(','); + sb.append("setExpressionRequest"); + sb.append('='); + sb.append(((this.setExpressionRequest == null)?"":this.setExpressionRequest)); + sb.append(','); + sb.append("setExpressionResponse"); + sb.append('='); + sb.append(((this.setExpressionResponse == null)?"":this.setExpressionResponse)); + sb.append(','); + sb.append("setFunctionBreakpointsArguments"); + sb.append('='); + sb.append(((this.setFunctionBreakpointsArguments == null)?"":this.setFunctionBreakpointsArguments)); + sb.append(','); + sb.append("setFunctionBreakpointsRequest"); + sb.append('='); + sb.append(((this.setFunctionBreakpointsRequest == null)?"":this.setFunctionBreakpointsRequest)); + sb.append(','); + sb.append("setFunctionBreakpointsResponse"); + sb.append('='); + sb.append(((this.setFunctionBreakpointsResponse == null)?"":this.setFunctionBreakpointsResponse)); + sb.append(','); + sb.append("setInstructionBreakpointsArguments"); + sb.append('='); + sb.append(((this.setInstructionBreakpointsArguments == null)?"":this.setInstructionBreakpointsArguments)); + sb.append(','); + sb.append("setInstructionBreakpointsRequest"); + sb.append('='); + sb.append(((this.setInstructionBreakpointsRequest == null)?"":this.setInstructionBreakpointsRequest)); + sb.append(','); + sb.append("setInstructionBreakpointsResponse"); + sb.append('='); + sb.append(((this.setInstructionBreakpointsResponse == null)?"":this.setInstructionBreakpointsResponse)); + sb.append(','); + sb.append("setVariableArguments"); + sb.append('='); + sb.append(((this.setVariableArguments == null)?"":this.setVariableArguments)); + sb.append(','); + sb.append("setVariableRequest"); + sb.append('='); + sb.append(((this.setVariableRequest == null)?"":this.setVariableRequest)); + sb.append(','); + sb.append("setVariableResponse"); + sb.append('='); + sb.append(((this.setVariableResponse == null)?"":this.setVariableResponse)); + sb.append(','); + sb.append("source"); + sb.append('='); + sb.append(((this.source == null)?"":this.source)); + sb.append(','); + sb.append("sourceArguments"); + sb.append('='); + sb.append(((this.sourceArguments == null)?"":this.sourceArguments)); + sb.append(','); + sb.append("sourceBreakpoint"); + sb.append('='); + sb.append(((this.sourceBreakpoint == null)?"":this.sourceBreakpoint)); + sb.append(','); + sb.append("sourceRequest"); + sb.append('='); + sb.append(((this.sourceRequest == null)?"":this.sourceRequest)); + sb.append(','); + sb.append("sourceResponse"); + sb.append('='); + sb.append(((this.sourceResponse == null)?"":this.sourceResponse)); + sb.append(','); + sb.append("stackFrame"); + sb.append('='); + sb.append(((this.stackFrame == null)?"":this.stackFrame)); + sb.append(','); + sb.append("stackFrameFormat"); + sb.append('='); + sb.append(((this.stackFrameFormat == null)?"":this.stackFrameFormat)); + sb.append(','); + sb.append("stackTraceArguments"); + sb.append('='); + sb.append(((this.stackTraceArguments == null)?"":this.stackTraceArguments)); + sb.append(','); + sb.append("stackTraceRequest"); + sb.append('='); + sb.append(((this.stackTraceRequest == null)?"":this.stackTraceRequest)); + sb.append(','); + sb.append("stackTraceResponse"); + sb.append('='); + sb.append(((this.stackTraceResponse == null)?"":this.stackTraceResponse)); + sb.append(','); + sb.append("startDebuggingRequest"); + sb.append('='); + sb.append(((this.startDebuggingRequest == null)?"":this.startDebuggingRequest)); + sb.append(','); + sb.append("startDebuggingRequestArguments"); + sb.append('='); + sb.append(((this.startDebuggingRequestArguments == null)?"":this.startDebuggingRequestArguments)); + sb.append(','); + sb.append("startDebuggingResponse"); + sb.append('='); + sb.append(((this.startDebuggingResponse == null)?"":this.startDebuggingResponse)); + sb.append(','); + sb.append("stepBackArguments"); + sb.append('='); + sb.append(((this.stepBackArguments == null)?"":this.stepBackArguments)); + sb.append(','); + sb.append("stepBackRequest"); + sb.append('='); + sb.append(((this.stepBackRequest == null)?"":this.stepBackRequest)); + sb.append(','); + sb.append("stepBackResponse"); + sb.append('='); + sb.append(((this.stepBackResponse == null)?"":this.stepBackResponse)); + sb.append(','); + sb.append("stepInArguments"); + sb.append('='); + sb.append(((this.stepInArguments == null)?"":this.stepInArguments)); + sb.append(','); + sb.append("stepInRequest"); + sb.append('='); + sb.append(((this.stepInRequest == null)?"":this.stepInRequest)); + sb.append(','); + sb.append("stepInResponse"); + sb.append('='); + sb.append(((this.stepInResponse == null)?"":this.stepInResponse)); + sb.append(','); + sb.append("stepInTarget"); + sb.append('='); + sb.append(((this.stepInTarget == null)?"":this.stepInTarget)); + sb.append(','); + sb.append("stepInTargetsArguments"); + sb.append('='); + sb.append(((this.stepInTargetsArguments == null)?"":this.stepInTargetsArguments)); + sb.append(','); + sb.append("stepInTargetsRequest"); + sb.append('='); + sb.append(((this.stepInTargetsRequest == null)?"":this.stepInTargetsRequest)); + sb.append(','); + sb.append("stepInTargetsResponse"); + sb.append('='); + sb.append(((this.stepInTargetsResponse == null)?"":this.stepInTargetsResponse)); + sb.append(','); + sb.append("stepOutArguments"); + sb.append('='); + sb.append(((this.stepOutArguments == null)?"":this.stepOutArguments)); + sb.append(','); + sb.append("stepOutRequest"); + sb.append('='); + sb.append(((this.stepOutRequest == null)?"":this.stepOutRequest)); + sb.append(','); + sb.append("stepOutResponse"); + sb.append('='); + sb.append(((this.stepOutResponse == null)?"":this.stepOutResponse)); + sb.append(','); + sb.append("steppingGranularity"); + sb.append('='); + sb.append(((this.steppingGranularity == null)?"":this.steppingGranularity)); + sb.append(','); + sb.append("stoppedEvent"); + sb.append('='); + sb.append(((this.stoppedEvent == null)?"":this.stoppedEvent)); + sb.append(','); + sb.append("terminateArguments"); + sb.append('='); + sb.append(((this.terminateArguments == null)?"":this.terminateArguments)); + sb.append(','); + sb.append("terminateRequest"); + sb.append('='); + sb.append(((this.terminateRequest == null)?"":this.terminateRequest)); + sb.append(','); + sb.append("terminateResponse"); + sb.append('='); + sb.append(((this.terminateResponse == null)?"":this.terminateResponse)); + sb.append(','); + sb.append("terminateThreadsArguments"); + sb.append('='); + sb.append(((this.terminateThreadsArguments == null)?"":this.terminateThreadsArguments)); + sb.append(','); + sb.append("terminateThreadsRequest"); + sb.append('='); + sb.append(((this.terminateThreadsRequest == null)?"":this.terminateThreadsRequest)); + sb.append(','); + sb.append("terminateThreadsResponse"); + sb.append('='); + sb.append(((this.terminateThreadsResponse == null)?"":this.terminateThreadsResponse)); + sb.append(','); + sb.append("terminatedEvent"); + sb.append('='); + sb.append(((this.terminatedEvent == null)?"":this.terminatedEvent)); + sb.append(','); + sb.append("thread"); + sb.append('='); + sb.append(((this.thread == null)?"":this.thread)); + sb.append(','); + sb.append("threadEvent"); + sb.append('='); + sb.append(((this.threadEvent == null)?"":this.threadEvent)); + sb.append(','); + sb.append("threadsRequest"); + sb.append('='); + sb.append(((this.threadsRequest == null)?"":this.threadsRequest)); + sb.append(','); + sb.append("threadsResponse"); + sb.append('='); + sb.append(((this.threadsResponse == null)?"":this.threadsResponse)); + sb.append(','); + sb.append("valueFormat"); + sb.append('='); + sb.append(((this.valueFormat == null)?"":this.valueFormat)); + sb.append(','); + sb.append("variable"); + sb.append('='); + sb.append(((this.variable == null)?"":this.variable)); + sb.append(','); + sb.append("variablePresentationHint"); + sb.append('='); + sb.append(((this.variablePresentationHint == null)?"":this.variablePresentationHint)); + sb.append(','); + sb.append("variablesArguments"); + sb.append('='); + sb.append(((this.variablesArguments == null)?"":this.variablesArguments)); + sb.append(','); + sb.append("variablesRequest"); + sb.append('='); + sb.append(((this.variablesRequest == null)?"":this.variablesRequest)); + sb.append(','); + sb.append("variablesResponse"); + sb.append('='); + sb.append(((this.variablesResponse == null)?"":this.variablesResponse)); + sb.append(','); + sb.append("writeMemoryArguments"); + sb.append('='); + sb.append(((this.writeMemoryArguments == null)?"":this.writeMemoryArguments)); + sb.append(','); + sb.append("writeMemoryRequest"); + sb.append('='); + sb.append(((this.writeMemoryRequest == null)?"":this.writeMemoryRequest)); + sb.append(','); + sb.append("writeMemoryResponse"); + sb.append('='); + sb.append(((this.writeMemoryResponse == null)?"":this.writeMemoryResponse)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.setFunctionBreakpointsResponse == null)? 0 :this.setFunctionBreakpointsResponse.hashCode())); + result = ((result* 31)+((this.breakpointLocation == null)? 0 :this.breakpointLocation.hashCode())); + result = ((result* 31)+((this.sourceRequest == null)? 0 :this.sourceRequest.hashCode())); + result = ((result* 31)+((this.writeMemoryArguments == null)? 0 :this.writeMemoryArguments.hashCode())); + result = ((result* 31)+((this.continueArguments == null)? 0 :this.continueArguments.hashCode())); + result = ((result* 31)+((this.processEvent == null)? 0 :this.processEvent.hashCode())); + result = ((result* 31)+((this.stepInTargetsArguments == null)? 0 :this.stepInTargetsArguments.hashCode())); + result = ((result* 31)+((this.terminateThreadsRequest == null)? 0 :this.terminateThreadsRequest.hashCode())); + result = ((result* 31)+((this.exceptionInfoResponse == null)? 0 :this.exceptionInfoResponse.hashCode())); + result = ((result* 31)+((this.progressEndEvent == null)? 0 :this.progressEndEvent.hashCode())); + result = ((result* 31)+((this.sourceResponse == null)? 0 :this.sourceResponse.hashCode())); + result = ((result* 31)+((this.setExceptionBreakpointsResponse == null)? 0 :this.setExceptionBreakpointsResponse.hashCode())); + result = ((result* 31)+((this.instructionBreakpoint == null)? 0 :this.instructionBreakpoint.hashCode())); + result = ((result* 31)+((this.restartArguments == null)? 0 :this.restartArguments.hashCode())); + result = ((result* 31)+((this.loadedSourcesArguments == null)? 0 :this.loadedSourcesArguments.hashCode())); + result = ((result* 31)+((this.loadedSourcesResponse == null)? 0 :this.loadedSourcesResponse.hashCode())); + result = ((result* 31)+((this.stepOutArguments == null)? 0 :this.stepOutArguments.hashCode())); + result = ((result* 31)+((this.launchRequestArguments == null)? 0 :this.launchRequestArguments.hashCode())); + result = ((result* 31)+((this.stepInArguments == null)? 0 :this.stepInArguments.hashCode())); + result = ((result* 31)+((this.threadEvent == null)? 0 :this.threadEvent.hashCode())); + result = ((result* 31)+((this.readMemoryArguments == null)? 0 :this.readMemoryArguments.hashCode())); + result = ((result* 31)+((this.setInstructionBreakpointsRequest == null)? 0 :this.setInstructionBreakpointsRequest.hashCode())); + result = ((result* 31)+((this.disassembleArguments == null)? 0 :this.disassembleArguments.hashCode())); + result = ((result* 31)+((this.protocolMessage == null)? 0 :this.protocolMessage.hashCode())); + result = ((result* 31)+((this.setInstructionBreakpointsResponse == null)? 0 :this.setInstructionBreakpointsResponse.hashCode())); + result = ((result* 31)+((this.exceptionInfoArguments == null)? 0 :this.exceptionInfoArguments.hashCode())); + result = ((result* 31)+((this.exceptionDetails == null)? 0 :this.exceptionDetails.hashCode())); + result = ((result* 31)+((this.module == null)? 0 :this.module.hashCode())); + result = ((result* 31)+((this.steppingGranularity == null)? 0 :this.steppingGranularity.hashCode())); + result = ((result* 31)+((this.gotoTarget == null)? 0 :this.gotoTarget.hashCode())); + result = ((result* 31)+((this.setVariableRequest == null)? 0 :this.setVariableRequest.hashCode())); + result = ((result* 31)+((this.setFunctionBreakpointsArguments == null)? 0 :this.setFunctionBreakpointsArguments.hashCode())); + result = ((result* 31)+((this.stackTraceArguments == null)? 0 :this.stackTraceArguments.hashCode())); + result = ((result* 31)+((this.gotoTargetsResponse == null)? 0 :this.gotoTargetsResponse.hashCode())); + result = ((result* 31)+((this.setExceptionBreakpointsArguments == null)? 0 :this.setExceptionBreakpointsArguments.hashCode())); + result = ((result* 31)+((this.reverseContinueArguments == null)? 0 :this.reverseContinueArguments.hashCode())); + result = ((result* 31)+((this.terminateArguments == null)? 0 :this.terminateArguments.hashCode())); + result = ((result* 31)+((this.configurationDoneRequest == null)? 0 :this.configurationDoneRequest.hashCode())); + result = ((result* 31)+((this.continueRequest == null)? 0 :this.continueRequest.hashCode())); + result = ((result* 31)+((this.sourceArguments == null)? 0 :this.sourceArguments.hashCode())); + result = ((result* 31)+((this.memoryEvent == null)? 0 :this.memoryEvent.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.exceptionFilterOptions == null)? 0 :this.exceptionFilterOptions.hashCode())); + result = ((result* 31)+((this.setExceptionBreakpointsRequest == null)? 0 :this.setExceptionBreakpointsRequest.hashCode())); + result = ((result* 31)+((this.restartRequest == null)? 0 :this.restartRequest.hashCode())); + result = ((result* 31)+((this.setVariableResponse == null)? 0 :this.setVariableResponse.hashCode())); + result = ((result* 31)+((this.cancelResponse == null)? 0 :this.cancelResponse.hashCode())); + result = ((result* 31)+((this.setBreakpointsRequest == null)? 0 :this.setBreakpointsRequest.hashCode())); + result = ((result* 31)+((this.stepInTargetsRequest == null)? 0 :this.stepInTargetsRequest.hashCode())); + result = ((result* 31)+((this.dataBreakpointInfoRequest == null)? 0 :this.dataBreakpointInfoRequest.hashCode())); + result = ((result* 31)+((this.scopesArguments == null)? 0 :this.scopesArguments.hashCode())); + result = ((result* 31)+((this.readMemoryRequest == null)? 0 :this.readMemoryRequest.hashCode())); + result = ((result* 31)+((this.breakpointLocationsResponse == null)? 0 :this.breakpointLocationsResponse.hashCode())); + result = ((result* 31)+((this.restartFrameArguments == null)? 0 :this.restartFrameArguments.hashCode())); + result = ((result* 31)+((this.breakpointLocationsArguments == null)? 0 :this.breakpointLocationsArguments.hashCode())); + result = ((result* 31)+((this.evaluateResponse == null)? 0 :this.evaluateResponse.hashCode())); + result = ((result* 31)+((this.runInTerminalRequest == null)? 0 :this.runInTerminalRequest.hashCode())); + result = ((result* 31)+((this.reverseContinueRequest == null)? 0 :this.reverseContinueRequest.hashCode())); + result = ((result* 31)+((this.restartFrameResponse == null)? 0 :this.restartFrameResponse.hashCode())); + result = ((result* 31)+((this.invalidatedEvent == null)? 0 :this.invalidatedEvent.hashCode())); + result = ((result* 31)+((this.breakpointEvent == null)? 0 :this.breakpointEvent.hashCode())); + result = ((result* 31)+((this.loadedSourceEvent == null)? 0 :this.loadedSourceEvent.hashCode())); + result = ((result* 31)+((this.runInTerminalResponse == null)? 0 :this.runInTerminalResponse.hashCode())); + result = ((result* 31)+((this.readMemoryResponse == null)? 0 :this.readMemoryResponse.hashCode())); + result = ((result* 31)+((this.startDebuggingResponse == null)? 0 :this.startDebuggingResponse.hashCode())); + result = ((result* 31)+((this.modulesResponse == null)? 0 :this.modulesResponse.hashCode())); + result = ((result* 31)+((this.dataBreakpointAccessType == null)? 0 :this.dataBreakpointAccessType.hashCode())); + result = ((result* 31)+((this.disassembleResponse == null)? 0 :this.disassembleResponse.hashCode())); + result = ((result* 31)+((this.exceptionPathSegment == null)? 0 :this.exceptionPathSegment.hashCode())); + result = ((result* 31)+((this.completionsArguments == null)? 0 :this.completionsArguments.hashCode())); + result = ((result* 31)+((this.completionItem == null)? 0 :this.completionItem.hashCode())); + result = ((result* 31)+((this.event == null)? 0 :this.event.hashCode())); + result = ((result* 31)+((this.stepBackRequest == null)? 0 :this.stepBackRequest.hashCode())); + result = ((result* 31)+((this.evaluateArguments == null)? 0 :this.evaluateArguments.hashCode())); + result = ((result* 31)+((this.stepInTarget == null)? 0 :this.stepInTarget.hashCode())); + result = ((result* 31)+((this.dataBreakpointInfoArguments == null)? 0 :this.dataBreakpointInfoArguments.hashCode())); + result = ((result* 31)+((this.nextArguments == null)? 0 :this.nextArguments.hashCode())); + result = ((result* 31)+((this.progressUpdateEvent == null)? 0 :this.progressUpdateEvent.hashCode())); + result = ((result* 31)+((this.setDataBreakpointsArguments == null)? 0 :this.setDataBreakpointsArguments.hashCode())); + result = ((result* 31)+((this.exitedEvent == null)? 0 :this.exitedEvent.hashCode())); + result = ((result* 31)+((this.terminateRequest == null)? 0 :this.terminateRequest.hashCode())); + result = ((result* 31)+((this.launchResponse == null)? 0 :this.launchResponse.hashCode())); + result = ((result* 31)+((this.gotoArguments == null)? 0 :this.gotoArguments.hashCode())); + result = ((result* 31)+((this.setDataBreakpointsResponse == null)? 0 :this.setDataBreakpointsResponse.hashCode())); + result = ((result* 31)+((this.valueFormat == null)? 0 :this.valueFormat.hashCode())); + result = ((result* 31)+((this.runInTerminalRequestArguments == null)? 0 :this.runInTerminalRequestArguments.hashCode())); + result = ((result* 31)+((this.variablePresentationHint == null)? 0 :this.variablePresentationHint.hashCode())); + result = ((result* 31)+((this.breakpoint == null)? 0 :this.breakpoint.hashCode())); + result = ((result* 31)+((this.variablesResponse == null)? 0 :this.variablesResponse.hashCode())); + result = ((result* 31)+((this.stepOutResponse == null)? 0 :this.stepOutResponse.hashCode())); + result = ((result* 31)+((this.continueResponse == null)? 0 :this.continueResponse.hashCode())); + result = ((result* 31)+((this.writeMemoryResponse == null)? 0 :this.writeMemoryResponse.hashCode())); + result = ((result* 31)+((this.setBreakpointsResponse == null)? 0 :this.setBreakpointsResponse.hashCode())); + result = ((result* 31)+((this.outputEvent == null)? 0 :this.outputEvent.hashCode())); + result = ((result* 31)+((this.columnDescriptor == null)? 0 :this.columnDescriptor.hashCode())); + result = ((result* 31)+((this.scopesRequest == null)? 0 :this.scopesRequest.hashCode())); + result = ((result* 31)+((this.attachRequestArguments == null)? 0 :this.attachRequestArguments.hashCode())); + result = ((result* 31)+((this.stepInResponse == null)? 0 :this.stepInResponse.hashCode())); + result = ((result* 31)+((this.setInstructionBreakpointsArguments == null)? 0 :this.setInstructionBreakpointsArguments.hashCode())); + result = ((result* 31)+((this.launchRequest == null)? 0 :this.launchRequest.hashCode())); + result = ((result* 31)+((this.variablesRequest == null)? 0 :this.variablesRequest.hashCode())); + result = ((result* 31)+((this.modulesArguments == null)? 0 :this.modulesArguments.hashCode())); + result = ((result* 31)+((this.startDebuggingRequest == null)? 0 :this.startDebuggingRequest.hashCode())); + result = ((result* 31)+((this.continuedEvent == null)? 0 :this.continuedEvent.hashCode())); + result = ((result* 31)+((this.exceptionInfoRequest == null)? 0 :this.exceptionInfoRequest.hashCode())); + result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); + result = ((result* 31)+((this.terminatedEvent == null)? 0 :this.terminatedEvent.hashCode())); + result = ((result* 31)+((this.stackFrameFormat == null)? 0 :this.stackFrameFormat.hashCode())); + result = ((result* 31)+((this.exceptionBreakpointsFilter == null)? 0 :this.exceptionBreakpointsFilter.hashCode())); + result = ((result* 31)+((this.capabilitiesEvent == null)? 0 :this.capabilitiesEvent.hashCode())); + result = ((result* 31)+((this.disassembledInstruction == null)? 0 :this.disassembledInstruction.hashCode())); + result = ((result* 31)+((this.threadsResponse == null)? 0 :this.threadsResponse.hashCode())); + result = ((result* 31)+((this.variablesArguments == null)? 0 :this.variablesArguments.hashCode())); + result = ((result* 31)+((this.setBreakpointsArguments == null)? 0 :this.setBreakpointsArguments.hashCode())); + result = ((result* 31)+((this.cancelRequest == null)? 0 :this.cancelRequest.hashCode())); + result = ((result* 31)+((this.stepBackArguments == null)? 0 :this.stepBackArguments.hashCode())); + result = ((result* 31)+((this.attachRequest == null)? 0 :this.attachRequest.hashCode())); + result = ((result* 31)+((this.terminateThreadsArguments == null)? 0 :this.terminateThreadsArguments.hashCode())); + result = ((result* 31)+((this.gotoRequest == null)? 0 :this.gotoRequest.hashCode())); + result = ((result* 31)+((this.initializeRequest == null)? 0 :this.initializeRequest.hashCode())); + result = ((result* 31)+((this.startDebuggingRequestArguments == null)? 0 :this.startDebuggingRequestArguments.hashCode())); + result = ((result* 31)+((this.functionBreakpoint == null)? 0 :this.functionBreakpoint.hashCode())); + result = ((result* 31)+((this.scopesResponse == null)? 0 :this.scopesResponse.hashCode())); + result = ((result* 31)+((this.evaluateRequest == null)? 0 :this.evaluateRequest.hashCode())); + result = ((result* 31)+((this.disassembleRequest == null)? 0 :this.disassembleRequest.hashCode())); + result = ((result* 31)+((this.pauseArguments == null)? 0 :this.pauseArguments.hashCode())); + result = ((result* 31)+((this.pauseRequest == null)? 0 :this.pauseRequest.hashCode())); + result = ((result* 31)+((this.setFunctionBreakpointsRequest == null)? 0 :this.setFunctionBreakpointsRequest.hashCode())); + result = ((result* 31)+((this.dataBreakpointInfoResponse == null)? 0 :this.dataBreakpointInfoResponse.hashCode())); + result = ((result* 31)+((this.gotoTargetsRequest == null)? 0 :this.gotoTargetsRequest.hashCode())); + result = ((result* 31)+((this.setVariableArguments == null)? 0 :this.setVariableArguments.hashCode())); + result = ((result* 31)+((this.disconnectRequest == null)? 0 :this.disconnectRequest.hashCode())); + result = ((result* 31)+((this.stepInRequest == null)? 0 :this.stepInRequest.hashCode())); + result = ((result* 31)+((this.exceptionBreakMode == null)? 0 :this.exceptionBreakMode.hashCode())); + result = ((result* 31)+((this.request == null)? 0 :this.request.hashCode())); + result = ((result* 31)+((this.loadedSourcesRequest == null)? 0 :this.loadedSourcesRequest.hashCode())); + result = ((result* 31)+((this.cancelArguments == null)? 0 :this.cancelArguments.hashCode())); + result = ((result* 31)+((this.configurationDoneArguments == null)? 0 :this.configurationDoneArguments.hashCode())); + result = ((result* 31)+((this.nextResponse == null)? 0 :this.nextResponse.hashCode())); + result = ((result* 31)+((this.stackFrame == null)? 0 :this.stackFrame.hashCode())); + result = ((result* 31)+((this.restartFrameRequest == null)? 0 :this.restartFrameRequest.hashCode())); + result = ((result* 31)+((this.setExpressionArguments == null)? 0 :this.setExpressionArguments.hashCode())); + result = ((result* 31)+((this.exceptionOptions == null)? 0 :this.exceptionOptions.hashCode())); + result = ((result* 31)+((this.completionsRequest == null)? 0 :this.completionsRequest.hashCode())); + result = ((result* 31)+((this.sourceBreakpoint == null)? 0 :this.sourceBreakpoint.hashCode())); + result = ((result* 31)+((this.moduleEvent == null)? 0 :this.moduleEvent.hashCode())); + result = ((result* 31)+((this.reverseContinueResponse == null)? 0 :this.reverseContinueResponse.hashCode())); + result = ((result* 31)+((this.setExpressionRequest == null)? 0 :this.setExpressionRequest.hashCode())); + result = ((result* 31)+((this.scope == null)? 0 :this.scope.hashCode())); + result = ((result* 31)+((this.checksum == null)? 0 :this.checksum.hashCode())); + result = ((result* 31)+((this.invalidatedAreas == null)? 0 :this.invalidatedAreas.hashCode())); + result = ((result* 31)+((this.breakpointLocationsRequest == null)? 0 :this.breakpointLocationsRequest.hashCode())); + result = ((result* 31)+((this.modulesRequest == null)? 0 :this.modulesRequest.hashCode())); + result = ((result* 31)+((this.disconnectArguments == null)? 0 :this.disconnectArguments.hashCode())); + result = ((result* 31)+((this.pauseResponse == null)? 0 :this.pauseResponse.hashCode())); + result = ((result* 31)+((this.capabilities == null)? 0 :this.capabilities.hashCode())); + result = ((result* 31)+((this.gotoResponse == null)? 0 :this.gotoResponse.hashCode())); + result = ((result* 31)+((this.dataBreakpoint == null)? 0 :this.dataBreakpoint.hashCode())); + result = ((result* 31)+((this.completionsResponse == null)? 0 :this.completionsResponse.hashCode())); + result = ((result* 31)+((this.stepOutRequest == null)? 0 :this.stepOutRequest.hashCode())); + result = ((result* 31)+((this.threadsRequest == null)? 0 :this.threadsRequest.hashCode())); + result = ((result* 31)+((this.checksumAlgorithm == null)? 0 :this.checksumAlgorithm.hashCode())); + result = ((result* 31)+((this.setDataBreakpointsRequest == null)? 0 :this.setDataBreakpointsRequest.hashCode())); + result = ((result* 31)+((this.thread == null)? 0 :this.thread.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + result = ((result* 31)+((this.stackTraceRequest == null)? 0 :this.stackTraceRequest.hashCode())); + result = ((result* 31)+((this.terminateThreadsResponse == null)? 0 :this.terminateThreadsResponse.hashCode())); + result = ((result* 31)+((this.completionItemType == null)? 0 :this.completionItemType.hashCode())); + result = ((result* 31)+((this.errorResponse == null)? 0 :this.errorResponse.hashCode())); + result = ((result* 31)+((this.restartResponse == null)? 0 :this.restartResponse.hashCode())); + result = ((result* 31)+((this.initializeResponse == null)? 0 :this.initializeResponse.hashCode())); + result = ((result* 31)+((this.attachResponse == null)? 0 :this.attachResponse.hashCode())); + result = ((result* 31)+((this.stepInTargetsResponse == null)? 0 :this.stepInTargetsResponse.hashCode())); + result = ((result* 31)+((this.stackTraceResponse == null)? 0 :this.stackTraceResponse.hashCode())); + result = ((result* 31)+((this.writeMemoryRequest == null)? 0 :this.writeMemoryRequest.hashCode())); + result = ((result* 31)+((this.stoppedEvent == null)? 0 :this.stoppedEvent.hashCode())); + result = ((result* 31)+((this.response == null)? 0 :this.response.hashCode())); + result = ((result* 31)+((this.disconnectResponse == null)? 0 :this.disconnectResponse.hashCode())); + result = ((result* 31)+((this.initializedEvent == null)? 0 :this.initializedEvent.hashCode())); + result = ((result* 31)+((this.progressStartEvent == null)? 0 :this.progressStartEvent.hashCode())); + result = ((result* 31)+((this.variable == null)? 0 :this.variable.hashCode())); + result = ((result* 31)+((this.gotoTargetsArguments == null)? 0 :this.gotoTargetsArguments.hashCode())); + result = ((result* 31)+((this.stepBackResponse == null)? 0 :this.stepBackResponse.hashCode())); + result = ((result* 31)+((this.initializeRequestArguments == null)? 0 :this.initializeRequestArguments.hashCode())); + result = ((result* 31)+((this.configurationDoneResponse == null)? 0 :this.configurationDoneResponse.hashCode())); + result = ((result* 31)+((this.nextRequest == null)? 0 :this.nextRequest.hashCode())); + result = ((result* 31)+((this.terminateResponse == null)? 0 :this.terminateResponse.hashCode())); + result = ((result* 31)+((this.setExpressionResponse == null)? 0 :this.setExpressionResponse.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DebugProtocol) == false) { + return false; + } + DebugProtocol rhs = ((DebugProtocol) other); + return (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((this.setFunctionBreakpointsResponse == rhs.setFunctionBreakpointsResponse)||((this.setFunctionBreakpointsResponse!= null)&&this.setFunctionBreakpointsResponse.equals(rhs.setFunctionBreakpointsResponse)))&&((this.breakpointLocation == rhs.breakpointLocation)||((this.breakpointLocation!= null)&&this.breakpointLocation.equals(rhs.breakpointLocation))))&&((this.sourceRequest == rhs.sourceRequest)||((this.sourceRequest!= null)&&this.sourceRequest.equals(rhs.sourceRequest))))&&((this.writeMemoryArguments == rhs.writeMemoryArguments)||((this.writeMemoryArguments!= null)&&this.writeMemoryArguments.equals(rhs.writeMemoryArguments))))&&((this.continueArguments == rhs.continueArguments)||((this.continueArguments!= null)&&this.continueArguments.equals(rhs.continueArguments))))&&((this.processEvent == rhs.processEvent)||((this.processEvent!= null)&&this.processEvent.equals(rhs.processEvent))))&&((this.stepInTargetsArguments == rhs.stepInTargetsArguments)||((this.stepInTargetsArguments!= null)&&this.stepInTargetsArguments.equals(rhs.stepInTargetsArguments))))&&((this.terminateThreadsRequest == rhs.terminateThreadsRequest)||((this.terminateThreadsRequest!= null)&&this.terminateThreadsRequest.equals(rhs.terminateThreadsRequest))))&&((this.exceptionInfoResponse == rhs.exceptionInfoResponse)||((this.exceptionInfoResponse!= null)&&this.exceptionInfoResponse.equals(rhs.exceptionInfoResponse))))&&((this.progressEndEvent == rhs.progressEndEvent)||((this.progressEndEvent!= null)&&this.progressEndEvent.equals(rhs.progressEndEvent))))&&((this.sourceResponse == rhs.sourceResponse)||((this.sourceResponse!= null)&&this.sourceResponse.equals(rhs.sourceResponse))))&&((this.setExceptionBreakpointsResponse == rhs.setExceptionBreakpointsResponse)||((this.setExceptionBreakpointsResponse!= null)&&this.setExceptionBreakpointsResponse.equals(rhs.setExceptionBreakpointsResponse))))&&((this.instructionBreakpoint == rhs.instructionBreakpoint)||((this.instructionBreakpoint!= null)&&this.instructionBreakpoint.equals(rhs.instructionBreakpoint))))&&((this.restartArguments == rhs.restartArguments)||((this.restartArguments!= null)&&this.restartArguments.equals(rhs.restartArguments))))&&((this.loadedSourcesArguments == rhs.loadedSourcesArguments)||((this.loadedSourcesArguments!= null)&&this.loadedSourcesArguments.equals(rhs.loadedSourcesArguments))))&&((this.loadedSourcesResponse == rhs.loadedSourcesResponse)||((this.loadedSourcesResponse!= null)&&this.loadedSourcesResponse.equals(rhs.loadedSourcesResponse))))&&((this.stepOutArguments == rhs.stepOutArguments)||((this.stepOutArguments!= null)&&this.stepOutArguments.equals(rhs.stepOutArguments))))&&((this.launchRequestArguments == rhs.launchRequestArguments)||((this.launchRequestArguments!= null)&&this.launchRequestArguments.equals(rhs.launchRequestArguments))))&&((this.stepInArguments == rhs.stepInArguments)||((this.stepInArguments!= null)&&this.stepInArguments.equals(rhs.stepInArguments))))&&((this.threadEvent == rhs.threadEvent)||((this.threadEvent!= null)&&this.threadEvent.equals(rhs.threadEvent))))&&((this.readMemoryArguments == rhs.readMemoryArguments)||((this.readMemoryArguments!= null)&&this.readMemoryArguments.equals(rhs.readMemoryArguments))))&&((this.setInstructionBreakpointsRequest == rhs.setInstructionBreakpointsRequest)||((this.setInstructionBreakpointsRequest!= null)&&this.setInstructionBreakpointsRequest.equals(rhs.setInstructionBreakpointsRequest))))&&((this.disassembleArguments == rhs.disassembleArguments)||((this.disassembleArguments!= null)&&this.disassembleArguments.equals(rhs.disassembleArguments))))&&((this.protocolMessage == rhs.protocolMessage)||((this.protocolMessage!= null)&&this.protocolMessage.equals(rhs.protocolMessage))))&&((this.setInstructionBreakpointsResponse == rhs.setInstructionBreakpointsResponse)||((this.setInstructionBreakpointsResponse!= null)&&this.setInstructionBreakpointsResponse.equals(rhs.setInstructionBreakpointsResponse))))&&((this.exceptionInfoArguments == rhs.exceptionInfoArguments)||((this.exceptionInfoArguments!= null)&&this.exceptionInfoArguments.equals(rhs.exceptionInfoArguments))))&&((this.exceptionDetails == rhs.exceptionDetails)||((this.exceptionDetails!= null)&&this.exceptionDetails.equals(rhs.exceptionDetails))))&&((this.module == rhs.module)||((this.module!= null)&&this.module.equals(rhs.module))))&&((this.steppingGranularity == rhs.steppingGranularity)||((this.steppingGranularity!= null)&&this.steppingGranularity.equals(rhs.steppingGranularity))))&&((this.gotoTarget == rhs.gotoTarget)||((this.gotoTarget!= null)&&this.gotoTarget.equals(rhs.gotoTarget))))&&((this.setVariableRequest == rhs.setVariableRequest)||((this.setVariableRequest!= null)&&this.setVariableRequest.equals(rhs.setVariableRequest))))&&((this.setFunctionBreakpointsArguments == rhs.setFunctionBreakpointsArguments)||((this.setFunctionBreakpointsArguments!= null)&&this.setFunctionBreakpointsArguments.equals(rhs.setFunctionBreakpointsArguments))))&&((this.stackTraceArguments == rhs.stackTraceArguments)||((this.stackTraceArguments!= null)&&this.stackTraceArguments.equals(rhs.stackTraceArguments))))&&((this.gotoTargetsResponse == rhs.gotoTargetsResponse)||((this.gotoTargetsResponse!= null)&&this.gotoTargetsResponse.equals(rhs.gotoTargetsResponse))))&&((this.setExceptionBreakpointsArguments == rhs.setExceptionBreakpointsArguments)||((this.setExceptionBreakpointsArguments!= null)&&this.setExceptionBreakpointsArguments.equals(rhs.setExceptionBreakpointsArguments))))&&((this.reverseContinueArguments == rhs.reverseContinueArguments)||((this.reverseContinueArguments!= null)&&this.reverseContinueArguments.equals(rhs.reverseContinueArguments))))&&((this.terminateArguments == rhs.terminateArguments)||((this.terminateArguments!= null)&&this.terminateArguments.equals(rhs.terminateArguments))))&&((this.configurationDoneRequest == rhs.configurationDoneRequest)||((this.configurationDoneRequest!= null)&&this.configurationDoneRequest.equals(rhs.configurationDoneRequest))))&&((this.continueRequest == rhs.continueRequest)||((this.continueRequest!= null)&&this.continueRequest.equals(rhs.continueRequest))))&&((this.sourceArguments == rhs.sourceArguments)||((this.sourceArguments!= null)&&this.sourceArguments.equals(rhs.sourceArguments))))&&((this.memoryEvent == rhs.memoryEvent)||((this.memoryEvent!= null)&&this.memoryEvent.equals(rhs.memoryEvent))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.exceptionFilterOptions == rhs.exceptionFilterOptions)||((this.exceptionFilterOptions!= null)&&this.exceptionFilterOptions.equals(rhs.exceptionFilterOptions))))&&((this.setExceptionBreakpointsRequest == rhs.setExceptionBreakpointsRequest)||((this.setExceptionBreakpointsRequest!= null)&&this.setExceptionBreakpointsRequest.equals(rhs.setExceptionBreakpointsRequest))))&&((this.restartRequest == rhs.restartRequest)||((this.restartRequest!= null)&&this.restartRequest.equals(rhs.restartRequest))))&&((this.setVariableResponse == rhs.setVariableResponse)||((this.setVariableResponse!= null)&&this.setVariableResponse.equals(rhs.setVariableResponse))))&&((this.cancelResponse == rhs.cancelResponse)||((this.cancelResponse!= null)&&this.cancelResponse.equals(rhs.cancelResponse))))&&((this.setBreakpointsRequest == rhs.setBreakpointsRequest)||((this.setBreakpointsRequest!= null)&&this.setBreakpointsRequest.equals(rhs.setBreakpointsRequest))))&&((this.stepInTargetsRequest == rhs.stepInTargetsRequest)||((this.stepInTargetsRequest!= null)&&this.stepInTargetsRequest.equals(rhs.stepInTargetsRequest))))&&((this.dataBreakpointInfoRequest == rhs.dataBreakpointInfoRequest)||((this.dataBreakpointInfoRequest!= null)&&this.dataBreakpointInfoRequest.equals(rhs.dataBreakpointInfoRequest))))&&((this.scopesArguments == rhs.scopesArguments)||((this.scopesArguments!= null)&&this.scopesArguments.equals(rhs.scopesArguments))))&&((this.readMemoryRequest == rhs.readMemoryRequest)||((this.readMemoryRequest!= null)&&this.readMemoryRequest.equals(rhs.readMemoryRequest))))&&((this.breakpointLocationsResponse == rhs.breakpointLocationsResponse)||((this.breakpointLocationsResponse!= null)&&this.breakpointLocationsResponse.equals(rhs.breakpointLocationsResponse))))&&((this.restartFrameArguments == rhs.restartFrameArguments)||((this.restartFrameArguments!= null)&&this.restartFrameArguments.equals(rhs.restartFrameArguments))))&&((this.breakpointLocationsArguments == rhs.breakpointLocationsArguments)||((this.breakpointLocationsArguments!= null)&&this.breakpointLocationsArguments.equals(rhs.breakpointLocationsArguments))))&&((this.evaluateResponse == rhs.evaluateResponse)||((this.evaluateResponse!= null)&&this.evaluateResponse.equals(rhs.evaluateResponse))))&&((this.runInTerminalRequest == rhs.runInTerminalRequest)||((this.runInTerminalRequest!= null)&&this.runInTerminalRequest.equals(rhs.runInTerminalRequest))))&&((this.reverseContinueRequest == rhs.reverseContinueRequest)||((this.reverseContinueRequest!= null)&&this.reverseContinueRequest.equals(rhs.reverseContinueRequest))))&&((this.restartFrameResponse == rhs.restartFrameResponse)||((this.restartFrameResponse!= null)&&this.restartFrameResponse.equals(rhs.restartFrameResponse))))&&((this.invalidatedEvent == rhs.invalidatedEvent)||((this.invalidatedEvent!= null)&&this.invalidatedEvent.equals(rhs.invalidatedEvent))))&&((this.breakpointEvent == rhs.breakpointEvent)||((this.breakpointEvent!= null)&&this.breakpointEvent.equals(rhs.breakpointEvent))))&&((this.loadedSourceEvent == rhs.loadedSourceEvent)||((this.loadedSourceEvent!= null)&&this.loadedSourceEvent.equals(rhs.loadedSourceEvent))))&&((this.runInTerminalResponse == rhs.runInTerminalResponse)||((this.runInTerminalResponse!= null)&&this.runInTerminalResponse.equals(rhs.runInTerminalResponse))))&&((this.readMemoryResponse == rhs.readMemoryResponse)||((this.readMemoryResponse!= null)&&this.readMemoryResponse.equals(rhs.readMemoryResponse))))&&((this.startDebuggingResponse == rhs.startDebuggingResponse)||((this.startDebuggingResponse!= null)&&this.startDebuggingResponse.equals(rhs.startDebuggingResponse))))&&((this.modulesResponse == rhs.modulesResponse)||((this.modulesResponse!= null)&&this.modulesResponse.equals(rhs.modulesResponse))))&&((this.dataBreakpointAccessType == rhs.dataBreakpointAccessType)||((this.dataBreakpointAccessType!= null)&&this.dataBreakpointAccessType.equals(rhs.dataBreakpointAccessType))))&&((this.disassembleResponse == rhs.disassembleResponse)||((this.disassembleResponse!= null)&&this.disassembleResponse.equals(rhs.disassembleResponse))))&&((this.exceptionPathSegment == rhs.exceptionPathSegment)||((this.exceptionPathSegment!= null)&&this.exceptionPathSegment.equals(rhs.exceptionPathSegment))))&&((this.completionsArguments == rhs.completionsArguments)||((this.completionsArguments!= null)&&this.completionsArguments.equals(rhs.completionsArguments))))&&((this.completionItem == rhs.completionItem)||((this.completionItem!= null)&&this.completionItem.equals(rhs.completionItem))))&&((this.event == rhs.event)||((this.event!= null)&&this.event.equals(rhs.event))))&&((this.stepBackRequest == rhs.stepBackRequest)||((this.stepBackRequest!= null)&&this.stepBackRequest.equals(rhs.stepBackRequest))))&&((this.evaluateArguments == rhs.evaluateArguments)||((this.evaluateArguments!= null)&&this.evaluateArguments.equals(rhs.evaluateArguments))))&&((this.stepInTarget == rhs.stepInTarget)||((this.stepInTarget!= null)&&this.stepInTarget.equals(rhs.stepInTarget))))&&((this.dataBreakpointInfoArguments == rhs.dataBreakpointInfoArguments)||((this.dataBreakpointInfoArguments!= null)&&this.dataBreakpointInfoArguments.equals(rhs.dataBreakpointInfoArguments))))&&((this.nextArguments == rhs.nextArguments)||((this.nextArguments!= null)&&this.nextArguments.equals(rhs.nextArguments))))&&((this.progressUpdateEvent == rhs.progressUpdateEvent)||((this.progressUpdateEvent!= null)&&this.progressUpdateEvent.equals(rhs.progressUpdateEvent))))&&((this.setDataBreakpointsArguments == rhs.setDataBreakpointsArguments)||((this.setDataBreakpointsArguments!= null)&&this.setDataBreakpointsArguments.equals(rhs.setDataBreakpointsArguments))))&&((this.exitedEvent == rhs.exitedEvent)||((this.exitedEvent!= null)&&this.exitedEvent.equals(rhs.exitedEvent))))&&((this.terminateRequest == rhs.terminateRequest)||((this.terminateRequest!= null)&&this.terminateRequest.equals(rhs.terminateRequest))))&&((this.launchResponse == rhs.launchResponse)||((this.launchResponse!= null)&&this.launchResponse.equals(rhs.launchResponse))))&&((this.gotoArguments == rhs.gotoArguments)||((this.gotoArguments!= null)&&this.gotoArguments.equals(rhs.gotoArguments))))&&((this.setDataBreakpointsResponse == rhs.setDataBreakpointsResponse)||((this.setDataBreakpointsResponse!= null)&&this.setDataBreakpointsResponse.equals(rhs.setDataBreakpointsResponse))))&&((this.valueFormat == rhs.valueFormat)||((this.valueFormat!= null)&&this.valueFormat.equals(rhs.valueFormat))))&&((this.runInTerminalRequestArguments == rhs.runInTerminalRequestArguments)||((this.runInTerminalRequestArguments!= null)&&this.runInTerminalRequestArguments.equals(rhs.runInTerminalRequestArguments))))&&((this.variablePresentationHint == rhs.variablePresentationHint)||((this.variablePresentationHint!= null)&&this.variablePresentationHint.equals(rhs.variablePresentationHint))))&&((this.breakpoint == rhs.breakpoint)||((this.breakpoint!= null)&&this.breakpoint.equals(rhs.breakpoint))))&&((this.variablesResponse == rhs.variablesResponse)||((this.variablesResponse!= null)&&this.variablesResponse.equals(rhs.variablesResponse))))&&((this.stepOutResponse == rhs.stepOutResponse)||((this.stepOutResponse!= null)&&this.stepOutResponse.equals(rhs.stepOutResponse))))&&((this.continueResponse == rhs.continueResponse)||((this.continueResponse!= null)&&this.continueResponse.equals(rhs.continueResponse))))&&((this.writeMemoryResponse == rhs.writeMemoryResponse)||((this.writeMemoryResponse!= null)&&this.writeMemoryResponse.equals(rhs.writeMemoryResponse))))&&((this.setBreakpointsResponse == rhs.setBreakpointsResponse)||((this.setBreakpointsResponse!= null)&&this.setBreakpointsResponse.equals(rhs.setBreakpointsResponse))))&&((this.outputEvent == rhs.outputEvent)||((this.outputEvent!= null)&&this.outputEvent.equals(rhs.outputEvent))))&&((this.columnDescriptor == rhs.columnDescriptor)||((this.columnDescriptor!= null)&&this.columnDescriptor.equals(rhs.columnDescriptor))))&&((this.scopesRequest == rhs.scopesRequest)||((this.scopesRequest!= null)&&this.scopesRequest.equals(rhs.scopesRequest))))&&((this.attachRequestArguments == rhs.attachRequestArguments)||((this.attachRequestArguments!= null)&&this.attachRequestArguments.equals(rhs.attachRequestArguments))))&&((this.stepInResponse == rhs.stepInResponse)||((this.stepInResponse!= null)&&this.stepInResponse.equals(rhs.stepInResponse))))&&((this.setInstructionBreakpointsArguments == rhs.setInstructionBreakpointsArguments)||((this.setInstructionBreakpointsArguments!= null)&&this.setInstructionBreakpointsArguments.equals(rhs.setInstructionBreakpointsArguments))))&&((this.launchRequest == rhs.launchRequest)||((this.launchRequest!= null)&&this.launchRequest.equals(rhs.launchRequest))))&&((this.variablesRequest == rhs.variablesRequest)||((this.variablesRequest!= null)&&this.variablesRequest.equals(rhs.variablesRequest))))&&((this.modulesArguments == rhs.modulesArguments)||((this.modulesArguments!= null)&&this.modulesArguments.equals(rhs.modulesArguments))))&&((this.startDebuggingRequest == rhs.startDebuggingRequest)||((this.startDebuggingRequest!= null)&&this.startDebuggingRequest.equals(rhs.startDebuggingRequest))))&&((this.continuedEvent == rhs.continuedEvent)||((this.continuedEvent!= null)&&this.continuedEvent.equals(rhs.continuedEvent))))&&((this.exceptionInfoRequest == rhs.exceptionInfoRequest)||((this.exceptionInfoRequest!= null)&&this.exceptionInfoRequest.equals(rhs.exceptionInfoRequest))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.terminatedEvent == rhs.terminatedEvent)||((this.terminatedEvent!= null)&&this.terminatedEvent.equals(rhs.terminatedEvent))))&&((this.stackFrameFormat == rhs.stackFrameFormat)||((this.stackFrameFormat!= null)&&this.stackFrameFormat.equals(rhs.stackFrameFormat))))&&((this.exceptionBreakpointsFilter == rhs.exceptionBreakpointsFilter)||((this.exceptionBreakpointsFilter!= null)&&this.exceptionBreakpointsFilter.equals(rhs.exceptionBreakpointsFilter))))&&((this.capabilitiesEvent == rhs.capabilitiesEvent)||((this.capabilitiesEvent!= null)&&this.capabilitiesEvent.equals(rhs.capabilitiesEvent))))&&((this.disassembledInstruction == rhs.disassembledInstruction)||((this.disassembledInstruction!= null)&&this.disassembledInstruction.equals(rhs.disassembledInstruction))))&&((this.threadsResponse == rhs.threadsResponse)||((this.threadsResponse!= null)&&this.threadsResponse.equals(rhs.threadsResponse))))&&((this.variablesArguments == rhs.variablesArguments)||((this.variablesArguments!= null)&&this.variablesArguments.equals(rhs.variablesArguments))))&&((this.setBreakpointsArguments == rhs.setBreakpointsArguments)||((this.setBreakpointsArguments!= null)&&this.setBreakpointsArguments.equals(rhs.setBreakpointsArguments))))&&((this.cancelRequest == rhs.cancelRequest)||((this.cancelRequest!= null)&&this.cancelRequest.equals(rhs.cancelRequest))))&&((this.stepBackArguments == rhs.stepBackArguments)||((this.stepBackArguments!= null)&&this.stepBackArguments.equals(rhs.stepBackArguments))))&&((this.attachRequest == rhs.attachRequest)||((this.attachRequest!= null)&&this.attachRequest.equals(rhs.attachRequest))))&&((this.terminateThreadsArguments == rhs.terminateThreadsArguments)||((this.terminateThreadsArguments!= null)&&this.terminateThreadsArguments.equals(rhs.terminateThreadsArguments))))&&((this.gotoRequest == rhs.gotoRequest)||((this.gotoRequest!= null)&&this.gotoRequest.equals(rhs.gotoRequest))))&&((this.initializeRequest == rhs.initializeRequest)||((this.initializeRequest!= null)&&this.initializeRequest.equals(rhs.initializeRequest))))&&((this.startDebuggingRequestArguments == rhs.startDebuggingRequestArguments)||((this.startDebuggingRequestArguments!= null)&&this.startDebuggingRequestArguments.equals(rhs.startDebuggingRequestArguments))))&&((this.functionBreakpoint == rhs.functionBreakpoint)||((this.functionBreakpoint!= null)&&this.functionBreakpoint.equals(rhs.functionBreakpoint))))&&((this.scopesResponse == rhs.scopesResponse)||((this.scopesResponse!= null)&&this.scopesResponse.equals(rhs.scopesResponse))))&&((this.evaluateRequest == rhs.evaluateRequest)||((this.evaluateRequest!= null)&&this.evaluateRequest.equals(rhs.evaluateRequest))))&&((this.disassembleRequest == rhs.disassembleRequest)||((this.disassembleRequest!= null)&&this.disassembleRequest.equals(rhs.disassembleRequest))))&&((this.pauseArguments == rhs.pauseArguments)||((this.pauseArguments!= null)&&this.pauseArguments.equals(rhs.pauseArguments))))&&((this.pauseRequest == rhs.pauseRequest)||((this.pauseRequest!= null)&&this.pauseRequest.equals(rhs.pauseRequest))))&&((this.setFunctionBreakpointsRequest == rhs.setFunctionBreakpointsRequest)||((this.setFunctionBreakpointsRequest!= null)&&this.setFunctionBreakpointsRequest.equals(rhs.setFunctionBreakpointsRequest))))&&((this.dataBreakpointInfoResponse == rhs.dataBreakpointInfoResponse)||((this.dataBreakpointInfoResponse!= null)&&this.dataBreakpointInfoResponse.equals(rhs.dataBreakpointInfoResponse))))&&((this.gotoTargetsRequest == rhs.gotoTargetsRequest)||((this.gotoTargetsRequest!= null)&&this.gotoTargetsRequest.equals(rhs.gotoTargetsRequest))))&&((this.setVariableArguments == rhs.setVariableArguments)||((this.setVariableArguments!= null)&&this.setVariableArguments.equals(rhs.setVariableArguments))))&&((this.disconnectRequest == rhs.disconnectRequest)||((this.disconnectRequest!= null)&&this.disconnectRequest.equals(rhs.disconnectRequest))))&&((this.stepInRequest == rhs.stepInRequest)||((this.stepInRequest!= null)&&this.stepInRequest.equals(rhs.stepInRequest))))&&((this.exceptionBreakMode == rhs.exceptionBreakMode)||((this.exceptionBreakMode!= null)&&this.exceptionBreakMode.equals(rhs.exceptionBreakMode))))&&((this.request == rhs.request)||((this.request!= null)&&this.request.equals(rhs.request))))&&((this.loadedSourcesRequest == rhs.loadedSourcesRequest)||((this.loadedSourcesRequest!= null)&&this.loadedSourcesRequest.equals(rhs.loadedSourcesRequest))))&&((this.cancelArguments == rhs.cancelArguments)||((this.cancelArguments!= null)&&this.cancelArguments.equals(rhs.cancelArguments))))&&((this.configurationDoneArguments == rhs.configurationDoneArguments)||((this.configurationDoneArguments!= null)&&this.configurationDoneArguments.equals(rhs.configurationDoneArguments))))&&((this.nextResponse == rhs.nextResponse)||((this.nextResponse!= null)&&this.nextResponse.equals(rhs.nextResponse))))&&((this.stackFrame == rhs.stackFrame)||((this.stackFrame!= null)&&this.stackFrame.equals(rhs.stackFrame))))&&((this.restartFrameRequest == rhs.restartFrameRequest)||((this.restartFrameRequest!= null)&&this.restartFrameRequest.equals(rhs.restartFrameRequest))))&&((this.setExpressionArguments == rhs.setExpressionArguments)||((this.setExpressionArguments!= null)&&this.setExpressionArguments.equals(rhs.setExpressionArguments))))&&((this.exceptionOptions == rhs.exceptionOptions)||((this.exceptionOptions!= null)&&this.exceptionOptions.equals(rhs.exceptionOptions))))&&((this.completionsRequest == rhs.completionsRequest)||((this.completionsRequest!= null)&&this.completionsRequest.equals(rhs.completionsRequest))))&&((this.sourceBreakpoint == rhs.sourceBreakpoint)||((this.sourceBreakpoint!= null)&&this.sourceBreakpoint.equals(rhs.sourceBreakpoint))))&&((this.moduleEvent == rhs.moduleEvent)||((this.moduleEvent!= null)&&this.moduleEvent.equals(rhs.moduleEvent))))&&((this.reverseContinueResponse == rhs.reverseContinueResponse)||((this.reverseContinueResponse!= null)&&this.reverseContinueResponse.equals(rhs.reverseContinueResponse))))&&((this.setExpressionRequest == rhs.setExpressionRequest)||((this.setExpressionRequest!= null)&&this.setExpressionRequest.equals(rhs.setExpressionRequest))))&&((this.scope == rhs.scope)||((this.scope!= null)&&this.scope.equals(rhs.scope))))&&((this.checksum == rhs.checksum)||((this.checksum!= null)&&this.checksum.equals(rhs.checksum))))&&((this.invalidatedAreas == rhs.invalidatedAreas)||((this.invalidatedAreas!= null)&&this.invalidatedAreas.equals(rhs.invalidatedAreas))))&&((this.breakpointLocationsRequest == rhs.breakpointLocationsRequest)||((this.breakpointLocationsRequest!= null)&&this.breakpointLocationsRequest.equals(rhs.breakpointLocationsRequest))))&&((this.modulesRequest == rhs.modulesRequest)||((this.modulesRequest!= null)&&this.modulesRequest.equals(rhs.modulesRequest))))&&((this.disconnectArguments == rhs.disconnectArguments)||((this.disconnectArguments!= null)&&this.disconnectArguments.equals(rhs.disconnectArguments))))&&((this.pauseResponse == rhs.pauseResponse)||((this.pauseResponse!= null)&&this.pauseResponse.equals(rhs.pauseResponse))))&&((this.capabilities == rhs.capabilities)||((this.capabilities!= null)&&this.capabilities.equals(rhs.capabilities))))&&((this.gotoResponse == rhs.gotoResponse)||((this.gotoResponse!= null)&&this.gotoResponse.equals(rhs.gotoResponse))))&&((this.dataBreakpoint == rhs.dataBreakpoint)||((this.dataBreakpoint!= null)&&this.dataBreakpoint.equals(rhs.dataBreakpoint))))&&((this.completionsResponse == rhs.completionsResponse)||((this.completionsResponse!= null)&&this.completionsResponse.equals(rhs.completionsResponse))))&&((this.stepOutRequest == rhs.stepOutRequest)||((this.stepOutRequest!= null)&&this.stepOutRequest.equals(rhs.stepOutRequest))))&&((this.threadsRequest == rhs.threadsRequest)||((this.threadsRequest!= null)&&this.threadsRequest.equals(rhs.threadsRequest))))&&((this.checksumAlgorithm == rhs.checksumAlgorithm)||((this.checksumAlgorithm!= null)&&this.checksumAlgorithm.equals(rhs.checksumAlgorithm))))&&((this.setDataBreakpointsRequest == rhs.setDataBreakpointsRequest)||((this.setDataBreakpointsRequest!= null)&&this.setDataBreakpointsRequest.equals(rhs.setDataBreakpointsRequest))))&&((this.thread == rhs.thread)||((this.thread!= null)&&this.thread.equals(rhs.thread))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.stackTraceRequest == rhs.stackTraceRequest)||((this.stackTraceRequest!= null)&&this.stackTraceRequest.equals(rhs.stackTraceRequest))))&&((this.terminateThreadsResponse == rhs.terminateThreadsResponse)||((this.terminateThreadsResponse!= null)&&this.terminateThreadsResponse.equals(rhs.terminateThreadsResponse))))&&((this.completionItemType == rhs.completionItemType)||((this.completionItemType!= null)&&this.completionItemType.equals(rhs.completionItemType))))&&((this.errorResponse == rhs.errorResponse)||((this.errorResponse!= null)&&this.errorResponse.equals(rhs.errorResponse))))&&((this.restartResponse == rhs.restartResponse)||((this.restartResponse!= null)&&this.restartResponse.equals(rhs.restartResponse))))&&((this.initializeResponse == rhs.initializeResponse)||((this.initializeResponse!= null)&&this.initializeResponse.equals(rhs.initializeResponse))))&&((this.attachResponse == rhs.attachResponse)||((this.attachResponse!= null)&&this.attachResponse.equals(rhs.attachResponse))))&&((this.stepInTargetsResponse == rhs.stepInTargetsResponse)||((this.stepInTargetsResponse!= null)&&this.stepInTargetsResponse.equals(rhs.stepInTargetsResponse))))&&((this.stackTraceResponse == rhs.stackTraceResponse)||((this.stackTraceResponse!= null)&&this.stackTraceResponse.equals(rhs.stackTraceResponse))))&&((this.writeMemoryRequest == rhs.writeMemoryRequest)||((this.writeMemoryRequest!= null)&&this.writeMemoryRequest.equals(rhs.writeMemoryRequest))))&&((this.stoppedEvent == rhs.stoppedEvent)||((this.stoppedEvent!= null)&&this.stoppedEvent.equals(rhs.stoppedEvent))))&&((this.response == rhs.response)||((this.response!= null)&&this.response.equals(rhs.response))))&&((this.disconnectResponse == rhs.disconnectResponse)||((this.disconnectResponse!= null)&&this.disconnectResponse.equals(rhs.disconnectResponse))))&&((this.initializedEvent == rhs.initializedEvent)||((this.initializedEvent!= null)&&this.initializedEvent.equals(rhs.initializedEvent))))&&((this.progressStartEvent == rhs.progressStartEvent)||((this.progressStartEvent!= null)&&this.progressStartEvent.equals(rhs.progressStartEvent))))&&((this.variable == rhs.variable)||((this.variable!= null)&&this.variable.equals(rhs.variable))))&&((this.gotoTargetsArguments == rhs.gotoTargetsArguments)||((this.gotoTargetsArguments!= null)&&this.gotoTargetsArguments.equals(rhs.gotoTargetsArguments))))&&((this.stepBackResponse == rhs.stepBackResponse)||((this.stepBackResponse!= null)&&this.stepBackResponse.equals(rhs.stepBackResponse))))&&((this.initializeRequestArguments == rhs.initializeRequestArguments)||((this.initializeRequestArguments!= null)&&this.initializeRequestArguments.equals(rhs.initializeRequestArguments))))&&((this.configurationDoneResponse == rhs.configurationDoneResponse)||((this.configurationDoneResponse!= null)&&this.configurationDoneResponse.equals(rhs.configurationDoneResponse))))&&((this.nextRequest == rhs.nextRequest)||((this.nextRequest!= null)&&this.nextRequest.equals(rhs.nextRequest))))&&((this.terminateResponse == rhs.terminateResponse)||((this.terminateResponse!= null)&&this.terminateResponse.equals(rhs.terminateResponse))))&&((this.setExpressionResponse == rhs.setExpressionResponse)||((this.setExpressionResponse!= null)&&this.setExpressionResponse.equals(rhs.setExpressionResponse)))); + } + + + /** + * This enumeration defines all possible conditions when a thrown exception should result in a break. + * never: never breaks, + * always: always breaks, + * unhandled: breaks when exception unhandled, + * userUnhandled: breaks if the exception is not handled by user code. + * + */ + @Generated("jsonschema2pojo") + public enum ExceptionBreakMode { + + NEVER("never"), + ALWAYS("always"), + UNHANDLED("unhandled"), + USER_UNHANDLED("userUnhandled"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (ExceptionBreakMode c: values()) { + CONSTANTS.put(c.value, c); + } + } + + ExceptionBreakMode(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static ExceptionBreakMode fromValue(String value) { + ExceptionBreakMode constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArguments.java new file mode 100644 index 0000000..8b00576 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArguments.java @@ -0,0 +1,238 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `disassemble` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "memoryReference", + "offset", + "instructionOffset", + "instructionCount", + "resolveSymbols" +}) +@Generated("jsonschema2pojo") +public class DisassembleArguments { + + /** + * Memory reference to the base location containing the instructions to disassemble. + * (Required) + * + */ + @JsonProperty("memoryReference") + @JsonPropertyDescription("Memory reference to the base location containing the instructions to disassemble.") + private String memoryReference; + /** + * Offset (in bytes) to be applied to the reference location before disassembling. Can be negative. + * + */ + @JsonProperty("offset") + @JsonPropertyDescription("Offset (in bytes) to be applied to the reference location before disassembling. Can be negative.") + private Integer offset; + /** + * Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. + * + */ + @JsonProperty("instructionOffset") + @JsonPropertyDescription("Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative.") + private Integer instructionOffset; + /** + * Number of instructions to disassemble starting at the specified location and offset. + * An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. + * (Required) + * + */ + @JsonProperty("instructionCount") + @JsonPropertyDescription("Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value.") + private Integer instructionCount; + /** + * If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. + * + */ + @JsonProperty("resolveSymbols") + @JsonPropertyDescription("If true, the adapter should attempt to resolve memory addresses and other values to symbolic names.") + private Boolean resolveSymbols; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Memory reference to the base location containing the instructions to disassemble. + * (Required) + * + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { + return memoryReference; + } + + /** + * Memory reference to the base location containing the instructions to disassemble. + * (Required) + * + */ + @JsonProperty("memoryReference") + public void setMemoryReference(String memoryReference) { + this.memoryReference = memoryReference; + } + + /** + * Offset (in bytes) to be applied to the reference location before disassembling. Can be negative. + * + */ + @JsonProperty("offset") + public Integer getOffset() { + return offset; + } + + /** + * Offset (in bytes) to be applied to the reference location before disassembling. Can be negative. + * + */ + @JsonProperty("offset") + public void setOffset(Integer offset) { + this.offset = offset; + } + + /** + * Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. + * + */ + @JsonProperty("instructionOffset") + public Integer getInstructionOffset() { + return instructionOffset; + } + + /** + * Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. + * + */ + @JsonProperty("instructionOffset") + public void setInstructionOffset(Integer instructionOffset) { + this.instructionOffset = instructionOffset; + } + + /** + * Number of instructions to disassemble starting at the specified location and offset. + * An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. + * (Required) + * + */ + @JsonProperty("instructionCount") + public Integer getInstructionCount() { + return instructionCount; + } + + /** + * Number of instructions to disassemble starting at the specified location and offset. + * An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. + * (Required) + * + */ + @JsonProperty("instructionCount") + public void setInstructionCount(Integer instructionCount) { + this.instructionCount = instructionCount; + } + + /** + * If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. + * + */ + @JsonProperty("resolveSymbols") + public Boolean getResolveSymbols() { + return resolveSymbols; + } + + /** + * If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. + * + */ + @JsonProperty("resolveSymbols") + public void setResolveSymbols(Boolean resolveSymbols) { + this.resolveSymbols = resolveSymbols; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DisassembleArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("memoryReference"); + sb.append('='); + sb.append(((this.memoryReference == null)?"":this.memoryReference)); + sb.append(','); + sb.append("offset"); + sb.append('='); + sb.append(((this.offset == null)?"":this.offset)); + sb.append(','); + sb.append("instructionOffset"); + sb.append('='); + sb.append(((this.instructionOffset == null)?"":this.instructionOffset)); + sb.append(','); + sb.append("instructionCount"); + sb.append('='); + sb.append(((this.instructionCount == null)?"":this.instructionCount)); + sb.append(','); + sb.append("resolveSymbols"); + sb.append('='); + sb.append(((this.resolveSymbols == null)?"":this.resolveSymbols)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.instructionOffset == null)? 0 :this.instructionOffset.hashCode())); + result = ((result* 31)+((this.resolveSymbols == null)? 0 :this.resolveSymbols.hashCode())); + result = ((result* 31)+((this.memoryReference == null)? 0 :this.memoryReference.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); + result = ((result* 31)+((this.instructionCount == null)? 0 :this.instructionCount.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DisassembleArguments) == false) { + return false; + } + DisassembleArguments rhs = ((DisassembleArguments) other); + return (((((((this.instructionOffset == rhs.instructionOffset)||((this.instructionOffset!= null)&&this.instructionOffset.equals(rhs.instructionOffset)))&&((this.resolveSymbols == rhs.resolveSymbols)||((this.resolveSymbols!= null)&&this.resolveSymbols.equals(rhs.resolveSymbols))))&&((this.memoryReference == rhs.memoryReference)||((this.memoryReference!= null)&&this.memoryReference.equals(rhs.memoryReference))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.instructionCount == rhs.instructionCount)||((this.instructionCount!= null)&&this.instructionCount.equals(rhs.instructionCount)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstruction.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstruction.java new file mode 100644 index 0000000..dd229ed --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstruction.java @@ -0,0 +1,449 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * Represents a single disassembled instruction. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "address", + "instructionBytes", + "instruction", + "symbol", + "location", + "line", + "column", + "endLine", + "endColumn", + "presentationHint" +}) +@Generated("jsonschema2pojo") +public class DisassembledInstruction { + + /** + * The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. + * (Required) + * + */ + @JsonProperty("address") + @JsonPropertyDescription("The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise.") + private String address; + /** + * Raw bytes representing the instruction and its operands, in an implementation-defined format. + * + */ + @JsonProperty("instructionBytes") + @JsonPropertyDescription("Raw bytes representing the instruction and its operands, in an implementation-defined format.") + private String instructionBytes; + /** + * Text representing the instruction and its operands, in an implementation-defined format. + * (Required) + * + */ + @JsonProperty("instruction") + @JsonPropertyDescription("Text representing the instruction and its operands, in an implementation-defined format.") + private String instruction; + /** + * Name of the symbol that corresponds with the location of this instruction, if any. + * + */ + @JsonProperty("symbol") + @JsonPropertyDescription("Name of the symbol that corresponds with the location of this instruction, if any.") + private String symbol; + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("location") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source location; + /** + * The line within the source location that corresponds to this instruction, if any. + * + */ + @JsonProperty("line") + @JsonPropertyDescription("The line within the source location that corresponds to this instruction, if any.") + private Integer line; + /** + * The column within the line that corresponds to this instruction, if any. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("The column within the line that corresponds to this instruction, if any.") + private Integer column; + /** + * The end line of the range that corresponds to this instruction, if any. + * + */ + @JsonProperty("endLine") + @JsonPropertyDescription("The end line of the range that corresponds to this instruction, if any.") + private Integer endLine; + /** + * The end column of the range that corresponds to this instruction, if any. + * + */ + @JsonProperty("endColumn") + @JsonPropertyDescription("The end column of the range that corresponds to this instruction, if any.") + private Integer endColumn; + /** + * A hint for how to present the instruction in the UI. + * + * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' + * + */ + @JsonProperty("presentationHint") + @JsonPropertyDescription("A hint for how to present the instruction in the UI.\n\nA value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'") + private PresentationHint presentationHint; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. + * (Required) + * + */ + @JsonProperty("address") + public String getAddress() { + return address; + } + + /** + * The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. + * (Required) + * + */ + @JsonProperty("address") + public void setAddress(String address) { + this.address = address; + } + + /** + * Raw bytes representing the instruction and its operands, in an implementation-defined format. + * + */ + @JsonProperty("instructionBytes") + public String getInstructionBytes() { + return instructionBytes; + } + + /** + * Raw bytes representing the instruction and its operands, in an implementation-defined format. + * + */ + @JsonProperty("instructionBytes") + public void setInstructionBytes(String instructionBytes) { + this.instructionBytes = instructionBytes; + } + + /** + * Text representing the instruction and its operands, in an implementation-defined format. + * (Required) + * + */ + @JsonProperty("instruction") + public String getInstruction() { + return instruction; + } + + /** + * Text representing the instruction and its operands, in an implementation-defined format. + * (Required) + * + */ + @JsonProperty("instruction") + public void setInstruction(String instruction) { + this.instruction = instruction; + } + + /** + * Name of the symbol that corresponds with the location of this instruction, if any. + * + */ + @JsonProperty("symbol") + public String getSymbol() { + return symbol; + } + + /** + * Name of the symbol that corresponds with the location of this instruction, if any. + * + */ + @JsonProperty("symbol") + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("location") + public Source getLocation() { + return location; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("location") + public void setLocation(Source location) { + this.location = location; + } + + /** + * The line within the source location that corresponds to this instruction, if any. + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * The line within the source location that corresponds to this instruction, if any. + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * The column within the line that corresponds to this instruction, if any. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * The column within the line that corresponds to this instruction, if any. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * The end line of the range that corresponds to this instruction, if any. + * + */ + @JsonProperty("endLine") + public Integer getEndLine() { + return endLine; + } + + /** + * The end line of the range that corresponds to this instruction, if any. + * + */ + @JsonProperty("endLine") + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + /** + * The end column of the range that corresponds to this instruction, if any. + * + */ + @JsonProperty("endColumn") + public Integer getEndColumn() { + return endColumn; + } + + /** + * The end column of the range that corresponds to this instruction, if any. + * + */ + @JsonProperty("endColumn") + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + /** + * A hint for how to present the instruction in the UI. + * + * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' + * + */ + @JsonProperty("presentationHint") + public PresentationHint getPresentationHint() { + return presentationHint; + } + + /** + * A hint for how to present the instruction in the UI. + * + * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' + * + */ + @JsonProperty("presentationHint") + public void setPresentationHint(PresentationHint presentationHint) { + this.presentationHint = presentationHint; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DisassembledInstruction.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("address"); + sb.append('='); + sb.append(((this.address == null)?"":this.address)); + sb.append(','); + sb.append("instructionBytes"); + sb.append('='); + sb.append(((this.instructionBytes == null)?"":this.instructionBytes)); + sb.append(','); + sb.append("instruction"); + sb.append('='); + sb.append(((this.instruction == null)?"":this.instruction)); + sb.append(','); + sb.append("symbol"); + sb.append('='); + sb.append(((this.symbol == null)?"":this.symbol)); + sb.append(','); + sb.append("location"); + sb.append('='); + sb.append(((this.location == null)?"":this.location)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("presentationHint"); + sb.append('='); + sb.append(((this.presentationHint == null)?"":this.presentationHint)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.symbol == null)? 0 :this.symbol.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.address == null)? 0 :this.address.hashCode())); + result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); + result = ((result* 31)+((this.instruction == null)? 0 :this.instruction.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + result = ((result* 31)+((this.instructionBytes == null)? 0 :this.instructionBytes.hashCode())); + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DisassembledInstruction) == false) { + return false; + } + DisassembledInstruction rhs = ((DisassembledInstruction) other); + return ((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.symbol == rhs.symbol)||((this.symbol!= null)&&this.symbol.equals(rhs.symbol))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.address == rhs.address)||((this.address!= null)&&this.address.equals(rhs.address))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.instruction == rhs.instruction)||((this.instruction!= null)&&this.instruction.equals(rhs.instruction))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.instructionBytes == rhs.instructionBytes)||((this.instructionBytes!= null)&&this.instructionBytes.equals(rhs.instructionBytes))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + + + /** + * A hint for how to present the instruction in the UI. + * + * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' + * + */ + @Generated("jsonschema2pojo") + public enum PresentationHint { + + NORMAL("normal"), + INVALID("invalid"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (PresentationHint c: values()) { + CONSTANTS.put(c.value, c); + } + } + + PresentationHint(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static PresentationHint fromValue(String value) { + PresentationHint constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArguments.java new file mode 100644 index 0000000..1fb52f4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArguments.java @@ -0,0 +1,179 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `disconnect` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "restart", + "terminateDebuggee", + "suspendDebuggee" +}) +@Generated("jsonschema2pojo") +public class DisconnectArguments { + + /** + * A value of true indicates that this `disconnect` request is part of a restart sequence. + * + */ + @JsonProperty("restart") + @JsonPropertyDescription("A value of true indicates that this `disconnect` request is part of a restart sequence.") + private Boolean restart; + /** + * Indicates whether the debuggee should be terminated when the debugger is disconnected. + * If unspecified, the debug adapter is free to do whatever it thinks is best. + * The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true. + * + */ + @JsonProperty("terminateDebuggee") + @JsonPropertyDescription("Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true.") + private Boolean terminateDebuggee; + /** + * Indicates whether the debuggee should stay suspended when the debugger is disconnected. + * If unspecified, the debuggee should resume execution. + * The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true. + * + */ + @JsonProperty("suspendDebuggee") + @JsonPropertyDescription("Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true.") + private Boolean suspendDebuggee; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * A value of true indicates that this `disconnect` request is part of a restart sequence. + * + */ + @JsonProperty("restart") + public Boolean getRestart() { + return restart; + } + + /** + * A value of true indicates that this `disconnect` request is part of a restart sequence. + * + */ + @JsonProperty("restart") + public void setRestart(Boolean restart) { + this.restart = restart; + } + + /** + * Indicates whether the debuggee should be terminated when the debugger is disconnected. + * If unspecified, the debug adapter is free to do whatever it thinks is best. + * The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true. + * + */ + @JsonProperty("terminateDebuggee") + public Boolean getTerminateDebuggee() { + return terminateDebuggee; + } + + /** + * Indicates whether the debuggee should be terminated when the debugger is disconnected. + * If unspecified, the debug adapter is free to do whatever it thinks is best. + * The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true. + * + */ + @JsonProperty("terminateDebuggee") + public void setTerminateDebuggee(Boolean terminateDebuggee) { + this.terminateDebuggee = terminateDebuggee; + } + + /** + * Indicates whether the debuggee should stay suspended when the debugger is disconnected. + * If unspecified, the debuggee should resume execution. + * The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true. + * + */ + @JsonProperty("suspendDebuggee") + public Boolean getSuspendDebuggee() { + return suspendDebuggee; + } + + /** + * Indicates whether the debuggee should stay suspended when the debugger is disconnected. + * If unspecified, the debuggee should resume execution. + * The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true. + * + */ + @JsonProperty("suspendDebuggee") + public void setSuspendDebuggee(Boolean suspendDebuggee) { + this.suspendDebuggee = suspendDebuggee; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DisconnectArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("restart"); + sb.append('='); + sb.append(((this.restart == null)?"":this.restart)); + sb.append(','); + sb.append("terminateDebuggee"); + sb.append('='); + sb.append(((this.terminateDebuggee == null)?"":this.terminateDebuggee)); + sb.append(','); + sb.append("suspendDebuggee"); + sb.append('='); + sb.append(((this.suspendDebuggee == null)?"":this.suspendDebuggee)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.terminateDebuggee == null)? 0 :this.terminateDebuggee.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.restart == null)? 0 :this.restart.hashCode())); + result = ((result* 31)+((this.suspendDebuggee == null)? 0 :this.suspendDebuggee.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DisconnectArguments) == false) { + return false; + } + DisconnectArguments rhs = ((DisconnectArguments) other); + return (((((this.terminateDebuggee == rhs.terminateDebuggee)||((this.terminateDebuggee!= null)&&this.terminateDebuggee.equals(rhs.terminateDebuggee)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.restart == rhs.restart)||((this.restart!= null)&&this.restart.equals(rhs.restart))))&&((this.suspendDebuggee == rhs.suspendDebuggee)||((this.suspendDebuggee!= null)&&this.suspendDebuggee.equals(rhs.suspendDebuggee)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Env.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Env.java new file mode 100644 index 0000000..cf25eb9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Env.java @@ -0,0 +1,73 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Environment key-value pairs that are added to or removed from the default environment. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + +}) +@Generated("jsonschema2pojo") +public class Env { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Env.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Env) == false) { + return false; + } + Env rhs = ((Env) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArguments.java new file mode 100644 index 0000000..f073bfa --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArguments.java @@ -0,0 +1,201 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `evaluate` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "expression", + "frameId", + "context", + "format" +}) +@Generated("jsonschema2pojo") +public class EvaluateArguments { + + /** + * The expression to evaluate. + * (Required) + * + */ + @JsonProperty("expression") + @JsonPropertyDescription("The expression to evaluate.") + private String expression; + /** + * Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. + * + */ + @JsonProperty("frameId") + @JsonPropertyDescription("Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope.") + private Integer frameId; + /** + * The context in which the evaluate request is used. + * + */ + @JsonProperty("context") + @JsonPropertyDescription("The context in which the evaluate request is used.") + private String context; + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + @JsonPropertyDescription("Provides formatting information for a value.") + private ValueFormat format; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The expression to evaluate. + * (Required) + * + */ + @JsonProperty("expression") + public String getExpression() { + return expression; + } + + /** + * The expression to evaluate. + * (Required) + * + */ + @JsonProperty("expression") + public void setExpression(String expression) { + this.expression = expression; + } + + /** + * Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. + * + */ + @JsonProperty("frameId") + public Integer getFrameId() { + return frameId; + } + + /** + * Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. + * + */ + @JsonProperty("frameId") + public void setFrameId(Integer frameId) { + this.frameId = frameId; + } + + /** + * The context in which the evaluate request is used. + * + */ + @JsonProperty("context") + public String getContext() { + return context; + } + + /** + * The context in which the evaluate request is used. + * + */ + @JsonProperty("context") + public void setContext(String context) { + this.context = context; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + public ValueFormat getFormat() { + return format; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + public void setFormat(ValueFormat format) { + this.format = format; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(EvaluateArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("expression"); + sb.append('='); + sb.append(((this.expression == null)?"":this.expression)); + sb.append(','); + sb.append("frameId"); + sb.append('='); + sb.append(((this.frameId == null)?"":this.frameId)); + sb.append(','); + sb.append("context"); + sb.append('='); + sb.append(((this.context == null)?"":this.context)); + sb.append(','); + sb.append("format"); + sb.append('='); + sb.append(((this.format == null)?"":this.format)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.context == null)? 0 :this.context.hashCode())); + result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); + result = ((result* 31)+((this.expression == null)? 0 :this.expression.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof EvaluateArguments) == false) { + return false; + } + EvaluateArguments rhs = ((EvaluateArguments) other); + return ((((((this.context == rhs.context)||((this.context!= null)&&this.context.equals(rhs.context)))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.expression == rhs.expression)||((this.expression!= null)&&this.expression.equals(rhs.expression))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakpointsFilter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakpointsFilter.java new file mode 100644 index 0000000..0d42024 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakpointsFilter.java @@ -0,0 +1,266 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "filter", + "label", + "description", + "default", + "supportsCondition", + "conditionDescription" +}) +@Generated("jsonschema2pojo") +public class ExceptionBreakpointsFilter { + + /** + * The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. + * (Required) + * + */ + @JsonProperty("filter") + @JsonPropertyDescription("The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request.") + private String filter; + /** + * The name of the filter option. This is shown in the UI. + * (Required) + * + */ + @JsonProperty("label") + @JsonPropertyDescription("The name of the filter option. This is shown in the UI.") + private String label; + /** + * A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated. + * + */ + @JsonProperty("description") + @JsonPropertyDescription("A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated.") + private String description; + /** + * Initial value of the filter option. If not specified a value false is assumed. + * + */ + @JsonProperty("default") + @JsonPropertyDescription("Initial value of the filter option. If not specified a value false is assumed.") + private Boolean _default; + /** + * Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. + * + */ + @JsonProperty("supportsCondition") + @JsonPropertyDescription("Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set.") + private Boolean supportsCondition; + /** + * A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated. + * + */ + @JsonProperty("conditionDescription") + @JsonPropertyDescription("A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated.") + private String conditionDescription; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. + * (Required) + * + */ + @JsonProperty("filter") + public String getFilter() { + return filter; + } + + /** + * The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. + * (Required) + * + */ + @JsonProperty("filter") + public void setFilter(String filter) { + this.filter = filter; + } + + /** + * The name of the filter option. This is shown in the UI. + * (Required) + * + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * The name of the filter option. This is shown in the UI. + * (Required) + * + */ + @JsonProperty("label") + public void setLabel(String label) { + this.label = label; + } + + /** + * A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated. + * + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated. + * + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Initial value of the filter option. If not specified a value false is assumed. + * + */ + @JsonProperty("default") + public Boolean getDefault() { + return _default; + } + + /** + * Initial value of the filter option. If not specified a value false is assumed. + * + */ + @JsonProperty("default") + public void setDefault(Boolean _default) { + this._default = _default; + } + + /** + * Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. + * + */ + @JsonProperty("supportsCondition") + public Boolean getSupportsCondition() { + return supportsCondition; + } + + /** + * Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. + * + */ + @JsonProperty("supportsCondition") + public void setSupportsCondition(Boolean supportsCondition) { + this.supportsCondition = supportsCondition; + } + + /** + * A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated. + * + */ + @JsonProperty("conditionDescription") + public String getConditionDescription() { + return conditionDescription; + } + + /** + * A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated. + * + */ + @JsonProperty("conditionDescription") + public void setConditionDescription(String conditionDescription) { + this.conditionDescription = conditionDescription; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExceptionBreakpointsFilter.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("filter"); + sb.append('='); + sb.append(((this.filter == null)?"":this.filter)); + sb.append(','); + sb.append("label"); + sb.append('='); + sb.append(((this.label == null)?"":this.label)); + sb.append(','); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null)?"":this.description)); + sb.append(','); + sb.append("_default"); + sb.append('='); + sb.append(((this._default == null)?"":this._default)); + sb.append(','); + sb.append("supportsCondition"); + sb.append('='); + sb.append(((this.supportsCondition == null)?"":this.supportsCondition)); + sb.append(','); + sb.append("conditionDescription"); + sb.append('='); + sb.append(((this.conditionDescription == null)?"":this.conditionDescription)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.filter == null)? 0 :this.filter.hashCode())); + result = ((result* 31)+((this._default == null)? 0 :this._default.hashCode())); + result = ((result* 31)+((this.supportsCondition == null)? 0 :this.supportsCondition.hashCode())); + result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); + result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.conditionDescription == null)? 0 :this.conditionDescription.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExceptionBreakpointsFilter) == false) { + return false; + } + ExceptionBreakpointsFilter rhs = ((ExceptionBreakpointsFilter) other); + return ((((((((this.filter == rhs.filter)||((this.filter!= null)&&this.filter.equals(rhs.filter)))&&((this._default == rhs._default)||((this._default!= null)&&this._default.equals(rhs._default))))&&((this.supportsCondition == rhs.supportsCondition)||((this.supportsCondition!= null)&&this.supportsCondition.equals(rhs.supportsCondition))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.conditionDescription == rhs.conditionDescription)||((this.conditionDescription!= null)&&this.conditionDescription.equals(rhs.conditionDescription)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionDetails.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionDetails.java new file mode 100644 index 0000000..f2342f1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionDetails.java @@ -0,0 +1,262 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Detailed information about an exception that has occurred. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "message", + "typeName", + "fullTypeName", + "evaluateName", + "stackTrace", + "innerException" +}) +@Generated("jsonschema2pojo") +public class ExceptionDetails { + + /** + * Message contained in the exception. + * + */ + @JsonProperty("message") + @JsonPropertyDescription("Message contained in the exception.") + private String message; + /** + * Short type name of the exception object. + * + */ + @JsonProperty("typeName") + @JsonPropertyDescription("Short type name of the exception object.") + private String typeName; + /** + * Fully-qualified type name of the exception object. + * + */ + @JsonProperty("fullTypeName") + @JsonPropertyDescription("Fully-qualified type name of the exception object.") + private String fullTypeName; + /** + * An expression that can be evaluated in the current scope to obtain the exception object. + * + */ + @JsonProperty("evaluateName") + @JsonPropertyDescription("An expression that can be evaluated in the current scope to obtain the exception object.") + private String evaluateName; + /** + * Stack trace at the time the exception was thrown. + * + */ + @JsonProperty("stackTrace") + @JsonPropertyDescription("Stack trace at the time the exception was thrown.") + private String stackTrace; + /** + * Details of the exception contained by this exception, if any. + * + */ + @JsonProperty("innerException") + @JsonPropertyDescription("Details of the exception contained by this exception, if any.") + private List innerException = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Message contained in the exception. + * + */ + @JsonProperty("message") + public String getMessage() { + return message; + } + + /** + * Message contained in the exception. + * + */ + @JsonProperty("message") + public void setMessage(String message) { + this.message = message; + } + + /** + * Short type name of the exception object. + * + */ + @JsonProperty("typeName") + public String getTypeName() { + return typeName; + } + + /** + * Short type name of the exception object. + * + */ + @JsonProperty("typeName") + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + /** + * Fully-qualified type name of the exception object. + * + */ + @JsonProperty("fullTypeName") + public String getFullTypeName() { + return fullTypeName; + } + + /** + * Fully-qualified type name of the exception object. + * + */ + @JsonProperty("fullTypeName") + public void setFullTypeName(String fullTypeName) { + this.fullTypeName = fullTypeName; + } + + /** + * An expression that can be evaluated in the current scope to obtain the exception object. + * + */ + @JsonProperty("evaluateName") + public String getEvaluateName() { + return evaluateName; + } + + /** + * An expression that can be evaluated in the current scope to obtain the exception object. + * + */ + @JsonProperty("evaluateName") + public void setEvaluateName(String evaluateName) { + this.evaluateName = evaluateName; + } + + /** + * Stack trace at the time the exception was thrown. + * + */ + @JsonProperty("stackTrace") + public String getStackTrace() { + return stackTrace; + } + + /** + * Stack trace at the time the exception was thrown. + * + */ + @JsonProperty("stackTrace") + public void setStackTrace(String stackTrace) { + this.stackTrace = stackTrace; + } + + /** + * Details of the exception contained by this exception, if any. + * + */ + @JsonProperty("innerException") + public List getInnerException() { + return innerException; + } + + /** + * Details of the exception contained by this exception, if any. + * + */ + @JsonProperty("innerException") + public void setInnerException(List innerException) { + this.innerException = innerException; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExceptionDetails.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("message"); + sb.append('='); + sb.append(((this.message == null)?"":this.message)); + sb.append(','); + sb.append("typeName"); + sb.append('='); + sb.append(((this.typeName == null)?"":this.typeName)); + sb.append(','); + sb.append("fullTypeName"); + sb.append('='); + sb.append(((this.fullTypeName == null)?"":this.fullTypeName)); + sb.append(','); + sb.append("evaluateName"); + sb.append('='); + sb.append(((this.evaluateName == null)?"":this.evaluateName)); + sb.append(','); + sb.append("stackTrace"); + sb.append('='); + sb.append(((this.stackTrace == null)?"":this.stackTrace)); + sb.append(','); + sb.append("innerException"); + sb.append('='); + sb.append(((this.innerException == null)?"":this.innerException)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.innerException == null)? 0 :this.innerException.hashCode())); + result = ((result* 31)+((this.typeName == null)? 0 :this.typeName.hashCode())); + result = ((result* 31)+((this.fullTypeName == null)? 0 :this.fullTypeName.hashCode())); + result = ((result* 31)+((this.evaluateName == null)? 0 :this.evaluateName.hashCode())); + result = ((result* 31)+((this.stackTrace == null)? 0 :this.stackTrace.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExceptionDetails) == false) { + return false; + } + ExceptionDetails rhs = ((ExceptionDetails) other); + return ((((((((this.innerException == rhs.innerException)||((this.innerException!= null)&&this.innerException.equals(rhs.innerException)))&&((this.typeName == rhs.typeName)||((this.typeName!= null)&&this.typeName.equals(rhs.typeName))))&&((this.fullTypeName == rhs.fullTypeName)||((this.fullTypeName!= null)&&this.fullTypeName.equals(rhs.fullTypeName))))&&((this.evaluateName == rhs.evaluateName)||((this.evaluateName!= null)&&this.evaluateName.equals(rhs.evaluateName))))&&((this.stackTrace == rhs.stackTrace)||((this.stackTrace!= null)&&this.stackTrace.equals(rhs.stackTrace))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionFilterOptions.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionFilterOptions.java new file mode 100644 index 0000000..0bce677 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionFilterOptions.java @@ -0,0 +1,142 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "filterId", + "condition" +}) +@Generated("jsonschema2pojo") +public class ExceptionFilterOptions { + + /** + * ID of an exception filter returned by the `exceptionBreakpointFilters` capability. + * (Required) + * + */ + @JsonProperty("filterId") + @JsonPropertyDescription("ID of an exception filter returned by the `exceptionBreakpointFilters` capability.") + private String filterId; + /** + * An expression for conditional exceptions. + * The exception breaks into the debugger if the result of the condition is true. + * + */ + @JsonProperty("condition") + @JsonPropertyDescription("An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is true.") + private String condition; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * ID of an exception filter returned by the `exceptionBreakpointFilters` capability. + * (Required) + * + */ + @JsonProperty("filterId") + public String getFilterId() { + return filterId; + } + + /** + * ID of an exception filter returned by the `exceptionBreakpointFilters` capability. + * (Required) + * + */ + @JsonProperty("filterId") + public void setFilterId(String filterId) { + this.filterId = filterId; + } + + /** + * An expression for conditional exceptions. + * The exception breaks into the debugger if the result of the condition is true. + * + */ + @JsonProperty("condition") + public String getCondition() { + return condition; + } + + /** + * An expression for conditional exceptions. + * The exception breaks into the debugger if the result of the condition is true. + * + */ + @JsonProperty("condition") + public void setCondition(String condition) { + this.condition = condition; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExceptionFilterOptions.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("filterId"); + sb.append('='); + sb.append(((this.filterId == null)?"":this.filterId)); + sb.append(','); + sb.append("condition"); + sb.append('='); + sb.append(((this.condition == null)?"":this.condition)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.filterId == null)? 0 :this.filterId.hashCode())); + result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExceptionFilterOptions) == false) { + return false; + } + ExceptionFilterOptions rhs = ((ExceptionFilterOptions) other); + return ((((this.filterId == rhs.filterId)||((this.filterId!= null)&&this.filterId.equals(rhs.filterId)))&&((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArguments.java new file mode 100644 index 0000000..d919b07 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArguments.java @@ -0,0 +1,108 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `exceptionInfo` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId" +}) +@Generated("jsonschema2pojo") +public class ExceptionInfoArguments { + + /** + * Thread for which exception information should be retrieved. + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Thread for which exception information should be retrieved.") + private Integer threadId; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Thread for which exception information should be retrieved. + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Thread for which exception information should be retrieved. + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExceptionInfoArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExceptionInfoArguments) == false) { + return false; + } + ExceptionInfoArguments rhs = ((ExceptionInfoArguments) other); + return (((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionOptions.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionOptions.java new file mode 100644 index 0000000..5d37197 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionOptions.java @@ -0,0 +1,156 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * An `ExceptionOptions` assigns configuration options to a set of exceptions. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "path", + "breakMode" +}) +@Generated("jsonschema2pojo") +public class ExceptionOptions { + + /** + * A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected. + * By convention the first segment of the path is a category that is used to group exceptions in the UI. + * + */ + @JsonProperty("path") + @JsonPropertyDescription("A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI.") + private List path = new ArrayList(); + /** + * This enumeration defines all possible conditions when a thrown exception should result in a break. + * never: never breaks, + * always: always breaks, + * unhandled: breaks when exception unhandled, + * userUnhandled: breaks if the exception is not handled by user code. + * (Required) + * + */ + @JsonProperty("breakMode") + @JsonPropertyDescription("This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.") + private DebugProtocol.ExceptionBreakMode breakMode; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected. + * By convention the first segment of the path is a category that is used to group exceptions in the UI. + * + */ + @JsonProperty("path") + public List getPath() { + return path; + } + + /** + * A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected. + * By convention the first segment of the path is a category that is used to group exceptions in the UI. + * + */ + @JsonProperty("path") + public void setPath(List path) { + this.path = path; + } + + /** + * This enumeration defines all possible conditions when a thrown exception should result in a break. + * never: never breaks, + * always: always breaks, + * unhandled: breaks when exception unhandled, + * userUnhandled: breaks if the exception is not handled by user code. + * (Required) + * + */ + @JsonProperty("breakMode") + public DebugProtocol.ExceptionBreakMode getBreakMode() { + return breakMode; + } + + /** + * This enumeration defines all possible conditions when a thrown exception should result in a break. + * never: never breaks, + * always: always breaks, + * unhandled: breaks when exception unhandled, + * userUnhandled: breaks if the exception is not handled by user code. + * (Required) + * + */ + @JsonProperty("breakMode") + public void setBreakMode(DebugProtocol.ExceptionBreakMode breakMode) { + this.breakMode = breakMode; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExceptionOptions.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("path"); + sb.append('='); + sb.append(((this.path == null)?"":this.path)); + sb.append(','); + sb.append("breakMode"); + sb.append('='); + sb.append(((this.breakMode == null)?"":this.breakMode)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.path == null)? 0 :this.path.hashCode())); + result = ((result* 31)+((this.breakMode == null)? 0 :this.breakMode.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExceptionOptions) == false) { + return false; + } + ExceptionOptions rhs = ((ExceptionOptions) other); + return ((((this.path == rhs.path)||((this.path!= null)&&this.path.equals(rhs.path)))&&((this.breakMode == rhs.breakMode)||((this.breakMode!= null)&&this.breakMode.equals(rhs.breakMode))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionPathSegment.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionPathSegment.java new file mode 100644 index 0000000..df5620a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionPathSegment.java @@ -0,0 +1,142 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. + * If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "negate", + "names" +}) +@Generated("jsonschema2pojo") +public class ExceptionPathSegment { + + /** + * If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. + * + */ + @JsonProperty("negate") + @JsonPropertyDescription("If false or missing this segment matches the names provided, otherwise it matches anything except the names provided.") + private Boolean negate; + /** + * Depending on the value of `negate` the names that should match or not match. + * (Required) + * + */ + @JsonProperty("names") + @JsonPropertyDescription("Depending on the value of `negate` the names that should match or not match.") + private List names = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. + * + */ + @JsonProperty("negate") + public Boolean getNegate() { + return negate; + } + + /** + * If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. + * + */ + @JsonProperty("negate") + public void setNegate(Boolean negate) { + this.negate = negate; + } + + /** + * Depending on the value of `negate` the names that should match or not match. + * (Required) + * + */ + @JsonProperty("names") + public List getNames() { + return names; + } + + /** + * Depending on the value of `negate` the names that should match or not match. + * (Required) + * + */ + @JsonProperty("names") + public void setNames(List names) { + this.names = names; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExceptionPathSegment.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("negate"); + sb.append('='); + sb.append(((this.negate == null)?"":this.negate)); + sb.append(','); + sb.append("names"); + sb.append('='); + sb.append(((this.names == null)?"":this.names)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.negate == null)? 0 :this.negate.hashCode())); + result = ((result* 31)+((this.names == null)? 0 :this.names.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExceptionPathSegment) == false) { + return false; + } + ExceptionPathSegment rhs = ((ExceptionPathSegment) other); + return ((((this.negate == rhs.negate)||((this.negate!= null)&&this.negate.equals(rhs.negate)))&&((this.names == rhs.names)||((this.names!= null)&&this.names.equals(rhs.names))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/FunctionBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/FunctionBreakpoint.java new file mode 100644 index 0000000..f069a92 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/FunctionBreakpoint.java @@ -0,0 +1,179 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Properties of a breakpoint passed to the `setFunctionBreakpoints` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "name", + "condition", + "hitCondition" +}) +@Generated("jsonschema2pojo") +public class FunctionBreakpoint { + + /** + * The name of the function. + * (Required) + * + */ + @JsonProperty("name") + @JsonPropertyDescription("The name of the function.") + private String name; + /** + * An expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + @JsonPropertyDescription("An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.") + private String condition; + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * + */ + @JsonProperty("hitCondition") + @JsonPropertyDescription("An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.") + private String hitCondition; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The name of the function. + * (Required) + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * The name of the function. + * (Required) + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * An expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + public String getCondition() { + return condition; + } + + /** + * An expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + public void setCondition(String condition) { + this.condition = condition; + } + + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * + */ + @JsonProperty("hitCondition") + public String getHitCondition() { + return hitCondition; + } + + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * + */ + @JsonProperty("hitCondition") + public void setHitCondition(String hitCondition) { + this.hitCondition = hitCondition; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(FunctionBreakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("condition"); + sb.append('='); + sb.append(((this.condition == null)?"":this.condition)); + sb.append(','); + sb.append("hitCondition"); + sb.append('='); + sb.append(((this.hitCondition == null)?"":this.hitCondition)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); + result = ((result* 31)+((this.hitCondition == null)? 0 :this.hitCondition.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof FunctionBreakpoint) == false) { + return false; + } + FunctionBreakpoint rhs = ((FunctionBreakpoint) other); + return (((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition))))&&((this.hitCondition == rhs.hitCondition)||((this.hitCondition!= null)&&this.hitCondition.equals(rhs.hitCondition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArguments.java new file mode 100644 index 0000000..b77e13c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArguments.java @@ -0,0 +1,142 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `goto` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId", + "targetId" +}) +@Generated("jsonschema2pojo") +public class GotoArguments { + + /** + * Set the goto target for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Set the goto target for this thread.") + private Integer threadId; + /** + * The location where the debuggee will continue to run. + * (Required) + * + */ + @JsonProperty("targetId") + @JsonPropertyDescription("The location where the debuggee will continue to run.") + private Integer targetId; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Set the goto target for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Set the goto target for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + /** + * The location where the debuggee will continue to run. + * (Required) + * + */ + @JsonProperty("targetId") + public Integer getTargetId() { + return targetId; + } + + /** + * The location where the debuggee will continue to run. + * (Required) + * + */ + @JsonProperty("targetId") + public void setTargetId(Integer targetId) { + this.targetId = targetId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(GotoArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("targetId"); + sb.append('='); + sb.append(((this.targetId == null)?"":this.targetId)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.targetId == null)? 0 :this.targetId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof GotoArguments) == false) { + return false; + } + GotoArguments rhs = ((GotoArguments) other); + return ((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.targetId == rhs.targetId)||((this.targetId!= null)&&this.targetId.equals(rhs.targetId))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTarget.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTarget.java new file mode 100644 index 0000000..b634c7c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTarget.java @@ -0,0 +1,301 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A `GotoTarget` describes a code location that can be used as a target in the `goto` request. + * The possible goto targets can be determined via the `gotoTargets` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "label", + "line", + "column", + "endLine", + "endColumn", + "instructionPointerReference" +}) +@Generated("jsonschema2pojo") +public class GotoTarget { + + /** + * Unique identifier for a goto target. This is used in the `goto` request. + * (Required) + * + */ + @JsonProperty("id") + @JsonPropertyDescription("Unique identifier for a goto target. This is used in the `goto` request.") + private Integer id; + /** + * The name of the goto target (shown in the UI). + * (Required) + * + */ + @JsonProperty("label") + @JsonPropertyDescription("The name of the goto target (shown in the UI).") + private String label; + /** + * The line of the goto target. + * (Required) + * + */ + @JsonProperty("line") + @JsonPropertyDescription("The line of the goto target.") + private Integer line; + /** + * The column of the goto target. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("The column of the goto target.") + private Integer column; + /** + * The end line of the range covered by the goto target. + * + */ + @JsonProperty("endLine") + @JsonPropertyDescription("The end line of the range covered by the goto target.") + private Integer endLine; + /** + * The end column of the range covered by the goto target. + * + */ + @JsonProperty("endColumn") + @JsonPropertyDescription("The end column of the range covered by the goto target.") + private Integer endColumn; + /** + * A memory reference for the instruction pointer value represented by this target. + * + */ + @JsonProperty("instructionPointerReference") + @JsonPropertyDescription("A memory reference for the instruction pointer value represented by this target.") + private String instructionPointerReference; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Unique identifier for a goto target. This is used in the `goto` request. + * (Required) + * + */ + @JsonProperty("id") + public Integer getId() { + return id; + } + + /** + * Unique identifier for a goto target. This is used in the `goto` request. + * (Required) + * + */ + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * The name of the goto target (shown in the UI). + * (Required) + * + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * The name of the goto target (shown in the UI). + * (Required) + * + */ + @JsonProperty("label") + public void setLabel(String label) { + this.label = label; + } + + /** + * The line of the goto target. + * (Required) + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * The line of the goto target. + * (Required) + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * The column of the goto target. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * The column of the goto target. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * The end line of the range covered by the goto target. + * + */ + @JsonProperty("endLine") + public Integer getEndLine() { + return endLine; + } + + /** + * The end line of the range covered by the goto target. + * + */ + @JsonProperty("endLine") + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + /** + * The end column of the range covered by the goto target. + * + */ + @JsonProperty("endColumn") + public Integer getEndColumn() { + return endColumn; + } + + /** + * The end column of the range covered by the goto target. + * + */ + @JsonProperty("endColumn") + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + /** + * A memory reference for the instruction pointer value represented by this target. + * + */ + @JsonProperty("instructionPointerReference") + public String getInstructionPointerReference() { + return instructionPointerReference; + } + + /** + * A memory reference for the instruction pointer value represented by this target. + * + */ + @JsonProperty("instructionPointerReference") + public void setInstructionPointerReference(String instructionPointerReference) { + this.instructionPointerReference = instructionPointerReference; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(GotoTarget.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("label"); + sb.append('='); + sb.append(((this.label == null)?"":this.label)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("instructionPointerReference"); + sb.append('='); + sb.append(((this.instructionPointerReference == null)?"":this.instructionPointerReference)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.instructionPointerReference == null)? 0 :this.instructionPointerReference.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof GotoTarget) == false) { + return false; + } + GotoTarget rhs = ((GotoTarget) other); + return (((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.instructionPointerReference == rhs.instructionPointerReference)||((this.instructionPointerReference!= null)&&this.instructionPointerReference.equals(rhs.instructionPointerReference)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArguments.java new file mode 100644 index 0000000..0f034af --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArguments.java @@ -0,0 +1,176 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `gotoTargets` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "source", + "line", + "column" +}) +@Generated("jsonschema2pojo") +public class GotoTargetsArguments { + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source source; + /** + * The line location for which the goto targets are determined. + * (Required) + * + */ + @JsonProperty("line") + @JsonPropertyDescription("The line location for which the goto targets are determined.") + private Integer line; + /** + * The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer column; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + public Source getSource() { + return source; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + public void setSource(Source source) { + this.source = source; + } + + /** + * The line location for which the goto targets are determined. + * (Required) + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * The line location for which the goto targets are determined. + * (Required) + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(GotoTargetsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("source"); + sb.append('='); + sb.append(((this.source == null)?"":this.source)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof GotoTargetsArguments) == false) { + return false; + } + GotoTargetsArguments rhs = ((GotoTargetsArguments) other); + return (((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArguments.java new file mode 100644 index 0000000..8b5c6df --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArguments.java @@ -0,0 +1,573 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `initialize` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "clientID", + "clientName", + "adapterID", + "locale", + "linesStartAt1", + "columnsStartAt1", + "pathFormat", + "supportsVariableType", + "supportsVariablePaging", + "supportsRunInTerminalRequest", + "supportsMemoryReferences", + "supportsProgressReporting", + "supportsInvalidatedEvent", + "supportsMemoryEvent", + "supportsArgsCanBeInterpretedByShell", + "supportsStartDebuggingRequest" +}) +@Generated("jsonschema2pojo") +public class InitializeRequestArguments { + + /** + * The ID of the client using this adapter. + * + */ + @JsonProperty("clientID") + @JsonPropertyDescription("The ID of the client using this adapter.") + private String clientID; + /** + * The human-readable name of the client using this adapter. + * + */ + @JsonProperty("clientName") + @JsonPropertyDescription("The human-readable name of the client using this adapter.") + private String clientName; + /** + * The ID of the debug adapter. + * (Required) + * + */ + @JsonProperty("adapterID") + @JsonPropertyDescription("The ID of the debug adapter.") + private String adapterID; + /** + * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. + * + */ + @JsonProperty("locale") + @JsonPropertyDescription("The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH.") + private String locale; + /** + * If true all line numbers are 1-based (default). + * + */ + @JsonProperty("linesStartAt1") + @JsonPropertyDescription("If true all line numbers are 1-based (default).") + private Boolean linesStartAt1; + /** + * If true all column numbers are 1-based (default). + * + */ + @JsonProperty("columnsStartAt1") + @JsonPropertyDescription("If true all column numbers are 1-based (default).") + private Boolean columnsStartAt1; + /** + * Determines in what format paths are specified. The default is `path`, which is the native format. + * + */ + @JsonProperty("pathFormat") + @JsonPropertyDescription("Determines in what format paths are specified. The default is `path`, which is the native format.") + private String pathFormat; + /** + * Client supports the `type` attribute for variables. + * + */ + @JsonProperty("supportsVariableType") + @JsonPropertyDescription("Client supports the `type` attribute for variables.") + private Boolean supportsVariableType; + /** + * Client supports the paging of variables. + * + */ + @JsonProperty("supportsVariablePaging") + @JsonPropertyDescription("Client supports the paging of variables.") + private Boolean supportsVariablePaging; + /** + * Client supports the `runInTerminal` request. + * + */ + @JsonProperty("supportsRunInTerminalRequest") + @JsonPropertyDescription("Client supports the `runInTerminal` request.") + private Boolean supportsRunInTerminalRequest; + /** + * Client supports memory references. + * + */ + @JsonProperty("supportsMemoryReferences") + @JsonPropertyDescription("Client supports memory references.") + private Boolean supportsMemoryReferences; + /** + * Client supports progress reporting. + * + */ + @JsonProperty("supportsProgressReporting") + @JsonPropertyDescription("Client supports progress reporting.") + private Boolean supportsProgressReporting; + /** + * Client supports the `invalidated` event. + * + */ + @JsonProperty("supportsInvalidatedEvent") + @JsonPropertyDescription("Client supports the `invalidated` event.") + private Boolean supportsInvalidatedEvent; + /** + * Client supports the `memory` event. + * + */ + @JsonProperty("supportsMemoryEvent") + @JsonPropertyDescription("Client supports the `memory` event.") + private Boolean supportsMemoryEvent; + /** + * Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request. + * + */ + @JsonProperty("supportsArgsCanBeInterpretedByShell") + @JsonPropertyDescription("Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request.") + private Boolean supportsArgsCanBeInterpretedByShell; + /** + * Client supports the `startDebugging` request. + * + */ + @JsonProperty("supportsStartDebuggingRequest") + @JsonPropertyDescription("Client supports the `startDebugging` request.") + private Boolean supportsStartDebuggingRequest; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The ID of the client using this adapter. + * + */ + @JsonProperty("clientID") + public String getClientID() { + return clientID; + } + + /** + * The ID of the client using this adapter. + * + */ + @JsonProperty("clientID") + public void setClientID(String clientID) { + this.clientID = clientID; + } + + /** + * The human-readable name of the client using this adapter. + * + */ + @JsonProperty("clientName") + public String getClientName() { + return clientName; + } + + /** + * The human-readable name of the client using this adapter. + * + */ + @JsonProperty("clientName") + public void setClientName(String clientName) { + this.clientName = clientName; + } + + /** + * The ID of the debug adapter. + * (Required) + * + */ + @JsonProperty("adapterID") + public String getAdapterID() { + return adapterID; + } + + /** + * The ID of the debug adapter. + * (Required) + * + */ + @JsonProperty("adapterID") + public void setAdapterID(String adapterID) { + this.adapterID = adapterID; + } + + /** + * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. + * + */ + @JsonProperty("locale") + public String getLocale() { + return locale; + } + + /** + * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. + * + */ + @JsonProperty("locale") + public void setLocale(String locale) { + this.locale = locale; + } + + /** + * If true all line numbers are 1-based (default). + * + */ + @JsonProperty("linesStartAt1") + public Boolean getLinesStartAt1() { + return linesStartAt1; + } + + /** + * If true all line numbers are 1-based (default). + * + */ + @JsonProperty("linesStartAt1") + public void setLinesStartAt1(Boolean linesStartAt1) { + this.linesStartAt1 = linesStartAt1; + } + + /** + * If true all column numbers are 1-based (default). + * + */ + @JsonProperty("columnsStartAt1") + public Boolean getColumnsStartAt1() { + return columnsStartAt1; + } + + /** + * If true all column numbers are 1-based (default). + * + */ + @JsonProperty("columnsStartAt1") + public void setColumnsStartAt1(Boolean columnsStartAt1) { + this.columnsStartAt1 = columnsStartAt1; + } + + /** + * Determines in what format paths are specified. The default is `path`, which is the native format. + * + */ + @JsonProperty("pathFormat") + public String getPathFormat() { + return pathFormat; + } + + /** + * Determines in what format paths are specified. The default is `path`, which is the native format. + * + */ + @JsonProperty("pathFormat") + public void setPathFormat(String pathFormat) { + this.pathFormat = pathFormat; + } + + /** + * Client supports the `type` attribute for variables. + * + */ + @JsonProperty("supportsVariableType") + public Boolean getSupportsVariableType() { + return supportsVariableType; + } + + /** + * Client supports the `type` attribute for variables. + * + */ + @JsonProperty("supportsVariableType") + public void setSupportsVariableType(Boolean supportsVariableType) { + this.supportsVariableType = supportsVariableType; + } + + /** + * Client supports the paging of variables. + * + */ + @JsonProperty("supportsVariablePaging") + public Boolean getSupportsVariablePaging() { + return supportsVariablePaging; + } + + /** + * Client supports the paging of variables. + * + */ + @JsonProperty("supportsVariablePaging") + public void setSupportsVariablePaging(Boolean supportsVariablePaging) { + this.supportsVariablePaging = supportsVariablePaging; + } + + /** + * Client supports the `runInTerminal` request. + * + */ + @JsonProperty("supportsRunInTerminalRequest") + public Boolean getSupportsRunInTerminalRequest() { + return supportsRunInTerminalRequest; + } + + /** + * Client supports the `runInTerminal` request. + * + */ + @JsonProperty("supportsRunInTerminalRequest") + public void setSupportsRunInTerminalRequest(Boolean supportsRunInTerminalRequest) { + this.supportsRunInTerminalRequest = supportsRunInTerminalRequest; + } + + /** + * Client supports memory references. + * + */ + @JsonProperty("supportsMemoryReferences") + public Boolean getSupportsMemoryReferences() { + return supportsMemoryReferences; + } + + /** + * Client supports memory references. + * + */ + @JsonProperty("supportsMemoryReferences") + public void setSupportsMemoryReferences(Boolean supportsMemoryReferences) { + this.supportsMemoryReferences = supportsMemoryReferences; + } + + /** + * Client supports progress reporting. + * + */ + @JsonProperty("supportsProgressReporting") + public Boolean getSupportsProgressReporting() { + return supportsProgressReporting; + } + + /** + * Client supports progress reporting. + * + */ + @JsonProperty("supportsProgressReporting") + public void setSupportsProgressReporting(Boolean supportsProgressReporting) { + this.supportsProgressReporting = supportsProgressReporting; + } + + /** + * Client supports the `invalidated` event. + * + */ + @JsonProperty("supportsInvalidatedEvent") + public Boolean getSupportsInvalidatedEvent() { + return supportsInvalidatedEvent; + } + + /** + * Client supports the `invalidated` event. + * + */ + @JsonProperty("supportsInvalidatedEvent") + public void setSupportsInvalidatedEvent(Boolean supportsInvalidatedEvent) { + this.supportsInvalidatedEvent = supportsInvalidatedEvent; + } + + /** + * Client supports the `memory` event. + * + */ + @JsonProperty("supportsMemoryEvent") + public Boolean getSupportsMemoryEvent() { + return supportsMemoryEvent; + } + + /** + * Client supports the `memory` event. + * + */ + @JsonProperty("supportsMemoryEvent") + public void setSupportsMemoryEvent(Boolean supportsMemoryEvent) { + this.supportsMemoryEvent = supportsMemoryEvent; + } + + /** + * Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request. + * + */ + @JsonProperty("supportsArgsCanBeInterpretedByShell") + public Boolean getSupportsArgsCanBeInterpretedByShell() { + return supportsArgsCanBeInterpretedByShell; + } + + /** + * Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request. + * + */ + @JsonProperty("supportsArgsCanBeInterpretedByShell") + public void setSupportsArgsCanBeInterpretedByShell(Boolean supportsArgsCanBeInterpretedByShell) { + this.supportsArgsCanBeInterpretedByShell = supportsArgsCanBeInterpretedByShell; + } + + /** + * Client supports the `startDebugging` request. + * + */ + @JsonProperty("supportsStartDebuggingRequest") + public Boolean getSupportsStartDebuggingRequest() { + return supportsStartDebuggingRequest; + } + + /** + * Client supports the `startDebugging` request. + * + */ + @JsonProperty("supportsStartDebuggingRequest") + public void setSupportsStartDebuggingRequest(Boolean supportsStartDebuggingRequest) { + this.supportsStartDebuggingRequest = supportsStartDebuggingRequest; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(InitializeRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("clientID"); + sb.append('='); + sb.append(((this.clientID == null)?"":this.clientID)); + sb.append(','); + sb.append("clientName"); + sb.append('='); + sb.append(((this.clientName == null)?"":this.clientName)); + sb.append(','); + sb.append("adapterID"); + sb.append('='); + sb.append(((this.adapterID == null)?"":this.adapterID)); + sb.append(','); + sb.append("locale"); + sb.append('='); + sb.append(((this.locale == null)?"":this.locale)); + sb.append(','); + sb.append("linesStartAt1"); + sb.append('='); + sb.append(((this.linesStartAt1 == null)?"":this.linesStartAt1)); + sb.append(','); + sb.append("columnsStartAt1"); + sb.append('='); + sb.append(((this.columnsStartAt1 == null)?"":this.columnsStartAt1)); + sb.append(','); + sb.append("pathFormat"); + sb.append('='); + sb.append(((this.pathFormat == null)?"":this.pathFormat)); + sb.append(','); + sb.append("supportsVariableType"); + sb.append('='); + sb.append(((this.supportsVariableType == null)?"":this.supportsVariableType)); + sb.append(','); + sb.append("supportsVariablePaging"); + sb.append('='); + sb.append(((this.supportsVariablePaging == null)?"":this.supportsVariablePaging)); + sb.append(','); + sb.append("supportsRunInTerminalRequest"); + sb.append('='); + sb.append(((this.supportsRunInTerminalRequest == null)?"":this.supportsRunInTerminalRequest)); + sb.append(','); + sb.append("supportsMemoryReferences"); + sb.append('='); + sb.append(((this.supportsMemoryReferences == null)?"":this.supportsMemoryReferences)); + sb.append(','); + sb.append("supportsProgressReporting"); + sb.append('='); + sb.append(((this.supportsProgressReporting == null)?"":this.supportsProgressReporting)); + sb.append(','); + sb.append("supportsInvalidatedEvent"); + sb.append('='); + sb.append(((this.supportsInvalidatedEvent == null)?"":this.supportsInvalidatedEvent)); + sb.append(','); + sb.append("supportsMemoryEvent"); + sb.append('='); + sb.append(((this.supportsMemoryEvent == null)?"":this.supportsMemoryEvent)); + sb.append(','); + sb.append("supportsArgsCanBeInterpretedByShell"); + sb.append('='); + sb.append(((this.supportsArgsCanBeInterpretedByShell == null)?"":this.supportsArgsCanBeInterpretedByShell)); + sb.append(','); + sb.append("supportsStartDebuggingRequest"); + sb.append('='); + sb.append(((this.supportsStartDebuggingRequest == null)?"":this.supportsStartDebuggingRequest)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.supportsVariableType == null)? 0 :this.supportsVariableType.hashCode())); + result = ((result* 31)+((this.clientID == null)? 0 :this.clientID.hashCode())); + result = ((result* 31)+((this.clientName == null)? 0 :this.clientName.hashCode())); + result = ((result* 31)+((this.columnsStartAt1 == null)? 0 :this.columnsStartAt1 .hashCode())); + result = ((result* 31)+((this.locale == null)? 0 :this.locale.hashCode())); + result = ((result* 31)+((this.supportsMemoryReferences == null)? 0 :this.supportsMemoryReferences.hashCode())); + result = ((result* 31)+((this.linesStartAt1 == null)? 0 :this.linesStartAt1 .hashCode())); + result = ((result* 31)+((this.supportsMemoryEvent == null)? 0 :this.supportsMemoryEvent.hashCode())); + result = ((result* 31)+((this.supportsRunInTerminalRequest == null)? 0 :this.supportsRunInTerminalRequest.hashCode())); + result = ((result* 31)+((this.supportsProgressReporting == null)? 0 :this.supportsProgressReporting.hashCode())); + result = ((result* 31)+((this.supportsStartDebuggingRequest == null)? 0 :this.supportsStartDebuggingRequest.hashCode())); + result = ((result* 31)+((this.supportsVariablePaging == null)? 0 :this.supportsVariablePaging.hashCode())); + result = ((result* 31)+((this.supportsInvalidatedEvent == null)? 0 :this.supportsInvalidatedEvent.hashCode())); + result = ((result* 31)+((this.pathFormat == null)? 0 :this.pathFormat.hashCode())); + result = ((result* 31)+((this.adapterID == null)? 0 :this.adapterID.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.supportsArgsCanBeInterpretedByShell == null)? 0 :this.supportsArgsCanBeInterpretedByShell.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof InitializeRequestArguments) == false) { + return false; + } + InitializeRequestArguments rhs = ((InitializeRequestArguments) other); + return ((((((((((((((((((this.supportsVariableType == rhs.supportsVariableType)||((this.supportsVariableType!= null)&&this.supportsVariableType.equals(rhs.supportsVariableType)))&&((this.clientID == rhs.clientID)||((this.clientID!= null)&&this.clientID.equals(rhs.clientID))))&&((this.clientName == rhs.clientName)||((this.clientName!= null)&&this.clientName.equals(rhs.clientName))))&&((this.columnsStartAt1 == rhs.columnsStartAt1)||((this.columnsStartAt1 != null)&&this.columnsStartAt1 .equals(rhs.columnsStartAt1))))&&((this.locale == rhs.locale)||((this.locale!= null)&&this.locale.equals(rhs.locale))))&&((this.supportsMemoryReferences == rhs.supportsMemoryReferences)||((this.supportsMemoryReferences!= null)&&this.supportsMemoryReferences.equals(rhs.supportsMemoryReferences))))&&((this.linesStartAt1 == rhs.linesStartAt1)||((this.linesStartAt1 != null)&&this.linesStartAt1 .equals(rhs.linesStartAt1))))&&((this.supportsMemoryEvent == rhs.supportsMemoryEvent)||((this.supportsMemoryEvent!= null)&&this.supportsMemoryEvent.equals(rhs.supportsMemoryEvent))))&&((this.supportsRunInTerminalRequest == rhs.supportsRunInTerminalRequest)||((this.supportsRunInTerminalRequest!= null)&&this.supportsRunInTerminalRequest.equals(rhs.supportsRunInTerminalRequest))))&&((this.supportsProgressReporting == rhs.supportsProgressReporting)||((this.supportsProgressReporting!= null)&&this.supportsProgressReporting.equals(rhs.supportsProgressReporting))))&&((this.supportsStartDebuggingRequest == rhs.supportsStartDebuggingRequest)||((this.supportsStartDebuggingRequest!= null)&&this.supportsStartDebuggingRequest.equals(rhs.supportsStartDebuggingRequest))))&&((this.supportsVariablePaging == rhs.supportsVariablePaging)||((this.supportsVariablePaging!= null)&&this.supportsVariablePaging.equals(rhs.supportsVariablePaging))))&&((this.supportsInvalidatedEvent == rhs.supportsInvalidatedEvent)||((this.supportsInvalidatedEvent!= null)&&this.supportsInvalidatedEvent.equals(rhs.supportsInvalidatedEvent))))&&((this.pathFormat == rhs.pathFormat)||((this.pathFormat!= null)&&this.pathFormat.equals(rhs.pathFormat))))&&((this.adapterID == rhs.adapterID)||((this.adapterID!= null)&&this.adapterID.equals(rhs.adapterID))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.supportsArgsCanBeInterpretedByShell == rhs.supportsArgsCanBeInterpretedByShell)||((this.supportsArgsCanBeInterpretedByShell!= null)&&this.supportsArgsCanBeInterpretedByShell.equals(rhs.supportsArgsCanBeInterpretedByShell)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InstructionBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InstructionBreakpoint.java new file mode 100644 index 0000000..0a22264 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InstructionBreakpoint.java @@ -0,0 +1,216 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Properties of a breakpoint passed to the `setInstructionBreakpoints` request + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "instructionReference", + "offset", + "condition", + "hitCondition" +}) +@Generated("jsonschema2pojo") +public class InstructionBreakpoint { + + /** + * The instruction reference of the breakpoint. + * This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. + * (Required) + * + */ + @JsonProperty("instructionReference") + @JsonPropertyDescription("The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`.") + private String instructionReference; + /** + * The offset from the instruction reference in bytes. + * This can be negative. + * + */ + @JsonProperty("offset") + @JsonPropertyDescription("The offset from the instruction reference in bytes.\nThis can be negative.") + private Integer offset; + /** + * An expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + @JsonPropertyDescription("An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.") + private String condition; + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * + */ + @JsonProperty("hitCondition") + @JsonPropertyDescription("An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.") + private String hitCondition; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The instruction reference of the breakpoint. + * This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. + * (Required) + * + */ + @JsonProperty("instructionReference") + public String getInstructionReference() { + return instructionReference; + } + + /** + * The instruction reference of the breakpoint. + * This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. + * (Required) + * + */ + @JsonProperty("instructionReference") + public void setInstructionReference(String instructionReference) { + this.instructionReference = instructionReference; + } + + /** + * The offset from the instruction reference in bytes. + * This can be negative. + * + */ + @JsonProperty("offset") + public Integer getOffset() { + return offset; + } + + /** + * The offset from the instruction reference in bytes. + * This can be negative. + * + */ + @JsonProperty("offset") + public void setOffset(Integer offset) { + this.offset = offset; + } + + /** + * An expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + public String getCondition() { + return condition; + } + + /** + * An expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + public void setCondition(String condition) { + this.condition = condition; + } + + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * + */ + @JsonProperty("hitCondition") + public String getHitCondition() { + return hitCondition; + } + + /** + * An expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * + */ + @JsonProperty("hitCondition") + public void setHitCondition(String hitCondition) { + this.hitCondition = hitCondition; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(InstructionBreakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("instructionReference"); + sb.append('='); + sb.append(((this.instructionReference == null)?"":this.instructionReference)); + sb.append(','); + sb.append("offset"); + sb.append('='); + sb.append(((this.offset == null)?"":this.offset)); + sb.append(','); + sb.append("condition"); + sb.append('='); + sb.append(((this.condition == null)?"":this.condition)); + sb.append(','); + sb.append("hitCondition"); + sb.append('='); + sb.append(((this.hitCondition == null)?"":this.hitCondition)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); + result = ((result* 31)+((this.hitCondition == null)? 0 :this.hitCondition.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); + result = ((result* 31)+((this.instructionReference == null)? 0 :this.instructionReference.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof InstructionBreakpoint) == false) { + return false; + } + InstructionBreakpoint rhs = ((InstructionBreakpoint) other); + return ((((((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition)))&&((this.hitCondition == rhs.hitCondition)||((this.hitCondition!= null)&&this.hitCondition.equals(rhs.hitCondition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.instructionReference == rhs.instructionReference)||((this.instructionReference!= null)&&this.instructionReference.equals(rhs.instructionReference)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArguments.java new file mode 100644 index 0000000..5deec16 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArguments.java @@ -0,0 +1,142 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `launch` request. Additional attributes are implementation specific. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "noDebug", + "__restart" +}) +@Generated("jsonschema2pojo") +public class LaunchRequestArguments { + + /** + * If true, the launch request should launch the program without enabling debugging. + * + */ + @JsonProperty("noDebug") + @JsonPropertyDescription("If true, the launch request should launch the program without enabling debugging.") + private Boolean noDebug; + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + * + */ + @JsonProperty("__restart") + @JsonPropertyDescription("Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact.") + private Object restart; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * If true, the launch request should launch the program without enabling debugging. + * + */ + @JsonProperty("noDebug") + public Boolean getNoDebug() { + return noDebug; + } + + /** + * If true, the launch request should launch the program without enabling debugging. + * + */ + @JsonProperty("noDebug") + public void setNoDebug(Boolean noDebug) { + this.noDebug = noDebug; + } + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + * + */ + @JsonProperty("__restart") + public Object getRestart() { + return restart; + } + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + * + */ + @JsonProperty("__restart") + public void setRestart(Object restart) { + this.restart = restart; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LaunchRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("noDebug"); + sb.append('='); + sb.append(((this.noDebug == null)?"":this.noDebug)); + sb.append(','); + sb.append("restart"); + sb.append('='); + sb.append(((this.restart == null)?"":this.restart)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.restart == null)? 0 :this.restart.hashCode())); + result = ((result* 31)+((this.noDebug == null)? 0 :this.noDebug.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LaunchRequestArguments) == false) { + return false; + } + LaunchRequestArguments rhs = ((LaunchRequestArguments) other); + return ((((this.restart == rhs.restart)||((this.restart!= null)&&this.restart.equals(rhs.restart)))&&((this.noDebug == rhs.noDebug)||((this.noDebug!= null)&&this.noDebug.equals(rhs.noDebug))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesArguments.java new file mode 100644 index 0000000..9c92f0a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesArguments.java @@ -0,0 +1,73 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `loadedSources` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + +}) +@Generated("jsonschema2pojo") +public class LoadedSourcesArguments { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LoadedSourcesArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LoadedSourcesArguments) == false) { + return false; + } + LoadedSourcesArguments rhs = ((LoadedSourcesArguments) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Message.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Message.java new file mode 100644 index 0000000..e05ecb4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Message.java @@ -0,0 +1,300 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A structured message object. Used to return errors from requests. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "format", + "variables", + "sendTelemetry", + "showUser", + "url", + "urlLabel" +}) +@Generated("jsonschema2pojo") +public class Message { + + /** + * Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. + * (Required) + * + */ + @JsonProperty("id") + @JsonPropertyDescription("Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily.") + private Integer id; + /** + * A format string for the message. Embedded variables have the form `{name}`. + * If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes. + * (Required) + * + */ + @JsonProperty("format") + @JsonPropertyDescription("A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes.") + private String format; + /** + * An object used as a dictionary for looking up the variables in the format string. + * + */ + @JsonProperty("variables") + @JsonPropertyDescription("An object used as a dictionary for looking up the variables in the format string.") + private Variables variables; + /** + * If true send to telemetry. + * + */ + @JsonProperty("sendTelemetry") + @JsonPropertyDescription("If true send to telemetry.") + private Boolean sendTelemetry; + /** + * If true show user. + * + */ + @JsonProperty("showUser") + @JsonPropertyDescription("If true show user.") + private Boolean showUser; + /** + * A url where additional information about this message can be found. + * + */ + @JsonProperty("url") + @JsonPropertyDescription("A url where additional information about this message can be found.") + private String url; + /** + * A label that is presented to the user as the UI for opening the url. + * + */ + @JsonProperty("urlLabel") + @JsonPropertyDescription("A label that is presented to the user as the UI for opening the url.") + private String urlLabel; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. + * (Required) + * + */ + @JsonProperty("id") + public Integer getId() { + return id; + } + + /** + * Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. + * (Required) + * + */ + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * A format string for the message. Embedded variables have the form `{name}`. + * If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes. + * (Required) + * + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * A format string for the message. Embedded variables have the form `{name}`. + * If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes. + * (Required) + * + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + /** + * An object used as a dictionary for looking up the variables in the format string. + * + */ + @JsonProperty("variables") + public Variables getVariables() { + return variables; + } + + /** + * An object used as a dictionary for looking up the variables in the format string. + * + */ + @JsonProperty("variables") + public void setVariables(Variables variables) { + this.variables = variables; + } + + /** + * If true send to telemetry. + * + */ + @JsonProperty("sendTelemetry") + public Boolean getSendTelemetry() { + return sendTelemetry; + } + + /** + * If true send to telemetry. + * + */ + @JsonProperty("sendTelemetry") + public void setSendTelemetry(Boolean sendTelemetry) { + this.sendTelemetry = sendTelemetry; + } + + /** + * If true show user. + * + */ + @JsonProperty("showUser") + public Boolean getShowUser() { + return showUser; + } + + /** + * If true show user. + * + */ + @JsonProperty("showUser") + public void setShowUser(Boolean showUser) { + this.showUser = showUser; + } + + /** + * A url where additional information about this message can be found. + * + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * A url where additional information about this message can be found. + * + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * A label that is presented to the user as the UI for opening the url. + * + */ + @JsonProperty("urlLabel") + public String getUrlLabel() { + return urlLabel; + } + + /** + * A label that is presented to the user as the UI for opening the url. + * + */ + @JsonProperty("urlLabel") + public void setUrlLabel(String urlLabel) { + this.urlLabel = urlLabel; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Message.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("format"); + sb.append('='); + sb.append(((this.format == null)?"":this.format)); + sb.append(','); + sb.append("variables"); + sb.append('='); + sb.append(((this.variables == null)?"":this.variables)); + sb.append(','); + sb.append("sendTelemetry"); + sb.append('='); + sb.append(((this.sendTelemetry == null)?"":this.sendTelemetry)); + sb.append(','); + sb.append("showUser"); + sb.append('='); + sb.append(((this.showUser == null)?"":this.showUser)); + sb.append(','); + sb.append("url"); + sb.append('='); + sb.append(((this.url == null)?"":this.url)); + sb.append(','); + sb.append("urlLabel"); + sb.append('='); + sb.append(((this.urlLabel == null)?"":this.urlLabel)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.variables == null)? 0 :this.variables.hashCode())); + result = ((result* 31)+((this.urlLabel == null)? 0 :this.urlLabel.hashCode())); + result = ((result* 31)+((this.showUser == null)? 0 :this.showUser.hashCode())); + result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.sendTelemetry == null)? 0 :this.sendTelemetry.hashCode())); + result = ((result* 31)+((this.url == null)? 0 :this.url.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Message) == false) { + return false; + } + Message rhs = ((Message) other); + return (((((((((this.variables == rhs.variables)||((this.variables!= null)&&this.variables.equals(rhs.variables)))&&((this.urlLabel == rhs.urlLabel)||((this.urlLabel!= null)&&this.urlLabel.equals(rhs.urlLabel))))&&((this.showUser == rhs.showUser)||((this.showUser!= null)&&this.showUser.equals(rhs.showUser))))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.sendTelemetry == rhs.sendTelemetry)||((this.sendTelemetry!= null)&&this.sendTelemetry.equals(rhs.sendTelemetry))))&&((this.url == rhs.url)||((this.url!= null)&&this.url.equals(rhs.url)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Module.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Module.java new file mode 100644 index 0000000..eb3ae00 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Module.java @@ -0,0 +1,396 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A Module object represents a row in the modules view. + * The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. + * The `name` attribute is used to minimally render the module in the UI. + * + * Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. + * + * To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "name", + "path", + "isOptimized", + "isUserCode", + "version", + "symbolStatus", + "symbolFilePath", + "dateTimeStamp", + "addressRange" +}) +@Generated("jsonschema2pojo") +public class Module { + + /** + * Unique identifier for the module. + * (Required) + * + */ + @JsonProperty("id") + @JsonPropertyDescription("Unique identifier for the module.") + private Object id; + /** + * A name of the module. + * (Required) + * + */ + @JsonProperty("name") + @JsonPropertyDescription("A name of the module.") + private String name; + /** + * Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module. + * + */ + @JsonProperty("path") + @JsonPropertyDescription("Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module.") + private String path; + /** + * True if the module is optimized. + * + */ + @JsonProperty("isOptimized") + @JsonPropertyDescription("True if the module is optimized.") + private Boolean isOptimized; + /** + * True if the module is considered 'user code' by a debugger that supports 'Just My Code'. + * + */ + @JsonProperty("isUserCode") + @JsonPropertyDescription("True if the module is considered 'user code' by a debugger that supports 'Just My Code'.") + private Boolean isUserCode; + /** + * Version of Module. + * + */ + @JsonProperty("version") + @JsonPropertyDescription("Version of Module.") + private String version; + /** + * User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.) + * + */ + @JsonProperty("symbolStatus") + @JsonPropertyDescription("User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)") + private String symbolStatus; + /** + * Logical full path to the symbol file. The exact definition is implementation defined. + * + */ + @JsonProperty("symbolFilePath") + @JsonPropertyDescription("Logical full path to the symbol file. The exact definition is implementation defined.") + private String symbolFilePath; + /** + * Module created or modified, encoded as a RFC 3339 timestamp. + * + */ + @JsonProperty("dateTimeStamp") + @JsonPropertyDescription("Module created or modified, encoded as a RFC 3339 timestamp.") + private String dateTimeStamp; + /** + * Address range covered by this module. + * + */ + @JsonProperty("addressRange") + @JsonPropertyDescription("Address range covered by this module.") + private String addressRange; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Unique identifier for the module. + * (Required) + * + */ + @JsonProperty("id") + public Object getId() { + return id; + } + + /** + * Unique identifier for the module. + * (Required) + * + */ + @JsonProperty("id") + public void setId(Object id) { + this.id = id; + } + + /** + * A name of the module. + * (Required) + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * A name of the module. + * (Required) + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module. + * + */ + @JsonProperty("path") + public String getPath() { + return path; + } + + /** + * Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module. + * + */ + @JsonProperty("path") + public void setPath(String path) { + this.path = path; + } + + /** + * True if the module is optimized. + * + */ + @JsonProperty("isOptimized") + public Boolean getIsOptimized() { + return isOptimized; + } + + /** + * True if the module is optimized. + * + */ + @JsonProperty("isOptimized") + public void setIsOptimized(Boolean isOptimized) { + this.isOptimized = isOptimized; + } + + /** + * True if the module is considered 'user code' by a debugger that supports 'Just My Code'. + * + */ + @JsonProperty("isUserCode") + public Boolean getIsUserCode() { + return isUserCode; + } + + /** + * True if the module is considered 'user code' by a debugger that supports 'Just My Code'. + * + */ + @JsonProperty("isUserCode") + public void setIsUserCode(Boolean isUserCode) { + this.isUserCode = isUserCode; + } + + /** + * Version of Module. + * + */ + @JsonProperty("version") + public String getVersion() { + return version; + } + + /** + * Version of Module. + * + */ + @JsonProperty("version") + public void setVersion(String version) { + this.version = version; + } + + /** + * User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.) + * + */ + @JsonProperty("symbolStatus") + public String getSymbolStatus() { + return symbolStatus; + } + + /** + * User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.) + * + */ + @JsonProperty("symbolStatus") + public void setSymbolStatus(String symbolStatus) { + this.symbolStatus = symbolStatus; + } + + /** + * Logical full path to the symbol file. The exact definition is implementation defined. + * + */ + @JsonProperty("symbolFilePath") + public String getSymbolFilePath() { + return symbolFilePath; + } + + /** + * Logical full path to the symbol file. The exact definition is implementation defined. + * + */ + @JsonProperty("symbolFilePath") + public void setSymbolFilePath(String symbolFilePath) { + this.symbolFilePath = symbolFilePath; + } + + /** + * Module created or modified, encoded as a RFC 3339 timestamp. + * + */ + @JsonProperty("dateTimeStamp") + public String getDateTimeStamp() { + return dateTimeStamp; + } + + /** + * Module created or modified, encoded as a RFC 3339 timestamp. + * + */ + @JsonProperty("dateTimeStamp") + public void setDateTimeStamp(String dateTimeStamp) { + this.dateTimeStamp = dateTimeStamp; + } + + /** + * Address range covered by this module. + * + */ + @JsonProperty("addressRange") + public String getAddressRange() { + return addressRange; + } + + /** + * Address range covered by this module. + * + */ + @JsonProperty("addressRange") + public void setAddressRange(String addressRange) { + this.addressRange = addressRange; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Module.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("path"); + sb.append('='); + sb.append(((this.path == null)?"":this.path)); + sb.append(','); + sb.append("isOptimized"); + sb.append('='); + sb.append(((this.isOptimized == null)?"":this.isOptimized)); + sb.append(','); + sb.append("isUserCode"); + sb.append('='); + sb.append(((this.isUserCode == null)?"":this.isUserCode)); + sb.append(','); + sb.append("version"); + sb.append('='); + sb.append(((this.version == null)?"":this.version)); + sb.append(','); + sb.append("symbolStatus"); + sb.append('='); + sb.append(((this.symbolStatus == null)?"":this.symbolStatus)); + sb.append(','); + sb.append("symbolFilePath"); + sb.append('='); + sb.append(((this.symbolFilePath == null)?"":this.symbolFilePath)); + sb.append(','); + sb.append("dateTimeStamp"); + sb.append('='); + sb.append(((this.dateTimeStamp == null)?"":this.dateTimeStamp)); + sb.append(','); + sb.append("addressRange"); + sb.append('='); + sb.append(((this.addressRange == null)?"":this.addressRange)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.path == null)? 0 :this.path.hashCode())); + result = ((result* 31)+((this.isOptimized == null)? 0 :this.isOptimized.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.addressRange == null)? 0 :this.addressRange.hashCode())); + result = ((result* 31)+((this.symbolStatus == null)? 0 :this.symbolStatus.hashCode())); + result = ((result* 31)+((this.dateTimeStamp == null)? 0 :this.dateTimeStamp.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); + result = ((result* 31)+((this.symbolFilePath == null)? 0 :this.symbolFilePath.hashCode())); + result = ((result* 31)+((this.isUserCode == null)? 0 :this.isUserCode.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Module) == false) { + return false; + } + Module rhs = ((Module) other); + return ((((((((((((this.path == rhs.path)||((this.path!= null)&&this.path.equals(rhs.path)))&&((this.isOptimized == rhs.isOptimized)||((this.isOptimized!= null)&&this.isOptimized.equals(rhs.isOptimized))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.addressRange == rhs.addressRange)||((this.addressRange!= null)&&this.addressRange.equals(rhs.addressRange))))&&((this.symbolStatus == rhs.symbolStatus)||((this.symbolStatus!= null)&&this.symbolStatus.equals(rhs.symbolStatus))))&&((this.dateTimeStamp == rhs.dateTimeStamp)||((this.dateTimeStamp!= null)&&this.dateTimeStamp.equals(rhs.dateTimeStamp))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.symbolFilePath == rhs.symbolFilePath)||((this.symbolFilePath!= null)&&this.symbolFilePath.equals(rhs.symbolFilePath))))&&((this.isUserCode == rhs.isUserCode)||((this.isUserCode!= null)&&this.isUserCode.equals(rhs.isUserCode)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArguments.java new file mode 100644 index 0000000..6401367 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArguments.java @@ -0,0 +1,136 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `modules` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "startModule", + "moduleCount" +}) +@Generated("jsonschema2pojo") +public class ModulesArguments { + + /** + * The index of the first module to return; if omitted modules start at 0. + * + */ + @JsonProperty("startModule") + @JsonPropertyDescription("The index of the first module to return; if omitted modules start at 0.") + private Integer startModule; + /** + * The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned. + * + */ + @JsonProperty("moduleCount") + @JsonPropertyDescription("The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned.") + private Integer moduleCount; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The index of the first module to return; if omitted modules start at 0. + * + */ + @JsonProperty("startModule") + public Integer getStartModule() { + return startModule; + } + + /** + * The index of the first module to return; if omitted modules start at 0. + * + */ + @JsonProperty("startModule") + public void setStartModule(Integer startModule) { + this.startModule = startModule; + } + + /** + * The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned. + * + */ + @JsonProperty("moduleCount") + public Integer getModuleCount() { + return moduleCount; + } + + /** + * The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned. + * + */ + @JsonProperty("moduleCount") + public void setModuleCount(Integer moduleCount) { + this.moduleCount = moduleCount; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ModulesArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("startModule"); + sb.append('='); + sb.append(((this.startModule == null)?"":this.startModule)); + sb.append(','); + sb.append("moduleCount"); + sb.append('='); + sb.append(((this.moduleCount == null)?"":this.moduleCount)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.moduleCount == null)? 0 :this.moduleCount.hashCode())); + result = ((result* 31)+((this.startModule == null)? 0 :this.startModule.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ModulesArguments) == false) { + return false; + } + ModulesArguments rhs = ((ModulesArguments) other); + return ((((this.moduleCount == rhs.moduleCount)||((this.moduleCount!= null)&&this.moduleCount.equals(rhs.moduleCount)))&&((this.startModule == rhs.startModule)||((this.startModule!= null)&&this.startModule.equals(rhs.startModule))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArguments.java new file mode 100644 index 0000000..cc7ba27 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArguments.java @@ -0,0 +1,219 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * Arguments for `next` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId", + "singleThread", + "granularity" +}) +@Generated("jsonschema2pojo") +public class NextArguments { + + /** + * Specifies the thread for which to resume execution for one step (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Specifies the thread for which to resume execution for one step (of the given granularity).") + private Integer threadId; + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + @JsonPropertyDescription("If this flag is true, all other suspended threads are not resumed.") + private Boolean singleThread; + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") + private SteppingGranularity granularity; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Specifies the thread for which to resume execution for one step (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Specifies the thread for which to resume execution for one step (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { + return singleThread; + } + + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + public void setSingleThread(Boolean singleThread) { + this.singleThread = singleThread; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { + return granularity; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity granularity) { + this.granularity = granularity; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(NextArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("singleThread"); + sb.append('='); + sb.append(((this.singleThread == null)?"":this.singleThread)); + sb.append(','); + sb.append("granularity"); + sb.append('='); + sb.append(((this.granularity == null)?"":this.granularity)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); + result = ((result* 31)+((this.granularity == null)? 0 :this.granularity.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof NextArguments) == false) { + return false; + } + NextArguments rhs = ((NextArguments) other); + return (((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.granularity == rhs.granularity)||((this.granularity!= null)&&this.granularity.equals(rhs.granularity)))); + } + + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @Generated("jsonschema2pojo") + public enum SteppingGranularity { + + STATEMENT("statement"), + LINE("line"), + INSTRUCTION("instruction"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (SteppingGranularity c: values()) { + CONSTANTS.put(c.value, c); + } + } + + SteppingGranularity(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static SteppingGranularity fromValue(String value) { + SteppingGranularity constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArguments.java new file mode 100644 index 0000000..69bad3f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArguments.java @@ -0,0 +1,108 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `pause` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId" +}) +@Generated("jsonschema2pojo") +public class PauseArguments { + + /** + * Pause execution for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Pause execution for this thread.") + private Integer threadId; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Pause execution for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Pause execution for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PauseArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PauseArguments) == false) { + return false; + } + PauseArguments rhs = ((PauseArguments) other); + return (((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProtocolMessage.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProtocolMessage.java new file mode 100644 index 0000000..f2951b0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProtocolMessage.java @@ -0,0 +1,144 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Base Protocol + *

+ * Base class of requests, responses, and events. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "seq", + "type" +}) +@Generated("jsonschema2pojo") +public class ProtocolMessage { + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + * (Required) + * + */ + @JsonProperty("seq") + @JsonPropertyDescription("Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.") + private Integer seq; + /** + * Message type. + * (Required) + * + */ + @JsonProperty("type") + @JsonPropertyDescription("Message type.") + private String type; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + * (Required) + * + */ + @JsonProperty("seq") + public Integer getSeq() { + return seq; + } + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + * (Required) + * + */ + @JsonProperty("seq") + public void setSeq(Integer seq) { + this.seq = seq; + } + + /** + * Message type. + * (Required) + * + */ + @JsonProperty("type") + public String getType() { + return type; + } + + /** + * Message type. + * (Required) + * + */ + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ProtocolMessage.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("seq"); + sb.append('='); + sb.append(((this.seq == null)?"":this.seq)); + sb.append(','); + sb.append("type"); + sb.append('='); + sb.append(((this.type == null)?"":this.type)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); + result = ((result* 31)+((this.seq == null)? 0 :this.seq.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ProtocolMessage) == false) { + return false; + } + ProtocolMessage rhs = ((ProtocolMessage) other); + return ((((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type)))&&((this.seq == rhs.seq)||((this.seq!= null)&&this.seq.equals(rhs.seq))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArguments.java new file mode 100644 index 0000000..c911ca0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArguments.java @@ -0,0 +1,173 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `readMemory` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "memoryReference", + "offset", + "count" +}) +@Generated("jsonschema2pojo") +public class ReadMemoryArguments { + + /** + * Memory reference to the base location from which data should be read. + * (Required) + * + */ + @JsonProperty("memoryReference") + @JsonPropertyDescription("Memory reference to the base location from which data should be read.") + private String memoryReference; + /** + * Offset (in bytes) to be applied to the reference location before reading data. Can be negative. + * + */ + @JsonProperty("offset") + @JsonPropertyDescription("Offset (in bytes) to be applied to the reference location before reading data. Can be negative.") + private Integer offset; + /** + * Number of bytes to read at the specified location and offset. + * (Required) + * + */ + @JsonProperty("count") + @JsonPropertyDescription("Number of bytes to read at the specified location and offset.") + private Integer count; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Memory reference to the base location from which data should be read. + * (Required) + * + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { + return memoryReference; + } + + /** + * Memory reference to the base location from which data should be read. + * (Required) + * + */ + @JsonProperty("memoryReference") + public void setMemoryReference(String memoryReference) { + this.memoryReference = memoryReference; + } + + /** + * Offset (in bytes) to be applied to the reference location before reading data. Can be negative. + * + */ + @JsonProperty("offset") + public Integer getOffset() { + return offset; + } + + /** + * Offset (in bytes) to be applied to the reference location before reading data. Can be negative. + * + */ + @JsonProperty("offset") + public void setOffset(Integer offset) { + this.offset = offset; + } + + /** + * Number of bytes to read at the specified location and offset. + * (Required) + * + */ + @JsonProperty("count") + public Integer getCount() { + return count; + } + + /** + * Number of bytes to read at the specified location and offset. + * (Required) + * + */ + @JsonProperty("count") + public void setCount(Integer count) { + this.count = count; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ReadMemoryArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("memoryReference"); + sb.append('='); + sb.append(((this.memoryReference == null)?"":this.memoryReference)); + sb.append(','); + sb.append("offset"); + sb.append('='); + sb.append(((this.offset == null)?"":this.offset)); + sb.append(','); + sb.append("count"); + sb.append('='); + sb.append(((this.count == null)?"":this.count)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.count == null)? 0 :this.count.hashCode())); + result = ((result* 31)+((this.memoryReference == null)? 0 :this.memoryReference.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ReadMemoryArguments) == false) { + return false; + } + ReadMemoryArguments rhs = ((ReadMemoryArguments) other); + return (((((this.count == rhs.count)||((this.count!= null)&&this.count.equals(rhs.count)))&&((this.memoryReference == rhs.memoryReference)||((this.memoryReference!= null)&&this.memoryReference.equals(rhs.memoryReference))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArguments.java new file mode 100644 index 0000000..eb147cc --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArguments.java @@ -0,0 +1,105 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `restart` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "arguments" +}) +@Generated("jsonschema2pojo") +public class RestartArguments { + + /** + * The latest version of the `launch` or `attach` configuration. + * + */ + @JsonProperty("arguments") + @JsonPropertyDescription("The latest version of the `launch` or `attach` configuration.") + private Object arguments; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The latest version of the `launch` or `attach` configuration. + * + */ + @JsonProperty("arguments") + public Object getArguments() { + return arguments; + } + + /** + * The latest version of the `launch` or `attach` configuration. + * + */ + @JsonProperty("arguments") + public void setArguments(Object arguments) { + this.arguments = arguments; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(RestartArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("arguments"); + sb.append('='); + sb.append(((this.arguments == null)?"":this.arguments)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.arguments == null)? 0 :this.arguments.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RestartArguments) == false) { + return false; + } + RestartArguments rhs = ((RestartArguments) other); + return (((this.arguments == rhs.arguments)||((this.arguments!= null)&&this.arguments.equals(rhs.arguments)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArguments.java new file mode 100644 index 0000000..a1a5ae9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArguments.java @@ -0,0 +1,108 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `restartFrame` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "frameId" +}) +@Generated("jsonschema2pojo") +public class RestartFrameArguments { + + /** + * Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("frameId") + @JsonPropertyDescription("Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") + private Integer frameId; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("frameId") + public Integer getFrameId() { + return frameId; + } + + /** + * Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("frameId") + public void setFrameId(Integer frameId) { + this.frameId = frameId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(RestartFrameArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("frameId"); + sb.append('='); + sb.append(((this.frameId == null)?"":this.frameId)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RestartFrameArguments) == false) { + return false; + } + RestartFrameArguments rhs = ((RestartFrameArguments) other); + return (((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArguments.java new file mode 100644 index 0000000..780baf3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArguments.java @@ -0,0 +1,139 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `reverseContinue` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId", + "singleThread" +}) +@Generated("jsonschema2pojo") +public class ReverseContinueArguments { + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed. + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed.") + private Integer threadId; + /** + * If this flag is true, backward execution is resumed only for the thread with given `threadId`. + * + */ + @JsonProperty("singleThread") + @JsonPropertyDescription("If this flag is true, backward execution is resumed only for the thread with given `threadId`.") + private Boolean singleThread; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed. + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed. + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + /** + * If this flag is true, backward execution is resumed only for the thread with given `threadId`. + * + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { + return singleThread; + } + + /** + * If this flag is true, backward execution is resumed only for the thread with given `threadId`. + * + */ + @JsonProperty("singleThread") + public void setSingleThread(Boolean singleThread) { + this.singleThread = singleThread; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ReverseContinueArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("singleThread"); + sb.append('='); + sb.append(((this.singleThread == null)?"":this.singleThread)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ReverseContinueArguments) == false) { + return false; + } + ReverseContinueArguments rhs = ((ReverseContinueArguments) other); + return ((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArguments.java new file mode 100644 index 0000000..939416e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArguments.java @@ -0,0 +1,316 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * Arguments for `runInTerminal` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "kind", + "title", + "cwd", + "args", + "env", + "argsCanBeInterpretedByShell" +}) +@Generated("jsonschema2pojo") +public class RunInTerminalRequestArguments { + + /** + * What kind of terminal to launch. Defaults to `integrated` if not specified. + * + */ + @JsonProperty("kind") + @JsonPropertyDescription("What kind of terminal to launch. Defaults to `integrated` if not specified.") + private Kind kind; + /** + * Title of the terminal. + * + */ + @JsonProperty("title") + @JsonPropertyDescription("Title of the terminal.") + private String title; + /** + * Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. + * (Required) + * + */ + @JsonProperty("cwd") + @JsonPropertyDescription("Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command.") + private String cwd; + /** + * List of arguments. The first argument is the command to run. + * (Required) + * + */ + @JsonProperty("args") + @JsonPropertyDescription("List of arguments. The first argument is the command to run.") + private List args = new ArrayList(); + /** + * Environment key-value pairs that are added to or removed from the default environment. + * + */ + @JsonProperty("env") + @JsonPropertyDescription("Environment key-value pairs that are added to or removed from the default environment.") + private Env env; + /** + * This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells. + * + */ + @JsonProperty("argsCanBeInterpretedByShell") + @JsonPropertyDescription("This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells.") + private Boolean argsCanBeInterpretedByShell; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * What kind of terminal to launch. Defaults to `integrated` if not specified. + * + */ + @JsonProperty("kind") + public Kind getKind() { + return kind; + } + + /** + * What kind of terminal to launch. Defaults to `integrated` if not specified. + * + */ + @JsonProperty("kind") + public void setKind(Kind kind) { + this.kind = kind; + } + + /** + * Title of the terminal. + * + */ + @JsonProperty("title") + public String getTitle() { + return title; + } + + /** + * Title of the terminal. + * + */ + @JsonProperty("title") + public void setTitle(String title) { + this.title = title; + } + + /** + * Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. + * (Required) + * + */ + @JsonProperty("cwd") + public String getCwd() { + return cwd; + } + + /** + * Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. + * (Required) + * + */ + @JsonProperty("cwd") + public void setCwd(String cwd) { + this.cwd = cwd; + } + + /** + * List of arguments. The first argument is the command to run. + * (Required) + * + */ + @JsonProperty("args") + public List getArgs() { + return args; + } + + /** + * List of arguments. The first argument is the command to run. + * (Required) + * + */ + @JsonProperty("args") + public void setArgs(List args) { + this.args = args; + } + + /** + * Environment key-value pairs that are added to or removed from the default environment. + * + */ + @JsonProperty("env") + public Env getEnv() { + return env; + } + + /** + * Environment key-value pairs that are added to or removed from the default environment. + * + */ + @JsonProperty("env") + public void setEnv(Env env) { + this.env = env; + } + + /** + * This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells. + * + */ + @JsonProperty("argsCanBeInterpretedByShell") + public Boolean getArgsCanBeInterpretedByShell() { + return argsCanBeInterpretedByShell; + } + + /** + * This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells. + * + */ + @JsonProperty("argsCanBeInterpretedByShell") + public void setArgsCanBeInterpretedByShell(Boolean argsCanBeInterpretedByShell) { + this.argsCanBeInterpretedByShell = argsCanBeInterpretedByShell; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(RunInTerminalRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("kind"); + sb.append('='); + sb.append(((this.kind == null)?"":this.kind)); + sb.append(','); + sb.append("title"); + sb.append('='); + sb.append(((this.title == null)?"":this.title)); + sb.append(','); + sb.append("cwd"); + sb.append('='); + sb.append(((this.cwd == null)?"":this.cwd)); + sb.append(','); + sb.append("args"); + sb.append('='); + sb.append(((this.args == null)?"":this.args)); + sb.append(','); + sb.append("env"); + sb.append('='); + sb.append(((this.env == null)?"":this.env)); + sb.append(','); + sb.append("argsCanBeInterpretedByShell"); + sb.append('='); + sb.append(((this.argsCanBeInterpretedByShell == null)?"":this.argsCanBeInterpretedByShell)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.args == null)? 0 :this.args.hashCode())); + result = ((result* 31)+((this.cwd == null)? 0 :this.cwd.hashCode())); + result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); + result = ((result* 31)+((this.argsCanBeInterpretedByShell == null)? 0 :this.argsCanBeInterpretedByShell.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.title == null)? 0 :this.title.hashCode())); + result = ((result* 31)+((this.env == null)? 0 :this.env.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RunInTerminalRequestArguments) == false) { + return false; + } + RunInTerminalRequestArguments rhs = ((RunInTerminalRequestArguments) other); + return ((((((((this.args == rhs.args)||((this.args!= null)&&this.args.equals(rhs.args)))&&((this.cwd == rhs.cwd)||((this.cwd!= null)&&this.cwd.equals(rhs.cwd))))&&((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind))))&&((this.argsCanBeInterpretedByShell == rhs.argsCanBeInterpretedByShell)||((this.argsCanBeInterpretedByShell!= null)&&this.argsCanBeInterpretedByShell.equals(rhs.argsCanBeInterpretedByShell))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.title == rhs.title)||((this.title!= null)&&this.title.equals(rhs.title))))&&((this.env == rhs.env)||((this.env!= null)&&this.env.equals(rhs.env)))); + } + + + /** + * What kind of terminal to launch. Defaults to `integrated` if not specified. + * + */ + @Generated("jsonschema2pojo") + public enum Kind { + + INTEGRATED("integrated"), + EXTERNAL("external"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Kind c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Kind(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static Kind fromValue(String value) { + Kind constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Scope.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Scope.java new file mode 100644 index 0000000..4912f94 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Scope.java @@ -0,0 +1,433 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "name", + "presentationHint", + "variablesReference", + "namedVariables", + "indexedVariables", + "expensive", + "source", + "line", + "column", + "endLine", + "endColumn" +}) +@Generated("jsonschema2pojo") +public class Scope { + + /** + * Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. + * (Required) + * + */ + @JsonProperty("name") + @JsonPropertyDescription("Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated.") + private String name; + /** + * A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI. + * + */ + @JsonProperty("presentationHint") + @JsonPropertyDescription("A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.") + private String presentationHint; + /** + * The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + @JsonPropertyDescription("The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.") + private Integer variablesReference; + /** + * The number of named variables in this scope. + * The client can use this information to present the variables in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("namedVariables") + @JsonPropertyDescription("The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.") + private Integer namedVariables; + /** + * The number of indexed variables in this scope. + * The client can use this information to present the variables in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("indexedVariables") + @JsonPropertyDescription("The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.") + private Integer indexedVariables; + /** + * If true, the number of variables in this scope is large or expensive to retrieve. + * (Required) + * + */ + @JsonProperty("expensive") + @JsonPropertyDescription("If true, the number of variables in this scope is large or expensive to retrieve.") + private Boolean expensive; + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source source; + /** + * The start line of the range covered by this scope. + * + */ + @JsonProperty("line") + @JsonPropertyDescription("The start line of the range covered by this scope.") + private Integer line; + /** + * Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer column; + /** + * The end line of the range covered by this scope. + * + */ + @JsonProperty("endLine") + @JsonPropertyDescription("The end line of the range covered by this scope.") + private Integer endLine; + /** + * End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + @JsonPropertyDescription("End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer endColumn; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. + * (Required) + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. + * (Required) + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI. + * + */ + @JsonProperty("presentationHint") + public String getPresentationHint() { + return presentationHint; + } + + /** + * A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI. + * + */ + @JsonProperty("presentationHint") + public void setPresentationHint(String presentationHint) { + this.presentationHint = presentationHint; + } + + /** + * The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + public Integer getVariablesReference() { + return variablesReference; + } + + /** + * The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + public void setVariablesReference(Integer variablesReference) { + this.variablesReference = variablesReference; + } + + /** + * The number of named variables in this scope. + * The client can use this information to present the variables in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("namedVariables") + public Integer getNamedVariables() { + return namedVariables; + } + + /** + * The number of named variables in this scope. + * The client can use this information to present the variables in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("namedVariables") + public void setNamedVariables(Integer namedVariables) { + this.namedVariables = namedVariables; + } + + /** + * The number of indexed variables in this scope. + * The client can use this information to present the variables in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("indexedVariables") + public Integer getIndexedVariables() { + return indexedVariables; + } + + /** + * The number of indexed variables in this scope. + * The client can use this information to present the variables in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("indexedVariables") + public void setIndexedVariables(Integer indexedVariables) { + this.indexedVariables = indexedVariables; + } + + /** + * If true, the number of variables in this scope is large or expensive to retrieve. + * (Required) + * + */ + @JsonProperty("expensive") + public Boolean getExpensive() { + return expensive; + } + + /** + * If true, the number of variables in this scope is large or expensive to retrieve. + * (Required) + * + */ + @JsonProperty("expensive") + public void setExpensive(Boolean expensive) { + this.expensive = expensive; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + public Source getSource() { + return source; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + public void setSource(Source source) { + this.source = source; + } + + /** + * The start line of the range covered by this scope. + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * The start line of the range covered by this scope. + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * The end line of the range covered by this scope. + * + */ + @JsonProperty("endLine") + public Integer getEndLine() { + return endLine; + } + + /** + * The end line of the range covered by this scope. + * + */ + @JsonProperty("endLine") + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + /** + * End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + public Integer getEndColumn() { + return endColumn; + } + + /** + * End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Scope.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("presentationHint"); + sb.append('='); + sb.append(((this.presentationHint == null)?"":this.presentationHint)); + sb.append(','); + sb.append("variablesReference"); + sb.append('='); + sb.append(((this.variablesReference == null)?"":this.variablesReference)); + sb.append(','); + sb.append("namedVariables"); + sb.append('='); + sb.append(((this.namedVariables == null)?"":this.namedVariables)); + sb.append(','); + sb.append("indexedVariables"); + sb.append('='); + sb.append(((this.indexedVariables == null)?"":this.indexedVariables)); + sb.append(','); + sb.append("expensive"); + sb.append('='); + sb.append(((this.expensive == null)?"":this.expensive)); + sb.append(','); + sb.append("source"); + sb.append('='); + sb.append(((this.source == null)?"":this.source)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.indexedVariables == null)? 0 :this.indexedVariables.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.namedVariables == null)? 0 :this.namedVariables.hashCode())); + result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); + result = ((result* 31)+((this.expensive == null)? 0 :this.expensive.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Scope) == false) { + return false; + } + Scope rhs = ((Scope) other); + return (((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.indexedVariables == rhs.indexedVariables)||((this.indexedVariables!= null)&&this.indexedVariables.equals(rhs.indexedVariables))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.namedVariables == rhs.namedVariables)||((this.namedVariables!= null)&&this.namedVariables.equals(rhs.namedVariables))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference))))&&((this.expensive == rhs.expensive)||((this.expensive!= null)&&this.expensive.equals(rhs.expensive)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArguments.java new file mode 100644 index 0000000..9ac6640 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArguments.java @@ -0,0 +1,108 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `scopes` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "frameId" +}) +@Generated("jsonschema2pojo") +public class ScopesArguments { + + /** + * Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("frameId") + @JsonPropertyDescription("Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") + private Integer frameId; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("frameId") + public Integer getFrameId() { + return frameId; + } + + /** + * Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("frameId") + public void setFrameId(Integer frameId) { + this.frameId = frameId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ScopesArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("frameId"); + sb.append('='); + sb.append(((this.frameId == null)?"":this.frameId)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ScopesArguments) == false) { + return false; + } + ScopesArguments rhs = ((ScopesArguments) other); + return (((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArguments.java new file mode 100644 index 0000000..81d2d06 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArguments.java @@ -0,0 +1,206 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `setBreakpoints` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "source", + "breakpoints", + "lines", + "sourceModified" +}) +@Generated("jsonschema2pojo") +public class SetBreakpointsArguments { + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source source; + /** + * The code locations of the breakpoints. + * + */ + @JsonProperty("breakpoints") + @JsonPropertyDescription("The code locations of the breakpoints.") + private List breakpoints = new ArrayList(); + /** + * Deprecated: The code locations of the breakpoints. + * + */ + @JsonProperty("lines") + @JsonPropertyDescription("Deprecated: The code locations of the breakpoints.") + private List lines = new ArrayList(); + /** + * A value of true indicates that the underlying source has been modified which results in new breakpoint locations. + * + */ + @JsonProperty("sourceModified") + @JsonPropertyDescription("A value of true indicates that the underlying source has been modified which results in new breakpoint locations.") + private Boolean sourceModified; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + public Source getSource() { + return source; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * (Required) + * + */ + @JsonProperty("source") + public void setSource(Source source) { + this.source = source; + } + + /** + * The code locations of the breakpoints. + * + */ + @JsonProperty("breakpoints") + public List getBreakpoints() { + return breakpoints; + } + + /** + * The code locations of the breakpoints. + * + */ + @JsonProperty("breakpoints") + public void setBreakpoints(List breakpoints) { + this.breakpoints = breakpoints; + } + + /** + * Deprecated: The code locations of the breakpoints. + * + */ + @JsonProperty("lines") + public List getLines() { + return lines; + } + + /** + * Deprecated: The code locations of the breakpoints. + * + */ + @JsonProperty("lines") + public void setLines(List lines) { + this.lines = lines; + } + + /** + * A value of true indicates that the underlying source has been modified which results in new breakpoint locations. + * + */ + @JsonProperty("sourceModified") + public Boolean getSourceModified() { + return sourceModified; + } + + /** + * A value of true indicates that the underlying source has been modified which results in new breakpoint locations. + * + */ + @JsonProperty("sourceModified") + public void setSourceModified(Boolean sourceModified) { + this.sourceModified = sourceModified; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SetBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("source"); + sb.append('='); + sb.append(((this.source == null)?"":this.source)); + sb.append(','); + sb.append("breakpoints"); + sb.append('='); + sb.append(((this.breakpoints == null)?"":this.breakpoints)); + sb.append(','); + sb.append("lines"); + sb.append('='); + sb.append(((this.lines == null)?"":this.lines)); + sb.append(','); + sb.append("sourceModified"); + sb.append('='); + sb.append(((this.sourceModified == null)?"":this.sourceModified)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); + result = ((result* 31)+((this.breakpoints == null)? 0 :this.breakpoints.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.lines == null)? 0 :this.lines.hashCode())); + result = ((result* 31)+((this.sourceModified == null)? 0 :this.sourceModified.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SetBreakpointsArguments) == false) { + return false; + } + SetBreakpointsArguments rhs = ((SetBreakpointsArguments) other); + return ((((((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source)))&&((this.breakpoints == rhs.breakpoints)||((this.breakpoints!= null)&&this.breakpoints.equals(rhs.breakpoints))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.lines == rhs.lines)||((this.lines!= null)&&this.lines.equals(rhs.lines))))&&((this.sourceModified == rhs.sourceModified)||((this.sourceModified!= null)&&this.sourceModified.equals(rhs.sourceModified)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArguments.java new file mode 100644 index 0000000..7a3d4ce --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArguments.java @@ -0,0 +1,110 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `setDataBreakpoints` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "breakpoints" +}) +@Generated("jsonschema2pojo") +public class SetDataBreakpointsArguments { + + /** + * The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. + * (Required) + * + */ + @JsonProperty("breakpoints") + @JsonPropertyDescription("The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints.") + private List breakpoints = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. + * (Required) + * + */ + @JsonProperty("breakpoints") + public List getBreakpoints() { + return breakpoints; + } + + /** + * The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. + * (Required) + * + */ + @JsonProperty("breakpoints") + public void setBreakpoints(List breakpoints) { + this.breakpoints = breakpoints; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SetDataBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("breakpoints"); + sb.append('='); + sb.append(((this.breakpoints == null)?"":this.breakpoints)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.breakpoints == null)? 0 :this.breakpoints.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SetDataBreakpointsArguments) == false) { + return false; + } + SetDataBreakpointsArguments rhs = ((SetDataBreakpointsArguments) other); + return (((this.breakpoints == rhs.breakpoints)||((this.breakpoints!= null)&&this.breakpoints.equals(rhs.breakpoints)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArguments.java new file mode 100644 index 0000000..0742560 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArguments.java @@ -0,0 +1,175 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `setExceptionBreakpoints` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "filters", + "filterOptions", + "exceptionOptions" +}) +@Generated("jsonschema2pojo") +public class SetExceptionBreakpointsArguments { + + /** + * Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive. + * (Required) + * + */ + @JsonProperty("filters") + @JsonPropertyDescription("Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive.") + private List filters = new ArrayList(); + /** + * Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive. + * + */ + @JsonProperty("filterOptions") + @JsonPropertyDescription("Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive.") + private List filterOptions = new ArrayList(); + /** + * Configuration options for selected exceptions. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true. + * + */ + @JsonProperty("exceptionOptions") + @JsonPropertyDescription("Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true.") + private List exceptionOptions = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive. + * (Required) + * + */ + @JsonProperty("filters") + public List getFilters() { + return filters; + } + + /** + * Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive. + * (Required) + * + */ + @JsonProperty("filters") + public void setFilters(List filters) { + this.filters = filters; + } + + /** + * Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive. + * + */ + @JsonProperty("filterOptions") + public List getFilterOptions() { + return filterOptions; + } + + /** + * Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive. + * + */ + @JsonProperty("filterOptions") + public void setFilterOptions(List filterOptions) { + this.filterOptions = filterOptions; + } + + /** + * Configuration options for selected exceptions. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true. + * + */ + @JsonProperty("exceptionOptions") + public List getExceptionOptions() { + return exceptionOptions; + } + + /** + * Configuration options for selected exceptions. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true. + * + */ + @JsonProperty("exceptionOptions") + public void setExceptionOptions(List exceptionOptions) { + this.exceptionOptions = exceptionOptions; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SetExceptionBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("filters"); + sb.append('='); + sb.append(((this.filters == null)?"":this.filters)); + sb.append(','); + sb.append("filterOptions"); + sb.append('='); + sb.append(((this.filterOptions == null)?"":this.filterOptions)); + sb.append(','); + sb.append("exceptionOptions"); + sb.append('='); + sb.append(((this.exceptionOptions == null)?"":this.exceptionOptions)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.filters == null)? 0 :this.filters.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.exceptionOptions == null)? 0 :this.exceptionOptions.hashCode())); + result = ((result* 31)+((this.filterOptions == null)? 0 :this.filterOptions.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SetExceptionBreakpointsArguments) == false) { + return false; + } + SetExceptionBreakpointsArguments rhs = ((SetExceptionBreakpointsArguments) other); + return (((((this.filters == rhs.filters)||((this.filters!= null)&&this.filters.equals(rhs.filters)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.exceptionOptions == rhs.exceptionOptions)||((this.exceptionOptions!= null)&&this.exceptionOptions.equals(rhs.exceptionOptions))))&&((this.filterOptions == rhs.filterOptions)||((this.filterOptions!= null)&&this.filterOptions.equals(rhs.filterOptions)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArguments.java new file mode 100644 index 0000000..cf72b26 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArguments.java @@ -0,0 +1,204 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `setExpression` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "expression", + "value", + "frameId", + "format" +}) +@Generated("jsonschema2pojo") +public class SetExpressionArguments { + + /** + * The l-value expression to assign to. + * (Required) + * + */ + @JsonProperty("expression") + @JsonPropertyDescription("The l-value expression to assign to.") + private String expression; + /** + * The value expression to assign to the l-value expression. + * (Required) + * + */ + @JsonProperty("value") + @JsonPropertyDescription("The value expression to assign to the l-value expression.") + private String value; + /** + * Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope. + * + */ + @JsonProperty("frameId") + @JsonPropertyDescription("Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope.") + private Integer frameId; + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + @JsonPropertyDescription("Provides formatting information for a value.") + private ValueFormat format; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The l-value expression to assign to. + * (Required) + * + */ + @JsonProperty("expression") + public String getExpression() { + return expression; + } + + /** + * The l-value expression to assign to. + * (Required) + * + */ + @JsonProperty("expression") + public void setExpression(String expression) { + this.expression = expression; + } + + /** + * The value expression to assign to the l-value expression. + * (Required) + * + */ + @JsonProperty("value") + public String getValue() { + return value; + } + + /** + * The value expression to assign to the l-value expression. + * (Required) + * + */ + @JsonProperty("value") + public void setValue(String value) { + this.value = value; + } + + /** + * Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope. + * + */ + @JsonProperty("frameId") + public Integer getFrameId() { + return frameId; + } + + /** + * Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope. + * + */ + @JsonProperty("frameId") + public void setFrameId(Integer frameId) { + this.frameId = frameId; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + public ValueFormat getFormat() { + return format; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + public void setFormat(ValueFormat format) { + this.format = format; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SetExpressionArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("expression"); + sb.append('='); + sb.append(((this.expression == null)?"":this.expression)); + sb.append(','); + sb.append("value"); + sb.append('='); + sb.append(((this.value == null)?"":this.value)); + sb.append(','); + sb.append("frameId"); + sb.append('='); + sb.append(((this.frameId == null)?"":this.frameId)); + sb.append(','); + sb.append("format"); + sb.append('='); + sb.append(((this.format == null)?"":this.format)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); + result = ((result* 31)+((this.expression == null)? 0 :this.expression.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.value == null)? 0 :this.value.hashCode())); + result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SetExpressionArguments) == false) { + return false; + } + SetExpressionArguments rhs = ((SetExpressionArguments) other); + return ((((((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format)))&&((this.expression == rhs.expression)||((this.expression!= null)&&this.expression.equals(rhs.expression))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.value == rhs.value)||((this.value!= null)&&this.value.equals(rhs.value))))&&((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArguments.java new file mode 100644 index 0000000..dc210f1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArguments.java @@ -0,0 +1,110 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `setFunctionBreakpoints` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "breakpoints" +}) +@Generated("jsonschema2pojo") +public class SetFunctionBreakpointsArguments { + + /** + * The function names of the breakpoints. + * (Required) + * + */ + @JsonProperty("breakpoints") + @JsonPropertyDescription("The function names of the breakpoints.") + private List breakpoints = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The function names of the breakpoints. + * (Required) + * + */ + @JsonProperty("breakpoints") + public List getBreakpoints() { + return breakpoints; + } + + /** + * The function names of the breakpoints. + * (Required) + * + */ + @JsonProperty("breakpoints") + public void setBreakpoints(List breakpoints) { + this.breakpoints = breakpoints; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SetFunctionBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("breakpoints"); + sb.append('='); + sb.append(((this.breakpoints == null)?"":this.breakpoints)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.breakpoints == null)? 0 :this.breakpoints.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SetFunctionBreakpointsArguments) == false) { + return false; + } + SetFunctionBreakpointsArguments rhs = ((SetFunctionBreakpointsArguments) other); + return (((this.breakpoints == rhs.breakpoints)||((this.breakpoints!= null)&&this.breakpoints.equals(rhs.breakpoints)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArguments.java new file mode 100644 index 0000000..1112cf1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArguments.java @@ -0,0 +1,110 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `setInstructionBreakpoints` request + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "breakpoints" +}) +@Generated("jsonschema2pojo") +public class SetInstructionBreakpointsArguments { + + /** + * The instruction references of the breakpoints + * (Required) + * + */ + @JsonProperty("breakpoints") + @JsonPropertyDescription("The instruction references of the breakpoints") + private List breakpoints = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The instruction references of the breakpoints + * (Required) + * + */ + @JsonProperty("breakpoints") + public List getBreakpoints() { + return breakpoints; + } + + /** + * The instruction references of the breakpoints + * (Required) + * + */ + @JsonProperty("breakpoints") + public void setBreakpoints(List breakpoints) { + this.breakpoints = breakpoints; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SetInstructionBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("breakpoints"); + sb.append('='); + sb.append(((this.breakpoints == null)?"":this.breakpoints)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.breakpoints == null)? 0 :this.breakpoints.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SetInstructionBreakpointsArguments) == false) { + return false; + } + SetInstructionBreakpointsArguments rhs = ((SetInstructionBreakpointsArguments) other); + return (((this.breakpoints == rhs.breakpoints)||((this.breakpoints!= null)&&this.breakpoints.equals(rhs.breakpoints)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArguments.java new file mode 100644 index 0000000..cd64b29 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArguments.java @@ -0,0 +1,207 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `setVariable` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "variablesReference", + "name", + "value", + "format" +}) +@Generated("jsonschema2pojo") +public class SetVariableArguments { + + /** + * The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + @JsonPropertyDescription("The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") + private Integer variablesReference; + /** + * The name of the variable in the container. + * (Required) + * + */ + @JsonProperty("name") + @JsonPropertyDescription("The name of the variable in the container.") + private String name; + /** + * The value of the variable. + * (Required) + * + */ + @JsonProperty("value") + @JsonPropertyDescription("The value of the variable.") + private String value; + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + @JsonPropertyDescription("Provides formatting information for a value.") + private ValueFormat format; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + public Integer getVariablesReference() { + return variablesReference; + } + + /** + * The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + public void setVariablesReference(Integer variablesReference) { + this.variablesReference = variablesReference; + } + + /** + * The name of the variable in the container. + * (Required) + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * The name of the variable in the container. + * (Required) + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * The value of the variable. + * (Required) + * + */ + @JsonProperty("value") + public String getValue() { + return value; + } + + /** + * The value of the variable. + * (Required) + * + */ + @JsonProperty("value") + public void setValue(String value) { + this.value = value; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + public ValueFormat getFormat() { + return format; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + public void setFormat(ValueFormat format) { + this.format = format; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SetVariableArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("variablesReference"); + sb.append('='); + sb.append(((this.variablesReference == null)?"":this.variablesReference)); + sb.append(','); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("value"); + sb.append('='); + sb.append(((this.value == null)?"":this.value)); + sb.append(','); + sb.append("format"); + sb.append('='); + sb.append(((this.format == null)?"":this.format)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); + result = ((result* 31)+((this.value == null)? 0 :this.value.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SetVariableArguments) == false) { + return false; + } + SetVariableArguments rhs = ((SetVariableArguments) other); + return ((((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference))))&&((this.value == rhs.value)||((this.value!= null)&&this.value.equals(rhs.value)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java new file mode 100644 index 0000000..1e3bce7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java @@ -0,0 +1,393 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "name", + "path", + "sourceReference", + "presentationHint", + "origin", + "sources", + "adapterData", + "checksums" +}) +@Generated("jsonschema2pojo") +public class Source { + + /** + * The short name of the source. Every source returned from the debug adapter has a name. + * When sending a source to the debug adapter this name is optional. + * + */ + @JsonProperty("name") + @JsonPropertyDescription("The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional.") + private String name; + /** + * The path of the source to be shown in the UI. + * It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0). + * + */ + @JsonProperty("path") + @JsonPropertyDescription("The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0).") + private String path; + /** + * If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified). + * Since a `sourceReference` is only valid for a session, it can not be used to persist a source. + * The value should be less than or equal to 2147483647 (2^31-1). + * + */ + @JsonProperty("sourceReference") + @JsonPropertyDescription("If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1).") + private Integer sourceReference; + /** + * A hint for how to present the source in the UI. + * A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. + * + */ + @JsonProperty("presentationHint") + @JsonPropertyDescription("A hint for how to present the source in the UI.\nA value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.") + private PresentationHint presentationHint; + /** + * The origin of this source. For example, 'internal module', 'inlined content from source map', etc. + * + */ + @JsonProperty("origin") + @JsonPropertyDescription("The origin of this source. For example, 'internal module', 'inlined content from source map', etc.") + private String origin; + /** + * A list of sources that are related to this source. These may be the source that generated this source. + * + */ + @JsonProperty("sources") + @JsonPropertyDescription("A list of sources that are related to this source. These may be the source that generated this source.") + private List sources = new ArrayList(); + /** + * Additional data that a debug adapter might want to loop through the client. + * The client should leave the data intact and persist it across sessions. The client should not interpret the data. + * + */ + @JsonProperty("adapterData") + @JsonPropertyDescription("Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data.") + private Object adapterData; + /** + * The checksums associated with this file. + * + */ + @JsonProperty("checksums") + @JsonPropertyDescription("The checksums associated with this file.") + private List checksums = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The short name of the source. Every source returned from the debug adapter has a name. + * When sending a source to the debug adapter this name is optional. + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * The short name of the source. Every source returned from the debug adapter has a name. + * When sending a source to the debug adapter this name is optional. + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * The path of the source to be shown in the UI. + * It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0). + * + */ + @JsonProperty("path") + public String getPath() { + return path; + } + + /** + * The path of the source to be shown in the UI. + * It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0). + * + */ + @JsonProperty("path") + public void setPath(String path) { + this.path = path; + } + + /** + * If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified). + * Since a `sourceReference` is only valid for a session, it can not be used to persist a source. + * The value should be less than or equal to 2147483647 (2^31-1). + * + */ + @JsonProperty("sourceReference") + public Integer getSourceReference() { + return sourceReference; + } + + /** + * If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified). + * Since a `sourceReference` is only valid for a session, it can not be used to persist a source. + * The value should be less than or equal to 2147483647 (2^31-1). + * + */ + @JsonProperty("sourceReference") + public void setSourceReference(Integer sourceReference) { + this.sourceReference = sourceReference; + } + + /** + * A hint for how to present the source in the UI. + * A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. + * + */ + @JsonProperty("presentationHint") + public PresentationHint getPresentationHint() { + return presentationHint; + } + + /** + * A hint for how to present the source in the UI. + * A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. + * + */ + @JsonProperty("presentationHint") + public void setPresentationHint(PresentationHint presentationHint) { + this.presentationHint = presentationHint; + } + + /** + * The origin of this source. For example, 'internal module', 'inlined content from source map', etc. + * + */ + @JsonProperty("origin") + public String getOrigin() { + return origin; + } + + /** + * The origin of this source. For example, 'internal module', 'inlined content from source map', etc. + * + */ + @JsonProperty("origin") + public void setOrigin(String origin) { + this.origin = origin; + } + + /** + * A list of sources that are related to this source. These may be the source that generated this source. + * + */ + @JsonProperty("sources") + public List getSources() { + return sources; + } + + /** + * A list of sources that are related to this source. These may be the source that generated this source. + * + */ + @JsonProperty("sources") + public void setSources(List sources) { + this.sources = sources; + } + + /** + * Additional data that a debug adapter might want to loop through the client. + * The client should leave the data intact and persist it across sessions. The client should not interpret the data. + * + */ + @JsonProperty("adapterData") + public Object getAdapterData() { + return adapterData; + } + + /** + * Additional data that a debug adapter might want to loop through the client. + * The client should leave the data intact and persist it across sessions. The client should not interpret the data. + * + */ + @JsonProperty("adapterData") + public void setAdapterData(Object adapterData) { + this.adapterData = adapterData; + } + + /** + * The checksums associated with this file. + * + */ + @JsonProperty("checksums") + public List getChecksums() { + return checksums; + } + + /** + * The checksums associated with this file. + * + */ + @JsonProperty("checksums") + public void setChecksums(List checksums) { + this.checksums = checksums; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Source.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("path"); + sb.append('='); + sb.append(((this.path == null)?"":this.path)); + sb.append(','); + sb.append("sourceReference"); + sb.append('='); + sb.append(((this.sourceReference == null)?"":this.sourceReference)); + sb.append(','); + sb.append("presentationHint"); + sb.append('='); + sb.append(((this.presentationHint == null)?"":this.presentationHint)); + sb.append(','); + sb.append("origin"); + sb.append('='); + sb.append(((this.origin == null)?"":this.origin)); + sb.append(','); + sb.append("sources"); + sb.append('='); + sb.append(((this.sources == null)?"":this.sources)); + sb.append(','); + sb.append("adapterData"); + sb.append('='); + sb.append(((this.adapterData == null)?"":this.adapterData)); + sb.append(','); + sb.append("checksums"); + sb.append('='); + sb.append(((this.checksums == null)?"":this.checksums)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.sourceReference == null)? 0 :this.sourceReference.hashCode())); + result = ((result* 31)+((this.checksums == null)? 0 :this.checksums.hashCode())); + result = ((result* 31)+((this.path == null)? 0 :this.path.hashCode())); + result = ((result* 31)+((this.sources == null)? 0 :this.sources.hashCode())); + result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); + result = ((result* 31)+((this.adapterData == null)? 0 :this.adapterData.hashCode())); + result = ((result* 31)+((this.origin == null)? 0 :this.origin.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Source) == false) { + return false; + } + Source rhs = ((Source) other); + return ((((((((((this.sourceReference == rhs.sourceReference)||((this.sourceReference!= null)&&this.sourceReference.equals(rhs.sourceReference)))&&((this.checksums == rhs.checksums)||((this.checksums!= null)&&this.checksums.equals(rhs.checksums))))&&((this.path == rhs.path)||((this.path!= null)&&this.path.equals(rhs.path))))&&((this.sources == rhs.sources)||((this.sources!= null)&&this.sources.equals(rhs.sources))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.adapterData == rhs.adapterData)||((this.adapterData!= null)&&this.adapterData.equals(rhs.adapterData))))&&((this.origin == rhs.origin)||((this.origin!= null)&&this.origin.equals(rhs.origin))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + + + /** + * A hint for how to present the source in the UI. + * A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. + * + */ + @Generated("jsonschema2pojo") + public enum PresentationHint { + + NORMAL("normal"), + EMPHASIZE("emphasize"), + DEEMPHASIZE("deemphasize"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (PresentationHint c: values()) { + CONSTANTS.put(c.value, c); + } + } + + PresentationHint(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static PresentationHint fromValue(String value) { + PresentationHint constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArguments.java new file mode 100644 index 0000000..0d280c5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArguments.java @@ -0,0 +1,145 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `source` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "source", + "sourceReference" +}) +@Generated("jsonschema2pojo") +public class SourceArguments { + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source source; + /** + * The reference to the source. This is the same as `source.sourceReference`. + * This is provided for backward compatibility since old clients do not understand the `source` attribute. + * (Required) + * + */ + @JsonProperty("sourceReference") + @JsonPropertyDescription("The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute.") + private Integer sourceReference; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + public Source getSource() { + return source; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + public void setSource(Source source) { + this.source = source; + } + + /** + * The reference to the source. This is the same as `source.sourceReference`. + * This is provided for backward compatibility since old clients do not understand the `source` attribute. + * (Required) + * + */ + @JsonProperty("sourceReference") + public Integer getSourceReference() { + return sourceReference; + } + + /** + * The reference to the source. This is the same as `source.sourceReference`. + * This is provided for backward compatibility since old clients do not understand the `source` attribute. + * (Required) + * + */ + @JsonProperty("sourceReference") + public void setSourceReference(Integer sourceReference) { + this.sourceReference = sourceReference; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SourceArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("source"); + sb.append('='); + sb.append(((this.source == null)?"":this.source)); + sb.append(','); + sb.append("sourceReference"); + sb.append('='); + sb.append(((this.sourceReference == null)?"":this.sourceReference)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.sourceReference == null)? 0 :this.sourceReference.hashCode())); + result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SourceArguments) == false) { + return false; + } + SourceArguments rhs = ((SourceArguments) other); + return ((((this.sourceReference == rhs.sourceReference)||((this.sourceReference!= null)&&this.sourceReference.equals(rhs.sourceReference)))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java new file mode 100644 index 0000000..6c76c02 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java @@ -0,0 +1,253 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "line", + "column", + "condition", + "hitCondition", + "logMessage" +}) +@Generated("jsonschema2pojo") +public class SourceBreakpoint { + + /** + * The source line of the breakpoint or logpoint. + * (Required) + * + */ + @JsonProperty("line") + @JsonPropertyDescription("The source line of the breakpoint or logpoint.") + private Integer line; + /** + * Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer column; + /** + * The expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + @JsonPropertyDescription("The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.") + private String condition; + /** + * The expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met. + * + */ + @JsonProperty("hitCondition") + @JsonPropertyDescription("The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met.") + private String hitCondition; + /** + * If this attribute exists and is non-empty, the debug adapter must not 'break' (stop) + * but log the message instead. Expressions within `{}` are interpolated. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true. + * If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met. + * + */ + @JsonProperty("logMessage") + @JsonPropertyDescription("If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met.") + private String logMessage; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The source line of the breakpoint or logpoint. + * (Required) + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * The source line of the breakpoint or logpoint. + * (Required) + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * The expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + public String getCondition() { + return condition; + } + + /** + * The expression for conditional breakpoints. + * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + * + */ + @JsonProperty("condition") + public void setCondition(String condition) { + this.condition = condition; + } + + /** + * The expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met. + * + */ + @JsonProperty("hitCondition") + public String getHitCondition() { + return hitCondition; + } + + /** + * The expression that controls how many hits of the breakpoint are ignored. + * The debug adapter is expected to interpret the expression as needed. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + * If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met. + * + */ + @JsonProperty("hitCondition") + public void setHitCondition(String hitCondition) { + this.hitCondition = hitCondition; + } + + /** + * If this attribute exists and is non-empty, the debug adapter must not 'break' (stop) + * but log the message instead. Expressions within `{}` are interpolated. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true. + * If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met. + * + */ + @JsonProperty("logMessage") + public String getLogMessage() { + return logMessage; + } + + /** + * If this attribute exists and is non-empty, the debug adapter must not 'break' (stop) + * but log the message instead. Expressions within `{}` are interpolated. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true. + * If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met. + * + */ + @JsonProperty("logMessage") + public void setLogMessage(String logMessage) { + this.logMessage = logMessage; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SourceBreakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("condition"); + sb.append('='); + sb.append(((this.condition == null)?"":this.condition)); + sb.append(','); + sb.append("hitCondition"); + sb.append('='); + sb.append(((this.hitCondition == null)?"":this.hitCondition)); + sb.append(','); + sb.append("logMessage"); + sb.append('='); + sb.append(((this.logMessage == null)?"":this.logMessage)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); + result = ((result* 31)+((this.hitCondition == null)? 0 :this.hitCondition.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + result = ((result* 31)+((this.logMessage == null)? 0 :this.logMessage.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SourceBreakpoint) == false) { + return false; + } + SourceBreakpoint rhs = ((SourceBreakpoint) other); + return (((((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition))))&&((this.hitCondition == rhs.hitCondition)||((this.hitCondition!= null)&&this.hitCondition.equals(rhs.hitCondition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.logMessage == rhs.logMessage)||((this.logMessage!= null)&&this.logMessage.equals(rhs.logMessage)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java new file mode 100644 index 0000000..ad36120 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java @@ -0,0 +1,486 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * A Stackframe contains the source location. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "name", + "source", + "line", + "column", + "endLine", + "endColumn", + "canRestart", + "instructionPointerReference", + "moduleId", + "presentationHint" +}) +@Generated("jsonschema2pojo") +public class StackFrame { + + /** + * An identifier for the stack frame. It must be unique across all threads. + * This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame. + * (Required) + * + */ + @JsonProperty("id") + @JsonPropertyDescription("An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame.") + private Integer id; + /** + * The name of the stack frame, typically a method name. + * (Required) + * + */ + @JsonProperty("name") + @JsonPropertyDescription("The name of the stack frame, typically a method name.") + private String name; + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Source source; + /** + * The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client. + * (Required) + * + */ + @JsonProperty("line") + @JsonPropertyDescription("The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client.") + private Integer line; + /** + * Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client. + * (Required) + * + */ + @JsonProperty("column") + @JsonPropertyDescription("Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client.") + private Integer column; + /** + * The end line of the range covered by the stack frame. + * + */ + @JsonProperty("endLine") + @JsonPropertyDescription("The end line of the range covered by the stack frame.") + private Integer endLine; + /** + * End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + @JsonPropertyDescription("End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer endColumn; + /** + * Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent. + * + */ + @JsonProperty("canRestart") + @JsonPropertyDescription("Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent.") + private Boolean canRestart; + /** + * A memory reference for the current instruction pointer in this frame. + * + */ + @JsonProperty("instructionPointerReference") + @JsonPropertyDescription("A memory reference for the current instruction pointer in this frame.") + private String instructionPointerReference; + /** + * The module associated with this frame, if any. + * + */ + @JsonProperty("moduleId") + @JsonPropertyDescription("The module associated with this frame, if any.") + private Object moduleId; + /** + * A hint for how to present this frame in the UI. + * A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. + * + */ + @JsonProperty("presentationHint") + @JsonPropertyDescription("A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way.") + private PresentationHint presentationHint; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * An identifier for the stack frame. It must be unique across all threads. + * This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame. + * (Required) + * + */ + @JsonProperty("id") + public Integer getId() { + return id; + } + + /** + * An identifier for the stack frame. It must be unique across all threads. + * This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame. + * (Required) + * + */ + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * The name of the stack frame, typically a method name. + * (Required) + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * The name of the stack frame, typically a method name. + * (Required) + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + public Source getSource() { + return source; + } + + /** + * A `Source` is a descriptor for source code. + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. + * + */ + @JsonProperty("source") + public void setSource(Source source) { + this.source = source; + } + + /** + * The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client. + * (Required) + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client. + * (Required) + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client. + * (Required) + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client. + * (Required) + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * The end line of the range covered by the stack frame. + * + */ + @JsonProperty("endLine") + public Integer getEndLine() { + return endLine; + } + + /** + * The end line of the range covered by the stack frame. + * + */ + @JsonProperty("endLine") + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + /** + * End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + public Integer getEndColumn() { + return endColumn; + } + + /** + * End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + /** + * Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent. + * + */ + @JsonProperty("canRestart") + public Boolean getCanRestart() { + return canRestart; + } + + /** + * Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent. + * + */ + @JsonProperty("canRestart") + public void setCanRestart(Boolean canRestart) { + this.canRestart = canRestart; + } + + /** + * A memory reference for the current instruction pointer in this frame. + * + */ + @JsonProperty("instructionPointerReference") + public String getInstructionPointerReference() { + return instructionPointerReference; + } + + /** + * A memory reference for the current instruction pointer in this frame. + * + */ + @JsonProperty("instructionPointerReference") + public void setInstructionPointerReference(String instructionPointerReference) { + this.instructionPointerReference = instructionPointerReference; + } + + /** + * The module associated with this frame, if any. + * + */ + @JsonProperty("moduleId") + public Object getModuleId() { + return moduleId; + } + + /** + * The module associated with this frame, if any. + * + */ + @JsonProperty("moduleId") + public void setModuleId(Object moduleId) { + this.moduleId = moduleId; + } + + /** + * A hint for how to present this frame in the UI. + * A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. + * + */ + @JsonProperty("presentationHint") + public PresentationHint getPresentationHint() { + return presentationHint; + } + + /** + * A hint for how to present this frame in the UI. + * A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. + * + */ + @JsonProperty("presentationHint") + public void setPresentationHint(PresentationHint presentationHint) { + this.presentationHint = presentationHint; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StackFrame.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("source"); + sb.append('='); + sb.append(((this.source == null)?"":this.source)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("canRestart"); + sb.append('='); + sb.append(((this.canRestart == null)?"":this.canRestart)); + sb.append(','); + sb.append("instructionPointerReference"); + sb.append('='); + sb.append(((this.instructionPointerReference == null)?"":this.instructionPointerReference)); + sb.append(','); + sb.append("moduleId"); + sb.append('='); + sb.append(((this.moduleId == null)?"":this.moduleId)); + sb.append(','); + sb.append("presentationHint"); + sb.append('='); + sb.append(((this.presentationHint == null)?"":this.presentationHint)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + result = ((result* 31)+((this.canRestart == null)? 0 :this.canRestart.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.moduleId == null)? 0 :this.moduleId.hashCode())); + result = ((result* 31)+((this.instructionPointerReference == null)? 0 :this.instructionPointerReference.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StackFrame) == false) { + return false; + } + StackFrame rhs = ((StackFrame) other); + return (((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.canRestart == rhs.canRestart)||((this.canRestart!= null)&&this.canRestart.equals(rhs.canRestart))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.moduleId == rhs.moduleId)||((this.moduleId!= null)&&this.moduleId.equals(rhs.moduleId))))&&((this.instructionPointerReference == rhs.instructionPointerReference)||((this.instructionPointerReference!= null)&&this.instructionPointerReference.equals(rhs.instructionPointerReference)))); + } + + + /** + * A hint for how to present this frame in the UI. + * A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. + * + */ + @Generated("jsonschema2pojo") + public enum PresentationHint { + + NORMAL("normal"), + LABEL("label"), + SUBTLE("subtle"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (PresentationHint c: values()) { + CONSTANTS.put(c.value, c); + } + } + + PresentationHint(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static PresentationHint fromValue(String value) { + PresentationHint constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArguments.java new file mode 100644 index 0000000..8335ddf --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArguments.java @@ -0,0 +1,188 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `stackTrace` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId", + "startFrame", + "levels", + "format" +}) +@Generated("jsonschema2pojo") +public class StackTraceArguments { + + /** + * Retrieve the stacktrace for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Retrieve the stacktrace for this thread.") + private Integer threadId; + /** + * The index of the first frame to return; if omitted frames start at 0. + * + */ + @JsonProperty("startFrame") + @JsonPropertyDescription("The index of the first frame to return; if omitted frames start at 0.") + private Integer startFrame; + /** + * The maximum number of frames to return. If levels is not specified or 0, all frames are returned. + * + */ + @JsonProperty("levels") + @JsonPropertyDescription("The maximum number of frames to return. If levels is not specified or 0, all frames are returned.") + private Integer levels; + @JsonProperty("format") + private Object format; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Retrieve the stacktrace for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Retrieve the stacktrace for this thread. + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + /** + * The index of the first frame to return; if omitted frames start at 0. + * + */ + @JsonProperty("startFrame") + public Integer getStartFrame() { + return startFrame; + } + + /** + * The index of the first frame to return; if omitted frames start at 0. + * + */ + @JsonProperty("startFrame") + public void setStartFrame(Integer startFrame) { + this.startFrame = startFrame; + } + + /** + * The maximum number of frames to return. If levels is not specified or 0, all frames are returned. + * + */ + @JsonProperty("levels") + public Integer getLevels() { + return levels; + } + + /** + * The maximum number of frames to return. If levels is not specified or 0, all frames are returned. + * + */ + @JsonProperty("levels") + public void setLevels(Integer levels) { + this.levels = levels; + } + + @JsonProperty("format") + public Object getFormat() { + return format; + } + + @JsonProperty("format") + public void setFormat(Object format) { + this.format = format; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StackTraceArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("startFrame"); + sb.append('='); + sb.append(((this.startFrame == null)?"":this.startFrame)); + sb.append(','); + sb.append("levels"); + sb.append('='); + sb.append(((this.levels == null)?"":this.levels)); + sb.append(','); + sb.append("format"); + sb.append('='); + sb.append(((this.format == null)?"":this.format)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); + result = ((result* 31)+((this.startFrame == null)? 0 :this.startFrame.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.levels == null)? 0 :this.levels.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StackTraceArguments) == false) { + return false; + } + StackTraceArguments rhs = ((StackTraceArguments) other); + return ((((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.startFrame == rhs.startFrame)||((this.startFrame!= null)&&this.startFrame.equals(rhs.startFrame))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.levels == rhs.levels)||((this.levels!= null)&&this.levels.equals(rhs.levels)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArguments.java new file mode 100644 index 0000000..24543e9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArguments.java @@ -0,0 +1,190 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * Arguments for `startDebugging` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "configuration", + "request" +}) +@Generated("jsonschema2pojo") +public class StartDebuggingRequestArguments { + + /** + * Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). + * (Required) + * + */ + @JsonProperty("configuration") + @JsonPropertyDescription("Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables').") + private Configuration configuration; + /** + * Indicates whether the new debug session should be started with a `launch` or `attach` request. + * (Required) + * + */ + @JsonProperty("request") + @JsonPropertyDescription("Indicates whether the new debug session should be started with a `launch` or `attach` request.") + private Request request; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). + * (Required) + * + */ + @JsonProperty("configuration") + public Configuration getConfiguration() { + return configuration; + } + + /** + * Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). + * (Required) + * + */ + @JsonProperty("configuration") + public void setConfiguration(Configuration configuration) { + this.configuration = configuration; + } + + /** + * Indicates whether the new debug session should be started with a `launch` or `attach` request. + * (Required) + * + */ + @JsonProperty("request") + public Request getRequest() { + return request; + } + + /** + * Indicates whether the new debug session should be started with a `launch` or `attach` request. + * (Required) + * + */ + @JsonProperty("request") + public void setRequest(Request request) { + this.request = request; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StartDebuggingRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("configuration"); + sb.append('='); + sb.append(((this.configuration == null)?"":this.configuration)); + sb.append(','); + sb.append("request"); + sb.append('='); + sb.append(((this.request == null)?"":this.request)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.configuration == null)? 0 :this.configuration.hashCode())); + result = ((result* 31)+((this.request == null)? 0 :this.request.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StartDebuggingRequestArguments) == false) { + return false; + } + StartDebuggingRequestArguments rhs = ((StartDebuggingRequestArguments) other); + return ((((this.configuration == rhs.configuration)||((this.configuration!= null)&&this.configuration.equals(rhs.configuration)))&&((this.request == rhs.request)||((this.request!= null)&&this.request.equals(rhs.request))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + + + /** + * Indicates whether the new debug session should be started with a `launch` or `attach` request. + * + */ + @Generated("jsonschema2pojo") + public enum Request { + + LAUNCH("launch"), + ATTACH("attach"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Request c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Request(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static Request fromValue(String value) { + Request constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArguments.java new file mode 100644 index 0000000..ee241ee --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArguments.java @@ -0,0 +1,170 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `stepBack` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId", + "singleThread", + "granularity" +}) +@Generated("jsonschema2pojo") +public class StepBackArguments { + + /** + * Specifies the thread for which to resume execution for one step backwards (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Specifies the thread for which to resume execution for one step backwards (of the given granularity).") + private Integer threadId; + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + @JsonPropertyDescription("If this flag is true, all other suspended threads are not resumed.") + private Boolean singleThread; + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") + private NextArguments.SteppingGranularity granularity; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Specifies the thread for which to resume execution for one step backwards (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Specifies the thread for which to resume execution for one step backwards (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { + return singleThread; + } + + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + public void setSingleThread(Boolean singleThread) { + this.singleThread = singleThread; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + public NextArguments.SteppingGranularity getGranularity() { + return granularity; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + public void setGranularity(NextArguments.SteppingGranularity granularity) { + this.granularity = granularity; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StepBackArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("singleThread"); + sb.append('='); + sb.append(((this.singleThread == null)?"":this.singleThread)); + sb.append(','); + sb.append("granularity"); + sb.append('='); + sb.append(((this.granularity == null)?"":this.granularity)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); + result = ((result* 31)+((this.granularity == null)? 0 :this.granularity.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StepBackArguments) == false) { + return false; + } + StepBackArguments rhs = ((StepBackArguments) other); + return (((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.granularity == rhs.granularity)||((this.granularity!= null)&&this.granularity.equals(rhs.granularity)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArguments.java new file mode 100644 index 0000000..38a9e06 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArguments.java @@ -0,0 +1,201 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `stepIn` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId", + "singleThread", + "targetId", + "granularity" +}) +@Generated("jsonschema2pojo") +public class StepInArguments { + + /** + * Specifies the thread for which to resume execution for one step-into (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Specifies the thread for which to resume execution for one step-into (of the given granularity).") + private Integer threadId; + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + @JsonPropertyDescription("If this flag is true, all other suspended threads are not resumed.") + private Boolean singleThread; + /** + * Id of the target to step into. + * + */ + @JsonProperty("targetId") + @JsonPropertyDescription("Id of the target to step into.") + private Integer targetId; + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") + private NextArguments.SteppingGranularity granularity; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Specifies the thread for which to resume execution for one step-into (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Specifies the thread for which to resume execution for one step-into (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { + return singleThread; + } + + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + public void setSingleThread(Boolean singleThread) { + this.singleThread = singleThread; + } + + /** + * Id of the target to step into. + * + */ + @JsonProperty("targetId") + public Integer getTargetId() { + return targetId; + } + + /** + * Id of the target to step into. + * + */ + @JsonProperty("targetId") + public void setTargetId(Integer targetId) { + this.targetId = targetId; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + public NextArguments.SteppingGranularity getGranularity() { + return granularity; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + public void setGranularity(NextArguments.SteppingGranularity granularity) { + this.granularity = granularity; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StepInArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("singleThread"); + sb.append('='); + sb.append(((this.singleThread == null)?"":this.singleThread)); + sb.append(','); + sb.append("targetId"); + sb.append('='); + sb.append(((this.targetId == null)?"":this.targetId)); + sb.append(','); + sb.append("granularity"); + sb.append('='); + sb.append(((this.granularity == null)?"":this.granularity)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.targetId == null)? 0 :this.targetId.hashCode())); + result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); + result = ((result* 31)+((this.granularity == null)? 0 :this.granularity.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StepInArguments) == false) { + return false; + } + StepInArguments rhs = ((StepInArguments) other); + return ((((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.targetId == rhs.targetId)||((this.targetId!= null)&&this.targetId.equals(rhs.targetId))))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.granularity == rhs.granularity)||((this.granularity!= null)&&this.granularity.equals(rhs.granularity)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTarget.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTarget.java new file mode 100644 index 0000000..2be90c7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTarget.java @@ -0,0 +1,266 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "label", + "line", + "column", + "endLine", + "endColumn" +}) +@Generated("jsonschema2pojo") +public class StepInTarget { + + /** + * Unique identifier for a step-in target. + * (Required) + * + */ + @JsonProperty("id") + @JsonPropertyDescription("Unique identifier for a step-in target.") + private Integer id; + /** + * The name of the step-in target (shown in the UI). + * (Required) + * + */ + @JsonProperty("label") + @JsonPropertyDescription("The name of the step-in target (shown in the UI).") + private String label; + /** + * The line of the step-in target. + * + */ + @JsonProperty("line") + @JsonPropertyDescription("The line of the step-in target.") + private Integer line; + /** + * Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + @JsonPropertyDescription("Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer column; + /** + * The end line of the range covered by the step-in target. + * + */ + @JsonProperty("endLine") + @JsonPropertyDescription("The end line of the range covered by the step-in target.") + private Integer endLine; + /** + * End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + @JsonPropertyDescription("End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") + private Integer endColumn; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Unique identifier for a step-in target. + * (Required) + * + */ + @JsonProperty("id") + public Integer getId() { + return id; + } + + /** + * Unique identifier for a step-in target. + * (Required) + * + */ + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * The name of the step-in target (shown in the UI). + * (Required) + * + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * The name of the step-in target (shown in the UI). + * (Required) + * + */ + @JsonProperty("label") + public void setLabel(String label) { + this.label = label; + } + + /** + * The line of the step-in target. + * + */ + @JsonProperty("line") + public Integer getLine() { + return line; + } + + /** + * The line of the step-in target. + * + */ + @JsonProperty("line") + public void setLine(Integer line) { + this.line = line; + } + + /** + * Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public Integer getColumn() { + return column; + } + + /** + * Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("column") + public void setColumn(Integer column) { + this.column = column; + } + + /** + * The end line of the range covered by the step-in target. + * + */ + @JsonProperty("endLine") + public Integer getEndLine() { + return endLine; + } + + /** + * The end line of the range covered by the step-in target. + * + */ + @JsonProperty("endLine") + public void setEndLine(Integer endLine) { + this.endLine = endLine; + } + + /** + * End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + public Integer getEndColumn() { + return endColumn; + } + + /** + * End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * + */ + @JsonProperty("endColumn") + public void setEndColumn(Integer endColumn) { + this.endColumn = endColumn; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StepInTarget.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("label"); + sb.append('='); + sb.append(((this.label == null)?"":this.label)); + sb.append(','); + sb.append("line"); + sb.append('='); + sb.append(((this.line == null)?"":this.line)); + sb.append(','); + sb.append("column"); + sb.append('='); + sb.append(((this.column == null)?"":this.column)); + sb.append(','); + sb.append("endLine"); + sb.append('='); + sb.append(((this.endLine == null)?"":this.endLine)); + sb.append(','); + sb.append("endColumn"); + sb.append('='); + sb.append(((this.endColumn == null)?"":this.endColumn)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); + result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); + result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); + result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StepInTarget) == false) { + return false; + } + StepInTarget rhs = ((StepInTarget) other); + return ((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArguments.java new file mode 100644 index 0000000..9d7fa9b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArguments.java @@ -0,0 +1,108 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `stepInTargets` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "frameId" +}) +@Generated("jsonschema2pojo") +public class StepInTargetsArguments { + + /** + * The stack frame for which to retrieve the possible step-in targets. + * (Required) + * + */ + @JsonProperty("frameId") + @JsonPropertyDescription("The stack frame for which to retrieve the possible step-in targets.") + private Integer frameId; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The stack frame for which to retrieve the possible step-in targets. + * (Required) + * + */ + @JsonProperty("frameId") + public Integer getFrameId() { + return frameId; + } + + /** + * The stack frame for which to retrieve the possible step-in targets. + * (Required) + * + */ + @JsonProperty("frameId") + public void setFrameId(Integer frameId) { + this.frameId = frameId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StepInTargetsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("frameId"); + sb.append('='); + sb.append(((this.frameId == null)?"":this.frameId)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StepInTargetsArguments) == false) { + return false; + } + StepInTargetsArguments rhs = ((StepInTargetsArguments) other); + return (((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArguments.java new file mode 100644 index 0000000..b2d9277 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArguments.java @@ -0,0 +1,170 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `stepOut` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadId", + "singleThread", + "granularity" +}) +@Generated("jsonschema2pojo") +public class StepOutArguments { + + /** + * Specifies the thread for which to resume execution for one step-out (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + @JsonPropertyDescription("Specifies the thread for which to resume execution for one step-out (of the given granularity).") + private Integer threadId; + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + @JsonPropertyDescription("If this flag is true, all other suspended threads are not resumed.") + private Boolean singleThread; + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") + private NextArguments.SteppingGranularity granularity; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Specifies the thread for which to resume execution for one step-out (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + public Integer getThreadId() { + return threadId; + } + + /** + * Specifies the thread for which to resume execution for one step-out (of the given granularity). + * (Required) + * + */ + @JsonProperty("threadId") + public void setThreadId(Integer threadId) { + this.threadId = threadId; + } + + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { + return singleThread; + } + + /** + * If this flag is true, all other suspended threads are not resumed. + * + */ + @JsonProperty("singleThread") + public void setSingleThread(Boolean singleThread) { + this.singleThread = singleThread; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + public NextArguments.SteppingGranularity getGranularity() { + return granularity; + } + + /** + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + * + */ + @JsonProperty("granularity") + public void setGranularity(NextArguments.SteppingGranularity granularity) { + this.granularity = granularity; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(StepOutArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadId"); + sb.append('='); + sb.append(((this.threadId == null)?"":this.threadId)); + sb.append(','); + sb.append("singleThread"); + sb.append('='); + sb.append(((this.singleThread == null)?"":this.singleThread)); + sb.append(','); + sb.append("granularity"); + sb.append('='); + sb.append(((this.granularity == null)?"":this.granularity)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); + result = ((result* 31)+((this.granularity == null)? 0 :this.granularity.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof StepOutArguments) == false) { + return false; + } + StepOutArguments rhs = ((StepOutArguments) other); + return (((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.granularity == rhs.granularity)||((this.granularity!= null)&&this.granularity.equals(rhs.granularity)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArguments.java new file mode 100644 index 0000000..fd0f804 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArguments.java @@ -0,0 +1,105 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `terminate` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "restart" +}) +@Generated("jsonschema2pojo") +public class TerminateArguments { + + /** + * A value of true indicates that this `terminate` request is part of a restart sequence. + * + */ + @JsonProperty("restart") + @JsonPropertyDescription("A value of true indicates that this `terminate` request is part of a restart sequence.") + private Boolean restart; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * A value of true indicates that this `terminate` request is part of a restart sequence. + * + */ + @JsonProperty("restart") + public Boolean getRestart() { + return restart; + } + + /** + * A value of true indicates that this `terminate` request is part of a restart sequence. + * + */ + @JsonProperty("restart") + public void setRestart(Boolean restart) { + this.restart = restart; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(TerminateArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("restart"); + sb.append('='); + sb.append(((this.restart == null)?"":this.restart)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.restart == null)? 0 :this.restart.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof TerminateArguments) == false) { + return false; + } + TerminateArguments rhs = ((TerminateArguments) other); + return (((this.restart == rhs.restart)||((this.restart!= null)&&this.restart.equals(rhs.restart)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArguments.java new file mode 100644 index 0000000..58605b8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArguments.java @@ -0,0 +1,107 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `terminateThreads` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "threadIds" +}) +@Generated("jsonschema2pojo") +public class TerminateThreadsArguments { + + /** + * Ids of threads to be terminated. + * + */ + @JsonProperty("threadIds") + @JsonPropertyDescription("Ids of threads to be terminated.") + private List threadIds = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Ids of threads to be terminated. + * + */ + @JsonProperty("threadIds") + public List getThreadIds() { + return threadIds; + } + + /** + * Ids of threads to be terminated. + * + */ + @JsonProperty("threadIds") + public void setThreadIds(List threadIds) { + this.threadIds = threadIds; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(TerminateThreadsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("threadIds"); + sb.append('='); + sb.append(((this.threadIds == null)?"":this.threadIds)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.threadIds == null)? 0 :this.threadIds.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof TerminateThreadsArguments) == false) { + return false; + } + TerminateThreadsArguments rhs = ((TerminateThreadsArguments) other); + return (((this.threadIds == rhs.threadIds)||((this.threadIds!= null)&&this.threadIds.equals(rhs.threadIds)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Thread.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Thread.java new file mode 100644 index 0000000..36d2a33 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Thread.java @@ -0,0 +1,142 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A Thread + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "name" +}) +@Generated("jsonschema2pojo") +public class Thread { + + /** + * Unique identifier for the thread. + * (Required) + * + */ + @JsonProperty("id") + @JsonPropertyDescription("Unique identifier for the thread.") + private Integer id; + /** + * The name of the thread. + * (Required) + * + */ + @JsonProperty("name") + @JsonPropertyDescription("The name of the thread.") + private String name; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Unique identifier for the thread. + * (Required) + * + */ + @JsonProperty("id") + public Integer getId() { + return id; + } + + /** + * Unique identifier for the thread. + * (Required) + * + */ + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * The name of the thread. + * (Required) + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * The name of the thread. + * (Required) + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Thread.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("id"); + sb.append('='); + sb.append(((this.id == null)?"":this.id)); + sb.append(','); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Thread) == false) { + return false; + } + Thread rhs = ((Thread) other); + return ((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ValueFormat.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ValueFormat.java new file mode 100644 index 0000000..489adb2 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ValueFormat.java @@ -0,0 +1,105 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Provides formatting information for a value. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "hex" +}) +@Generated("jsonschema2pojo") +public class ValueFormat { + + /** + * Display the value in hex. + * + */ + @JsonProperty("hex") + @JsonPropertyDescription("Display the value in hex.") + private Boolean hex; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Display the value in hex. + * + */ + @JsonProperty("hex") + public Boolean getHex() { + return hex; + } + + /** + * Display the value in hex. + * + */ + @JsonProperty("hex") + public void setHex(Boolean hex) { + this.hex = hex; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ValueFormat.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("hex"); + sb.append('='); + sb.append(((this.hex == null)?"":this.hex)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.hex == null)? 0 :this.hex.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ValueFormat) == false) { + return false; + } + ValueFormat rhs = ((ValueFormat) other); + return (((this.hex == rhs.hex)||((this.hex!= null)&&this.hex.equals(rhs.hex)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java new file mode 100644 index 0000000..346eeb4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java @@ -0,0 +1,394 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A Variable is a name/value pair. + * The `type` attribute is shown if space permits or when hovering over the variable's name. + * The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. + * If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. + * If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "name", + "value", + "type", + "presentationHint", + "evaluateName", + "variablesReference", + "namedVariables", + "indexedVariables", + "memoryReference" +}) +@Generated("jsonschema2pojo") +public class Variable { + + /** + * The variable's name. + * (Required) + * + */ + @JsonProperty("name") + @JsonPropertyDescription("The variable's name.") + private String name; + /** + * The variable's value. + * This can be a multi-line text, e.g. for a function the body of a function. + * For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible. + * An empty string can be used if no value should be shown in the UI. + * (Required) + * + */ + @JsonProperty("value") + @JsonPropertyDescription("The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI.") + private String value; + /** + * The type of the variable's value. Typically shown in the UI when hovering over the value. + * This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. + * + */ + @JsonProperty("type") + @JsonPropertyDescription("The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true.") + private String type; + /** + * Properties of a variable that can be used to determine how to render the variable in the UI. + * + */ + @JsonProperty("presentationHint") + @JsonPropertyDescription("Properties of a variable that can be used to determine how to render the variable in the UI.") + private VariablePresentationHint presentationHint; + /** + * The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value. + * + */ + @JsonProperty("evaluateName") + @JsonPropertyDescription("The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value.") + private String evaluateName; + /** + * If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + @JsonPropertyDescription("If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.") + private Integer variablesReference; + /** + * The number of named child variables. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("namedVariables") + @JsonPropertyDescription("The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.") + private Integer namedVariables; + /** + * The number of indexed child variables. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("indexedVariables") + @JsonPropertyDescription("The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.") + private Integer indexedVariables; + /** + * A memory reference associated with this variable. + * For pointer type variables, this is generally a reference to the memory address contained in the pointer. + * For executable data, this reference may later be used in a `disassemble` request. + * This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. + * + */ + @JsonProperty("memoryReference") + @JsonPropertyDescription("A memory reference associated with this variable.\nFor pointer type variables, this is generally a reference to the memory address contained in the pointer.\nFor executable data, this reference may later be used in a `disassemble` request.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.") + private String memoryReference; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The variable's name. + * (Required) + * + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * The variable's name. + * (Required) + * + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * The variable's value. + * This can be a multi-line text, e.g. for a function the body of a function. + * For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible. + * An empty string can be used if no value should be shown in the UI. + * (Required) + * + */ + @JsonProperty("value") + public String getValue() { + return value; + } + + /** + * The variable's value. + * This can be a multi-line text, e.g. for a function the body of a function. + * For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible. + * An empty string can be used if no value should be shown in the UI. + * (Required) + * + */ + @JsonProperty("value") + public void setValue(String value) { + this.value = value; + } + + /** + * The type of the variable's value. Typically shown in the UI when hovering over the value. + * This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. + * + */ + @JsonProperty("type") + public String getType() { + return type; + } + + /** + * The type of the variable's value. Typically shown in the UI when hovering over the value. + * This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. + * + */ + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + /** + * Properties of a variable that can be used to determine how to render the variable in the UI. + * + */ + @JsonProperty("presentationHint") + public VariablePresentationHint getPresentationHint() { + return presentationHint; + } + + /** + * Properties of a variable that can be used to determine how to render the variable in the UI. + * + */ + @JsonProperty("presentationHint") + public void setPresentationHint(VariablePresentationHint presentationHint) { + this.presentationHint = presentationHint; + } + + /** + * The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value. + * + */ + @JsonProperty("evaluateName") + public String getEvaluateName() { + return evaluateName; + } + + /** + * The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value. + * + */ + @JsonProperty("evaluateName") + public void setEvaluateName(String evaluateName) { + this.evaluateName = evaluateName; + } + + /** + * If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + public Integer getVariablesReference() { + return variablesReference; + } + + /** + * If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + public void setVariablesReference(Integer variablesReference) { + this.variablesReference = variablesReference; + } + + /** + * The number of named child variables. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("namedVariables") + public Integer getNamedVariables() { + return namedVariables; + } + + /** + * The number of named child variables. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("namedVariables") + public void setNamedVariables(Integer namedVariables) { + this.namedVariables = namedVariables; + } + + /** + * The number of indexed child variables. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("indexedVariables") + public Integer getIndexedVariables() { + return indexedVariables; + } + + /** + * The number of indexed child variables. + * The client can use this information to present the children in a paged UI and fetch them in chunks. + * + */ + @JsonProperty("indexedVariables") + public void setIndexedVariables(Integer indexedVariables) { + this.indexedVariables = indexedVariables; + } + + /** + * A memory reference associated with this variable. + * For pointer type variables, this is generally a reference to the memory address contained in the pointer. + * For executable data, this reference may later be used in a `disassemble` request. + * This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. + * + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { + return memoryReference; + } + + /** + * A memory reference associated with this variable. + * For pointer type variables, this is generally a reference to the memory address contained in the pointer. + * For executable data, this reference may later be used in a `disassemble` request. + * This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. + * + */ + @JsonProperty("memoryReference") + public void setMemoryReference(String memoryReference) { + this.memoryReference = memoryReference; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Variable.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null)?"":this.name)); + sb.append(','); + sb.append("value"); + sb.append('='); + sb.append(((this.value == null)?"":this.value)); + sb.append(','); + sb.append("type"); + sb.append('='); + sb.append(((this.type == null)?"":this.type)); + sb.append(','); + sb.append("presentationHint"); + sb.append('='); + sb.append(((this.presentationHint == null)?"":this.presentationHint)); + sb.append(','); + sb.append("evaluateName"); + sb.append('='); + sb.append(((this.evaluateName == null)?"":this.evaluateName)); + sb.append(','); + sb.append("variablesReference"); + sb.append('='); + sb.append(((this.variablesReference == null)?"":this.variablesReference)); + sb.append(','); + sb.append("namedVariables"); + sb.append('='); + sb.append(((this.namedVariables == null)?"":this.namedVariables)); + sb.append(','); + sb.append("indexedVariables"); + sb.append('='); + sb.append(((this.indexedVariables == null)?"":this.indexedVariables)); + sb.append(','); + sb.append("memoryReference"); + sb.append('='); + sb.append(((this.memoryReference == null)?"":this.memoryReference)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.indexedVariables == null)? 0 :this.indexedVariables.hashCode())); + result = ((result* 31)+((this.memoryReference == null)? 0 :this.memoryReference.hashCode())); + result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); + result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); + result = ((result* 31)+((this.namedVariables == null)? 0 :this.namedVariables.hashCode())); + result = ((result* 31)+((this.evaluateName == null)? 0 :this.evaluateName.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); + result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); + result = ((result* 31)+((this.value == null)? 0 :this.value.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Variable) == false) { + return false; + } + Variable rhs = ((Variable) other); + return (((((((((((this.indexedVariables == rhs.indexedVariables)||((this.indexedVariables!= null)&&this.indexedVariables.equals(rhs.indexedVariables)))&&((this.memoryReference == rhs.memoryReference)||((this.memoryReference!= null)&&this.memoryReference.equals(rhs.memoryReference))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.namedVariables == rhs.namedVariables)||((this.namedVariables!= null)&&this.namedVariables.equals(rhs.namedVariables))))&&((this.evaluateName == rhs.evaluateName)||((this.evaluateName!= null)&&this.evaluateName.equals(rhs.evaluateName))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference))))&&((this.value == rhs.value)||((this.value!= null)&&this.value.equals(rhs.value)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java new file mode 100644 index 0000000..1f64e73 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java @@ -0,0 +1,206 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Properties of a variable that can be used to determine how to render the variable in the UI. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "kind", + "attributes", + "visibility", + "lazy" +}) +@Generated("jsonschema2pojo") +public class VariablePresentationHint { + + /** + * The kind of variable. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("kind") + @JsonPropertyDescription("The kind of variable. Before introducing additional values, try to use the listed values.") + private String kind; + /** + * Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("attributes") + @JsonPropertyDescription("Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.") + private List attributes = new ArrayList(); + /** + * Visibility of variable. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("visibility") + @JsonPropertyDescription("Visibility of variable. Before introducing additional values, try to use the listed values.") + private String visibility; + /** + * If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation. + * This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function. + * Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request. + * + */ + @JsonProperty("lazy") + @JsonPropertyDescription("If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.") + private Boolean lazy; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The kind of variable. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("kind") + public String getKind() { + return kind; + } + + /** + * The kind of variable. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("kind") + public void setKind(String kind) { + this.kind = kind; + } + + /** + * Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("attributes") + public List getAttributes() { + return attributes; + } + + /** + * Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("attributes") + public void setAttributes(List attributes) { + this.attributes = attributes; + } + + /** + * Visibility of variable. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("visibility") + public String getVisibility() { + return visibility; + } + + /** + * Visibility of variable. Before introducing additional values, try to use the listed values. + * + */ + @JsonProperty("visibility") + public void setVisibility(String visibility) { + this.visibility = visibility; + } + + /** + * If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation. + * This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function. + * Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request. + * + */ + @JsonProperty("lazy") + public Boolean getLazy() { + return lazy; + } + + /** + * If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation. + * This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function. + * Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request. + * + */ + @JsonProperty("lazy") + public void setLazy(Boolean lazy) { + this.lazy = lazy; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(VariablePresentationHint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("kind"); + sb.append('='); + sb.append(((this.kind == null)?"":this.kind)); + sb.append(','); + sb.append("attributes"); + sb.append('='); + sb.append(((this.attributes == null)?"":this.attributes)); + sb.append(','); + sb.append("visibility"); + sb.append('='); + sb.append(((this.visibility == null)?"":this.visibility)); + sb.append(','); + sb.append("lazy"); + sb.append('='); + sb.append(((this.lazy == null)?"":this.lazy)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.attributes == null)? 0 :this.attributes.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.visibility == null)? 0 :this.visibility.hashCode())); + result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); + result = ((result* 31)+((this.lazy == null)? 0 :this.lazy.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof VariablePresentationHint) == false) { + return false; + } + VariablePresentationHint rhs = ((VariablePresentationHint) other); + return ((((((this.attributes == rhs.attributes)||((this.attributes!= null)&&this.attributes.equals(rhs.attributes)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.visibility == rhs.visibility)||((this.visibility!= null)&&this.visibility.equals(rhs.visibility))))&&((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind))))&&((this.lazy == rhs.lazy)||((this.lazy!= null)&&this.lazy.equals(rhs.lazy)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variables.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variables.java new file mode 100644 index 0000000..4ce51f9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variables.java @@ -0,0 +1,73 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * An object used as a dictionary for looking up the variables in the format string. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + +}) +@Generated("jsonschema2pojo") +public class Variables { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, String value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Variables.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Variables) == false) { + return false; + } + Variables rhs = ((Variables) other); + return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArguments.java new file mode 100644 index 0000000..96ca637 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArguments.java @@ -0,0 +1,286 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; + + +/** + * Arguments for `variables` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "variablesReference", + "filter", + "start", + "count", + "format" +}) +@Generated("jsonschema2pojo") +public class VariablesArguments { + + /** + * The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + @JsonPropertyDescription("The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") + private Integer variablesReference; + /** + * Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. + * + */ + @JsonProperty("filter") + @JsonPropertyDescription("Filter to limit the child variables to either named or indexed. If omitted, both types are fetched.") + private Filter filter; + /** + * The index of the first variable to return; if omitted children start at 0. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. + * + */ + @JsonProperty("start") + @JsonPropertyDescription("The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true.") + private Integer start; + /** + * The number of variables to return. If count is missing or 0, all variables are returned. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. + * + */ + @JsonProperty("count") + @JsonPropertyDescription("The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true.") + private Integer count; + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + @JsonPropertyDescription("Provides formatting information for a value.") + private ValueFormat format; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + public Integer getVariablesReference() { + return variablesReference; + } + + /** + * The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + * (Required) + * + */ + @JsonProperty("variablesReference") + public void setVariablesReference(Integer variablesReference) { + this.variablesReference = variablesReference; + } + + /** + * Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. + * + */ + @JsonProperty("filter") + public Filter getFilter() { + return filter; + } + + /** + * Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. + * + */ + @JsonProperty("filter") + public void setFilter(Filter filter) { + this.filter = filter; + } + + /** + * The index of the first variable to return; if omitted children start at 0. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. + * + */ + @JsonProperty("start") + public Integer getStart() { + return start; + } + + /** + * The index of the first variable to return; if omitted children start at 0. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. + * + */ + @JsonProperty("start") + public void setStart(Integer start) { + this.start = start; + } + + /** + * The number of variables to return. If count is missing or 0, all variables are returned. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. + * + */ + @JsonProperty("count") + public Integer getCount() { + return count; + } + + /** + * The number of variables to return. If count is missing or 0, all variables are returned. + * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. + * + */ + @JsonProperty("count") + public void setCount(Integer count) { + this.count = count; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + public ValueFormat getFormat() { + return format; + } + + /** + * Provides formatting information for a value. + * + */ + @JsonProperty("format") + public void setFormat(ValueFormat format) { + this.format = format; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(VariablesArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("variablesReference"); + sb.append('='); + sb.append(((this.variablesReference == null)?"":this.variablesReference)); + sb.append(','); + sb.append("filter"); + sb.append('='); + sb.append(((this.filter == null)?"":this.filter)); + sb.append(','); + sb.append("start"); + sb.append('='); + sb.append(((this.start == null)?"":this.start)); + sb.append(','); + sb.append("count"); + sb.append('='); + sb.append(((this.count == null)?"":this.count)); + sb.append(','); + sb.append("format"); + sb.append('='); + sb.append(((this.format == null)?"":this.format)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.filter == null)? 0 :this.filter.hashCode())); + result = ((result* 31)+((this.start == null)? 0 :this.start.hashCode())); + result = ((result* 31)+((this.count == null)? 0 :this.count.hashCode())); + result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof VariablesArguments) == false) { + return false; + } + VariablesArguments rhs = ((VariablesArguments) other); + return (((((((this.filter == rhs.filter)||((this.filter!= null)&&this.filter.equals(rhs.filter)))&&((this.start == rhs.start)||((this.start!= null)&&this.start.equals(rhs.start))))&&((this.count == rhs.count)||((this.count!= null)&&this.count.equals(rhs.count))))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference)))); + } + + + /** + * Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. + * + */ + @Generated("jsonschema2pojo") + public enum Filter { + + INDEXED("indexed"), + NAMED("named"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (Filter c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Filter(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static Filter fromValue(String value) { + Filter constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArguments.java new file mode 100644 index 0000000..e4e4d43 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArguments.java @@ -0,0 +1,207 @@ + +package org.tzi.use.monitor.adapter.python.dap; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Arguments for `writeMemory` request. + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "memoryReference", + "offset", + "allowPartial", + "data" +}) +@Generated("jsonschema2pojo") +public class WriteMemoryArguments { + + /** + * Memory reference to the base location to which data should be written. + * (Required) + * + */ + @JsonProperty("memoryReference") + @JsonPropertyDescription("Memory reference to the base location to which data should be written.") + private String memoryReference; + /** + * Offset (in bytes) to be applied to the reference location before writing data. Can be negative. + * + */ + @JsonProperty("offset") + @JsonPropertyDescription("Offset (in bytes) to be applied to the reference location before writing data. Can be negative.") + private Integer offset; + /** + * Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties. + * If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not. + * + */ + @JsonProperty("allowPartial") + @JsonPropertyDescription("Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not.") + private Boolean allowPartial; + /** + * Bytes to write, encoded using base64. + * (Required) + * + */ + @JsonProperty("data") + @JsonPropertyDescription("Bytes to write, encoded using base64.") + private String data; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * Memory reference to the base location to which data should be written. + * (Required) + * + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { + return memoryReference; + } + + /** + * Memory reference to the base location to which data should be written. + * (Required) + * + */ + @JsonProperty("memoryReference") + public void setMemoryReference(String memoryReference) { + this.memoryReference = memoryReference; + } + + /** + * Offset (in bytes) to be applied to the reference location before writing data. Can be negative. + * + */ + @JsonProperty("offset") + public Integer getOffset() { + return offset; + } + + /** + * Offset (in bytes) to be applied to the reference location before writing data. Can be negative. + * + */ + @JsonProperty("offset") + public void setOffset(Integer offset) { + this.offset = offset; + } + + /** + * Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties. + * If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not. + * + */ + @JsonProperty("allowPartial") + public Boolean getAllowPartial() { + return allowPartial; + } + + /** + * Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties. + * If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not. + * + */ + @JsonProperty("allowPartial") + public void setAllowPartial(Boolean allowPartial) { + this.allowPartial = allowPartial; + } + + /** + * Bytes to write, encoded using base64. + * (Required) + * + */ + @JsonProperty("data") + public String getData() { + return data; + } + + /** + * Bytes to write, encoded using base64. + * (Required) + * + */ + @JsonProperty("data") + public void setData(String data) { + this.data = data; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(WriteMemoryArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); + sb.append("memoryReference"); + sb.append('='); + sb.append(((this.memoryReference == null)?"":this.memoryReference)); + sb.append(','); + sb.append("offset"); + sb.append('='); + sb.append(((this.offset == null)?"":this.offset)); + sb.append(','); + sb.append("allowPartial"); + sb.append('='); + sb.append(((this.allowPartial == null)?"":this.allowPartial)); + sb.append(','); + sb.append("data"); + sb.append('='); + sb.append(((this.data == null)?"":this.data)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length()- 1)) == ',') { + sb.setCharAt((sb.length()- 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result* 31)+((this.memoryReference == null)? 0 :this.memoryReference.hashCode())); + result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); + result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); + result = ((result* 31)+((this.allowPartial == null)? 0 :this.allowPartial.hashCode())); + result = ((result* 31)+((this.data == null)? 0 :this.data.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof WriteMemoryArguments) == false) { + return false; + } + WriteMemoryArguments rhs = ((WriteMemoryArguments) other); + return ((((((this.memoryReference == rhs.memoryReference)||((this.memoryReference!= null)&&this.memoryReference.equals(rhs.memoryReference)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.allowPartial == rhs.allowPartial)||((this.allowPartial!= null)&&this.allowPartial.equals(rhs.allowPartial))))&&((this.data == rhs.data)||((this.data!= null)&&this.data.equals(rhs.data)))); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachRequest.java new file mode 100644 index 0000000..883836f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachRequest.java @@ -0,0 +1,114 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import java.util.List; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonTypeName("attach") +public class AttachRequest extends Request { + + protected AttachRequestArguments arguments; + + public AttachRequest(Integer seq, AttachRequestArguments arguments) { + super(seq, "request", "attach"); + this.arguments = arguments; + } + + public AttachRequestArguments getArguments() { + return arguments; + } + + public void setArguments(AttachRequestArguments arguments) { + this.arguments = arguments; + } + + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AttachRequestArguments { + private String localRoot; + private String clientOS; + private Boolean justMyCode; + private Boolean showReturnValue; + private String workspaceFolder; + @JsonProperty("__sessionId") + private String sessionId; + private Map connect; + private List> pathMappings; + private List debugOptions; + + public String getLocalRoot() { + return localRoot; + } + + public void setLocalRoot(String localRoot) { + this.localRoot = localRoot; + } + + public String getClientOS() { + return clientOS; + } + + public void setClientOS(String clientOS) { + this.clientOS = clientOS; + } + + public Boolean getJustMyCode() { + return justMyCode; + } + + public void setJustMyCode(Boolean justMyCode) { + this.justMyCode = justMyCode; + } + + public Boolean getShowReturnValue() { + return showReturnValue; + } + + public void setShowReturnValue(Boolean showReturnValue) { + this.showReturnValue = showReturnValue; + } + + public String getWorkspaceFolder() { + return workspaceFolder; + } + + public void setWorkspaceFolder(String workspaceFolder) { + this.workspaceFolder = workspaceFolder; + } + + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public Map getConnect() { + return connect; + } + + public void setConnect(Map connect) { + this.connect = connect; + } + + public List> getPathMappings() { + return pathMappings; + } + + public void setPathMappings(List> pathMappings) { + this.pathMappings = pathMappings; + } + + public List getDebugOptions() { + return debugOptions; + } + + public void setDebugOptions(List debugOptions) { + this.debugOptions = debugOptions; + } + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachResponse.java new file mode 100644 index 0000000..73ebd9f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachResponse.java @@ -0,0 +1,9 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonTypeName; + +@JsonTypeName("attach") +public class AttachResponse extends Response { + public AttachResponse() { + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/BreakpointEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/BreakpointEvent.java new file mode 100644 index 0000000..a1bbb34 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/BreakpointEvent.java @@ -0,0 +1,6 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import org.tzi.use.monitor.adapter.python.dap.DAPEvent; + +public class BreakpointEvent implements DAPEvent { +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Capabilities.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Capabilities.java new file mode 100644 index 0000000..72c460b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Capabilities.java @@ -0,0 +1,381 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.List; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Capabilities { + + private Boolean supportsConfigurationDoneRequest; + private Boolean supportsFunctionBreakpoints; + private Boolean supportsConditionalBreakpoints; + private Boolean supportsHitConditionalBreakpoints; + private Boolean supportsEvaluateForHovers; + // private List exceptionBreakpointFilters; + private Boolean supportsStepBack; + private Boolean supportsSetVariable; + private Boolean supportsRestartFrame; + private Boolean supportsGotoTargetsRequest; + private Boolean supportsStepInTargetsRequest; + private Boolean supportsCompletionsRequest; + private List completionTriggerCharacters; + private Boolean supportsModulesRequest; + // private List additionalModuleColumns; +// private List supportedChecksumAlgorithms; + private Boolean supportsRestartRequest; + private Boolean supportsExceptionOptions; + private Boolean supportsValueFormattingOptions; + private Boolean supportsExceptionInfoRequest; + private Boolean supportTerminateDebuggee; + private Boolean supportSuspendDebuggee; + private Boolean supportsDelayedStackTraceLoading; + private Boolean supportsLoadedSourcesRequest; + private Boolean supportsLogPoints; + private Boolean supportsTerminateThreadsRequest; + private Boolean supportsSetExpression; + private Boolean supportsTerminateRequest; + private Boolean supportsDataBreakpoints; + private Boolean supportsReadMemoryRequest; + private Boolean supportsWriteMemoryRequest; + private Boolean supportsDisassembleRequest; + private Boolean supportsCancelRequest; + private Boolean supportsBreakpointLocationsRequest; + private Boolean supportsClipboardContext; + private Boolean supportsSteppingGranularity; + private Boolean supportsInstructionBreakpoints; + private Boolean supportsExceptionFilterOptions; + private Boolean supportsSingleThreadExecutionRequests; + + public Boolean getSupportsConfigurationDoneRequest() { + return supportsConfigurationDoneRequest; + } + + public void setSupportsConfigurationDoneRequest(Boolean supportsConfigurationDoneRequest) { + this.supportsConfigurationDoneRequest = supportsConfigurationDoneRequest; + } + + public Boolean getSupportsFunctionBreakpoints() { + return supportsFunctionBreakpoints; + } + + public void setSupportsFunctionBreakpoints(Boolean supportsFunctionBreakpoints) { + this.supportsFunctionBreakpoints = supportsFunctionBreakpoints; + } + + public Boolean getSupportsConditionalBreakpoints() { + return supportsConditionalBreakpoints; + } + + public void setSupportsConditionalBreakpoints(Boolean supportsConditionalBreakpoints) { + this.supportsConditionalBreakpoints = supportsConditionalBreakpoints; + } + + public Boolean getSupportsHitConditionalBreakpoints() { + return supportsHitConditionalBreakpoints; + } + + public void setSupportsHitConditionalBreakpoints(Boolean supportsHitConditionalBreakpoints) { + this.supportsHitConditionalBreakpoints = supportsHitConditionalBreakpoints; + } + + public Boolean getSupportsEvaluateForHovers() { + return supportsEvaluateForHovers; + } + + public void setSupportsEvaluateForHovers(Boolean supportsEvaluateForHovers) { + this.supportsEvaluateForHovers = supportsEvaluateForHovers; + } + + public Boolean getSupportsStepBack() { + return supportsStepBack; + } + + public void setSupportsStepBack(Boolean supportsStepBack) { + this.supportsStepBack = supportsStepBack; + } + + public Boolean getSupportsSetVariable() { + return supportsSetVariable; + } + + public void setSupportsSetVariable(Boolean supportsSetVariable) { + this.supportsSetVariable = supportsSetVariable; + } + + public Boolean getSupportsRestartFrame() { + return supportsRestartFrame; + } + + public void setSupportsRestartFrame(Boolean supportsRestartFrame) { + this.supportsRestartFrame = supportsRestartFrame; + } + + public Boolean getSupportsGotoTargetsRequest() { + return supportsGotoTargetsRequest; + } + + public void setSupportsGotoTargetsRequest(Boolean supportsGotoTargetsRequest) { + this.supportsGotoTargetsRequest = supportsGotoTargetsRequest; + } + + public Boolean getSupportsStepInTargetsRequest() { + return supportsStepInTargetsRequest; + } + + public void setSupportsStepInTargetsRequest(Boolean supportsStepInTargetsRequest) { + this.supportsStepInTargetsRequest = supportsStepInTargetsRequest; + } + + public Boolean getSupportsCompletionsRequest() { + return supportsCompletionsRequest; + } + + public void setSupportsCompletionsRequest(Boolean supportsCompletionsRequest) { + this.supportsCompletionsRequest = supportsCompletionsRequest; + } + + public List getCompletionTriggerCharacters() { + return completionTriggerCharacters; + } + + public void setCompletionTriggerCharacters(List completionTriggerCharacters) { + this.completionTriggerCharacters = completionTriggerCharacters; + } + + public Boolean getSupportsModulesRequest() { + return supportsModulesRequest; + } + + public void setSupportsModulesRequest(Boolean supportsModulesRequest) { + this.supportsModulesRequest = supportsModulesRequest; + } + + public Boolean getSupportsRestartRequest() { + return supportsRestartRequest; + } + + public void setSupportsRestartRequest(Boolean supportsRestartRequest) { + this.supportsRestartRequest = supportsRestartRequest; + } + + public Boolean getSupportsExceptionOptions() { + return supportsExceptionOptions; + } + + public void setSupportsExceptionOptions(Boolean supportsExceptionOptions) { + this.supportsExceptionOptions = supportsExceptionOptions; + } + + public Boolean getSupportsValueFormattingOptions() { + return supportsValueFormattingOptions; + } + + public void setSupportsValueFormattingOptions(Boolean supportsValueFormattingOptions) { + this.supportsValueFormattingOptions = supportsValueFormattingOptions; + } + + public Boolean getSupportsExceptionInfoRequest() { + return supportsExceptionInfoRequest; + } + + public void setSupportsExceptionInfoRequest(Boolean supportsExceptionInfoRequest) { + this.supportsExceptionInfoRequest = supportsExceptionInfoRequest; + } + + public Boolean getSupportTerminateDebuggee() { + return supportTerminateDebuggee; + } + + public void setSupportTerminateDebuggee(Boolean supportTerminateDebuggee) { + this.supportTerminateDebuggee = supportTerminateDebuggee; + } + + public Boolean getSupportSuspendDebuggee() { + return supportSuspendDebuggee; + } + + public void setSupportSuspendDebuggee(Boolean supportSuspendDebuggee) { + this.supportSuspendDebuggee = supportSuspendDebuggee; + } + + public Boolean getSupportsDelayedStackTraceLoading() { + return supportsDelayedStackTraceLoading; + } + + public void setSupportsDelayedStackTraceLoading(Boolean supportsDelayedStackTraceLoading) { + this.supportsDelayedStackTraceLoading = supportsDelayedStackTraceLoading; + } + + public Boolean getSupportsLoadedSourcesRequest() { + return supportsLoadedSourcesRequest; + } + + public void setSupportsLoadedSourcesRequest(Boolean supportsLoadedSourcesRequest) { + this.supportsLoadedSourcesRequest = supportsLoadedSourcesRequest; + } + + public Boolean getSupportsLogPoints() { + return supportsLogPoints; + } + + public void setSupportsLogPoints(Boolean supportsLogPoints) { + this.supportsLogPoints = supportsLogPoints; + } + + public Boolean getSupportsTerminateThreadsRequest() { + return supportsTerminateThreadsRequest; + } + + public void setSupportsTerminateThreadsRequest(Boolean supportsTerminateThreadsRequest) { + this.supportsTerminateThreadsRequest = supportsTerminateThreadsRequest; + } + + public Boolean getSupportsSetExpression() { + return supportsSetExpression; + } + + public void setSupportsSetExpression(Boolean supportsSetExpression) { + this.supportsSetExpression = supportsSetExpression; + } + + public Boolean getSupportsTerminateRequest() { + return supportsTerminateRequest; + } + + public void setSupportsTerminateRequest(Boolean supportsTerminateRequest) { + this.supportsTerminateRequest = supportsTerminateRequest; + } + + public Boolean getSupportsDataBreakpoints() { + return supportsDataBreakpoints; + } + + public void setSupportsDataBreakpoints(Boolean supportsDataBreakpoints) { + this.supportsDataBreakpoints = supportsDataBreakpoints; + } + + public Boolean getSupportsReadMemoryRequest() { + return supportsReadMemoryRequest; + } + + public void setSupportsReadMemoryRequest(Boolean supportsReadMemoryRequest) { + this.supportsReadMemoryRequest = supportsReadMemoryRequest; + } + + public Boolean getSupportsWriteMemoryRequest() { + return supportsWriteMemoryRequest; + } + + public void setSupportsWriteMemoryRequest(Boolean supportsWriteMemoryRequest) { + this.supportsWriteMemoryRequest = supportsWriteMemoryRequest; + } + + public Boolean getSupportsDisassembleRequest() { + return supportsDisassembleRequest; + } + + public void setSupportsDisassembleRequest(Boolean supportsDisassembleRequest) { + this.supportsDisassembleRequest = supportsDisassembleRequest; + } + + public Boolean getSupportsCancelRequest() { + return supportsCancelRequest; + } + + public void setSupportsCancelRequest(Boolean supportsCancelRequest) { + this.supportsCancelRequest = supportsCancelRequest; + } + + public Boolean getSupportsBreakpointLocationsRequest() { + return supportsBreakpointLocationsRequest; + } + + public void setSupportsBreakpointLocationsRequest(Boolean supportsBreakpointLocationsRequest) { + this.supportsBreakpointLocationsRequest = supportsBreakpointLocationsRequest; + } + + public Boolean getSupportsClipboardContext() { + return supportsClipboardContext; + } + + public void setSupportsClipboardContext(Boolean supportsClipboardContext) { + this.supportsClipboardContext = supportsClipboardContext; + } + + public Boolean getSupportsSteppingGranularity() { + return supportsSteppingGranularity; + } + + public void setSupportsSteppingGranularity(Boolean supportsSteppingGranularity) { + this.supportsSteppingGranularity = supportsSteppingGranularity; + } + + public Boolean getSupportsInstructionBreakpoints() { + return supportsInstructionBreakpoints; + } + + public void setSupportsInstructionBreakpoints(Boolean supportsInstructionBreakpoints) { + this.supportsInstructionBreakpoints = supportsInstructionBreakpoints; + } + + public Boolean getSupportsExceptionFilterOptions() { + return supportsExceptionFilterOptions; + } + + public void setSupportsExceptionFilterOptions(Boolean supportsExceptionFilterOptions) { + this.supportsExceptionFilterOptions = supportsExceptionFilterOptions; + } + + public Boolean getSupportsSingleThreadExecutionRequests() { + return supportsSingleThreadExecutionRequests; + } + + public void setSupportsSingleThreadExecutionRequests(Boolean supportsSingleThreadExecutionRequests) { + this.supportsSingleThreadExecutionRequests = supportsSingleThreadExecutionRequests; + } + + @Override + public String toString() { + return "Capabilities{" + + "supportsConfigurationDoneRequest=" + supportsConfigurationDoneRequest + + ", supportsFunctionBreakpoints=" + supportsFunctionBreakpoints + + ", supportsConditionalBreakpoints=" + supportsConditionalBreakpoints + + ", supportsHitConditionalBreakpoints=" + supportsHitConditionalBreakpoints + + ", supportsEvaluateForHovers=" + supportsEvaluateForHovers + + ", supportsStepBack=" + supportsStepBack + + ", supportsSetVariable=" + supportsSetVariable + + ", supportsRestartFrame=" + supportsRestartFrame + + ", supportsGotoTargetsRequest=" + supportsGotoTargetsRequest + + ", supportsStepInTargetsRequest=" + supportsStepInTargetsRequest + + ", supportsCompletionsRequest=" + supportsCompletionsRequest + + ", completionTriggerCharacters=" + completionTriggerCharacters + + ", supportsModulesRequest=" + supportsModulesRequest + + ", supportsRestartRequest=" + supportsRestartRequest + + ", supportsExceptionOptions=" + supportsExceptionOptions + + ", supportsValueFormattingOptions=" + supportsValueFormattingOptions + + ", supportsExceptionInfoRequest=" + supportsExceptionInfoRequest + + ", supportTerminateDebuggee=" + supportTerminateDebuggee + + ", supportSuspendDebuggee=" + supportSuspendDebuggee + + ", supportsDelayedStackTraceLoading=" + supportsDelayedStackTraceLoading + + ", supportsLoadedSourcesRequest=" + supportsLoadedSourcesRequest + + ", supportsLogPoints=" + supportsLogPoints + + ", supportsTerminateThreadsRequest=" + supportsTerminateThreadsRequest + + ", supportsSetExpression=" + supportsSetExpression + + ", supportsTerminateRequest=" + supportsTerminateRequest + + ", supportsDataBreakpoints=" + supportsDataBreakpoints + + ", supportsReadMemoryRequest=" + supportsReadMemoryRequest + + ", supportsWriteMemoryRequest=" + supportsWriteMemoryRequest + + ", supportsDisassembleRequest=" + supportsDisassembleRequest + + ", supportsCancelRequest=" + supportsCancelRequest + + ", supportsBreakpointLocationsRequest=" + supportsBreakpointLocationsRequest + + ", supportsClipboardContext=" + supportsClipboardContext + + ", supportsSteppingGranularity=" + supportsSteppingGranularity + + ", supportsInstructionBreakpoints=" + supportsInstructionBreakpoints + + ", supportsExceptionFilterOptions=" + supportsExceptionFilterOptions + + ", supportsSingleThreadExecutionRequests=" + supportsSingleThreadExecutionRequests + + '}'; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/DAPMessage.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/DAPMessage.java new file mode 100644 index 0000000..7a365fc --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/DAPMessage.java @@ -0,0 +1,45 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type" +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Request.class, name = "request"), + @JsonSubTypes.Type(value = Response.class, name = "response"), + @JsonSubTypes.Type(value = Event.class, name = "event") +}) +public abstract class DAPMessage { + + protected Integer seq; + protected String type; + + public DAPMessage() {} + + protected DAPMessage(Integer seq, String type) { + this.seq = seq; + this.type = type; + } + + public Integer getSeq() { + return seq; + } + + + public String getType() { + return type; + } + + public void setSeq(Integer seq) { + this.seq = seq; + } + + public void setType(String type) { + this.type = type; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateArguments.java new file mode 100644 index 0000000..a764da5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateArguments.java @@ -0,0 +1,31 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +public class EvaluateArguments { + private String expression; + private Integer frameId; + private String context; + + public String getExpression() { + return expression; + } + + public void setExpression(String expression) { + this.expression = expression; + } + + public Integer getFrameId() { + return frameId; + } + + public void setFrameId(Integer frameId) { + this.frameId = frameId; + } + + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateRequest.java new file mode 100644 index 0000000..1d4f8be --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateRequest.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import org.tzi.use.monitor.adapter.python.dap.DAPRequest; + +public class EvaluateRequest implements DAPRequest { + @JsonUnwrapped + Request dapRequest; + @JsonUnwrapped + EvaluateArguments arguments; + + public Request getDapRequest() { + return dapRequest; + } + + public void setDapRequest(Request dapRequest) { + this.dapRequest = dapRequest; + } + + public EvaluateArguments getArguments() { + return arguments; + } + + public void setArguments(EvaluateArguments arguments) { + this.arguments = arguments; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Event.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Event.java new file mode 100644 index 0000000..c4c03bf --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Event.java @@ -0,0 +1,58 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.JsonNode; +import org.tzi.use.monitor.adapter.python.dap.DAPEvent; + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "event" +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = InitializedEvent.class, name = "initialized") +}) +public abstract class Event extends DAPMessage implements DAPEvent { + + public Event() {} + + public Event(String event) { + this.event = event; + } + + @JsonUnwrapped + private DAPMessage message; + + @JsonProperty("event") + private String event; + + @JsonProperty("body") + private JsonNode body; + + public DAPMessage getMessage() { + return message; + } + + public void setMessage(DAPMessage message) { + this.message = message; + } + + public String getEvent() { + return event; + } + + public void setEvent(String event) { + this.event = event; + } + + public JsonNode getBody() { + return body; + } + + public void setBody(JsonNode body) { + this.body = body; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeRequest.java new file mode 100644 index 0000000..5a5a487 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeRequest.java @@ -0,0 +1,207 @@ +package org.tzi.use.monitor.adapter.python.tmp; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonTypeName("initialize") +public class InitializeRequest extends Request { + + protected InitializeRequestArguments arguments; + + public InitializeRequest(Integer seq, InitializeRequestArguments arguments) { + super(seq, "request", "initialize"); + this.arguments = arguments; + } + + public InitializeRequestArguments getArguments() { + return arguments; + } + + public void setArguments(InitializeRequestArguments arguments) { + this.arguments = arguments; + } + + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class InitializeRequestArguments { + + @JsonProperty("clientID") + private String clientID; + + @JsonProperty("clientName") + private String clientName; + + @JsonProperty("adapterID") + private String adapterID; + + @JsonProperty("locale") + private String locale; + + @JsonProperty("linesStartAt1") + private Boolean linesStartAt1; + + @JsonProperty("columnsStartAt1") + private Boolean columnsStartAt1; + + @JsonProperty("pathFormat") + private String pathFormat; + + @JsonProperty("supportsVariableType") + private Boolean supportsVariableType; + + @JsonProperty("supportsVariablePaging") + private Boolean supportsVariablePaging; + + @JsonProperty("supportsRunInTerminalRequest") + private Boolean supportsRunInTerminalRequest; + + @JsonProperty("supportsMemoryReferences") + private Boolean supportsMemoryReferences; + + @JsonProperty("supportsProgressReporting") + private Boolean supportsProgressReporting; + + @JsonProperty("supportsInvalidatedEvent") + private Boolean supportsInvalidatedEvent; + + @JsonProperty("supportsMemoryEvent") + private Boolean supportsMemoryEvent; + + @JsonProperty("supportsArgsCanBeInterpretedByShell") + private Boolean supportsArgsCanBeInterpretedByShell; + + @JsonProperty("supportsStartDebuggingRequest") + private Boolean supportsStartDebuggingRequest; + + public String getClientID() { + return clientID; + } + + public String getClientName() { + return clientName; + } + + public String getAdapterID() { + return adapterID; + } + + public String getLocale() { + return locale; + } + + public Boolean isLinesStartAt1() { + return linesStartAt1; + } + + public Boolean isColumnsStartAt1() { + return columnsStartAt1; + } + + public String getPathFormat() { + return pathFormat; + } + + public Boolean isSupportsVariableType() { + return supportsVariableType; + } + + public Boolean isSupportsVariablePaging() { + return supportsVariablePaging; + } + + public Boolean isSupportsRunInTerminalRequest() { + return supportsRunInTerminalRequest; + } + + public Boolean isSupportsMemoryReferences() { + return supportsMemoryReferences; + } + + public Boolean isSupportsProgressReporting() { + return supportsProgressReporting; + } + + public Boolean isSupportsInvalidatedEvent() { + return supportsInvalidatedEvent; + } + + public Boolean isSupportsMemoryEvent() { + return supportsMemoryEvent; + } + + public Boolean isSupportsArgsCanBeInterpretedByShell() { + return supportsArgsCanBeInterpretedByShell; + } + + public Boolean isSupportsStartDebuggingRequest() { + return supportsStartDebuggingRequest; + } + + public void setClientID(String clientID) { + this.clientID = clientID; + } + + public void setClientName(String clientName) { + this.clientName = clientName; + } + + public void setAdapterID(String adapterID) { + this.adapterID = adapterID; + } + + public void setLocale(String locale) { + this.locale = locale; + } + + public void setLinesStartAt1(Boolean linesStartAt1) { + this.linesStartAt1 = linesStartAt1; + } + + public void setColumnsStartAt1(Boolean columnsStartAt1) { + this.columnsStartAt1 = columnsStartAt1; + } + + public void setPathFormat(String pathFormat) { + this.pathFormat = pathFormat; + } + + public void setSupportsVariableType(Boolean supportsVariableType) { + this.supportsVariableType = supportsVariableType; + } + + public void setSupportsVariablePaging(Boolean supportsVariablePaging) { + this.supportsVariablePaging = supportsVariablePaging; + } + + public void setSupportsRunInTerminalRequest(Boolean supportsRunInTerminalRequest) { + this.supportsRunInTerminalRequest = supportsRunInTerminalRequest; + } + + public void setSupportsMemoryReferences(Boolean supportsMemoryReferences) { + this.supportsMemoryReferences = supportsMemoryReferences; + } + + public void setSupportsProgressReporting(Boolean supportsProgressReporting) { + this.supportsProgressReporting = supportsProgressReporting; + } + + public void setSupportsInvalidatedEvent(Boolean supportsInvalidatedEvent) { + this.supportsInvalidatedEvent = supportsInvalidatedEvent; + } + + public void setSupportsMemoryEvent(Boolean supportsMemoryEvent) { + this.supportsMemoryEvent = supportsMemoryEvent; + } + + public void setSupportsArgsCanBeInterpretedByShell(Boolean supportsArgsCanBeInterpretedByShell) { + this.supportsArgsCanBeInterpretedByShell = supportsArgsCanBeInterpretedByShell; + } + + public void setSupportsStartDebuggingRequest(Boolean supportsStartDebuggingRequest) { + this.supportsStartDebuggingRequest = supportsStartDebuggingRequest; + } + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeResponse.java new file mode 100644 index 0000000..c675c9c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeResponse.java @@ -0,0 +1,37 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonTypeName; + +@JsonTypeName("initialize") +public class InitializeResponse extends Response { + + private Capabilities body; + + public InitializeResponse() {} + + public InitializeResponse(Integer seq, String type) { + super(seq, type); + } + + public Capabilities getBody() { + return body; + } + + public void setBody(Capabilities body) { + this.body = body; + } + + @Override + public String toString() { + return "InitializeResponse{" + + "body=" + body + + ", command='" + command + '\'' + + ", requestSeq=" + requestSeq + + ", success=" + success + + ", message='" + message + '\'' + + ", seq=" + seq + + ", type='" + type + '\'' + + '}'; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializedEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializedEvent.java new file mode 100644 index 0000000..cfdaff1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializedEvent.java @@ -0,0 +1,12 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonTypeName; + +@JsonTypeName("initialized") +public class InitializedEvent extends Event { + + InitializedEvent() { + super("initialized"); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Request.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Request.java new file mode 100644 index 0000000..578475c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Request.java @@ -0,0 +1,32 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.tzi.use.monitor.adapter.python.dap.DAPRequest; + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "command" +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = InitializeRequest.class, name = "initialize") +}) +public abstract class Request extends DAPMessage implements DAPRequest { + + protected String command; + + protected Request(Integer seq, String type, String command) { + super(seq, type); + this.command = command; + } + + public String getCommand() { + return command; + } + + public void setCommand(String command) { + this.command = command; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Response.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Response.java new file mode 100644 index 0000000..8a2b199 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Response.java @@ -0,0 +1,70 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.tzi.use.monitor.adapter.python.dap.DAPResponse; + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "command", + visible = true +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = InitializeResponse.class, name = "initialize") +}) +public abstract class Response extends DAPMessage implements DAPResponse { + + protected String command; + + @JsonProperty("request_seq") + protected Integer requestSeq; + + protected Boolean success; + + protected String message; + + public Response() {} + + protected Response(Integer seq, String type) { + super(seq, type); + } + + @Override + public int getRequestSequence() { + return requestSeq; + } + + public String getCommand() { + return command; + } + + public void setCommand(String command) { + this.command = command; + } + + public Integer getRequestSeq() { + return requestSeq; + } + + public void setRequestSeq(Integer requestSeq) { + this.requestSeq = requestSeq; + } + + public Boolean getSuccess() { + return success; + } + + public void setSuccess(Boolean success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Thread.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Thread.java new file mode 100644 index 0000000..6d78556 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Thread.java @@ -0,0 +1,22 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +public class Thread { + private int id; + private String name; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/ThreadsResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/ThreadsResponse.java new file mode 100644 index 0000000..3f6f2c8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/ThreadsResponse.java @@ -0,0 +1,34 @@ +package org.tzi.use.monitor.adapter.python.tmp; + +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import org.tzi.use.monitor.adapter.python.dap.DAPResponse; + +import java.util.ArrayList; + +public class ThreadsResponse implements DAPResponse { + @JsonUnwrapped + private Response response; + + private ArrayList threads; + + public Response getResponse() { + return response; + } + + public void setResponse(Response response) { + this.response = response; + } + + public ArrayList getThreads() { + return threads; + } + + public void setThreads(ArrayList threads) { + this.threads = threads; + } + + @Override + public int getRequestSequence() { + return this.response.getRequestSeq(); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyBase.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyBase.java new file mode 100644 index 0000000..5998f24 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyBase.java @@ -0,0 +1,17 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +import org.tzi.use.monitor.adapter.python.PythonAdapter; + +public abstract class PyBase { + + protected PythonAdapter adapter; + + public PyBase(PythonAdapter adapter) { + this.adapter = adapter; + } + + protected PythonAdapter getAdapter() { + return this.adapter; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java new file mode 100644 index 0000000..3c2cbf7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -0,0 +1,51 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +import org.tzi.use.monitor.adapter.python.PythonAdapter; +import org.tzi.use.plugins.monitor.vm.mm.VMField; +import org.tzi.use.uml.mm.MAssociationEnd; +import org.tzi.use.uml.mm.MAttribute; + +public class PyField extends PyBase implements VMField { + + private final PyFieldRaw pyFieldRaw; + + public PyField(PythonAdapter adapter, PyFieldRaw pyFieldRaw) { + super(adapter); + this.pyFieldRaw = pyFieldRaw; + } + + @Override + public String getName() { + return pyFieldRaw.getName(); + } + + @Override + public void setUSEAttribute(MAttribute attr) { + + } + + @Override + public MAttribute getUSEAttribute() { + return null; + } + + @Override + public void setUSEAssociationEnd(MAssociationEnd end) { + + } + + @Override + public MAssociationEnd getUSEAssociationEnd() { + return null; + } + + @Override + public Object getId() { + return null; + } + + PyFieldRaw getPyFieldRaw() { + return pyFieldRaw; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java new file mode 100644 index 0000000..cbf5f9e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java @@ -0,0 +1,37 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +public class PyFieldRaw { + private String name; + private String type; + private String value; + + public PyFieldRaw(String name, String type, String value) { + this.name = name; + this.type = type; + this.value = value; + } + + public String getName() { + return name; + } + + public String getType() { + return type; + } + + public String getValue() { + return value; + } + + public void setName(String name) { + this.name = name; + } + + public void setType(String type) { + this.type = type; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java new file mode 100644 index 0000000..8a83823 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java @@ -0,0 +1,49 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +import com.sun.jdi.Method; +import org.tzi.use.plugins.monitor.vm.adapter.VMAccessException; +import org.tzi.use.plugins.monitor.vm.adapter.jvm.JVMAdapter; +import org.tzi.use.plugins.monitor.vm.mm.VMMethod; +import org.tzi.use.plugins.monitor.vm.mm.VMType; +import org.tzi.use.plugins.monitor.vm.mm.jvm.JVMBase; +import org.tzi.use.uml.mm.MOperation; + +import java.util.List; + +public class PyMethod extends JVMBase implements VMMethod { + + private final PyMethodRaw method; + + private MOperation useOperation; + + public PyMethod(JVMAdapter adapter, PyMethodRaw method) { + super(adapter); + this.method = method; + } + + @Override + public Object getId() { + return null; + } + + @Override + public String getName() { + return ""; + } + + @Override + public List getArgumentTypes() throws VMAccessException { + return List.of(); + } + + @Override + public MOperation getUSEOperation() { + return useOperation; + } + + @Override + public void setUSEOperation(MOperation useOperation) { + this.useOperation = useOperation; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java new file mode 100644 index 0000000..5ae9db5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java @@ -0,0 +1,42 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +public class PyMethodRaw { + + private String name; + private String returnType; + private String lineNoStart; + private String lineNoEnd; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getReturnType() { + return returnType; + } + + public void setReturnType(String returnType) { + this.returnType = returnType; + } + + public String getLineNoStart() { + return lineNoStart; + } + + public void setLineNoStart(String lineNoStart) { + this.lineNoStart = lineNoStart; + } + + public String getLineNoEnd() { + return lineNoEnd; + } + + public void setLineNoEnd(String lineNoEnd) { + this.lineNoEnd = lineNoEnd; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java new file mode 100644 index 0000000..41d5470 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -0,0 +1,63 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +import org.tzi.use.monitor.adapter.python.PythonAdapter; +import org.tzi.use.plugins.monitor.vm.mm.VMField; +import org.tzi.use.plugins.monitor.vm.mm.VMObject; +import org.tzi.use.plugins.monitor.vm.mm.VMType; +import org.tzi.use.uml.ocl.value.IntegerValue; +import org.tzi.use.uml.ocl.value.StringValue; +import org.tzi.use.uml.ocl.value.Value; +import org.tzi.use.uml.sys.MObject; + +public class PyObject extends PyBase implements VMObject { + + private final PyObjectRaw rawObject; + private final VMType type; + private MObject useObject; + + public PyObject(PythonAdapter adapter, PyObjectRaw rawObject) { + super(adapter); + this.rawObject = rawObject; + this.type = adapter.getVMType(rawObject.getRawType().getName()); + } + + @Override + public Object getId() { + return null; + } + + @Override + public boolean isAlive() { + return true; + } + + @Override + public VMType getType() { + return type; + } + + @Override + public MObject getUSEObject() { + return useObject; + } + + @Override + public void setUSEObject(MObject obj) { + useObject = obj; + } + + @Override + public Value getValue(VMField field) { + System.out.println("getValue for:" + field.getName()); + PyField f = (PyField) field; + String valTypeStr = f.getPyFieldRaw().getType(); + System.out.println("getValue valTypeStr:" + valTypeStr); + String valStr = f.getPyFieldRaw().getValue(); + System.out.println("getValue valstr:" + valStr); + return switch (valTypeStr) { + case "int" -> IntegerValue.valueOf(Integer.parseInt(valStr)); + default -> new StringValue(valStr); + }; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java new file mode 100644 index 0000000..ab094a5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java @@ -0,0 +1,13 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +public class PyObjectRaw { + private PyTypeRaw rawType; + + public PyTypeRaw getRawType() { + return rawType; + } + + public void setRawType(PyTypeRaw rawType) { + this.rawType = rawType; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java new file mode 100644 index 0000000..a698733 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -0,0 +1,76 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +import org.tzi.use.monitor.adapter.python.PythonAdapter; +import org.tzi.use.plugins.monitor.vm.mm.VMField; +import org.tzi.use.plugins.monitor.vm.mm.VMMethod; +import org.tzi.use.plugins.monitor.vm.mm.VMObject; +import org.tzi.use.plugins.monitor.vm.mm.VMType; +import org.tzi.use.uml.mm.MClass; + +import java.util.List; +import java.util.Set; + +public class PyType extends PyBase implements VMType { + + private final PyTypeRaw rawType; + private MClass useClass; + + public PyType(PythonAdapter adapter, PyTypeRaw rawType) { + super(adapter); + this.rawType = rawType; + } + + public PyTypeRaw getRawType() { + return rawType; + } + + @Override + public String getName() { + return rawType.getName(); + } + + @Override + public Set getSuperClasses() { + return Set.of(); + } + + @Override + public Set getSubClasses() { + return Set.of(); + } + + @Override + public boolean isClassType() { + return true; + } + + @Override + public Set getInstances() { + return adapter.readInstances(this); + } + + @Override + public List getMethodsByName(String methodName) { + return List.of(); + } + + @Override + public MClass getUSEClass() { + return useClass; + } + + @Override + public void setUSEClass(MClass cls) { + this.useClass = cls; + } + + @Override + public VMField getFieldByName(String javaFieldName) { + PyFieldRaw f = rawType.getFields().stream() + .filter(fi -> fi.getName().equals(javaFieldName)) + .findFirst() + .orElse(null); + return f != null ? new PyField(adapter, f) : null; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java new file mode 100644 index 0000000..925f668 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +import java.util.List; + +public class PyTypeRaw { + private String name; + private List fields; + private List methods; + + public PyTypeRaw(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + public List getMethods() { + return methods; + } + + public void setMethods(List methods) { + this.methods = methods; + } + +} diff --git a/adapter/Python/src/main/resources/protocol/debugProtocol.json b/adapter/Python/src/main/resources/protocol/debugProtocol.json new file mode 100644 index 0000000..17d1467 --- /dev/null +++ b/adapter/Python/src/main/resources/protocol/debugProtocol.json @@ -0,0 +1,4753 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Debug Adapter Protocol", + "description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.", + "type": "object", + + "properties": { + "AttachRequest": { + "$ref": "#/definitions/AttachRequest" + }, + "AttachRequestArguments": { + "$ref": "#/definitions/AttachRequestArguments" + }, + "AttachResponse": { + "$ref": "#/definitions/AttachResponse" + }, + "Breakpoint": { + "$ref": "#/definitions/Breakpoint" + }, + "BreakpointEvent": { + "$ref": "#/definitions/BreakpointEvent" + }, + "BreakpointLocation": { + "$ref": "#/definitions/BreakpointLocation" + }, + "BreakpointLocationsArguments": { + "$ref": "#/definitions/BreakpointLocationsArguments" + }, + "BreakpointLocationsRequest": { + "$ref": "#/definitions/BreakpointLocationsRequest" + }, + "BreakpointLocationsResponse": { + "$ref": "#/definitions/BreakpointLocationsResponse" + }, + "CancelArguments": { + "$ref": "#/definitions/CancelArguments" + }, + "CancelRequest": { + "$ref": "#/definitions/CancelRequest" + }, + "CancelResponse": { + "$ref": "#/definitions/CancelResponse" + }, + "Capabilities": { + "$ref": "#/definitions/Capabilities" + }, + "CapabilitiesEvent": { + "$ref": "#/definitions/CapabilitiesEvent" + }, + "Checksum": { + "$ref": "#/definitions/Checksum" + }, + "ChecksumAlgorithm": { + "$ref": "#/definitions/ChecksumAlgorithm" + }, + "ColumnDescriptor": { + "$ref": "#/definitions/ColumnDescriptor" + }, + "CompletionItem": { + "$ref": "#/definitions/CompletionItem" + }, + "CompletionItemType": { + "$ref": "#/definitions/CompletionItemType" + }, + "CompletionsArguments": { + "$ref": "#/definitions/CompletionsArguments" + }, + "CompletionsRequest": { + "$ref": "#/definitions/CompletionsRequest" + }, + "CompletionsResponse": { + "$ref": "#/definitions/CompletionsResponse" + }, + "ConfigurationDoneArguments": { + "$ref": "#/definitions/ConfigurationDoneArguments" + }, + "ConfigurationDoneRequest": { + "$ref": "#/definitions/ConfigurationDoneRequest" + }, + "ConfigurationDoneResponse": { + "$ref": "#/definitions/ConfigurationDoneResponse" + }, + "ContinueArguments": { + "$ref": "#/definitions/ContinueArguments" + }, + "ContinueRequest": { + "$ref": "#/definitions/ContinueRequest" + }, + "ContinueResponse": { + "$ref": "#/definitions/ContinueResponse" + }, + "ContinuedEvent": { + "$ref": "#/definitions/ContinuedEvent" + }, + "DataBreakpoint": { + "$ref": "#/definitions/DataBreakpoint" + }, + "DataBreakpointAccessType": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "DataBreakpointInfoArguments": { + "$ref": "#/definitions/DataBreakpointInfoArguments" + }, + "DataBreakpointInfoRequest": { + "$ref": "#/definitions/DataBreakpointInfoRequest" + }, + "DataBreakpointInfoResponse": { + "$ref": "#/definitions/DataBreakpointInfoResponse" + }, + "DisassembleArguments": { + "$ref": "#/definitions/DisassembleArguments" + }, + "DisassembleRequest": { + "$ref": "#/definitions/DisassembleRequest" + }, + "DisassembleResponse": { + "$ref": "#/definitions/DisassembleResponse" + }, + "DisassembledInstruction": { + "$ref": "#/definitions/DisassembledInstruction" + }, + "DisconnectArguments": { + "$ref": "#/definitions/DisconnectArguments" + }, + "DisconnectRequest": { + "$ref": "#/definitions/DisconnectRequest" + }, + "DisconnectResponse": { + "$ref": "#/definitions/DisconnectResponse" + }, + "ErrorResponse": { + "$ref": "#/definitions/ErrorResponse" + }, + "EvaluateArguments": { + "$ref": "#/definitions/EvaluateArguments" + }, + "EvaluateRequest": { + "$ref": "#/definitions/EvaluateRequest" + }, + "EvaluateResponse": { + "$ref": "#/definitions/EvaluateResponse" + }, + "Event": { + "$ref": "#/definitions/Event" + }, + "ExceptionBreakMode": { + "$ref": "#/definitions/ExceptionBreakMode" + }, + "ExceptionBreakpointsFilter": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" + }, + "ExceptionDetails": { + "$ref": "#/definitions/ExceptionDetails" + }, + "ExceptionFilterOptions": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "ExceptionInfoArguments": { + "$ref": "#/definitions/ExceptionInfoArguments" + }, + "ExceptionInfoRequest": { + "$ref": "#/definitions/ExceptionInfoRequest" + }, + "ExceptionInfoResponse": { + "$ref": "#/definitions/ExceptionInfoResponse" + }, + "ExceptionOptions": { + "$ref": "#/definitions/ExceptionOptions" + }, + "ExceptionPathSegment": { + "$ref": "#/definitions/ExceptionPathSegment" + }, + "ExitedEvent": { + "$ref": "#/definitions/ExitedEvent" + }, + "FunctionBreakpoint": { + "$ref": "#/definitions/FunctionBreakpoint" + }, + "GotoArguments": { + "$ref": "#/definitions/GotoArguments" + }, + "GotoRequest": { + "$ref": "#/definitions/GotoRequest" + }, + "GotoResponse": { + "$ref": "#/definitions/GotoResponse" + }, + "GotoTarget": { + "$ref": "#/definitions/GotoTarget" + }, + "GotoTargetsArguments": { + "$ref": "#/definitions/GotoTargetsArguments" + }, + "GotoTargetsRequest": { + "$ref": "#/definitions/GotoTargetsRequest" + }, + "GotoTargetsResponse": { + "$ref": "#/definitions/GotoTargetsResponse" + }, + "InitializeRequest": { + "$ref": "#/definitions/InitializeRequest" + }, + "InitializeRequestArguments": { + "$ref": "#/definitions/InitializeRequestArguments" + }, + "InitializeResponse": { + "$ref": "#/definitions/InitializeResponse" + }, + "InitializedEvent": { + "$ref": "#/definitions/InitializedEvent" + }, + "InstructionBreakpoint": { + "$ref": "#/definitions/InstructionBreakpoint" + }, + "InvalidatedAreas": { + "$ref": "#/definitions/InvalidatedAreas" + }, + "InvalidatedEvent": { + "$ref": "#/definitions/InvalidatedEvent" + }, + "LaunchRequest": { + "$ref": "#/definitions/LaunchRequest" + }, + "LaunchRequestArguments": { + "$ref": "#/definitions/LaunchRequestArguments" + }, + "LaunchResponse": { + "$ref": "#/definitions/LaunchResponse" + }, + "LoadedSourceEvent": { + "$ref": "#/definitions/LoadedSourceEvent" + }, + "LoadedSourcesArguments": { + "$ref": "#/definitions/LoadedSourcesArguments" + }, + "LoadedSourcesRequest": { + "$ref": "#/definitions/LoadedSourcesRequest" + }, + "LoadedSourcesResponse": { + "$ref": "#/definitions/LoadedSourcesResponse" + }, + "MemoryEvent": { + "$ref": "#/definitions/MemoryEvent" + }, + "Message": { + "$ref": "#/definitions/Message" + }, + "Module": { + "$ref": "#/definitions/Module" + }, + "ModuleEvent": { + "$ref": "#/definitions/ModuleEvent" + }, + "ModulesArguments": { + "$ref": "#/definitions/ModulesArguments" + }, + "ModulesRequest": { + "$ref": "#/definitions/ModulesRequest" + }, + "ModulesResponse": { + "$ref": "#/definitions/ModulesResponse" + }, + "NextArguments": { + "$ref": "#/definitions/NextArguments" + }, + "NextRequest": { + "$ref": "#/definitions/NextRequest" + }, + "NextResponse": { + "$ref": "#/definitions/NextResponse" + }, + "OutputEvent": { + "$ref": "#/definitions/OutputEvent" + }, + "PauseArguments": { + "$ref": "#/definitions/PauseArguments" + }, + "PauseRequest": { + "$ref": "#/definitions/PauseRequest" + }, + "PauseResponse": { + "$ref": "#/definitions/PauseResponse" + }, + "ProcessEvent": { + "$ref": "#/definitions/ProcessEvent" + }, + "ProgressEndEvent": { + "$ref": "#/definitions/ProgressEndEvent" + }, + "ProgressStartEvent": { + "$ref": "#/definitions/ProgressStartEvent" + }, + "ProgressUpdateEvent": { + "$ref": "#/definitions/ProgressUpdateEvent" + }, + "ProtocolMessage": { + "$ref": "#/definitions/ProtocolMessage" + }, + "ReadMemoryArguments": { + "$ref": "#/definitions/ReadMemoryArguments" + }, + "ReadMemoryRequest": { + "$ref": "#/definitions/ReadMemoryRequest" + }, + "ReadMemoryResponse": { + "$ref": "#/definitions/ReadMemoryResponse" + }, + "Request": { + "$ref": "#/definitions/Request" + }, + "Response": { + "$ref": "#/definitions/Response" + }, + "RestartArguments": { + "$ref": "#/definitions/RestartArguments" + }, + "RestartFrameArguments": { + "$ref": "#/definitions/RestartFrameArguments" + }, + "RestartFrameRequest": { + "$ref": "#/definitions/RestartFrameRequest" + }, + "RestartFrameResponse": { + "$ref": "#/definitions/RestartFrameResponse" + }, + "RestartRequest": { + "$ref": "#/definitions/RestartRequest" + }, + "RestartResponse": { + "$ref": "#/definitions/RestartResponse" + }, + "ReverseContinueArguments": { + "$ref": "#/definitions/ReverseContinueArguments" + }, + "ReverseContinueRequest": { + "$ref": "#/definitions/ReverseContinueRequest" + }, + "ReverseContinueResponse": { + "$ref": "#/definitions/ReverseContinueResponse" + }, + "RunInTerminalRequest": { + "$ref": "#/definitions/RunInTerminalRequest" + }, + "RunInTerminalRequestArguments": { + "$ref": "#/definitions/RunInTerminalRequestArguments" + }, + "RunInTerminalResponse": { + "$ref": "#/definitions/RunInTerminalResponse" + }, + "Scope": { + "$ref": "#/definitions/Scope" + }, + "ScopesArguments": { + "$ref": "#/definitions/ScopesArguments" + }, + "ScopesRequest": { + "$ref": "#/definitions/ScopesRequest" + }, + "ScopesResponse": { + "$ref": "#/definitions/ScopesResponse" + }, + "SetBreakpointsArguments": { + "$ref": "#/definitions/SetBreakpointsArguments" + }, + "SetBreakpointsRequest": { + "$ref": "#/definitions/SetBreakpointsRequest" + }, + "SetBreakpointsResponse": { + "$ref": "#/definitions/SetBreakpointsResponse" + }, + "SetDataBreakpointsArguments": { + "$ref": "#/definitions/SetDataBreakpointsArguments" + }, + "SetDataBreakpointsRequest": { + "$ref": "#/definitions/SetDataBreakpointsRequest" + }, + "SetDataBreakpointsResponse": { + "$ref": "#/definitions/SetDataBreakpointsResponse" + }, + "SetExceptionBreakpointsArguments": { + "$ref": "#/definitions/SetExceptionBreakpointsArguments" + }, + "SetExceptionBreakpointsRequest": { + "$ref": "#/definitions/SetExceptionBreakpointsRequest" + }, + "SetExceptionBreakpointsResponse": { + "$ref": "#/definitions/SetExceptionBreakpointsResponse" + }, + "SetExpressionArguments": { + "$ref": "#/definitions/SetExpressionArguments" + }, + "SetExpressionRequest": { + "$ref": "#/definitions/SetExpressionRequest" + }, + "SetExpressionResponse": { + "$ref": "#/definitions/SetExpressionResponse" + }, + "SetFunctionBreakpointsArguments": { + "$ref": "#/definitions/SetFunctionBreakpointsArguments" + }, + "SetFunctionBreakpointsRequest": { + "$ref": "#/definitions/SetFunctionBreakpointsRequest" + }, + "SetFunctionBreakpointsResponse": { + "$ref": "#/definitions/SetFunctionBreakpointsResponse" + }, + "SetInstructionBreakpointsArguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" + }, + "SetInstructionBreakpointsRequest": { + "$ref": "#/definitions/SetInstructionBreakpointsRequest" + }, + "SetInstructionBreakpointsResponse": { + "$ref": "#/definitions/SetInstructionBreakpointsResponse" + }, + "SetVariableArguments": { + "$ref": "#/definitions/SetVariableArguments" + }, + "SetVariableRequest": { + "$ref": "#/definitions/SetVariableRequest" + }, + "SetVariableResponse": { + "$ref": "#/definitions/SetVariableResponse" + }, + "Source": { + "$ref": "#/definitions/Source" + }, + "SourceArguments": { + "$ref": "#/definitions/SourceArguments" + }, + "SourceBreakpoint": { + "$ref": "#/definitions/SourceBreakpoint" + }, + "SourceRequest": { + "$ref": "#/definitions/SourceRequest" + }, + "SourceResponse": { + "$ref": "#/definitions/SourceResponse" + }, + "StackFrame": { + "$ref": "#/definitions/StackFrame" + }, + "StackFrameFormat": { + "$ref": "#/definitions/StackFrameFormat" + }, + "StackTraceArguments": { + "$ref": "#/definitions/StackTraceArguments" + }, + "StackTraceRequest": { + "$ref": "#/definitions/StackTraceRequest" + }, + "StackTraceResponse": { + "$ref": "#/definitions/StackTraceResponse" + }, + "StartDebuggingRequest": { + "$ref": "#/definitions/StartDebuggingRequest" + }, + "StartDebuggingRequestArguments": { + "$ref": "#/definitions/StartDebuggingRequestArguments" + }, + "StartDebuggingResponse": { + "$ref": "#/definitions/StartDebuggingResponse" + }, + "StepBackArguments": { + "$ref": "#/definitions/StepBackArguments" + }, + "StepBackRequest": { + "$ref": "#/definitions/StepBackRequest" + }, + "StepBackResponse": { + "$ref": "#/definitions/StepBackResponse" + }, + "StepInArguments": { + "$ref": "#/definitions/StepInArguments" + }, + "StepInRequest": { + "$ref": "#/definitions/StepInRequest" + }, + "StepInResponse": { + "$ref": "#/definitions/StepInResponse" + }, + "StepInTarget": { + "$ref": "#/definitions/StepInTarget" + }, + "StepInTargetsArguments": { + "$ref": "#/definitions/StepInTargetsArguments" + }, + "StepInTargetsRequest": { + "$ref": "#/definitions/StepInTargetsRequest" + }, + "StepInTargetsResponse": { + "$ref": "#/definitions/StepInTargetsResponse" + }, + "StepOutArguments": { + "$ref": "#/definitions/StepOutArguments" + }, + "StepOutRequest": { + "$ref": "#/definitions/StepOutRequest" + }, + "StepOutResponse": { + "$ref": "#/definitions/StepOutResponse" + }, + "SteppingGranularity": { + "$ref": "#/definitions/SteppingGranularity" + }, + "StoppedEvent": { + "$ref": "#/definitions/StoppedEvent" + }, + "TerminateArguments": { + "$ref": "#/definitions/TerminateArguments" + }, + "TerminateRequest": { + "$ref": "#/definitions/TerminateRequest" + }, + "TerminateResponse": { + "$ref": "#/definitions/TerminateResponse" + }, + "TerminateThreadsArguments": { + "$ref": "#/definitions/TerminateThreadsArguments" + }, + "TerminateThreadsRequest": { + "$ref": "#/definitions/TerminateThreadsRequest" + }, + "TerminateThreadsResponse": { + "$ref": "#/definitions/TerminateThreadsResponse" + }, + "TerminatedEvent": { + "$ref": "#/definitions/TerminatedEvent" + }, + "Thread": { + "$ref": "#/definitions/Thread" + }, + "ThreadEvent": { + "$ref": "#/definitions/ThreadEvent" + }, + "ThreadsRequest": { + "$ref": "#/definitions/ThreadsRequest" + }, + "ThreadsResponse": { + "$ref": "#/definitions/ThreadsResponse" + }, + "ValueFormat": { + "$ref": "#/definitions/ValueFormat" + }, + "Variable": { + "$ref": "#/definitions/Variable" + }, + "VariablePresentationHint": { + "$ref": "#/definitions/VariablePresentationHint" + }, + "VariablesArguments": { + "$ref": "#/definitions/VariablesArguments" + }, + "VariablesRequest": { + "$ref": "#/definitions/VariablesRequest" + }, + "VariablesResponse": { + "$ref": "#/definitions/VariablesResponse" + }, + "WriteMemoryArguments": { + "$ref": "#/definitions/WriteMemoryArguments" + }, + "WriteMemoryRequest": { + "$ref": "#/definitions/WriteMemoryRequest" + }, + "WriteMemoryResponse": { + "$ref": "#/definitions/WriteMemoryResponse" + } + }, + + "definitions": { + + "ProtocolMessage": { + "type": "object", + "title": "Base Protocol", + "description": "Base class of requests, responses, and events.", + "properties": { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "description": "Message type.", + "_enum": [ "request", "response", "event" ] + } + }, + "required": [ "seq", "type" ] + }, + + "Request": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "A client or debug adapter initiated request.", + "properties": { + "type": { + "type": "string", + "enum": [ "request" ] + }, + "command": { + "type": "string", + "description": "The command to execute." + }, + "arguments": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Object containing arguments for the command." + } + }, + "required": [ "type", "command" ] + }] + }, + + "Event": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "A debug adapter initiated event.", + "properties": { + "type": { + "type": "string", + "enum": [ "event" ] + }, + "event": { + "type": "string", + "description": "Type of event." + }, + "body": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Event-specific information." + } + }, + "required": [ "type", "event" ] + }] + }, + + "Response": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "Response for a request.", + "properties": { + "type": { + "type": "string", + "enum": [ "response" ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." + }, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf true, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." + }, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": [ "cancelled", "notStopped" ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] + }, + "body": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Contains request result if success is true and error details if success is false." + } + }, + "required": [ "type", "request_seq", "success", "command" ] + }] + }, + + "ErrorResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "On error (whenever `success` is false), the body can provide more details.", + "properties": { + "body": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Message", + "description": "A structured error message." + } + } + } + }, + "required": [ "body" ] + }] + }, + + "CancelRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `cancel` request is used by the client in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence.\nClients should only call this request if the corresponding capability `supportsCancelRequest` is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honoring this request but there are no guarantees.\nThe `cancel` request may return an error if it could not cancel an operation but a client should refrain from presenting this error to end users.\nThe request that got cancelled still needs to send a response back. This can either be a normal result (`success` attribute true) or an error response (`success` attribute false and the `message` set to `cancelled`).\nReturning partial results from a cancelled request is possible but please note that a client has no generic way for detecting that a response is partial or not.\nThe progress that got cancelled still needs to send a `progressEnd` event back.\n A client should not assume that progress just got cancelled after sending the `cancel` request.", + "properties": { + "command": { + "type": "string", + "enum": [ "cancel" ] + }, + "arguments": { + "$ref": "#/definitions/CancelArguments" + } + }, + "required": [ "command" ] + }] + }, + "CancelArguments": { + "type": "object", + "description": "Arguments for `cancel` request.", + "properties": { + "requestId": { + "type": "integer", + "description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." + }, + "progressId": { + "type": "string", + "description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." + } + } + }, + "CancelResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `cancel` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "InitializedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "title": "Events", + "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends `initialized` event (after the `initialize` request has returned)\n- client sends zero or more `setBreakpoints` requests\n- client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)\n- client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)\n- client sends other future configuration requests\n- client sends one `configurationDone` request to indicate the end of the configuration.", + "properties": { + "event": { + "type": "string", + "enum": [ "initialized" ] + } + }, + "required": [ "event" ] + }] + }, + + "StoppedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.", + "properties": { + "event": { + "type": "string", + "enum": [ "stopped" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).", + "_enum": [ "step", "breakpoint", "exception", "pause", "entry", "goto", "function breakpoint", "data breakpoint", "instruction breakpoint" ] + }, + "description": { + "type": "string", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated." + }, + "threadId": { + "type": "integer", + "description": "The thread which was stopped." + }, + "preserveFocusHint": { + "type": "boolean", + "description": "A value of true hints to the client that this event should not change the focus." + }, + "text": { + "type": "string", + "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI." + }, + "allThreadsStopped": { + "type": "boolean", + "description": "If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded." + }, + "hitBreakpointIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." + } + }, + "required": [ "reason" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ContinuedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. `launch` or `continue`.\nIt is only necessary to send a `continued` event if there was no previous request that implied this.", + "properties": { + "event": { + "type": "string", + "enum": [ "continued" ] + }, + "body": { + "type": "object", + "properties": { + "threadId": { + "type": "integer", + "description": "The thread which was continued." + }, + "allThreadsContinued": { + "type": "boolean", + "description": "If `allThreadsContinued` is true, a debug adapter can announce that all threads have continued." + } + }, + "required": [ "threadId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ExitedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the debuggee has exited and returns its exit code.", + "properties": { + "event": { + "type": "string", + "enum": [ "exited" ] + }, + "body": { + "type": "object", + "properties": { + "exitCode": { + "type": "integer", + "description": "The exit code returned from the debuggee." + } + }, + "required": [ "exitCode" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "TerminatedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.", + "properties": { + "event": { + "type": "string", + "enum": [ "terminated" ] + }, + "body": { + "type": "object", + "properties": { + "restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests." + } + } + } + }, + "required": [ "event" ] + }] + }, + + "ThreadEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that a thread has started or exited.", + "properties": { + "event": { + "type": "string", + "enum": [ "thread" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ "started", "exited" ] + }, + "threadId": { + "type": "integer", + "description": "The identifier of the thread." + } + }, + "required": ["reason", "threadId"] + } + }, + "required": [ "event", "body" ] + }] + }, + + "OutputEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the target has produced some output.", + "properties": { + "event": { + "type": "string", + "enum": [ "output" ] + }, + "body": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.", + "_enum": [ "console", "important", "stdout", "stderr", "telemetry" ], + "enumDescriptions": [ + "Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).", + "A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.", + "Show the output as normal program output from the debuggee.", + "Show the output as error program output from the debuggee.", + "Send the output to telemetry instead of showing it to the user." + ] + }, + "output": { + "type": "string", + "description": "The output to report." + }, + "group": { + "type": "string", + "description": "Support for keeping an output log organized by grouping related messages.", + "enum": [ "start", "startCollapsed", "end" ], + "enumDescriptions": [ + "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.", + "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.", + "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group." + ] + }, + "variablesReference": { + "type": "integer", + "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source location where the output was produced." + }, + "line": { + "type": "integer", + "description": "The source location's line where the output was produced." + }, + "column": { + "type": "integer", + "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "data": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format." + } + }, + "required": ["output"] + } + }, + "required": [ "event", "body" ] + }] + }, + + "BreakpointEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some information about a breakpoint has changed.", + "properties": { + "event": { + "type": "string", + "enum": [ "breakpoint" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ "changed", "new", "removed" ] + }, + "breakpoint": { + "$ref": "#/definitions/Breakpoint", + "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values." + } + }, + "required": [ "reason", "breakpoint" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ModuleEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some information about a module has changed.", + "properties": { + "event": { + "type": "string", + "enum": [ "module" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ "new", "changed", "removed" ] + }, + "module": { + "$ref": "#/definitions/Module", + "description": "The new, changed, or removed module. In case of `removed` only the module id is used." + } + }, + "required": [ "reason", "module" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "LoadedSourceEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.", + "properties": { + "event": { + "type": "string", + "enum": [ "loadedSource" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ "new", "changed", "removed" ] + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The new, changed, or removed source." + } + }, + "required": [ "reason", "source" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProcessEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.", + "properties": { + "event": { + "type": "string", + "enum": [ "process" ] + }, + "body": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." + }, + "systemProcessId": { + "type": "integer", + "description": "The system process id of the debugged process. This property is missing for non-system processes." + }, + "isLocalProcess": { + "type": "boolean", + "description": "If true, the process is running on the same computer as the debug adapter." + }, + "startMethod": { + "type": "string", + "enum": [ "launch", "attach", "attachForSuspendedLaunch" ], + "description": "Describes how the debug engine started debugging this process.", + "enumDescriptions": [ + "Process was launched under the debugger.", + "Debugger attached to an existing process.", + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." + ] + }, + "pointerSize": { + "type": "integer", + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." + } + }, + "required": [ "name" ] + } + }, + "required": [ "event", "body" ] + } + ] + }, + + "CapabilitiesEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.", + "properties": { + "event": { + "type": "string", + "enum": [ "capabilities" ] + }, + "body": { + "type": "object", + "properties": { + "capabilities": { + "$ref": "#/definitions/Capabilities", + "description": "The set of updated capabilities." + } + }, + "required": [ "capabilities" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressStartEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressStart" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." + }, + "title": { + "type": "string", + "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation." + }, + "requestId": { + "type": "integer", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." + }, + "cancellable": { + "type": "boolean", + "description": "If true, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." + }, + "message": { + "type": "string", + "description": "More detailed progress message." + }, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } + }, + "required": [ "progressId", "title" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressUpdateEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals that the progress reporting needs to be updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressUpdate" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `progressStart` event." + }, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + }, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } + }, + "required": [ "progressId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressEndEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals the end of the progress reporting with a final message.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressEnd" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `ProgressStartEvent`." + }, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + } + }, + "required": [ "progressId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "InvalidatedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.", + "properties": { + "event": { + "type": "string", + "enum": [ "invalidated" ] + }, + "body": { + "type": "object", + "properties": { + "areas": { + "type": "array", + "description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.", + "items": { + "$ref": "#/definitions/InvalidatedAreas" + } + }, + "threadId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this thread." + }, + "stackFrameId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored)." + } + } + } + }, + "required": [ "event", "body" ] + }] + }, + + "MemoryEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.\nClients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap.\nDebug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.", + "properties": { + "event": { + "type": "string", + "enum": [ "memory" ] + }, + "body": { + "type": "object", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference of a memory range that has been updated." + }, + "offset": { + "type": "integer", + "description": "Starting offset in bytes where memory has been updated. Can be negative." + }, + "count": { + "type": "integer", + "description": "Number of bytes updated." + } + }, + "required": [ "memoryReference", "offset", "count" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "RunInTerminalRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "title": "Reverse Requests", + "description": "This request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true.\nClient implementations of `runInTerminal` are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell.\nSome users may wish to take advantage of shell processing in the argument strings. For clients which implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.", + "properties": { + "command": { + "type": "string", + "enum": [ "runInTerminal" ] + }, + "arguments": { + "$ref": "#/definitions/RunInTerminalRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "RunInTerminalRequestArguments": { + "type": "object", + "description": "Arguments for `runInTerminal` request.", + "properties": { + "kind": { + "type": "string", + "enum": [ "integrated", "external" ], + "description": "What kind of terminal to launch. Defaults to `integrated` if not specified." + }, + "title": { + "type": "string", + "description": "Title of the terminal." + }, + "cwd": { + "type": "string", + "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of arguments. The first argument is the command to run." + }, + "env": { + "type": "object", + "description": "Environment key-value pairs that are added to or removed from the default environment.", + "additionalProperties": { + "type": [ "string", "null" ], + "description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment." + } + }, + "argsCanBeInterpretedByShell": { + "type": "boolean", + "description": "This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells." + } + }, + "required": [ "args", "cwd" ] + }, + "RunInTerminalResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `runInTerminal` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "processId": { + "type": "integer", + "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." + }, + "shellProcessId": { + "type": "integer", + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." + } + } + } + }, + "required": [ "body" ] + }] + }, + "StartDebuggingRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.\nThis request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true.\nA client implementation of `startDebugging` should start a new debug session (of the same type as the caller) in the same way that the caller's session was started. If the client supports hierarchical debug sessions, the newly created session can be treated as a child of the caller session.", + "properties": { + "command": { + "type": "string", + "enum": [ + "startDebugging" + ] + }, + "arguments": { + "$ref": "#/definitions/StartDebuggingRequestArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "StartDebuggingRequestArguments": { + "type": "object", + "description": "Arguments for `startDebugging` request.", + "properties": { + "configuration": { + "type": "object", + "additionalProperties": true, + "description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables')." + }, + "request": { + "type": "string", + "enum": [ + "launch", + "attach" + ], + "description": "Indicates whether the new debug session should be started with a `launch` or `attach` request." + } + }, + "required": [ + "configuration", + "request" + ] + }, + "StartDebuggingResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to `startDebugging` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + + "InitializeRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "title": "Requests", + "description": "The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response.\nThe `initialize` request may only be sent once.", + "properties": { + "command": { + "type": "string", + "enum": [ "initialize" ] + }, + "arguments": { + "$ref": "#/definitions/InitializeRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "InitializeRequestArguments": { + "type": "object", + "description": "Arguments for `initialize` request.", + "properties": { + "clientID": { + "type": "string", + "description": "The ID of the client using this adapter." + }, + "clientName": { + "type": "string", + "description": "The human-readable name of the client using this adapter." + }, + "adapterID": { + "type": "string", + "description": "The ID of the debug adapter." + }, + "locale": { + "type": "string", + "description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH." + }, + "linesStartAt1": { + "type": "boolean", + "description": "If true all line numbers are 1-based (default)." + }, + "columnsStartAt1": { + "type": "boolean", + "description": "If true all column numbers are 1-based (default)." + }, + "pathFormat": { + "type": "string", + "_enum": [ "path", "uri" ], + "description": "Determines in what format paths are specified. The default is `path`, which is the native format." + }, + "supportsVariableType": { + "type": "boolean", + "description": "Client supports the `type` attribute for variables." + }, + "supportsVariablePaging": { + "type": "boolean", + "description": "Client supports the paging of variables." + }, + "supportsRunInTerminalRequest": { + "type": "boolean", + "description": "Client supports the `runInTerminal` request." + }, + "supportsMemoryReferences": { + "type": "boolean", + "description": "Client supports memory references." + }, + "supportsProgressReporting": { + "type": "boolean", + "description": "Client supports progress reporting." + }, + "supportsInvalidatedEvent": { + "type": "boolean", + "description": "Client supports the `invalidated` event." + }, + "supportsMemoryEvent": { + "type": "boolean", + "description": "Client supports the `memory` event." + }, + "supportsArgsCanBeInterpretedByShell": { + "type": "boolean", + "description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request." + }, + "supportsStartDebuggingRequest": { + "type": "boolean", + "description": "Client supports the `startDebugging` request." + } + }, + "required": [ "adapterID" ] + }, + "InitializeResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `initialize` request.", + "properties": { + "body": { + "$ref": "#/definitions/Capabilities", + "description": "The capabilities of this debug adapter." + } + } + }] + }, + + "ConfigurationDoneRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the `initialized` event).\nClients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "configurationDone" ] + }, + "arguments": { + "$ref": "#/definitions/ConfigurationDoneArguments" + } + }, + "required": [ "command" ] + }] + }, + "ConfigurationDoneArguments": { + "type": "object", + "description": "Arguments for `configurationDone` request." + }, + "ConfigurationDoneResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `configurationDone` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "LaunchRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { + "type": "string", + "enum": [ "launch" ] + }, + "arguments": { + "$ref": "#/definitions/LaunchRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "LaunchRequestArguments": { + "type": "object", + "description": "Arguments for `launch` request. Additional attributes are implementation specific.", + "properties": { + "noDebug": { + "type": "boolean", + "description": "If true, the launch request should launch the program without enabling debugging." + }, + "__restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." + } + } + }, + "LaunchResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `launch` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "AttachRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { + "type": "string", + "enum": [ "attach" ] + }, + "arguments": { + "$ref": "#/definitions/AttachRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "AttachRequestArguments": { + "type": "object", + "description": "Arguments for `attach` request. Additional attributes are implementation specific.", + "properties": { + "__restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." + } + } + }, + "AttachResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `attach` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "RestartRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Restarts a debug session. Clients should only call this request if the corresponding capability `supportsRestartRequest` is true.\nIf the capability is missing or has the value false, a typical client emulates `restart` by terminating the debug adapter first and then launching it anew.", + "properties": { + "command": { + "type": "string", + "enum": [ "restart" ] + }, + "arguments": { + "$ref": "#/definitions/RestartArguments" + } + }, + "required": [ "command" ] + }] + }, + "RestartArguments": { + "type": "object", + "description": "Arguments for `restart` request.", + "properties": { + "arguments": { + "oneOf": [ + { "$ref": "#/definitions/LaunchRequestArguments" }, + { "$ref": "#/definitions/AttachRequestArguments" } + ], + "description": "The latest version of the `launch` or `attach` configuration." + } + } + }, + "RestartResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `restart` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "DisconnectRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).\nIn addition, the debug adapter must terminate the debuggee if it was started with the `launch` request. If an `attach` request was used to connect to the debuggee, then the debug adapter must not terminate the debuggee.\nThis implicit behavior of when to terminate the debuggee can be overridden with the `terminateDebuggee` argument (which is only supported by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true).", + "properties": { + "command": { + "type": "string", + "enum": [ "disconnect" ] + }, + "arguments": { + "$ref": "#/definitions/DisconnectArguments" + } + }, + "required": [ "command" ] + }] + }, + "DisconnectArguments": { + "type": "object", + "description": "Arguments for `disconnect` request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this `disconnect` request is part of a restart sequence." + }, + "terminateDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true." + }, + "suspendDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true." + } + } + }, + "DisconnectResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `disconnect` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "TerminateRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `terminate` request is sent from the client to the debug adapter in order to shut down the debuggee gracefully. Clients should only call this request if the capability `supportsTerminateRequest` is true.\nTypically a debug adapter implements `terminate` by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself.\nPlease note that this request does not directly affect the state of the debug session: if the debuggee decides to veto the graceful shutdown for any reason by not terminating itself, then the debug session just continues.\nClients can surface the `terminate` request as an explicit command or they can integrate it into a two stage Stop command that first sends `terminate` to request a graceful shutdown, and if that fails uses `disconnect` for a forceful shutdown.", + "properties": { + "command": { + "type": "string", + "enum": [ "terminate" ] + }, + "arguments": { + "$ref": "#/definitions/TerminateArguments" + } + }, + "required": [ "command" ] + }] + }, + "TerminateArguments": { + "type": "object", + "description": "Arguments for `terminate` request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this `terminate` request is part of a restart sequence." + } + } + }, + "TerminateResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `terminate` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "BreakpointLocationsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `breakpointLocations` request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the corresponding capability `supportsBreakpointLocationsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "breakpointLocations" ] + }, + "arguments": { + "$ref": "#/definitions/BreakpointLocationsArguments" + } + }, + "required": [ "command" ] + }] + + }, + "BreakpointLocationsArguments": { + "type": "object", + "description": "Arguments for `breakpointLocations` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified." + }, + "line": { + "type": "integer", + "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." + }, + "column": { + "type": "integer", + "description": "Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed." + }, + "endLine": { + "type": "integer", + "description": "End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." + }, + "endColumn": { + "type": "integer", + "description": "End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed." + } + }, + "required": [ "source", "line" ] + }, + "BreakpointLocationsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `breakpointLocations` request.\nContains possible locations for source breakpoints.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/BreakpointLocation" + }, + "description": "Sorted set of possible breakpoint locations." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.\nTo clear all breakpoint for a source, specify an empty array.\nWhen a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated.", + "properties": { + "command": { + "type": "string", + "enum": [ "setBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setBreakpoints` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified." + }, + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/SourceBreakpoint" + }, + "description": "The code locations of the breakpoints." + }, + "lines": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Deprecated: The code locations of the breakpoints." + }, + "sourceModified": { + "type": "boolean", + "description": "A value of true indicates that the underlying source has been modified which results in new breakpoint locations." + } + }, + "required": [ "source" ] + }, + "SetBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setBreakpoints` request.\nReturned is information about each breakpoint created by this request.\nThis includes the actual code location and whether the breakpoint could be verified.\nThe breakpoints returned are in the same order as the elements of the `breakpoints`\n(or the deprecated `lines`) array in the arguments.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetFunctionBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsFunctionBreakpoints` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setFunctionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetFunctionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetFunctionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setFunctionBreakpoints` request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/FunctionBreakpoint" + }, + "description": "The function names of the breakpoints." + } + }, + "required": [ "breakpoints" ] + }, + "SetFunctionBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setFunctionBreakpoints` request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetExceptionBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request configures the debugger's response to thrown exceptions.\nIf an exception is configured to break, a `stopped` event is fired (with reason `exception`).\nClients should only call this request if the corresponding capability `exceptionBreakpointFilters` returns one or more filters.", + "properties": { + "command": { + "type": "string", + "enum": [ "setExceptionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetExceptionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetExceptionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setExceptionBreakpoints` request.", + "properties": { + "filters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive." + }, + "filterOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive." + }, + "exceptionOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionOptions" + }, + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true." + } + }, + "required": [ "filters" ] + }, + "SetExceptionBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setExceptionBreakpoints` request.\nThe response contains an array of `Breakpoint` objects with information about each exception breakpoint or filter. The `Breakpoint` objects are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays given as arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.\nThe `verified` property of a `Breakpoint` object signals whether the exception breakpoint or filter could be successfully created and whether the condition is valid. In case of an error the `message` property explains the problem. The `id` property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.\nFor backward compatibility both the `breakpoints` array and the enclosing `body` are optional. If these elements are missing a client is not able to show problems for individual exception breakpoints or filters.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information." + } + } + } + } + }] + }, + + "DataBreakpointInfoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "dataBreakpointInfo" ] + }, + "arguments": { + "$ref": "#/definitions/DataBreakpointInfoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "DataBreakpointInfoArguments": { + "type": "object", + "description": "Arguments for `dataBreakpointInfo` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "name": { + "type": "string", + "description": "The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression." + }, + "frameId": { + "type": "integer", + "description": "When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect." + } + }, + "required": [ "name" ] + }, + "DataBreakpointInfoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `dataBreakpointInfo` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "dataId": { + "type": [ "string", "null" ], + "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`." + }, + "description": { + "type": "string", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." + }, + "accessTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information." + }, + "canPersist": { + "type": "boolean", + "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions." + } + }, + "required": [ "dataId", "description" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetDataBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setDataBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetDataBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetDataBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setDataBreakpoints` request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpoint" + }, + "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." + } + }, + "required": [ "breakpoints" ] + }, + "SetDataBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setDataBreakpoints` request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetInstructionBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a `stopped` event (with reason `instruction breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsInstructionBreakpoints` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setInstructionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetInstructionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setInstructionBreakpoints` request", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/InstructionBreakpoint" + }, + "description": "The instruction references of the breakpoints" + } + }, + "required": ["breakpoints"] + }, + "SetInstructionBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setInstructionBreakpoints` request", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "ContinueRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request resumes execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.", + "properties": { + "command": { + "type": "string", + "enum": [ "continue" ] + }, + "arguments": { + "$ref": "#/definitions/ContinueArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ContinueArguments": { + "type": "object", + "description": "Arguments for `continue` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, execution is resumed only for the thread with given `threadId`." + } + }, + "required": [ "threadId" ] + }, + "ContinueResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `continue` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "allThreadsContinued": { + "type": "boolean", + "description": "The value true (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed." + } + } + } + }, + "required": [ "body" ] + }] + }, + + "NextRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.", + "properties": { + "command": { + "type": "string", + "enum": [ "next" ] + }, + "arguments": { + "$ref": "#/definitions/NextArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "NextArguments": { + "type": "object", + "description": "Arguments for `next` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": [ "threadId" ] + }, + "NextResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `next` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepInRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nIf the request cannot step into a target, `stepIn` behaves like the `next` request.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.\nIf there are multiple function/method calls (or other targets) on the source line,\nthe argument `targetId` can be used to control into which target the `stepIn` should occur.\nThe list of possible targets for a given source line can be retrieved via the `stepInTargets` request.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepIn" ] + }, + "arguments": { + "$ref": "#/definitions/StepInArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepInArguments": { + "type": "object", + "description": "Arguments for `stepIn` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step-into (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "targetId": { + "type": "integer", + "description": "Id of the target to step into." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepInResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stepIn` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepOutRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepOut" ] + }, + "arguments": { + "$ref": "#/definitions/StepOutArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepOutArguments": { + "type": "object", + "description": "Arguments for `stepOut` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step-out (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepOutResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stepOut` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepBackRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request executes one backward step (in the given granularity) for the specified thread and allows all other threads to run backward freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.\nClients should only call this request if the corresponding capability `supportsStepBack` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepBack" ] + }, + "arguments": { + "$ref": "#/definitions/StepBackArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepBackArguments": { + "type": "object", + "description": "Arguments for `stepBack` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step backwards (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepBackResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stepBack` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "ReverseContinueRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request resumes backward execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.\nClients should only call this request if the corresponding capability `supportsStepBack` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "reverseContinue" ] + }, + "arguments": { + "$ref": "#/definitions/ReverseContinueArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ReverseContinueArguments": { + "type": "object", + "description": "Arguments for `reverseContinue` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, backward execution is resumed only for the thread with given `threadId`." + } + + }, + "required": [ "threadId" ] + }, + "ReverseContinueResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `reverseContinue` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "RestartFrameRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request restarts execution of the specified stack frame.\nThe debug adapter first sends the response and then a `stopped` event (with reason `restart`) after the restart has completed.\nClients should only call this request if the corresponding capability `supportsRestartFrame` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "restartFrame" ] + }, + "arguments": { + "$ref": "#/definitions/RestartFrameArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "RestartFrameArguments": { + "type": "object", + "description": "Arguments for `restartFrame` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + } + }, + "required": [ "frameId" ] + }, + "RestartFrameResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `restartFrame` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "GotoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to execute code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a `stopped` event with reason `goto`.\nClients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true (because only then goto targets exist that can be passed as arguments).", + "properties": { + "command": { + "type": "string", + "enum": [ "goto" ] + }, + "arguments": { + "$ref": "#/definitions/GotoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "GotoArguments": { + "type": "object", + "description": "Arguments for `goto` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Set the goto target for this thread." + }, + "targetId": { + "type": "integer", + "description": "The location where the debuggee will continue to run." + } + }, + "required": [ "threadId", "targetId" ] + }, + "GotoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `goto` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "PauseRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request suspends the debuggee.\nThe debug adapter first sends the response and then a `stopped` event (with reason `pause`) after the thread has been paused successfully.", + "properties": { + "command": { + "type": "string", + "enum": [ "pause" ] + }, + "arguments": { + "$ref": "#/definitions/PauseArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "PauseArguments": { + "type": "object", + "description": "Arguments for `pause` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Pause execution for this thread." + } + }, + "required": [ "threadId" ] + }, + "PauseResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `pause` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StackTraceRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance-conscious clients and if the corresponding capability `supportsDelayedStackTraceLoading` is true, stack frames can be retrieved in a piecemeal way with the `startFrame` and `levels` arguments. The response of the `stackTrace` request may contain a `totalFrames` property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of `totalFrames` decide how to proceed. In any case a client should be prepared to receive fewer frames than requested, which is an indication that the end of the stack has been reached.", + "properties": { + "command": { + "type": "string", + "enum": [ "stackTrace" ] + }, + "arguments": { + "$ref": "#/definitions/StackTraceArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StackTraceArguments": { + "type": "object", + "description": "Arguments for `stackTrace` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Retrieve the stacktrace for this thread." + }, + "startFrame": { + "type": "integer", + "description": "The index of the first frame to return; if omitted frames start at 0." + }, + "levels": { + "type": "integer", + "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." + }, + "format": { + "$ref": "#/definitions/StackFrameFormat", + "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": [ "threadId" ] + }, + "StackTraceResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stackTrace` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "stackFrames": { + "type": "array", + "items": { + "$ref": "#/definitions/StackFrame" + }, + "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available." + }, + "totalFrames": { + "type": "integer", + "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client." + } + }, + "required": [ "stackFrames" ] + } + }, + "required": [ "body" ] + }] + }, + + "ScopesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request returns the variable scopes for a given stack frame ID.", + "properties": { + "command": { + "type": "string", + "enum": [ "scopes" ] + }, + "arguments": { + "$ref": "#/definitions/ScopesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ScopesArguments": { + "type": "object", + "description": "Arguments for `scopes` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + } + }, + "required": [ "frameId" ] + }, + "ScopesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `scopes` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "items": { + "$ref": "#/definitions/Scope" + }, + "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available." + } + }, + "required": [ "scopes" ] + } + }, + "required": [ "body" ] + }] + }, + + "VariablesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves all child variables for the given variable reference.\nA filter can be used to limit the fetched children to either named or indexed children.", + "properties": { + "command": { + "type": "string", + "enum": [ "variables" ] + }, + "arguments": { + "$ref": "#/definitions/VariablesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "VariablesArguments": { + "type": "object", + "description": "Arguments for `variables` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "filter": { + "type": "string", + "enum": [ "indexed", "named" ], + "description": "Filter to limit the child variables to either named or indexed. If omitted, both types are fetched." + }, + "start": { + "type": "integer", + "description": "The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true." + }, + "count": { + "type": "integer", + "description": "The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": [ "variablesReference" ] + }, + "VariablesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `variables` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "variables": { + "type": "array", + "items": { + "$ref": "#/definitions/Variable" + }, + "description": "All (or a range) of variables for the given variable reference." + } + }, + "required": [ "variables" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetVariableRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the corresponding capability `supportsSetVariable` is true.\nIf a debug adapter implements both `setVariable` and `setExpression`, a client will only use `setExpression` if the variable has an `evaluateName` property.", + "properties": { + "command": { + "type": "string", + "enum": [ "setVariable" ] + }, + "arguments": { + "$ref": "#/definitions/SetVariableArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetVariableArguments": { + "type": "object", + "description": "Arguments for `setVariable` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "name": { + "type": "string", + "description": "The name of the variable in the container." + }, + "value": { + "type": "string", + "description": "The value of the variable." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the response value." + } + }, + "required": [ "variablesReference", "name", "value" ] + }, + "SetVariableResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setVariable` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The new value of the variable." + }, + "type": { + "type": "string", + "description": "The type of the new value. Typically shown in the UI when hovering over the value." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": [ "value" ] + } + }, + "required": [ "body" ] + }] + }, + + "SourceRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request retrieves the source code for a given source reference.", + "properties": { + "command": { + "type": "string", + "enum": [ "source" ] + }, + "arguments": { + "$ref": "#/definitions/SourceArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SourceArguments": { + "type": "object", + "description": "Arguments for `source` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified." + }, + "sourceReference": { + "type": "integer", + "description": "The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute." + } + }, + "required": [ "sourceReference" ] + }, + "SourceResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `source` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Content of the source reference." + }, + "mimeType": { + "type": "string", + "description": "Content type (MIME type) of the source." + } + }, + "required": [ "content" ] + } + }, + "required": [ "body" ] + }] + }, + + "ThreadsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request retrieves a list of all threads.", + "properties": { + "command": { + "type": "string", + "enum": [ "threads" ] + } + }, + "required": [ "command" ] + }] + }, + "ThreadsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `threads` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "threads": { + "type": "array", + "items": { + "$ref": "#/definitions/Thread" + }, + "description": "All threads." + } + }, + "required": [ "threads" ] + } + }, + "required": [ "body" ] + }] + }, + + "TerminateThreadsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request terminates the threads with the given ids.\nClients should only call this request if the corresponding capability `supportsTerminateThreadsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "terminateThreads" ] + }, + "arguments": { + "$ref": "#/definitions/TerminateThreadsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "TerminateThreadsArguments": { + "type": "object", + "description": "Arguments for `terminateThreads` request.", + "properties": { + "threadIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of threads to be terminated." + } + } + }, + "TerminateThreadsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `terminateThreads` request. This is just an acknowledgement, no body field is required." + }] + }, + + "ModulesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the corresponding capability `supportsModulesRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "modules" ] + }, + "arguments": { + "$ref": "#/definitions/ModulesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ModulesArguments": { + "type": "object", + "description": "Arguments for `modules` request.", + "properties": { + "startModule": { + "type": "integer", + "description": "The index of the first module to return; if omitted modules start at 0." + }, + "moduleCount": { + "type": "integer", + "description": "The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned." + } + } + }, + "ModulesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `modules` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/Module" + }, + "description": "All modules or range of modules." + }, + "totalModules": { + "type": "integer", + "description": "The total number of modules available." + } + }, + "required": [ "modules" ] + } + }, + "required": [ "body" ] + }] + }, + + "LoadedSourcesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the corresponding capability `supportsLoadedSourcesRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "loadedSources" ] + }, + "arguments": { + "$ref": "#/definitions/LoadedSourcesArguments" + } + }, + "required": [ "command" ] + }] + }, + "LoadedSourcesArguments": { + "type": "object", + "description": "Arguments for `loadedSources` request." + }, + "LoadedSourcesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `loadedSources` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "Set of loaded sources." + } + }, + "required": [ "sources" ] + } + }, + "required": [ "body" ] + }] + }, + + "EvaluateRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Evaluates the given expression in the context of the topmost stack frame.\nThe expression has access to any variables and arguments that are in scope.", + "properties": { + "command": { + "type": "string", + "enum": [ "evaluate" ] + }, + "arguments": { + "$ref": "#/definitions/EvaluateArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "EvaluateArguments": { + "type": "object", + "description": "Arguments for `evaluate` request.", + "properties": { + "expression": { + "type": "string", + "description": "The expression to evaluate." + }, + "frameId": { + "type": "integer", + "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." + }, + "context": { + "type": "string", + "_enum": [ "watch", "repl", "hover", "clipboard", "variables" ], + "enumDescriptions": [ + "evaluate is called from a watch view context.", + "evaluate is called from a REPL context.", + "evaluate is called to generate the debug hover contents.\nThis value should only be used if the corresponding capability `supportsEvaluateForHovers` is true.", + "evaluate is called to generate clipboard contents.\nThis value should only be used if the corresponding capability `supportsClipboardContext` is true.", + "evaluate is called from a variables view context." + ], + "description": "The context in which the evaluate request is used." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the result.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": [ "expression" ] + }, + "EvaluateResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `evaluate` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "The result of the evaluate request." + }, + "type": { + "type": "string", + "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": [ "result", "variablesReference" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetExpressionRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the corresponding capability `supportsSetExpression` is true.\nIf a debug adapter implements both `setExpression` and `setVariable`, a client uses `setExpression` if the variable has an `evaluateName` property.", + "properties": { + "command": { + "type": "string", + "enum": [ "setExpression" ] + }, + "arguments": { + "$ref": "#/definitions/SetExpressionArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetExpressionArguments": { + "type": "object", + "description": "Arguments for `setExpression` request.", + "properties": { + "expression": { + "type": "string", + "description": "The l-value expression to assign to." + }, + "value": { + "type": "string", + "description": "The value expression to assign to the l-value expression." + }, + "frameId": { + "type": "integer", + "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies how the resulting value should be formatted." + } + }, + "required": [ "expression", "value" ] + }, + "SetExpressionResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setExpression` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The new value of the expression." + }, + "type": { + "type": "string", + "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a value that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": [ "value" ] + } + }, + "required": [ "body" ] + }] + }, + + "StepInTargetsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This request retrieves the possible step-in targets for the specified stack frame.\nThese targets can be used in the `stepIn` request.\nClients should only call this request if the corresponding capability `supportsStepInTargetsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepInTargets" ] + }, + "arguments": { + "$ref": "#/definitions/StepInTargetsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepInTargetsArguments": { + "type": "object", + "description": "Arguments for `stepInTargets` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "The stack frame for which to retrieve the possible step-in targets." + } + }, + "required": [ "frameId" ] + }, + "StepInTargetsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stepInTargets` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/StepInTarget" + }, + "description": "The possible step-in targets of the specified source location." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "GotoTargetsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the `goto` request.\nClients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "gotoTargets" ] + }, + "arguments": { + "$ref": "#/definitions/GotoTargetsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "GotoTargetsArguments": { + "type": "object", + "description": "Arguments for `gotoTargets` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location for which the goto targets are determined." + }, + "line": { + "type": "integer", + "description": "The line location for which the goto targets are determined." + }, + "column": { + "type": "integer", + "description": "The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": [ "source", "line" ] + }, + "GotoTargetsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `gotoTargets` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/GotoTarget" + }, + "description": "The possible goto targets of the specified location." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "CompletionsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the corresponding capability `supportsCompletionsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "completions" ] + }, + "arguments": { + "$ref": "#/definitions/CompletionsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "CompletionsArguments": { + "type": "object", + "description": "Arguments for `completions` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." + }, + "text": { + "type": "string", + "description": "One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion." + }, + "column": { + "type": "integer", + "description": "The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "line": { + "type": "integer", + "description": "A line for which to determine the completion proposals. If missing the first line of the text is assumed." + } + }, + "required": [ "text", "column" ] + }, + "CompletionsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `completions` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/CompletionItem" + }, + "description": "The possible completions for ." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "ExceptionInfoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the corresponding capability `supportsExceptionInfoRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "exceptionInfo" ] + }, + "arguments": { + "$ref": "#/definitions/ExceptionInfoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ExceptionInfoArguments": { + "type": "object", + "description": "Arguments for `exceptionInfo` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Thread for which exception information should be retrieved." + } + }, + "required": [ "threadId" ] + }, + "ExceptionInfoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `exceptionInfo` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "exceptionId": { + "type": "string", + "description": "ID of the exception that was thrown." + }, + "description": { + "type": "string", + "description": "Descriptive text for the exception." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Mode that caused the exception notification to be raised." + }, + "details": { + "$ref": "#/definitions/ExceptionDetails", + "description": "Detailed information about the exception." + } + }, + "required": [ "exceptionId", "breakMode" ] + } + }, + "required": [ "body" ] + }] + }, + + "ReadMemoryRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the corresponding capability `supportsReadMemoryRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "readMemory" ] + }, + "arguments": { + "$ref": "#/definitions/ReadMemoryArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ReadMemoryArguments": { + "type": "object", + "description": "Arguments for `readMemory` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location from which data should be read." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before reading data. Can be negative." + }, + "count": { + "type": "integer", + "description": "Number of bytes to read at the specified location and offset." + } + }, + "required": [ "memoryReference", "count" ] + }, + "ReadMemoryResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `readMemory` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise." + }, + "unreadableBytes": { + "type": "integer", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds." + }, + "data": { + "type": "string", + "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory." + } + }, + "required": [ "address" ] + } + } + }] + }, + + "WriteMemoryRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Writes bytes to memory at the provided location.\nClients should only call this request if the corresponding capability `supportsWriteMemoryRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "writeMemory" ] + }, + "arguments": { + "$ref": "#/definitions/WriteMemoryArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "WriteMemoryArguments": { + "type": "object", + "description": "Arguments for `writeMemory` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location to which data should be written." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before writing data. Can be negative." + }, + "allowPartial": { + "type": "boolean", + "description": "Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not." + }, + "data": { + "type": "string", + "description": "Bytes to write, encoded using base64." + } + }, + "required": [ "memoryReference", "data" ] + }, + "WriteMemoryResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `writeMemory` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "offset": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is true to indicate the offset of the first byte of data successfully written. Can be negative." + }, + "bytesWritten": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is true to indicate the number of bytes starting from address that were successfully written." + } + } + } + } + }] + }, + + "DisassembleRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Disassembles code stored at the provided location.\nClients should only call this request if the corresponding capability `supportsDisassembleRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "disassemble" ] + }, + "arguments": { + "$ref": "#/definitions/DisassembleArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "DisassembleArguments": { + "type": "object", + "description": "Arguments for `disassemble` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location containing the instructions to disassemble." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before disassembling. Can be negative." + }, + "instructionOffset": { + "type": "integer", + "description": "Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." + }, + "instructionCount": { + "type": "integer", + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." + }, + "resolveSymbols": { + "type": "boolean", + "description": "If true, the adapter should attempt to resolve memory addresses and other values to symbolic names." + } + }, + "required": [ "memoryReference", "instructionCount" ] + }, + "DisassembleResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `disassemble` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": { + "$ref": "#/definitions/DisassembledInstruction" + }, + "description": "The list of disassembled instructions." + } + }, + "required": [ "instructions" ] + } + } + }] + }, + + "Capabilities": { + "type": "object", + "title": "Types", + "description": "Information about the capabilities of a debug adapter.", + "properties": { + "supportsConfigurationDoneRequest": { + "type": "boolean", + "description": "The debug adapter supports the `configurationDone` request." + }, + "supportsFunctionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports function breakpoints." + }, + "supportsConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports conditional breakpoints." + }, + "supportsHitConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." + }, + "supportsEvaluateForHovers": { + "type": "boolean", + "description": "The debug adapter supports a (side effect free) `evaluate` request for data hovers." + }, + "exceptionBreakpointFilters": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" + }, + "description": "Available exception filter options for the `setExceptionBreakpoints` request." + }, + "supportsStepBack": { + "type": "boolean", + "description": "The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests." + }, + "supportsSetVariable": { + "type": "boolean", + "description": "The debug adapter supports setting a variable to a value." + }, + "supportsRestartFrame": { + "type": "boolean", + "description": "The debug adapter supports restarting a frame." + }, + "supportsGotoTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `gotoTargets` request." + }, + "supportsStepInTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `stepInTargets` request." + }, + "supportsCompletionsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `completions` request." + }, + "completionTriggerCharacters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character." + }, + "supportsModulesRequest": { + "type": "boolean", + "description": "The debug adapter supports the `modules` request." + }, + "additionalModuleColumns": { + "type": "array", + "items": { + "$ref": "#/definitions/ColumnDescriptor" + }, + "description": "The set of additional module information exposed by the debug adapter." + }, + "supportedChecksumAlgorithms": { + "type": "array", + "items": { + "$ref": "#/definitions/ChecksumAlgorithm" + }, + "description": "Checksum algorithms supported by the debug adapter." + }, + "supportsRestartRequest": { + "type": "boolean", + "description": "The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request." + }, + "supportsExceptionOptions": { + "type": "boolean", + "description": "The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request." + }, + "supportsValueFormattingOptions": { + "type": "boolean", + "description": "The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests." + }, + "supportsExceptionInfoRequest": { + "type": "boolean", + "description": "The debug adapter supports the `exceptionInfo` request." + }, + "supportTerminateDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request." + }, + "supportSuspendDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request." + }, + "supportsDelayedStackTraceLoading": { + "type": "boolean", + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported." + }, + "supportsLoadedSourcesRequest": { + "type": "boolean", + "description": "The debug adapter supports the `loadedSources` request." + }, + "supportsLogPoints": { + "type": "boolean", + "description": "The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`." + }, + "supportsTerminateThreadsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `terminateThreads` request." + }, + "supportsSetExpression": { + "type": "boolean", + "description": "The debug adapter supports the `setExpression` request." + }, + "supportsTerminateRequest": { + "type": "boolean", + "description": "The debug adapter supports the `terminate` request." + }, + "supportsDataBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports data breakpoints." + }, + "supportsReadMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the `readMemory` request." + }, + "supportsWriteMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the `writeMemory` request." + }, + "supportsDisassembleRequest": { + "type": "boolean", + "description": "The debug adapter supports the `disassemble` request." + }, + "supportsCancelRequest": { + "type": "boolean", + "description": "The debug adapter supports the `cancel` request." + }, + "supportsBreakpointLocationsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `breakpointLocations` request." + }, + "supportsClipboardContext": { + "type": "boolean", + "description": "The debug adapter supports the `clipboard` context value in the `evaluate` request." + }, + "supportsSteppingGranularity": { + "type": "boolean", + "description": "The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests." + }, + "supportsInstructionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports adding breakpoints based on instruction references." + }, + "supportsExceptionFilterOptions": { + "type": "boolean", + "description": "The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request." + }, + "supportsSingleThreadExecutionRequests": { + "type": "boolean", + "description": "The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`)." + } + } + }, + + "ExceptionBreakpointsFilter": { + "type": "object", + "description": "An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with.", + "properties": { + "filter": { + "type": "string", + "description": "The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request." + }, + "label": { + "type": "string", + "description": "The name of the filter option. This is shown in the UI." + }, + "description": { + "type": "string", + "description": "A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated." + }, + "default": { + "type": "boolean", + "description": "Initial value of the filter option. If not specified a value false is assumed." + }, + "supportsCondition": { + "type": "boolean", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." + }, + "conditionDescription": { + "type": "string", + "description": "A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated." + } + }, + "required": [ "filter", "label" ] + }, + + "Message": { + "type": "object", + "description": "A structured message object. Used to return errors from requests.", + "properties": { + "id": { + "type": "integer", + "description": "Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily." + }, + "format": { + "type": "string", + "description": "A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." + }, + "variables": { + "type": "object", + "description": "An object used as a dictionary for looking up the variables in the format string.", + "additionalProperties": { + "type": "string", + "description": "All dictionary values must be strings." + } + }, + "sendTelemetry": { + "type": "boolean", + "description": "If true send to telemetry." + }, + "showUser": { + "type": "boolean", + "description": "If true show user." + }, + "url": { + "type": "string", + "description": "A url where additional information about this message can be found." + }, + "urlLabel": { + "type": "string", + "description": "A label that is presented to the user as the UI for opening the url." + } + }, + "required": [ "id", "format" ] + }, + + "Module": { + "type": "object", + "description": "A Module object represents a row in the modules view.\nThe `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting.\nThe `name` attribute is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.", + "properties": { + "id": { + "type": ["integer", "string"], + "description": "Unique identifier for the module." + }, + "name": { + "type": "string", + "description": "A name of the module." + }, + "path": { + "type": "string", + "description": "Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." + }, + "isOptimized": { + "type": "boolean", + "description": "True if the module is optimized." + }, + "isUserCode": { + "type": "boolean", + "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." + }, + "version": { + "type": "string", + "description": "Version of Module." + }, + "symbolStatus": { + "type": "string", + "description": "User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)" + }, + "symbolFilePath": { + "type": "string", + "description": "Logical full path to the symbol file. The exact definition is implementation defined." + }, + "dateTimeStamp": { + "type": "string", + "description": "Module created or modified, encoded as a RFC 3339 timestamp." + }, + "addressRange": { + "type": "string", + "description": "Address range covered by this module." + } + }, + "required": [ "id", "name" ] + }, + + "ColumnDescriptor": { + "type": "object", + "description": "A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", + "properties": { + "attributeName": { + "type": "string", + "description": "Name of the attribute rendered in this column." + }, + "label": { + "type": "string", + "description": "Header UI label of column." + }, + "format": { + "type": "string", + "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." + }, + "type": { + "type": "string", + "enum": [ "string", "number", "boolean", "unixTimestampUTC" ], + "description": "Datatype of values in this column. Defaults to `string` if not specified." + }, + "width": { + "type": "integer", + "description": "Width of this column in characters (hint only)." + } + }, + "required": [ "attributeName", "label"] + }, + + "Thread": { + "type": "object", + "description": "A Thread", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for the thread." + }, + "name": { + "type": "string", + "description": "The name of the thread." + } + }, + "required": [ "id", "name" ] + }, + + "Source": { + "type": "object", + "description": "A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.", + "properties": { + "name": { + "type": "string", + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." + }, + "path": { + "type": "string", + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0)." + }, + "sourceReference": { + "type": "integer", + "description": "If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present the source in the UI.\nA value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.", + "enum": [ "normal", "emphasize", "deemphasize" ] + }, + "origin": { + "type": "string", + "description": "The origin of this source. For example, 'internal module', 'inlined content from source map', etc." + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "A list of sources that are related to this source. These may be the source that generated this source." + }, + "adapterData": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." + }, + "checksums": { + "type": "array", + "items": { + "$ref": "#/definitions/Checksum" + }, + "description": "The checksums associated with this file." + } + } + }, + + "StackFrame": { + "type": "object", + "description": "A Stackframe contains the source location.", + "properties": { + "id": { + "type": "integer", + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame." + }, + "name": { + "type": "string", + "description": "The name of the stack frame, typically a method name." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source of the frame." + }, + "line": { + "type": "integer", + "description": "The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client." + }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the stack frame." + }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "canRestart": { + "type": "boolean", + "description": "Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent." + }, + "instructionPointerReference": { + "type": "string", + "description": "A memory reference for the current instruction pointer in this frame." + }, + "moduleId": { + "type": ["integer", "string"], + "description": "The module associated with this frame, if any." + }, + "presentationHint": { + "type": "string", + "enum": [ "normal", "label", "subtle" ], + "description": "A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way." + } + }, + "required": [ "id", "name", "line", "column" ] + }, + + "Scope": { + "type": "object", + "description": "A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source.", + "properties": { + "name": { + "type": "string", + "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", + "_enum": [ "arguments", "locals", "registers" ], + "enumDescriptions": [ + "Scope contains method arguments.", + "Scope contains local variables.", + "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request." + ] + }, + "variablesReference": { + "type": "integer", + "description": "The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." + }, + "expensive": { + "type": "boolean", + "description": "If true, the number of variables in this scope is large or expensive to retrieve." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source for this scope." + }, + "line": { + "type": "integer", + "description": "The start line of the range covered by this scope." + }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by this scope." + }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": [ "name", "variablesReference", "expensive" ] + }, + + "Variable": { + "type": "object", + "description": "A Variable is a name/value pair.\nThe `type` attribute is shown if space permits or when hovering over the variable's name.\nThe `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.\nIf the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.", + "properties": { + "name": { + "type": "string", + "description": "The variable's name." + }, + "value": { + "type": "string", + "description": "The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI." + }, + "type": { + "type": "string", + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a variable that can be used to determine how to render the variable in the UI." + }, + "evaluateName": { + "type": "string", + "description": "The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference associated with this variable.\nFor pointer type variables, this is generally a reference to the memory address contained in the pointer.\nFor executable data, this reference may later be used in a `disassemble` request.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": [ "name", "value", "variablesReference" ] + }, + + "VariablePresentationHint": { + "type": "object", + "description": "Properties of a variable that can be used to determine how to render the variable in the UI.", + "properties": { + "kind": { + "description": "The kind of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ "property", "method", "class", "data", "event", "baseClass", "innerClass", "interface", "mostDerivedClass", "virtual", "dataBreakpoint" ], + "enumDescriptions": [ + "Indicates that the object is a property.", + "Indicates that the object is a method.", + "Indicates that the object is a class.", + "Indicates that the object is data.", + "Indicates that the object is an event.", + "Indicates that the object is a base class.", + "Indicates that the object is an inner class.", + "Indicates that the object is an interface.", + "Indicates that the object is the most derived class.", + "Indicates that the object is virtual, that means it is a synthetic object introduced by the adapter for rendering purposes, e.g. an index range for large arrays.", + "Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead." + ] + }, + "attributes": { + "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", + "type": "array", + "items": { + "type": "string", + "_enum": [ "static", "constant", "readOnly", "rawString", "hasObjectId", "canHaveObjectId", "hasSideEffects", "hasDataBreakpoint" ], + "enumDescriptions": [ + "Indicates that the object is static.", + "Indicates that the object is a constant.", + "Indicates that the object is read only.", + "Indicates that the object is a raw string.", + "Indicates that the object can have an Object ID created for it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", + "Indicates that the object has an Object ID associated with it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", + "Indicates that the evaluation had side effects.", + "Indicates that the object has its value tracked by a data breakpoint." + ] + } + }, + "visibility": { + "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ "public", "private", "protected", "internal", "final" ] + }, + "lazy": { + "description": "If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.", + "type": "boolean" + } + } + }, + + "BreakpointLocation": { + "type": "object", + "description": "Properties of a breakpoint location returned from the `breakpointLocations` request.", + "properties": { + "line": { + "type": "integer", + "description": "Start line of breakpoint location." + }, + "column": { + "type": "integer", + "description": "The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of breakpoint location if the location covers a range." + }, + "endColumn": { + "type": "integer", + "description": "The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": [ "line" ] + }, + + "SourceBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.", + "properties": { + "line": { + "type": "integer", + "description": "The source line of the breakpoint or logpoint." + }, + "column": { + "type": "integer", + "description": "Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "condition": { + "type": "string", + "description": "The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met." + }, + "logMessage": { + "type": "string", + "description": "If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met." + } + }, + "required": [ "line" ] + }, + + "FunctionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the `setFunctionBreakpoints` request.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function." + }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true." + } + }, + "required": [ "name" ] + }, + + "DataBreakpointAccessType": { + "type": "string", + "description": "This enumeration defines all possible access types for data breakpoints.", + "enum": [ "read", "write", "readWrite" ] + }, + + "DataBreakpoint": { + "type": "object", + "description": "Properties of a data breakpoint passed to the `setDataBreakpoints` request.", + "properties": { + "dataId": { + "type": "string", + "description": "An id representing the data. This id is returned from the `dataBreakpointInfo` request." + }, + "accessType": { + "$ref": "#/definitions/DataBreakpointAccessType", + "description": "The access type of the data." + }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints." + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed." + } + }, + "required": [ "dataId" ] + }, + + "InstructionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the `setInstructionBreakpoints` request", + "properties": { + "instructionReference": { + "type": "string", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`." + }, + "offset": { + "type": "integer", + "description": "The offset from the instruction reference in bytes.\nThis can be negative." + }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true." + } + }, + "required": [ "instructionReference" ] + }, + + "Breakpoint": { + "type": "object", + "description": "Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.", + "properties": { + "id": { + "type": "integer", + "description": "The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." + }, + "verified": { + "type": "boolean", + "description": "If true, the breakpoint could be set (but not necessarily at the desired location)." + }, + "message": { + "type": "string", + "description": "A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source where the breakpoint is located." + }, + "line": { + "type": "integer", + "description": "The start line of the actual range covered by the breakpoint." + }, + "column": { + "type": "integer", + "description": "Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the actual range covered by the breakpoint." + }, + "endColumn": { + "type": "integer", + "description": "End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line." + }, + "instructionReference": { + "type": "string", + "description": "A memory reference to where the breakpoint is set." + }, + "offset": { + "type": "integer", + "description": "The offset from the instruction reference.\nThis can be negative." + }, + "reason": { + "type": "string", + "description": "A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:\n\n- `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.\n - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.", + "enum": [ "pending", "failed" ] + } + }, + "required": [ "verified" ] + }, + + "SteppingGranularity": { + "type": "string", + "description": "The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.", + "enum": [ "statement", "line", "instruction" ], + "enumDescriptions": [ + "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", + "The step should allow the program to run until the current source line has executed.", + "The step should allow one instruction to execute (e.g. one x86 instruction)." + ] + }, + + "StepInTarget": { + "type": "object", + "description": "A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a step-in target." + }, + "label": { + "type": "string", + "description": "The name of the step-in target (shown in the UI)." + }, + "line": { + "type": "integer", + "description": "The line of the step-in target." + }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the step-in target." + }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": [ "id", "label" ] + }, + + "GotoTarget": { + "type": "object", + "description": "A `GotoTarget` describes a code location that can be used as a target in the `goto` request.\nThe possible goto targets can be determined via the `gotoTargets` request.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a goto target. This is used in the `goto` request." + }, + "label": { + "type": "string", + "description": "The name of the goto target (shown in the UI)." + }, + "line": { + "type": "integer", + "description": "The line of the goto target." + }, + "column": { + "type": "integer", + "description": "The column of the goto target." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the goto target." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range covered by the goto target." + }, + "instructionPointerReference": { + "type": "string", + "description": "A memory reference for the instruction pointer value represented by this target." + } + }, + "required": [ "id", "label", "line" ] + }, + + "CompletionItem": { + "type": "object", + "description": "`CompletionItems` are the suggestions returned from the `completions` request.", + "properties": { + "label": { + "type": "string", + "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." + }, + "text": { + "type": "string", + "description": "If text is returned and not an empty string, then it is inserted instead of the label." + }, + "sortText": { + "type": "string", + "description": "A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead." + }, + "detail": { + "type": "string", + "description": "A human-readable string with additional information about this item, like type or symbol information." + }, + "type": { + "$ref": "#/definitions/CompletionItemType", + "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon." + }, + "start": { + "type": "integer", + "description": "Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request." + }, + "length": { + "type": "integer", + "description": "Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted." + }, + "selectionStart": { + "type": "integer", + "description": "Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text." + }, + "selectionLength": { + "type": "integer", + "description": "Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0." + } + }, + "required": [ "label" ] + }, + + "CompletionItemType": { + "type": "string", + "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.", + "enum": [ "method", "function", "constructor", "field", "variable", "class", "interface", "module", "property", "unit", "value", "enum", "keyword", "snippet", "text", "color", "file", "reference", "customcolor" ] + }, + + "ChecksumAlgorithm": { + "type": "string", + "description": "Names of checksum algorithms that may be supported by a debug adapter.", + "enum": [ "MD5", "SHA1", "SHA256", "timestamp" ] + }, + + "Checksum": { + "type": "object", + "description": "The checksum of an item calculated by the specified algorithm.", + "properties": { + "algorithm": { + "$ref": "#/definitions/ChecksumAlgorithm", + "description": "The algorithm used to calculate this checksum." + }, + "checksum": { + "type": "string", + "description": "Value of the checksum, encoded as a hexadecimal value." + } + }, + "required": [ "algorithm", "checksum" ] + }, + + "ValueFormat": { + "type": "object", + "description": "Provides formatting information for a value.", + "properties": { + "hex": { + "type": "boolean", + "description": "Display the value in hex." + } + } + }, + + "StackFrameFormat": { + "allOf": [ { "$ref": "#/definitions/ValueFormat" }, { + "type": "object", + "description": "Provides formatting information for a stack frame.", + "properties": { + "parameters": { + "type": "boolean", + "description": "Displays parameters for the stack frame." + }, + "parameterTypes": { + "type": "boolean", + "description": "Displays the types of parameters for the stack frame." + }, + "parameterNames": { + "type": "boolean", + "description": "Displays the names of parameters for the stack frame." + }, + "parameterValues": { + "type": "boolean", + "description": "Displays the values of parameters for the stack frame." + }, + "line": { + "type": "boolean", + "description": "Displays the line number of the stack frame." + }, + "module": { + "type": "boolean", + "description": "Displays the module of the stack frame." + }, + "includeAll": { + "type": "boolean", + "description": "Includes all stack frames, including those the debug adapter might otherwise hide." + } + } + }] + }, + + "ExceptionFilterOptions": { + "type": "object", + "description": "An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.", + "properties": { + "filterId": { + "type": "string", + "description": "ID of an exception filter returned by the `exceptionBreakpointFilters` capability." + }, + "condition": { + "type": "string", + "description": "An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is true." + } + }, + "required": [ "filterId" ] + }, + + "ExceptionOptions": { + "type": "object", + "description": "An `ExceptionOptions` assigns configuration options to a set of exceptions.", + "properties": { + "path": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionPathSegment" + }, + "description": "A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Condition when a thrown exception should result in a break." + } + }, + "required": [ "breakMode" ] + }, + + "ExceptionBreakMode": { + "type": "string", + "description": "This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.", + "enum": [ "never", "always", "unhandled", "userUnhandled" ] + }, + + "ExceptionPathSegment": { + "type": "object", + "description": "An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true.", + "properties": { + "negate": { + "type": "boolean", + "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Depending on the value of `negate` the names that should match or not match." + } + }, + "required": [ "names" ] + }, + + "ExceptionDetails": { + "type": "object", + "description": "Detailed information about an exception that has occurred.", + "properties": { + "message": { + "type": "string", + "description": "Message contained in the exception." + }, + "typeName": { + "type": "string", + "description": "Short type name of the exception object." + }, + "fullTypeName": { + "type": "string", + "description": "Fully-qualified type name of the exception object." + }, + "evaluateName": { + "type": "string", + "description": "An expression that can be evaluated in the current scope to obtain the exception object." + }, + "stackTrace": { + "type": "string", + "description": "Stack trace at the time the exception was thrown." + }, + "innerException": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionDetails" + }, + "description": "Details of the exception contained by this exception, if any." + } + } + }, + + "DisassembledInstruction": { + "type": "object", + "description": "Represents a single disassembled instruction.", + "properties": { + "address": { + "type": "string", + "description": "The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise." + }, + "instructionBytes": { + "type": "string", + "description": "Raw bytes representing the instruction and its operands, in an implementation-defined format." + }, + "instruction": { + "type": "string", + "description": "Text representing the instruction and its operands, in an implementation-defined format." + }, + "symbol": { + "type": "string", + "description": "Name of the symbol that corresponds with the location of this instruction, if any." + }, + "location": { + "$ref": "#/definitions/Source", + "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." + }, + "line": { + "type": "integer", + "description": "The line within the source location that corresponds to this instruction, if any." + }, + "column": { + "type": "integer", + "description": "The column within the line that corresponds to this instruction, if any." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range that corresponds to this instruction, if any." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range that corresponds to this instruction, if any." + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present the instruction in the UI.\n\nA value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'", + "enum": [ "normal", "invalid" ] + } + }, + "required": [ "address", "instruction" ] + }, + + "InvalidatedAreas": { + "type": "string", + "description": "Logical areas that can be invalidated by the `invalidated` event.", + "_enum": [ "all", "stacks", "threads", "variables" ], + "enumDescriptions": [ + "All previously fetched data has become invalid and needs to be refetched.", + "Previously fetched stack related data has become invalid and needs to be refetched.", + "Previously fetched thread related data has become invalid and needs to be refetched.", + "Previously fetched variable data has become invalid and needs to be refetched." + ] + } + + } +} diff --git a/monitor/pom.xml b/monitor/pom.xml new file mode 100644 index 0000000..112f7c7 --- /dev/null +++ b/monitor/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + + org.tzi.use + plugin_monitor + 1.0-SNAPSHOT + ../pom.xml + + + monitor + 1.0-SNAPSHOT + jar + + + + org.tzi.use + use-core + + + org.tzi.use + use-gui + + + it.cnr.imaa.essi + lablib-checkboxtree + 3.2 + system + ${project.basedir}/lib/lablib-checkboxtree-3.2.jar + + + com.google.guava + guava + 12.0 + system + ${project.basedir}/lib/guava-12.0.jar + + + + + + + ${project.basedir} + + useplugin.xml + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + + --add-exports=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + ${project.basedir}/META-INF/MANIFEST.MF + + + + + + + diff --git a/monitor/src/org/tzi/use/plugins/monitor/AbstractMonitorStateListener.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/AbstractMonitorStateListener.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/AbstractMonitorStateListener.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/AbstractMonitorStateListener.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/AdapterRegistry.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/AdapterRegistry.java similarity index 74% rename from monitor/src/org/tzi/use/plugins/monitor/AdapterRegistry.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/AdapterRegistry.java index 5b9ec72..a2b61a5 100644 --- a/monitor/src/org/tzi/use/plugins/monitor/AdapterRegistry.java +++ b/monitor/src/main/java/org/tzi/use/plugins/monitor/AdapterRegistry.java @@ -75,27 +75,29 @@ public boolean accept(File dir, String name) { Enumeration enumEntries = jarFile.entries(); while(enumEntries.hasMoreElements()) { JarEntry entry = enumEntries.nextElement(); - if (!entry.isDirectory() && entry.getName().endsWith(".class")) { + String rawName = entry.getName(); + if (rawName.startsWith("META-INF/versions/")) { + // Remove "META-INF/versions//" + rawName = rawName.substring(rawName.indexOf('/', "META-INF/versions/".length()) + 1); + } + String className = rawName.replace('/', '.').replace(".class", ""); + // Skip descriptor classes + if (className.endsWith("module-info") || className.endsWith("package-info")) { + continue; + } try { - Class clazz = Class.forName(entry.getName().replace('/', '.').replace(".class", ""), true, loader); + Class clazz = Class.forName(className, true, loader); Class adapterClass = clazz.asSubclass(VMAdapter.class); - // Avoid Class.newInstance, for it is evil. + Constructor ctor = adapterClass.getConstructor(); - VMAdapter adapter = ctor.newInstance(); result.add(adapter); - } - catch (ClassNotFoundException e) {} - catch (SecurityException e) {} - catch (NoSuchMethodException e) {} - catch (IllegalArgumentException e) {} - catch (InstantiationException e) {} - catch (IllegalAccessException e) {} - catch (InvocationTargetException e) {} - catch (ClassCastException e) {} - - } + } catch (ClassNotFoundException | InvocationTargetException | ClassCastException | + IllegalAccessException | InstantiationException | IllegalArgumentException | + NoSuchMethodException | SecurityException ignored) { + } + } } } diff --git a/monitor/src/org/tzi/use/plugins/monitor/IdentifierMappingHelper.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/IdentifierMappingHelper.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/IdentifierMappingHelper.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/IdentifierMappingHelper.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/LogListener.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/LogListener.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/LogListener.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/LogListener.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/ModelBreakpoint.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/ModelBreakpoint.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/ModelBreakpoint.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/ModelBreakpoint.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/Monitor.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/Monitor.java similarity index 96% rename from monitor/src/org/tzi/use/plugins/monitor/Monitor.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/Monitor.java index 22f5c9d..c4db7a8 100644 --- a/monitor/src/org/tzi/use/plugins/monitor/Monitor.java +++ b/monitor/src/main/java/org/tzi/use/plugins/monitor/Monitor.java @@ -727,7 +727,7 @@ private void setupClassMappings() { } VMType vmType = getVMType(useClass); - if (!vmType.isClassType()) { + if (vmType != null && !vmType.isClassType()) { fireNewLogMessage(Level.FINE, String.format("Found VM type for class %s, but the returned type is not a class", useClass.name())); } diff --git a/monitor/src/org/tzi/use/plugins/monitor/MonitorException.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/MonitorException.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/MonitorException.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/MonitorException.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/MonitorPlugin.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/MonitorPlugin.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/MonitorPlugin.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/MonitorPlugin.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/MonitorStateListener.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/MonitorStateListener.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/MonitorStateListener.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/MonitorStateListener.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/ProgressArgs.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/ProgressArgs.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/ProgressArgs.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/ProgressArgs.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/ProgressListener.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/ProgressListener.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/ProgressListener.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/ProgressListener.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/cmd/AbstractMonitorCmd.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/AbstractMonitorCmd.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/cmd/AbstractMonitorCmd.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/AbstractMonitorCmd.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/cmd/EndMonitorCmd.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/EndMonitorCmd.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/cmd/EndMonitorCmd.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/EndMonitorCmd.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/cmd/PauseMonitorCmd.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/PauseMonitorCmd.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/cmd/PauseMonitorCmd.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/PauseMonitorCmd.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/cmd/ResumeMonitorCmd.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/ResumeMonitorCmd.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/cmd/ResumeMonitorCmd.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/ResumeMonitorCmd.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/cmd/StartMonitorCmd.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/StartMonitorCmd.java similarity index 55% rename from monitor/src/org/tzi/use/plugins/monitor/cmd/StartMonitorCmd.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/StartMonitorCmd.java index 2729f07..a946d84 100644 --- a/monitor/src/org/tzi/use/plugins/monitor/cmd/StartMonitorCmd.java +++ b/monitor/src/main/java/org/tzi/use/plugins/monitor/cmd/StartMonitorCmd.java @@ -4,6 +4,7 @@ import org.tzi.use.plugins.monitor.MonitorPlugin; import org.tzi.use.plugins.monitor.vm.adapter.InvalidAdapterConfiguration; import org.tzi.use.plugins.monitor.vm.adapter.VMAdapter; +import org.tzi.use.plugins.monitor.vm.adapter.jvm.JVMAdapter; import org.tzi.use.util.Log; import org.tzi.use.util.StringUtil; @@ -12,28 +13,25 @@ public class StartMonitorCmd extends AbstractMonitorCmd { @Override public void doPerformCommand(IPluginShellCmd pluginCommand) { if (MonitorPlugin.getInstance().getMonitor().isRunning()) { - Log.error("Already monitioring an application. Please stop before starting a new monitor."); - return; - } - - String[] args = pluginCommand.getCmdArguments().split(" "); + Log.error("Already monitoring an application. Please stop before starting a new monitor."); + return; + } + + String[] args = pluginCommand.getCmdArgumentList(); + String adapterName; + if (args.length == 0) { + adapterName = JVMAdapter.JVM_ADAPTER_NAME; + Log.println("Using default value for JVM remote debugger: localhost:6000"); + } else { + adapterName = args[0]; + } + + VMAdapter adapter = MonitorPlugin.getInstance().getAdapterRegistry().getAdapterByName(adapterName); + if (adapter == null) { + Log.println("Invalid adapter name " + StringUtil.inQuotes(adapterName) + " specified."); + return; + } - if (args.length == 0) { - Log.println("Using default value for JVM remote debugger: localhost:6000"); - } - - String adpaterName = args[0]; - VMAdapter adapter = MonitorPlugin.getInstance().getAdapterRegistry().getAdapterByName(adpaterName); - - if (adapter == null) { - Log.print("Invalid adapter name " + StringUtil.inQuotes(adpaterName) + " specified."); - return; - } - - for (int i = 1; i < args.length;++i) { - - } - try { MonitorPlugin.getInstance().startMonitor(pluginCommand.getSession(), adapter, false); } catch (InvalidAdapterConfiguration e) { @@ -41,6 +39,4 @@ public void doPerformCommand(IPluginShellCmd pluginCommand) { } } - - -} +} \ No newline at end of file diff --git a/monitor/src/org/tzi/use/plugins/monitor/gui/ActionShowMonitorControl.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/gui/ActionShowMonitorControl.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/gui/ActionShowMonitorControl.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/gui/ActionShowMonitorControl.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/gui/MonitorControlView.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/gui/MonitorControlView.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/gui/MonitorControlView.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/gui/MonitorControlView.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/adapter/AbstractVMAdapter.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/AbstractVMAdapter.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/adapter/AbstractVMAdapter.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/AbstractVMAdapter.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/adapter/InvalidAdapterConfiguration.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/InvalidAdapterConfiguration.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/adapter/InvalidAdapterConfiguration.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/InvalidAdapterConfiguration.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/adapter/VMAccessException.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/VMAccessException.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/adapter/VMAccessException.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/VMAccessException.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/adapter/VMAdapter.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/VMAdapter.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/adapter/VMAdapter.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/VMAdapter.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/adapter/VMAdapterSetting.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/VMAdapterSetting.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/adapter/VMAdapterSetting.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/VMAdapterSetting.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/adapter/jvm/JVMAdapter.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/jvm/JVMAdapter.java similarity index 97% rename from monitor/src/org/tzi/use/plugins/monitor/vm/adapter/jvm/JVMAdapter.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/jvm/JVMAdapter.java index 0629ffc..cc8eef1 100644 --- a/monitor/src/org/tzi/use/plugins/monitor/vm/adapter/jvm/JVMAdapter.java +++ b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/adapter/jvm/JVMAdapter.java @@ -80,6 +80,8 @@ * */ public class JVMAdapter extends AbstractVMAdapter { + + public static final String JVM_ADAPTER_NAME = "JVMAdapter"; private static final int SETTING_HOST = 0; diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMField.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMField.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMField.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMField.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMIdentifiable.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMIdentifiable.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMIdentifiable.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMIdentifiable.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMMethod.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMMethod.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMMethod.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMMethod.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMMethodCall.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMMethodCall.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMMethodCall.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMMethodCall.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMObject.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMObject.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMObject.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMObject.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMType.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMType.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMType.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMType.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMValue.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMValue.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/VMValue.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/VMValue.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/impl/VMBase.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/impl/VMBase.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/impl/VMBase.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/impl/VMBase.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/impl/VMFieldImpl.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/impl/VMFieldImpl.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/impl/VMFieldImpl.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/impl/VMFieldImpl.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMBase.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMBase.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMBase.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMBase.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMField.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMField.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMField.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMField.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethod.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethod.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethod.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethod.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethodCall.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethodCall.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethodCall.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMMethodCall.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMObject.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMObject.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMObject.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMObject.java diff --git a/monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMType.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMType.java similarity index 100% rename from monitor/src/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMType.java rename to monitor/src/main/java/org/tzi/use/plugins/monitor/vm/mm/jvm/JVMType.java diff --git a/monitor/resources/Attributes.gif b/monitor/src/main/resources/Attributes.gif similarity index 100% rename from monitor/resources/Attributes.gif rename to monitor/src/main/resources/Attributes.gif diff --git a/monitor/resources/MAssociation.gif b/monitor/src/main/resources/MAssociation.gif similarity index 100% rename from monitor/resources/MAssociation.gif rename to monitor/src/main/resources/MAssociation.gif diff --git a/monitor/resources/MClass.gif b/monitor/src/main/resources/MClass.gif similarity index 100% rename from monitor/resources/MClass.gif rename to monitor/src/main/resources/MClass.gif diff --git a/monitor/resources/Monitor.png b/monitor/src/main/resources/Monitor.png similarity index 100% rename from monitor/resources/Monitor.png rename to monitor/src/main/resources/Monitor.png diff --git a/monitor/resources/Operations.gif b/monitor/src/main/resources/Operations.gif similarity index 100% rename from monitor/resources/Operations.gif rename to monitor/src/main/resources/Operations.gif diff --git a/monitor/resources/pause.png b/monitor/src/main/resources/pause.png similarity index 100% rename from monitor/resources/pause.png rename to monitor/src/main/resources/pause.png diff --git a/monitor/resources/play.png b/monitor/src/main/resources/play.png similarity index 100% rename from monitor/resources/play.png rename to monitor/src/main/resources/play.png diff --git a/monitor/resources/stop.png b/monitor/src/main/resources/stop.png similarity index 100% rename from monitor/resources/stop.png rename to monitor/src/main/resources/stop.png diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..2e60c30 --- /dev/null +++ b/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + org.tzi.use + plugin_monitor + 1.0-SNAPSHOT + pom + + + 21 + 21 + UTF-8 + + + + monitor + adapter/Python + + + + + + org.tzi.use + use-core + 7.1.1 + provided + + + org.tzi.use + use-gui + 7.1.1 + provided + + + org.tzi.use + monitor + 1.0-SNAPSHOT + provided + + + + + From 44e3de79a2c2203a73743bef153b499d1d793490 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sun, 29 Jun 2025 22:43:45 +0200 Subject: [PATCH 02/57] refac class gen and msg mapping --- adapter/Python/dependency-reduced-pom.xml | 16 - adapter/Python/pom.xml | 16 - adapter/Python/properties_gen.sh | 4 +- .../{properties.json => references.json} | 734 +-- .../adapter/python/BreakpointHandler.java | 4 +- .../monitor/adapter/python/DebugpyClient.java | 150 +- .../monitor/adapter/python/MessageMapper.java | 29 +- .../monitor/adapter/python/PythonAdapter.java | 4 +- .../adapter/python/dap/ArgumentsClass.java | 20 + .../python/dap/AttachRequestArguments.java | 111 - .../dap/AttachRequestArgumentsClass.java | 96 + .../python/dap/AttachRequestClass.java | 58 + .../python/dap/AttachRequestCommand.java | 27 + .../adapter/python/dap/AttachRequestType.java | 27 + .../python/dap/AttachResponseClass.java | 88 + .../python/dap/AttachResponseType.java | 27 + .../adapter/python/dap/BaseProtocol.java | 32 + .../monitor/adapter/python/dap/BodyClass.java | 399 ++ .../adapter/python/dap/BodyReason.java | 29 + .../adapter/python/dap/Breakpoint.java | 513 +- .../python/dap/BreakpointEventBody.java | 25 + .../python/dap/BreakpointEventClass.java | 54 + .../python/dap/BreakpointEventEvent.java | 27 + .../python/dap/BreakpointEventType.java | 27 + .../python/dap/BreakpointLocation.java | 199 +- .../dap/BreakpointLocationsArguments.java | 238 - .../BreakpointLocationsArgumentsClass.java | 61 + .../BreakpointLocationsRequestArguments.java | 61 + .../dap/BreakpointLocationsRequestClass.java | 57 + .../BreakpointLocationsRequestCommand.java | 27 + .../dap/BreakpointLocationsResponseBody.java | 15 + .../dap/BreakpointLocationsResponseClass.java | 88 + .../adapter/python/dap/BreakpointReason.java | 34 + .../adapter/python/dap/CancelArguments.java | 142 - .../python/dap/CancelArgumentsClass.java | 30 + .../python/dap/CancelRequestArguments.java | 30 + .../python/dap/CancelRequestClass.java | 71 + .../python/dap/CancelRequestCommand.java | 27 + .../python/dap/CancelResponseClass.java | 88 + .../adapter/python/dap/Capabilities.java | 1287 ----- .../adapter/python/dap/CapabilitiesClass.java | 376 ++ .../python/dap/CapabilitiesEventBody.java | 15 + .../python/dap/CapabilitiesEventClass.java | 59 + .../python/dap/CapabilitiesEventEvent.java | 27 + .../python/dap/ChRequestArguments.java | 33 + .../monitor/adapter/python/dap/Checksum.java | 177 +- .../adapter/python/dap/ChecksumAlgorithm.java | 33 + .../adapter/python/dap/ColumnDescriptor.java | 269 +- .../adapter/python/dap/CompletionItem.java | 441 +- .../python/dap/CompletionItemType.java | 65 + .../python/dap/CompletionsArguments.java | 204 - .../python/dap/CompletionsArgumentsClass.java | 50 + .../dap/CompletionsRequestArguments.java | 50 + .../python/dap/CompletionsRequestClass.java | 56 + .../python/dap/CompletionsRequestCommand.java | 27 + .../python/dap/CompletionsResponseBody.java | 15 + .../python/dap/CompletionsResponseClass.java | 87 + .../adapter/python/dap/Configuration.java | 73 - .../dap/ConfigurationDoneArguments.java | 73 - .../dap/ConfigurationDoneRequestClass.java | 60 + .../dap/ConfigurationDoneRequestCommand.java | 27 + .../dap/ConfigurationDoneResponseClass.java | 88 + .../adapter/python/dap/ContinueArguments.java | 139 - .../python/dap/ContinueArgumentsClass.java | 29 + .../python/dap/ContinueRequestArguments.java | 29 + .../python/dap/ContinueRequestClass.java | 57 + .../python/dap/ContinueRequestCommand.java | 27 + .../python/dap/ContinueResponseBody.java | 16 + .../python/dap/ContinueResponseClass.java | 87 + .../python/dap/ContinuedEventBody.java | 25 + .../python/dap/ContinuedEventClass.java | 58 + .../python/dap/ContinuedEventEvent.java | 27 + .../monitor/adapter/python/dap/Converter.java | 100 + .../monitor/adapter/python/dap/DAPEvent.java | 2 +- .../adapter/python/dap/DAPMessage.java | 4 + .../adapter/python/dap/DAPRequest.java | 2 +- .../adapter/python/dap/DAPResponse.java | 3 +- .../adapter/python/dap/DataBreakpoint.java | 237 +- .../python/dap/DataBreakpointAccessType.java | 31 + .../dap/DataBreakpointInfoArguments.java | 173 - .../dap/DataBreakpointInfoArgumentsClass.java | 41 + .../DataBreakpointInfoRequestArguments.java | 41 + .../dap/DataBreakpointInfoRequestClass.java | 57 + .../dap/DataBreakpointInfoRequestCommand.java | 27 + .../dap/DataBreakpointInfoResponseBody.java | 49 + .../dap/DataBreakpointInfoResponseClass.java | 87 + .../adapter/python/dap/DebugProtocol.java | 4569 ----------------- .../python/dap/DisassembleArguments.java | 238 - .../python/dap/DisassembleArgumentsClass.java | 59 + .../dap/DisassembleRequestArguments.java | 59 + .../python/dap/DisassembleRequestClass.java | 56 + .../python/dap/DisassembleRequestCommand.java | 27 + .../python/dap/DisassembleResponseBody.java | 15 + .../python/dap/DisassembleResponseClass.java | 87 + .../python/dap/DisassembledInstruction.java | 455 +- ...sassembledInstructionPresentationHint.java | 31 + .../python/dap/DisconnectArguments.java | 179 - .../python/dap/DisconnectArgumentsClass.java | 42 + .../dap/DisconnectRequestArguments.java | 42 + .../python/dap/DisconnectRequestClass.java | 61 + .../python/dap/DisconnectRequestCommand.java | 27 + .../python/dap/DisconnectResponseClass.java | 88 + .../use/monitor/adapter/python/dap/Env.java | 73 - .../adapter/python/dap/ErrorResponseBody.java | 15 + .../python/dap/ErrorResponseClass.java | 87 + .../adapter/python/dap/EvaluateArguments.java | 201 - .../python/dap/EvaluateArgumentsClass.java | 48 + .../python/dap/EvaluateRequestArguments.java | 48 + .../python/dap/EvaluateRequestClass.java | 55 + .../python/dap/EvaluateRequestCommand.java | 27 + .../python/dap/EvaluateResponseBody.java | 85 + .../python/dap/EvaluateResponseClass.java | 87 + .../use/monitor/adapter/python/dap/Event.java | 52 + .../python/dap/ExceptionBreakMode.java | 40 + .../dap/ExceptionBreakpointsFilter.java | 268 +- .../adapter/python/dap/ExceptionDetails.java | 257 +- .../python/dap/ExceptionFilterOptions.java | 133 +- .../python/dap/ExceptionInfoArguments.java | 108 - .../dap/ExceptionInfoArgumentsClass.java | 18 + .../dap/ExceptionInfoRequestArguments.java | 18 + .../python/dap/ExceptionInfoRequestClass.java | 56 + .../dap/ExceptionInfoRequestCommand.java | 27 + .../python/dap/ExceptionInfoResponseBody.java | 42 + .../dap/ExceptionInfoResponseClass.java | 87 + .../adapter/python/dap/ExceptionOptions.java | 152 +- .../python/dap/ExceptionPathSegment.java | 139 +- .../adapter/python/dap/ExitedEventBody.java | 15 + .../adapter/python/dap/ExitedEventClass.java | 54 + .../adapter/python/dap/ExitedEventEvent.java | 27 + .../monitor/adapter/python/dap/Filter.java | 28 + .../python/dap/FunctionBreakpoint.java | 170 +- .../adapter/python/dap/GotoArguments.java | 142 - .../python/dap/GotoArgumentsClass.java | 27 + .../python/dap/GotoRequestArguments.java | 27 + .../adapter/python/dap/GotoRequestClass.java | 60 + .../python/dap/GotoRequestCommand.java | 27 + .../adapter/python/dap/GotoResponseClass.java | 87 + .../adapter/python/dap/GotoTarget.java | 297 +- .../python/dap/GotoTargetsArguments.java | 176 - .../python/dap/GotoTargetsArgumentsClass.java | 38 + .../dap/GotoTargetsRequestArguments.java | 38 + .../python/dap/GotoTargetsRequestClass.java | 57 + .../python/dap/GotoTargetsRequestCommand.java | 27 + .../python/dap/GotoTargetsResponseBody.java | 15 + .../python/dap/GotoTargetsResponseClass.java | 87 + .../use/monitor/adapter/python/dap/Group.java | 29 + .../monitor/adapter/python/dap/IDUnion.java | 52 + .../dap/InitializeRequestArguments.java | 569 +- .../dap/InitializeRequestArgumentsClass.java | 155 + .../python/dap/InitializeRequestClass.java | 62 + .../python/dap/InitializeRequestCommand.java | 27 + .../python/dap/InitializeResponseClass.java | 90 + .../python/dap/InitializedEventClass.java | 68 + .../python/dap/InitializedEventEvent.java | 27 + .../python/dap/InstructionBreakpoint.java | 207 +- .../python/dap/InvalidatedEventBody.java | 37 + .../python/dap/InvalidatedEventClass.java | 61 + .../python/dap/InvalidatedEventEvent.java | 27 + .../use/monitor/adapter/python/dap/Kind.java | 27 + .../python/dap/LaunchRequestArguments.java | 129 +- .../dap/LaunchRequestArgumentsClass.java | 29 + .../python/dap/LaunchRequestClass.java | 57 + .../python/dap/LaunchRequestCommand.java | 27 + .../python/dap/LaunchResponseClass.java | 88 + .../python/dap/LoadedSourceEventBody.java | 24 + .../python/dap/LoadedSourceEventClass.java | 55 + .../python/dap/LoadedSourceEventEvent.java | 27 + .../python/dap/LoadedSourcesArguments.java | 73 - .../python/dap/LoadedSourcesRequestClass.java | 57 + .../dap/LoadedSourcesRequestCommand.java | 27 + .../python/dap/LoadedSourcesResponseBody.java | 15 + .../dap/LoadedSourcesResponseClass.java | 87 + .../adapter/python/dap/MemoryEventBody.java | 33 + .../adapter/python/dap/MemoryEventClass.java | 65 + .../adapter/python/dap/MemoryEventEvent.java | 27 + .../monitor/adapter/python/dap/Message.java | 282 +- .../monitor/adapter/python/dap/Module.java | 401 +- .../adapter/python/dap/ModuleEventBody.java | 24 + .../adapter/python/dap/ModuleEventClass.java | 54 + .../adapter/python/dap/ModuleEventEvent.java | 27 + .../adapter/python/dap/ModuleIDUnion.java | 54 + .../adapter/python/dap/ModulesArguments.java | 136 - .../python/dap/ModulesArgumentsClass.java | 28 + .../python/dap/ModulesRequestArguments.java | 28 + .../python/dap/ModulesRequestClass.java | 57 + .../python/dap/ModulesRequestCommand.java | 27 + .../python/dap/ModulesResponseBody.java | 24 + .../python/dap/ModulesResponseClass.java | 87 + .../adapter/python/dap/NextArguments.java | 219 - .../python/dap/NextArgumentsClass.java | 38 + .../python/dap/NextRequestArguments.java | 38 + .../adapter/python/dap/NextRequestClass.java | 60 + .../python/dap/NextRequestCommand.java | 27 + .../adapter/python/dap/NextResponseClass.java | 87 + .../adapter/python/dap/OutputEventBody.java | 84 + .../adapter/python/dap/OutputEventClass.java | 54 + .../adapter/python/dap/OutputEventEvent.java | 27 + .../adapter/python/dap/PauseArguments.java | 108 - .../python/dap/PauseArgumentsClass.java | 18 + .../python/dap/PauseRequestArguments.java | 18 + .../adapter/python/dap/PauseRequestClass.java | 57 + .../python/dap/PauseRequestCommand.java | 27 + .../python/dap/PauseResponseClass.java | 88 + .../adapter/python/dap/ProcessEventBody.java | 54 + .../adapter/python/dap/ProcessEventClass.java | 55 + .../adapter/python/dap/ProcessEventEvent.java | 27 + .../python/dap/ProgressEndEventBody.java | 24 + .../python/dap/ProgressEndEventClass.java | 56 + .../python/dap/ProgressEndEventEvent.java | 27 + .../python/dap/ProgressStartEventBody.java | 70 + .../python/dap/ProgressStartEventClass.java | 58 + .../python/dap/ProgressStartEventEvent.java | 27 + .../python/dap/ProgressUpdateEventBody.java | 33 + .../python/dap/ProgressUpdateEventClass.java | 59 + .../python/dap/ProgressUpdateEventEvent.java | 27 + .../adapter/python/dap/ProtocolMessage.java | 144 - .../python/dap/ReadMemoryArguments.java | 173 - .../python/dap/ReadMemoryArgumentsClass.java | 37 + .../dap/ReadMemoryRequestArguments.java | 37 + .../python/dap/ReadMemoryRequestClass.java | 56 + .../python/dap/ReadMemoryRequestCommand.java | 27 + .../python/dap/ReadMemoryResponseBody.java | 38 + .../python/dap/ReadMemoryResponseClass.java | 87 + .../monitor/adapter/python/dap/Request.java | 52 + .../adapter/python/dap/RequestEnum.java | 28 + .../monitor/adapter/python/dap/Response.java | 85 + .../monitor/adapter/python/dap/Restart.java | 106 + .../adapter/python/dap/RestartArguments.java | 105 - .../python/dap/RestartArgumentsClass.java | 18 + .../python/dap/RestartFrameArguments.java | 108 - .../dap/RestartFrameArgumentsClass.java | 20 + .../dap/RestartFrameRequestArguments.java | 20 + .../python/dap/RestartFrameRequestClass.java | 58 + .../dap/RestartFrameRequestCommand.java | 27 + .../python/dap/RestartFrameResponseClass.java | 88 + .../python/dap/RestartRequestArguments.java | 18 + .../python/dap/RestartRequestClass.java | 57 + .../python/dap/RestartRequestCommand.java | 27 + .../python/dap/RestartResponseClass.java | 88 + .../python/dap/ReverseContinueArguments.java | 139 - .../dap/ReverseContinueArgumentsClass.java | 30 + .../dap/ReverseContinueRequestArguments.java | 30 + .../dap/ReverseContinueRequestClass.java | 59 + .../dap/ReverseContinueRequestCommand.java | 27 + .../dap/ReverseContinueResponseClass.java | 88 + .../dap/RunInTerminalRequestArguments.java | 315 +- .../RunInTerminalRequestArgumentsClass.java | 69 + .../python/dap/RunInTerminalRequestClass.java | 67 + .../dap/RunInTerminalRequestCommand.java | 27 + .../python/dap/RunInTerminalResponseBody.java | 25 + .../dap/RunInTerminalResponseClass.java | 87 + .../use/monitor/adapter/python/dap/Scope.java | 454 +- .../adapter/python/dap/ScopesArguments.java | 108 - .../python/dap/ScopesArgumentsClass.java | 20 + .../python/dap/ScopesRequestArguments.java | 20 + .../python/dap/ScopesRequestClass.java | 54 + .../python/dap/ScopesRequestCommand.java | 27 + .../python/dap/ScopesResponseBody.java | 16 + .../python/dap/ScopesResponseClass.java | 87 + .../python/dap/SetBreakpointsArguments.java | 206 - .../dap/SetBreakpointsArgumentsClass.java | 47 + .../dap/SetBreakpointsRequestArguments.java | 47 + .../dap/SetBreakpointsRequestClass.java | 57 + .../dap/SetBreakpointsRequestCommand.java | 27 + .../dap/SetBreakpointsResponseBody.java | 17 + .../dap/SetBreakpointsResponseClass.java | 91 + .../dap/SetDataBreakpointsArguments.java | 110 - .../dap/SetDataBreakpointsArgumentsClass.java | 19 + .../SetDataBreakpointsRequestArguments.java | 19 + .../dap/SetDataBreakpointsRequestClass.java | 59 + .../dap/SetDataBreakpointsRequestCommand.java | 27 + .../dap/SetDataBreakpointsResponseBody.java | 16 + .../dap/SetDataBreakpointsResponseClass.java | 88 + .../dap/SetExceptionBreakpointsArguments.java | 175 - ...SetExceptionBreakpointsArgumentsClass.java | 43 + ...tExceptionBreakpointsRequestArguments.java | 43 + .../SetExceptionBreakpointsRequestClass.java | 58 + ...SetExceptionBreakpointsRequestCommand.java | 27 + .../SetExceptionBreakpointsResponseBody.java | 19 + .../SetExceptionBreakpointsResponseClass.java | 100 + .../python/dap/SetExpressionArguments.java | 204 - .../dap/SetExpressionArgumentsClass.java | 46 + .../dap/SetExpressionRequestArguments.java | 46 + .../python/dap/SetExpressionRequestClass.java | 61 + .../dap/SetExpressionRequestCommand.java | 27 + .../python/dap/SetExpressionResponseBody.java | 84 + .../dap/SetExpressionResponseClass.java | 87 + .../dap/SetFunctionBreakpointsArguments.java | 110 - .../SetFunctionBreakpointsArgumentsClass.java | 18 + ...etFunctionBreakpointsRequestArguments.java | 18 + .../SetFunctionBreakpointsRequestClass.java | 59 + .../SetFunctionBreakpointsRequestCommand.java | 27 + .../SetFunctionBreakpointsResponseBody.java | 16 + .../SetFunctionBreakpointsResponseClass.java | 88 + .../SetInstructionBreakpointsArguments.java | 110 - ...tInstructionBreakpointsArgumentsClass.java | 18 + ...nstructionBreakpointsRequestArguments.java | 18 + ...SetInstructionBreakpointsRequestClass.java | 60 + ...tInstructionBreakpointsRequestCommand.java | 27 + ...SetInstructionBreakpointsResponseBody.java | 16 + ...etInstructionBreakpointsResponseClass.java | 87 + .../python/dap/SetVariableArguments.java | 207 - .../python/dap/SetVariableArgumentsClass.java | 47 + .../dap/SetVariableRequestArguments.java | 47 + .../python/dap/SetVariableRequestClass.java | 58 + .../python/dap/SetVariableRequestCommand.java | 27 + .../python/dap/SetVariableResponseBody.java | 73 + .../python/dap/SetVariableResponseClass.java | 87 + .../monitor/adapter/python/dap/Source.java | 418 +- .../adapter/python/dap/SourceArguments.java | 145 - .../python/dap/SourceArgumentsClass.java | 30 + .../adapter/python/dap/SourceBreakpoint.java | 246 +- .../python/dap/SourcePresentationHint.java | 31 + .../python/dap/SourceRequestArguments.java | 30 + .../python/dap/SourceRequestClass.java | 54 + .../python/dap/SourceRequestCommand.java | 27 + .../python/dap/SourceResponseBody.java | 24 + .../python/dap/SourceResponseClass.java | 87 + .../adapter/python/dap/StackFrame.java | 499 +- .../adapter/python/dap/StackFrameFormat.java | 99 + .../dap/StackFramePresentationHint.java | 32 + .../python/dap/StackTraceArguments.java | 188 - .../python/dap/StackTraceArgumentsClass.java | 48 + .../dap/StackTraceRequestArguments.java | 48 + .../python/dap/StackTraceRequestClass.java | 64 + .../python/dap/StackTraceRequestCommand.java | 27 + .../python/dap/StackTraceResponseBody.java | 30 + .../python/dap/StackTraceResponseClass.java | 87 + .../dap/StartDebuggingRequestArguments.java | 184 +- .../StartDebuggingRequestArgumentsClass.java | 32 + .../dap/StartDebuggingRequestClass.java | 61 + .../dap/StartDebuggingRequestCommand.java | 27 + .../dap/StartDebuggingResponseClass.java | 88 + .../adapter/python/dap/StartMethod.java | 29 + .../adapter/python/dap/StepBackArguments.java | 170 - .../python/dap/StepBackArgumentsClass.java | 38 + .../python/dap/StepBackRequestArguments.java | 38 + .../python/dap/StepBackRequestClass.java | 62 + .../python/dap/StepBackRequestCommand.java | 27 + .../python/dap/StepBackResponseClass.java | 88 + .../adapter/python/dap/StepInArguments.java | 201 - .../python/dap/StepInArgumentsClass.java | 47 + .../python/dap/StepInRequestArguments.java | 47 + .../python/dap/StepInRequestClass.java | 66 + .../python/dap/StepInRequestCommand.java | 27 + .../python/dap/StepInResponseClass.java | 88 + .../adapter/python/dap/StepInTarget.java | 264 +- .../python/dap/StepInTargetsArguments.java | 108 - .../dap/StepInTargetsArgumentsClass.java | 18 + .../dap/StepInTargetsRequestArguments.java | 18 + .../python/dap/StepInTargetsRequestClass.java | 57 + .../dap/StepInTargetsRequestCommand.java | 27 + .../python/dap/StepInTargetsResponseBody.java | 15 + .../dap/StepInTargetsResponseClass.java | 87 + .../adapter/python/dap/StepOutArguments.java | 170 - .../python/dap/StepOutArgumentsClass.java | 38 + .../python/dap/StepOutRequestArguments.java | 38 + .../python/dap/StepOutRequestClass.java | 60 + .../python/dap/StepOutRequestCommand.java | 27 + .../python/dap/StepOutResponseClass.java | 88 + .../python/dap/SteppingGranularity.java | 36 + .../adapter/python/dap/StoppedEventBody.java | 83 + .../adapter/python/dap/StoppedEventClass.java | 56 + .../adapter/python/dap/StoppedEventEvent.java | 27 + .../python/dap/TerminateArguments.java | 105 - .../python/dap/TerminateArgumentsClass.java | 18 + .../python/dap/TerminateRequestArguments.java | 18 + .../python/dap/TerminateRequestClass.java | 64 + .../python/dap/TerminateRequestCommand.java | 27 + .../python/dap/TerminateResponseClass.java | 88 + .../python/dap/TerminateThreadsArguments.java | 107 - .../dap/TerminateThreadsArgumentsClass.java | 18 + .../dap/TerminateThreadsRequestArguments.java | 18 + .../dap/TerminateThreadsRequestClass.java | 56 + .../dap/TerminateThreadsRequestCommand.java | 27 + .../dap/TerminateThreadsResponseClass.java | 88 + .../python/dap/TerminatedEventBody.java | 18 + .../python/dap/TerminatedEventClass.java | 55 + .../python/dap/TerminatedEventEvent.java | 27 + .../monitor/adapter/python/dap/Thread.java | 127 +- .../adapter/python/dap/ThreadEventBody.java | 24 + .../adapter/python/dap/ThreadEventClass.java | 54 + .../adapter/python/dap/ThreadEventEvent.java | 27 + .../python/dap/ThreadsRequestClass.java | 54 + .../python/dap/ThreadsRequestCommand.java | 27 + .../python/dap/ThreadsResponseBody.java | 15 + .../python/dap/ThreadsResponseClass.java | 87 + .../use/monitor/adapter/python/dap/Type.java | 31 + .../adapter/python/dap/ValueFormat.java | 105 +- .../monitor/adapter/python/dap/Variable.java | 416 +- .../python/dap/VariablePresentationHint.java | 216 +- .../monitor/adapter/python/dap/Variables.java | 73 - .../python/dap/VariablesArguments.java | 286 -- .../python/dap/VariablesArgumentsClass.java | 63 + .../python/dap/VariablesRequestArguments.java | 63 + .../python/dap/VariablesRequestClass.java | 55 + .../python/dap/VariablesRequestCommand.java | 27 + .../python/dap/VariablesResponseBody.java | 15 + .../python/dap/VariablesResponseClass.java | 87 + .../adapter/python/dap/WrapperRoot.java | 1133 ++++ .../python/dap/WriteMemoryArguments.java | 207 - .../python/dap/WriteMemoryArgumentsClass.java | 51 + .../dap/WriteMemoryRequestArguments.java | 51 + .../python/dap/WriteMemoryRequestClass.java | 56 + .../python/dap/WriteMemoryRequestCommand.java | 27 + .../python/dap/WriteMemoryResponseBody.java | 26 + .../python/dap/WriteMemoryResponseClass.java | 87 + .../adapter/python/tmp/AttachRequest.java | 114 - .../adapter/python/tmp/AttachResponse.java | 9 - .../adapter/python/tmp/BreakpointEvent.java | 6 - .../adapter/python/tmp/Capabilities.java | 381 -- .../adapter/python/tmp/DAPMessage.java | 45 - .../adapter/python/tmp/EvaluateArguments.java | 31 - .../adapter/python/tmp/EvaluateRequest.java | 27 - .../use/monitor/adapter/python/tmp/Event.java | 58 - .../adapter/python/tmp/InitializeRequest.java | 207 - .../python/tmp/InitializeResponse.java | 37 - .../adapter/python/tmp/InitializedEvent.java | 12 - .../monitor/adapter/python/tmp/Request.java | 32 - .../monitor/adapter/python/tmp/Response.java | 70 - .../monitor/adapter/python/tmp/Thread.java | 22 - .../adapter/python/tmp/ThreadsResponse.java | 34 - .../resources/protocol/debugProtocol.json | 734 +-- 423 files changed, 18487 insertions(+), 21764 deletions(-) rename adapter/Python/{properties.json => references.json} (100%) create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ArgumentsClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestType.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseType.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BaseProtocol.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BodyClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BodyReason.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventType.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointReason.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Capabilities.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ChRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ChecksumAlgorithm.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItemType.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Configuration.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Converter.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPMessage.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointAccessType.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DebugProtocol.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstructionPresentationHint.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Env.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ErrorResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ErrorResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Event.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakMode.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Filter.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Group.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/IDUnion.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Kind.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventEvent.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleIDUnion.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventEvent.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventEvent.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProtocolMessage.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Request.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RequestEnum.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Response.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Restart.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArgumentsClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourcePresentationHint.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrameFormat.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFramePresentationHint.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartMethod.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SteppingGranularity.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventEvent.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Type.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variables.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WrapperRoot.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArgumentsClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestArguments.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestClass.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestCommand.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryResponseBody.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryResponseClass.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachRequest.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachResponse.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/BreakpointEvent.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Capabilities.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/DAPMessage.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateArguments.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateRequest.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Event.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeRequest.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeResponse.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializedEvent.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Request.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Response.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Thread.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/ThreadsResponse.java diff --git a/adapter/Python/dependency-reduced-pom.xml b/adapter/Python/dependency-reduced-pom.xml index 45a1a16..c9f71cd 100644 --- a/adapter/Python/dependency-reduced-pom.xml +++ b/adapter/Python/dependency-reduced-pom.xml @@ -27,22 +27,6 @@ - - org.jsonschema2pojo - jsonschema2pojo-maven-plugin - 1.2.2 - - - - generate - - - - - ${basedir}/src/main/resources/protocol/debugProtocol.json - org.tzi.use.monitor.adapter.python.dap - - diff --git a/adapter/Python/pom.xml b/adapter/Python/pom.xml index 310e93e..4592842 100644 --- a/adapter/Python/pom.xml +++ b/adapter/Python/pom.xml @@ -61,22 +61,6 @@ - - - - - - - - - - - - - - - - diff --git a/adapter/Python/properties_gen.sh b/adapter/Python/properties_gen.sh index 07545e8..2e35669 100755 --- a/adapter/Python/properties_gen.sh +++ b/adapter/Python/properties_gen.sh @@ -11,8 +11,8 @@ fi jq ' .definitions - | keys - | map({ key: ., value: { "$ref": "#/definitions/\(. )" } }) + | to_entries + | map({ key: .key, value: { "$ref": "#/definitions/\(.key)" } }) | from_entries | { properties: . } ' "$INPUT_SCHEMA" > "$OUTPUT_FILE" diff --git a/adapter/Python/properties.json b/adapter/Python/references.json similarity index 100% rename from adapter/Python/properties.json rename to adapter/Python/references.json index b309b59..83e91c2 100644 --- a/adapter/Python/properties.json +++ b/adapter/Python/references.json @@ -1,565 +1,565 @@ { "properties": { - "AttachRequest": { - "$ref": "#/definitions/AttachRequest" - }, - "AttachRequestArguments": { - "$ref": "#/definitions/AttachRequestArguments" - }, - "AttachResponse": { - "$ref": "#/definitions/AttachResponse" - }, - "Breakpoint": { - "$ref": "#/definitions/Breakpoint" + "ProtocolMessage": { + "$ref": "#/definitions/ProtocolMessage" }, - "BreakpointEvent": { - "$ref": "#/definitions/BreakpointEvent" + "Request": { + "$ref": "#/definitions/Request" }, - "BreakpointLocation": { - "$ref": "#/definitions/BreakpointLocation" + "Event": { + "$ref": "#/definitions/Event" }, - "BreakpointLocationsArguments": { - "$ref": "#/definitions/BreakpointLocationsArguments" + "Response": { + "$ref": "#/definitions/Response" }, - "BreakpointLocationsRequest": { - "$ref": "#/definitions/BreakpointLocationsRequest" + "ErrorResponse": { + "$ref": "#/definitions/ErrorResponse" }, - "BreakpointLocationsResponse": { - "$ref": "#/definitions/BreakpointLocationsResponse" + "CancelRequest": { + "$ref": "#/definitions/CancelRequest" }, "CancelArguments": { "$ref": "#/definitions/CancelArguments" }, - "CancelRequest": { - "$ref": "#/definitions/CancelRequest" - }, "CancelResponse": { "$ref": "#/definitions/CancelResponse" }, - "Capabilities": { - "$ref": "#/definitions/Capabilities" - }, - "CapabilitiesEvent": { - "$ref": "#/definitions/CapabilitiesEvent" - }, - "Checksum": { - "$ref": "#/definitions/Checksum" - }, - "ChecksumAlgorithm": { - "$ref": "#/definitions/ChecksumAlgorithm" - }, - "ColumnDescriptor": { - "$ref": "#/definitions/ColumnDescriptor" + "InitializedEvent": { + "$ref": "#/definitions/InitializedEvent" }, - "CompletionItem": { - "$ref": "#/definitions/CompletionItem" + "StoppedEvent": { + "$ref": "#/definitions/StoppedEvent" }, - "CompletionItemType": { - "$ref": "#/definitions/CompletionItemType" + "ContinuedEvent": { + "$ref": "#/definitions/ContinuedEvent" }, - "CompletionsArguments": { - "$ref": "#/definitions/CompletionsArguments" + "ExitedEvent": { + "$ref": "#/definitions/ExitedEvent" }, - "CompletionsRequest": { - "$ref": "#/definitions/CompletionsRequest" + "TerminatedEvent": { + "$ref": "#/definitions/TerminatedEvent" }, - "CompletionsResponse": { - "$ref": "#/definitions/CompletionsResponse" + "ThreadEvent": { + "$ref": "#/definitions/ThreadEvent" }, - "ConfigurationDoneArguments": { - "$ref": "#/definitions/ConfigurationDoneArguments" + "OutputEvent": { + "$ref": "#/definitions/OutputEvent" }, - "ConfigurationDoneRequest": { - "$ref": "#/definitions/ConfigurationDoneRequest" + "BreakpointEvent": { + "$ref": "#/definitions/BreakpointEvent" }, - "ConfigurationDoneResponse": { - "$ref": "#/definitions/ConfigurationDoneResponse" + "ModuleEvent": { + "$ref": "#/definitions/ModuleEvent" }, - "ContinueArguments": { - "$ref": "#/definitions/ContinueArguments" + "LoadedSourceEvent": { + "$ref": "#/definitions/LoadedSourceEvent" }, - "ContinueRequest": { - "$ref": "#/definitions/ContinueRequest" + "ProcessEvent": { + "$ref": "#/definitions/ProcessEvent" }, - "ContinueResponse": { - "$ref": "#/definitions/ContinueResponse" + "CapabilitiesEvent": { + "$ref": "#/definitions/CapabilitiesEvent" }, - "ContinuedEvent": { - "$ref": "#/definitions/ContinuedEvent" + "ProgressStartEvent": { + "$ref": "#/definitions/ProgressStartEvent" }, - "DataBreakpoint": { - "$ref": "#/definitions/DataBreakpoint" + "ProgressUpdateEvent": { + "$ref": "#/definitions/ProgressUpdateEvent" }, - "DataBreakpointAccessType": { - "$ref": "#/definitions/DataBreakpointAccessType" + "ProgressEndEvent": { + "$ref": "#/definitions/ProgressEndEvent" }, - "DataBreakpointInfoArguments": { - "$ref": "#/definitions/DataBreakpointInfoArguments" + "InvalidatedEvent": { + "$ref": "#/definitions/InvalidatedEvent" }, - "DataBreakpointInfoRequest": { - "$ref": "#/definitions/DataBreakpointInfoRequest" + "MemoryEvent": { + "$ref": "#/definitions/MemoryEvent" }, - "DataBreakpointInfoResponse": { - "$ref": "#/definitions/DataBreakpointInfoResponse" + "RunInTerminalRequest": { + "$ref": "#/definitions/RunInTerminalRequest" }, - "DisassembleArguments": { - "$ref": "#/definitions/DisassembleArguments" + "RunInTerminalRequestArguments": { + "$ref": "#/definitions/RunInTerminalRequestArguments" }, - "DisassembleRequest": { - "$ref": "#/definitions/DisassembleRequest" + "RunInTerminalResponse": { + "$ref": "#/definitions/RunInTerminalResponse" }, - "DisassembleResponse": { - "$ref": "#/definitions/DisassembleResponse" + "StartDebuggingRequest": { + "$ref": "#/definitions/StartDebuggingRequest" }, - "DisassembledInstruction": { - "$ref": "#/definitions/DisassembledInstruction" + "StartDebuggingRequestArguments": { + "$ref": "#/definitions/StartDebuggingRequestArguments" }, - "DisconnectArguments": { - "$ref": "#/definitions/DisconnectArguments" + "StartDebuggingResponse": { + "$ref": "#/definitions/StartDebuggingResponse" }, - "DisconnectRequest": { - "$ref": "#/definitions/DisconnectRequest" + "InitializeRequest": { + "$ref": "#/definitions/InitializeRequest" }, - "DisconnectResponse": { - "$ref": "#/definitions/DisconnectResponse" + "InitializeRequestArguments": { + "$ref": "#/definitions/InitializeRequestArguments" }, - "ErrorResponse": { - "$ref": "#/definitions/ErrorResponse" + "InitializeResponse": { + "$ref": "#/definitions/InitializeResponse" }, - "EvaluateArguments": { - "$ref": "#/definitions/EvaluateArguments" + "ConfigurationDoneRequest": { + "$ref": "#/definitions/ConfigurationDoneRequest" }, - "EvaluateRequest": { - "$ref": "#/definitions/EvaluateRequest" + "ConfigurationDoneArguments": { + "$ref": "#/definitions/ConfigurationDoneArguments" }, - "EvaluateResponse": { - "$ref": "#/definitions/EvaluateResponse" + "ConfigurationDoneResponse": { + "$ref": "#/definitions/ConfigurationDoneResponse" }, - "Event": { - "$ref": "#/definitions/Event" + "LaunchRequest": { + "$ref": "#/definitions/LaunchRequest" }, - "ExceptionBreakMode": { - "$ref": "#/definitions/ExceptionBreakMode" + "LaunchRequestArguments": { + "$ref": "#/definitions/LaunchRequestArguments" }, - "ExceptionBreakpointsFilter": { - "$ref": "#/definitions/ExceptionBreakpointsFilter" + "LaunchResponse": { + "$ref": "#/definitions/LaunchResponse" }, - "ExceptionDetails": { - "$ref": "#/definitions/ExceptionDetails" + "AttachRequest": { + "$ref": "#/definitions/AttachRequest" }, - "ExceptionFilterOptions": { - "$ref": "#/definitions/ExceptionFilterOptions" + "AttachRequestArguments": { + "$ref": "#/definitions/AttachRequestArguments" }, - "ExceptionInfoArguments": { - "$ref": "#/definitions/ExceptionInfoArguments" + "AttachResponse": { + "$ref": "#/definitions/AttachResponse" }, - "ExceptionInfoRequest": { - "$ref": "#/definitions/ExceptionInfoRequest" + "RestartRequest": { + "$ref": "#/definitions/RestartRequest" }, - "ExceptionInfoResponse": { - "$ref": "#/definitions/ExceptionInfoResponse" + "RestartArguments": { + "$ref": "#/definitions/RestartArguments" }, - "ExceptionOptions": { - "$ref": "#/definitions/ExceptionOptions" + "RestartResponse": { + "$ref": "#/definitions/RestartResponse" }, - "ExceptionPathSegment": { - "$ref": "#/definitions/ExceptionPathSegment" + "DisconnectRequest": { + "$ref": "#/definitions/DisconnectRequest" }, - "ExitedEvent": { - "$ref": "#/definitions/ExitedEvent" + "DisconnectArguments": { + "$ref": "#/definitions/DisconnectArguments" }, - "FunctionBreakpoint": { - "$ref": "#/definitions/FunctionBreakpoint" + "DisconnectResponse": { + "$ref": "#/definitions/DisconnectResponse" }, - "GotoArguments": { - "$ref": "#/definitions/GotoArguments" + "TerminateRequest": { + "$ref": "#/definitions/TerminateRequest" }, - "GotoRequest": { - "$ref": "#/definitions/GotoRequest" + "TerminateArguments": { + "$ref": "#/definitions/TerminateArguments" }, - "GotoResponse": { - "$ref": "#/definitions/GotoResponse" + "TerminateResponse": { + "$ref": "#/definitions/TerminateResponse" }, - "GotoTarget": { - "$ref": "#/definitions/GotoTarget" + "BreakpointLocationsRequest": { + "$ref": "#/definitions/BreakpointLocationsRequest" }, - "GotoTargetsArguments": { - "$ref": "#/definitions/GotoTargetsArguments" + "BreakpointLocationsArguments": { + "$ref": "#/definitions/BreakpointLocationsArguments" }, - "GotoTargetsRequest": { - "$ref": "#/definitions/GotoTargetsRequest" + "BreakpointLocationsResponse": { + "$ref": "#/definitions/BreakpointLocationsResponse" }, - "GotoTargetsResponse": { - "$ref": "#/definitions/GotoTargetsResponse" + "SetBreakpointsRequest": { + "$ref": "#/definitions/SetBreakpointsRequest" }, - "InitializeRequest": { - "$ref": "#/definitions/InitializeRequest" + "SetBreakpointsArguments": { + "$ref": "#/definitions/SetBreakpointsArguments" }, - "InitializeRequestArguments": { - "$ref": "#/definitions/InitializeRequestArguments" + "SetBreakpointsResponse": { + "$ref": "#/definitions/SetBreakpointsResponse" }, - "InitializeResponse": { - "$ref": "#/definitions/InitializeResponse" + "SetFunctionBreakpointsRequest": { + "$ref": "#/definitions/SetFunctionBreakpointsRequest" }, - "InitializedEvent": { - "$ref": "#/definitions/InitializedEvent" + "SetFunctionBreakpointsArguments": { + "$ref": "#/definitions/SetFunctionBreakpointsArguments" }, - "InstructionBreakpoint": { - "$ref": "#/definitions/InstructionBreakpoint" + "SetFunctionBreakpointsResponse": { + "$ref": "#/definitions/SetFunctionBreakpointsResponse" }, - "InvalidatedAreas": { - "$ref": "#/definitions/InvalidatedAreas" + "SetExceptionBreakpointsRequest": { + "$ref": "#/definitions/SetExceptionBreakpointsRequest" }, - "InvalidatedEvent": { - "$ref": "#/definitions/InvalidatedEvent" + "SetExceptionBreakpointsArguments": { + "$ref": "#/definitions/SetExceptionBreakpointsArguments" }, - "LaunchRequest": { - "$ref": "#/definitions/LaunchRequest" + "SetExceptionBreakpointsResponse": { + "$ref": "#/definitions/SetExceptionBreakpointsResponse" }, - "LaunchRequestArguments": { - "$ref": "#/definitions/LaunchRequestArguments" + "DataBreakpointInfoRequest": { + "$ref": "#/definitions/DataBreakpointInfoRequest" }, - "LaunchResponse": { - "$ref": "#/definitions/LaunchResponse" + "DataBreakpointInfoArguments": { + "$ref": "#/definitions/DataBreakpointInfoArguments" }, - "LoadedSourceEvent": { - "$ref": "#/definitions/LoadedSourceEvent" + "DataBreakpointInfoResponse": { + "$ref": "#/definitions/DataBreakpointInfoResponse" }, - "LoadedSourcesArguments": { - "$ref": "#/definitions/LoadedSourcesArguments" + "SetDataBreakpointsRequest": { + "$ref": "#/definitions/SetDataBreakpointsRequest" }, - "LoadedSourcesRequest": { - "$ref": "#/definitions/LoadedSourcesRequest" + "SetDataBreakpointsArguments": { + "$ref": "#/definitions/SetDataBreakpointsArguments" }, - "LoadedSourcesResponse": { - "$ref": "#/definitions/LoadedSourcesResponse" + "SetDataBreakpointsResponse": { + "$ref": "#/definitions/SetDataBreakpointsResponse" }, - "MemoryEvent": { - "$ref": "#/definitions/MemoryEvent" + "SetInstructionBreakpointsRequest": { + "$ref": "#/definitions/SetInstructionBreakpointsRequest" }, - "Message": { - "$ref": "#/definitions/Message" + "SetInstructionBreakpointsArguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" }, - "Module": { - "$ref": "#/definitions/Module" + "SetInstructionBreakpointsResponse": { + "$ref": "#/definitions/SetInstructionBreakpointsResponse" }, - "ModuleEvent": { - "$ref": "#/definitions/ModuleEvent" + "ContinueRequest": { + "$ref": "#/definitions/ContinueRequest" }, - "ModulesArguments": { - "$ref": "#/definitions/ModulesArguments" + "ContinueArguments": { + "$ref": "#/definitions/ContinueArguments" }, - "ModulesRequest": { - "$ref": "#/definitions/ModulesRequest" + "ContinueResponse": { + "$ref": "#/definitions/ContinueResponse" }, - "ModulesResponse": { - "$ref": "#/definitions/ModulesResponse" + "NextRequest": { + "$ref": "#/definitions/NextRequest" }, "NextArguments": { "$ref": "#/definitions/NextArguments" }, - "NextRequest": { - "$ref": "#/definitions/NextRequest" - }, "NextResponse": { "$ref": "#/definitions/NextResponse" }, - "OutputEvent": { - "$ref": "#/definitions/OutputEvent" - }, - "PauseArguments": { - "$ref": "#/definitions/PauseArguments" - }, - "PauseRequest": { - "$ref": "#/definitions/PauseRequest" + "StepInRequest": { + "$ref": "#/definitions/StepInRequest" }, - "PauseResponse": { - "$ref": "#/definitions/PauseResponse" + "StepInArguments": { + "$ref": "#/definitions/StepInArguments" }, - "ProcessEvent": { - "$ref": "#/definitions/ProcessEvent" + "StepInResponse": { + "$ref": "#/definitions/StepInResponse" }, - "ProgressEndEvent": { - "$ref": "#/definitions/ProgressEndEvent" + "StepOutRequest": { + "$ref": "#/definitions/StepOutRequest" }, - "ProgressStartEvent": { - "$ref": "#/definitions/ProgressStartEvent" + "StepOutArguments": { + "$ref": "#/definitions/StepOutArguments" }, - "ProgressUpdateEvent": { - "$ref": "#/definitions/ProgressUpdateEvent" + "StepOutResponse": { + "$ref": "#/definitions/StepOutResponse" }, - "ProtocolMessage": { - "$ref": "#/definitions/ProtocolMessage" + "StepBackRequest": { + "$ref": "#/definitions/StepBackRequest" }, - "ReadMemoryArguments": { - "$ref": "#/definitions/ReadMemoryArguments" + "StepBackArguments": { + "$ref": "#/definitions/StepBackArguments" }, - "ReadMemoryRequest": { - "$ref": "#/definitions/ReadMemoryRequest" + "StepBackResponse": { + "$ref": "#/definitions/StepBackResponse" }, - "ReadMemoryResponse": { - "$ref": "#/definitions/ReadMemoryResponse" + "ReverseContinueRequest": { + "$ref": "#/definitions/ReverseContinueRequest" }, - "Request": { - "$ref": "#/definitions/Request" + "ReverseContinueArguments": { + "$ref": "#/definitions/ReverseContinueArguments" }, - "Response": { - "$ref": "#/definitions/Response" + "ReverseContinueResponse": { + "$ref": "#/definitions/ReverseContinueResponse" }, - "RestartArguments": { - "$ref": "#/definitions/RestartArguments" + "RestartFrameRequest": { + "$ref": "#/definitions/RestartFrameRequest" }, "RestartFrameArguments": { "$ref": "#/definitions/RestartFrameArguments" }, - "RestartFrameRequest": { - "$ref": "#/definitions/RestartFrameRequest" - }, "RestartFrameResponse": { "$ref": "#/definitions/RestartFrameResponse" }, - "RestartRequest": { - "$ref": "#/definitions/RestartRequest" - }, - "RestartResponse": { - "$ref": "#/definitions/RestartResponse" + "GotoRequest": { + "$ref": "#/definitions/GotoRequest" }, - "ReverseContinueArguments": { - "$ref": "#/definitions/ReverseContinueArguments" + "GotoArguments": { + "$ref": "#/definitions/GotoArguments" }, - "ReverseContinueRequest": { - "$ref": "#/definitions/ReverseContinueRequest" + "GotoResponse": { + "$ref": "#/definitions/GotoResponse" }, - "ReverseContinueResponse": { - "$ref": "#/definitions/ReverseContinueResponse" + "PauseRequest": { + "$ref": "#/definitions/PauseRequest" }, - "RunInTerminalRequest": { - "$ref": "#/definitions/RunInTerminalRequest" + "PauseArguments": { + "$ref": "#/definitions/PauseArguments" }, - "RunInTerminalRequestArguments": { - "$ref": "#/definitions/RunInTerminalRequestArguments" + "PauseResponse": { + "$ref": "#/definitions/PauseResponse" }, - "RunInTerminalResponse": { - "$ref": "#/definitions/RunInTerminalResponse" + "StackTraceRequest": { + "$ref": "#/definitions/StackTraceRequest" }, - "Scope": { - "$ref": "#/definitions/Scope" + "StackTraceArguments": { + "$ref": "#/definitions/StackTraceArguments" }, - "ScopesArguments": { - "$ref": "#/definitions/ScopesArguments" + "StackTraceResponse": { + "$ref": "#/definitions/StackTraceResponse" }, "ScopesRequest": { "$ref": "#/definitions/ScopesRequest" }, + "ScopesArguments": { + "$ref": "#/definitions/ScopesArguments" + }, "ScopesResponse": { "$ref": "#/definitions/ScopesResponse" }, - "SetBreakpointsArguments": { - "$ref": "#/definitions/SetBreakpointsArguments" + "VariablesRequest": { + "$ref": "#/definitions/VariablesRequest" }, - "SetBreakpointsRequest": { - "$ref": "#/definitions/SetBreakpointsRequest" + "VariablesArguments": { + "$ref": "#/definitions/VariablesArguments" }, - "SetBreakpointsResponse": { - "$ref": "#/definitions/SetBreakpointsResponse" + "VariablesResponse": { + "$ref": "#/definitions/VariablesResponse" + }, + "SetVariableRequest": { + "$ref": "#/definitions/SetVariableRequest" + }, + "SetVariableArguments": { + "$ref": "#/definitions/SetVariableArguments" + }, + "SetVariableResponse": { + "$ref": "#/definitions/SetVariableResponse" + }, + "SourceRequest": { + "$ref": "#/definitions/SourceRequest" + }, + "SourceArguments": { + "$ref": "#/definitions/SourceArguments" + }, + "SourceResponse": { + "$ref": "#/definitions/SourceResponse" + }, + "ThreadsRequest": { + "$ref": "#/definitions/ThreadsRequest" + }, + "ThreadsResponse": { + "$ref": "#/definitions/ThreadsResponse" + }, + "TerminateThreadsRequest": { + "$ref": "#/definitions/TerminateThreadsRequest" + }, + "TerminateThreadsArguments": { + "$ref": "#/definitions/TerminateThreadsArguments" + }, + "TerminateThreadsResponse": { + "$ref": "#/definitions/TerminateThreadsResponse" + }, + "ModulesRequest": { + "$ref": "#/definitions/ModulesRequest" }, - "SetDataBreakpointsArguments": { - "$ref": "#/definitions/SetDataBreakpointsArguments" + "ModulesArguments": { + "$ref": "#/definitions/ModulesArguments" }, - "SetDataBreakpointsRequest": { - "$ref": "#/definitions/SetDataBreakpointsRequest" + "ModulesResponse": { + "$ref": "#/definitions/ModulesResponse" }, - "SetDataBreakpointsResponse": { - "$ref": "#/definitions/SetDataBreakpointsResponse" + "LoadedSourcesRequest": { + "$ref": "#/definitions/LoadedSourcesRequest" }, - "SetExceptionBreakpointsArguments": { - "$ref": "#/definitions/SetExceptionBreakpointsArguments" + "LoadedSourcesArguments": { + "$ref": "#/definitions/LoadedSourcesArguments" }, - "SetExceptionBreakpointsRequest": { - "$ref": "#/definitions/SetExceptionBreakpointsRequest" + "LoadedSourcesResponse": { + "$ref": "#/definitions/LoadedSourcesResponse" }, - "SetExceptionBreakpointsResponse": { - "$ref": "#/definitions/SetExceptionBreakpointsResponse" + "EvaluateRequest": { + "$ref": "#/definitions/EvaluateRequest" }, - "SetExpressionArguments": { - "$ref": "#/definitions/SetExpressionArguments" + "EvaluateArguments": { + "$ref": "#/definitions/EvaluateArguments" + }, + "EvaluateResponse": { + "$ref": "#/definitions/EvaluateResponse" }, "SetExpressionRequest": { "$ref": "#/definitions/SetExpressionRequest" }, + "SetExpressionArguments": { + "$ref": "#/definitions/SetExpressionArguments" + }, "SetExpressionResponse": { "$ref": "#/definitions/SetExpressionResponse" }, - "SetFunctionBreakpointsArguments": { - "$ref": "#/definitions/SetFunctionBreakpointsArguments" - }, - "SetFunctionBreakpointsRequest": { - "$ref": "#/definitions/SetFunctionBreakpointsRequest" - }, - "SetFunctionBreakpointsResponse": { - "$ref": "#/definitions/SetFunctionBreakpointsResponse" + "StepInTargetsRequest": { + "$ref": "#/definitions/StepInTargetsRequest" }, - "SetInstructionBreakpointsArguments": { - "$ref": "#/definitions/SetInstructionBreakpointsArguments" + "StepInTargetsArguments": { + "$ref": "#/definitions/StepInTargetsArguments" }, - "SetInstructionBreakpointsRequest": { - "$ref": "#/definitions/SetInstructionBreakpointsRequest" + "StepInTargetsResponse": { + "$ref": "#/definitions/StepInTargetsResponse" }, - "SetInstructionBreakpointsResponse": { - "$ref": "#/definitions/SetInstructionBreakpointsResponse" + "GotoTargetsRequest": { + "$ref": "#/definitions/GotoTargetsRequest" }, - "SetVariableArguments": { - "$ref": "#/definitions/SetVariableArguments" + "GotoTargetsArguments": { + "$ref": "#/definitions/GotoTargetsArguments" }, - "SetVariableRequest": { - "$ref": "#/definitions/SetVariableRequest" + "GotoTargetsResponse": { + "$ref": "#/definitions/GotoTargetsResponse" }, - "SetVariableResponse": { - "$ref": "#/definitions/SetVariableResponse" + "CompletionsRequest": { + "$ref": "#/definitions/CompletionsRequest" }, - "Source": { - "$ref": "#/definitions/Source" + "CompletionsArguments": { + "$ref": "#/definitions/CompletionsArguments" }, - "SourceArguments": { - "$ref": "#/definitions/SourceArguments" + "CompletionsResponse": { + "$ref": "#/definitions/CompletionsResponse" }, - "SourceBreakpoint": { - "$ref": "#/definitions/SourceBreakpoint" + "ExceptionInfoRequest": { + "$ref": "#/definitions/ExceptionInfoRequest" }, - "SourceRequest": { - "$ref": "#/definitions/SourceRequest" + "ExceptionInfoArguments": { + "$ref": "#/definitions/ExceptionInfoArguments" }, - "SourceResponse": { - "$ref": "#/definitions/SourceResponse" + "ExceptionInfoResponse": { + "$ref": "#/definitions/ExceptionInfoResponse" }, - "StackFrame": { - "$ref": "#/definitions/StackFrame" + "ReadMemoryRequest": { + "$ref": "#/definitions/ReadMemoryRequest" }, - "StackFrameFormat": { - "$ref": "#/definitions/StackFrameFormat" + "ReadMemoryArguments": { + "$ref": "#/definitions/ReadMemoryArguments" }, - "StackTraceArguments": { - "$ref": "#/definitions/StackTraceArguments" + "ReadMemoryResponse": { + "$ref": "#/definitions/ReadMemoryResponse" }, - "StackTraceRequest": { - "$ref": "#/definitions/StackTraceRequest" + "WriteMemoryRequest": { + "$ref": "#/definitions/WriteMemoryRequest" }, - "StackTraceResponse": { - "$ref": "#/definitions/StackTraceResponse" + "WriteMemoryArguments": { + "$ref": "#/definitions/WriteMemoryArguments" }, - "StartDebuggingRequest": { - "$ref": "#/definitions/StartDebuggingRequest" + "WriteMemoryResponse": { + "$ref": "#/definitions/WriteMemoryResponse" }, - "StartDebuggingRequestArguments": { - "$ref": "#/definitions/StartDebuggingRequestArguments" + "DisassembleRequest": { + "$ref": "#/definitions/DisassembleRequest" }, - "StartDebuggingResponse": { - "$ref": "#/definitions/StartDebuggingResponse" + "DisassembleArguments": { + "$ref": "#/definitions/DisassembleArguments" }, - "StepBackArguments": { - "$ref": "#/definitions/StepBackArguments" + "DisassembleResponse": { + "$ref": "#/definitions/DisassembleResponse" }, - "StepBackRequest": { - "$ref": "#/definitions/StepBackRequest" + "Capabilities": { + "$ref": "#/definitions/Capabilities" }, - "StepBackResponse": { - "$ref": "#/definitions/StepBackResponse" + "ExceptionBreakpointsFilter": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" }, - "StepInArguments": { - "$ref": "#/definitions/StepInArguments" + "Message": { + "$ref": "#/definitions/Message" }, - "StepInRequest": { - "$ref": "#/definitions/StepInRequest" + "Module": { + "$ref": "#/definitions/Module" }, - "StepInResponse": { - "$ref": "#/definitions/StepInResponse" + "ColumnDescriptor": { + "$ref": "#/definitions/ColumnDescriptor" }, - "StepInTarget": { - "$ref": "#/definitions/StepInTarget" + "Thread": { + "$ref": "#/definitions/Thread" }, - "StepInTargetsArguments": { - "$ref": "#/definitions/StepInTargetsArguments" + "Source": { + "$ref": "#/definitions/Source" }, - "StepInTargetsRequest": { - "$ref": "#/definitions/StepInTargetsRequest" + "StackFrame": { + "$ref": "#/definitions/StackFrame" }, - "StepInTargetsResponse": { - "$ref": "#/definitions/StepInTargetsResponse" + "Scope": { + "$ref": "#/definitions/Scope" }, - "StepOutArguments": { - "$ref": "#/definitions/StepOutArguments" + "Variable": { + "$ref": "#/definitions/Variable" }, - "StepOutRequest": { - "$ref": "#/definitions/StepOutRequest" + "VariablePresentationHint": { + "$ref": "#/definitions/VariablePresentationHint" }, - "StepOutResponse": { - "$ref": "#/definitions/StepOutResponse" + "BreakpointLocation": { + "$ref": "#/definitions/BreakpointLocation" }, - "SteppingGranularity": { - "$ref": "#/definitions/SteppingGranularity" + "SourceBreakpoint": { + "$ref": "#/definitions/SourceBreakpoint" }, - "StoppedEvent": { - "$ref": "#/definitions/StoppedEvent" + "FunctionBreakpoint": { + "$ref": "#/definitions/FunctionBreakpoint" }, - "TerminateArguments": { - "$ref": "#/definitions/TerminateArguments" + "DataBreakpointAccessType": { + "$ref": "#/definitions/DataBreakpointAccessType" }, - "TerminateRequest": { - "$ref": "#/definitions/TerminateRequest" + "DataBreakpoint": { + "$ref": "#/definitions/DataBreakpoint" }, - "TerminateResponse": { - "$ref": "#/definitions/TerminateResponse" + "InstructionBreakpoint": { + "$ref": "#/definitions/InstructionBreakpoint" }, - "TerminateThreadsArguments": { - "$ref": "#/definitions/TerminateThreadsArguments" + "Breakpoint": { + "$ref": "#/definitions/Breakpoint" }, - "TerminateThreadsRequest": { - "$ref": "#/definitions/TerminateThreadsRequest" + "SteppingGranularity": { + "$ref": "#/definitions/SteppingGranularity" }, - "TerminateThreadsResponse": { - "$ref": "#/definitions/TerminateThreadsResponse" + "StepInTarget": { + "$ref": "#/definitions/StepInTarget" }, - "TerminatedEvent": { - "$ref": "#/definitions/TerminatedEvent" + "GotoTarget": { + "$ref": "#/definitions/GotoTarget" }, - "Thread": { - "$ref": "#/definitions/Thread" + "CompletionItem": { + "$ref": "#/definitions/CompletionItem" }, - "ThreadEvent": { - "$ref": "#/definitions/ThreadEvent" + "CompletionItemType": { + "$ref": "#/definitions/CompletionItemType" }, - "ThreadsRequest": { - "$ref": "#/definitions/ThreadsRequest" + "ChecksumAlgorithm": { + "$ref": "#/definitions/ChecksumAlgorithm" }, - "ThreadsResponse": { - "$ref": "#/definitions/ThreadsResponse" + "Checksum": { + "$ref": "#/definitions/Checksum" }, "ValueFormat": { "$ref": "#/definitions/ValueFormat" }, - "Variable": { - "$ref": "#/definitions/Variable" + "StackFrameFormat": { + "$ref": "#/definitions/StackFrameFormat" }, - "VariablePresentationHint": { - "$ref": "#/definitions/VariablePresentationHint" + "ExceptionFilterOptions": { + "$ref": "#/definitions/ExceptionFilterOptions" }, - "VariablesArguments": { - "$ref": "#/definitions/VariablesArguments" + "ExceptionOptions": { + "$ref": "#/definitions/ExceptionOptions" }, - "VariablesRequest": { - "$ref": "#/definitions/VariablesRequest" + "ExceptionBreakMode": { + "$ref": "#/definitions/ExceptionBreakMode" }, - "VariablesResponse": { - "$ref": "#/definitions/VariablesResponse" + "ExceptionPathSegment": { + "$ref": "#/definitions/ExceptionPathSegment" }, - "WriteMemoryArguments": { - "$ref": "#/definitions/WriteMemoryArguments" + "ExceptionDetails": { + "$ref": "#/definitions/ExceptionDetails" }, - "WriteMemoryRequest": { - "$ref": "#/definitions/WriteMemoryRequest" + "DisassembledInstruction": { + "$ref": "#/definitions/DisassembledInstruction" }, - "WriteMemoryResponse": { - "$ref": "#/definitions/WriteMemoryResponse" + "InvalidatedAreas": { + "$ref": "#/definitions/InvalidatedAreas" } } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java index 433018e..ce1baa9 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java @@ -1,7 +1,7 @@ package org.tzi.use.monitor.adapter.python; -import org.tzi.use.monitor.adapter.python.tmp.BreakpointEvent; +import org.tzi.use.monitor.adapter.python.dap.BreakpointEventClass; public interface BreakpointHandler { - void handleBreakpoint(BreakpointEvent event); + void handleBreakpoint(BreakpointEventClass event); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 7ad76d5..a766e6f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.tzi.use.monitor.adapter.python.dap.*; -import org.tzi.use.monitor.adapter.python.tmp.*; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyTypeRaw; import java.io.*; @@ -47,52 +46,26 @@ boolean attach(String host, int port) { initArgs.setLinesStartAt1(true); initArgs.setColumnsStartAt1(true); initArgs.setPathFormat("path"); -// var initArgs = new InitializeRequest.InitializeRequestArguments(); -// initArgs.setAdapterID("USE"); -// initArgs.setLinesStartAt1(true); -// initArgs.setColumnsStartAt1(true); -// initArgs.setPathFormat("path"); -// var initReq = new InitializeRequest(REQUEST_COUNTER++, initArgs); -// var initResp = (InitializeResponse) sendRequest(initReq); + var initReq = new InitializeRequestClass(); + initReq.setSeq(REQUEST_COUNTER++); + initReq.setArguments(initArgs); + var initResp = (InitializeResponseClass) sendRequest(initReq); // Attach - var attachArgs = new AttachRequest.AttachRequestArguments(); + var attachArgs = new AttachRequestArgumentsClass(); attachArgs.setConnect(Map.of("host", host, "port", port)); attachArgs.setPathMappings(List.of(Map.of("localRoot", WORKSPACE, "remoteRoot", "."))); - attachArgs.setClientOS(System.getProperty("os.name")); + attachArgs.setClientOs("unix"); attachArgs.setDebugOptions(List.of("RedirectOutput", "ShowReturnValue")); attachArgs.setShowReturnValue(true); attachArgs.setJustMyCode(true); attachArgs.setWorkspaceFolder(WORKSPACE); attachArgs.setSessionId(UUID.randomUUID().toString()); - var attachReq = new AttachRequest(REQUEST_COUNTER++, attachArgs); + var attachReq = new AttachRequestClass(); + attachReq.setArguments(attachArgs); + attachReq.setSeq(REQUEST_COUNTER++); sendAsyncRequest(attachReq); -// arguments.put("name", "DebugpyClient"); -// arguments.put("type", "debugpy"); -// arguments.put("request", "attach"); -// var connect = arguments.putObject("connect"); -// connect.put("host", host); -// connect.put("port", port); -// // TODO: Add localRoot setting -// ArrayNode pathMappings = mapper.createArrayNode(); -// ObjectNode mapping = mapper.createObjectNode(); -// mapping.put("localRoot", WORKSPACE); -// mapping.put("remoteRoot", "."); -// pathMappings.add(mapping); -// arguments.set("pathMappings", pathMappings); -// arguments.put("__configurationTarget", 6); -// arguments.put("clientOS", "unix"); -// var debugOptions = arguments.putArray("debugOptions"); -// debugOptions.add("RedirectOutput"); -// debugOptions.add("ShowReturnValue"); -// arguments.put("justMyCode", true); -// arguments.put("showReturnValue", true); -// arguments.put("workspaceFolder", WORKSPACE); -// arguments.put("__sessionId", UUID.randomUUID().toString()); -// attachReq.setArguments(arguments); -// sendAsyncRequest(attachReq); -// // TODO wait for init event try { System.out.println("Waiting for init event..."); @@ -101,30 +74,26 @@ boolean attach(String host, int port) { } catch (InterruptedException | ExecutionException e) { return false; } -// -// System.out.println("Sending configuration done..."); -// //Configuration Done -// var confDoneReq = new Request(); -// var confMsg = new DAPMessage(); -// confMsg.setSeq(currReqSeq++); -// confMsg.setType("request"); -// confDoneReq.setProtocolMessage(confMsg); -// confDoneReq.setCommand("configurationDone"); -// // TODO Fix should not be async request -// //Response confDoneResp = (Response) sendRequest(confDoneReq); -// sendAsyncRequest(confDoneReq); -// -// // Wait for attach async response -// // TODO FIX! responseQueue instead of single slot -// //Response attachResponse = (Response) waitForAsyncResponse(); -// //return initResp.getSuccess() && attachResponse.getSuccess() && confDoneResp.getSuccess(); -// try { -// java.lang.Thread.sleep(1000); -// } catch (InterruptedException e) { -// throw new RuntimeException(e); -// } -// return initResp.getSuccess(); - return true; + + System.out.println("Sending configuration done..."); + //Configuration Done + + var confDoneReq = new ConfigurationDoneRequestClass(); + confDoneReq.setSeq(REQUEST_COUNTER++); + // TODO Fix should not be async request + //Response confDoneResp = (Response) sendRequest(confDoneReq); + sendAsyncRequest(confDoneReq); + + // Wait for attach async response + // TODO FIX! responseQueue instead of single slot + //Response attachResponse = (Response) waitForAsyncResponse(); + //return initResp.getSuccess() && attachResponse.getSuccess() && confDoneResp.getSuccess(); + try { + java.lang.Thread.sleep(1000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return initResp.getSuccess(); } PyTypeRaw getVMType(String qualifiedClassName) { @@ -159,6 +128,13 @@ PyTypeRaw getVMType(String qualifiedClassName) { } private DAPResponse pause() { + stoppedEvent = new CompletableFuture<>(); + + var pauseArgs = new PauseRequestArguments(); + pauseArgs.setThreadID(2); + var pauseReq = new PauseRequestClass(); + pauseReq.setSeq(REQUEST_COUNTER++); + // stoppedEvent = new CompletableFuture<>(); // var tid = getThreadId("MainThread"); // Request pauseReq = new Request(); @@ -208,18 +184,13 @@ private int getThreadId(String threadName) { } private int getCurrentFrameId(int threadId) { -// Request stackTraceReq = new Request(); -// var msg = new DAPMessage(); -// msg.setSeq(currReqSeq++); -// msg.setType("request"); -// stackTraceReq.setProtocolMessage(msg); -// stackTraceReq.setCommand("stackTrace"); -// ObjectNode arguments = mapper.createObjectNode(); -// arguments.put("threadId", threadId); -// stackTraceReq.setArguments(arguments); -// Response resp = (Response) sendRequest(stackTraceReq); -// return resp.getBody().get("stackFrames").get(0).get("id").asInt(); - return 1; + var stackTraceArgs = new StackTraceRequestArguments(); + stackTraceArgs.setThreadID(threadId); + var stackTraceReq = new StackTraceRequestClass(); + stackTraceReq.setSeq(REQUEST_COUNTER++); + stackTraceReq.setArguments(stackTraceArgs); + var stackTraceResp = (StackTraceResponseClass) sendRequest(stackTraceReq); + return (int) stackTraceResp.getBody().getStackFrames()[0].getID(); } private void getStackStrace() { @@ -283,9 +254,6 @@ private void startReaderThread() { } String json = new String(body); System.out.println("Received json response: " + json); - if (json.contains("\"type\": \"event\"")) { - continue; - } DAPMessage msg = MessageMapper.parseMessage(json); System.out.println("Parsed json response to object..."); if (msg == null) { @@ -306,24 +274,24 @@ private void startReaderThread() { //} } if (msg instanceof DAPEvent) { - if (msg instanceof InitializedEvent) { + if (msg instanceof InitializedEventClass) { initEvent.complete((DAPEvent) msg); } } -// if (msg instanceof DAPEvent) { -// System.out.println("Event instance: " + msg); -// if (msg instanceof Event) { -// if (((Event) msg).getEvent().equals("initialized")) { -// initEvent.complete((Event) msg); -// } -// if (((Event) msg).getEvent().equals("stopped")) { -// stoppedEvent.complete((Event) msg); -// } -// } -// if (msg instanceof BreakpointEvent) { -// handleBreakpoint((BreakpointEvent) msg); -// } -// } + if (msg instanceof DAPEvent) { + System.out.println("Event instance: " + msg); + if (msg instanceof Event) { + if (((Event) msg).getEvent().equals("initialized")) { + initEvent.complete((DAPEvent) msg); + } + if (((Event) msg).getEvent().equals("stopped")) { + stoppedEvent.complete((DAPEvent) msg); + } + } + if (msg instanceof BreakpointEventClass) { + handleBreakpoint((BreakpointEventClass) msg); + } + } } } catch (Exception e) { throw new RuntimeException(e); @@ -333,7 +301,7 @@ private void startReaderThread() { readerThread.start(); } - private void handleBreakpoint(BreakpointEvent event) { + private void handleBreakpoint(BreakpointEventClass event) { breakpointHandler.handleBreakpoint(event); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java index 419cc23..b5749f0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -1,10 +1,9 @@ package org.tzi.use.monitor.adapter.python; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import org.tzi.use.monitor.adapter.python.tmp.DAPMessage; -import org.tzi.use.monitor.adapter.python.tmp.Event; -import org.tzi.use.monitor.adapter.python.tmp.Response; +import org.tzi.use.monitor.adapter.python.dap.*; /** * Maps a DAP json message to its respective POJO @@ -17,8 +16,28 @@ public static DAPMessage parseMessage(String json) throws Exception { JsonNode tree = mapper.readTree(json); String type = tree.get("type").asText(); return switch (type) { - case "response" -> mapper.readValue(json, Response.class); - case "event" -> mapper.readValue(json, Event.class); + case "response" -> parseResponse(tree, json); + case "event" -> parseEvent(tree, json); + default -> null; + }; + } + + private static DAPResponse parseResponse(JsonNode tree, String json) throws JsonProcessingException { + String command = tree.get("command").asText(); + return switch (command) { + case "initialize" -> mapper.readValue(json, InitializeResponseClass.class); + case "attach" -> mapper.readValue(json, AttachResponseClass.class); + case "configurationDone" -> mapper.readValue(json, ConfigurationDoneResponseClass.class); + default -> null; + }; + } + + private static DAPEvent parseEvent(JsonNode tree, String json) throws JsonProcessingException { + String event = tree.get("event").asText(); + return switch (event) { + case "initialized" -> mapper.readValue(json, InitializedEventClass.class); + case "breakpoint" -> mapper.readValue(json, BreakpointEventClass.class); + case "stopped" -> mapper.readValue(json, StoppedEventClass.class); default -> null; }; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index b8015d3..1f1a42c 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -1,6 +1,6 @@ package org.tzi.use.monitor.adapter.python; -import org.tzi.use.monitor.adapter.python.tmp.BreakpointEvent; +import org.tzi.use.monitor.adapter.python.dap.BreakpointEventClass; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObject; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObjectRaw; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyType; @@ -174,7 +174,7 @@ public void registerFieldModificationInterest(VMField f) { private class Handler implements BreakpointHandler { @Override - public void handleBreakpoint(BreakpointEvent event) { + public void handleBreakpoint(BreakpointEventClass event) { // TODO } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ArgumentsClass.java new file mode 100644 index 0000000..c41e4b5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ArgumentsClass.java @@ -0,0 +1,20 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `attach` request. Additional attributes are implementation specific. + */ +public class ArgumentsClass { + private Restart restart; + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + */ + @JsonProperty("__restart") + public Restart getRestart() { return restart; } + @JsonProperty("__restart") + public void setRestart(Restart value) { this.restart = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArguments.java deleted file mode 100644 index 1766a35..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArguments.java +++ /dev/null @@ -1,111 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `attach` request. Additional attributes are implementation specific. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "__restart" -}) -@Generated("jsonschema2pojo") -public class AttachRequestArguments { - - /** - * Arbitrary data from the previous, restarted session. - * The data is sent as the `restart` attribute of the `terminated` event. - * The client should leave the data intact. - * - */ - @JsonProperty("__restart") - @JsonPropertyDescription("Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact.") - private Object restart; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Arbitrary data from the previous, restarted session. - * The data is sent as the `restart` attribute of the `terminated` event. - * The client should leave the data intact. - * - */ - @JsonProperty("__restart") - public Object getRestart() { - return restart; - } - - /** - * Arbitrary data from the previous, restarted session. - * The data is sent as the `restart` attribute of the `terminated` event. - * The client should leave the data intact. - * - */ - @JsonProperty("__restart") - public void setRestart(Object restart) { - this.restart = restart; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(AttachRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("restart"); - sb.append('='); - sb.append(((this.restart == null)?"":this.restart)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.restart == null)? 0 :this.restart.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof AttachRequestArguments) == false) { - return false; - } - AttachRequestArguments rhs = ((AttachRequestArguments) other); - return (((this.restart == rhs.restart)||((this.restart!= null)&&this.restart.equals(rhs.restart)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArgumentsClass.java new file mode 100644 index 0000000..35a8206 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestArgumentsClass.java @@ -0,0 +1,96 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * Arguments for `attach` request. Additional attributes are implementation specific. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AttachRequestArgumentsClass { + private Restart restart; + private boolean justMyCode; + private String sessionId; + private String clientOs; + private Map connect; + private List> pathMappings; + private List debugOptions; + private boolean showReturnValue; + private String workspaceFolder; + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + */ + @JsonProperty("__restart") + public Restart getRestart() { return restart; } + @JsonProperty("__restart") + public void setRestart(Restart value) { this.restart = value; } + @JsonProperty("justMyCode") + public boolean isJustMyCode() { + return justMyCode; + } + @JsonProperty("justMyCode") + public void setJustMyCode(boolean justMyCode) { + this.justMyCode = justMyCode; + } + @JsonProperty("__sessionId") + public String getSessionId() { + return sessionId; + } + @JsonProperty("__sessionId") + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + @JsonProperty("clientOS") + public String getClientOs() { + return clientOs; + } + @JsonProperty("clientOS") + public void setClientOs(String clientOs) { + this.clientOs = clientOs; + } + @JsonProperty("connect") + public Map getConnect() { + return connect; + } + @JsonProperty("connect") + public void setConnect(Map connect) { + this.connect = connect; + } + @JsonProperty("pathMappings") + public List> getPathMappings() { + return pathMappings; + } + @JsonProperty("pathMappings") + public void setPathMappings(List> pathMappings) { + this.pathMappings = pathMappings; + } + @JsonProperty("debugOptions") + public List getDebugOptions() { + return debugOptions; + } + @JsonProperty("debugOptions") + public void setDebugOptions(List debugOptions) { + this.debugOptions = debugOptions; + } + @JsonProperty("showReturnValue") + public boolean isShowReturnValue() { + return showReturnValue; + } + @JsonProperty("showReturnValue") + public void setShowReturnValue(boolean showReturnValue) { + this.showReturnValue = showReturnValue; + } + @JsonProperty("workspaceFolder") + public String getWorkspaceFolder() { + return workspaceFolder; + } + @JsonProperty("workspaceFolder") + public void setWorkspaceFolder(String workspaceFolder) { + this.workspaceFolder = workspaceFolder; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestClass.java new file mode 100644 index 0000000..38f847e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestClass.java @@ -0,0 +1,58 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The `attach` request is sent from the client to the debug adapter to attach to a debuggee + * that is already running. + * Since attaching is debugger/runtime specific, the arguments for this request are not part + * of this specification. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AttachRequestClass implements DAPRequest { + private long seq; + private AttachRequestType type = AttachRequestType.REQUEST; + private AttachRequestArgumentsClass arguments; + private AttachRequestCommand command = AttachRequestCommand.ATTACH; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public AttachRequestArgumentsClass getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(AttachRequestArgumentsClass value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public AttachRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(AttachRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestCommand.java new file mode 100644 index 0000000..c84c183 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum AttachRequestCommand { + ATTACH; + + @JsonValue + public String toValue() { + switch (this) { + case ATTACH: return "attach"; + } + return null; + } + + @JsonCreator + public static AttachRequestCommand forValue(String value) throws IOException { + if (value.equals("attach")) return ATTACH; + throw new IOException("Cannot deserialize AttachRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestType.java new file mode 100644 index 0000000..65230b5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestType.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum AttachRequestType { + REQUEST; + + @JsonValue + public String toValue() { + switch (this) { + case REQUEST: return "request"; + } + return null; + } + + @JsonCreator + public static AttachRequestType forValue(String value) throws IOException { + if (value.equals("request")) return REQUEST; + throw new IOException("Cannot deserialize AttachRequestType"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseClass.java new file mode 100644 index 0000000..e0fd6f8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `attach` request. This is just an acknowledgement, so no body field is + * required. + */ +public class AttachResponseClass implements DAPResponse { + private long seq; + private String type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseType.java new file mode 100644 index 0000000..34683e2 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseType.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum AttachResponseType { + RESPONSE; + + @JsonValue + public String toValue() { + switch (this) { + case RESPONSE: return "response"; + } + return null; + } + + @JsonCreator + public static AttachResponseType forValue(String value) throws IOException { + if (value.equals("response")) return RESPONSE; + throw new IOException("Cannot deserialize AttachResponseType"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BaseProtocol.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BaseProtocol.java new file mode 100644 index 0000000..c672fad --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BaseProtocol.java @@ -0,0 +1,32 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + */ +public class BaseProtocol { + private long seq; + private String type; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BodyClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BodyClass.java new file mode 100644 index 0000000..61f246d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BodyClass.java @@ -0,0 +1,399 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Information about the capabilities of a debug adapter. + * + * The set of updated capabilities. + * + * The capabilities of this debug adapter. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BodyClass { + private ColumnDescriptor[] additionalModuleColumns; + private String[] completionTriggerCharacters; + private ExceptionBreakpointsFilter[] exceptionBreakpointFilters; + private ChecksumAlgorithm[] supportedChecksumAlgorithms; + private Boolean supportsBreakpointLocationsRequest; + private Boolean supportsCancelRequest; + private Boolean supportsClipboardContext; + private Boolean supportsCompletionsRequest; + private Boolean supportsConditionalBreakpoints; + private Boolean supportsConfigurationDoneRequest; + private Boolean supportsDataBreakpoints; + private Boolean supportsDelayedStackTraceLoading; + private Boolean supportsDisassembleRequest; + private Boolean supportsEvaluateForHovers; + private Boolean supportsExceptionFilterOptions; + private Boolean supportsExceptionInfoRequest; + private Boolean supportsExceptionOptions; + private Boolean supportsFunctionBreakpoints; + private Boolean supportsGotoTargetsRequest; + private Boolean supportsHitConditionalBreakpoints; + private Boolean supportsInstructionBreakpoints; + private Boolean supportsLoadedSourcesRequest; + private Boolean supportsLogPoints; + private Boolean supportsModulesRequest; + private Boolean supportsReadMemoryRequest; + private Boolean supportsRestartFrame; + private Boolean supportsRestartRequest; + private Boolean supportsSetExpression; + private Boolean supportsSetVariable; + private Boolean supportsSingleThreadExecutionRequests; + private Boolean supportsStepBack; + private Boolean supportsStepInTargetsRequest; + private Boolean supportsSteppingGranularity; + private Boolean supportsTerminateRequest; + private Boolean supportsTerminateThreadsRequest; + private Boolean supportSuspendDebuggee; + private Boolean supportsValueFormattingOptions; + private Boolean supportsWriteMemoryRequest; + private Boolean supportTerminateDebuggee; + private Boolean supportsDebuggerProperties; + private Boolean supportsTerminateDebuggee; + + /** + * The set of additional module information exposed by the debug adapter. + */ + @JsonProperty("additionalModuleColumns") + public ColumnDescriptor[] getAdditionalModuleColumns() { return additionalModuleColumns; } + @JsonProperty("additionalModuleColumns") + public void setAdditionalModuleColumns(ColumnDescriptor[] value) { this.additionalModuleColumns = value; } + + /** + * The set of characters that should trigger completion in a REPL. If not specified, the UI + * should assume the `.` character. + */ + @JsonProperty("completionTriggerCharacters") + public String[] getCompletionTriggerCharacters() { return completionTriggerCharacters; } + @JsonProperty("completionTriggerCharacters") + public void setCompletionTriggerCharacters(String[] value) { this.completionTriggerCharacters = value; } + + /** + * Available exception filter options for the `setExceptionBreakpoints` request. + */ + @JsonProperty("exceptionBreakpointFilters") + public ExceptionBreakpointsFilter[] getExceptionBreakpointFilters() { return exceptionBreakpointFilters; } + @JsonProperty("exceptionBreakpointFilters") + public void setExceptionBreakpointFilters(ExceptionBreakpointsFilter[] value) { this.exceptionBreakpointFilters = value; } + + /** + * Checksum algorithms supported by the debug adapter. + */ + @JsonProperty("supportedChecksumAlgorithms") + public ChecksumAlgorithm[] getSupportedChecksumAlgorithms() { return supportedChecksumAlgorithms; } + @JsonProperty("supportedChecksumAlgorithms") + public void setSupportedChecksumAlgorithms(ChecksumAlgorithm[] value) { this.supportedChecksumAlgorithms = value; } + + /** + * The debug adapter supports the `breakpointLocations` request. + */ + @JsonProperty("supportsBreakpointLocationsRequest") + public Boolean getSupportsBreakpointLocationsRequest() { return supportsBreakpointLocationsRequest; } + @JsonProperty("supportsBreakpointLocationsRequest") + public void setSupportsBreakpointLocationsRequest(Boolean value) { this.supportsBreakpointLocationsRequest = value; } + + /** + * The debug adapter supports the `cancel` request. + */ + @JsonProperty("supportsCancelRequest") + public Boolean getSupportsCancelRequest() { return supportsCancelRequest; } + @JsonProperty("supportsCancelRequest") + public void setSupportsCancelRequest(Boolean value) { this.supportsCancelRequest = value; } + + /** + * The debug adapter supports the `clipboard` context value in the `evaluate` request. + */ + @JsonProperty("supportsClipboardContext") + public Boolean getSupportsClipboardContext() { return supportsClipboardContext; } + @JsonProperty("supportsClipboardContext") + public void setSupportsClipboardContext(Boolean value) { this.supportsClipboardContext = value; } + + /** + * The debug adapter supports the `completions` request. + */ + @JsonProperty("supportsCompletionsRequest") + public Boolean getSupportsCompletionsRequest() { return supportsCompletionsRequest; } + @JsonProperty("supportsCompletionsRequest") + public void setSupportsCompletionsRequest(Boolean value) { this.supportsCompletionsRequest = value; } + + /** + * The debug adapter supports conditional breakpoints. + */ + @JsonProperty("supportsConditionalBreakpoints") + public Boolean getSupportsConditionalBreakpoints() { return supportsConditionalBreakpoints; } + @JsonProperty("supportsConditionalBreakpoints") + public void setSupportsConditionalBreakpoints(Boolean value) { this.supportsConditionalBreakpoints = value; } + + /** + * The debug adapter supports the `configurationDone` request. + */ + @JsonProperty("supportsConfigurationDoneRequest") + public Boolean getSupportsConfigurationDoneRequest() { return supportsConfigurationDoneRequest; } + @JsonProperty("supportsConfigurationDoneRequest") + public void setSupportsConfigurationDoneRequest(Boolean value) { this.supportsConfigurationDoneRequest = value; } + + /** + * The debug adapter supports data breakpoints. + */ + @JsonProperty("supportsDataBreakpoints") + public Boolean getSupportsDataBreakpoints() { return supportsDataBreakpoints; } + @JsonProperty("supportsDataBreakpoints") + public void setSupportsDataBreakpoints(Boolean value) { this.supportsDataBreakpoints = value; } + + /** + * The debug adapter supports the delayed loading of parts of the stack, which requires that + * both the `startFrame` and `levels` arguments and the `totalFrames` result of the + * `stackTrace` request are supported. + */ + @JsonProperty("supportsDelayedStackTraceLoading") + public Boolean getSupportsDelayedStackTraceLoading() { return supportsDelayedStackTraceLoading; } + @JsonProperty("supportsDelayedStackTraceLoading") + public void setSupportsDelayedStackTraceLoading(Boolean value) { this.supportsDelayedStackTraceLoading = value; } + + /** + * The debug adapter supports the `disassemble` request. + */ + @JsonProperty("supportsDisassembleRequest") + public Boolean getSupportsDisassembleRequest() { return supportsDisassembleRequest; } + @JsonProperty("supportsDisassembleRequest") + public void setSupportsDisassembleRequest(Boolean value) { this.supportsDisassembleRequest = value; } + + /** + * The debug adapter supports a (side effect free) `evaluate` request for data hovers. + */ + @JsonProperty("supportsEvaluateForHovers") + public Boolean getSupportsEvaluateForHovers() { return supportsEvaluateForHovers; } + @JsonProperty("supportsEvaluateForHovers") + public void setSupportsEvaluateForHovers(Boolean value) { this.supportsEvaluateForHovers = value; } + + /** + * The debug adapter supports `filterOptions` as an argument on the + * `setExceptionBreakpoints` request. + */ + @JsonProperty("supportsExceptionFilterOptions") + public Boolean getSupportsExceptionFilterOptions() { return supportsExceptionFilterOptions; } + @JsonProperty("supportsExceptionFilterOptions") + public void setSupportsExceptionFilterOptions(Boolean value) { this.supportsExceptionFilterOptions = value; } + + /** + * The debug adapter supports the `exceptionInfo` request. + */ + @JsonProperty("supportsExceptionInfoRequest") + public Boolean getSupportsExceptionInfoRequest() { return supportsExceptionInfoRequest; } + @JsonProperty("supportsExceptionInfoRequest") + public void setSupportsExceptionInfoRequest(Boolean value) { this.supportsExceptionInfoRequest = value; } + + /** + * The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. + */ + @JsonProperty("supportsExceptionOptions") + public Boolean getSupportsExceptionOptions() { return supportsExceptionOptions; } + @JsonProperty("supportsExceptionOptions") + public void setSupportsExceptionOptions(Boolean value) { this.supportsExceptionOptions = value; } + + /** + * The debug adapter supports function breakpoints. + */ + @JsonProperty("supportsFunctionBreakpoints") + public Boolean getSupportsFunctionBreakpoints() { return supportsFunctionBreakpoints; } + @JsonProperty("supportsFunctionBreakpoints") + public void setSupportsFunctionBreakpoints(Boolean value) { this.supportsFunctionBreakpoints = value; } + + /** + * The debug adapter supports the `gotoTargets` request. + */ + @JsonProperty("supportsGotoTargetsRequest") + public Boolean getSupportsGotoTargetsRequest() { return supportsGotoTargetsRequest; } + @JsonProperty("supportsGotoTargetsRequest") + public void setSupportsGotoTargetsRequest(Boolean value) { this.supportsGotoTargetsRequest = value; } + + /** + * The debug adapter supports breakpoints that break execution after a specified number of + * hits. + */ + @JsonProperty("supportsHitConditionalBreakpoints") + public Boolean getSupportsHitConditionalBreakpoints() { return supportsHitConditionalBreakpoints; } + @JsonProperty("supportsHitConditionalBreakpoints") + public void setSupportsHitConditionalBreakpoints(Boolean value) { this.supportsHitConditionalBreakpoints = value; } + + /** + * The debug adapter supports adding breakpoints based on instruction references. + */ + @JsonProperty("supportsInstructionBreakpoints") + public Boolean getSupportsInstructionBreakpoints() { return supportsInstructionBreakpoints; } + @JsonProperty("supportsInstructionBreakpoints") + public void setSupportsInstructionBreakpoints(Boolean value) { this.supportsInstructionBreakpoints = value; } + + /** + * The debug adapter supports the `loadedSources` request. + */ + @JsonProperty("supportsLoadedSourcesRequest") + public Boolean getSupportsLoadedSourcesRequest() { return supportsLoadedSourcesRequest; } + @JsonProperty("supportsLoadedSourcesRequest") + public void setSupportsLoadedSourcesRequest(Boolean value) { this.supportsLoadedSourcesRequest = value; } + + /** + * The debug adapter supports log points by interpreting the `logMessage` attribute of the + * `SourceBreakpoint`. + */ + @JsonProperty("supportsLogPoints") + public Boolean getSupportsLogPoints() { return supportsLogPoints; } + @JsonProperty("supportsLogPoints") + public void setSupportsLogPoints(Boolean value) { this.supportsLogPoints = value; } + + /** + * The debug adapter supports the `modules` request. + */ + @JsonProperty("supportsModulesRequest") + public Boolean getSupportsModulesRequest() { return supportsModulesRequest; } + @JsonProperty("supportsModulesRequest") + public void setSupportsModulesRequest(Boolean value) { this.supportsModulesRequest = value; } + + /** + * The debug adapter supports the `readMemory` request. + */ + @JsonProperty("supportsReadMemoryRequest") + public Boolean getSupportsReadMemoryRequest() { return supportsReadMemoryRequest; } + @JsonProperty("supportsReadMemoryRequest") + public void setSupportsReadMemoryRequest(Boolean value) { this.supportsReadMemoryRequest = value; } + + /** + * The debug adapter supports restarting a frame. + */ + @JsonProperty("supportsRestartFrame") + public Boolean getSupportsRestartFrame() { return supportsRestartFrame; } + @JsonProperty("supportsRestartFrame") + public void setSupportsRestartFrame(Boolean value) { this.supportsRestartFrame = value; } + + /** + * The debug adapter supports the `restart` request. In this case a client should not + * implement `restart` by terminating and relaunching the adapter but by calling the + * `restart` request. + */ + @JsonProperty("supportsRestartRequest") + public Boolean getSupportsRestartRequest() { return supportsRestartRequest; } + @JsonProperty("supportsRestartRequest") + public void setSupportsRestartRequest(Boolean value) { this.supportsRestartRequest = value; } + + /** + * The debug adapter supports the `setExpression` request. + */ + @JsonProperty("supportsSetExpression") + public Boolean getSupportsSetExpression() { return supportsSetExpression; } + @JsonProperty("supportsSetExpression") + public void setSupportsSetExpression(Boolean value) { this.supportsSetExpression = value; } + + /** + * The debug adapter supports setting a variable to a value. + */ + @JsonProperty("supportsSetVariable") + public Boolean getSupportsSetVariable() { return supportsSetVariable; } + @JsonProperty("supportsSetVariable") + public void setSupportsSetVariable(Boolean value) { this.supportsSetVariable = value; } + + /** + * The debug adapter supports the `singleThread` property on the execution requests + * (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). + */ + @JsonProperty("supportsSingleThreadExecutionRequests") + public Boolean getSupportsSingleThreadExecutionRequests() { return supportsSingleThreadExecutionRequests; } + @JsonProperty("supportsSingleThreadExecutionRequests") + public void setSupportsSingleThreadExecutionRequests(Boolean value) { this.supportsSingleThreadExecutionRequests = value; } + + /** + * The debug adapter supports stepping back via the `stepBack` and `reverseContinue` + * requests. + */ + @JsonProperty("supportsStepBack") + public Boolean getSupportsStepBack() { return supportsStepBack; } + @JsonProperty("supportsStepBack") + public void setSupportsStepBack(Boolean value) { this.supportsStepBack = value; } + + /** + * The debug adapter supports the `stepInTargets` request. + */ + @JsonProperty("supportsStepInTargetsRequest") + public Boolean getSupportsStepInTargetsRequest() { return supportsStepInTargetsRequest; } + @JsonProperty("supportsStepInTargetsRequest") + public void setSupportsStepInTargetsRequest(Boolean value) { this.supportsStepInTargetsRequest = value; } + + /** + * The debug adapter supports stepping granularities (argument `granularity`) for the + * stepping requests. + */ + @JsonProperty("supportsSteppingGranularity") + public Boolean getSupportsSteppingGranularity() { return supportsSteppingGranularity; } + @JsonProperty("supportsSteppingGranularity") + public void setSupportsSteppingGranularity(Boolean value) { this.supportsSteppingGranularity = value; } + + /** + * The debug adapter supports the `terminate` request. + */ + @JsonProperty("supportsTerminateRequest") + public Boolean getSupportsTerminateRequest() { return supportsTerminateRequest; } + @JsonProperty("supportsTerminateRequest") + public void setSupportsTerminateRequest(Boolean value) { this.supportsTerminateRequest = value; } + + /** + * The debug adapter supports the `terminateThreads` request. + */ + @JsonProperty("supportsTerminateThreadsRequest") + public Boolean getSupportsTerminateThreadsRequest() { return supportsTerminateThreadsRequest; } + @JsonProperty("supportsTerminateThreadsRequest") + public void setSupportsTerminateThreadsRequest(Boolean value) { this.supportsTerminateThreadsRequest = value; } + + /** + * The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. + */ + @JsonProperty("supportSuspendDebuggee") + public Boolean getSupportSuspendDebuggee() { return supportSuspendDebuggee; } + @JsonProperty("supportSuspendDebuggee") + public void setSupportSuspendDebuggee(Boolean value) { this.supportSuspendDebuggee = value; } + + /** + * The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and + * `evaluate` requests. + */ + @JsonProperty("supportsValueFormattingOptions") + public Boolean getSupportsValueFormattingOptions() { return supportsValueFormattingOptions; } + @JsonProperty("supportsValueFormattingOptions") + public void setSupportsValueFormattingOptions(Boolean value) { this.supportsValueFormattingOptions = value; } + + /** + * The debug adapter supports the `writeMemory` request. + */ + @JsonProperty("supportsWriteMemoryRequest") + public Boolean getSupportsWriteMemoryRequest() { return supportsWriteMemoryRequest; } + @JsonProperty("supportsWriteMemoryRequest") + public void setSupportsWriteMemoryRequest(Boolean value) { this.supportsWriteMemoryRequest = value; } + + /** + * The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. + */ + @JsonProperty("supportTerminateDebuggee") + public Boolean getSupportTerminateDebuggee() { return supportTerminateDebuggee; } + @JsonProperty("supportTerminateDebuggee") + public void setSupportTerminateDebuggee(Boolean value) { this.supportTerminateDebuggee = value; } + + @JsonProperty("supportsDebuggerProperties") + public Boolean getSupportsDebuggerProperties() { + return supportsDebuggerProperties; + } + + @JsonProperty("supportsDebuggerProperties") + public void setSupportsDebuggerProperties(Boolean supportsDebuggerProperties) { + this.supportsDebuggerProperties = supportsDebuggerProperties; + } + + @JsonProperty("supportsTerminateDebuggee") + public Boolean getSupportsTerminateDebuggee() { + return supportsTerminateDebuggee; + } + + @JsonProperty("supportsTerminateDebuggee") + public void setSupportsTerminateDebuggee(Boolean supportsTerminateDebuggee) { + this.supportsTerminateDebuggee = supportsTerminateDebuggee; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BodyReason.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BodyReason.java new file mode 100644 index 0000000..411a2de --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BodyReason.java @@ -0,0 +1,29 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * The reason for the event. + */ +public enum BodyReason { + CHANGED, NEW, REMOVED; + + @JsonValue + public String toValue() { + switch (this) { + case CHANGED: return "changed"; + case NEW: return "new"; + case REMOVED: return "removed"; + } + return null; + } + + @JsonCreator + public static BodyReason forValue(String value) throws IOException { + if (value.equals("changed")) return CHANGED; + if (value.equals("new")) return NEW; + if (value.equals("removed")) return REMOVED; + throw new IOException("Cannot deserialize BodyReason"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Breakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Breakpoint.java index 406ae07..c4af574 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Breakpoint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Breakpoint.java @@ -1,490 +1,127 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - +import com.fasterxml.jackson.annotation.*; /** - * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. - * + * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, + * `setInstructionBreakpoints`, or `setDataBreakpoints` requests. + * + * The `id` attribute is used to find the target breakpoint, the other attributes are used + * as the new values. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "verified", - "message", - "source", - "line", - "column", - "endLine", - "endColumn", - "instructionReference", - "offset", - "reason" -}) -@Generated("jsonschema2pojo") public class Breakpoint { - - /** - * The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. - * - */ - @JsonProperty("id") - @JsonPropertyDescription("The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints.") - private Integer id; - /** - * If true, the breakpoint could be set (but not necessarily at the desired location). - * (Required) - * - */ - @JsonProperty("verified") - @JsonPropertyDescription("If true, the breakpoint could be set (but not necessarily at the desired location).") - private Boolean verified; - /** - * A message about the state of the breakpoint. - * This is shown to the user and can be used to explain why a breakpoint could not be verified. - * - */ - @JsonProperty("message") - @JsonPropertyDescription("A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified.") + private Long column; + private Long endColumn; + private Long endLine; + private Long id; + private String instructionReference; + private Long line; private String message; - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private Long offset; + private BreakpointReason reason; private Source source; - /** - * The start line of the actual range covered by the breakpoint. - * - */ - @JsonProperty("line") - @JsonPropertyDescription("The start line of the actual range covered by the breakpoint.") - private Integer line; - /** - * Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - @JsonPropertyDescription("Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer column; - /** - * The end line of the actual range covered by the breakpoint. - * - */ - @JsonProperty("endLine") - @JsonPropertyDescription("The end line of the actual range covered by the breakpoint.") - private Integer endLine; - /** - * End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * If no end line is given, then the end column is assumed to be in the start line. - * - */ - @JsonProperty("endColumn") - @JsonPropertyDescription("End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line.") - private Integer endColumn; - /** - * A memory reference to where the breakpoint is set. - * - */ - @JsonProperty("instructionReference") - @JsonPropertyDescription("A memory reference to where the breakpoint is set.") - private String instructionReference; - /** - * The offset from the instruction reference. - * This can be negative. - * - */ - @JsonProperty("offset") - @JsonPropertyDescription("The offset from the instruction reference.\nThis can be negative.") - private Integer offset; - /** - * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: - * - * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. - * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. - * - */ - @JsonProperty("reason") - @JsonPropertyDescription("A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:\n\n- `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.\n - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.") - private Reason reason; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. - * - */ - @JsonProperty("id") - public Integer getId() { - return id; - } - - /** - * The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. - * - */ - @JsonProperty("id") - public void setId(Integer id) { - this.id = id; - } - - /** - * If true, the breakpoint could be set (but not necessarily at the desired location). - * (Required) - * - */ - @JsonProperty("verified") - public Boolean getVerified() { - return verified; - } - - /** - * If true, the breakpoint could be set (but not necessarily at the desired location). - * (Required) - * - */ - @JsonProperty("verified") - public void setVerified(Boolean verified) { - this.verified = verified; - } - - /** - * A message about the state of the breakpoint. - * This is shown to the user and can be used to explain why a breakpoint could not be verified. - * - */ - @JsonProperty("message") - public String getMessage() { - return message; - } - - /** - * A message about the state of the breakpoint. - * This is shown to the user and can be used to explain why a breakpoint could not be verified. - * - */ - @JsonProperty("message") - public void setMessage(String message) { - this.message = message; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - public Source getSource() { - return source; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - public void setSource(Source source) { - this.source = source; - } - - /** - * The start line of the actual range covered by the breakpoint. - * - */ - @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * The start line of the actual range covered by the breakpoint. - * - */ - @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } + private boolean verified; /** - * Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * Start position of the source range covered by the breakpoint. It is measured in UTF-16 + * code units and the client capability `columnsStartAt1` determines whether it is 0- or + * 1-based. */ @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ + public Long getColumn() { return column; } @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } + public void setColumn(Long value) { this.column = value; } /** - * The end line of the actual range covered by the breakpoint. - * + * End position of the source range covered by the breakpoint. It is measured in UTF-16 code + * units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * If no end line is given, then the end column is assumed to be in the start line. */ - @JsonProperty("endLine") - public Integer getEndLine() { - return endLine; - } + @JsonProperty("endColumn") + public Long getEndColumn() { return endColumn; } + @JsonProperty("endColumn") + public void setEndColumn(Long value) { this.endColumn = value; } /** * The end line of the actual range covered by the breakpoint. - * */ @JsonProperty("endLine") - public void setEndLine(Integer endLine) { - this.endLine = endLine; - } - - /** - * End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * If no end line is given, then the end column is assumed to be in the start line. - * - */ - @JsonProperty("endColumn") - public Integer getEndColumn() { - return endColumn; - } + public Long getEndLine() { return endLine; } + @JsonProperty("endLine") + public void setEndLine(Long value) { this.endLine = value; } /** - * End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * If no end line is given, then the end column is assumed to be in the start line. - * + * The identifier for the breakpoint. It is needed if breakpoint events are used to update + * or remove breakpoints. */ - @JsonProperty("endColumn") - public void setEndColumn(Integer endColumn) { - this.endColumn = endColumn; - } + @JsonProperty("id") + public Long getID() { return id; } + @JsonProperty("id") + public void setID(Long value) { this.id = value; } /** * A memory reference to where the breakpoint is set. - * */ @JsonProperty("instructionReference") - public String getInstructionReference() { - return instructionReference; - } + public String getInstructionReference() { return instructionReference; } + @JsonProperty("instructionReference") + public void setInstructionReference(String value) { this.instructionReference = value; } /** - * A memory reference to where the breakpoint is set. - * + * The start line of the actual range covered by the breakpoint. */ - @JsonProperty("instructionReference") - public void setInstructionReference(String instructionReference) { - this.instructionReference = instructionReference; - } + @JsonProperty("line") + public Long getLine() { return line; } + @JsonProperty("line") + public void setLine(Long value) { this.line = value; } /** - * The offset from the instruction reference. - * This can be negative. - * + * A message about the state of the breakpoint. + * This is shown to the user and can be used to explain why a breakpoint could not be + * verified. */ - @JsonProperty("offset") - public Integer getOffset() { - return offset; - } + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } /** * The offset from the instruction reference. * This can be negative. - * */ @JsonProperty("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } + public Long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(Long value) { this.offset = value; } /** - * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: - * - * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. - * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. - * + * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint + * is verified or a specific reason is not known, the adapter should omit this property. + * Possible values include: + * + * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter + * cannot verify it in the current state. + * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not + * believe it can be verified without intervention. */ @JsonProperty("reason") - public Reason getReason() { - return reason; - } + public BreakpointReason getReason() { return reason; } + @JsonProperty("reason") + public void setReason(BreakpointReason value) { this.reason = value; } /** - * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: - * - * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. - * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. - * + * The source where the breakpoint is located. */ - @JsonProperty("reason") - public void setReason(Reason reason) { - this.reason = reason; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Breakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("id"); - sb.append('='); - sb.append(((this.id == null)?"":this.id)); - sb.append(','); - sb.append("verified"); - sb.append('='); - sb.append(((this.verified == null)?"":this.verified)); - sb.append(','); - sb.append("message"); - sb.append('='); - sb.append(((this.message == null)?"":this.message)); - sb.append(','); - sb.append("source"); - sb.append('='); - sb.append(((this.source == null)?"":this.source)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("endLine"); - sb.append('='); - sb.append(((this.endLine == null)?"":this.endLine)); - sb.append(','); - sb.append("endColumn"); - sb.append('='); - sb.append(((this.endColumn == null)?"":this.endColumn)); - sb.append(','); - sb.append("instructionReference"); - sb.append('='); - sb.append(((this.instructionReference == null)?"":this.instructionReference)); - sb.append(','); - sb.append("offset"); - sb.append('='); - sb.append(((this.offset == null)?"":this.offset)); - sb.append(','); - sb.append("reason"); - sb.append('='); - sb.append(((this.reason == null)?"":this.reason)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); - result = ((result* 31)+((this.reason == null)? 0 :this.reason.hashCode())); - result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); - result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - result = ((result* 31)+((this.instructionReference == null)? 0 :this.instructionReference.hashCode())); - result = ((result* 31)+((this.verified == null)? 0 :this.verified.hashCode())); - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); - result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Breakpoint) == false) { - return false; - } - Breakpoint rhs = ((Breakpoint) other); - return (((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.reason == rhs.reason)||((this.reason!= null)&&this.reason.equals(rhs.reason))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.instructionReference == rhs.instructionReference)||((this.instructionReference!= null)&&this.instructionReference.equals(rhs.instructionReference))))&&((this.verified == rhs.verified)||((this.verified!= null)&&this.verified.equals(rhs.verified))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message)))); - } - + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } /** - * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: - * - * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. - * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. - * + * If true, the breakpoint could be set (but not necessarily at the desired location). */ - @Generated("jsonschema2pojo") - public enum Reason { - - PENDING("pending"), - FAILED("failed"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (Reason c: values()) { - CONSTANTS.put(c.value, c); - } - } - - Reason(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static Reason fromValue(String value) { - Reason constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + @JsonProperty("verified") + public boolean getVerified() { return verified; } + @JsonProperty("verified") + public void setVerified(boolean value) { this.verified = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventBody.java new file mode 100644 index 0000000..2f5187a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventBody.java @@ -0,0 +1,25 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class BreakpointEventBody { + private Breakpoint breakpoint; + private String reason; + + /** + * The `id` attribute is used to find the target breakpoint, the other attributes are used + * as the new values. + */ + @JsonProperty("breakpoint") + public Breakpoint getBreakpoint() { return breakpoint; } + @JsonProperty("breakpoint") + public void setBreakpoint(Breakpoint value) { this.breakpoint = value; } + + /** + * The reason for the event. + */ + @JsonProperty("reason") + public String getReason() { return reason; } + @JsonProperty("reason") + public void setReason(String value) { this.reason = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java new file mode 100644 index 0000000..63e6ceb --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that some information about a breakpoint has changed. + */ +public class BreakpointEventClass implements DAPEvent { + private long seq; + private BreakpointEventType type; + private BreakpointEventBody body; + private BreakpointEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public BreakpointEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(BreakpointEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public BreakpointEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(BreakpointEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventEvent.java new file mode 100644 index 0000000..f4a2b93 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum BreakpointEventEvent { + BREAKPOINT; + + @JsonValue + public String toValue() { + switch (this) { + case BREAKPOINT: return "breakpoint"; + } + return null; + } + + @JsonCreator + public static BreakpointEventEvent forValue(String value) throws IOException { + if (value.equals("breakpoint")) return BREAKPOINT; + throw new IOException("Cannot deserialize BreakpointEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventType.java new file mode 100644 index 0000000..b8ecb51 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventType.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum BreakpointEventType { + EVENT; + + @JsonValue + public String toValue() { + switch (this) { + case EVENT: return "event"; + } + return null; + } + + @JsonCreator + public static BreakpointEventType forValue(String value) throws IOException { + if (value.equals("event")) return EVENT; + throw new IOException("Cannot deserialize BreakpointEventType"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocation.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocation.java index d6639d4..b5a1dac 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocation.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocation.java @@ -1,201 +1,48 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * Properties of a breakpoint location returned from the `breakpointLocations` request. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "line", - "column", - "endLine", - "endColumn" -}) -@Generated("jsonschema2pojo") public class BreakpointLocation { + private Long column; + private Long endColumn; + private Long endLine; + private long line; /** - * Start line of breakpoint location. - * (Required) - * - */ - @JsonProperty("line") - @JsonPropertyDescription("Start line of breakpoint location.") - private Integer line; - /** - * The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * The start position of a breakpoint location. Position is measured in UTF-16 code units + * and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */ @JsonProperty("column") - @JsonPropertyDescription("The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer column; - /** - * The end line of breakpoint location if the location covers a range. - * - */ - @JsonProperty("endLine") - @JsonPropertyDescription("The end line of breakpoint location if the location covers a range.") - private Integer endLine; - /** - * The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("endColumn") - @JsonPropertyDescription("The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer endColumn; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Start line of breakpoint location. - * (Required) - * - */ - @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * Start line of breakpoint location. - * (Required) - * - */ - @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - /** - * The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ + public Long getColumn() { return column; } @JsonProperty("column") - public Integer getColumn() { - return column; - } + public void setColumn(Long value) { this.column = value; } /** - * The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * The end position of a breakpoint location (if the location covers a range). Position is + * measured in UTF-16 code units and the client capability `columnsStartAt1` determines + * whether it is 0- or 1-based. */ - @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } + @JsonProperty("endColumn") + public Long getEndColumn() { return endColumn; } + @JsonProperty("endColumn") + public void setEndColumn(Long value) { this.endColumn = value; } /** * The end line of breakpoint location if the location covers a range. - * */ @JsonProperty("endLine") - public Integer getEndLine() { - return endLine; - } - - /** - * The end line of breakpoint location if the location covers a range. - * - */ + public Long getEndLine() { return endLine; } @JsonProperty("endLine") - public void setEndLine(Integer endLine) { - this.endLine = endLine; - } + public void setEndLine(Long value) { this.endLine = value; } /** - * The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("endColumn") - public Integer getEndColumn() { - return endColumn; - } - - /** - * The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * Start line of breakpoint location. */ - @JsonProperty("endColumn") - public void setEndColumn(Integer endColumn) { - this.endColumn = endColumn; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(BreakpointLocation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("endLine"); - sb.append('='); - sb.append(((this.endLine == null)?"":this.endLine)); - sb.append(','); - sb.append("endColumn"); - sb.append('='); - sb.append(((this.endColumn == null)?"":this.endColumn)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); - result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof BreakpointLocation) == false) { - return false; - } - BreakpointLocation rhs = ((BreakpointLocation) other); - return ((((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line)))); - } - + @JsonProperty("line") + public long getLine() { return line; } + @JsonProperty("line") + public void setLine(long value) { this.line = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArguments.java deleted file mode 100644 index 2bf9507..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArguments.java +++ /dev/null @@ -1,238 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `breakpointLocations` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "source", - "line", - "column", - "endLine", - "endColumn" -}) -@Generated("jsonschema2pojo") -public class BreakpointLocationsArguments { - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") - private Source source; - /** - * Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. - * (Required) - * - */ - @JsonProperty("line") - @JsonPropertyDescription("Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.") - private Integer line; - /** - * Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. - * - */ - @JsonProperty("column") - @JsonPropertyDescription("Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed.") - private Integer column; - /** - * End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. - * - */ - @JsonProperty("endLine") - @JsonPropertyDescription("End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.") - private Integer endLine; - /** - * End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed. - * - */ - @JsonProperty("endColumn") - @JsonPropertyDescription("End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed.") - private Integer endColumn; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - public Source getSource() { - return source; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - public void setSource(Source source) { - this.source = source; - } - - /** - * Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. - * (Required) - * - */ - @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. - * (Required) - * - */ - @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - /** - * Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. - * - */ - @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. - * - */ - @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } - - /** - * End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. - * - */ - @JsonProperty("endLine") - public Integer getEndLine() { - return endLine; - } - - /** - * End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. - * - */ - @JsonProperty("endLine") - public void setEndLine(Integer endLine) { - this.endLine = endLine; - } - - /** - * End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed. - * - */ - @JsonProperty("endColumn") - public Integer getEndColumn() { - return endColumn; - } - - /** - * End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed. - * - */ - @JsonProperty("endColumn") - public void setEndColumn(Integer endColumn) { - this.endColumn = endColumn; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(BreakpointLocationsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("source"); - sb.append('='); - sb.append(((this.source == null)?"":this.source)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("endLine"); - sb.append('='); - sb.append(((this.endLine == null)?"":this.endLine)); - sb.append(','); - sb.append("endColumn"); - sb.append('='); - sb.append(((this.endColumn == null)?"":this.endColumn)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); - result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); - result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof BreakpointLocationsArguments) == false) { - return false; - } - BreakpointLocationsArguments rhs = ((BreakpointLocationsArguments) other); - return (((((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArgumentsClass.java new file mode 100644 index 0000000..2addb42 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsArgumentsClass.java @@ -0,0 +1,61 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `breakpointLocations` request. + */ +public class BreakpointLocationsArgumentsClass { + private Long column; + private Long endColumn; + private Long endLine; + private long line; + private Source source; + + /** + * Start position within `line` to search possible breakpoint locations in. It is measured + * in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is + * 0- or 1-based. If no column is given, the first position in the start line is assumed. + */ + @JsonProperty("column") + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } + + /** + * End position within `endLine` to search possible breakpoint locations in. It is measured + * in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is + * 0- or 1-based. If no end column is given, the last position in the end line is assumed. + */ + @JsonProperty("endColumn") + public Long getEndColumn() { return endColumn; } + @JsonProperty("endColumn") + public void setEndColumn(Long value) { this.endColumn = value; } + + /** + * End line of range to search possible breakpoint locations in. If no end line is given, + * then the end line is assumed to be the start line. + */ + @JsonProperty("endLine") + public Long getEndLine() { return endLine; } + @JsonProperty("endLine") + public void setEndLine(Long value) { this.endLine = value; } + + /** + * Start line of range to search possible breakpoint locations in. If only the line is + * specified, the request returns all possible locations in that line. + */ + @JsonProperty("line") + public long getLine() { return line; } + @JsonProperty("line") + public void setLine(long value) { this.line = value; } + + /** + * The source location of the breakpoints; either `source.path` or `source.sourceReference` + * must be specified. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestArguments.java new file mode 100644 index 0000000..20296a1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestArguments.java @@ -0,0 +1,61 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `breakpointLocations` request. + */ +public class BreakpointLocationsRequestArguments { + private Long column; + private Long endColumn; + private Long endLine; + private long line; + private Source source; + + /** + * Start position within `line` to search possible breakpoint locations in. It is measured + * in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is + * 0- or 1-based. If no column is given, the first position in the start line is assumed. + */ + @JsonProperty("column") + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } + + /** + * End position within `endLine` to search possible breakpoint locations in. It is measured + * in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is + * 0- or 1-based. If no end column is given, the last position in the end line is assumed. + */ + @JsonProperty("endColumn") + public Long getEndColumn() { return endColumn; } + @JsonProperty("endColumn") + public void setEndColumn(Long value) { this.endColumn = value; } + + /** + * End line of range to search possible breakpoint locations in. If no end line is given, + * then the end line is assumed to be the start line. + */ + @JsonProperty("endLine") + public Long getEndLine() { return endLine; } + @JsonProperty("endLine") + public void setEndLine(Long value) { this.endLine = value; } + + /** + * Start line of range to search possible breakpoint locations in. If only the line is + * specified, the request returns all possible locations in that line. + */ + @JsonProperty("line") + public long getLine() { return line; } + @JsonProperty("line") + public void setLine(long value) { this.line = value; } + + /** + * The source location of the breakpoints; either `source.path` or `source.sourceReference` + * must be specified. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestClass.java new file mode 100644 index 0000000..41e6431 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The `breakpointLocations` request returns all possible locations for source breakpoints + * in a given range. + * Clients should only call this request if the corresponding capability + * `supportsBreakpointLocationsRequest` is true. + */ +public class BreakpointLocationsRequestClass { + private long seq; + private AttachRequestType type; + private BreakpointLocationsRequestArguments arguments; + private BreakpointLocationsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public BreakpointLocationsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(BreakpointLocationsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public BreakpointLocationsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(BreakpointLocationsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestCommand.java new file mode 100644 index 0000000..ec3e727 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum BreakpointLocationsRequestCommand { + BREAKPOINT_LOCATIONS; + + @JsonValue + public String toValue() { + switch (this) { + case BREAKPOINT_LOCATIONS: return "breakpointLocations"; + } + return null; + } + + @JsonCreator + public static BreakpointLocationsRequestCommand forValue(String value) throws IOException { + if (value.equals("breakpointLocations")) return BREAKPOINT_LOCATIONS; + throw new IOException("Cannot deserialize BreakpointLocationsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsResponseBody.java new file mode 100644 index 0000000..dc50377 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class BreakpointLocationsResponseBody { + private BreakpointLocation[] breakpoints; + + /** + * Sorted set of possible breakpoint locations. + */ + @JsonProperty("breakpoints") + public BreakpointLocation[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(BreakpointLocation[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsResponseClass.java new file mode 100644 index 0000000..54587d2 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointLocationsResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `breakpointLocations` request. + * Contains possible locations for source breakpoints. + */ +public class BreakpointLocationsResponseClass { + private long seq; + private AttachResponseType type; + private BreakpointLocationsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public BreakpointLocationsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(BreakpointLocationsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointReason.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointReason.java new file mode 100644 index 0000000..f348cfa --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointReason.java @@ -0,0 +1,34 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint + * is verified or a specific reason is not known, the adapter should omit this property. + * Possible values include: + * + * - `pending`: Indicates a breakpoint might be verified in the future, but the adapter + * cannot verify it in the current state. + * - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not + * believe it can be verified without intervention. + */ +public enum BreakpointReason { + FAILED, PENDING; + + @JsonValue + public String toValue() { + switch (this) { + case FAILED: return "failed"; + case PENDING: return "pending"; + } + return null; + } + + @JsonCreator + public static BreakpointReason forValue(String value) throws IOException { + if (value.equals("failed")) return FAILED; + if (value.equals("pending")) return PENDING; + throw new IOException("Cannot deserialize BreakpointReason"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArguments.java deleted file mode 100644 index 6645b27..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArguments.java +++ /dev/null @@ -1,142 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `cancel` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "requestId", - "progressId" -}) -@Generated("jsonschema2pojo") -public class CancelArguments { - - /** - * The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. - * Both a `requestId` and a `progressId` can be specified in one request. - * - */ - @JsonProperty("requestId") - @JsonPropertyDescription("The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request.") - private Integer requestId; - /** - * The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled. - * Both a `requestId` and a `progressId` can be specified in one request. - * - */ - @JsonProperty("progressId") - @JsonPropertyDescription("The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request.") - private String progressId; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. - * Both a `requestId` and a `progressId` can be specified in one request. - * - */ - @JsonProperty("requestId") - public Integer getRequestId() { - return requestId; - } - - /** - * The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. - * Both a `requestId` and a `progressId` can be specified in one request. - * - */ - @JsonProperty("requestId") - public void setRequestId(Integer requestId) { - this.requestId = requestId; - } - - /** - * The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled. - * Both a `requestId` and a `progressId` can be specified in one request. - * - */ - @JsonProperty("progressId") - public String getProgressId() { - return progressId; - } - - /** - * The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled. - * Both a `requestId` and a `progressId` can be specified in one request. - * - */ - @JsonProperty("progressId") - public void setProgressId(String progressId) { - this.progressId = progressId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(CancelArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("requestId"); - sb.append('='); - sb.append(((this.requestId == null)?"":this.requestId)); - sb.append(','); - sb.append("progressId"); - sb.append('='); - sb.append(((this.progressId == null)?"":this.progressId)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.progressId == null)? 0 :this.progressId.hashCode())); - result = ((result* 31)+((this.requestId == null)? 0 :this.requestId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof CancelArguments) == false) { - return false; - } - CancelArguments rhs = ((CancelArguments) other); - return ((((this.progressId == rhs.progressId)||((this.progressId!= null)&&this.progressId.equals(rhs.progressId)))&&((this.requestId == rhs.requestId)||((this.requestId!= null)&&this.requestId.equals(rhs.requestId))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArgumentsClass.java new file mode 100644 index 0000000..eff18b3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelArgumentsClass.java @@ -0,0 +1,30 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `cancel` request. + */ +public class CancelArgumentsClass { + private String progressID; + private Long requestID; + + /** + * The ID (attribute `progressId`) of the progress to cancel. If missing no progress is + * cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + */ + @JsonProperty("progressId") + public String getProgressID() { return progressID; } + @JsonProperty("progressId") + public void setProgressID(String value) { this.progressID = value; } + + /** + * The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + */ + @JsonProperty("requestId") + public Long getRequestID() { return requestID; } + @JsonProperty("requestId") + public void setRequestID(Long value) { this.requestID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestArguments.java new file mode 100644 index 0000000..8d4c7fc --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestArguments.java @@ -0,0 +1,30 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `cancel` request. + */ +public class CancelRequestArguments { + private String progressID; + private Long requestID; + + /** + * The ID (attribute `progressId`) of the progress to cancel. If missing no progress is + * cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + */ + @JsonProperty("progressId") + public String getProgressID() { return progressID; } + @JsonProperty("progressId") + public void setProgressID(String value) { this.progressID = value; } + + /** + * The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. + * Both a `requestId` and a `progressId` can be specified in one request. + */ + @JsonProperty("requestId") + public Long getRequestID() { return requestID; } + @JsonProperty("requestId") + public void setRequestID(Long value) { this.requestID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestClass.java new file mode 100644 index 0000000..54427c0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestClass.java @@ -0,0 +1,71 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The `cancel` request is used by the client in two situations: + * - to indicate that it is no longer interested in the result produced by a specific + * request issued earlier + * - to cancel a progress sequence. + * Clients should only call this request if the corresponding capability + * `supportsCancelRequest` is true. + * This request has a hint characteristic: a debug adapter can only be expected to make a + * 'best effort' in honoring this request but there are no guarantees. + * The `cancel` request may return an error if it could not cancel an operation but a client + * should refrain from presenting this error to end users. + * The request that got cancelled still needs to send a response back. This can either be a + * normal result (`success` attribute true) or an error response (`success` attribute false + * and the `message` set to `cancelled`). + * Returning partial results from a cancelled request is possible but please note that a + * client has no generic way for detecting that a response is partial or not. + * The progress that got cancelled still needs to send a `progressEnd` event back. + * A client should not assume that progress just got cancelled after sending the `cancel` + * request. + */ +public class CancelRequestClass { + private long seq; + private AttachRequestType type; + private CancelRequestArguments arguments; + private CancelRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public CancelRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(CancelRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public CancelRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(CancelRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestCommand.java new file mode 100644 index 0000000..6335d23 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum CancelRequestCommand { + CANCEL; + + @JsonValue + public String toValue() { + switch (this) { + case CANCEL: return "cancel"; + } + return null; + } + + @JsonCreator + public static CancelRequestCommand forValue(String value) throws IOException { + if (value.equals("cancel")) return CANCEL; + throw new IOException("Cannot deserialize CancelRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelResponseClass.java new file mode 100644 index 0000000..331b99c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CancelResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `cancel` request. This is just an acknowledgement, so no body field is + * required. + */ +public class CancelResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Capabilities.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Capabilities.java deleted file mode 100644 index 2dce39b..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Capabilities.java +++ /dev/null @@ -1,1287 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Types - *

- * Information about the capabilities of a debug adapter. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "supportsConfigurationDoneRequest", - "supportsFunctionBreakpoints", - "supportsConditionalBreakpoints", - "supportsHitConditionalBreakpoints", - "supportsEvaluateForHovers", - "exceptionBreakpointFilters", - "supportsStepBack", - "supportsSetVariable", - "supportsRestartFrame", - "supportsGotoTargetsRequest", - "supportsStepInTargetsRequest", - "supportsCompletionsRequest", - "completionTriggerCharacters", - "supportsModulesRequest", - "additionalModuleColumns", - "supportedChecksumAlgorithms", - "supportsRestartRequest", - "supportsExceptionOptions", - "supportsValueFormattingOptions", - "supportsExceptionInfoRequest", - "supportTerminateDebuggee", - "supportSuspendDebuggee", - "supportsDelayedStackTraceLoading", - "supportsLoadedSourcesRequest", - "supportsLogPoints", - "supportsTerminateThreadsRequest", - "supportsSetExpression", - "supportsTerminateRequest", - "supportsDataBreakpoints", - "supportsReadMemoryRequest", - "supportsWriteMemoryRequest", - "supportsDisassembleRequest", - "supportsCancelRequest", - "supportsBreakpointLocationsRequest", - "supportsClipboardContext", - "supportsSteppingGranularity", - "supportsInstructionBreakpoints", - "supportsExceptionFilterOptions", - "supportsSingleThreadExecutionRequests" -}) -@Generated("jsonschema2pojo") -public class Capabilities { - - /** - * The debug adapter supports the `configurationDone` request. - * - */ - @JsonProperty("supportsConfigurationDoneRequest") - @JsonPropertyDescription("The debug adapter supports the `configurationDone` request.") - private Boolean supportsConfigurationDoneRequest; - /** - * The debug adapter supports function breakpoints. - * - */ - @JsonProperty("supportsFunctionBreakpoints") - @JsonPropertyDescription("The debug adapter supports function breakpoints.") - private Boolean supportsFunctionBreakpoints; - /** - * The debug adapter supports conditional breakpoints. - * - */ - @JsonProperty("supportsConditionalBreakpoints") - @JsonPropertyDescription("The debug adapter supports conditional breakpoints.") - private Boolean supportsConditionalBreakpoints; - /** - * The debug adapter supports breakpoints that break execution after a specified number of hits. - * - */ - @JsonProperty("supportsHitConditionalBreakpoints") - @JsonPropertyDescription("The debug adapter supports breakpoints that break execution after a specified number of hits.") - private Boolean supportsHitConditionalBreakpoints; - /** - * The debug adapter supports a (side effect free) `evaluate` request for data hovers. - * - */ - @JsonProperty("supportsEvaluateForHovers") - @JsonPropertyDescription("The debug adapter supports a (side effect free) `evaluate` request for data hovers.") - private Boolean supportsEvaluateForHovers; - /** - * Available exception filter options for the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("exceptionBreakpointFilters") - @JsonPropertyDescription("Available exception filter options for the `setExceptionBreakpoints` request.") - private List exceptionBreakpointFilters = new ArrayList(); - /** - * The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests. - * - */ - @JsonProperty("supportsStepBack") - @JsonPropertyDescription("The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests.") - private Boolean supportsStepBack; - /** - * The debug adapter supports setting a variable to a value. - * - */ - @JsonProperty("supportsSetVariable") - @JsonPropertyDescription("The debug adapter supports setting a variable to a value.") - private Boolean supportsSetVariable; - /** - * The debug adapter supports restarting a frame. - * - */ - @JsonProperty("supportsRestartFrame") - @JsonPropertyDescription("The debug adapter supports restarting a frame.") - private Boolean supportsRestartFrame; - /** - * The debug adapter supports the `gotoTargets` request. - * - */ - @JsonProperty("supportsGotoTargetsRequest") - @JsonPropertyDescription("The debug adapter supports the `gotoTargets` request.") - private Boolean supportsGotoTargetsRequest; - /** - * The debug adapter supports the `stepInTargets` request. - * - */ - @JsonProperty("supportsStepInTargetsRequest") - @JsonPropertyDescription("The debug adapter supports the `stepInTargets` request.") - private Boolean supportsStepInTargetsRequest; - /** - * The debug adapter supports the `completions` request. - * - */ - @JsonProperty("supportsCompletionsRequest") - @JsonPropertyDescription("The debug adapter supports the `completions` request.") - private Boolean supportsCompletionsRequest; - /** - * The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character. - * - */ - @JsonProperty("completionTriggerCharacters") - @JsonPropertyDescription("The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character.") - private List completionTriggerCharacters = new ArrayList(); - /** - * The debug adapter supports the `modules` request. - * - */ - @JsonProperty("supportsModulesRequest") - @JsonPropertyDescription("The debug adapter supports the `modules` request.") - private Boolean supportsModulesRequest; - /** - * The set of additional module information exposed by the debug adapter. - * - */ - @JsonProperty("additionalModuleColumns") - @JsonPropertyDescription("The set of additional module information exposed by the debug adapter.") - private List additionalModuleColumns = new ArrayList(); - /** - * Checksum algorithms supported by the debug adapter. - * - */ - @JsonProperty("supportedChecksumAlgorithms") - @JsonPropertyDescription("Checksum algorithms supported by the debug adapter.") - private List supportedChecksumAlgorithms = new ArrayList(); - /** - * The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request. - * - */ - @JsonProperty("supportsRestartRequest") - @JsonPropertyDescription("The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request.") - private Boolean supportsRestartRequest; - /** - * The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("supportsExceptionOptions") - @JsonPropertyDescription("The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request.") - private Boolean supportsExceptionOptions; - /** - * The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests. - * - */ - @JsonProperty("supportsValueFormattingOptions") - @JsonPropertyDescription("The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests.") - private Boolean supportsValueFormattingOptions; - /** - * The debug adapter supports the `exceptionInfo` request. - * - */ - @JsonProperty("supportsExceptionInfoRequest") - @JsonPropertyDescription("The debug adapter supports the `exceptionInfo` request.") - private Boolean supportsExceptionInfoRequest; - /** - * The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. - * - */ - @JsonProperty("supportTerminateDebuggee") - @JsonPropertyDescription("The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request.") - private Boolean supportTerminateDebuggee; - /** - * The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. - * - */ - @JsonProperty("supportSuspendDebuggee") - @JsonPropertyDescription("The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request.") - private Boolean supportSuspendDebuggee; - /** - * The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported. - * - */ - @JsonProperty("supportsDelayedStackTraceLoading") - @JsonPropertyDescription("The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported.") - private Boolean supportsDelayedStackTraceLoading; - /** - * The debug adapter supports the `loadedSources` request. - * - */ - @JsonProperty("supportsLoadedSourcesRequest") - @JsonPropertyDescription("The debug adapter supports the `loadedSources` request.") - private Boolean supportsLoadedSourcesRequest; - /** - * The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`. - * - */ - @JsonProperty("supportsLogPoints") - @JsonPropertyDescription("The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`.") - private Boolean supportsLogPoints; - /** - * The debug adapter supports the `terminateThreads` request. - * - */ - @JsonProperty("supportsTerminateThreadsRequest") - @JsonPropertyDescription("The debug adapter supports the `terminateThreads` request.") - private Boolean supportsTerminateThreadsRequest; - /** - * The debug adapter supports the `setExpression` request. - * - */ - @JsonProperty("supportsSetExpression") - @JsonPropertyDescription("The debug adapter supports the `setExpression` request.") - private Boolean supportsSetExpression; - /** - * The debug adapter supports the `terminate` request. - * - */ - @JsonProperty("supportsTerminateRequest") - @JsonPropertyDescription("The debug adapter supports the `terminate` request.") - private Boolean supportsTerminateRequest; - /** - * The debug adapter supports data breakpoints. - * - */ - @JsonProperty("supportsDataBreakpoints") - @JsonPropertyDescription("The debug adapter supports data breakpoints.") - private Boolean supportsDataBreakpoints; - /** - * The debug adapter supports the `readMemory` request. - * - */ - @JsonProperty("supportsReadMemoryRequest") - @JsonPropertyDescription("The debug adapter supports the `readMemory` request.") - private Boolean supportsReadMemoryRequest; - /** - * The debug adapter supports the `writeMemory` request. - * - */ - @JsonProperty("supportsWriteMemoryRequest") - @JsonPropertyDescription("The debug adapter supports the `writeMemory` request.") - private Boolean supportsWriteMemoryRequest; - /** - * The debug adapter supports the `disassemble` request. - * - */ - @JsonProperty("supportsDisassembleRequest") - @JsonPropertyDescription("The debug adapter supports the `disassemble` request.") - private Boolean supportsDisassembleRequest; - /** - * The debug adapter supports the `cancel` request. - * - */ - @JsonProperty("supportsCancelRequest") - @JsonPropertyDescription("The debug adapter supports the `cancel` request.") - private Boolean supportsCancelRequest; - /** - * The debug adapter supports the `breakpointLocations` request. - * - */ - @JsonProperty("supportsBreakpointLocationsRequest") - @JsonPropertyDescription("The debug adapter supports the `breakpointLocations` request.") - private Boolean supportsBreakpointLocationsRequest; - /** - * The debug adapter supports the `clipboard` context value in the `evaluate` request. - * - */ - @JsonProperty("supportsClipboardContext") - @JsonPropertyDescription("The debug adapter supports the `clipboard` context value in the `evaluate` request.") - private Boolean supportsClipboardContext; - /** - * The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests. - * - */ - @JsonProperty("supportsSteppingGranularity") - @JsonPropertyDescription("The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests.") - private Boolean supportsSteppingGranularity; - /** - * The debug adapter supports adding breakpoints based on instruction references. - * - */ - @JsonProperty("supportsInstructionBreakpoints") - @JsonPropertyDescription("The debug adapter supports adding breakpoints based on instruction references.") - private Boolean supportsInstructionBreakpoints; - /** - * The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("supportsExceptionFilterOptions") - @JsonPropertyDescription("The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request.") - private Boolean supportsExceptionFilterOptions; - /** - * The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). - * - */ - @JsonProperty("supportsSingleThreadExecutionRequests") - @JsonPropertyDescription("The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`).") - private Boolean supportsSingleThreadExecutionRequests; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The debug adapter supports the `configurationDone` request. - * - */ - @JsonProperty("supportsConfigurationDoneRequest") - public Boolean getSupportsConfigurationDoneRequest() { - return supportsConfigurationDoneRequest; - } - - /** - * The debug adapter supports the `configurationDone` request. - * - */ - @JsonProperty("supportsConfigurationDoneRequest") - public void setSupportsConfigurationDoneRequest(Boolean supportsConfigurationDoneRequest) { - this.supportsConfigurationDoneRequest = supportsConfigurationDoneRequest; - } - - /** - * The debug adapter supports function breakpoints. - * - */ - @JsonProperty("supportsFunctionBreakpoints") - public Boolean getSupportsFunctionBreakpoints() { - return supportsFunctionBreakpoints; - } - - /** - * The debug adapter supports function breakpoints. - * - */ - @JsonProperty("supportsFunctionBreakpoints") - public void setSupportsFunctionBreakpoints(Boolean supportsFunctionBreakpoints) { - this.supportsFunctionBreakpoints = supportsFunctionBreakpoints; - } - - /** - * The debug adapter supports conditional breakpoints. - * - */ - @JsonProperty("supportsConditionalBreakpoints") - public Boolean getSupportsConditionalBreakpoints() { - return supportsConditionalBreakpoints; - } - - /** - * The debug adapter supports conditional breakpoints. - * - */ - @JsonProperty("supportsConditionalBreakpoints") - public void setSupportsConditionalBreakpoints(Boolean supportsConditionalBreakpoints) { - this.supportsConditionalBreakpoints = supportsConditionalBreakpoints; - } - - /** - * The debug adapter supports breakpoints that break execution after a specified number of hits. - * - */ - @JsonProperty("supportsHitConditionalBreakpoints") - public Boolean getSupportsHitConditionalBreakpoints() { - return supportsHitConditionalBreakpoints; - } - - /** - * The debug adapter supports breakpoints that break execution after a specified number of hits. - * - */ - @JsonProperty("supportsHitConditionalBreakpoints") - public void setSupportsHitConditionalBreakpoints(Boolean supportsHitConditionalBreakpoints) { - this.supportsHitConditionalBreakpoints = supportsHitConditionalBreakpoints; - } - - /** - * The debug adapter supports a (side effect free) `evaluate` request for data hovers. - * - */ - @JsonProperty("supportsEvaluateForHovers") - public Boolean getSupportsEvaluateForHovers() { - return supportsEvaluateForHovers; - } - - /** - * The debug adapter supports a (side effect free) `evaluate` request for data hovers. - * - */ - @JsonProperty("supportsEvaluateForHovers") - public void setSupportsEvaluateForHovers(Boolean supportsEvaluateForHovers) { - this.supportsEvaluateForHovers = supportsEvaluateForHovers; - } - - /** - * Available exception filter options for the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("exceptionBreakpointFilters") - public List getExceptionBreakpointFilters() { - return exceptionBreakpointFilters; - } - - /** - * Available exception filter options for the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("exceptionBreakpointFilters") - public void setExceptionBreakpointFilters(List exceptionBreakpointFilters) { - this.exceptionBreakpointFilters = exceptionBreakpointFilters; - } - - /** - * The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests. - * - */ - @JsonProperty("supportsStepBack") - public Boolean getSupportsStepBack() { - return supportsStepBack; - } - - /** - * The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests. - * - */ - @JsonProperty("supportsStepBack") - public void setSupportsStepBack(Boolean supportsStepBack) { - this.supportsStepBack = supportsStepBack; - } - - /** - * The debug adapter supports setting a variable to a value. - * - */ - @JsonProperty("supportsSetVariable") - public Boolean getSupportsSetVariable() { - return supportsSetVariable; - } - - /** - * The debug adapter supports setting a variable to a value. - * - */ - @JsonProperty("supportsSetVariable") - public void setSupportsSetVariable(Boolean supportsSetVariable) { - this.supportsSetVariable = supportsSetVariable; - } - - /** - * The debug adapter supports restarting a frame. - * - */ - @JsonProperty("supportsRestartFrame") - public Boolean getSupportsRestartFrame() { - return supportsRestartFrame; - } - - /** - * The debug adapter supports restarting a frame. - * - */ - @JsonProperty("supportsRestartFrame") - public void setSupportsRestartFrame(Boolean supportsRestartFrame) { - this.supportsRestartFrame = supportsRestartFrame; - } - - /** - * The debug adapter supports the `gotoTargets` request. - * - */ - @JsonProperty("supportsGotoTargetsRequest") - public Boolean getSupportsGotoTargetsRequest() { - return supportsGotoTargetsRequest; - } - - /** - * The debug adapter supports the `gotoTargets` request. - * - */ - @JsonProperty("supportsGotoTargetsRequest") - public void setSupportsGotoTargetsRequest(Boolean supportsGotoTargetsRequest) { - this.supportsGotoTargetsRequest = supportsGotoTargetsRequest; - } - - /** - * The debug adapter supports the `stepInTargets` request. - * - */ - @JsonProperty("supportsStepInTargetsRequest") - public Boolean getSupportsStepInTargetsRequest() { - return supportsStepInTargetsRequest; - } - - /** - * The debug adapter supports the `stepInTargets` request. - * - */ - @JsonProperty("supportsStepInTargetsRequest") - public void setSupportsStepInTargetsRequest(Boolean supportsStepInTargetsRequest) { - this.supportsStepInTargetsRequest = supportsStepInTargetsRequest; - } - - /** - * The debug adapter supports the `completions` request. - * - */ - @JsonProperty("supportsCompletionsRequest") - public Boolean getSupportsCompletionsRequest() { - return supportsCompletionsRequest; - } - - /** - * The debug adapter supports the `completions` request. - * - */ - @JsonProperty("supportsCompletionsRequest") - public void setSupportsCompletionsRequest(Boolean supportsCompletionsRequest) { - this.supportsCompletionsRequest = supportsCompletionsRequest; - } - - /** - * The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character. - * - */ - @JsonProperty("completionTriggerCharacters") - public List getCompletionTriggerCharacters() { - return completionTriggerCharacters; - } - - /** - * The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character. - * - */ - @JsonProperty("completionTriggerCharacters") - public void setCompletionTriggerCharacters(List completionTriggerCharacters) { - this.completionTriggerCharacters = completionTriggerCharacters; - } - - /** - * The debug adapter supports the `modules` request. - * - */ - @JsonProperty("supportsModulesRequest") - public Boolean getSupportsModulesRequest() { - return supportsModulesRequest; - } - - /** - * The debug adapter supports the `modules` request. - * - */ - @JsonProperty("supportsModulesRequest") - public void setSupportsModulesRequest(Boolean supportsModulesRequest) { - this.supportsModulesRequest = supportsModulesRequest; - } - - /** - * The set of additional module information exposed by the debug adapter. - * - */ - @JsonProperty("additionalModuleColumns") - public List getAdditionalModuleColumns() { - return additionalModuleColumns; - } - - /** - * The set of additional module information exposed by the debug adapter. - * - */ - @JsonProperty("additionalModuleColumns") - public void setAdditionalModuleColumns(List additionalModuleColumns) { - this.additionalModuleColumns = additionalModuleColumns; - } - - /** - * Checksum algorithms supported by the debug adapter. - * - */ - @JsonProperty("supportedChecksumAlgorithms") - public List getSupportedChecksumAlgorithms() { - return supportedChecksumAlgorithms; - } - - /** - * Checksum algorithms supported by the debug adapter. - * - */ - @JsonProperty("supportedChecksumAlgorithms") - public void setSupportedChecksumAlgorithms(List supportedChecksumAlgorithms) { - this.supportedChecksumAlgorithms = supportedChecksumAlgorithms; - } - - /** - * The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request. - * - */ - @JsonProperty("supportsRestartRequest") - public Boolean getSupportsRestartRequest() { - return supportsRestartRequest; - } - - /** - * The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request. - * - */ - @JsonProperty("supportsRestartRequest") - public void setSupportsRestartRequest(Boolean supportsRestartRequest) { - this.supportsRestartRequest = supportsRestartRequest; - } - - /** - * The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("supportsExceptionOptions") - public Boolean getSupportsExceptionOptions() { - return supportsExceptionOptions; - } - - /** - * The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("supportsExceptionOptions") - public void setSupportsExceptionOptions(Boolean supportsExceptionOptions) { - this.supportsExceptionOptions = supportsExceptionOptions; - } - - /** - * The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests. - * - */ - @JsonProperty("supportsValueFormattingOptions") - public Boolean getSupportsValueFormattingOptions() { - return supportsValueFormattingOptions; - } - - /** - * The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests. - * - */ - @JsonProperty("supportsValueFormattingOptions") - public void setSupportsValueFormattingOptions(Boolean supportsValueFormattingOptions) { - this.supportsValueFormattingOptions = supportsValueFormattingOptions; - } - - /** - * The debug adapter supports the `exceptionInfo` request. - * - */ - @JsonProperty("supportsExceptionInfoRequest") - public Boolean getSupportsExceptionInfoRequest() { - return supportsExceptionInfoRequest; - } - - /** - * The debug adapter supports the `exceptionInfo` request. - * - */ - @JsonProperty("supportsExceptionInfoRequest") - public void setSupportsExceptionInfoRequest(Boolean supportsExceptionInfoRequest) { - this.supportsExceptionInfoRequest = supportsExceptionInfoRequest; - } - - /** - * The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. - * - */ - @JsonProperty("supportTerminateDebuggee") - public Boolean getSupportTerminateDebuggee() { - return supportTerminateDebuggee; - } - - /** - * The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. - * - */ - @JsonProperty("supportTerminateDebuggee") - public void setSupportTerminateDebuggee(Boolean supportTerminateDebuggee) { - this.supportTerminateDebuggee = supportTerminateDebuggee; - } - - /** - * The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. - * - */ - @JsonProperty("supportSuspendDebuggee") - public Boolean getSupportSuspendDebuggee() { - return supportSuspendDebuggee; - } - - /** - * The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. - * - */ - @JsonProperty("supportSuspendDebuggee") - public void setSupportSuspendDebuggee(Boolean supportSuspendDebuggee) { - this.supportSuspendDebuggee = supportSuspendDebuggee; - } - - /** - * The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported. - * - */ - @JsonProperty("supportsDelayedStackTraceLoading") - public Boolean getSupportsDelayedStackTraceLoading() { - return supportsDelayedStackTraceLoading; - } - - /** - * The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported. - * - */ - @JsonProperty("supportsDelayedStackTraceLoading") - public void setSupportsDelayedStackTraceLoading(Boolean supportsDelayedStackTraceLoading) { - this.supportsDelayedStackTraceLoading = supportsDelayedStackTraceLoading; - } - - /** - * The debug adapter supports the `loadedSources` request. - * - */ - @JsonProperty("supportsLoadedSourcesRequest") - public Boolean getSupportsLoadedSourcesRequest() { - return supportsLoadedSourcesRequest; - } - - /** - * The debug adapter supports the `loadedSources` request. - * - */ - @JsonProperty("supportsLoadedSourcesRequest") - public void setSupportsLoadedSourcesRequest(Boolean supportsLoadedSourcesRequest) { - this.supportsLoadedSourcesRequest = supportsLoadedSourcesRequest; - } - - /** - * The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`. - * - */ - @JsonProperty("supportsLogPoints") - public Boolean getSupportsLogPoints() { - return supportsLogPoints; - } - - /** - * The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`. - * - */ - @JsonProperty("supportsLogPoints") - public void setSupportsLogPoints(Boolean supportsLogPoints) { - this.supportsLogPoints = supportsLogPoints; - } - - /** - * The debug adapter supports the `terminateThreads` request. - * - */ - @JsonProperty("supportsTerminateThreadsRequest") - public Boolean getSupportsTerminateThreadsRequest() { - return supportsTerminateThreadsRequest; - } - - /** - * The debug adapter supports the `terminateThreads` request. - * - */ - @JsonProperty("supportsTerminateThreadsRequest") - public void setSupportsTerminateThreadsRequest(Boolean supportsTerminateThreadsRequest) { - this.supportsTerminateThreadsRequest = supportsTerminateThreadsRequest; - } - - /** - * The debug adapter supports the `setExpression` request. - * - */ - @JsonProperty("supportsSetExpression") - public Boolean getSupportsSetExpression() { - return supportsSetExpression; - } - - /** - * The debug adapter supports the `setExpression` request. - * - */ - @JsonProperty("supportsSetExpression") - public void setSupportsSetExpression(Boolean supportsSetExpression) { - this.supportsSetExpression = supportsSetExpression; - } - - /** - * The debug adapter supports the `terminate` request. - * - */ - @JsonProperty("supportsTerminateRequest") - public Boolean getSupportsTerminateRequest() { - return supportsTerminateRequest; - } - - /** - * The debug adapter supports the `terminate` request. - * - */ - @JsonProperty("supportsTerminateRequest") - public void setSupportsTerminateRequest(Boolean supportsTerminateRequest) { - this.supportsTerminateRequest = supportsTerminateRequest; - } - - /** - * The debug adapter supports data breakpoints. - * - */ - @JsonProperty("supportsDataBreakpoints") - public Boolean getSupportsDataBreakpoints() { - return supportsDataBreakpoints; - } - - /** - * The debug adapter supports data breakpoints. - * - */ - @JsonProperty("supportsDataBreakpoints") - public void setSupportsDataBreakpoints(Boolean supportsDataBreakpoints) { - this.supportsDataBreakpoints = supportsDataBreakpoints; - } - - /** - * The debug adapter supports the `readMemory` request. - * - */ - @JsonProperty("supportsReadMemoryRequest") - public Boolean getSupportsReadMemoryRequest() { - return supportsReadMemoryRequest; - } - - /** - * The debug adapter supports the `readMemory` request. - * - */ - @JsonProperty("supportsReadMemoryRequest") - public void setSupportsReadMemoryRequest(Boolean supportsReadMemoryRequest) { - this.supportsReadMemoryRequest = supportsReadMemoryRequest; - } - - /** - * The debug adapter supports the `writeMemory` request. - * - */ - @JsonProperty("supportsWriteMemoryRequest") - public Boolean getSupportsWriteMemoryRequest() { - return supportsWriteMemoryRequest; - } - - /** - * The debug adapter supports the `writeMemory` request. - * - */ - @JsonProperty("supportsWriteMemoryRequest") - public void setSupportsWriteMemoryRequest(Boolean supportsWriteMemoryRequest) { - this.supportsWriteMemoryRequest = supportsWriteMemoryRequest; - } - - /** - * The debug adapter supports the `disassemble` request. - * - */ - @JsonProperty("supportsDisassembleRequest") - public Boolean getSupportsDisassembleRequest() { - return supportsDisassembleRequest; - } - - /** - * The debug adapter supports the `disassemble` request. - * - */ - @JsonProperty("supportsDisassembleRequest") - public void setSupportsDisassembleRequest(Boolean supportsDisassembleRequest) { - this.supportsDisassembleRequest = supportsDisassembleRequest; - } - - /** - * The debug adapter supports the `cancel` request. - * - */ - @JsonProperty("supportsCancelRequest") - public Boolean getSupportsCancelRequest() { - return supportsCancelRequest; - } - - /** - * The debug adapter supports the `cancel` request. - * - */ - @JsonProperty("supportsCancelRequest") - public void setSupportsCancelRequest(Boolean supportsCancelRequest) { - this.supportsCancelRequest = supportsCancelRequest; - } - - /** - * The debug adapter supports the `breakpointLocations` request. - * - */ - @JsonProperty("supportsBreakpointLocationsRequest") - public Boolean getSupportsBreakpointLocationsRequest() { - return supportsBreakpointLocationsRequest; - } - - /** - * The debug adapter supports the `breakpointLocations` request. - * - */ - @JsonProperty("supportsBreakpointLocationsRequest") - public void setSupportsBreakpointLocationsRequest(Boolean supportsBreakpointLocationsRequest) { - this.supportsBreakpointLocationsRequest = supportsBreakpointLocationsRequest; - } - - /** - * The debug adapter supports the `clipboard` context value in the `evaluate` request. - * - */ - @JsonProperty("supportsClipboardContext") - public Boolean getSupportsClipboardContext() { - return supportsClipboardContext; - } - - /** - * The debug adapter supports the `clipboard` context value in the `evaluate` request. - * - */ - @JsonProperty("supportsClipboardContext") - public void setSupportsClipboardContext(Boolean supportsClipboardContext) { - this.supportsClipboardContext = supportsClipboardContext; - } - - /** - * The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests. - * - */ - @JsonProperty("supportsSteppingGranularity") - public Boolean getSupportsSteppingGranularity() { - return supportsSteppingGranularity; - } - - /** - * The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests. - * - */ - @JsonProperty("supportsSteppingGranularity") - public void setSupportsSteppingGranularity(Boolean supportsSteppingGranularity) { - this.supportsSteppingGranularity = supportsSteppingGranularity; - } - - /** - * The debug adapter supports adding breakpoints based on instruction references. - * - */ - @JsonProperty("supportsInstructionBreakpoints") - public Boolean getSupportsInstructionBreakpoints() { - return supportsInstructionBreakpoints; - } - - /** - * The debug adapter supports adding breakpoints based on instruction references. - * - */ - @JsonProperty("supportsInstructionBreakpoints") - public void setSupportsInstructionBreakpoints(Boolean supportsInstructionBreakpoints) { - this.supportsInstructionBreakpoints = supportsInstructionBreakpoints; - } - - /** - * The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("supportsExceptionFilterOptions") - public Boolean getSupportsExceptionFilterOptions() { - return supportsExceptionFilterOptions; - } - - /** - * The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("supportsExceptionFilterOptions") - public void setSupportsExceptionFilterOptions(Boolean supportsExceptionFilterOptions) { - this.supportsExceptionFilterOptions = supportsExceptionFilterOptions; - } - - /** - * The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). - * - */ - @JsonProperty("supportsSingleThreadExecutionRequests") - public Boolean getSupportsSingleThreadExecutionRequests() { - return supportsSingleThreadExecutionRequests; - } - - /** - * The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). - * - */ - @JsonProperty("supportsSingleThreadExecutionRequests") - public void setSupportsSingleThreadExecutionRequests(Boolean supportsSingleThreadExecutionRequests) { - this.supportsSingleThreadExecutionRequests = supportsSingleThreadExecutionRequests; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Capabilities.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("supportsConfigurationDoneRequest"); - sb.append('='); - sb.append(((this.supportsConfigurationDoneRequest == null)?"":this.supportsConfigurationDoneRequest)); - sb.append(','); - sb.append("supportsFunctionBreakpoints"); - sb.append('='); - sb.append(((this.supportsFunctionBreakpoints == null)?"":this.supportsFunctionBreakpoints)); - sb.append(','); - sb.append("supportsConditionalBreakpoints"); - sb.append('='); - sb.append(((this.supportsConditionalBreakpoints == null)?"":this.supportsConditionalBreakpoints)); - sb.append(','); - sb.append("supportsHitConditionalBreakpoints"); - sb.append('='); - sb.append(((this.supportsHitConditionalBreakpoints == null)?"":this.supportsHitConditionalBreakpoints)); - sb.append(','); - sb.append("supportsEvaluateForHovers"); - sb.append('='); - sb.append(((this.supportsEvaluateForHovers == null)?"":this.supportsEvaluateForHovers)); - sb.append(','); - sb.append("exceptionBreakpointFilters"); - sb.append('='); - sb.append(((this.exceptionBreakpointFilters == null)?"":this.exceptionBreakpointFilters)); - sb.append(','); - sb.append("supportsStepBack"); - sb.append('='); - sb.append(((this.supportsStepBack == null)?"":this.supportsStepBack)); - sb.append(','); - sb.append("supportsSetVariable"); - sb.append('='); - sb.append(((this.supportsSetVariable == null)?"":this.supportsSetVariable)); - sb.append(','); - sb.append("supportsRestartFrame"); - sb.append('='); - sb.append(((this.supportsRestartFrame == null)?"":this.supportsRestartFrame)); - sb.append(','); - sb.append("supportsGotoTargetsRequest"); - sb.append('='); - sb.append(((this.supportsGotoTargetsRequest == null)?"":this.supportsGotoTargetsRequest)); - sb.append(','); - sb.append("supportsStepInTargetsRequest"); - sb.append('='); - sb.append(((this.supportsStepInTargetsRequest == null)?"":this.supportsStepInTargetsRequest)); - sb.append(','); - sb.append("supportsCompletionsRequest"); - sb.append('='); - sb.append(((this.supportsCompletionsRequest == null)?"":this.supportsCompletionsRequest)); - sb.append(','); - sb.append("completionTriggerCharacters"); - sb.append('='); - sb.append(((this.completionTriggerCharacters == null)?"":this.completionTriggerCharacters)); - sb.append(','); - sb.append("supportsModulesRequest"); - sb.append('='); - sb.append(((this.supportsModulesRequest == null)?"":this.supportsModulesRequest)); - sb.append(','); - sb.append("additionalModuleColumns"); - sb.append('='); - sb.append(((this.additionalModuleColumns == null)?"":this.additionalModuleColumns)); - sb.append(','); - sb.append("supportedChecksumAlgorithms"); - sb.append('='); - sb.append(((this.supportedChecksumAlgorithms == null)?"":this.supportedChecksumAlgorithms)); - sb.append(','); - sb.append("supportsRestartRequest"); - sb.append('='); - sb.append(((this.supportsRestartRequest == null)?"":this.supportsRestartRequest)); - sb.append(','); - sb.append("supportsExceptionOptions"); - sb.append('='); - sb.append(((this.supportsExceptionOptions == null)?"":this.supportsExceptionOptions)); - sb.append(','); - sb.append("supportsValueFormattingOptions"); - sb.append('='); - sb.append(((this.supportsValueFormattingOptions == null)?"":this.supportsValueFormattingOptions)); - sb.append(','); - sb.append("supportsExceptionInfoRequest"); - sb.append('='); - sb.append(((this.supportsExceptionInfoRequest == null)?"":this.supportsExceptionInfoRequest)); - sb.append(','); - sb.append("supportTerminateDebuggee"); - sb.append('='); - sb.append(((this.supportTerminateDebuggee == null)?"":this.supportTerminateDebuggee)); - sb.append(','); - sb.append("supportSuspendDebuggee"); - sb.append('='); - sb.append(((this.supportSuspendDebuggee == null)?"":this.supportSuspendDebuggee)); - sb.append(','); - sb.append("supportsDelayedStackTraceLoading"); - sb.append('='); - sb.append(((this.supportsDelayedStackTraceLoading == null)?"":this.supportsDelayedStackTraceLoading)); - sb.append(','); - sb.append("supportsLoadedSourcesRequest"); - sb.append('='); - sb.append(((this.supportsLoadedSourcesRequest == null)?"":this.supportsLoadedSourcesRequest)); - sb.append(','); - sb.append("supportsLogPoints"); - sb.append('='); - sb.append(((this.supportsLogPoints == null)?"":this.supportsLogPoints)); - sb.append(','); - sb.append("supportsTerminateThreadsRequest"); - sb.append('='); - sb.append(((this.supportsTerminateThreadsRequest == null)?"":this.supportsTerminateThreadsRequest)); - sb.append(','); - sb.append("supportsSetExpression"); - sb.append('='); - sb.append(((this.supportsSetExpression == null)?"":this.supportsSetExpression)); - sb.append(','); - sb.append("supportsTerminateRequest"); - sb.append('='); - sb.append(((this.supportsTerminateRequest == null)?"":this.supportsTerminateRequest)); - sb.append(','); - sb.append("supportsDataBreakpoints"); - sb.append('='); - sb.append(((this.supportsDataBreakpoints == null)?"":this.supportsDataBreakpoints)); - sb.append(','); - sb.append("supportsReadMemoryRequest"); - sb.append('='); - sb.append(((this.supportsReadMemoryRequest == null)?"":this.supportsReadMemoryRequest)); - sb.append(','); - sb.append("supportsWriteMemoryRequest"); - sb.append('='); - sb.append(((this.supportsWriteMemoryRequest == null)?"":this.supportsWriteMemoryRequest)); - sb.append(','); - sb.append("supportsDisassembleRequest"); - sb.append('='); - sb.append(((this.supportsDisassembleRequest == null)?"":this.supportsDisassembleRequest)); - sb.append(','); - sb.append("supportsCancelRequest"); - sb.append('='); - sb.append(((this.supportsCancelRequest == null)?"":this.supportsCancelRequest)); - sb.append(','); - sb.append("supportsBreakpointLocationsRequest"); - sb.append('='); - sb.append(((this.supportsBreakpointLocationsRequest == null)?"":this.supportsBreakpointLocationsRequest)); - sb.append(','); - sb.append("supportsClipboardContext"); - sb.append('='); - sb.append(((this.supportsClipboardContext == null)?"":this.supportsClipboardContext)); - sb.append(','); - sb.append("supportsSteppingGranularity"); - sb.append('='); - sb.append(((this.supportsSteppingGranularity == null)?"":this.supportsSteppingGranularity)); - sb.append(','); - sb.append("supportsInstructionBreakpoints"); - sb.append('='); - sb.append(((this.supportsInstructionBreakpoints == null)?"":this.supportsInstructionBreakpoints)); - sb.append(','); - sb.append("supportsExceptionFilterOptions"); - sb.append('='); - sb.append(((this.supportsExceptionFilterOptions == null)?"":this.supportsExceptionFilterOptions)); - sb.append(','); - sb.append("supportsSingleThreadExecutionRequests"); - sb.append('='); - sb.append(((this.supportsSingleThreadExecutionRequests == null)?"":this.supportsSingleThreadExecutionRequests)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.supportsSetExpression == null)? 0 :this.supportsSetExpression.hashCode())); - result = ((result* 31)+((this.supportsDisassembleRequest == null)? 0 :this.supportsDisassembleRequest.hashCode())); - result = ((result* 31)+((this.supportsRestartFrame == null)? 0 :this.supportsRestartFrame.hashCode())); - result = ((result* 31)+((this.supportsTerminateRequest == null)? 0 :this.supportsTerminateRequest.hashCode())); - result = ((result* 31)+((this.supportsConfigurationDoneRequest == null)? 0 :this.supportsConfigurationDoneRequest.hashCode())); - result = ((result* 31)+((this.supportSuspendDebuggee == null)? 0 :this.supportSuspendDebuggee.hashCode())); - result = ((result* 31)+((this.supportsRestartRequest == null)? 0 :this.supportsRestartRequest.hashCode())); - result = ((result* 31)+((this.supportsGotoTargetsRequest == null)? 0 :this.supportsGotoTargetsRequest.hashCode())); - result = ((result* 31)+((this.supportsConditionalBreakpoints == null)? 0 :this.supportsConditionalBreakpoints.hashCode())); - result = ((result* 31)+((this.supportsModulesRequest == null)? 0 :this.supportsModulesRequest.hashCode())); - result = ((result* 31)+((this.supportsCancelRequest == null)? 0 :this.supportsCancelRequest.hashCode())); - result = ((result* 31)+((this.supportsHitConditionalBreakpoints == null)? 0 :this.supportsHitConditionalBreakpoints.hashCode())); - result = ((result* 31)+((this.supportsLogPoints == null)? 0 :this.supportsLogPoints.hashCode())); - result = ((result* 31)+((this.supportedChecksumAlgorithms == null)? 0 :this.supportedChecksumAlgorithms.hashCode())); - result = ((result* 31)+((this.supportsReadMemoryRequest == null)? 0 :this.supportsReadMemoryRequest.hashCode())); - result = ((result* 31)+((this.supportsExceptionFilterOptions == null)? 0 :this.supportsExceptionFilterOptions.hashCode())); - result = ((result* 31)+((this.exceptionBreakpointFilters == null)? 0 :this.exceptionBreakpointFilters.hashCode())); - result = ((result* 31)+((this.supportsStepInTargetsRequest == null)? 0 :this.supportsStepInTargetsRequest.hashCode())); - result = ((result* 31)+((this.supportsLoadedSourcesRequest == null)? 0 :this.supportsLoadedSourcesRequest.hashCode())); - result = ((result* 31)+((this.supportsTerminateThreadsRequest == null)? 0 :this.supportsTerminateThreadsRequest.hashCode())); - result = ((result* 31)+((this.supportsExceptionInfoRequest == null)? 0 :this.supportsExceptionInfoRequest.hashCode())); - result = ((result* 31)+((this.completionTriggerCharacters == null)? 0 :this.completionTriggerCharacters.hashCode())); - result = ((result* 31)+((this.supportsValueFormattingOptions == null)? 0 :this.supportsValueFormattingOptions.hashCode())); - result = ((result* 31)+((this.supportsCompletionsRequest == null)? 0 :this.supportsCompletionsRequest.hashCode())); - result = ((result* 31)+((this.supportTerminateDebuggee == null)? 0 :this.supportTerminateDebuggee.hashCode())); - result = ((result* 31)+((this.supportsSteppingGranularity == null)? 0 :this.supportsSteppingGranularity.hashCode())); - result = ((result* 31)+((this.supportsDelayedStackTraceLoading == null)? 0 :this.supportsDelayedStackTraceLoading.hashCode())); - result = ((result* 31)+((this.supportsSingleThreadExecutionRequests == null)? 0 :this.supportsSingleThreadExecutionRequests.hashCode())); - result = ((result* 31)+((this.supportsDataBreakpoints == null)? 0 :this.supportsDataBreakpoints.hashCode())); - result = ((result* 31)+((this.supportsEvaluateForHovers == null)? 0 :this.supportsEvaluateForHovers.hashCode())); - result = ((result* 31)+((this.additionalModuleColumns == null)? 0 :this.additionalModuleColumns.hashCode())); - result = ((result* 31)+((this.supportsFunctionBreakpoints == null)? 0 :this.supportsFunctionBreakpoints.hashCode())); - result = ((result* 31)+((this.supportsBreakpointLocationsRequest == null)? 0 :this.supportsBreakpointLocationsRequest.hashCode())); - result = ((result* 31)+((this.supportsInstructionBreakpoints == null)? 0 :this.supportsInstructionBreakpoints.hashCode())); - result = ((result* 31)+((this.supportsStepBack == null)? 0 :this.supportsStepBack.hashCode())); - result = ((result* 31)+((this.supportsExceptionOptions == null)? 0 :this.supportsExceptionOptions.hashCode())); - result = ((result* 31)+((this.supportsSetVariable == null)? 0 :this.supportsSetVariable.hashCode())); - result = ((result* 31)+((this.supportsClipboardContext == null)? 0 :this.supportsClipboardContext.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.supportsWriteMemoryRequest == null)? 0 :this.supportsWriteMemoryRequest.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Capabilities) == false) { - return false; - } - Capabilities rhs = ((Capabilities) other); - return (((((((((((((((((((((((((((((((((((((((((this.supportsSetExpression == rhs.supportsSetExpression)||((this.supportsSetExpression!= null)&&this.supportsSetExpression.equals(rhs.supportsSetExpression)))&&((this.supportsDisassembleRequest == rhs.supportsDisassembleRequest)||((this.supportsDisassembleRequest!= null)&&this.supportsDisassembleRequest.equals(rhs.supportsDisassembleRequest))))&&((this.supportsRestartFrame == rhs.supportsRestartFrame)||((this.supportsRestartFrame!= null)&&this.supportsRestartFrame.equals(rhs.supportsRestartFrame))))&&((this.supportsTerminateRequest == rhs.supportsTerminateRequest)||((this.supportsTerminateRequest!= null)&&this.supportsTerminateRequest.equals(rhs.supportsTerminateRequest))))&&((this.supportsConfigurationDoneRequest == rhs.supportsConfigurationDoneRequest)||((this.supportsConfigurationDoneRequest!= null)&&this.supportsConfigurationDoneRequest.equals(rhs.supportsConfigurationDoneRequest))))&&((this.supportSuspendDebuggee == rhs.supportSuspendDebuggee)||((this.supportSuspendDebuggee!= null)&&this.supportSuspendDebuggee.equals(rhs.supportSuspendDebuggee))))&&((this.supportsRestartRequest == rhs.supportsRestartRequest)||((this.supportsRestartRequest!= null)&&this.supportsRestartRequest.equals(rhs.supportsRestartRequest))))&&((this.supportsGotoTargetsRequest == rhs.supportsGotoTargetsRequest)||((this.supportsGotoTargetsRequest!= null)&&this.supportsGotoTargetsRequest.equals(rhs.supportsGotoTargetsRequest))))&&((this.supportsConditionalBreakpoints == rhs.supportsConditionalBreakpoints)||((this.supportsConditionalBreakpoints!= null)&&this.supportsConditionalBreakpoints.equals(rhs.supportsConditionalBreakpoints))))&&((this.supportsModulesRequest == rhs.supportsModulesRequest)||((this.supportsModulesRequest!= null)&&this.supportsModulesRequest.equals(rhs.supportsModulesRequest))))&&((this.supportsCancelRequest == rhs.supportsCancelRequest)||((this.supportsCancelRequest!= null)&&this.supportsCancelRequest.equals(rhs.supportsCancelRequest))))&&((this.supportsHitConditionalBreakpoints == rhs.supportsHitConditionalBreakpoints)||((this.supportsHitConditionalBreakpoints!= null)&&this.supportsHitConditionalBreakpoints.equals(rhs.supportsHitConditionalBreakpoints))))&&((this.supportsLogPoints == rhs.supportsLogPoints)||((this.supportsLogPoints!= null)&&this.supportsLogPoints.equals(rhs.supportsLogPoints))))&&((this.supportedChecksumAlgorithms == rhs.supportedChecksumAlgorithms)||((this.supportedChecksumAlgorithms!= null)&&this.supportedChecksumAlgorithms.equals(rhs.supportedChecksumAlgorithms))))&&((this.supportsReadMemoryRequest == rhs.supportsReadMemoryRequest)||((this.supportsReadMemoryRequest!= null)&&this.supportsReadMemoryRequest.equals(rhs.supportsReadMemoryRequest))))&&((this.supportsExceptionFilterOptions == rhs.supportsExceptionFilterOptions)||((this.supportsExceptionFilterOptions!= null)&&this.supportsExceptionFilterOptions.equals(rhs.supportsExceptionFilterOptions))))&&((this.exceptionBreakpointFilters == rhs.exceptionBreakpointFilters)||((this.exceptionBreakpointFilters!= null)&&this.exceptionBreakpointFilters.equals(rhs.exceptionBreakpointFilters))))&&((this.supportsStepInTargetsRequest == rhs.supportsStepInTargetsRequest)||((this.supportsStepInTargetsRequest!= null)&&this.supportsStepInTargetsRequest.equals(rhs.supportsStepInTargetsRequest))))&&((this.supportsLoadedSourcesRequest == rhs.supportsLoadedSourcesRequest)||((this.supportsLoadedSourcesRequest!= null)&&this.supportsLoadedSourcesRequest.equals(rhs.supportsLoadedSourcesRequest))))&&((this.supportsTerminateThreadsRequest == rhs.supportsTerminateThreadsRequest)||((this.supportsTerminateThreadsRequest!= null)&&this.supportsTerminateThreadsRequest.equals(rhs.supportsTerminateThreadsRequest))))&&((this.supportsExceptionInfoRequest == rhs.supportsExceptionInfoRequest)||((this.supportsExceptionInfoRequest!= null)&&this.supportsExceptionInfoRequest.equals(rhs.supportsExceptionInfoRequest))))&&((this.completionTriggerCharacters == rhs.completionTriggerCharacters)||((this.completionTriggerCharacters!= null)&&this.completionTriggerCharacters.equals(rhs.completionTriggerCharacters))))&&((this.supportsValueFormattingOptions == rhs.supportsValueFormattingOptions)||((this.supportsValueFormattingOptions!= null)&&this.supportsValueFormattingOptions.equals(rhs.supportsValueFormattingOptions))))&&((this.supportsCompletionsRequest == rhs.supportsCompletionsRequest)||((this.supportsCompletionsRequest!= null)&&this.supportsCompletionsRequest.equals(rhs.supportsCompletionsRequest))))&&((this.supportTerminateDebuggee == rhs.supportTerminateDebuggee)||((this.supportTerminateDebuggee!= null)&&this.supportTerminateDebuggee.equals(rhs.supportTerminateDebuggee))))&&((this.supportsSteppingGranularity == rhs.supportsSteppingGranularity)||((this.supportsSteppingGranularity!= null)&&this.supportsSteppingGranularity.equals(rhs.supportsSteppingGranularity))))&&((this.supportsDelayedStackTraceLoading == rhs.supportsDelayedStackTraceLoading)||((this.supportsDelayedStackTraceLoading!= null)&&this.supportsDelayedStackTraceLoading.equals(rhs.supportsDelayedStackTraceLoading))))&&((this.supportsSingleThreadExecutionRequests == rhs.supportsSingleThreadExecutionRequests)||((this.supportsSingleThreadExecutionRequests!= null)&&this.supportsSingleThreadExecutionRequests.equals(rhs.supportsSingleThreadExecutionRequests))))&&((this.supportsDataBreakpoints == rhs.supportsDataBreakpoints)||((this.supportsDataBreakpoints!= null)&&this.supportsDataBreakpoints.equals(rhs.supportsDataBreakpoints))))&&((this.supportsEvaluateForHovers == rhs.supportsEvaluateForHovers)||((this.supportsEvaluateForHovers!= null)&&this.supportsEvaluateForHovers.equals(rhs.supportsEvaluateForHovers))))&&((this.additionalModuleColumns == rhs.additionalModuleColumns)||((this.additionalModuleColumns!= null)&&this.additionalModuleColumns.equals(rhs.additionalModuleColumns))))&&((this.supportsFunctionBreakpoints == rhs.supportsFunctionBreakpoints)||((this.supportsFunctionBreakpoints!= null)&&this.supportsFunctionBreakpoints.equals(rhs.supportsFunctionBreakpoints))))&&((this.supportsBreakpointLocationsRequest == rhs.supportsBreakpointLocationsRequest)||((this.supportsBreakpointLocationsRequest!= null)&&this.supportsBreakpointLocationsRequest.equals(rhs.supportsBreakpointLocationsRequest))))&&((this.supportsInstructionBreakpoints == rhs.supportsInstructionBreakpoints)||((this.supportsInstructionBreakpoints!= null)&&this.supportsInstructionBreakpoints.equals(rhs.supportsInstructionBreakpoints))))&&((this.supportsStepBack == rhs.supportsStepBack)||((this.supportsStepBack!= null)&&this.supportsStepBack.equals(rhs.supportsStepBack))))&&((this.supportsExceptionOptions == rhs.supportsExceptionOptions)||((this.supportsExceptionOptions!= null)&&this.supportsExceptionOptions.equals(rhs.supportsExceptionOptions))))&&((this.supportsSetVariable == rhs.supportsSetVariable)||((this.supportsSetVariable!= null)&&this.supportsSetVariable.equals(rhs.supportsSetVariable))))&&((this.supportsClipboardContext == rhs.supportsClipboardContext)||((this.supportsClipboardContext!= null)&&this.supportsClipboardContext.equals(rhs.supportsClipboardContext))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.supportsWriteMemoryRequest == rhs.supportsWriteMemoryRequest)||((this.supportsWriteMemoryRequest!= null)&&this.supportsWriteMemoryRequest.equals(rhs.supportsWriteMemoryRequest)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesClass.java new file mode 100644 index 0000000..f9a1344 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesClass.java @@ -0,0 +1,376 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Information about the capabilities of a debug adapter. + * + * The set of updated capabilities. + * + * The capabilities of this debug adapter. + */ +public class CapabilitiesClass { + private ColumnDescriptor[] additionalModuleColumns; + private String[] completionTriggerCharacters; + private ExceptionBreakpointsFilter[] exceptionBreakpointFilters; + private ChecksumAlgorithm[] supportedChecksumAlgorithms; + private Boolean supportsBreakpointLocationsRequest; + private Boolean supportsCancelRequest; + private Boolean supportsClipboardContext; + private Boolean supportsCompletionsRequest; + private Boolean supportsConditionalBreakpoints; + private Boolean supportsConfigurationDoneRequest; + private Boolean supportsDataBreakpoints; + private Boolean supportsDelayedStackTraceLoading; + private Boolean supportsDisassembleRequest; + private Boolean supportsEvaluateForHovers; + private Boolean supportsExceptionFilterOptions; + private Boolean supportsExceptionInfoRequest; + private Boolean supportsExceptionOptions; + private Boolean supportsFunctionBreakpoints; + private Boolean supportsGotoTargetsRequest; + private Boolean supportsHitConditionalBreakpoints; + private Boolean supportsInstructionBreakpoints; + private Boolean supportsLoadedSourcesRequest; + private Boolean supportsLogPoints; + private Boolean supportsModulesRequest; + private Boolean supportsReadMemoryRequest; + private Boolean supportsRestartFrame; + private Boolean supportsRestartRequest; + private Boolean supportsSetExpression; + private Boolean supportsSetVariable; + private Boolean supportsSingleThreadExecutionRequests; + private Boolean supportsStepBack; + private Boolean supportsStepInTargetsRequest; + private Boolean supportsSteppingGranularity; + private Boolean supportsTerminateRequest; + private Boolean supportsTerminateThreadsRequest; + private Boolean supportSuspendDebuggee; + private Boolean supportsValueFormattingOptions; + private Boolean supportsWriteMemoryRequest; + private Boolean supportTerminateDebuggee; + + /** + * The set of additional module information exposed by the debug adapter. + */ + @JsonProperty("additionalModuleColumns") + public ColumnDescriptor[] getAdditionalModuleColumns() { return additionalModuleColumns; } + @JsonProperty("additionalModuleColumns") + public void setAdditionalModuleColumns(ColumnDescriptor[] value) { this.additionalModuleColumns = value; } + + /** + * The set of characters that should trigger completion in a REPL. If not specified, the UI + * should assume the `.` character. + */ + @JsonProperty("completionTriggerCharacters") + public String[] getCompletionTriggerCharacters() { return completionTriggerCharacters; } + @JsonProperty("completionTriggerCharacters") + public void setCompletionTriggerCharacters(String[] value) { this.completionTriggerCharacters = value; } + + /** + * Available exception filter options for the `setExceptionBreakpoints` request. + */ + @JsonProperty("exceptionBreakpointFilters") + public ExceptionBreakpointsFilter[] getExceptionBreakpointFilters() { return exceptionBreakpointFilters; } + @JsonProperty("exceptionBreakpointFilters") + public void setExceptionBreakpointFilters(ExceptionBreakpointsFilter[] value) { this.exceptionBreakpointFilters = value; } + + /** + * Checksum algorithms supported by the debug adapter. + */ + @JsonProperty("supportedChecksumAlgorithms") + public ChecksumAlgorithm[] getSupportedChecksumAlgorithms() { return supportedChecksumAlgorithms; } + @JsonProperty("supportedChecksumAlgorithms") + public void setSupportedChecksumAlgorithms(ChecksumAlgorithm[] value) { this.supportedChecksumAlgorithms = value; } + + /** + * The debug adapter supports the `breakpointLocations` request. + */ + @JsonProperty("supportsBreakpointLocationsRequest") + public Boolean getSupportsBreakpointLocationsRequest() { return supportsBreakpointLocationsRequest; } + @JsonProperty("supportsBreakpointLocationsRequest") + public void setSupportsBreakpointLocationsRequest(Boolean value) { this.supportsBreakpointLocationsRequest = value; } + + /** + * The debug adapter supports the `cancel` request. + */ + @JsonProperty("supportsCancelRequest") + public Boolean getSupportsCancelRequest() { return supportsCancelRequest; } + @JsonProperty("supportsCancelRequest") + public void setSupportsCancelRequest(Boolean value) { this.supportsCancelRequest = value; } + + /** + * The debug adapter supports the `clipboard` context value in the `evaluate` request. + */ + @JsonProperty("supportsClipboardContext") + public Boolean getSupportsClipboardContext() { return supportsClipboardContext; } + @JsonProperty("supportsClipboardContext") + public void setSupportsClipboardContext(Boolean value) { this.supportsClipboardContext = value; } + + /** + * The debug adapter supports the `completions` request. + */ + @JsonProperty("supportsCompletionsRequest") + public Boolean getSupportsCompletionsRequest() { return supportsCompletionsRequest; } + @JsonProperty("supportsCompletionsRequest") + public void setSupportsCompletionsRequest(Boolean value) { this.supportsCompletionsRequest = value; } + + /** + * The debug adapter supports conditional breakpoints. + */ + @JsonProperty("supportsConditionalBreakpoints") + public Boolean getSupportsConditionalBreakpoints() { return supportsConditionalBreakpoints; } + @JsonProperty("supportsConditionalBreakpoints") + public void setSupportsConditionalBreakpoints(Boolean value) { this.supportsConditionalBreakpoints = value; } + + /** + * The debug adapter supports the `configurationDone` request. + */ + @JsonProperty("supportsConfigurationDoneRequest") + public Boolean getSupportsConfigurationDoneRequest() { return supportsConfigurationDoneRequest; } + @JsonProperty("supportsConfigurationDoneRequest") + public void setSupportsConfigurationDoneRequest(Boolean value) { this.supportsConfigurationDoneRequest = value; } + + /** + * The debug adapter supports data breakpoints. + */ + @JsonProperty("supportsDataBreakpoints") + public Boolean getSupportsDataBreakpoints() { return supportsDataBreakpoints; } + @JsonProperty("supportsDataBreakpoints") + public void setSupportsDataBreakpoints(Boolean value) { this.supportsDataBreakpoints = value; } + + /** + * The debug adapter supports the delayed loading of parts of the stack, which requires that + * both the `startFrame` and `levels` arguments and the `totalFrames` result of the + * `stackTrace` request are supported. + */ + @JsonProperty("supportsDelayedStackTraceLoading") + public Boolean getSupportsDelayedStackTraceLoading() { return supportsDelayedStackTraceLoading; } + @JsonProperty("supportsDelayedStackTraceLoading") + public void setSupportsDelayedStackTraceLoading(Boolean value) { this.supportsDelayedStackTraceLoading = value; } + + /** + * The debug adapter supports the `disassemble` request. + */ + @JsonProperty("supportsDisassembleRequest") + public Boolean getSupportsDisassembleRequest() { return supportsDisassembleRequest; } + @JsonProperty("supportsDisassembleRequest") + public void setSupportsDisassembleRequest(Boolean value) { this.supportsDisassembleRequest = value; } + + /** + * The debug adapter supports a (side effect free) `evaluate` request for data hovers. + */ + @JsonProperty("supportsEvaluateForHovers") + public Boolean getSupportsEvaluateForHovers() { return supportsEvaluateForHovers; } + @JsonProperty("supportsEvaluateForHovers") + public void setSupportsEvaluateForHovers(Boolean value) { this.supportsEvaluateForHovers = value; } + + /** + * The debug adapter supports `filterOptions` as an argument on the + * `setExceptionBreakpoints` request. + */ + @JsonProperty("supportsExceptionFilterOptions") + public Boolean getSupportsExceptionFilterOptions() { return supportsExceptionFilterOptions; } + @JsonProperty("supportsExceptionFilterOptions") + public void setSupportsExceptionFilterOptions(Boolean value) { this.supportsExceptionFilterOptions = value; } + + /** + * The debug adapter supports the `exceptionInfo` request. + */ + @JsonProperty("supportsExceptionInfoRequest") + public Boolean getSupportsExceptionInfoRequest() { return supportsExceptionInfoRequest; } + @JsonProperty("supportsExceptionInfoRequest") + public void setSupportsExceptionInfoRequest(Boolean value) { this.supportsExceptionInfoRequest = value; } + + /** + * The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. + */ + @JsonProperty("supportsExceptionOptions") + public Boolean getSupportsExceptionOptions() { return supportsExceptionOptions; } + @JsonProperty("supportsExceptionOptions") + public void setSupportsExceptionOptions(Boolean value) { this.supportsExceptionOptions = value; } + + /** + * The debug adapter supports function breakpoints. + */ + @JsonProperty("supportsFunctionBreakpoints") + public Boolean getSupportsFunctionBreakpoints() { return supportsFunctionBreakpoints; } + @JsonProperty("supportsFunctionBreakpoints") + public void setSupportsFunctionBreakpoints(Boolean value) { this.supportsFunctionBreakpoints = value; } + + /** + * The debug adapter supports the `gotoTargets` request. + */ + @JsonProperty("supportsGotoTargetsRequest") + public Boolean getSupportsGotoTargetsRequest() { return supportsGotoTargetsRequest; } + @JsonProperty("supportsGotoTargetsRequest") + public void setSupportsGotoTargetsRequest(Boolean value) { this.supportsGotoTargetsRequest = value; } + + /** + * The debug adapter supports breakpoints that break execution after a specified number of + * hits. + */ + @JsonProperty("supportsHitConditionalBreakpoints") + public Boolean getSupportsHitConditionalBreakpoints() { return supportsHitConditionalBreakpoints; } + @JsonProperty("supportsHitConditionalBreakpoints") + public void setSupportsHitConditionalBreakpoints(Boolean value) { this.supportsHitConditionalBreakpoints = value; } + + /** + * The debug adapter supports adding breakpoints based on instruction references. + */ + @JsonProperty("supportsInstructionBreakpoints") + public Boolean getSupportsInstructionBreakpoints() { return supportsInstructionBreakpoints; } + @JsonProperty("supportsInstructionBreakpoints") + public void setSupportsInstructionBreakpoints(Boolean value) { this.supportsInstructionBreakpoints = value; } + + /** + * The debug adapter supports the `loadedSources` request. + */ + @JsonProperty("supportsLoadedSourcesRequest") + public Boolean getSupportsLoadedSourcesRequest() { return supportsLoadedSourcesRequest; } + @JsonProperty("supportsLoadedSourcesRequest") + public void setSupportsLoadedSourcesRequest(Boolean value) { this.supportsLoadedSourcesRequest = value; } + + /** + * The debug adapter supports log points by interpreting the `logMessage` attribute of the + * `SourceBreakpoint`. + */ + @JsonProperty("supportsLogPoints") + public Boolean getSupportsLogPoints() { return supportsLogPoints; } + @JsonProperty("supportsLogPoints") + public void setSupportsLogPoints(Boolean value) { this.supportsLogPoints = value; } + + /** + * The debug adapter supports the `modules` request. + */ + @JsonProperty("supportsModulesRequest") + public Boolean getSupportsModulesRequest() { return supportsModulesRequest; } + @JsonProperty("supportsModulesRequest") + public void setSupportsModulesRequest(Boolean value) { this.supportsModulesRequest = value; } + + /** + * The debug adapter supports the `readMemory` request. + */ + @JsonProperty("supportsReadMemoryRequest") + public Boolean getSupportsReadMemoryRequest() { return supportsReadMemoryRequest; } + @JsonProperty("supportsReadMemoryRequest") + public void setSupportsReadMemoryRequest(Boolean value) { this.supportsReadMemoryRequest = value; } + + /** + * The debug adapter supports restarting a frame. + */ + @JsonProperty("supportsRestartFrame") + public Boolean getSupportsRestartFrame() { return supportsRestartFrame; } + @JsonProperty("supportsRestartFrame") + public void setSupportsRestartFrame(Boolean value) { this.supportsRestartFrame = value; } + + /** + * The debug adapter supports the `restart` request. In this case a client should not + * implement `restart` by terminating and relaunching the adapter but by calling the + * `restart` request. + */ + @JsonProperty("supportsRestartRequest") + public Boolean getSupportsRestartRequest() { return supportsRestartRequest; } + @JsonProperty("supportsRestartRequest") + public void setSupportsRestartRequest(Boolean value) { this.supportsRestartRequest = value; } + + /** + * The debug adapter supports the `setExpression` request. + */ + @JsonProperty("supportsSetExpression") + public Boolean getSupportsSetExpression() { return supportsSetExpression; } + @JsonProperty("supportsSetExpression") + public void setSupportsSetExpression(Boolean value) { this.supportsSetExpression = value; } + + /** + * The debug adapter supports setting a variable to a value. + */ + @JsonProperty("supportsSetVariable") + public Boolean getSupportsSetVariable() { return supportsSetVariable; } + @JsonProperty("supportsSetVariable") + public void setSupportsSetVariable(Boolean value) { this.supportsSetVariable = value; } + + /** + * The debug adapter supports the `singleThread` property on the execution requests + * (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). + */ + @JsonProperty("supportsSingleThreadExecutionRequests") + public Boolean getSupportsSingleThreadExecutionRequests() { return supportsSingleThreadExecutionRequests; } + @JsonProperty("supportsSingleThreadExecutionRequests") + public void setSupportsSingleThreadExecutionRequests(Boolean value) { this.supportsSingleThreadExecutionRequests = value; } + + /** + * The debug adapter supports stepping back via the `stepBack` and `reverseContinue` + * requests. + */ + @JsonProperty("supportsStepBack") + public Boolean getSupportsStepBack() { return supportsStepBack; } + @JsonProperty("supportsStepBack") + public void setSupportsStepBack(Boolean value) { this.supportsStepBack = value; } + + /** + * The debug adapter supports the `stepInTargets` request. + */ + @JsonProperty("supportsStepInTargetsRequest") + public Boolean getSupportsStepInTargetsRequest() { return supportsStepInTargetsRequest; } + @JsonProperty("supportsStepInTargetsRequest") + public void setSupportsStepInTargetsRequest(Boolean value) { this.supportsStepInTargetsRequest = value; } + + /** + * The debug adapter supports stepping granularities (argument `granularity`) for the + * stepping requests. + */ + @JsonProperty("supportsSteppingGranularity") + public Boolean getSupportsSteppingGranularity() { return supportsSteppingGranularity; } + @JsonProperty("supportsSteppingGranularity") + public void setSupportsSteppingGranularity(Boolean value) { this.supportsSteppingGranularity = value; } + + /** + * The debug adapter supports the `terminate` request. + */ + @JsonProperty("supportsTerminateRequest") + public Boolean getSupportsTerminateRequest() { return supportsTerminateRequest; } + @JsonProperty("supportsTerminateRequest") + public void setSupportsTerminateRequest(Boolean value) { this.supportsTerminateRequest = value; } + + /** + * The debug adapter supports the `terminateThreads` request. + */ + @JsonProperty("supportsTerminateThreadsRequest") + public Boolean getSupportsTerminateThreadsRequest() { return supportsTerminateThreadsRequest; } + @JsonProperty("supportsTerminateThreadsRequest") + public void setSupportsTerminateThreadsRequest(Boolean value) { this.supportsTerminateThreadsRequest = value; } + + /** + * The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. + */ + @JsonProperty("supportSuspendDebuggee") + public Boolean getSupportSuspendDebuggee() { return supportSuspendDebuggee; } + @JsonProperty("supportSuspendDebuggee") + public void setSupportSuspendDebuggee(Boolean value) { this.supportSuspendDebuggee = value; } + + /** + * The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and + * `evaluate` requests. + */ + @JsonProperty("supportsValueFormattingOptions") + public Boolean getSupportsValueFormattingOptions() { return supportsValueFormattingOptions; } + @JsonProperty("supportsValueFormattingOptions") + public void setSupportsValueFormattingOptions(Boolean value) { this.supportsValueFormattingOptions = value; } + + /** + * The debug adapter supports the `writeMemory` request. + */ + @JsonProperty("supportsWriteMemoryRequest") + public Boolean getSupportsWriteMemoryRequest() { return supportsWriteMemoryRequest; } + @JsonProperty("supportsWriteMemoryRequest") + public void setSupportsWriteMemoryRequest(Boolean value) { this.supportsWriteMemoryRequest = value; } + + /** + * The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. + */ + @JsonProperty("supportTerminateDebuggee") + public Boolean getSupportTerminateDebuggee() { return supportTerminateDebuggee; } + @JsonProperty("supportTerminateDebuggee") + public void setSupportTerminateDebuggee(Boolean value) { this.supportTerminateDebuggee = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventBody.java new file mode 100644 index 0000000..85158f1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class CapabilitiesEventBody { + private CapabilitiesClass capabilities; + + /** + * The set of updated capabilities. + */ + @JsonProperty("capabilities") + public CapabilitiesClass getCapabilities() { return capabilities; } + @JsonProperty("capabilities") + public void setCapabilities(CapabilitiesClass value) { this.capabilities = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventClass.java new file mode 100644 index 0000000..f40dada --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventClass.java @@ -0,0 +1,59 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that one or more capabilities have changed. + * Since the capabilities are dependent on the client and its UI, it might not be possible + * to change that at random times (or too late). + * Consequently this event has a hint characteristic: a client can only be expected to make + * a 'best effort' in honoring individual capabilities but there are no guarantees. + * Only changed capabilities need to be included, all other capabilities keep their values. + */ +public class CapabilitiesEventClass { + private long seq; + private BreakpointEventType type; + private CapabilitiesEventBody body; + private CapabilitiesEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public CapabilitiesEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(CapabilitiesEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public CapabilitiesEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(CapabilitiesEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventEvent.java new file mode 100644 index 0000000..2337872 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CapabilitiesEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum CapabilitiesEventEvent { + CAPABILITIES; + + @JsonValue + public String toValue() { + switch (this) { + case CAPABILITIES: return "capabilities"; + } + return null; + } + + @JsonCreator + public static CapabilitiesEventEvent forValue(String value) throws IOException { + if (value.equals("capabilities")) return CAPABILITIES; + throw new IOException("Cannot deserialize CapabilitiesEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ChRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ChRequestArguments.java new file mode 100644 index 0000000..754320a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ChRequestArguments.java @@ -0,0 +1,33 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * The latest version of the `launch` or `attach` configuration. + * + * Arguments for `launch` request. Additional attributes are implementation specific. + * + * Arguments for `attach` request. Additional attributes are implementation specific. + */ +public class ChRequestArguments { + private Restart restart; + private Boolean noDebug; + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + */ + @JsonProperty("__restart") + public Restart getRestart() { return restart; } + @JsonProperty("__restart") + public void setRestart(Restart value) { this.restart = value; } + + /** + * If true, the launch request should launch the program without enabling debugging. + */ + @JsonProperty("noDebug") + public Boolean getNoDebug() { return noDebug; } + @JsonProperty("noDebug") + public void setNoDebug(Boolean value) { this.noDebug = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Checksum.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Checksum.java index 24bdaf1..eeeadab 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Checksum.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Checksum.java @@ -1,192 +1,27 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - +import com.fasterxml.jackson.annotation.*; /** * The checksum of an item calculated by the specified algorithm. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "algorithm", - "checksum" -}) -@Generated("jsonschema2pojo") public class Checksum { - - /** - * Names of checksum algorithms that may be supported by a debug adapter. - * (Required) - * - */ - @JsonProperty("algorithm") - @JsonPropertyDescription("Names of checksum algorithms that may be supported by a debug adapter.") private ChecksumAlgorithm algorithm; - /** - * Value of the checksum, encoded as a hexadecimal value. - * (Required) - * - */ - @JsonProperty("checksum") - @JsonPropertyDescription("Value of the checksum, encoded as a hexadecimal value.") private String checksum; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); /** - * Names of checksum algorithms that may be supported by a debug adapter. - * (Required) - * + * The algorithm used to calculate this checksum. */ @JsonProperty("algorithm") - public ChecksumAlgorithm getAlgorithm() { - return algorithm; - } - - /** - * Names of checksum algorithms that may be supported by a debug adapter. - * (Required) - * - */ + public ChecksumAlgorithm getAlgorithm() { return algorithm; } @JsonProperty("algorithm") - public void setAlgorithm(ChecksumAlgorithm algorithm) { - this.algorithm = algorithm; - } + public void setAlgorithm(ChecksumAlgorithm value) { this.algorithm = value; } /** * Value of the checksum, encoded as a hexadecimal value. - * (Required) - * */ @JsonProperty("checksum") - public String getChecksum() { - return checksum; - } - - /** - * Value of the checksum, encoded as a hexadecimal value. - * (Required) - * - */ + public String getChecksum() { return checksum; } @JsonProperty("checksum") - public void setChecksum(String checksum) { - this.checksum = checksum; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Checksum.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("algorithm"); - sb.append('='); - sb.append(((this.algorithm == null)?"":this.algorithm)); - sb.append(','); - sb.append("checksum"); - sb.append('='); - sb.append(((this.checksum == null)?"":this.checksum)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.checksum == null)? 0 :this.checksum.hashCode())); - result = ((result* 31)+((this.algorithm == null)? 0 :this.algorithm.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Checksum) == false) { - return false; - } - Checksum rhs = ((Checksum) other); - return ((((this.checksum == rhs.checksum)||((this.checksum!= null)&&this.checksum.equals(rhs.checksum)))&&((this.algorithm == rhs.algorithm)||((this.algorithm!= null)&&this.algorithm.equals(rhs.algorithm))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - - - /** - * Names of checksum algorithms that may be supported by a debug adapter. - * - */ - @Generated("jsonschema2pojo") - public enum ChecksumAlgorithm { - - MD_5("MD5"), - SHA_1("SHA1"), - SHA_256("SHA256"), - TIMESTAMP("timestamp"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (ChecksumAlgorithm c: values()) { - CONSTANTS.put(c.value, c); - } - } - - ChecksumAlgorithm(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static ChecksumAlgorithm fromValue(String value) { - ChecksumAlgorithm constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + public void setChecksum(String value) { this.checksum = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ChecksumAlgorithm.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ChecksumAlgorithm.java new file mode 100644 index 0000000..bc18dc5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ChecksumAlgorithm.java @@ -0,0 +1,33 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * The algorithm used to calculate this checksum. + * + * Names of checksum algorithms that may be supported by a debug adapter. + */ +public enum ChecksumAlgorithm { + MD5, SHA1, SHA256, TIMESTAMP; + + @JsonValue + public String toValue() { + switch (this) { + case MD5: return "MD5"; + case SHA1: return "SHA1"; + case SHA256: return "SHA256"; + case TIMESTAMP: return "timestamp"; + } + return null; + } + + @JsonCreator + public static ChecksumAlgorithm forValue(String value) throws IOException { + if (value.equals("MD5")) return MD5; + if (value.equals("SHA1")) return SHA1; + if (value.equals("SHA256")) return SHA256; + if (value.equals("timestamp")) return TIMESTAMP; + throw new IOException("Cannot deserialize ChecksumAlgorithm"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ColumnDescriptor.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ColumnDescriptor.java index 827957a..fd2495a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ColumnDescriptor.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ColumnDescriptor.java @@ -1,287 +1,58 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - +import com.fasterxml.jackson.annotation.*; /** - * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, + * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules + * view, how to format it, * and what the column's label should be. * It is only used if the underlying UI actually supports this level of customization. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "attributeName", - "label", - "format", - "type", - "width" -}) -@Generated("jsonschema2pojo") public class ColumnDescriptor { - - /** - * Name of the attribute rendered in this column. - * (Required) - * - */ - @JsonProperty("attributeName") - @JsonPropertyDescription("Name of the attribute rendered in this column.") private String attributeName; - /** - * Header UI label of column. - * (Required) - * - */ - @JsonProperty("label") - @JsonPropertyDescription("Header UI label of column.") - private String label; - /** - * Format to use for the rendered values in this column. TBD how the format strings looks like. - * - */ - @JsonProperty("format") - @JsonPropertyDescription("Format to use for the rendered values in this column. TBD how the format strings looks like.") private String format; - /** - * Datatype of values in this column. Defaults to `string` if not specified. - * - */ - @JsonProperty("type") - @JsonPropertyDescription("Datatype of values in this column. Defaults to `string` if not specified.") + private String label; private Type type; - /** - * Width of this column in characters (hint only). - * - */ - @JsonProperty("width") - @JsonPropertyDescription("Width of this column in characters (hint only).") - private Integer width; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + private Long width; /** * Name of the attribute rendered in this column. - * (Required) - * */ @JsonProperty("attributeName") - public String getAttributeName() { - return attributeName; - } - - /** - * Name of the attribute rendered in this column. - * (Required) - * - */ + public String getAttributeName() { return attributeName; } @JsonProperty("attributeName") - public void setAttributeName(String attributeName) { - this.attributeName = attributeName; - } + public void setAttributeName(String value) { this.attributeName = value; } /** - * Header UI label of column. - * (Required) - * + * Format to use for the rendered values in this column. TBD how the format strings looks + * like. */ - @JsonProperty("label") - public String getLabel() { - return label; - } + @JsonProperty("format") + public String getFormat() { return format; } + @JsonProperty("format") + public void setFormat(String value) { this.format = value; } /** * Header UI label of column. - * (Required) - * */ @JsonProperty("label") - public void setLabel(String label) { - this.label = label; - } - - /** - * Format to use for the rendered values in this column. TBD how the format strings looks like. - * - */ - @JsonProperty("format") - public String getFormat() { - return format; - } - - /** - * Format to use for the rendered values in this column. TBD how the format strings looks like. - * - */ - @JsonProperty("format") - public void setFormat(String format) { - this.format = format; - } + public String getLabel() { return label; } + @JsonProperty("label") + public void setLabel(String value) { this.label = value; } /** * Datatype of values in this column. Defaults to `string` if not specified. - * */ @JsonProperty("type") - public Type getType() { - return type; - } - - /** - * Datatype of values in this column. Defaults to `string` if not specified. - * - */ + public Type getType() { return type; } @JsonProperty("type") - public void setType(Type type) { - this.type = type; - } + public void setType(Type value) { this.type = value; } /** * Width of this column in characters (hint only). - * */ @JsonProperty("width") - public Integer getWidth() { - return width; - } - - /** - * Width of this column in characters (hint only). - * - */ + public Long getWidth() { return width; } @JsonProperty("width") - public void setWidth(Integer width) { - this.width = width; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ColumnDescriptor.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("attributeName"); - sb.append('='); - sb.append(((this.attributeName == null)?"":this.attributeName)); - sb.append(','); - sb.append("label"); - sb.append('='); - sb.append(((this.label == null)?"":this.label)); - sb.append(','); - sb.append("format"); - sb.append('='); - sb.append(((this.format == null)?"":this.format)); - sb.append(','); - sb.append("type"); - sb.append('='); - sb.append(((this.type == null)?"":this.type)); - sb.append(','); - sb.append("width"); - sb.append('='); - sb.append(((this.width == null)?"":this.width)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); - result = ((result* 31)+((this.width == null)? 0 :this.width.hashCode())); - result = ((result* 31)+((this.attributeName == null)? 0 :this.attributeName.hashCode())); - result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ColumnDescriptor) == false) { - return false; - } - ColumnDescriptor rhs = ((ColumnDescriptor) other); - return (((((((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format)))&&((this.width == rhs.width)||((this.width!= null)&&this.width.equals(rhs.width))))&&((this.attributeName == rhs.attributeName)||((this.attributeName!= null)&&this.attributeName.equals(rhs.attributeName))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type)))); - } - - - /** - * Datatype of values in this column. Defaults to `string` if not specified. - * - */ - @Generated("jsonschema2pojo") - public enum Type { - - STRING("string"), - NUMBER("number"), - BOOLEAN("boolean"), - UNIX_TIMESTAMP_UTC("unixTimestampUTC"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (Type c: values()) { - CONSTANTS.put(c.value, c); - } - } - - Type(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static Type fromValue(String value) { - Type constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + public void setWidth(Long value) { this.width = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItem.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItem.java index f4f7de8..6522131 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItem.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItem.java @@ -1,421 +1,104 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - +import com.fasterxml.jackson.annotation.*; /** * `CompletionItems` are the suggestions returned from the `completions` request. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "label", - "text", - "sortText", - "detail", - "type", - "start", - "length", - "selectionStart", - "selectionLength" -}) -@Generated("jsonschema2pojo") public class CompletionItem { - - /** - * The label of this completion item. By default this is also the text that is inserted when selecting this completion. - * (Required) - * - */ - @JsonProperty("label") - @JsonPropertyDescription("The label of this completion item. By default this is also the text that is inserted when selecting this completion.") + private String detail; private String label; - /** - * If text is returned and not an empty string, then it is inserted instead of the label. - * - */ - @JsonProperty("text") - @JsonPropertyDescription("If text is returned and not an empty string, then it is inserted instead of the label.") - private String text; - /** - * A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead. - * - */ - @JsonProperty("sortText") - @JsonPropertyDescription("A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead.") + private Long length; + private Long selectionLength; + private Long selectionStart; private String sortText; - /** - * A human-readable string with additional information about this item, like type or symbol information. - * - */ - @JsonProperty("detail") - @JsonPropertyDescription("A human-readable string with additional information about this item, like type or symbol information.") - private String detail; - /** - * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. - * - */ - @JsonProperty("type") - @JsonPropertyDescription("Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.") + private Long start; + private String text; private CompletionItemType type; - /** - * Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request. - * - */ - @JsonProperty("start") - @JsonPropertyDescription("Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request.") - private Integer start; - /** - * Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted. - * - */ - @JsonProperty("length") - @JsonPropertyDescription("Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted.") - private Integer length; - /** - * Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text. - * - */ - @JsonProperty("selectionStart") - @JsonPropertyDescription("Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text.") - private Integer selectionStart; - /** - * Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0. - * - */ - @JsonProperty("selectionLength") - @JsonPropertyDescription("Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0.") - private Integer selectionLength; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The label of this completion item. By default this is also the text that is inserted when selecting this completion. - * (Required) - * - */ - @JsonProperty("label") - public String getLabel() { - return label; - } - - /** - * The label of this completion item. By default this is also the text that is inserted when selecting this completion. - * (Required) - * - */ - @JsonProperty("label") - public void setLabel(String label) { - this.label = label; - } - - /** - * If text is returned and not an empty string, then it is inserted instead of the label. - * - */ - @JsonProperty("text") - public String getText() { - return text; - } - - /** - * If text is returned and not an empty string, then it is inserted instead of the label. - * - */ - @JsonProperty("text") - public void setText(String text) { - this.text = text; - } - - /** - * A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead. - * - */ - @JsonProperty("sortText") - public String getSortText() { - return sortText; - } /** - * A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead. - * - */ - @JsonProperty("sortText") - public void setSortText(String sortText) { - this.sortText = sortText; - } - - /** - * A human-readable string with additional information about this item, like type or symbol information. - * + * A human-readable string with additional information about this item, like type or symbol + * information. */ @JsonProperty("detail") - public String getDetail() { - return detail; - } - - /** - * A human-readable string with additional information about this item, like type or symbol information. - * - */ + public String getDetail() { return detail; } @JsonProperty("detail") - public void setDetail(String detail) { - this.detail = detail; - } - - /** - * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. - * - */ - @JsonProperty("type") - public CompletionItemType getType() { - return type; - } - - /** - * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. - * - */ - @JsonProperty("type") - public void setType(CompletionItemType type) { - this.type = type; - } - - /** - * Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request. - * - */ - @JsonProperty("start") - public Integer getStart() { - return start; - } + public void setDetail(String value) { this.detail = value; } /** - * Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request. - * + * The label of this completion item. By default this is also the text that is inserted when + * selecting this completion. */ - @JsonProperty("start") - public void setStart(Integer start) { - this.start = start; - } + @JsonProperty("label") + public String getLabel() { return label; } + @JsonProperty("label") + public void setLabel(String value) { this.label = value; } /** - * Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted. - * + * Length determines how many characters are overwritten by the completion text and it is + * measured in UTF-16 code units. If missing the value 0 is assumed which results in the + * completion text being inserted. */ @JsonProperty("length") - public Integer getLength() { - return length; - } + public Long getLength() { return length; } + @JsonProperty("length") + public void setLength(Long value) { this.length = value; } /** - * Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted. - * + * Determines the length of the new selection after the text has been inserted (or replaced) + * and it is measured in UTF-16 code units. The selection can not extend beyond the bounds + * of the completion text. If omitted the length is assumed to be 0. */ - @JsonProperty("length") - public void setLength(Integer length) { - this.length = length; - } + @JsonProperty("selectionLength") + public Long getSelectionLength() { return selectionLength; } + @JsonProperty("selectionLength") + public void setSelectionLength(Long value) { this.selectionLength = value; } /** - * Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text. - * + * Determines the start of the new selection after the text has been inserted (or replaced). + * `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length + * of the completion text. If omitted the selection starts at the end of the completion text. */ @JsonProperty("selectionStart") - public Integer getSelectionStart() { - return selectionStart; - } + public Long getSelectionStart() { return selectionStart; } + @JsonProperty("selectionStart") + public void setSelectionStart(Long value) { this.selectionStart = value; } /** - * Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text. - * + * A string that should be used when comparing this item with other items. If not returned + * or an empty string, the `label` is used instead. */ - @JsonProperty("selectionStart") - public void setSelectionStart(Integer selectionStart) { - this.selectionStart = selectionStart; - } + @JsonProperty("sortText") + public String getSortText() { return sortText; } + @JsonProperty("sortText") + public void setSortText(String value) { this.sortText = value; } /** - * Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0. - * + * Start position (within the `text` attribute of the `completions` request) where the + * completion text is added. The position is measured in UTF-16 code units and the client + * capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start + * position is omitted the text is added at the location specified by the `column` attribute + * of the `completions` request. */ - @JsonProperty("selectionLength") - public Integer getSelectionLength() { - return selectionLength; - } + @JsonProperty("start") + public Long getStart() { return start; } + @JsonProperty("start") + public void setStart(Long value) { this.start = value; } /** - * Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0. - * + * If text is returned and not an empty string, then it is inserted instead of the label. */ - @JsonProperty("selectionLength") - public void setSelectionLength(Integer selectionLength) { - this.selectionLength = selectionLength; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(CompletionItem.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("label"); - sb.append('='); - sb.append(((this.label == null)?"":this.label)); - sb.append(','); - sb.append("text"); - sb.append('='); - sb.append(((this.text == null)?"":this.text)); - sb.append(','); - sb.append("sortText"); - sb.append('='); - sb.append(((this.sortText == null)?"":this.sortText)); - sb.append(','); - sb.append("detail"); - sb.append('='); - sb.append(((this.detail == null)?"":this.detail)); - sb.append(','); - sb.append("type"); - sb.append('='); - sb.append(((this.type == null)?"":this.type)); - sb.append(','); - sb.append("start"); - sb.append('='); - sb.append(((this.start == null)?"":this.start)); - sb.append(','); - sb.append("length"); - sb.append('='); - sb.append(((this.length == null)?"":this.length)); - sb.append(','); - sb.append("selectionStart"); - sb.append('='); - sb.append(((this.selectionStart == null)?"":this.selectionStart)); - sb.append(','); - sb.append("selectionLength"); - sb.append('='); - sb.append(((this.selectionLength == null)?"":this.selectionLength)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.selectionStart == null)? 0 :this.selectionStart.hashCode())); - result = ((result* 31)+((this.sortText == null)? 0 :this.sortText.hashCode())); - result = ((result* 31)+((this.start == null)? 0 :this.start.hashCode())); - result = ((result* 31)+((this.length == null)? 0 :this.length.hashCode())); - result = ((result* 31)+((this.selectionLength == null)? 0 :this.selectionLength.hashCode())); - result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); - result = ((result* 31)+((this.text == null)? 0 :this.text.hashCode())); - result = ((result* 31)+((this.detail == null)? 0 :this.detail.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof CompletionItem) == false) { - return false; - } - CompletionItem rhs = ((CompletionItem) other); - return (((((((((((this.selectionStart == rhs.selectionStart)||((this.selectionStart!= null)&&this.selectionStart.equals(rhs.selectionStart)))&&((this.sortText == rhs.sortText)||((this.sortText!= null)&&this.sortText.equals(rhs.sortText))))&&((this.start == rhs.start)||((this.start!= null)&&this.start.equals(rhs.start))))&&((this.length == rhs.length)||((this.length!= null)&&this.length.equals(rhs.length))))&&((this.selectionLength == rhs.selectionLength)||((this.selectionLength!= null)&&this.selectionLength.equals(rhs.selectionLength))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.text == rhs.text)||((this.text!= null)&&this.text.equals(rhs.text))))&&((this.detail == rhs.detail)||((this.detail!= null)&&this.detail.equals(rhs.detail))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type)))); - } - + @JsonProperty("text") + public String getText() { return text; } + @JsonProperty("text") + public void setText(String value) { this.text = value; } /** - * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. - * + * The item's type. Typically the client uses this information to render the item in the UI + * with an icon. */ - @Generated("jsonschema2pojo") - public enum CompletionItemType { - - METHOD("method"), - FUNCTION("function"), - CONSTRUCTOR("constructor"), - FIELD("field"), - VARIABLE("variable"), - CLASS("class"), - INTERFACE("interface"), - MODULE("module"), - PROPERTY("property"), - UNIT("unit"), - VALUE("value"), - ENUM("enum"), - KEYWORD("keyword"), - SNIPPET("snippet"), - TEXT("text"), - COLOR("color"), - FILE("file"), - REFERENCE("reference"), - CUSTOMCOLOR("customcolor"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (CompletionItemType c: values()) { - CONSTANTS.put(c.value, c); - } - } - - CompletionItemType(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static CompletionItemType fromValue(String value) { - CompletionItemType constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + @JsonProperty("type") + public CompletionItemType getType() { return type; } + @JsonProperty("type") + public void setType(CompletionItemType value) { this.type = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItemType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItemType.java new file mode 100644 index 0000000..17c9119 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionItemType.java @@ -0,0 +1,65 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * The item's type. Typically the client uses this information to render the item in the UI + * with an icon. + * + * Some predefined types for the CompletionItem. Please note that not all clients have + * specific icons for all of them. + */ +public enum CompletionItemType { + CLASS, COLOR, CONSTRUCTOR, CUSTOMCOLOR, ENUM, FIELD, FILE, FUNCTION, INTERFACE, KEYWORD, METHOD, MODULE, PROPERTY, REFERENCE, SNIPPET, TEXT, UNIT, VALUE, VARIABLE; + + @JsonValue + public String toValue() { + switch (this) { + case CLASS: return "class"; + case COLOR: return "color"; + case CONSTRUCTOR: return "constructor"; + case CUSTOMCOLOR: return "customcolor"; + case ENUM: return "enum"; + case FIELD: return "field"; + case FILE: return "file"; + case FUNCTION: return "function"; + case INTERFACE: return "interface"; + case KEYWORD: return "keyword"; + case METHOD: return "method"; + case MODULE: return "module"; + case PROPERTY: return "property"; + case REFERENCE: return "reference"; + case SNIPPET: return "snippet"; + case TEXT: return "text"; + case UNIT: return "unit"; + case VALUE: return "value"; + case VARIABLE: return "variable"; + } + return null; + } + + @JsonCreator + public static CompletionItemType forValue(String value) throws IOException { + if (value.equals("class")) return CLASS; + if (value.equals("color")) return COLOR; + if (value.equals("constructor")) return CONSTRUCTOR; + if (value.equals("customcolor")) return CUSTOMCOLOR; + if (value.equals("enum")) return ENUM; + if (value.equals("field")) return FIELD; + if (value.equals("file")) return FILE; + if (value.equals("function")) return FUNCTION; + if (value.equals("interface")) return INTERFACE; + if (value.equals("keyword")) return KEYWORD; + if (value.equals("method")) return METHOD; + if (value.equals("module")) return MODULE; + if (value.equals("property")) return PROPERTY; + if (value.equals("reference")) return REFERENCE; + if (value.equals("snippet")) return SNIPPET; + if (value.equals("text")) return TEXT; + if (value.equals("unit")) return UNIT; + if (value.equals("value")) return VALUE; + if (value.equals("variable")) return VARIABLE; + throw new IOException("Cannot deserialize CompletionItemType"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArguments.java deleted file mode 100644 index cb1f434..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArguments.java +++ /dev/null @@ -1,204 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `completions` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "frameId", - "text", - "column", - "line" -}) -@Generated("jsonschema2pojo") -public class CompletionsArguments { - - /** - * Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. - * - */ - @JsonProperty("frameId") - @JsonPropertyDescription("Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope.") - private Integer frameId; - /** - * One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion. - * (Required) - * - */ - @JsonProperty("text") - @JsonPropertyDescription("One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion.") - private String text; - /** - * The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * (Required) - * - */ - @JsonProperty("column") - @JsonPropertyDescription("The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer column; - /** - * A line for which to determine the completion proposals. If missing the first line of the text is assumed. - * - */ - @JsonProperty("line") - @JsonPropertyDescription("A line for which to determine the completion proposals. If missing the first line of the text is assumed.") - private Integer line; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. - * - */ - @JsonProperty("frameId") - public Integer getFrameId() { - return frameId; - } - - /** - * Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. - * - */ - @JsonProperty("frameId") - public void setFrameId(Integer frameId) { - this.frameId = frameId; - } - - /** - * One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion. - * (Required) - * - */ - @JsonProperty("text") - public String getText() { - return text; - } - - /** - * One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion. - * (Required) - * - */ - @JsonProperty("text") - public void setText(String text) { - this.text = text; - } - - /** - * The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * (Required) - * - */ - @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * (Required) - * - */ - @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } - - /** - * A line for which to determine the completion proposals. If missing the first line of the text is assumed. - * - */ - @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * A line for which to determine the completion proposals. If missing the first line of the text is assumed. - * - */ - @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(CompletionsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("frameId"); - sb.append('='); - sb.append(((this.frameId == null)?"":this.frameId)); - sb.append(','); - sb.append("text"); - sb.append('='); - sb.append(((this.text == null)?"":this.text)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.text == null)? 0 :this.text.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof CompletionsArguments) == false) { - return false; - } - CompletionsArguments rhs = ((CompletionsArguments) other); - return ((((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.text == rhs.text)||((this.text!= null)&&this.text.equals(rhs.text))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArgumentsClass.java new file mode 100644 index 0000000..4b2ee1e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsArgumentsClass.java @@ -0,0 +1,50 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `completions` request. + */ +public class CompletionsArgumentsClass { + private long column; + private Long frameID; + private Long line; + private String text; + + /** + * The position within `text` for which to determine the completion proposals. It is + * measured in UTF-16 code units and the client capability `columnsStartAt1` determines + * whether it is 0- or 1-based. + */ + @JsonProperty("column") + public long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(long value) { this.column = value; } + + /** + * Returns completions in the scope of this stack frame. If not specified, the completions + * are returned for the global scope. + */ + @JsonProperty("frameId") + public Long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(Long value) { this.frameID = value; } + + /** + * A line for which to determine the completion proposals. If missing the first line of the + * text is assumed. + */ + @JsonProperty("line") + public Long getLine() { return line; } + @JsonProperty("line") + public void setLine(Long value) { this.line = value; } + + /** + * One or more source lines. Typically this is the text users have typed into the debug + * console before they asked for completion. + */ + @JsonProperty("text") + public String getText() { return text; } + @JsonProperty("text") + public void setText(String value) { this.text = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestArguments.java new file mode 100644 index 0000000..cf5fcab --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestArguments.java @@ -0,0 +1,50 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `completions` request. + */ +public class CompletionsRequestArguments { + private long column; + private Long frameID; + private Long line; + private String text; + + /** + * The position within `text` for which to determine the completion proposals. It is + * measured in UTF-16 code units and the client capability `columnsStartAt1` determines + * whether it is 0- or 1-based. + */ + @JsonProperty("column") + public long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(long value) { this.column = value; } + + /** + * Returns completions in the scope of this stack frame. If not specified, the completions + * are returned for the global scope. + */ + @JsonProperty("frameId") + public Long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(Long value) { this.frameID = value; } + + /** + * A line for which to determine the completion proposals. If missing the first line of the + * text is assumed. + */ + @JsonProperty("line") + public Long getLine() { return line; } + @JsonProperty("line") + public void setLine(Long value) { this.line = value; } + + /** + * One or more source lines. Typically this is the text users have typed into the debug + * console before they asked for completion. + */ + @JsonProperty("text") + public String getText() { return text; } + @JsonProperty("text") + public void setText(String value) { this.text = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestClass.java new file mode 100644 index 0000000..fc6447f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestClass.java @@ -0,0 +1,56 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Returns a list of possible completions for a given caret position and text. + * Clients should only call this request if the corresponding capability + * `supportsCompletionsRequest` is true. + */ +public class CompletionsRequestClass { + private long seq; + private AttachRequestType type; + private CompletionsRequestArguments arguments; + private CompletionsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public CompletionsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(CompletionsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public CompletionsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(CompletionsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestCommand.java new file mode 100644 index 0000000..7b5bdb5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum CompletionsRequestCommand { + COMPLETIONS; + + @JsonValue + public String toValue() { + switch (this) { + case COMPLETIONS: return "completions"; + } + return null; + } + + @JsonCreator + public static CompletionsRequestCommand forValue(String value) throws IOException { + if (value.equals("completions")) return COMPLETIONS; + throw new IOException("Cannot deserialize CompletionsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsResponseBody.java new file mode 100644 index 0000000..c3fd1db --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class CompletionsResponseBody { + private CompletionItem[] targets; + + /** + * The possible completions for . + */ + @JsonProperty("targets") + public CompletionItem[] getTargets() { return targets; } + @JsonProperty("targets") + public void setTargets(CompletionItem[] value) { this.targets = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsResponseClass.java new file mode 100644 index 0000000..12e7a15 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/CompletionsResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `completions` request. + */ +public class CompletionsResponseClass { + private long seq; + private AttachResponseType type; + private CompletionsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public CompletionsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(CompletionsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Configuration.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Configuration.java deleted file mode 100644 index 9eba30a..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Configuration.java +++ /dev/null @@ -1,73 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - -}) -@Generated("jsonschema2pojo") -public class Configuration { - - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Configuration.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Configuration) == false) { - return false; - } - Configuration rhs = ((Configuration) other); - return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneArguments.java deleted file mode 100644 index d246517..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneArguments.java +++ /dev/null @@ -1,73 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `configurationDone` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - -}) -@Generated("jsonschema2pojo") -public class ConfigurationDoneArguments { - - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ConfigurationDoneArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ConfigurationDoneArguments) == false) { - return false; - } - ConfigurationDoneArguments rhs = ((ConfigurationDoneArguments) other); - return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestClass.java new file mode 100644 index 0000000..caf80b4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestClass.java @@ -0,0 +1,60 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; +import java.util.Map; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * This request indicates that the client has finished initialization of the debug adapter. + * So it is the last request in the sequence of configuration requests (which was started by + * the `initialized` event). + * Clients should only call this request if the corresponding capability + * `supportsConfigurationDoneRequest` is true. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ConfigurationDoneRequestClass implements DAPRequest { + private long seq; + private String type = "request"; + private Map arguments; + private String command = "configurationDone"; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public Map getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(Map value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestCommand.java new file mode 100644 index 0000000..0fbdf2b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ConfigurationDoneRequestCommand { + CONFIGURATION_DONE; + + @JsonValue + public String toValue() { + switch (this) { + case CONFIGURATION_DONE: return "configurationDone"; + } + return null; + } + + @JsonCreator + public static ConfigurationDoneRequestCommand forValue(String value) throws IOException { + if (value.equals("configurationDone")) return CONFIGURATION_DONE; + throw new IOException("Cannot deserialize ConfigurationDoneRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneResponseClass.java new file mode 100644 index 0000000..e3c587a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `configurationDone` request. This is just an acknowledgement, so no body + * field is required. + */ +public class ConfigurationDoneResponseClass implements DAPResponse { + private long seq; + private String type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArguments.java deleted file mode 100644 index fcfc621..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArguments.java +++ /dev/null @@ -1,139 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `continue` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId", - "singleThread" -}) -@Generated("jsonschema2pojo") -public class ContinueArguments { - - /** - * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed. - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed.") - private Integer threadId; - /** - * If this flag is true, execution is resumed only for the thread with given `threadId`. - * - */ - @JsonProperty("singleThread") - @JsonPropertyDescription("If this flag is true, execution is resumed only for the thread with given `threadId`.") - private Boolean singleThread; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed. - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed. - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - /** - * If this flag is true, execution is resumed only for the thread with given `threadId`. - * - */ - @JsonProperty("singleThread") - public Boolean getSingleThread() { - return singleThread; - } - - /** - * If this flag is true, execution is resumed only for the thread with given `threadId`. - * - */ - @JsonProperty("singleThread") - public void setSingleThread(Boolean singleThread) { - this.singleThread = singleThread; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ContinueArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("singleThread"); - sb.append('='); - sb.append(((this.singleThread == null)?"":this.singleThread)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ContinueArguments) == false) { - return false; - } - ContinueArguments rhs = ((ContinueArguments) other); - return ((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArgumentsClass.java new file mode 100644 index 0000000..30dc693 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueArgumentsClass.java @@ -0,0 +1,29 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `continue` request. + */ +public class ContinueArgumentsClass { + private Boolean singleThread; + private long threadID; + + /** + * If this flag is true, execution is resumed only for the thread with given `threadId`. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see + * `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only + * the thread with this ID is resumed. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestArguments.java new file mode 100644 index 0000000..5da8af9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestArguments.java @@ -0,0 +1,29 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `continue` request. + */ +public class ContinueRequestArguments { + private Boolean singleThread; + private long threadID; + + /** + * If this flag is true, execution is resumed only for the thread with given `threadId`. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see + * `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only + * the thread with this ID is resumed. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java new file mode 100644 index 0000000..44f7d79 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request resumes execution of all threads. If the debug adapter supports single thread + * execution (see capability `supportsSingleThreadExecutionRequests`), setting the + * `singleThread` argument to true resumes only the specified thread. If not all threads + * were resumed, the `allThreadsContinued` attribute of the response should be set to false. + */ +public class ContinueRequestClass { + private long seq; + private AttachRequestType type; + private ContinueRequestArguments arguments; + private ContinueRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public ContinueRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(ContinueRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public ContinueRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(ContinueRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestCommand.java new file mode 100644 index 0000000..8efdf0c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ContinueRequestCommand { + CONTINUE; + + @JsonValue + public String toValue() { + switch (this) { + case CONTINUE: return "continue"; + } + return null; + } + + @JsonCreator + public static ContinueRequestCommand forValue(String value) throws IOException { + if (value.equals("continue")) return CONTINUE; + throw new IOException("Cannot deserialize ContinueRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseBody.java new file mode 100644 index 0000000..f0175f8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseBody.java @@ -0,0 +1,16 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ContinueResponseBody { + private Boolean allThreadsContinued; + + /** + * The value true (or a missing property) signals to the client that all threads have been + * resumed. The value false indicates that not all threads were resumed. + */ + @JsonProperty("allThreadsContinued") + public Boolean getAllThreadsContinued() { return allThreadsContinued; } + @JsonProperty("allThreadsContinued") + public void setAllThreadsContinued(Boolean value) { this.allThreadsContinued = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java new file mode 100644 index 0000000..618f321 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `continue` request. + */ +public class ContinueResponseClass { + private long seq; + private AttachResponseType type; + private ContinueResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public ContinueResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ContinueResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventBody.java new file mode 100644 index 0000000..102e544 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventBody.java @@ -0,0 +1,25 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ContinuedEventBody { + private Boolean allThreadsContinued; + private long threadID; + + /** + * If `allThreadsContinued` is true, a debug adapter can announce that all threads have + * continued. + */ + @JsonProperty("allThreadsContinued") + public Boolean getAllThreadsContinued() { return allThreadsContinued; } + @JsonProperty("allThreadsContinued") + public void setAllThreadsContinued(Boolean value) { this.allThreadsContinued = value; } + + /** + * The thread which was continued. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java new file mode 100644 index 0000000..4ab770d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java @@ -0,0 +1,58 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that the execution of the debuggee has continued. + * Please note: a debug adapter is not expected to send this event in response to a request + * that implies that execution continues, e.g. `launch` or `continue`. + * It is only necessary to send a `continued` event if there was no previous request that + * implied this. + */ +public class ContinuedEventClass { + private long seq; + private BreakpointEventType type; + private ContinuedEventBody body; + private ContinuedEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public ContinuedEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ContinuedEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public ContinuedEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(ContinuedEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventEvent.java new file mode 100644 index 0000000..3681211 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ContinuedEventEvent { + CONTINUED; + + @JsonValue + public String toValue() { + switch (this) { + case CONTINUED: return "continued"; + } + return null; + } + + @JsonCreator + public static ContinuedEventEvent forValue(String value) throws IOException { + if (value.equals("continued")) return CONTINUED; + throw new IOException("Cannot deserialize ContinuedEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Converter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Converter.java new file mode 100644 index 0000000..c5e349b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Converter.java @@ -0,0 +1,100 @@ +// To use this code, add the following Maven dependency to your project: +// +// +// com.fasterxml.jackson.core : jackson-databind : 2.9.0 +// com.fasterxml.jackson.datatype : jackson-datatype-jsr310 : 2.9.0 +// +// Import this package: +// +// import org.tzi.use.monitor.adapter.python.dap.Converter; +// +// Then you can deserialize a JSON string with +// +// WrapperRoot data = Converter.fromJsonString(jsonString); + +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; + +import java.time.OffsetDateTime; +import java.time.OffsetTime; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.temporal.ChronoField; + +public class Converter { + // Date-time helpers + + private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder() + .appendOptional(DateTimeFormatter.ISO_DATE_TIME) + .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME) + .appendOptional(DateTimeFormatter.ISO_INSTANT) + .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX")) + .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX")) + .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + .toFormatter() + .withZone(ZoneOffset.UTC); + + public static OffsetDateTime parseDateTimeString(String str) { + return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime(); + } + + private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder() + .appendOptional(DateTimeFormatter.ISO_TIME) + .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME) + .parseDefaulting(ChronoField.YEAR, 2020) + .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1) + .parseDefaulting(ChronoField.DAY_OF_MONTH, 1) + .toFormatter() + .withZone(ZoneOffset.UTC); + + public static OffsetTime parseTimeString(String str) { + return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime(); + } + // Serialize/deserialize helpers + + public static WrapperRoot fromJsonString(String json) throws IOException { + return getObjectReader().readValue(json); + } + + public static String toJsonString(WrapperRoot obj) throws JsonProcessingException { + return getObjectWriter().writeValueAsString(obj); + } + + private static ObjectReader reader; + private static ObjectWriter writer; + + private static void instantiateMapper() { + ObjectMapper mapper = new ObjectMapper(); + mapper.findAndRegisterModules(); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); + SimpleModule module = new SimpleModule(); + module.addDeserializer(OffsetDateTime.class, new JsonDeserializer() { + @Override + public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { + String value = jsonParser.getText(); + return Converter.parseDateTimeString(value); + } + }); + mapper.registerModule(module); + reader = mapper.readerFor(WrapperRoot.class); + writer = mapper.writerFor(WrapperRoot.class); + } + + private static ObjectReader getObjectReader() { + if (reader == null) instantiateMapper(); + return reader; + } + + private static ObjectWriter getObjectWriter() { + if (writer == null) instantiateMapper(); + return writer; + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java index f79c800..9d2cd9b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java @@ -1,4 +1,4 @@ package org.tzi.use.monitor.adapter.python.dap; -public interface DAPEvent { +public interface DAPEvent extends DAPMessage { } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPMessage.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPMessage.java new file mode 100644 index 0000000..0a46ed5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPMessage.java @@ -0,0 +1,4 @@ +package org.tzi.use.monitor.adapter.python.dap; + +public interface DAPMessage { +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java index 9988b7c..b93c350 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java @@ -1,4 +1,4 @@ package org.tzi.use.monitor.adapter.python.dap; -public interface DAPRequest { +public interface DAPRequest extends DAPMessage { } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java index 273899e..b1f7424 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java @@ -1,5 +1,4 @@ package org.tzi.use.monitor.adapter.python.dap; -public interface DAPResponse { - int getRequestSequence(); +public interface DAPResponse extends DAPMessage { } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpoint.java index 8db7d1d..648d4d6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpoint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpoint.java @@ -1,253 +1,46 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - +import com.fasterxml.jackson.annotation.*; /** * Properties of a data breakpoint passed to the `setDataBreakpoints` request. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "dataId", - "accessType", - "condition", - "hitCondition" -}) -@Generated("jsonschema2pojo") public class DataBreakpoint { - - /** - * An id representing the data. This id is returned from the `dataBreakpointInfo` request. - * (Required) - * - */ - @JsonProperty("dataId") - @JsonPropertyDescription("An id representing the data. This id is returned from the `dataBreakpointInfo` request.") - private String dataId; - /** - * This enumeration defines all possible access types for data breakpoints. - * - */ - @JsonProperty("accessType") - @JsonPropertyDescription("This enumeration defines all possible access types for data breakpoints.") private DataBreakpointAccessType accessType; - /** - * An expression for conditional breakpoints. - * - */ - @JsonProperty("condition") - @JsonPropertyDescription("An expression for conditional breakpoints.") private String condition; - /** - * An expression that controls how many hits of the breakpoint are ignored. - * The debug adapter is expected to interpret the expression as needed. - * - */ - @JsonProperty("hitCondition") - @JsonPropertyDescription("An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.") + private String dataID; private String hitCondition; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); /** - * An id representing the data. This id is returned from the `dataBreakpointInfo` request. - * (Required) - * - */ - @JsonProperty("dataId") - public String getDataId() { - return dataId; - } - - /** - * An id representing the data. This id is returned from the `dataBreakpointInfo` request. - * (Required) - * - */ - @JsonProperty("dataId") - public void setDataId(String dataId) { - this.dataId = dataId; - } - - /** - * This enumeration defines all possible access types for data breakpoints. - * + * The access type of the data. */ @JsonProperty("accessType") - public DataBreakpointAccessType getAccessType() { - return accessType; - } - - /** - * This enumeration defines all possible access types for data breakpoints. - * - */ + public DataBreakpointAccessType getAccessType() { return accessType; } @JsonProperty("accessType") - public void setAccessType(DataBreakpointAccessType accessType) { - this.accessType = accessType; - } + public void setAccessType(DataBreakpointAccessType value) { this.accessType = value; } /** * An expression for conditional breakpoints. - * */ @JsonProperty("condition") - public String getCondition() { - return condition; - } - - /** - * An expression for conditional breakpoints. - * - */ + public String getCondition() { return condition; } @JsonProperty("condition") - public void setCondition(String condition) { - this.condition = condition; - } + public void setCondition(String value) { this.condition = value; } /** - * An expression that controls how many hits of the breakpoint are ignored. - * The debug adapter is expected to interpret the expression as needed. - * + * An id representing the data. This id is returned from the `dataBreakpointInfo` request. */ - @JsonProperty("hitCondition") - public String getHitCondition() { - return hitCondition; - } + @JsonProperty("dataId") + public String getDataID() { return dataID; } + @JsonProperty("dataId") + public void setDataID(String value) { this.dataID = value; } /** * An expression that controls how many hits of the breakpoint are ignored. * The debug adapter is expected to interpret the expression as needed. - * */ @JsonProperty("hitCondition") - public void setHitCondition(String hitCondition) { - this.hitCondition = hitCondition; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DataBreakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("dataId"); - sb.append('='); - sb.append(((this.dataId == null)?"":this.dataId)); - sb.append(','); - sb.append("accessType"); - sb.append('='); - sb.append(((this.accessType == null)?"":this.accessType)); - sb.append(','); - sb.append("condition"); - sb.append('='); - sb.append(((this.condition == null)?"":this.condition)); - sb.append(','); - sb.append("hitCondition"); - sb.append('='); - sb.append(((this.hitCondition == null)?"":this.hitCondition)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.accessType == null)? 0 :this.accessType.hashCode())); - result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); - result = ((result* 31)+((this.hitCondition == null)? 0 :this.hitCondition.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.dataId == null)? 0 :this.dataId.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof DataBreakpoint) == false) { - return false; - } - DataBreakpoint rhs = ((DataBreakpoint) other); - return ((((((this.accessType == rhs.accessType)||((this.accessType!= null)&&this.accessType.equals(rhs.accessType)))&&((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition))))&&((this.hitCondition == rhs.hitCondition)||((this.hitCondition!= null)&&this.hitCondition.equals(rhs.hitCondition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.dataId == rhs.dataId)||((this.dataId!= null)&&this.dataId.equals(rhs.dataId)))); - } - - - /** - * This enumeration defines all possible access types for data breakpoints. - * - */ - @Generated("jsonschema2pojo") - public enum DataBreakpointAccessType { - - READ("read"), - WRITE("write"), - READ_WRITE("readWrite"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (DataBreakpointAccessType c: values()) { - CONSTANTS.put(c.value, c); - } - } - - DataBreakpointAccessType(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static DataBreakpointAccessType fromValue(String value) { - DataBreakpointAccessType constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + public String getHitCondition() { return hitCondition; } + @JsonProperty("hitCondition") + public void setHitCondition(String value) { this.hitCondition = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointAccessType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointAccessType.java new file mode 100644 index 0000000..b925d9d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointAccessType.java @@ -0,0 +1,31 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * The access type of the data. + * + * This enumeration defines all possible access types for data breakpoints. + */ +public enum DataBreakpointAccessType { + READ, READ_WRITE, WRITE; + + @JsonValue + public String toValue() { + switch (this) { + case READ: return "read"; + case READ_WRITE: return "readWrite"; + case WRITE: return "write"; + } + return null; + } + + @JsonCreator + public static DataBreakpointAccessType forValue(String value) throws IOException { + if (value.equals("read")) return READ; + if (value.equals("readWrite")) return READ_WRITE; + if (value.equals("write")) return WRITE; + throw new IOException("Cannot deserialize DataBreakpointAccessType"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArguments.java deleted file mode 100644 index bcca4b5..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArguments.java +++ /dev/null @@ -1,173 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `dataBreakpointInfo` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "variablesReference", - "name", - "frameId" -}) -@Generated("jsonschema2pojo") -public class DataBreakpointInfoArguments { - - /** - * Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * - */ - @JsonProperty("variablesReference") - @JsonPropertyDescription("Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") - private Integer variablesReference; - /** - * The name of the variable's child to obtain data breakpoint information for. - * If `variablesReference` isn't specified, this can be an expression. - * (Required) - * - */ - @JsonProperty("name") - @JsonPropertyDescription("The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression.") - private String name; - /** - * When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect. - * - */ - @JsonProperty("frameId") - @JsonPropertyDescription("When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect.") - private Integer frameId; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * - */ - @JsonProperty("variablesReference") - public Integer getVariablesReference() { - return variablesReference; - } - - /** - * Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * - */ - @JsonProperty("variablesReference") - public void setVariablesReference(Integer variablesReference) { - this.variablesReference = variablesReference; - } - - /** - * The name of the variable's child to obtain data breakpoint information for. - * If `variablesReference` isn't specified, this can be an expression. - * (Required) - * - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * The name of the variable's child to obtain data breakpoint information for. - * If `variablesReference` isn't specified, this can be an expression. - * (Required) - * - */ - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect. - * - */ - @JsonProperty("frameId") - public Integer getFrameId() { - return frameId; - } - - /** - * When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect. - * - */ - @JsonProperty("frameId") - public void setFrameId(Integer frameId) { - this.frameId = frameId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DataBreakpointInfoArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("variablesReference"); - sb.append('='); - sb.append(((this.variablesReference == null)?"":this.variablesReference)); - sb.append(','); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("frameId"); - sb.append('='); - sb.append(((this.frameId == null)?"":this.frameId)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); - result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof DataBreakpointInfoArguments) == false) { - return false; - } - DataBreakpointInfoArguments rhs = ((DataBreakpointInfoArguments) other); - return (((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference))))&&((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArgumentsClass.java new file mode 100644 index 0000000..903d663 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoArgumentsClass.java @@ -0,0 +1,41 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `dataBreakpointInfo` request. + */ +public class DataBreakpointInfoArgumentsClass { + private Long frameID; + private String name; + private Long variablesReference; + + /** + * When `name` is an expression, evaluate it in the scope of this stack frame. If not + * specified, the expression is evaluated in the global scope. When `variablesReference` is + * specified, this property has no effect. + */ + @JsonProperty("frameId") + public Long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(Long value) { this.frameID = value; } + + /** + * The name of the variable's child to obtain data breakpoint information for. + * If `variablesReference` isn't specified, this can be an expression. + */ + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } + + /** + * Reference to the variable container if the data breakpoint is requested for a child of + * the container. The `variablesReference` must have been obtained in the current suspended + * state. See 'Lifetime of Object References' in the Overview section for details. + */ + @JsonProperty("variablesReference") + public Long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(Long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestArguments.java new file mode 100644 index 0000000..183fb66 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestArguments.java @@ -0,0 +1,41 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `dataBreakpointInfo` request. + */ +public class DataBreakpointInfoRequestArguments { + private Long frameID; + private String name; + private Long variablesReference; + + /** + * When `name` is an expression, evaluate it in the scope of this stack frame. If not + * specified, the expression is evaluated in the global scope. When `variablesReference` is + * specified, this property has no effect. + */ + @JsonProperty("frameId") + public Long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(Long value) { this.frameID = value; } + + /** + * The name of the variable's child to obtain data breakpoint information for. + * If `variablesReference` isn't specified, this can be an expression. + */ + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } + + /** + * Reference to the variable container if the data breakpoint is requested for a child of + * the container. The `variablesReference` must have been obtained in the current suspended + * state. See 'Lifetime of Object References' in the Overview section for details. + */ + @JsonProperty("variablesReference") + public Long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(Long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestClass.java new file mode 100644 index 0000000..263966b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Obtains information on a possible data breakpoint that could be set on an expression or + * variable. + * Clients should only call this request if the corresponding capability + * `supportsDataBreakpoints` is true. + */ +public class DataBreakpointInfoRequestClass { + private long seq; + private AttachRequestType type; + private DataBreakpointInfoRequestArguments arguments; + private DataBreakpointInfoRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public DataBreakpointInfoRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(DataBreakpointInfoRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public DataBreakpointInfoRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(DataBreakpointInfoRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestCommand.java new file mode 100644 index 0000000..4198d8e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum DataBreakpointInfoRequestCommand { + DATA_BREAKPOINT_INFO; + + @JsonValue + public String toValue() { + switch (this) { + case DATA_BREAKPOINT_INFO: return "dataBreakpointInfo"; + } + return null; + } + + @JsonCreator + public static DataBreakpointInfoRequestCommand forValue(String value) throws IOException { + if (value.equals("dataBreakpointInfo")) return DATA_BREAKPOINT_INFO; + throw new IOException("Cannot deserialize DataBreakpointInfoRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoResponseBody.java new file mode 100644 index 0000000..9abda2f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoResponseBody.java @@ -0,0 +1,49 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class DataBreakpointInfoResponseBody { + private DataBreakpointAccessType[] accessTypes; + private Boolean canPersist; + private String dataID; + private String description; + + /** + * Attribute lists the available access types for a potential data breakpoint. A UI client + * could surface this information. + */ + @JsonProperty("accessTypes") + public DataBreakpointAccessType[] getAccessTypes() { return accessTypes; } + @JsonProperty("accessTypes") + public void setAccessTypes(DataBreakpointAccessType[] value) { this.accessTypes = value; } + + /** + * Attribute indicates that a potential data breakpoint could be persisted across sessions. + */ + @JsonProperty("canPersist") + public Boolean getCanPersist() { return canPersist; } + @JsonProperty("canPersist") + public void setCanPersist(Boolean value) { this.canPersist = value; } + + /** + * An identifier for the data on which a data breakpoint can be registered with the + * `setDataBreakpoints` request or null if no data breakpoint is available. If a + * `variablesReference` or `frameId` is passed, the `dataId` is valid in the current + * suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' + * in the Overview section for details. Breakpoints set using the `dataId` in the + * `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`. + */ + @JsonProperty("dataId") + public String getDataID() { return dataID; } + @JsonProperty("dataId") + public void setDataID(String value) { this.dataID = value; } + + /** + * UI string that describes on what data the breakpoint is set on or why a data breakpoint + * is not available. + */ + @JsonProperty("description") + public String getDescription() { return description; } + @JsonProperty("description") + public void setDescription(String value) { this.description = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoResponseClass.java new file mode 100644 index 0000000..166c87c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DataBreakpointInfoResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `dataBreakpointInfo` request. + */ +public class DataBreakpointInfoResponseClass { + private long seq; + private AttachResponseType type; + private DataBreakpointInfoResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public DataBreakpointInfoResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(DataBreakpointInfoResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DebugProtocol.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DebugProtocol.java deleted file mode 100644 index af054fe..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DebugProtocol.java +++ /dev/null @@ -1,4569 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - - -/** - * Debug Adapter Protocol - *

- * The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "AttachRequest", - "AttachRequestArguments", - "AttachResponse", - "Breakpoint", - "BreakpointEvent", - "BreakpointLocation", - "BreakpointLocationsArguments", - "BreakpointLocationsRequest", - "BreakpointLocationsResponse", - "CancelArguments", - "CancelRequest", - "CancelResponse", - "Capabilities", - "CapabilitiesEvent", - "Checksum", - "ChecksumAlgorithm", - "ColumnDescriptor", - "CompletionItem", - "CompletionItemType", - "CompletionsArguments", - "CompletionsRequest", - "CompletionsResponse", - "ConfigurationDoneArguments", - "ConfigurationDoneRequest", - "ConfigurationDoneResponse", - "ContinueArguments", - "ContinueRequest", - "ContinueResponse", - "ContinuedEvent", - "DataBreakpoint", - "DataBreakpointAccessType", - "DataBreakpointInfoArguments", - "DataBreakpointInfoRequest", - "DataBreakpointInfoResponse", - "DisassembleArguments", - "DisassembleRequest", - "DisassembleResponse", - "DisassembledInstruction", - "DisconnectArguments", - "DisconnectRequest", - "DisconnectResponse", - "ErrorResponse", - "EvaluateArguments", - "EvaluateRequest", - "EvaluateResponse", - "Event", - "ExceptionBreakMode", - "ExceptionBreakpointsFilter", - "ExceptionDetails", - "ExceptionFilterOptions", - "ExceptionInfoArguments", - "ExceptionInfoRequest", - "ExceptionInfoResponse", - "ExceptionOptions", - "ExceptionPathSegment", - "ExitedEvent", - "FunctionBreakpoint", - "GotoArguments", - "GotoRequest", - "GotoResponse", - "GotoTarget", - "GotoTargetsArguments", - "GotoTargetsRequest", - "GotoTargetsResponse", - "InitializeRequest", - "InitializeRequestArguments", - "InitializeResponse", - "InitializedEvent", - "InstructionBreakpoint", - "InvalidatedAreas", - "InvalidatedEvent", - "LaunchRequest", - "LaunchRequestArguments", - "LaunchResponse", - "LoadedSourceEvent", - "LoadedSourcesArguments", - "LoadedSourcesRequest", - "LoadedSourcesResponse", - "MemoryEvent", - "Message", - "Module", - "ModuleEvent", - "ModulesArguments", - "ModulesRequest", - "ModulesResponse", - "NextArguments", - "NextRequest", - "NextResponse", - "OutputEvent", - "PauseArguments", - "PauseRequest", - "PauseResponse", - "ProcessEvent", - "ProgressEndEvent", - "ProgressStartEvent", - "ProgressUpdateEvent", - "ProtocolMessage", - "ReadMemoryArguments", - "ReadMemoryRequest", - "ReadMemoryResponse", - "Request", - "Response", - "RestartArguments", - "RestartFrameArguments", - "RestartFrameRequest", - "RestartFrameResponse", - "RestartRequest", - "RestartResponse", - "ReverseContinueArguments", - "ReverseContinueRequest", - "ReverseContinueResponse", - "RunInTerminalRequest", - "RunInTerminalRequestArguments", - "RunInTerminalResponse", - "Scope", - "ScopesArguments", - "ScopesRequest", - "ScopesResponse", - "SetBreakpointsArguments", - "SetBreakpointsRequest", - "SetBreakpointsResponse", - "SetDataBreakpointsArguments", - "SetDataBreakpointsRequest", - "SetDataBreakpointsResponse", - "SetExceptionBreakpointsArguments", - "SetExceptionBreakpointsRequest", - "SetExceptionBreakpointsResponse", - "SetExpressionArguments", - "SetExpressionRequest", - "SetExpressionResponse", - "SetFunctionBreakpointsArguments", - "SetFunctionBreakpointsRequest", - "SetFunctionBreakpointsResponse", - "SetInstructionBreakpointsArguments", - "SetInstructionBreakpointsRequest", - "SetInstructionBreakpointsResponse", - "SetVariableArguments", - "SetVariableRequest", - "SetVariableResponse", - "Source", - "SourceArguments", - "SourceBreakpoint", - "SourceRequest", - "SourceResponse", - "StackFrame", - "StackFrameFormat", - "StackTraceArguments", - "StackTraceRequest", - "StackTraceResponse", - "StartDebuggingRequest", - "StartDebuggingRequestArguments", - "StartDebuggingResponse", - "StepBackArguments", - "StepBackRequest", - "StepBackResponse", - "StepInArguments", - "StepInRequest", - "StepInResponse", - "StepInTarget", - "StepInTargetsArguments", - "StepInTargetsRequest", - "StepInTargetsResponse", - "StepOutArguments", - "StepOutRequest", - "StepOutResponse", - "SteppingGranularity", - "StoppedEvent", - "TerminateArguments", - "TerminateRequest", - "TerminateResponse", - "TerminateThreadsArguments", - "TerminateThreadsRequest", - "TerminateThreadsResponse", - "TerminatedEvent", - "Thread", - "ThreadEvent", - "ThreadsRequest", - "ThreadsResponse", - "ValueFormat", - "Variable", - "VariablePresentationHint", - "VariablesArguments", - "VariablesRequest", - "VariablesResponse", - "WriteMemoryArguments", - "WriteMemoryRequest", - "WriteMemoryResponse" -}) -@Generated("jsonschema2pojo") -public class DebugProtocol { - - @JsonProperty("AttachRequest") - private Object attachRequest; - /** - * Arguments for `attach` request. Additional attributes are implementation specific. - * - */ - @JsonProperty("AttachRequestArguments") - @JsonPropertyDescription("Arguments for `attach` request. Additional attributes are implementation specific.") - private AttachRequestArguments attachRequestArguments; - @JsonProperty("AttachResponse") - private Object attachResponse; - /** - * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. - * - */ - @JsonProperty("Breakpoint") - @JsonPropertyDescription("Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.") - private Breakpoint breakpoint; - @JsonProperty("BreakpointEvent") - private Object breakpointEvent; - /** - * Properties of a breakpoint location returned from the `breakpointLocations` request. - * - */ - @JsonProperty("BreakpointLocation") - @JsonPropertyDescription("Properties of a breakpoint location returned from the `breakpointLocations` request.") - private BreakpointLocation breakpointLocation; - /** - * Arguments for `breakpointLocations` request. - * - */ - @JsonProperty("BreakpointLocationsArguments") - @JsonPropertyDescription("Arguments for `breakpointLocations` request.") - private BreakpointLocationsArguments breakpointLocationsArguments; - @JsonProperty("BreakpointLocationsRequest") - private Object breakpointLocationsRequest; - @JsonProperty("BreakpointLocationsResponse") - private Object breakpointLocationsResponse; - /** - * Arguments for `cancel` request. - * - */ - @JsonProperty("CancelArguments") - @JsonPropertyDescription("Arguments for `cancel` request.") - private CancelArguments cancelArguments; - @JsonProperty("CancelRequest") - private Object cancelRequest; - @JsonProperty("CancelResponse") - private Object cancelResponse; - /** - * Types - *

- * Information about the capabilities of a debug adapter. - * - */ - @JsonProperty("Capabilities") - @JsonPropertyDescription("Information about the capabilities of a debug adapter.") - private Capabilities capabilities; - @JsonProperty("CapabilitiesEvent") - private Object capabilitiesEvent; - /** - * The checksum of an item calculated by the specified algorithm. - * - */ - @JsonProperty("Checksum") - @JsonPropertyDescription("The checksum of an item calculated by the specified algorithm.") - private Checksum checksum; - /** - * Names of checksum algorithms that may be supported by a debug adapter. - * - */ - @JsonProperty("ChecksumAlgorithm") - @JsonPropertyDescription("Names of checksum algorithms that may be supported by a debug adapter.") - private Checksum.ChecksumAlgorithm checksumAlgorithm; - /** - * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, - * and what the column's label should be. - * It is only used if the underlying UI actually supports this level of customization. - * - */ - @JsonProperty("ColumnDescriptor") - @JsonPropertyDescription("A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.") - private ColumnDescriptor columnDescriptor; - /** - * `CompletionItems` are the suggestions returned from the `completions` request. - * - */ - @JsonProperty("CompletionItem") - @JsonPropertyDescription("`CompletionItems` are the suggestions returned from the `completions` request.") - private CompletionItem completionItem; - /** - * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. - * - */ - @JsonProperty("CompletionItemType") - @JsonPropertyDescription("Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.") - private CompletionItem.CompletionItemType completionItemType; - /** - * Arguments for `completions` request. - * - */ - @JsonProperty("CompletionsArguments") - @JsonPropertyDescription("Arguments for `completions` request.") - private CompletionsArguments completionsArguments; - @JsonProperty("CompletionsRequest") - private Object completionsRequest; - @JsonProperty("CompletionsResponse") - private Object completionsResponse; - /** - * Arguments for `configurationDone` request. - * - */ - @JsonProperty("ConfigurationDoneArguments") - @JsonPropertyDescription("Arguments for `configurationDone` request.") - private ConfigurationDoneArguments configurationDoneArguments; - @JsonProperty("ConfigurationDoneRequest") - private Object configurationDoneRequest; - @JsonProperty("ConfigurationDoneResponse") - private Object configurationDoneResponse; - /** - * Arguments for `continue` request. - * - */ - @JsonProperty("ContinueArguments") - @JsonPropertyDescription("Arguments for `continue` request.") - private ContinueArguments continueArguments; - @JsonProperty("ContinueRequest") - private Object continueRequest; - @JsonProperty("ContinueResponse") - private Object continueResponse; - @JsonProperty("ContinuedEvent") - private Object continuedEvent; - /** - * Properties of a data breakpoint passed to the `setDataBreakpoints` request. - * - */ - @JsonProperty("DataBreakpoint") - @JsonPropertyDescription("Properties of a data breakpoint passed to the `setDataBreakpoints` request.") - private DataBreakpoint dataBreakpoint; - /** - * This enumeration defines all possible access types for data breakpoints. - * - */ - @JsonProperty("DataBreakpointAccessType") - @JsonPropertyDescription("This enumeration defines all possible access types for data breakpoints.") - private DataBreakpoint.DataBreakpointAccessType dataBreakpointAccessType; - /** - * Arguments for `dataBreakpointInfo` request. - * - */ - @JsonProperty("DataBreakpointInfoArguments") - @JsonPropertyDescription("Arguments for `dataBreakpointInfo` request.") - private DataBreakpointInfoArguments dataBreakpointInfoArguments; - @JsonProperty("DataBreakpointInfoRequest") - private Object dataBreakpointInfoRequest; - @JsonProperty("DataBreakpointInfoResponse") - private Object dataBreakpointInfoResponse; - /** - * Arguments for `disassemble` request. - * - */ - @JsonProperty("DisassembleArguments") - @JsonPropertyDescription("Arguments for `disassemble` request.") - private DisassembleArguments disassembleArguments; - @JsonProperty("DisassembleRequest") - private Object disassembleRequest; - @JsonProperty("DisassembleResponse") - private Object disassembleResponse; - /** - * Represents a single disassembled instruction. - * - */ - @JsonProperty("DisassembledInstruction") - @JsonPropertyDescription("Represents a single disassembled instruction.") - private DisassembledInstruction disassembledInstruction; - /** - * Arguments for `disconnect` request. - * - */ - @JsonProperty("DisconnectArguments") - @JsonPropertyDescription("Arguments for `disconnect` request.") - private DisconnectArguments disconnectArguments; - @JsonProperty("DisconnectRequest") - private Object disconnectRequest; - @JsonProperty("DisconnectResponse") - private Object disconnectResponse; - @JsonProperty("ErrorResponse") - private Object errorResponse; - /** - * Arguments for `evaluate` request. - * - */ - @JsonProperty("EvaluateArguments") - @JsonPropertyDescription("Arguments for `evaluate` request.") - private EvaluateArguments evaluateArguments; - @JsonProperty("EvaluateRequest") - private Object evaluateRequest; - @JsonProperty("EvaluateResponse") - private Object evaluateResponse; - @JsonProperty("Event") - private Object event; - /** - * This enumeration defines all possible conditions when a thrown exception should result in a break. - * never: never breaks, - * always: always breaks, - * unhandled: breaks when exception unhandled, - * userUnhandled: breaks if the exception is not handled by user code. - * - */ - @JsonProperty("ExceptionBreakMode") - @JsonPropertyDescription("This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.") - private ExceptionBreakMode exceptionBreakMode; - /** - * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. - * - */ - @JsonProperty("ExceptionBreakpointsFilter") - @JsonPropertyDescription("An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with.") - private ExceptionBreakpointsFilter exceptionBreakpointsFilter; - /** - * Detailed information about an exception that has occurred. - * - */ - @JsonProperty("ExceptionDetails") - @JsonPropertyDescription("Detailed information about an exception that has occurred.") - private ExceptionDetails exceptionDetails; - /** - * An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("ExceptionFilterOptions") - @JsonPropertyDescription("An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.") - private ExceptionFilterOptions exceptionFilterOptions; - /** - * Arguments for `exceptionInfo` request. - * - */ - @JsonProperty("ExceptionInfoArguments") - @JsonPropertyDescription("Arguments for `exceptionInfo` request.") - private ExceptionInfoArguments exceptionInfoArguments; - @JsonProperty("ExceptionInfoRequest") - private Object exceptionInfoRequest; - @JsonProperty("ExceptionInfoResponse") - private Object exceptionInfoResponse; - /** - * An `ExceptionOptions` assigns configuration options to a set of exceptions. - * - */ - @JsonProperty("ExceptionOptions") - @JsonPropertyDescription("An `ExceptionOptions` assigns configuration options to a set of exceptions.") - private ExceptionOptions exceptionOptions; - /** - * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. - * If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. - * - */ - @JsonProperty("ExceptionPathSegment") - @JsonPropertyDescription("An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true.") - private ExceptionPathSegment exceptionPathSegment; - @JsonProperty("ExitedEvent") - private Object exitedEvent; - /** - * Properties of a breakpoint passed to the `setFunctionBreakpoints` request. - * - */ - @JsonProperty("FunctionBreakpoint") - @JsonPropertyDescription("Properties of a breakpoint passed to the `setFunctionBreakpoints` request.") - private FunctionBreakpoint functionBreakpoint; - /** - * Arguments for `goto` request. - * - */ - @JsonProperty("GotoArguments") - @JsonPropertyDescription("Arguments for `goto` request.") - private GotoArguments gotoArguments; - @JsonProperty("GotoRequest") - private Object gotoRequest; - @JsonProperty("GotoResponse") - private Object gotoResponse; - /** - * A `GotoTarget` describes a code location that can be used as a target in the `goto` request. - * The possible goto targets can be determined via the `gotoTargets` request. - * - */ - @JsonProperty("GotoTarget") - @JsonPropertyDescription("A `GotoTarget` describes a code location that can be used as a target in the `goto` request.\nThe possible goto targets can be determined via the `gotoTargets` request.") - private GotoTarget gotoTarget; - /** - * Arguments for `gotoTargets` request. - * - */ - @JsonProperty("GotoTargetsArguments") - @JsonPropertyDescription("Arguments for `gotoTargets` request.") - private GotoTargetsArguments gotoTargetsArguments; - @JsonProperty("GotoTargetsRequest") - private Object gotoTargetsRequest; - @JsonProperty("GotoTargetsResponse") - private Object gotoTargetsResponse; - @JsonProperty("InitializeRequest") - private Object initializeRequest; - /** - * Arguments for `initialize` request. - * - */ - @JsonProperty("InitializeRequestArguments") - @JsonPropertyDescription("Arguments for `initialize` request.") - private InitializeRequestArguments initializeRequestArguments; - @JsonProperty("InitializeResponse") - private Object initializeResponse; - @JsonProperty("InitializedEvent") - private Object initializedEvent; - /** - * Properties of a breakpoint passed to the `setInstructionBreakpoints` request - * - */ - @JsonProperty("InstructionBreakpoint") - @JsonPropertyDescription("Properties of a breakpoint passed to the `setInstructionBreakpoints` request") - private InstructionBreakpoint instructionBreakpoint; - /** - * Logical areas that can be invalidated by the `invalidated` event. - * - */ - @JsonProperty("InvalidatedAreas") - @JsonPropertyDescription("Logical areas that can be invalidated by the `invalidated` event.") - private String invalidatedAreas; - @JsonProperty("InvalidatedEvent") - private Object invalidatedEvent; - @JsonProperty("LaunchRequest") - private Object launchRequest; - /** - * Arguments for `launch` request. Additional attributes are implementation specific. - * - */ - @JsonProperty("LaunchRequestArguments") - @JsonPropertyDescription("Arguments for `launch` request. Additional attributes are implementation specific.") - private LaunchRequestArguments launchRequestArguments; - @JsonProperty("LaunchResponse") - private Object launchResponse; - @JsonProperty("LoadedSourceEvent") - private Object loadedSourceEvent; - /** - * Arguments for `loadedSources` request. - * - */ - @JsonProperty("LoadedSourcesArguments") - @JsonPropertyDescription("Arguments for `loadedSources` request.") - private LoadedSourcesArguments loadedSourcesArguments; - @JsonProperty("LoadedSourcesRequest") - private Object loadedSourcesRequest; - @JsonProperty("LoadedSourcesResponse") - private Object loadedSourcesResponse; - @JsonProperty("MemoryEvent") - private Object memoryEvent; - /** - * A structured message object. Used to return errors from requests. - * - */ - @JsonProperty("Message") - @JsonPropertyDescription("A structured message object. Used to return errors from requests.") - private Message message; - /** - * A Module object represents a row in the modules view. - * The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. - * The `name` attribute is used to minimally render the module in the UI. - * - * Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. - * - * To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. - * - */ - @JsonProperty("Module") - @JsonPropertyDescription("A Module object represents a row in the modules view.\nThe `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting.\nThe `name` attribute is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.") - private Module module; - @JsonProperty("ModuleEvent") - private Object moduleEvent; - /** - * Arguments for `modules` request. - * - */ - @JsonProperty("ModulesArguments") - @JsonPropertyDescription("Arguments for `modules` request.") - private ModulesArguments modulesArguments; - @JsonProperty("ModulesRequest") - private Object modulesRequest; - @JsonProperty("ModulesResponse") - private Object modulesResponse; - /** - * Arguments for `next` request. - * - */ - @JsonProperty("NextArguments") - @JsonPropertyDescription("Arguments for `next` request.") - private NextArguments nextArguments; - @JsonProperty("NextRequest") - private Object nextRequest; - @JsonProperty("NextResponse") - private Object nextResponse; - @JsonProperty("OutputEvent") - private Object outputEvent; - /** - * Arguments for `pause` request. - * - */ - @JsonProperty("PauseArguments") - @JsonPropertyDescription("Arguments for `pause` request.") - private PauseArguments pauseArguments; - @JsonProperty("PauseRequest") - private Object pauseRequest; - @JsonProperty("PauseResponse") - private Object pauseResponse; - @JsonProperty("ProcessEvent") - private Object processEvent; - @JsonProperty("ProgressEndEvent") - private Object progressEndEvent; - @JsonProperty("ProgressStartEvent") - private Object progressStartEvent; - @JsonProperty("ProgressUpdateEvent") - private Object progressUpdateEvent; - /** - * Base Protocol - *

- * Base class of requests, responses, and events. - * - */ - @JsonProperty("ProtocolMessage") - @JsonPropertyDescription("Base class of requests, responses, and events.") - private ProtocolMessage protocolMessage; - /** - * Arguments for `readMemory` request. - * - */ - @JsonProperty("ReadMemoryArguments") - @JsonPropertyDescription("Arguments for `readMemory` request.") - private ReadMemoryArguments readMemoryArguments; - @JsonProperty("ReadMemoryRequest") - private Object readMemoryRequest; - @JsonProperty("ReadMemoryResponse") - private Object readMemoryResponse; - @JsonProperty("Request") - private Object request; - @JsonProperty("Response") - private Object response; - /** - * Arguments for `restart` request. - * - */ - @JsonProperty("RestartArguments") - @JsonPropertyDescription("Arguments for `restart` request.") - private RestartArguments restartArguments; - /** - * Arguments for `restartFrame` request. - * - */ - @JsonProperty("RestartFrameArguments") - @JsonPropertyDescription("Arguments for `restartFrame` request.") - private RestartFrameArguments restartFrameArguments; - @JsonProperty("RestartFrameRequest") - private Object restartFrameRequest; - @JsonProperty("RestartFrameResponse") - private Object restartFrameResponse; - @JsonProperty("RestartRequest") - private Object restartRequest; - @JsonProperty("RestartResponse") - private Object restartResponse; - /** - * Arguments for `reverseContinue` request. - * - */ - @JsonProperty("ReverseContinueArguments") - @JsonPropertyDescription("Arguments for `reverseContinue` request.") - private ReverseContinueArguments reverseContinueArguments; - @JsonProperty("ReverseContinueRequest") - private Object reverseContinueRequest; - @JsonProperty("ReverseContinueResponse") - private Object reverseContinueResponse; - @JsonProperty("RunInTerminalRequest") - private Object runInTerminalRequest; - /** - * Arguments for `runInTerminal` request. - * - */ - @JsonProperty("RunInTerminalRequestArguments") - @JsonPropertyDescription("Arguments for `runInTerminal` request.") - private RunInTerminalRequestArguments runInTerminalRequestArguments; - @JsonProperty("RunInTerminalResponse") - private Object runInTerminalResponse; - /** - * A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. - * - */ - @JsonProperty("Scope") - @JsonPropertyDescription("A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source.") - private Scope scope; - /** - * Arguments for `scopes` request. - * - */ - @JsonProperty("ScopesArguments") - @JsonPropertyDescription("Arguments for `scopes` request.") - private ScopesArguments scopesArguments; - @JsonProperty("ScopesRequest") - private Object scopesRequest; - @JsonProperty("ScopesResponse") - private Object scopesResponse; - /** - * Arguments for `setBreakpoints` request. - * - */ - @JsonProperty("SetBreakpointsArguments") - @JsonPropertyDescription("Arguments for `setBreakpoints` request.") - private SetBreakpointsArguments setBreakpointsArguments; - @JsonProperty("SetBreakpointsRequest") - private Object setBreakpointsRequest; - @JsonProperty("SetBreakpointsResponse") - private Object setBreakpointsResponse; - /** - * Arguments for `setDataBreakpoints` request. - * - */ - @JsonProperty("SetDataBreakpointsArguments") - @JsonPropertyDescription("Arguments for `setDataBreakpoints` request.") - private SetDataBreakpointsArguments setDataBreakpointsArguments; - @JsonProperty("SetDataBreakpointsRequest") - private Object setDataBreakpointsRequest; - @JsonProperty("SetDataBreakpointsResponse") - private Object setDataBreakpointsResponse; - /** - * Arguments for `setExceptionBreakpoints` request. - * - */ - @JsonProperty("SetExceptionBreakpointsArguments") - @JsonPropertyDescription("Arguments for `setExceptionBreakpoints` request.") - private SetExceptionBreakpointsArguments setExceptionBreakpointsArguments; - @JsonProperty("SetExceptionBreakpointsRequest") - private Object setExceptionBreakpointsRequest; - @JsonProperty("SetExceptionBreakpointsResponse") - private Object setExceptionBreakpointsResponse; - /** - * Arguments for `setExpression` request. - * - */ - @JsonProperty("SetExpressionArguments") - @JsonPropertyDescription("Arguments for `setExpression` request.") - private SetExpressionArguments setExpressionArguments; - @JsonProperty("SetExpressionRequest") - private Object setExpressionRequest; - @JsonProperty("SetExpressionResponse") - private Object setExpressionResponse; - /** - * Arguments for `setFunctionBreakpoints` request. - * - */ - @JsonProperty("SetFunctionBreakpointsArguments") - @JsonPropertyDescription("Arguments for `setFunctionBreakpoints` request.") - private SetFunctionBreakpointsArguments setFunctionBreakpointsArguments; - @JsonProperty("SetFunctionBreakpointsRequest") - private Object setFunctionBreakpointsRequest; - @JsonProperty("SetFunctionBreakpointsResponse") - private Object setFunctionBreakpointsResponse; - /** - * Arguments for `setInstructionBreakpoints` request - * - */ - @JsonProperty("SetInstructionBreakpointsArguments") - @JsonPropertyDescription("Arguments for `setInstructionBreakpoints` request") - private SetInstructionBreakpointsArguments setInstructionBreakpointsArguments; - @JsonProperty("SetInstructionBreakpointsRequest") - private Object setInstructionBreakpointsRequest; - @JsonProperty("SetInstructionBreakpointsResponse") - private Object setInstructionBreakpointsResponse; - /** - * Arguments for `setVariable` request. - * - */ - @JsonProperty("SetVariableArguments") - @JsonPropertyDescription("Arguments for `setVariable` request.") - private SetVariableArguments setVariableArguments; - @JsonProperty("SetVariableRequest") - private Object setVariableRequest; - @JsonProperty("SetVariableResponse") - private Object setVariableResponse; - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("Source") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") - private Source source; - /** - * Arguments for `source` request. - * - */ - @JsonProperty("SourceArguments") - @JsonPropertyDescription("Arguments for `source` request.") - private SourceArguments sourceArguments; - /** - * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. - * - */ - @JsonProperty("SourceBreakpoint") - @JsonPropertyDescription("Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.") - private SourceBreakpoint sourceBreakpoint; - @JsonProperty("SourceRequest") - private Object sourceRequest; - @JsonProperty("SourceResponse") - private Object sourceResponse; - /** - * A Stackframe contains the source location. - * - */ - @JsonProperty("StackFrame") - @JsonPropertyDescription("A Stackframe contains the source location.") - private StackFrame stackFrame; - @JsonProperty("StackFrameFormat") - private Object stackFrameFormat; - /** - * Arguments for `stackTrace` request. - * - */ - @JsonProperty("StackTraceArguments") - @JsonPropertyDescription("Arguments for `stackTrace` request.") - private StackTraceArguments stackTraceArguments; - @JsonProperty("StackTraceRequest") - private Object stackTraceRequest; - @JsonProperty("StackTraceResponse") - private Object stackTraceResponse; - @JsonProperty("StartDebuggingRequest") - private Object startDebuggingRequest; - /** - * Arguments for `startDebugging` request. - * - */ - @JsonProperty("StartDebuggingRequestArguments") - @JsonPropertyDescription("Arguments for `startDebugging` request.") - private StartDebuggingRequestArguments startDebuggingRequestArguments; - @JsonProperty("StartDebuggingResponse") - private Object startDebuggingResponse; - /** - * Arguments for `stepBack` request. - * - */ - @JsonProperty("StepBackArguments") - @JsonPropertyDescription("Arguments for `stepBack` request.") - private StepBackArguments stepBackArguments; - @JsonProperty("StepBackRequest") - private Object stepBackRequest; - @JsonProperty("StepBackResponse") - private Object stepBackResponse; - /** - * Arguments for `stepIn` request. - * - */ - @JsonProperty("StepInArguments") - @JsonPropertyDescription("Arguments for `stepIn` request.") - private StepInArguments stepInArguments; - @JsonProperty("StepInRequest") - private Object stepInRequest; - @JsonProperty("StepInResponse") - private Object stepInResponse; - /** - * A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. - * - */ - @JsonProperty("StepInTarget") - @JsonPropertyDescription("A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.") - private StepInTarget stepInTarget; - /** - * Arguments for `stepInTargets` request. - * - */ - @JsonProperty("StepInTargetsArguments") - @JsonPropertyDescription("Arguments for `stepInTargets` request.") - private StepInTargetsArguments stepInTargetsArguments; - @JsonProperty("StepInTargetsRequest") - private Object stepInTargetsRequest; - @JsonProperty("StepInTargetsResponse") - private Object stepInTargetsResponse; - /** - * Arguments for `stepOut` request. - * - */ - @JsonProperty("StepOutArguments") - @JsonPropertyDescription("Arguments for `stepOut` request.") - private StepOutArguments stepOutArguments; - @JsonProperty("StepOutRequest") - private Object stepOutRequest; - @JsonProperty("StepOutResponse") - private Object stepOutResponse; - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("SteppingGranularity") - @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") - private NextArguments.SteppingGranularity steppingGranularity; - @JsonProperty("StoppedEvent") - private Object stoppedEvent; - /** - * Arguments for `terminate` request. - * - */ - @JsonProperty("TerminateArguments") - @JsonPropertyDescription("Arguments for `terminate` request.") - private TerminateArguments terminateArguments; - @JsonProperty("TerminateRequest") - private Object terminateRequest; - @JsonProperty("TerminateResponse") - private Object terminateResponse; - /** - * Arguments for `terminateThreads` request. - * - */ - @JsonProperty("TerminateThreadsArguments") - @JsonPropertyDescription("Arguments for `terminateThreads` request.") - private TerminateThreadsArguments terminateThreadsArguments; - @JsonProperty("TerminateThreadsRequest") - private Object terminateThreadsRequest; - @JsonProperty("TerminateThreadsResponse") - private Object terminateThreadsResponse; - @JsonProperty("TerminatedEvent") - private Object terminatedEvent; - /** - * A Thread - * - */ - @JsonProperty("Thread") - @JsonPropertyDescription("A Thread") - private Thread thread; - @JsonProperty("ThreadEvent") - private Object threadEvent; - @JsonProperty("ThreadsRequest") - private Object threadsRequest; - @JsonProperty("ThreadsResponse") - private Object threadsResponse; - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("ValueFormat") - @JsonPropertyDescription("Provides formatting information for a value.") - private ValueFormat valueFormat; - /** - * A Variable is a name/value pair. - * The `type` attribute is shown if space permits or when hovering over the variable's name. - * The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. - * If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. - * If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("Variable") - @JsonPropertyDescription("A Variable is a name/value pair.\nThe `type` attribute is shown if space permits or when hovering over the variable's name.\nThe `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.\nIf the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.") - private Variable variable; - /** - * Properties of a variable that can be used to determine how to render the variable in the UI. - * - */ - @JsonProperty("VariablePresentationHint") - @JsonPropertyDescription("Properties of a variable that can be used to determine how to render the variable in the UI.") - private VariablePresentationHint variablePresentationHint; - /** - * Arguments for `variables` request. - * - */ - @JsonProperty("VariablesArguments") - @JsonPropertyDescription("Arguments for `variables` request.") - private VariablesArguments variablesArguments; - @JsonProperty("VariablesRequest") - private Object variablesRequest; - @JsonProperty("VariablesResponse") - private Object variablesResponse; - /** - * Arguments for `writeMemory` request. - * - */ - @JsonProperty("WriteMemoryArguments") - @JsonPropertyDescription("Arguments for `writeMemory` request.") - private WriteMemoryArguments writeMemoryArguments; - @JsonProperty("WriteMemoryRequest") - private Object writeMemoryRequest; - @JsonProperty("WriteMemoryResponse") - private Object writeMemoryResponse; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - @JsonProperty("AttachRequest") - public Object getAttachRequest() { - return attachRequest; - } - - @JsonProperty("AttachRequest") - public void setAttachRequest(Object attachRequest) { - this.attachRequest = attachRequest; - } - - /** - * Arguments for `attach` request. Additional attributes are implementation specific. - * - */ - @JsonProperty("AttachRequestArguments") - public AttachRequestArguments getAttachRequestArguments() { - return attachRequestArguments; - } - - /** - * Arguments for `attach` request. Additional attributes are implementation specific. - * - */ - @JsonProperty("AttachRequestArguments") - public void setAttachRequestArguments(AttachRequestArguments attachRequestArguments) { - this.attachRequestArguments = attachRequestArguments; - } - - @JsonProperty("AttachResponse") - public Object getAttachResponse() { - return attachResponse; - } - - @JsonProperty("AttachResponse") - public void setAttachResponse(Object attachResponse) { - this.attachResponse = attachResponse; - } - - /** - * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. - * - */ - @JsonProperty("Breakpoint") - public Breakpoint getBreakpoint() { - return breakpoint; - } - - /** - * Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. - * - */ - @JsonProperty("Breakpoint") - public void setBreakpoint(Breakpoint breakpoint) { - this.breakpoint = breakpoint; - } - - @JsonProperty("BreakpointEvent") - public Object getBreakpointEvent() { - return breakpointEvent; - } - - @JsonProperty("BreakpointEvent") - public void setBreakpointEvent(Object breakpointEvent) { - this.breakpointEvent = breakpointEvent; - } - - /** - * Properties of a breakpoint location returned from the `breakpointLocations` request. - * - */ - @JsonProperty("BreakpointLocation") - public BreakpointLocation getBreakpointLocation() { - return breakpointLocation; - } - - /** - * Properties of a breakpoint location returned from the `breakpointLocations` request. - * - */ - @JsonProperty("BreakpointLocation") - public void setBreakpointLocation(BreakpointLocation breakpointLocation) { - this.breakpointLocation = breakpointLocation; - } - - /** - * Arguments for `breakpointLocations` request. - * - */ - @JsonProperty("BreakpointLocationsArguments") - public BreakpointLocationsArguments getBreakpointLocationsArguments() { - return breakpointLocationsArguments; - } - - /** - * Arguments for `breakpointLocations` request. - * - */ - @JsonProperty("BreakpointLocationsArguments") - public void setBreakpointLocationsArguments(BreakpointLocationsArguments breakpointLocationsArguments) { - this.breakpointLocationsArguments = breakpointLocationsArguments; - } - - @JsonProperty("BreakpointLocationsRequest") - public Object getBreakpointLocationsRequest() { - return breakpointLocationsRequest; - } - - @JsonProperty("BreakpointLocationsRequest") - public void setBreakpointLocationsRequest(Object breakpointLocationsRequest) { - this.breakpointLocationsRequest = breakpointLocationsRequest; - } - - @JsonProperty("BreakpointLocationsResponse") - public Object getBreakpointLocationsResponse() { - return breakpointLocationsResponse; - } - - @JsonProperty("BreakpointLocationsResponse") - public void setBreakpointLocationsResponse(Object breakpointLocationsResponse) { - this.breakpointLocationsResponse = breakpointLocationsResponse; - } - - /** - * Arguments for `cancel` request. - * - */ - @JsonProperty("CancelArguments") - public CancelArguments getCancelArguments() { - return cancelArguments; - } - - /** - * Arguments for `cancel` request. - * - */ - @JsonProperty("CancelArguments") - public void setCancelArguments(CancelArguments cancelArguments) { - this.cancelArguments = cancelArguments; - } - - @JsonProperty("CancelRequest") - public Object getCancelRequest() { - return cancelRequest; - } - - @JsonProperty("CancelRequest") - public void setCancelRequest(Object cancelRequest) { - this.cancelRequest = cancelRequest; - } - - @JsonProperty("CancelResponse") - public Object getCancelResponse() { - return cancelResponse; - } - - @JsonProperty("CancelResponse") - public void setCancelResponse(Object cancelResponse) { - this.cancelResponse = cancelResponse; - } - - /** - * Types - *

- * Information about the capabilities of a debug adapter. - * - */ - @JsonProperty("Capabilities") - public Capabilities getCapabilities() { - return capabilities; - } - - /** - * Types - *

- * Information about the capabilities of a debug adapter. - * - */ - @JsonProperty("Capabilities") - public void setCapabilities(Capabilities capabilities) { - this.capabilities = capabilities; - } - - @JsonProperty("CapabilitiesEvent") - public Object getCapabilitiesEvent() { - return capabilitiesEvent; - } - - @JsonProperty("CapabilitiesEvent") - public void setCapabilitiesEvent(Object capabilitiesEvent) { - this.capabilitiesEvent = capabilitiesEvent; - } - - /** - * The checksum of an item calculated by the specified algorithm. - * - */ - @JsonProperty("Checksum") - public Checksum getChecksum() { - return checksum; - } - - /** - * The checksum of an item calculated by the specified algorithm. - * - */ - @JsonProperty("Checksum") - public void setChecksum(Checksum checksum) { - this.checksum = checksum; - } - - /** - * Names of checksum algorithms that may be supported by a debug adapter. - * - */ - @JsonProperty("ChecksumAlgorithm") - public Checksum.ChecksumAlgorithm getChecksumAlgorithm() { - return checksumAlgorithm; - } - - /** - * Names of checksum algorithms that may be supported by a debug adapter. - * - */ - @JsonProperty("ChecksumAlgorithm") - public void setChecksumAlgorithm(Checksum.ChecksumAlgorithm checksumAlgorithm) { - this.checksumAlgorithm = checksumAlgorithm; - } - - /** - * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, - * and what the column's label should be. - * It is only used if the underlying UI actually supports this level of customization. - * - */ - @JsonProperty("ColumnDescriptor") - public ColumnDescriptor getColumnDescriptor() { - return columnDescriptor; - } - - /** - * A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, - * and what the column's label should be. - * It is only used if the underlying UI actually supports this level of customization. - * - */ - @JsonProperty("ColumnDescriptor") - public void setColumnDescriptor(ColumnDescriptor columnDescriptor) { - this.columnDescriptor = columnDescriptor; - } - - /** - * `CompletionItems` are the suggestions returned from the `completions` request. - * - */ - @JsonProperty("CompletionItem") - public CompletionItem getCompletionItem() { - return completionItem; - } - - /** - * `CompletionItems` are the suggestions returned from the `completions` request. - * - */ - @JsonProperty("CompletionItem") - public void setCompletionItem(CompletionItem completionItem) { - this.completionItem = completionItem; - } - - /** - * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. - * - */ - @JsonProperty("CompletionItemType") - public CompletionItem.CompletionItemType getCompletionItemType() { - return completionItemType; - } - - /** - * Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. - * - */ - @JsonProperty("CompletionItemType") - public void setCompletionItemType(CompletionItem.CompletionItemType completionItemType) { - this.completionItemType = completionItemType; - } - - /** - * Arguments for `completions` request. - * - */ - @JsonProperty("CompletionsArguments") - public CompletionsArguments getCompletionsArguments() { - return completionsArguments; - } - - /** - * Arguments for `completions` request. - * - */ - @JsonProperty("CompletionsArguments") - public void setCompletionsArguments(CompletionsArguments completionsArguments) { - this.completionsArguments = completionsArguments; - } - - @JsonProperty("CompletionsRequest") - public Object getCompletionsRequest() { - return completionsRequest; - } - - @JsonProperty("CompletionsRequest") - public void setCompletionsRequest(Object completionsRequest) { - this.completionsRequest = completionsRequest; - } - - @JsonProperty("CompletionsResponse") - public Object getCompletionsResponse() { - return completionsResponse; - } - - @JsonProperty("CompletionsResponse") - public void setCompletionsResponse(Object completionsResponse) { - this.completionsResponse = completionsResponse; - } - - /** - * Arguments for `configurationDone` request. - * - */ - @JsonProperty("ConfigurationDoneArguments") - public ConfigurationDoneArguments getConfigurationDoneArguments() { - return configurationDoneArguments; - } - - /** - * Arguments for `configurationDone` request. - * - */ - @JsonProperty("ConfigurationDoneArguments") - public void setConfigurationDoneArguments(ConfigurationDoneArguments configurationDoneArguments) { - this.configurationDoneArguments = configurationDoneArguments; - } - - @JsonProperty("ConfigurationDoneRequest") - public Object getConfigurationDoneRequest() { - return configurationDoneRequest; - } - - @JsonProperty("ConfigurationDoneRequest") - public void setConfigurationDoneRequest(Object configurationDoneRequest) { - this.configurationDoneRequest = configurationDoneRequest; - } - - @JsonProperty("ConfigurationDoneResponse") - public Object getConfigurationDoneResponse() { - return configurationDoneResponse; - } - - @JsonProperty("ConfigurationDoneResponse") - public void setConfigurationDoneResponse(Object configurationDoneResponse) { - this.configurationDoneResponse = configurationDoneResponse; - } - - /** - * Arguments for `continue` request. - * - */ - @JsonProperty("ContinueArguments") - public ContinueArguments getContinueArguments() { - return continueArguments; - } - - /** - * Arguments for `continue` request. - * - */ - @JsonProperty("ContinueArguments") - public void setContinueArguments(ContinueArguments continueArguments) { - this.continueArguments = continueArguments; - } - - @JsonProperty("ContinueRequest") - public Object getContinueRequest() { - return continueRequest; - } - - @JsonProperty("ContinueRequest") - public void setContinueRequest(Object continueRequest) { - this.continueRequest = continueRequest; - } - - @JsonProperty("ContinueResponse") - public Object getContinueResponse() { - return continueResponse; - } - - @JsonProperty("ContinueResponse") - public void setContinueResponse(Object continueResponse) { - this.continueResponse = continueResponse; - } - - @JsonProperty("ContinuedEvent") - public Object getContinuedEvent() { - return continuedEvent; - } - - @JsonProperty("ContinuedEvent") - public void setContinuedEvent(Object continuedEvent) { - this.continuedEvent = continuedEvent; - } - - /** - * Properties of a data breakpoint passed to the `setDataBreakpoints` request. - * - */ - @JsonProperty("DataBreakpoint") - public DataBreakpoint getDataBreakpoint() { - return dataBreakpoint; - } - - /** - * Properties of a data breakpoint passed to the `setDataBreakpoints` request. - * - */ - @JsonProperty("DataBreakpoint") - public void setDataBreakpoint(DataBreakpoint dataBreakpoint) { - this.dataBreakpoint = dataBreakpoint; - } - - /** - * This enumeration defines all possible access types for data breakpoints. - * - */ - @JsonProperty("DataBreakpointAccessType") - public DataBreakpoint.DataBreakpointAccessType getDataBreakpointAccessType() { - return dataBreakpointAccessType; - } - - /** - * This enumeration defines all possible access types for data breakpoints. - * - */ - @JsonProperty("DataBreakpointAccessType") - public void setDataBreakpointAccessType(DataBreakpoint.DataBreakpointAccessType dataBreakpointAccessType) { - this.dataBreakpointAccessType = dataBreakpointAccessType; - } - - /** - * Arguments for `dataBreakpointInfo` request. - * - */ - @JsonProperty("DataBreakpointInfoArguments") - public DataBreakpointInfoArguments getDataBreakpointInfoArguments() { - return dataBreakpointInfoArguments; - } - - /** - * Arguments for `dataBreakpointInfo` request. - * - */ - @JsonProperty("DataBreakpointInfoArguments") - public void setDataBreakpointInfoArguments(DataBreakpointInfoArguments dataBreakpointInfoArguments) { - this.dataBreakpointInfoArguments = dataBreakpointInfoArguments; - } - - @JsonProperty("DataBreakpointInfoRequest") - public Object getDataBreakpointInfoRequest() { - return dataBreakpointInfoRequest; - } - - @JsonProperty("DataBreakpointInfoRequest") - public void setDataBreakpointInfoRequest(Object dataBreakpointInfoRequest) { - this.dataBreakpointInfoRequest = dataBreakpointInfoRequest; - } - - @JsonProperty("DataBreakpointInfoResponse") - public Object getDataBreakpointInfoResponse() { - return dataBreakpointInfoResponse; - } - - @JsonProperty("DataBreakpointInfoResponse") - public void setDataBreakpointInfoResponse(Object dataBreakpointInfoResponse) { - this.dataBreakpointInfoResponse = dataBreakpointInfoResponse; - } - - /** - * Arguments for `disassemble` request. - * - */ - @JsonProperty("DisassembleArguments") - public DisassembleArguments getDisassembleArguments() { - return disassembleArguments; - } - - /** - * Arguments for `disassemble` request. - * - */ - @JsonProperty("DisassembleArguments") - public void setDisassembleArguments(DisassembleArguments disassembleArguments) { - this.disassembleArguments = disassembleArguments; - } - - @JsonProperty("DisassembleRequest") - public Object getDisassembleRequest() { - return disassembleRequest; - } - - @JsonProperty("DisassembleRequest") - public void setDisassembleRequest(Object disassembleRequest) { - this.disassembleRequest = disassembleRequest; - } - - @JsonProperty("DisassembleResponse") - public Object getDisassembleResponse() { - return disassembleResponse; - } - - @JsonProperty("DisassembleResponse") - public void setDisassembleResponse(Object disassembleResponse) { - this.disassembleResponse = disassembleResponse; - } - - /** - * Represents a single disassembled instruction. - * - */ - @JsonProperty("DisassembledInstruction") - public DisassembledInstruction getDisassembledInstruction() { - return disassembledInstruction; - } - - /** - * Represents a single disassembled instruction. - * - */ - @JsonProperty("DisassembledInstruction") - public void setDisassembledInstruction(DisassembledInstruction disassembledInstruction) { - this.disassembledInstruction = disassembledInstruction; - } - - /** - * Arguments for `disconnect` request. - * - */ - @JsonProperty("DisconnectArguments") - public DisconnectArguments getDisconnectArguments() { - return disconnectArguments; - } - - /** - * Arguments for `disconnect` request. - * - */ - @JsonProperty("DisconnectArguments") - public void setDisconnectArguments(DisconnectArguments disconnectArguments) { - this.disconnectArguments = disconnectArguments; - } - - @JsonProperty("DisconnectRequest") - public Object getDisconnectRequest() { - return disconnectRequest; - } - - @JsonProperty("DisconnectRequest") - public void setDisconnectRequest(Object disconnectRequest) { - this.disconnectRequest = disconnectRequest; - } - - @JsonProperty("DisconnectResponse") - public Object getDisconnectResponse() { - return disconnectResponse; - } - - @JsonProperty("DisconnectResponse") - public void setDisconnectResponse(Object disconnectResponse) { - this.disconnectResponse = disconnectResponse; - } - - @JsonProperty("ErrorResponse") - public Object getErrorResponse() { - return errorResponse; - } - - @JsonProperty("ErrorResponse") - public void setErrorResponse(Object errorResponse) { - this.errorResponse = errorResponse; - } - - /** - * Arguments for `evaluate` request. - * - */ - @JsonProperty("EvaluateArguments") - public EvaluateArguments getEvaluateArguments() { - return evaluateArguments; - } - - /** - * Arguments for `evaluate` request. - * - */ - @JsonProperty("EvaluateArguments") - public void setEvaluateArguments(EvaluateArguments evaluateArguments) { - this.evaluateArguments = evaluateArguments; - } - - @JsonProperty("EvaluateRequest") - public Object getEvaluateRequest() { - return evaluateRequest; - } - - @JsonProperty("EvaluateRequest") - public void setEvaluateRequest(Object evaluateRequest) { - this.evaluateRequest = evaluateRequest; - } - - @JsonProperty("EvaluateResponse") - public Object getEvaluateResponse() { - return evaluateResponse; - } - - @JsonProperty("EvaluateResponse") - public void setEvaluateResponse(Object evaluateResponse) { - this.evaluateResponse = evaluateResponse; - } - - @JsonProperty("Event") - public Object getEvent() { - return event; - } - - @JsonProperty("Event") - public void setEvent(Object event) { - this.event = event; - } - - /** - * This enumeration defines all possible conditions when a thrown exception should result in a break. - * never: never breaks, - * always: always breaks, - * unhandled: breaks when exception unhandled, - * userUnhandled: breaks if the exception is not handled by user code. - * - */ - @JsonProperty("ExceptionBreakMode") - public ExceptionBreakMode getExceptionBreakMode() { - return exceptionBreakMode; - } - - /** - * This enumeration defines all possible conditions when a thrown exception should result in a break. - * never: never breaks, - * always: always breaks, - * unhandled: breaks when exception unhandled, - * userUnhandled: breaks if the exception is not handled by user code. - * - */ - @JsonProperty("ExceptionBreakMode") - public void setExceptionBreakMode(ExceptionBreakMode exceptionBreakMode) { - this.exceptionBreakMode = exceptionBreakMode; - } - - /** - * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. - * - */ - @JsonProperty("ExceptionBreakpointsFilter") - public ExceptionBreakpointsFilter getExceptionBreakpointsFilter() { - return exceptionBreakpointsFilter; - } - - /** - * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. - * - */ - @JsonProperty("ExceptionBreakpointsFilter") - public void setExceptionBreakpointsFilter(ExceptionBreakpointsFilter exceptionBreakpointsFilter) { - this.exceptionBreakpointsFilter = exceptionBreakpointsFilter; - } - - /** - * Detailed information about an exception that has occurred. - * - */ - @JsonProperty("ExceptionDetails") - public ExceptionDetails getExceptionDetails() { - return exceptionDetails; - } - - /** - * Detailed information about an exception that has occurred. - * - */ - @JsonProperty("ExceptionDetails") - public void setExceptionDetails(ExceptionDetails exceptionDetails) { - this.exceptionDetails = exceptionDetails; - } - - /** - * An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("ExceptionFilterOptions") - public ExceptionFilterOptions getExceptionFilterOptions() { - return exceptionFilterOptions; - } - - /** - * An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. - * - */ - @JsonProperty("ExceptionFilterOptions") - public void setExceptionFilterOptions(ExceptionFilterOptions exceptionFilterOptions) { - this.exceptionFilterOptions = exceptionFilterOptions; - } - - /** - * Arguments for `exceptionInfo` request. - * - */ - @JsonProperty("ExceptionInfoArguments") - public ExceptionInfoArguments getExceptionInfoArguments() { - return exceptionInfoArguments; - } - - /** - * Arguments for `exceptionInfo` request. - * - */ - @JsonProperty("ExceptionInfoArguments") - public void setExceptionInfoArguments(ExceptionInfoArguments exceptionInfoArguments) { - this.exceptionInfoArguments = exceptionInfoArguments; - } - - @JsonProperty("ExceptionInfoRequest") - public Object getExceptionInfoRequest() { - return exceptionInfoRequest; - } - - @JsonProperty("ExceptionInfoRequest") - public void setExceptionInfoRequest(Object exceptionInfoRequest) { - this.exceptionInfoRequest = exceptionInfoRequest; - } - - @JsonProperty("ExceptionInfoResponse") - public Object getExceptionInfoResponse() { - return exceptionInfoResponse; - } - - @JsonProperty("ExceptionInfoResponse") - public void setExceptionInfoResponse(Object exceptionInfoResponse) { - this.exceptionInfoResponse = exceptionInfoResponse; - } - - /** - * An `ExceptionOptions` assigns configuration options to a set of exceptions. - * - */ - @JsonProperty("ExceptionOptions") - public ExceptionOptions getExceptionOptions() { - return exceptionOptions; - } - - /** - * An `ExceptionOptions` assigns configuration options to a set of exceptions. - * - */ - @JsonProperty("ExceptionOptions") - public void setExceptionOptions(ExceptionOptions exceptionOptions) { - this.exceptionOptions = exceptionOptions; - } - - /** - * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. - * If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. - * - */ - @JsonProperty("ExceptionPathSegment") - public ExceptionPathSegment getExceptionPathSegment() { - return exceptionPathSegment; - } - - /** - * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. - * If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. - * - */ - @JsonProperty("ExceptionPathSegment") - public void setExceptionPathSegment(ExceptionPathSegment exceptionPathSegment) { - this.exceptionPathSegment = exceptionPathSegment; - } - - @JsonProperty("ExitedEvent") - public Object getExitedEvent() { - return exitedEvent; - } - - @JsonProperty("ExitedEvent") - public void setExitedEvent(Object exitedEvent) { - this.exitedEvent = exitedEvent; - } - - /** - * Properties of a breakpoint passed to the `setFunctionBreakpoints` request. - * - */ - @JsonProperty("FunctionBreakpoint") - public FunctionBreakpoint getFunctionBreakpoint() { - return functionBreakpoint; - } - - /** - * Properties of a breakpoint passed to the `setFunctionBreakpoints` request. - * - */ - @JsonProperty("FunctionBreakpoint") - public void setFunctionBreakpoint(FunctionBreakpoint functionBreakpoint) { - this.functionBreakpoint = functionBreakpoint; - } - - /** - * Arguments for `goto` request. - * - */ - @JsonProperty("GotoArguments") - public GotoArguments getGotoArguments() { - return gotoArguments; - } - - /** - * Arguments for `goto` request. - * - */ - @JsonProperty("GotoArguments") - public void setGotoArguments(GotoArguments gotoArguments) { - this.gotoArguments = gotoArguments; - } - - @JsonProperty("GotoRequest") - public Object getGotoRequest() { - return gotoRequest; - } - - @JsonProperty("GotoRequest") - public void setGotoRequest(Object gotoRequest) { - this.gotoRequest = gotoRequest; - } - - @JsonProperty("GotoResponse") - public Object getGotoResponse() { - return gotoResponse; - } - - @JsonProperty("GotoResponse") - public void setGotoResponse(Object gotoResponse) { - this.gotoResponse = gotoResponse; - } - - /** - * A `GotoTarget` describes a code location that can be used as a target in the `goto` request. - * The possible goto targets can be determined via the `gotoTargets` request. - * - */ - @JsonProperty("GotoTarget") - public GotoTarget getGotoTarget() { - return gotoTarget; - } - - /** - * A `GotoTarget` describes a code location that can be used as a target in the `goto` request. - * The possible goto targets can be determined via the `gotoTargets` request. - * - */ - @JsonProperty("GotoTarget") - public void setGotoTarget(GotoTarget gotoTarget) { - this.gotoTarget = gotoTarget; - } - - /** - * Arguments for `gotoTargets` request. - * - */ - @JsonProperty("GotoTargetsArguments") - public GotoTargetsArguments getGotoTargetsArguments() { - return gotoTargetsArguments; - } - - /** - * Arguments for `gotoTargets` request. - * - */ - @JsonProperty("GotoTargetsArguments") - public void setGotoTargetsArguments(GotoTargetsArguments gotoTargetsArguments) { - this.gotoTargetsArguments = gotoTargetsArguments; - } - - @JsonProperty("GotoTargetsRequest") - public Object getGotoTargetsRequest() { - return gotoTargetsRequest; - } - - @JsonProperty("GotoTargetsRequest") - public void setGotoTargetsRequest(Object gotoTargetsRequest) { - this.gotoTargetsRequest = gotoTargetsRequest; - } - - @JsonProperty("GotoTargetsResponse") - public Object getGotoTargetsResponse() { - return gotoTargetsResponse; - } - - @JsonProperty("GotoTargetsResponse") - public void setGotoTargetsResponse(Object gotoTargetsResponse) { - this.gotoTargetsResponse = gotoTargetsResponse; - } - - @JsonProperty("InitializeRequest") - public Object getInitializeRequest() { - return initializeRequest; - } - - @JsonProperty("InitializeRequest") - public void setInitializeRequest(Object initializeRequest) { - this.initializeRequest = initializeRequest; - } - - /** - * Arguments for `initialize` request. - * - */ - @JsonProperty("InitializeRequestArguments") - public InitializeRequestArguments getInitializeRequestArguments() { - return initializeRequestArguments; - } - - /** - * Arguments for `initialize` request. - * - */ - @JsonProperty("InitializeRequestArguments") - public void setInitializeRequestArguments(InitializeRequestArguments initializeRequestArguments) { - this.initializeRequestArguments = initializeRequestArguments; - } - - @JsonProperty("InitializeResponse") - public Object getInitializeResponse() { - return initializeResponse; - } - - @JsonProperty("InitializeResponse") - public void setInitializeResponse(Object initializeResponse) { - this.initializeResponse = initializeResponse; - } - - @JsonProperty("InitializedEvent") - public Object getInitializedEvent() { - return initializedEvent; - } - - @JsonProperty("InitializedEvent") - public void setInitializedEvent(Object initializedEvent) { - this.initializedEvent = initializedEvent; - } - - /** - * Properties of a breakpoint passed to the `setInstructionBreakpoints` request - * - */ - @JsonProperty("InstructionBreakpoint") - public InstructionBreakpoint getInstructionBreakpoint() { - return instructionBreakpoint; - } - - /** - * Properties of a breakpoint passed to the `setInstructionBreakpoints` request - * - */ - @JsonProperty("InstructionBreakpoint") - public void setInstructionBreakpoint(InstructionBreakpoint instructionBreakpoint) { - this.instructionBreakpoint = instructionBreakpoint; - } - - /** - * Logical areas that can be invalidated by the `invalidated` event. - * - */ - @JsonProperty("InvalidatedAreas") - public String getInvalidatedAreas() { - return invalidatedAreas; - } - - /** - * Logical areas that can be invalidated by the `invalidated` event. - * - */ - @JsonProperty("InvalidatedAreas") - public void setInvalidatedAreas(String invalidatedAreas) { - this.invalidatedAreas = invalidatedAreas; - } - - @JsonProperty("InvalidatedEvent") - public Object getInvalidatedEvent() { - return invalidatedEvent; - } - - @JsonProperty("InvalidatedEvent") - public void setInvalidatedEvent(Object invalidatedEvent) { - this.invalidatedEvent = invalidatedEvent; - } - - @JsonProperty("LaunchRequest") - public Object getLaunchRequest() { - return launchRequest; - } - - @JsonProperty("LaunchRequest") - public void setLaunchRequest(Object launchRequest) { - this.launchRequest = launchRequest; - } - - /** - * Arguments for `launch` request. Additional attributes are implementation specific. - * - */ - @JsonProperty("LaunchRequestArguments") - public LaunchRequestArguments getLaunchRequestArguments() { - return launchRequestArguments; - } - - /** - * Arguments for `launch` request. Additional attributes are implementation specific. - * - */ - @JsonProperty("LaunchRequestArguments") - public void setLaunchRequestArguments(LaunchRequestArguments launchRequestArguments) { - this.launchRequestArguments = launchRequestArguments; - } - - @JsonProperty("LaunchResponse") - public Object getLaunchResponse() { - return launchResponse; - } - - @JsonProperty("LaunchResponse") - public void setLaunchResponse(Object launchResponse) { - this.launchResponse = launchResponse; - } - - @JsonProperty("LoadedSourceEvent") - public Object getLoadedSourceEvent() { - return loadedSourceEvent; - } - - @JsonProperty("LoadedSourceEvent") - public void setLoadedSourceEvent(Object loadedSourceEvent) { - this.loadedSourceEvent = loadedSourceEvent; - } - - /** - * Arguments for `loadedSources` request. - * - */ - @JsonProperty("LoadedSourcesArguments") - public LoadedSourcesArguments getLoadedSourcesArguments() { - return loadedSourcesArguments; - } - - /** - * Arguments for `loadedSources` request. - * - */ - @JsonProperty("LoadedSourcesArguments") - public void setLoadedSourcesArguments(LoadedSourcesArguments loadedSourcesArguments) { - this.loadedSourcesArguments = loadedSourcesArguments; - } - - @JsonProperty("LoadedSourcesRequest") - public Object getLoadedSourcesRequest() { - return loadedSourcesRequest; - } - - @JsonProperty("LoadedSourcesRequest") - public void setLoadedSourcesRequest(Object loadedSourcesRequest) { - this.loadedSourcesRequest = loadedSourcesRequest; - } - - @JsonProperty("LoadedSourcesResponse") - public Object getLoadedSourcesResponse() { - return loadedSourcesResponse; - } - - @JsonProperty("LoadedSourcesResponse") - public void setLoadedSourcesResponse(Object loadedSourcesResponse) { - this.loadedSourcesResponse = loadedSourcesResponse; - } - - @JsonProperty("MemoryEvent") - public Object getMemoryEvent() { - return memoryEvent; - } - - @JsonProperty("MemoryEvent") - public void setMemoryEvent(Object memoryEvent) { - this.memoryEvent = memoryEvent; - } - - /** - * A structured message object. Used to return errors from requests. - * - */ - @JsonProperty("Message") - public Message getMessage() { - return message; - } - - /** - * A structured message object. Used to return errors from requests. - * - */ - @JsonProperty("Message") - public void setMessage(Message message) { - this.message = message; - } - - /** - * A Module object represents a row in the modules view. - * The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. - * The `name` attribute is used to minimally render the module in the UI. - * - * Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. - * - * To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. - * - */ - @JsonProperty("Module") - public Module getModule() { - return module; - } - - /** - * A Module object represents a row in the modules view. - * The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. - * The `name` attribute is used to minimally render the module in the UI. - * - * Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. - * - * To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. - * - */ - @JsonProperty("Module") - public void setModule(Module module) { - this.module = module; - } - - @JsonProperty("ModuleEvent") - public Object getModuleEvent() { - return moduleEvent; - } - - @JsonProperty("ModuleEvent") - public void setModuleEvent(Object moduleEvent) { - this.moduleEvent = moduleEvent; - } - - /** - * Arguments for `modules` request. - * - */ - @JsonProperty("ModulesArguments") - public ModulesArguments getModulesArguments() { - return modulesArguments; - } - - /** - * Arguments for `modules` request. - * - */ - @JsonProperty("ModulesArguments") - public void setModulesArguments(ModulesArguments modulesArguments) { - this.modulesArguments = modulesArguments; - } - - @JsonProperty("ModulesRequest") - public Object getModulesRequest() { - return modulesRequest; - } - - @JsonProperty("ModulesRequest") - public void setModulesRequest(Object modulesRequest) { - this.modulesRequest = modulesRequest; - } - - @JsonProperty("ModulesResponse") - public Object getModulesResponse() { - return modulesResponse; - } - - @JsonProperty("ModulesResponse") - public void setModulesResponse(Object modulesResponse) { - this.modulesResponse = modulesResponse; - } - - /** - * Arguments for `next` request. - * - */ - @JsonProperty("NextArguments") - public NextArguments getNextArguments() { - return nextArguments; - } - - /** - * Arguments for `next` request. - * - */ - @JsonProperty("NextArguments") - public void setNextArguments(NextArguments nextArguments) { - this.nextArguments = nextArguments; - } - - @JsonProperty("NextRequest") - public Object getNextRequest() { - return nextRequest; - } - - @JsonProperty("NextRequest") - public void setNextRequest(Object nextRequest) { - this.nextRequest = nextRequest; - } - - @JsonProperty("NextResponse") - public Object getNextResponse() { - return nextResponse; - } - - @JsonProperty("NextResponse") - public void setNextResponse(Object nextResponse) { - this.nextResponse = nextResponse; - } - - @JsonProperty("OutputEvent") - public Object getOutputEvent() { - return outputEvent; - } - - @JsonProperty("OutputEvent") - public void setOutputEvent(Object outputEvent) { - this.outputEvent = outputEvent; - } - - /** - * Arguments for `pause` request. - * - */ - @JsonProperty("PauseArguments") - public PauseArguments getPauseArguments() { - return pauseArguments; - } - - /** - * Arguments for `pause` request. - * - */ - @JsonProperty("PauseArguments") - public void setPauseArguments(PauseArguments pauseArguments) { - this.pauseArguments = pauseArguments; - } - - @JsonProperty("PauseRequest") - public Object getPauseRequest() { - return pauseRequest; - } - - @JsonProperty("PauseRequest") - public void setPauseRequest(Object pauseRequest) { - this.pauseRequest = pauseRequest; - } - - @JsonProperty("PauseResponse") - public Object getPauseResponse() { - return pauseResponse; - } - - @JsonProperty("PauseResponse") - public void setPauseResponse(Object pauseResponse) { - this.pauseResponse = pauseResponse; - } - - @JsonProperty("ProcessEvent") - public Object getProcessEvent() { - return processEvent; - } - - @JsonProperty("ProcessEvent") - public void setProcessEvent(Object processEvent) { - this.processEvent = processEvent; - } - - @JsonProperty("ProgressEndEvent") - public Object getProgressEndEvent() { - return progressEndEvent; - } - - @JsonProperty("ProgressEndEvent") - public void setProgressEndEvent(Object progressEndEvent) { - this.progressEndEvent = progressEndEvent; - } - - @JsonProperty("ProgressStartEvent") - public Object getProgressStartEvent() { - return progressStartEvent; - } - - @JsonProperty("ProgressStartEvent") - public void setProgressStartEvent(Object progressStartEvent) { - this.progressStartEvent = progressStartEvent; - } - - @JsonProperty("ProgressUpdateEvent") - public Object getProgressUpdateEvent() { - return progressUpdateEvent; - } - - @JsonProperty("ProgressUpdateEvent") - public void setProgressUpdateEvent(Object progressUpdateEvent) { - this.progressUpdateEvent = progressUpdateEvent; - } - - /** - * Base Protocol - *

- * Base class of requests, responses, and events. - * - */ - @JsonProperty("ProtocolMessage") - public ProtocolMessage getProtocolMessage() { - return protocolMessage; - } - - /** - * Base Protocol - *

- * Base class of requests, responses, and events. - * - */ - @JsonProperty("ProtocolMessage") - public void setProtocolMessage(ProtocolMessage protocolMessage) { - this.protocolMessage = protocolMessage; - } - - /** - * Arguments for `readMemory` request. - * - */ - @JsonProperty("ReadMemoryArguments") - public ReadMemoryArguments getReadMemoryArguments() { - return readMemoryArguments; - } - - /** - * Arguments for `readMemory` request. - * - */ - @JsonProperty("ReadMemoryArguments") - public void setReadMemoryArguments(ReadMemoryArguments readMemoryArguments) { - this.readMemoryArguments = readMemoryArguments; - } - - @JsonProperty("ReadMemoryRequest") - public Object getReadMemoryRequest() { - return readMemoryRequest; - } - - @JsonProperty("ReadMemoryRequest") - public void setReadMemoryRequest(Object readMemoryRequest) { - this.readMemoryRequest = readMemoryRequest; - } - - @JsonProperty("ReadMemoryResponse") - public Object getReadMemoryResponse() { - return readMemoryResponse; - } - - @JsonProperty("ReadMemoryResponse") - public void setReadMemoryResponse(Object readMemoryResponse) { - this.readMemoryResponse = readMemoryResponse; - } - - @JsonProperty("Request") - public Object getRequest() { - return request; - } - - @JsonProperty("Request") - public void setRequest(Object request) { - this.request = request; - } - - @JsonProperty("Response") - public Object getResponse() { - return response; - } - - @JsonProperty("Response") - public void setResponse(Object response) { - this.response = response; - } - - /** - * Arguments for `restart` request. - * - */ - @JsonProperty("RestartArguments") - public RestartArguments getRestartArguments() { - return restartArguments; - } - - /** - * Arguments for `restart` request. - * - */ - @JsonProperty("RestartArguments") - public void setRestartArguments(RestartArguments restartArguments) { - this.restartArguments = restartArguments; - } - - /** - * Arguments for `restartFrame` request. - * - */ - @JsonProperty("RestartFrameArguments") - public RestartFrameArguments getRestartFrameArguments() { - return restartFrameArguments; - } - - /** - * Arguments for `restartFrame` request. - * - */ - @JsonProperty("RestartFrameArguments") - public void setRestartFrameArguments(RestartFrameArguments restartFrameArguments) { - this.restartFrameArguments = restartFrameArguments; - } - - @JsonProperty("RestartFrameRequest") - public Object getRestartFrameRequest() { - return restartFrameRequest; - } - - @JsonProperty("RestartFrameRequest") - public void setRestartFrameRequest(Object restartFrameRequest) { - this.restartFrameRequest = restartFrameRequest; - } - - @JsonProperty("RestartFrameResponse") - public Object getRestartFrameResponse() { - return restartFrameResponse; - } - - @JsonProperty("RestartFrameResponse") - public void setRestartFrameResponse(Object restartFrameResponse) { - this.restartFrameResponse = restartFrameResponse; - } - - @JsonProperty("RestartRequest") - public Object getRestartRequest() { - return restartRequest; - } - - @JsonProperty("RestartRequest") - public void setRestartRequest(Object restartRequest) { - this.restartRequest = restartRequest; - } - - @JsonProperty("RestartResponse") - public Object getRestartResponse() { - return restartResponse; - } - - @JsonProperty("RestartResponse") - public void setRestartResponse(Object restartResponse) { - this.restartResponse = restartResponse; - } - - /** - * Arguments for `reverseContinue` request. - * - */ - @JsonProperty("ReverseContinueArguments") - public ReverseContinueArguments getReverseContinueArguments() { - return reverseContinueArguments; - } - - /** - * Arguments for `reverseContinue` request. - * - */ - @JsonProperty("ReverseContinueArguments") - public void setReverseContinueArguments(ReverseContinueArguments reverseContinueArguments) { - this.reverseContinueArguments = reverseContinueArguments; - } - - @JsonProperty("ReverseContinueRequest") - public Object getReverseContinueRequest() { - return reverseContinueRequest; - } - - @JsonProperty("ReverseContinueRequest") - public void setReverseContinueRequest(Object reverseContinueRequest) { - this.reverseContinueRequest = reverseContinueRequest; - } - - @JsonProperty("ReverseContinueResponse") - public Object getReverseContinueResponse() { - return reverseContinueResponse; - } - - @JsonProperty("ReverseContinueResponse") - public void setReverseContinueResponse(Object reverseContinueResponse) { - this.reverseContinueResponse = reverseContinueResponse; - } - - @JsonProperty("RunInTerminalRequest") - public Object getRunInTerminalRequest() { - return runInTerminalRequest; - } - - @JsonProperty("RunInTerminalRequest") - public void setRunInTerminalRequest(Object runInTerminalRequest) { - this.runInTerminalRequest = runInTerminalRequest; - } - - /** - * Arguments for `runInTerminal` request. - * - */ - @JsonProperty("RunInTerminalRequestArguments") - public RunInTerminalRequestArguments getRunInTerminalRequestArguments() { - return runInTerminalRequestArguments; - } - - /** - * Arguments for `runInTerminal` request. - * - */ - @JsonProperty("RunInTerminalRequestArguments") - public void setRunInTerminalRequestArguments(RunInTerminalRequestArguments runInTerminalRequestArguments) { - this.runInTerminalRequestArguments = runInTerminalRequestArguments; - } - - @JsonProperty("RunInTerminalResponse") - public Object getRunInTerminalResponse() { - return runInTerminalResponse; - } - - @JsonProperty("RunInTerminalResponse") - public void setRunInTerminalResponse(Object runInTerminalResponse) { - this.runInTerminalResponse = runInTerminalResponse; - } - - /** - * A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. - * - */ - @JsonProperty("Scope") - public Scope getScope() { - return scope; - } - - /** - * A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. - * - */ - @JsonProperty("Scope") - public void setScope(Scope scope) { - this.scope = scope; - } - - /** - * Arguments for `scopes` request. - * - */ - @JsonProperty("ScopesArguments") - public ScopesArguments getScopesArguments() { - return scopesArguments; - } - - /** - * Arguments for `scopes` request. - * - */ - @JsonProperty("ScopesArguments") - public void setScopesArguments(ScopesArguments scopesArguments) { - this.scopesArguments = scopesArguments; - } - - @JsonProperty("ScopesRequest") - public Object getScopesRequest() { - return scopesRequest; - } - - @JsonProperty("ScopesRequest") - public void setScopesRequest(Object scopesRequest) { - this.scopesRequest = scopesRequest; - } - - @JsonProperty("ScopesResponse") - public Object getScopesResponse() { - return scopesResponse; - } - - @JsonProperty("ScopesResponse") - public void setScopesResponse(Object scopesResponse) { - this.scopesResponse = scopesResponse; - } - - /** - * Arguments for `setBreakpoints` request. - * - */ - @JsonProperty("SetBreakpointsArguments") - public SetBreakpointsArguments getSetBreakpointsArguments() { - return setBreakpointsArguments; - } - - /** - * Arguments for `setBreakpoints` request. - * - */ - @JsonProperty("SetBreakpointsArguments") - public void setSetBreakpointsArguments(SetBreakpointsArguments setBreakpointsArguments) { - this.setBreakpointsArguments = setBreakpointsArguments; - } - - @JsonProperty("SetBreakpointsRequest") - public Object getSetBreakpointsRequest() { - return setBreakpointsRequest; - } - - @JsonProperty("SetBreakpointsRequest") - public void setSetBreakpointsRequest(Object setBreakpointsRequest) { - this.setBreakpointsRequest = setBreakpointsRequest; - } - - @JsonProperty("SetBreakpointsResponse") - public Object getSetBreakpointsResponse() { - return setBreakpointsResponse; - } - - @JsonProperty("SetBreakpointsResponse") - public void setSetBreakpointsResponse(Object setBreakpointsResponse) { - this.setBreakpointsResponse = setBreakpointsResponse; - } - - /** - * Arguments for `setDataBreakpoints` request. - * - */ - @JsonProperty("SetDataBreakpointsArguments") - public SetDataBreakpointsArguments getSetDataBreakpointsArguments() { - return setDataBreakpointsArguments; - } - - /** - * Arguments for `setDataBreakpoints` request. - * - */ - @JsonProperty("SetDataBreakpointsArguments") - public void setSetDataBreakpointsArguments(SetDataBreakpointsArguments setDataBreakpointsArguments) { - this.setDataBreakpointsArguments = setDataBreakpointsArguments; - } - - @JsonProperty("SetDataBreakpointsRequest") - public Object getSetDataBreakpointsRequest() { - return setDataBreakpointsRequest; - } - - @JsonProperty("SetDataBreakpointsRequest") - public void setSetDataBreakpointsRequest(Object setDataBreakpointsRequest) { - this.setDataBreakpointsRequest = setDataBreakpointsRequest; - } - - @JsonProperty("SetDataBreakpointsResponse") - public Object getSetDataBreakpointsResponse() { - return setDataBreakpointsResponse; - } - - @JsonProperty("SetDataBreakpointsResponse") - public void setSetDataBreakpointsResponse(Object setDataBreakpointsResponse) { - this.setDataBreakpointsResponse = setDataBreakpointsResponse; - } - - /** - * Arguments for `setExceptionBreakpoints` request. - * - */ - @JsonProperty("SetExceptionBreakpointsArguments") - public SetExceptionBreakpointsArguments getSetExceptionBreakpointsArguments() { - return setExceptionBreakpointsArguments; - } - - /** - * Arguments for `setExceptionBreakpoints` request. - * - */ - @JsonProperty("SetExceptionBreakpointsArguments") - public void setSetExceptionBreakpointsArguments(SetExceptionBreakpointsArguments setExceptionBreakpointsArguments) { - this.setExceptionBreakpointsArguments = setExceptionBreakpointsArguments; - } - - @JsonProperty("SetExceptionBreakpointsRequest") - public Object getSetExceptionBreakpointsRequest() { - return setExceptionBreakpointsRequest; - } - - @JsonProperty("SetExceptionBreakpointsRequest") - public void setSetExceptionBreakpointsRequest(Object setExceptionBreakpointsRequest) { - this.setExceptionBreakpointsRequest = setExceptionBreakpointsRequest; - } - - @JsonProperty("SetExceptionBreakpointsResponse") - public Object getSetExceptionBreakpointsResponse() { - return setExceptionBreakpointsResponse; - } - - @JsonProperty("SetExceptionBreakpointsResponse") - public void setSetExceptionBreakpointsResponse(Object setExceptionBreakpointsResponse) { - this.setExceptionBreakpointsResponse = setExceptionBreakpointsResponse; - } - - /** - * Arguments for `setExpression` request. - * - */ - @JsonProperty("SetExpressionArguments") - public SetExpressionArguments getSetExpressionArguments() { - return setExpressionArguments; - } - - /** - * Arguments for `setExpression` request. - * - */ - @JsonProperty("SetExpressionArguments") - public void setSetExpressionArguments(SetExpressionArguments setExpressionArguments) { - this.setExpressionArguments = setExpressionArguments; - } - - @JsonProperty("SetExpressionRequest") - public Object getSetExpressionRequest() { - return setExpressionRequest; - } - - @JsonProperty("SetExpressionRequest") - public void setSetExpressionRequest(Object setExpressionRequest) { - this.setExpressionRequest = setExpressionRequest; - } - - @JsonProperty("SetExpressionResponse") - public Object getSetExpressionResponse() { - return setExpressionResponse; - } - - @JsonProperty("SetExpressionResponse") - public void setSetExpressionResponse(Object setExpressionResponse) { - this.setExpressionResponse = setExpressionResponse; - } - - /** - * Arguments for `setFunctionBreakpoints` request. - * - */ - @JsonProperty("SetFunctionBreakpointsArguments") - public SetFunctionBreakpointsArguments getSetFunctionBreakpointsArguments() { - return setFunctionBreakpointsArguments; - } - - /** - * Arguments for `setFunctionBreakpoints` request. - * - */ - @JsonProperty("SetFunctionBreakpointsArguments") - public void setSetFunctionBreakpointsArguments(SetFunctionBreakpointsArguments setFunctionBreakpointsArguments) { - this.setFunctionBreakpointsArguments = setFunctionBreakpointsArguments; - } - - @JsonProperty("SetFunctionBreakpointsRequest") - public Object getSetFunctionBreakpointsRequest() { - return setFunctionBreakpointsRequest; - } - - @JsonProperty("SetFunctionBreakpointsRequest") - public void setSetFunctionBreakpointsRequest(Object setFunctionBreakpointsRequest) { - this.setFunctionBreakpointsRequest = setFunctionBreakpointsRequest; - } - - @JsonProperty("SetFunctionBreakpointsResponse") - public Object getSetFunctionBreakpointsResponse() { - return setFunctionBreakpointsResponse; - } - - @JsonProperty("SetFunctionBreakpointsResponse") - public void setSetFunctionBreakpointsResponse(Object setFunctionBreakpointsResponse) { - this.setFunctionBreakpointsResponse = setFunctionBreakpointsResponse; - } - - /** - * Arguments for `setInstructionBreakpoints` request - * - */ - @JsonProperty("SetInstructionBreakpointsArguments") - public SetInstructionBreakpointsArguments getSetInstructionBreakpointsArguments() { - return setInstructionBreakpointsArguments; - } - - /** - * Arguments for `setInstructionBreakpoints` request - * - */ - @JsonProperty("SetInstructionBreakpointsArguments") - public void setSetInstructionBreakpointsArguments(SetInstructionBreakpointsArguments setInstructionBreakpointsArguments) { - this.setInstructionBreakpointsArguments = setInstructionBreakpointsArguments; - } - - @JsonProperty("SetInstructionBreakpointsRequest") - public Object getSetInstructionBreakpointsRequest() { - return setInstructionBreakpointsRequest; - } - - @JsonProperty("SetInstructionBreakpointsRequest") - public void setSetInstructionBreakpointsRequest(Object setInstructionBreakpointsRequest) { - this.setInstructionBreakpointsRequest = setInstructionBreakpointsRequest; - } - - @JsonProperty("SetInstructionBreakpointsResponse") - public Object getSetInstructionBreakpointsResponse() { - return setInstructionBreakpointsResponse; - } - - @JsonProperty("SetInstructionBreakpointsResponse") - public void setSetInstructionBreakpointsResponse(Object setInstructionBreakpointsResponse) { - this.setInstructionBreakpointsResponse = setInstructionBreakpointsResponse; - } - - /** - * Arguments for `setVariable` request. - * - */ - @JsonProperty("SetVariableArguments") - public SetVariableArguments getSetVariableArguments() { - return setVariableArguments; - } - - /** - * Arguments for `setVariable` request. - * - */ - @JsonProperty("SetVariableArguments") - public void setSetVariableArguments(SetVariableArguments setVariableArguments) { - this.setVariableArguments = setVariableArguments; - } - - @JsonProperty("SetVariableRequest") - public Object getSetVariableRequest() { - return setVariableRequest; - } - - @JsonProperty("SetVariableRequest") - public void setSetVariableRequest(Object setVariableRequest) { - this.setVariableRequest = setVariableRequest; - } - - @JsonProperty("SetVariableResponse") - public Object getSetVariableResponse() { - return setVariableResponse; - } - - @JsonProperty("SetVariableResponse") - public void setSetVariableResponse(Object setVariableResponse) { - this.setVariableResponse = setVariableResponse; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("Source") - public Source getSource() { - return source; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("Source") - public void setSource(Source source) { - this.source = source; - } - - /** - * Arguments for `source` request. - * - */ - @JsonProperty("SourceArguments") - public SourceArguments getSourceArguments() { - return sourceArguments; - } - - /** - * Arguments for `source` request. - * - */ - @JsonProperty("SourceArguments") - public void setSourceArguments(SourceArguments sourceArguments) { - this.sourceArguments = sourceArguments; - } - - /** - * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. - * - */ - @JsonProperty("SourceBreakpoint") - public SourceBreakpoint getSourceBreakpoint() { - return sourceBreakpoint; - } - - /** - * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. - * - */ - @JsonProperty("SourceBreakpoint") - public void setSourceBreakpoint(SourceBreakpoint sourceBreakpoint) { - this.sourceBreakpoint = sourceBreakpoint; - } - - @JsonProperty("SourceRequest") - public Object getSourceRequest() { - return sourceRequest; - } - - @JsonProperty("SourceRequest") - public void setSourceRequest(Object sourceRequest) { - this.sourceRequest = sourceRequest; - } - - @JsonProperty("SourceResponse") - public Object getSourceResponse() { - return sourceResponse; - } - - @JsonProperty("SourceResponse") - public void setSourceResponse(Object sourceResponse) { - this.sourceResponse = sourceResponse; - } - - /** - * A Stackframe contains the source location. - * - */ - @JsonProperty("StackFrame") - public StackFrame getStackFrame() { - return stackFrame; - } - - /** - * A Stackframe contains the source location. - * - */ - @JsonProperty("StackFrame") - public void setStackFrame(StackFrame stackFrame) { - this.stackFrame = stackFrame; - } - - @JsonProperty("StackFrameFormat") - public Object getStackFrameFormat() { - return stackFrameFormat; - } - - @JsonProperty("StackFrameFormat") - public void setStackFrameFormat(Object stackFrameFormat) { - this.stackFrameFormat = stackFrameFormat; - } - - /** - * Arguments for `stackTrace` request. - * - */ - @JsonProperty("StackTraceArguments") - public StackTraceArguments getStackTraceArguments() { - return stackTraceArguments; - } - - /** - * Arguments for `stackTrace` request. - * - */ - @JsonProperty("StackTraceArguments") - public void setStackTraceArguments(StackTraceArguments stackTraceArguments) { - this.stackTraceArguments = stackTraceArguments; - } - - @JsonProperty("StackTraceRequest") - public Object getStackTraceRequest() { - return stackTraceRequest; - } - - @JsonProperty("StackTraceRequest") - public void setStackTraceRequest(Object stackTraceRequest) { - this.stackTraceRequest = stackTraceRequest; - } - - @JsonProperty("StackTraceResponse") - public Object getStackTraceResponse() { - return stackTraceResponse; - } - - @JsonProperty("StackTraceResponse") - public void setStackTraceResponse(Object stackTraceResponse) { - this.stackTraceResponse = stackTraceResponse; - } - - @JsonProperty("StartDebuggingRequest") - public Object getStartDebuggingRequest() { - return startDebuggingRequest; - } - - @JsonProperty("StartDebuggingRequest") - public void setStartDebuggingRequest(Object startDebuggingRequest) { - this.startDebuggingRequest = startDebuggingRequest; - } - - /** - * Arguments for `startDebugging` request. - * - */ - @JsonProperty("StartDebuggingRequestArguments") - public StartDebuggingRequestArguments getStartDebuggingRequestArguments() { - return startDebuggingRequestArguments; - } - - /** - * Arguments for `startDebugging` request. - * - */ - @JsonProperty("StartDebuggingRequestArguments") - public void setStartDebuggingRequestArguments(StartDebuggingRequestArguments startDebuggingRequestArguments) { - this.startDebuggingRequestArguments = startDebuggingRequestArguments; - } - - @JsonProperty("StartDebuggingResponse") - public Object getStartDebuggingResponse() { - return startDebuggingResponse; - } - - @JsonProperty("StartDebuggingResponse") - public void setStartDebuggingResponse(Object startDebuggingResponse) { - this.startDebuggingResponse = startDebuggingResponse; - } - - /** - * Arguments for `stepBack` request. - * - */ - @JsonProperty("StepBackArguments") - public StepBackArguments getStepBackArguments() { - return stepBackArguments; - } - - /** - * Arguments for `stepBack` request. - * - */ - @JsonProperty("StepBackArguments") - public void setStepBackArguments(StepBackArguments stepBackArguments) { - this.stepBackArguments = stepBackArguments; - } - - @JsonProperty("StepBackRequest") - public Object getStepBackRequest() { - return stepBackRequest; - } - - @JsonProperty("StepBackRequest") - public void setStepBackRequest(Object stepBackRequest) { - this.stepBackRequest = stepBackRequest; - } - - @JsonProperty("StepBackResponse") - public Object getStepBackResponse() { - return stepBackResponse; - } - - @JsonProperty("StepBackResponse") - public void setStepBackResponse(Object stepBackResponse) { - this.stepBackResponse = stepBackResponse; - } - - /** - * Arguments for `stepIn` request. - * - */ - @JsonProperty("StepInArguments") - public StepInArguments getStepInArguments() { - return stepInArguments; - } - - /** - * Arguments for `stepIn` request. - * - */ - @JsonProperty("StepInArguments") - public void setStepInArguments(StepInArguments stepInArguments) { - this.stepInArguments = stepInArguments; - } - - @JsonProperty("StepInRequest") - public Object getStepInRequest() { - return stepInRequest; - } - - @JsonProperty("StepInRequest") - public void setStepInRequest(Object stepInRequest) { - this.stepInRequest = stepInRequest; - } - - @JsonProperty("StepInResponse") - public Object getStepInResponse() { - return stepInResponse; - } - - @JsonProperty("StepInResponse") - public void setStepInResponse(Object stepInResponse) { - this.stepInResponse = stepInResponse; - } - - /** - * A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. - * - */ - @JsonProperty("StepInTarget") - public StepInTarget getStepInTarget() { - return stepInTarget; - } - - /** - * A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. - * - */ - @JsonProperty("StepInTarget") - public void setStepInTarget(StepInTarget stepInTarget) { - this.stepInTarget = stepInTarget; - } - - /** - * Arguments for `stepInTargets` request. - * - */ - @JsonProperty("StepInTargetsArguments") - public StepInTargetsArguments getStepInTargetsArguments() { - return stepInTargetsArguments; - } - - /** - * Arguments for `stepInTargets` request. - * - */ - @JsonProperty("StepInTargetsArguments") - public void setStepInTargetsArguments(StepInTargetsArguments stepInTargetsArguments) { - this.stepInTargetsArguments = stepInTargetsArguments; - } - - @JsonProperty("StepInTargetsRequest") - public Object getStepInTargetsRequest() { - return stepInTargetsRequest; - } - - @JsonProperty("StepInTargetsRequest") - public void setStepInTargetsRequest(Object stepInTargetsRequest) { - this.stepInTargetsRequest = stepInTargetsRequest; - } - - @JsonProperty("StepInTargetsResponse") - public Object getStepInTargetsResponse() { - return stepInTargetsResponse; - } - - @JsonProperty("StepInTargetsResponse") - public void setStepInTargetsResponse(Object stepInTargetsResponse) { - this.stepInTargetsResponse = stepInTargetsResponse; - } - - /** - * Arguments for `stepOut` request. - * - */ - @JsonProperty("StepOutArguments") - public StepOutArguments getStepOutArguments() { - return stepOutArguments; - } - - /** - * Arguments for `stepOut` request. - * - */ - @JsonProperty("StepOutArguments") - public void setStepOutArguments(StepOutArguments stepOutArguments) { - this.stepOutArguments = stepOutArguments; - } - - @JsonProperty("StepOutRequest") - public Object getStepOutRequest() { - return stepOutRequest; - } - - @JsonProperty("StepOutRequest") - public void setStepOutRequest(Object stepOutRequest) { - this.stepOutRequest = stepOutRequest; - } - - @JsonProperty("StepOutResponse") - public Object getStepOutResponse() { - return stepOutResponse; - } - - @JsonProperty("StepOutResponse") - public void setStepOutResponse(Object stepOutResponse) { - this.stepOutResponse = stepOutResponse; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("SteppingGranularity") - public NextArguments.SteppingGranularity getSteppingGranularity() { - return steppingGranularity; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("SteppingGranularity") - public void setSteppingGranularity(NextArguments.SteppingGranularity steppingGranularity) { - this.steppingGranularity = steppingGranularity; - } - - @JsonProperty("StoppedEvent") - public Object getStoppedEvent() { - return stoppedEvent; - } - - @JsonProperty("StoppedEvent") - public void setStoppedEvent(Object stoppedEvent) { - this.stoppedEvent = stoppedEvent; - } - - /** - * Arguments for `terminate` request. - * - */ - @JsonProperty("TerminateArguments") - public TerminateArguments getTerminateArguments() { - return terminateArguments; - } - - /** - * Arguments for `terminate` request. - * - */ - @JsonProperty("TerminateArguments") - public void setTerminateArguments(TerminateArguments terminateArguments) { - this.terminateArguments = terminateArguments; - } - - @JsonProperty("TerminateRequest") - public Object getTerminateRequest() { - return terminateRequest; - } - - @JsonProperty("TerminateRequest") - public void setTerminateRequest(Object terminateRequest) { - this.terminateRequest = terminateRequest; - } - - @JsonProperty("TerminateResponse") - public Object getTerminateResponse() { - return terminateResponse; - } - - @JsonProperty("TerminateResponse") - public void setTerminateResponse(Object terminateResponse) { - this.terminateResponse = terminateResponse; - } - - /** - * Arguments for `terminateThreads` request. - * - */ - @JsonProperty("TerminateThreadsArguments") - public TerminateThreadsArguments getTerminateThreadsArguments() { - return terminateThreadsArguments; - } - - /** - * Arguments for `terminateThreads` request. - * - */ - @JsonProperty("TerminateThreadsArguments") - public void setTerminateThreadsArguments(TerminateThreadsArguments terminateThreadsArguments) { - this.terminateThreadsArguments = terminateThreadsArguments; - } - - @JsonProperty("TerminateThreadsRequest") - public Object getTerminateThreadsRequest() { - return terminateThreadsRequest; - } - - @JsonProperty("TerminateThreadsRequest") - public void setTerminateThreadsRequest(Object terminateThreadsRequest) { - this.terminateThreadsRequest = terminateThreadsRequest; - } - - @JsonProperty("TerminateThreadsResponse") - public Object getTerminateThreadsResponse() { - return terminateThreadsResponse; - } - - @JsonProperty("TerminateThreadsResponse") - public void setTerminateThreadsResponse(Object terminateThreadsResponse) { - this.terminateThreadsResponse = terminateThreadsResponse; - } - - @JsonProperty("TerminatedEvent") - public Object getTerminatedEvent() { - return terminatedEvent; - } - - @JsonProperty("TerminatedEvent") - public void setTerminatedEvent(Object terminatedEvent) { - this.terminatedEvent = terminatedEvent; - } - - /** - * A Thread - * - */ - @JsonProperty("Thread") - public Thread getThread() { - return thread; - } - - /** - * A Thread - * - */ - @JsonProperty("Thread") - public void setThread(Thread thread) { - this.thread = thread; - } - - @JsonProperty("ThreadEvent") - public Object getThreadEvent() { - return threadEvent; - } - - @JsonProperty("ThreadEvent") - public void setThreadEvent(Object threadEvent) { - this.threadEvent = threadEvent; - } - - @JsonProperty("ThreadsRequest") - public Object getThreadsRequest() { - return threadsRequest; - } - - @JsonProperty("ThreadsRequest") - public void setThreadsRequest(Object threadsRequest) { - this.threadsRequest = threadsRequest; - } - - @JsonProperty("ThreadsResponse") - public Object getThreadsResponse() { - return threadsResponse; - } - - @JsonProperty("ThreadsResponse") - public void setThreadsResponse(Object threadsResponse) { - this.threadsResponse = threadsResponse; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("ValueFormat") - public ValueFormat getValueFormat() { - return valueFormat; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("ValueFormat") - public void setValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; - } - - /** - * A Variable is a name/value pair. - * The `type` attribute is shown if space permits or when hovering over the variable's name. - * The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. - * If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. - * If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("Variable") - public Variable getVariable() { - return variable; - } - - /** - * A Variable is a name/value pair. - * The `type` attribute is shown if space permits or when hovering over the variable's name. - * The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. - * If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. - * If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("Variable") - public void setVariable(Variable variable) { - this.variable = variable; - } - - /** - * Properties of a variable that can be used to determine how to render the variable in the UI. - * - */ - @JsonProperty("VariablePresentationHint") - public VariablePresentationHint getVariablePresentationHint() { - return variablePresentationHint; - } - - /** - * Properties of a variable that can be used to determine how to render the variable in the UI. - * - */ - @JsonProperty("VariablePresentationHint") - public void setVariablePresentationHint(VariablePresentationHint variablePresentationHint) { - this.variablePresentationHint = variablePresentationHint; - } - - /** - * Arguments for `variables` request. - * - */ - @JsonProperty("VariablesArguments") - public VariablesArguments getVariablesArguments() { - return variablesArguments; - } - - /** - * Arguments for `variables` request. - * - */ - @JsonProperty("VariablesArguments") - public void setVariablesArguments(VariablesArguments variablesArguments) { - this.variablesArguments = variablesArguments; - } - - @JsonProperty("VariablesRequest") - public Object getVariablesRequest() { - return variablesRequest; - } - - @JsonProperty("VariablesRequest") - public void setVariablesRequest(Object variablesRequest) { - this.variablesRequest = variablesRequest; - } - - @JsonProperty("VariablesResponse") - public Object getVariablesResponse() { - return variablesResponse; - } - - @JsonProperty("VariablesResponse") - public void setVariablesResponse(Object variablesResponse) { - this.variablesResponse = variablesResponse; - } - - /** - * Arguments for `writeMemory` request. - * - */ - @JsonProperty("WriteMemoryArguments") - public WriteMemoryArguments getWriteMemoryArguments() { - return writeMemoryArguments; - } - - /** - * Arguments for `writeMemory` request. - * - */ - @JsonProperty("WriteMemoryArguments") - public void setWriteMemoryArguments(WriteMemoryArguments writeMemoryArguments) { - this.writeMemoryArguments = writeMemoryArguments; - } - - @JsonProperty("WriteMemoryRequest") - public Object getWriteMemoryRequest() { - return writeMemoryRequest; - } - - @JsonProperty("WriteMemoryRequest") - public void setWriteMemoryRequest(Object writeMemoryRequest) { - this.writeMemoryRequest = writeMemoryRequest; - } - - @JsonProperty("WriteMemoryResponse") - public Object getWriteMemoryResponse() { - return writeMemoryResponse; - } - - @JsonProperty("WriteMemoryResponse") - public void setWriteMemoryResponse(Object writeMemoryResponse) { - this.writeMemoryResponse = writeMemoryResponse; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DebugProtocol.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("attachRequest"); - sb.append('='); - sb.append(((this.attachRequest == null)?"":this.attachRequest)); - sb.append(','); - sb.append("attachRequestArguments"); - sb.append('='); - sb.append(((this.attachRequestArguments == null)?"":this.attachRequestArguments)); - sb.append(','); - sb.append("attachResponse"); - sb.append('='); - sb.append(((this.attachResponse == null)?"":this.attachResponse)); - sb.append(','); - sb.append("breakpoint"); - sb.append('='); - sb.append(((this.breakpoint == null)?"":this.breakpoint)); - sb.append(','); - sb.append("breakpointEvent"); - sb.append('='); - sb.append(((this.breakpointEvent == null)?"":this.breakpointEvent)); - sb.append(','); - sb.append("breakpointLocation"); - sb.append('='); - sb.append(((this.breakpointLocation == null)?"":this.breakpointLocation)); - sb.append(','); - sb.append("breakpointLocationsArguments"); - sb.append('='); - sb.append(((this.breakpointLocationsArguments == null)?"":this.breakpointLocationsArguments)); - sb.append(','); - sb.append("breakpointLocationsRequest"); - sb.append('='); - sb.append(((this.breakpointLocationsRequest == null)?"":this.breakpointLocationsRequest)); - sb.append(','); - sb.append("breakpointLocationsResponse"); - sb.append('='); - sb.append(((this.breakpointLocationsResponse == null)?"":this.breakpointLocationsResponse)); - sb.append(','); - sb.append("cancelArguments"); - sb.append('='); - sb.append(((this.cancelArguments == null)?"":this.cancelArguments)); - sb.append(','); - sb.append("cancelRequest"); - sb.append('='); - sb.append(((this.cancelRequest == null)?"":this.cancelRequest)); - sb.append(','); - sb.append("cancelResponse"); - sb.append('='); - sb.append(((this.cancelResponse == null)?"":this.cancelResponse)); - sb.append(','); - sb.append("capabilities"); - sb.append('='); - sb.append(((this.capabilities == null)?"":this.capabilities)); - sb.append(','); - sb.append("capabilitiesEvent"); - sb.append('='); - sb.append(((this.capabilitiesEvent == null)?"":this.capabilitiesEvent)); - sb.append(','); - sb.append("checksum"); - sb.append('='); - sb.append(((this.checksum == null)?"":this.checksum)); - sb.append(','); - sb.append("checksumAlgorithm"); - sb.append('='); - sb.append(((this.checksumAlgorithm == null)?"":this.checksumAlgorithm)); - sb.append(','); - sb.append("columnDescriptor"); - sb.append('='); - sb.append(((this.columnDescriptor == null)?"":this.columnDescriptor)); - sb.append(','); - sb.append("completionItem"); - sb.append('='); - sb.append(((this.completionItem == null)?"":this.completionItem)); - sb.append(','); - sb.append("completionItemType"); - sb.append('='); - sb.append(((this.completionItemType == null)?"":this.completionItemType)); - sb.append(','); - sb.append("completionsArguments"); - sb.append('='); - sb.append(((this.completionsArguments == null)?"":this.completionsArguments)); - sb.append(','); - sb.append("completionsRequest"); - sb.append('='); - sb.append(((this.completionsRequest == null)?"":this.completionsRequest)); - sb.append(','); - sb.append("completionsResponse"); - sb.append('='); - sb.append(((this.completionsResponse == null)?"":this.completionsResponse)); - sb.append(','); - sb.append("configurationDoneArguments"); - sb.append('='); - sb.append(((this.configurationDoneArguments == null)?"":this.configurationDoneArguments)); - sb.append(','); - sb.append("configurationDoneRequest"); - sb.append('='); - sb.append(((this.configurationDoneRequest == null)?"":this.configurationDoneRequest)); - sb.append(','); - sb.append("configurationDoneResponse"); - sb.append('='); - sb.append(((this.configurationDoneResponse == null)?"":this.configurationDoneResponse)); - sb.append(','); - sb.append("continueArguments"); - sb.append('='); - sb.append(((this.continueArguments == null)?"":this.continueArguments)); - sb.append(','); - sb.append("continueRequest"); - sb.append('='); - sb.append(((this.continueRequest == null)?"":this.continueRequest)); - sb.append(','); - sb.append("continueResponse"); - sb.append('='); - sb.append(((this.continueResponse == null)?"":this.continueResponse)); - sb.append(','); - sb.append("continuedEvent"); - sb.append('='); - sb.append(((this.continuedEvent == null)?"":this.continuedEvent)); - sb.append(','); - sb.append("dataBreakpoint"); - sb.append('='); - sb.append(((this.dataBreakpoint == null)?"":this.dataBreakpoint)); - sb.append(','); - sb.append("dataBreakpointAccessType"); - sb.append('='); - sb.append(((this.dataBreakpointAccessType == null)?"":this.dataBreakpointAccessType)); - sb.append(','); - sb.append("dataBreakpointInfoArguments"); - sb.append('='); - sb.append(((this.dataBreakpointInfoArguments == null)?"":this.dataBreakpointInfoArguments)); - sb.append(','); - sb.append("dataBreakpointInfoRequest"); - sb.append('='); - sb.append(((this.dataBreakpointInfoRequest == null)?"":this.dataBreakpointInfoRequest)); - sb.append(','); - sb.append("dataBreakpointInfoResponse"); - sb.append('='); - sb.append(((this.dataBreakpointInfoResponse == null)?"":this.dataBreakpointInfoResponse)); - sb.append(','); - sb.append("disassembleArguments"); - sb.append('='); - sb.append(((this.disassembleArguments == null)?"":this.disassembleArguments)); - sb.append(','); - sb.append("disassembleRequest"); - sb.append('='); - sb.append(((this.disassembleRequest == null)?"":this.disassembleRequest)); - sb.append(','); - sb.append("disassembleResponse"); - sb.append('='); - sb.append(((this.disassembleResponse == null)?"":this.disassembleResponse)); - sb.append(','); - sb.append("disassembledInstruction"); - sb.append('='); - sb.append(((this.disassembledInstruction == null)?"":this.disassembledInstruction)); - sb.append(','); - sb.append("disconnectArguments"); - sb.append('='); - sb.append(((this.disconnectArguments == null)?"":this.disconnectArguments)); - sb.append(','); - sb.append("disconnectRequest"); - sb.append('='); - sb.append(((this.disconnectRequest == null)?"":this.disconnectRequest)); - sb.append(','); - sb.append("disconnectResponse"); - sb.append('='); - sb.append(((this.disconnectResponse == null)?"":this.disconnectResponse)); - sb.append(','); - sb.append("errorResponse"); - sb.append('='); - sb.append(((this.errorResponse == null)?"":this.errorResponse)); - sb.append(','); - sb.append("evaluateArguments"); - sb.append('='); - sb.append(((this.evaluateArguments == null)?"":this.evaluateArguments)); - sb.append(','); - sb.append("evaluateRequest"); - sb.append('='); - sb.append(((this.evaluateRequest == null)?"":this.evaluateRequest)); - sb.append(','); - sb.append("evaluateResponse"); - sb.append('='); - sb.append(((this.evaluateResponse == null)?"":this.evaluateResponse)); - sb.append(','); - sb.append("event"); - sb.append('='); - sb.append(((this.event == null)?"":this.event)); - sb.append(','); - sb.append("exceptionBreakMode"); - sb.append('='); - sb.append(((this.exceptionBreakMode == null)?"":this.exceptionBreakMode)); - sb.append(','); - sb.append("exceptionBreakpointsFilter"); - sb.append('='); - sb.append(((this.exceptionBreakpointsFilter == null)?"":this.exceptionBreakpointsFilter)); - sb.append(','); - sb.append("exceptionDetails"); - sb.append('='); - sb.append(((this.exceptionDetails == null)?"":this.exceptionDetails)); - sb.append(','); - sb.append("exceptionFilterOptions"); - sb.append('='); - sb.append(((this.exceptionFilterOptions == null)?"":this.exceptionFilterOptions)); - sb.append(','); - sb.append("exceptionInfoArguments"); - sb.append('='); - sb.append(((this.exceptionInfoArguments == null)?"":this.exceptionInfoArguments)); - sb.append(','); - sb.append("exceptionInfoRequest"); - sb.append('='); - sb.append(((this.exceptionInfoRequest == null)?"":this.exceptionInfoRequest)); - sb.append(','); - sb.append("exceptionInfoResponse"); - sb.append('='); - sb.append(((this.exceptionInfoResponse == null)?"":this.exceptionInfoResponse)); - sb.append(','); - sb.append("exceptionOptions"); - sb.append('='); - sb.append(((this.exceptionOptions == null)?"":this.exceptionOptions)); - sb.append(','); - sb.append("exceptionPathSegment"); - sb.append('='); - sb.append(((this.exceptionPathSegment == null)?"":this.exceptionPathSegment)); - sb.append(','); - sb.append("exitedEvent"); - sb.append('='); - sb.append(((this.exitedEvent == null)?"":this.exitedEvent)); - sb.append(','); - sb.append("functionBreakpoint"); - sb.append('='); - sb.append(((this.functionBreakpoint == null)?"":this.functionBreakpoint)); - sb.append(','); - sb.append("gotoArguments"); - sb.append('='); - sb.append(((this.gotoArguments == null)?"":this.gotoArguments)); - sb.append(','); - sb.append("gotoRequest"); - sb.append('='); - sb.append(((this.gotoRequest == null)?"":this.gotoRequest)); - sb.append(','); - sb.append("gotoResponse"); - sb.append('='); - sb.append(((this.gotoResponse == null)?"":this.gotoResponse)); - sb.append(','); - sb.append("gotoTarget"); - sb.append('='); - sb.append(((this.gotoTarget == null)?"":this.gotoTarget)); - sb.append(','); - sb.append("gotoTargetsArguments"); - sb.append('='); - sb.append(((this.gotoTargetsArguments == null)?"":this.gotoTargetsArguments)); - sb.append(','); - sb.append("gotoTargetsRequest"); - sb.append('='); - sb.append(((this.gotoTargetsRequest == null)?"":this.gotoTargetsRequest)); - sb.append(','); - sb.append("gotoTargetsResponse"); - sb.append('='); - sb.append(((this.gotoTargetsResponse == null)?"":this.gotoTargetsResponse)); - sb.append(','); - sb.append("initializeRequest"); - sb.append('='); - sb.append(((this.initializeRequest == null)?"":this.initializeRequest)); - sb.append(','); - sb.append("initializeRequestArguments"); - sb.append('='); - sb.append(((this.initializeRequestArguments == null)?"":this.initializeRequestArguments)); - sb.append(','); - sb.append("initializeResponse"); - sb.append('='); - sb.append(((this.initializeResponse == null)?"":this.initializeResponse)); - sb.append(','); - sb.append("initializedEvent"); - sb.append('='); - sb.append(((this.initializedEvent == null)?"":this.initializedEvent)); - sb.append(','); - sb.append("instructionBreakpoint"); - sb.append('='); - sb.append(((this.instructionBreakpoint == null)?"":this.instructionBreakpoint)); - sb.append(','); - sb.append("invalidatedAreas"); - sb.append('='); - sb.append(((this.invalidatedAreas == null)?"":this.invalidatedAreas)); - sb.append(','); - sb.append("invalidatedEvent"); - sb.append('='); - sb.append(((this.invalidatedEvent == null)?"":this.invalidatedEvent)); - sb.append(','); - sb.append("launchRequest"); - sb.append('='); - sb.append(((this.launchRequest == null)?"":this.launchRequest)); - sb.append(','); - sb.append("launchRequestArguments"); - sb.append('='); - sb.append(((this.launchRequestArguments == null)?"":this.launchRequestArguments)); - sb.append(','); - sb.append("launchResponse"); - sb.append('='); - sb.append(((this.launchResponse == null)?"":this.launchResponse)); - sb.append(','); - sb.append("loadedSourceEvent"); - sb.append('='); - sb.append(((this.loadedSourceEvent == null)?"":this.loadedSourceEvent)); - sb.append(','); - sb.append("loadedSourcesArguments"); - sb.append('='); - sb.append(((this.loadedSourcesArguments == null)?"":this.loadedSourcesArguments)); - sb.append(','); - sb.append("loadedSourcesRequest"); - sb.append('='); - sb.append(((this.loadedSourcesRequest == null)?"":this.loadedSourcesRequest)); - sb.append(','); - sb.append("loadedSourcesResponse"); - sb.append('='); - sb.append(((this.loadedSourcesResponse == null)?"":this.loadedSourcesResponse)); - sb.append(','); - sb.append("memoryEvent"); - sb.append('='); - sb.append(((this.memoryEvent == null)?"":this.memoryEvent)); - sb.append(','); - sb.append("message"); - sb.append('='); - sb.append(((this.message == null)?"":this.message)); - sb.append(','); - sb.append("module"); - sb.append('='); - sb.append(((this.module == null)?"":this.module)); - sb.append(','); - sb.append("moduleEvent"); - sb.append('='); - sb.append(((this.moduleEvent == null)?"":this.moduleEvent)); - sb.append(','); - sb.append("modulesArguments"); - sb.append('='); - sb.append(((this.modulesArguments == null)?"":this.modulesArguments)); - sb.append(','); - sb.append("modulesRequest"); - sb.append('='); - sb.append(((this.modulesRequest == null)?"":this.modulesRequest)); - sb.append(','); - sb.append("modulesResponse"); - sb.append('='); - sb.append(((this.modulesResponse == null)?"":this.modulesResponse)); - sb.append(','); - sb.append("nextArguments"); - sb.append('='); - sb.append(((this.nextArguments == null)?"":this.nextArguments)); - sb.append(','); - sb.append("nextRequest"); - sb.append('='); - sb.append(((this.nextRequest == null)?"":this.nextRequest)); - sb.append(','); - sb.append("nextResponse"); - sb.append('='); - sb.append(((this.nextResponse == null)?"":this.nextResponse)); - sb.append(','); - sb.append("outputEvent"); - sb.append('='); - sb.append(((this.outputEvent == null)?"":this.outputEvent)); - sb.append(','); - sb.append("pauseArguments"); - sb.append('='); - sb.append(((this.pauseArguments == null)?"":this.pauseArguments)); - sb.append(','); - sb.append("pauseRequest"); - sb.append('='); - sb.append(((this.pauseRequest == null)?"":this.pauseRequest)); - sb.append(','); - sb.append("pauseResponse"); - sb.append('='); - sb.append(((this.pauseResponse == null)?"":this.pauseResponse)); - sb.append(','); - sb.append("processEvent"); - sb.append('='); - sb.append(((this.processEvent == null)?"":this.processEvent)); - sb.append(','); - sb.append("progressEndEvent"); - sb.append('='); - sb.append(((this.progressEndEvent == null)?"":this.progressEndEvent)); - sb.append(','); - sb.append("progressStartEvent"); - sb.append('='); - sb.append(((this.progressStartEvent == null)?"":this.progressStartEvent)); - sb.append(','); - sb.append("progressUpdateEvent"); - sb.append('='); - sb.append(((this.progressUpdateEvent == null)?"":this.progressUpdateEvent)); - sb.append(','); - sb.append("protocolMessage"); - sb.append('='); - sb.append(((this.protocolMessage == null)?"":this.protocolMessage)); - sb.append(','); - sb.append("readMemoryArguments"); - sb.append('='); - sb.append(((this.readMemoryArguments == null)?"":this.readMemoryArguments)); - sb.append(','); - sb.append("readMemoryRequest"); - sb.append('='); - sb.append(((this.readMemoryRequest == null)?"":this.readMemoryRequest)); - sb.append(','); - sb.append("readMemoryResponse"); - sb.append('='); - sb.append(((this.readMemoryResponse == null)?"":this.readMemoryResponse)); - sb.append(','); - sb.append("request"); - sb.append('='); - sb.append(((this.request == null)?"":this.request)); - sb.append(','); - sb.append("response"); - sb.append('='); - sb.append(((this.response == null)?"":this.response)); - sb.append(','); - sb.append("restartArguments"); - sb.append('='); - sb.append(((this.restartArguments == null)?"":this.restartArguments)); - sb.append(','); - sb.append("restartFrameArguments"); - sb.append('='); - sb.append(((this.restartFrameArguments == null)?"":this.restartFrameArguments)); - sb.append(','); - sb.append("restartFrameRequest"); - sb.append('='); - sb.append(((this.restartFrameRequest == null)?"":this.restartFrameRequest)); - sb.append(','); - sb.append("restartFrameResponse"); - sb.append('='); - sb.append(((this.restartFrameResponse == null)?"":this.restartFrameResponse)); - sb.append(','); - sb.append("restartRequest"); - sb.append('='); - sb.append(((this.restartRequest == null)?"":this.restartRequest)); - sb.append(','); - sb.append("restartResponse"); - sb.append('='); - sb.append(((this.restartResponse == null)?"":this.restartResponse)); - sb.append(','); - sb.append("reverseContinueArguments"); - sb.append('='); - sb.append(((this.reverseContinueArguments == null)?"":this.reverseContinueArguments)); - sb.append(','); - sb.append("reverseContinueRequest"); - sb.append('='); - sb.append(((this.reverseContinueRequest == null)?"":this.reverseContinueRequest)); - sb.append(','); - sb.append("reverseContinueResponse"); - sb.append('='); - sb.append(((this.reverseContinueResponse == null)?"":this.reverseContinueResponse)); - sb.append(','); - sb.append("runInTerminalRequest"); - sb.append('='); - sb.append(((this.runInTerminalRequest == null)?"":this.runInTerminalRequest)); - sb.append(','); - sb.append("runInTerminalRequestArguments"); - sb.append('='); - sb.append(((this.runInTerminalRequestArguments == null)?"":this.runInTerminalRequestArguments)); - sb.append(','); - sb.append("runInTerminalResponse"); - sb.append('='); - sb.append(((this.runInTerminalResponse == null)?"":this.runInTerminalResponse)); - sb.append(','); - sb.append("scope"); - sb.append('='); - sb.append(((this.scope == null)?"":this.scope)); - sb.append(','); - sb.append("scopesArguments"); - sb.append('='); - sb.append(((this.scopesArguments == null)?"":this.scopesArguments)); - sb.append(','); - sb.append("scopesRequest"); - sb.append('='); - sb.append(((this.scopesRequest == null)?"":this.scopesRequest)); - sb.append(','); - sb.append("scopesResponse"); - sb.append('='); - sb.append(((this.scopesResponse == null)?"":this.scopesResponse)); - sb.append(','); - sb.append("setBreakpointsArguments"); - sb.append('='); - sb.append(((this.setBreakpointsArguments == null)?"":this.setBreakpointsArguments)); - sb.append(','); - sb.append("setBreakpointsRequest"); - sb.append('='); - sb.append(((this.setBreakpointsRequest == null)?"":this.setBreakpointsRequest)); - sb.append(','); - sb.append("setBreakpointsResponse"); - sb.append('='); - sb.append(((this.setBreakpointsResponse == null)?"":this.setBreakpointsResponse)); - sb.append(','); - sb.append("setDataBreakpointsArguments"); - sb.append('='); - sb.append(((this.setDataBreakpointsArguments == null)?"":this.setDataBreakpointsArguments)); - sb.append(','); - sb.append("setDataBreakpointsRequest"); - sb.append('='); - sb.append(((this.setDataBreakpointsRequest == null)?"":this.setDataBreakpointsRequest)); - sb.append(','); - sb.append("setDataBreakpointsResponse"); - sb.append('='); - sb.append(((this.setDataBreakpointsResponse == null)?"":this.setDataBreakpointsResponse)); - sb.append(','); - sb.append("setExceptionBreakpointsArguments"); - sb.append('='); - sb.append(((this.setExceptionBreakpointsArguments == null)?"":this.setExceptionBreakpointsArguments)); - sb.append(','); - sb.append("setExceptionBreakpointsRequest"); - sb.append('='); - sb.append(((this.setExceptionBreakpointsRequest == null)?"":this.setExceptionBreakpointsRequest)); - sb.append(','); - sb.append("setExceptionBreakpointsResponse"); - sb.append('='); - sb.append(((this.setExceptionBreakpointsResponse == null)?"":this.setExceptionBreakpointsResponse)); - sb.append(','); - sb.append("setExpressionArguments"); - sb.append('='); - sb.append(((this.setExpressionArguments == null)?"":this.setExpressionArguments)); - sb.append(','); - sb.append("setExpressionRequest"); - sb.append('='); - sb.append(((this.setExpressionRequest == null)?"":this.setExpressionRequest)); - sb.append(','); - sb.append("setExpressionResponse"); - sb.append('='); - sb.append(((this.setExpressionResponse == null)?"":this.setExpressionResponse)); - sb.append(','); - sb.append("setFunctionBreakpointsArguments"); - sb.append('='); - sb.append(((this.setFunctionBreakpointsArguments == null)?"":this.setFunctionBreakpointsArguments)); - sb.append(','); - sb.append("setFunctionBreakpointsRequest"); - sb.append('='); - sb.append(((this.setFunctionBreakpointsRequest == null)?"":this.setFunctionBreakpointsRequest)); - sb.append(','); - sb.append("setFunctionBreakpointsResponse"); - sb.append('='); - sb.append(((this.setFunctionBreakpointsResponse == null)?"":this.setFunctionBreakpointsResponse)); - sb.append(','); - sb.append("setInstructionBreakpointsArguments"); - sb.append('='); - sb.append(((this.setInstructionBreakpointsArguments == null)?"":this.setInstructionBreakpointsArguments)); - sb.append(','); - sb.append("setInstructionBreakpointsRequest"); - sb.append('='); - sb.append(((this.setInstructionBreakpointsRequest == null)?"":this.setInstructionBreakpointsRequest)); - sb.append(','); - sb.append("setInstructionBreakpointsResponse"); - sb.append('='); - sb.append(((this.setInstructionBreakpointsResponse == null)?"":this.setInstructionBreakpointsResponse)); - sb.append(','); - sb.append("setVariableArguments"); - sb.append('='); - sb.append(((this.setVariableArguments == null)?"":this.setVariableArguments)); - sb.append(','); - sb.append("setVariableRequest"); - sb.append('='); - sb.append(((this.setVariableRequest == null)?"":this.setVariableRequest)); - sb.append(','); - sb.append("setVariableResponse"); - sb.append('='); - sb.append(((this.setVariableResponse == null)?"":this.setVariableResponse)); - sb.append(','); - sb.append("source"); - sb.append('='); - sb.append(((this.source == null)?"":this.source)); - sb.append(','); - sb.append("sourceArguments"); - sb.append('='); - sb.append(((this.sourceArguments == null)?"":this.sourceArguments)); - sb.append(','); - sb.append("sourceBreakpoint"); - sb.append('='); - sb.append(((this.sourceBreakpoint == null)?"":this.sourceBreakpoint)); - sb.append(','); - sb.append("sourceRequest"); - sb.append('='); - sb.append(((this.sourceRequest == null)?"":this.sourceRequest)); - sb.append(','); - sb.append("sourceResponse"); - sb.append('='); - sb.append(((this.sourceResponse == null)?"":this.sourceResponse)); - sb.append(','); - sb.append("stackFrame"); - sb.append('='); - sb.append(((this.stackFrame == null)?"":this.stackFrame)); - sb.append(','); - sb.append("stackFrameFormat"); - sb.append('='); - sb.append(((this.stackFrameFormat == null)?"":this.stackFrameFormat)); - sb.append(','); - sb.append("stackTraceArguments"); - sb.append('='); - sb.append(((this.stackTraceArguments == null)?"":this.stackTraceArguments)); - sb.append(','); - sb.append("stackTraceRequest"); - sb.append('='); - sb.append(((this.stackTraceRequest == null)?"":this.stackTraceRequest)); - sb.append(','); - sb.append("stackTraceResponse"); - sb.append('='); - sb.append(((this.stackTraceResponse == null)?"":this.stackTraceResponse)); - sb.append(','); - sb.append("startDebuggingRequest"); - sb.append('='); - sb.append(((this.startDebuggingRequest == null)?"":this.startDebuggingRequest)); - sb.append(','); - sb.append("startDebuggingRequestArguments"); - sb.append('='); - sb.append(((this.startDebuggingRequestArguments == null)?"":this.startDebuggingRequestArguments)); - sb.append(','); - sb.append("startDebuggingResponse"); - sb.append('='); - sb.append(((this.startDebuggingResponse == null)?"":this.startDebuggingResponse)); - sb.append(','); - sb.append("stepBackArguments"); - sb.append('='); - sb.append(((this.stepBackArguments == null)?"":this.stepBackArguments)); - sb.append(','); - sb.append("stepBackRequest"); - sb.append('='); - sb.append(((this.stepBackRequest == null)?"":this.stepBackRequest)); - sb.append(','); - sb.append("stepBackResponse"); - sb.append('='); - sb.append(((this.stepBackResponse == null)?"":this.stepBackResponse)); - sb.append(','); - sb.append("stepInArguments"); - sb.append('='); - sb.append(((this.stepInArguments == null)?"":this.stepInArguments)); - sb.append(','); - sb.append("stepInRequest"); - sb.append('='); - sb.append(((this.stepInRequest == null)?"":this.stepInRequest)); - sb.append(','); - sb.append("stepInResponse"); - sb.append('='); - sb.append(((this.stepInResponse == null)?"":this.stepInResponse)); - sb.append(','); - sb.append("stepInTarget"); - sb.append('='); - sb.append(((this.stepInTarget == null)?"":this.stepInTarget)); - sb.append(','); - sb.append("stepInTargetsArguments"); - sb.append('='); - sb.append(((this.stepInTargetsArguments == null)?"":this.stepInTargetsArguments)); - sb.append(','); - sb.append("stepInTargetsRequest"); - sb.append('='); - sb.append(((this.stepInTargetsRequest == null)?"":this.stepInTargetsRequest)); - sb.append(','); - sb.append("stepInTargetsResponse"); - sb.append('='); - sb.append(((this.stepInTargetsResponse == null)?"":this.stepInTargetsResponse)); - sb.append(','); - sb.append("stepOutArguments"); - sb.append('='); - sb.append(((this.stepOutArguments == null)?"":this.stepOutArguments)); - sb.append(','); - sb.append("stepOutRequest"); - sb.append('='); - sb.append(((this.stepOutRequest == null)?"":this.stepOutRequest)); - sb.append(','); - sb.append("stepOutResponse"); - sb.append('='); - sb.append(((this.stepOutResponse == null)?"":this.stepOutResponse)); - sb.append(','); - sb.append("steppingGranularity"); - sb.append('='); - sb.append(((this.steppingGranularity == null)?"":this.steppingGranularity)); - sb.append(','); - sb.append("stoppedEvent"); - sb.append('='); - sb.append(((this.stoppedEvent == null)?"":this.stoppedEvent)); - sb.append(','); - sb.append("terminateArguments"); - sb.append('='); - sb.append(((this.terminateArguments == null)?"":this.terminateArguments)); - sb.append(','); - sb.append("terminateRequest"); - sb.append('='); - sb.append(((this.terminateRequest == null)?"":this.terminateRequest)); - sb.append(','); - sb.append("terminateResponse"); - sb.append('='); - sb.append(((this.terminateResponse == null)?"":this.terminateResponse)); - sb.append(','); - sb.append("terminateThreadsArguments"); - sb.append('='); - sb.append(((this.terminateThreadsArguments == null)?"":this.terminateThreadsArguments)); - sb.append(','); - sb.append("terminateThreadsRequest"); - sb.append('='); - sb.append(((this.terminateThreadsRequest == null)?"":this.terminateThreadsRequest)); - sb.append(','); - sb.append("terminateThreadsResponse"); - sb.append('='); - sb.append(((this.terminateThreadsResponse == null)?"":this.terminateThreadsResponse)); - sb.append(','); - sb.append("terminatedEvent"); - sb.append('='); - sb.append(((this.terminatedEvent == null)?"":this.terminatedEvent)); - sb.append(','); - sb.append("thread"); - sb.append('='); - sb.append(((this.thread == null)?"":this.thread)); - sb.append(','); - sb.append("threadEvent"); - sb.append('='); - sb.append(((this.threadEvent == null)?"":this.threadEvent)); - sb.append(','); - sb.append("threadsRequest"); - sb.append('='); - sb.append(((this.threadsRequest == null)?"":this.threadsRequest)); - sb.append(','); - sb.append("threadsResponse"); - sb.append('='); - sb.append(((this.threadsResponse == null)?"":this.threadsResponse)); - sb.append(','); - sb.append("valueFormat"); - sb.append('='); - sb.append(((this.valueFormat == null)?"":this.valueFormat)); - sb.append(','); - sb.append("variable"); - sb.append('='); - sb.append(((this.variable == null)?"":this.variable)); - sb.append(','); - sb.append("variablePresentationHint"); - sb.append('='); - sb.append(((this.variablePresentationHint == null)?"":this.variablePresentationHint)); - sb.append(','); - sb.append("variablesArguments"); - sb.append('='); - sb.append(((this.variablesArguments == null)?"":this.variablesArguments)); - sb.append(','); - sb.append("variablesRequest"); - sb.append('='); - sb.append(((this.variablesRequest == null)?"":this.variablesRequest)); - sb.append(','); - sb.append("variablesResponse"); - sb.append('='); - sb.append(((this.variablesResponse == null)?"":this.variablesResponse)); - sb.append(','); - sb.append("writeMemoryArguments"); - sb.append('='); - sb.append(((this.writeMemoryArguments == null)?"":this.writeMemoryArguments)); - sb.append(','); - sb.append("writeMemoryRequest"); - sb.append('='); - sb.append(((this.writeMemoryRequest == null)?"":this.writeMemoryRequest)); - sb.append(','); - sb.append("writeMemoryResponse"); - sb.append('='); - sb.append(((this.writeMemoryResponse == null)?"":this.writeMemoryResponse)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.setFunctionBreakpointsResponse == null)? 0 :this.setFunctionBreakpointsResponse.hashCode())); - result = ((result* 31)+((this.breakpointLocation == null)? 0 :this.breakpointLocation.hashCode())); - result = ((result* 31)+((this.sourceRequest == null)? 0 :this.sourceRequest.hashCode())); - result = ((result* 31)+((this.writeMemoryArguments == null)? 0 :this.writeMemoryArguments.hashCode())); - result = ((result* 31)+((this.continueArguments == null)? 0 :this.continueArguments.hashCode())); - result = ((result* 31)+((this.processEvent == null)? 0 :this.processEvent.hashCode())); - result = ((result* 31)+((this.stepInTargetsArguments == null)? 0 :this.stepInTargetsArguments.hashCode())); - result = ((result* 31)+((this.terminateThreadsRequest == null)? 0 :this.terminateThreadsRequest.hashCode())); - result = ((result* 31)+((this.exceptionInfoResponse == null)? 0 :this.exceptionInfoResponse.hashCode())); - result = ((result* 31)+((this.progressEndEvent == null)? 0 :this.progressEndEvent.hashCode())); - result = ((result* 31)+((this.sourceResponse == null)? 0 :this.sourceResponse.hashCode())); - result = ((result* 31)+((this.setExceptionBreakpointsResponse == null)? 0 :this.setExceptionBreakpointsResponse.hashCode())); - result = ((result* 31)+((this.instructionBreakpoint == null)? 0 :this.instructionBreakpoint.hashCode())); - result = ((result* 31)+((this.restartArguments == null)? 0 :this.restartArguments.hashCode())); - result = ((result* 31)+((this.loadedSourcesArguments == null)? 0 :this.loadedSourcesArguments.hashCode())); - result = ((result* 31)+((this.loadedSourcesResponse == null)? 0 :this.loadedSourcesResponse.hashCode())); - result = ((result* 31)+((this.stepOutArguments == null)? 0 :this.stepOutArguments.hashCode())); - result = ((result* 31)+((this.launchRequestArguments == null)? 0 :this.launchRequestArguments.hashCode())); - result = ((result* 31)+((this.stepInArguments == null)? 0 :this.stepInArguments.hashCode())); - result = ((result* 31)+((this.threadEvent == null)? 0 :this.threadEvent.hashCode())); - result = ((result* 31)+((this.readMemoryArguments == null)? 0 :this.readMemoryArguments.hashCode())); - result = ((result* 31)+((this.setInstructionBreakpointsRequest == null)? 0 :this.setInstructionBreakpointsRequest.hashCode())); - result = ((result* 31)+((this.disassembleArguments == null)? 0 :this.disassembleArguments.hashCode())); - result = ((result* 31)+((this.protocolMessage == null)? 0 :this.protocolMessage.hashCode())); - result = ((result* 31)+((this.setInstructionBreakpointsResponse == null)? 0 :this.setInstructionBreakpointsResponse.hashCode())); - result = ((result* 31)+((this.exceptionInfoArguments == null)? 0 :this.exceptionInfoArguments.hashCode())); - result = ((result* 31)+((this.exceptionDetails == null)? 0 :this.exceptionDetails.hashCode())); - result = ((result* 31)+((this.module == null)? 0 :this.module.hashCode())); - result = ((result* 31)+((this.steppingGranularity == null)? 0 :this.steppingGranularity.hashCode())); - result = ((result* 31)+((this.gotoTarget == null)? 0 :this.gotoTarget.hashCode())); - result = ((result* 31)+((this.setVariableRequest == null)? 0 :this.setVariableRequest.hashCode())); - result = ((result* 31)+((this.setFunctionBreakpointsArguments == null)? 0 :this.setFunctionBreakpointsArguments.hashCode())); - result = ((result* 31)+((this.stackTraceArguments == null)? 0 :this.stackTraceArguments.hashCode())); - result = ((result* 31)+((this.gotoTargetsResponse == null)? 0 :this.gotoTargetsResponse.hashCode())); - result = ((result* 31)+((this.setExceptionBreakpointsArguments == null)? 0 :this.setExceptionBreakpointsArguments.hashCode())); - result = ((result* 31)+((this.reverseContinueArguments == null)? 0 :this.reverseContinueArguments.hashCode())); - result = ((result* 31)+((this.terminateArguments == null)? 0 :this.terminateArguments.hashCode())); - result = ((result* 31)+((this.configurationDoneRequest == null)? 0 :this.configurationDoneRequest.hashCode())); - result = ((result* 31)+((this.continueRequest == null)? 0 :this.continueRequest.hashCode())); - result = ((result* 31)+((this.sourceArguments == null)? 0 :this.sourceArguments.hashCode())); - result = ((result* 31)+((this.memoryEvent == null)? 0 :this.memoryEvent.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.exceptionFilterOptions == null)? 0 :this.exceptionFilterOptions.hashCode())); - result = ((result* 31)+((this.setExceptionBreakpointsRequest == null)? 0 :this.setExceptionBreakpointsRequest.hashCode())); - result = ((result* 31)+((this.restartRequest == null)? 0 :this.restartRequest.hashCode())); - result = ((result* 31)+((this.setVariableResponse == null)? 0 :this.setVariableResponse.hashCode())); - result = ((result* 31)+((this.cancelResponse == null)? 0 :this.cancelResponse.hashCode())); - result = ((result* 31)+((this.setBreakpointsRequest == null)? 0 :this.setBreakpointsRequest.hashCode())); - result = ((result* 31)+((this.stepInTargetsRequest == null)? 0 :this.stepInTargetsRequest.hashCode())); - result = ((result* 31)+((this.dataBreakpointInfoRequest == null)? 0 :this.dataBreakpointInfoRequest.hashCode())); - result = ((result* 31)+((this.scopesArguments == null)? 0 :this.scopesArguments.hashCode())); - result = ((result* 31)+((this.readMemoryRequest == null)? 0 :this.readMemoryRequest.hashCode())); - result = ((result* 31)+((this.breakpointLocationsResponse == null)? 0 :this.breakpointLocationsResponse.hashCode())); - result = ((result* 31)+((this.restartFrameArguments == null)? 0 :this.restartFrameArguments.hashCode())); - result = ((result* 31)+((this.breakpointLocationsArguments == null)? 0 :this.breakpointLocationsArguments.hashCode())); - result = ((result* 31)+((this.evaluateResponse == null)? 0 :this.evaluateResponse.hashCode())); - result = ((result* 31)+((this.runInTerminalRequest == null)? 0 :this.runInTerminalRequest.hashCode())); - result = ((result* 31)+((this.reverseContinueRequest == null)? 0 :this.reverseContinueRequest.hashCode())); - result = ((result* 31)+((this.restartFrameResponse == null)? 0 :this.restartFrameResponse.hashCode())); - result = ((result* 31)+((this.invalidatedEvent == null)? 0 :this.invalidatedEvent.hashCode())); - result = ((result* 31)+((this.breakpointEvent == null)? 0 :this.breakpointEvent.hashCode())); - result = ((result* 31)+((this.loadedSourceEvent == null)? 0 :this.loadedSourceEvent.hashCode())); - result = ((result* 31)+((this.runInTerminalResponse == null)? 0 :this.runInTerminalResponse.hashCode())); - result = ((result* 31)+((this.readMemoryResponse == null)? 0 :this.readMemoryResponse.hashCode())); - result = ((result* 31)+((this.startDebuggingResponse == null)? 0 :this.startDebuggingResponse.hashCode())); - result = ((result* 31)+((this.modulesResponse == null)? 0 :this.modulesResponse.hashCode())); - result = ((result* 31)+((this.dataBreakpointAccessType == null)? 0 :this.dataBreakpointAccessType.hashCode())); - result = ((result* 31)+((this.disassembleResponse == null)? 0 :this.disassembleResponse.hashCode())); - result = ((result* 31)+((this.exceptionPathSegment == null)? 0 :this.exceptionPathSegment.hashCode())); - result = ((result* 31)+((this.completionsArguments == null)? 0 :this.completionsArguments.hashCode())); - result = ((result* 31)+((this.completionItem == null)? 0 :this.completionItem.hashCode())); - result = ((result* 31)+((this.event == null)? 0 :this.event.hashCode())); - result = ((result* 31)+((this.stepBackRequest == null)? 0 :this.stepBackRequest.hashCode())); - result = ((result* 31)+((this.evaluateArguments == null)? 0 :this.evaluateArguments.hashCode())); - result = ((result* 31)+((this.stepInTarget == null)? 0 :this.stepInTarget.hashCode())); - result = ((result* 31)+((this.dataBreakpointInfoArguments == null)? 0 :this.dataBreakpointInfoArguments.hashCode())); - result = ((result* 31)+((this.nextArguments == null)? 0 :this.nextArguments.hashCode())); - result = ((result* 31)+((this.progressUpdateEvent == null)? 0 :this.progressUpdateEvent.hashCode())); - result = ((result* 31)+((this.setDataBreakpointsArguments == null)? 0 :this.setDataBreakpointsArguments.hashCode())); - result = ((result* 31)+((this.exitedEvent == null)? 0 :this.exitedEvent.hashCode())); - result = ((result* 31)+((this.terminateRequest == null)? 0 :this.terminateRequest.hashCode())); - result = ((result* 31)+((this.launchResponse == null)? 0 :this.launchResponse.hashCode())); - result = ((result* 31)+((this.gotoArguments == null)? 0 :this.gotoArguments.hashCode())); - result = ((result* 31)+((this.setDataBreakpointsResponse == null)? 0 :this.setDataBreakpointsResponse.hashCode())); - result = ((result* 31)+((this.valueFormat == null)? 0 :this.valueFormat.hashCode())); - result = ((result* 31)+((this.runInTerminalRequestArguments == null)? 0 :this.runInTerminalRequestArguments.hashCode())); - result = ((result* 31)+((this.variablePresentationHint == null)? 0 :this.variablePresentationHint.hashCode())); - result = ((result* 31)+((this.breakpoint == null)? 0 :this.breakpoint.hashCode())); - result = ((result* 31)+((this.variablesResponse == null)? 0 :this.variablesResponse.hashCode())); - result = ((result* 31)+((this.stepOutResponse == null)? 0 :this.stepOutResponse.hashCode())); - result = ((result* 31)+((this.continueResponse == null)? 0 :this.continueResponse.hashCode())); - result = ((result* 31)+((this.writeMemoryResponse == null)? 0 :this.writeMemoryResponse.hashCode())); - result = ((result* 31)+((this.setBreakpointsResponse == null)? 0 :this.setBreakpointsResponse.hashCode())); - result = ((result* 31)+((this.outputEvent == null)? 0 :this.outputEvent.hashCode())); - result = ((result* 31)+((this.columnDescriptor == null)? 0 :this.columnDescriptor.hashCode())); - result = ((result* 31)+((this.scopesRequest == null)? 0 :this.scopesRequest.hashCode())); - result = ((result* 31)+((this.attachRequestArguments == null)? 0 :this.attachRequestArguments.hashCode())); - result = ((result* 31)+((this.stepInResponse == null)? 0 :this.stepInResponse.hashCode())); - result = ((result* 31)+((this.setInstructionBreakpointsArguments == null)? 0 :this.setInstructionBreakpointsArguments.hashCode())); - result = ((result* 31)+((this.launchRequest == null)? 0 :this.launchRequest.hashCode())); - result = ((result* 31)+((this.variablesRequest == null)? 0 :this.variablesRequest.hashCode())); - result = ((result* 31)+((this.modulesArguments == null)? 0 :this.modulesArguments.hashCode())); - result = ((result* 31)+((this.startDebuggingRequest == null)? 0 :this.startDebuggingRequest.hashCode())); - result = ((result* 31)+((this.continuedEvent == null)? 0 :this.continuedEvent.hashCode())); - result = ((result* 31)+((this.exceptionInfoRequest == null)? 0 :this.exceptionInfoRequest.hashCode())); - result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); - result = ((result* 31)+((this.terminatedEvent == null)? 0 :this.terminatedEvent.hashCode())); - result = ((result* 31)+((this.stackFrameFormat == null)? 0 :this.stackFrameFormat.hashCode())); - result = ((result* 31)+((this.exceptionBreakpointsFilter == null)? 0 :this.exceptionBreakpointsFilter.hashCode())); - result = ((result* 31)+((this.capabilitiesEvent == null)? 0 :this.capabilitiesEvent.hashCode())); - result = ((result* 31)+((this.disassembledInstruction == null)? 0 :this.disassembledInstruction.hashCode())); - result = ((result* 31)+((this.threadsResponse == null)? 0 :this.threadsResponse.hashCode())); - result = ((result* 31)+((this.variablesArguments == null)? 0 :this.variablesArguments.hashCode())); - result = ((result* 31)+((this.setBreakpointsArguments == null)? 0 :this.setBreakpointsArguments.hashCode())); - result = ((result* 31)+((this.cancelRequest == null)? 0 :this.cancelRequest.hashCode())); - result = ((result* 31)+((this.stepBackArguments == null)? 0 :this.stepBackArguments.hashCode())); - result = ((result* 31)+((this.attachRequest == null)? 0 :this.attachRequest.hashCode())); - result = ((result* 31)+((this.terminateThreadsArguments == null)? 0 :this.terminateThreadsArguments.hashCode())); - result = ((result* 31)+((this.gotoRequest == null)? 0 :this.gotoRequest.hashCode())); - result = ((result* 31)+((this.initializeRequest == null)? 0 :this.initializeRequest.hashCode())); - result = ((result* 31)+((this.startDebuggingRequestArguments == null)? 0 :this.startDebuggingRequestArguments.hashCode())); - result = ((result* 31)+((this.functionBreakpoint == null)? 0 :this.functionBreakpoint.hashCode())); - result = ((result* 31)+((this.scopesResponse == null)? 0 :this.scopesResponse.hashCode())); - result = ((result* 31)+((this.evaluateRequest == null)? 0 :this.evaluateRequest.hashCode())); - result = ((result* 31)+((this.disassembleRequest == null)? 0 :this.disassembleRequest.hashCode())); - result = ((result* 31)+((this.pauseArguments == null)? 0 :this.pauseArguments.hashCode())); - result = ((result* 31)+((this.pauseRequest == null)? 0 :this.pauseRequest.hashCode())); - result = ((result* 31)+((this.setFunctionBreakpointsRequest == null)? 0 :this.setFunctionBreakpointsRequest.hashCode())); - result = ((result* 31)+((this.dataBreakpointInfoResponse == null)? 0 :this.dataBreakpointInfoResponse.hashCode())); - result = ((result* 31)+((this.gotoTargetsRequest == null)? 0 :this.gotoTargetsRequest.hashCode())); - result = ((result* 31)+((this.setVariableArguments == null)? 0 :this.setVariableArguments.hashCode())); - result = ((result* 31)+((this.disconnectRequest == null)? 0 :this.disconnectRequest.hashCode())); - result = ((result* 31)+((this.stepInRequest == null)? 0 :this.stepInRequest.hashCode())); - result = ((result* 31)+((this.exceptionBreakMode == null)? 0 :this.exceptionBreakMode.hashCode())); - result = ((result* 31)+((this.request == null)? 0 :this.request.hashCode())); - result = ((result* 31)+((this.loadedSourcesRequest == null)? 0 :this.loadedSourcesRequest.hashCode())); - result = ((result* 31)+((this.cancelArguments == null)? 0 :this.cancelArguments.hashCode())); - result = ((result* 31)+((this.configurationDoneArguments == null)? 0 :this.configurationDoneArguments.hashCode())); - result = ((result* 31)+((this.nextResponse == null)? 0 :this.nextResponse.hashCode())); - result = ((result* 31)+((this.stackFrame == null)? 0 :this.stackFrame.hashCode())); - result = ((result* 31)+((this.restartFrameRequest == null)? 0 :this.restartFrameRequest.hashCode())); - result = ((result* 31)+((this.setExpressionArguments == null)? 0 :this.setExpressionArguments.hashCode())); - result = ((result* 31)+((this.exceptionOptions == null)? 0 :this.exceptionOptions.hashCode())); - result = ((result* 31)+((this.completionsRequest == null)? 0 :this.completionsRequest.hashCode())); - result = ((result* 31)+((this.sourceBreakpoint == null)? 0 :this.sourceBreakpoint.hashCode())); - result = ((result* 31)+((this.moduleEvent == null)? 0 :this.moduleEvent.hashCode())); - result = ((result* 31)+((this.reverseContinueResponse == null)? 0 :this.reverseContinueResponse.hashCode())); - result = ((result* 31)+((this.setExpressionRequest == null)? 0 :this.setExpressionRequest.hashCode())); - result = ((result* 31)+((this.scope == null)? 0 :this.scope.hashCode())); - result = ((result* 31)+((this.checksum == null)? 0 :this.checksum.hashCode())); - result = ((result* 31)+((this.invalidatedAreas == null)? 0 :this.invalidatedAreas.hashCode())); - result = ((result* 31)+((this.breakpointLocationsRequest == null)? 0 :this.breakpointLocationsRequest.hashCode())); - result = ((result* 31)+((this.modulesRequest == null)? 0 :this.modulesRequest.hashCode())); - result = ((result* 31)+((this.disconnectArguments == null)? 0 :this.disconnectArguments.hashCode())); - result = ((result* 31)+((this.pauseResponse == null)? 0 :this.pauseResponse.hashCode())); - result = ((result* 31)+((this.capabilities == null)? 0 :this.capabilities.hashCode())); - result = ((result* 31)+((this.gotoResponse == null)? 0 :this.gotoResponse.hashCode())); - result = ((result* 31)+((this.dataBreakpoint == null)? 0 :this.dataBreakpoint.hashCode())); - result = ((result* 31)+((this.completionsResponse == null)? 0 :this.completionsResponse.hashCode())); - result = ((result* 31)+((this.stepOutRequest == null)? 0 :this.stepOutRequest.hashCode())); - result = ((result* 31)+((this.threadsRequest == null)? 0 :this.threadsRequest.hashCode())); - result = ((result* 31)+((this.checksumAlgorithm == null)? 0 :this.checksumAlgorithm.hashCode())); - result = ((result* 31)+((this.setDataBreakpointsRequest == null)? 0 :this.setDataBreakpointsRequest.hashCode())); - result = ((result* 31)+((this.thread == null)? 0 :this.thread.hashCode())); - result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); - result = ((result* 31)+((this.stackTraceRequest == null)? 0 :this.stackTraceRequest.hashCode())); - result = ((result* 31)+((this.terminateThreadsResponse == null)? 0 :this.terminateThreadsResponse.hashCode())); - result = ((result* 31)+((this.completionItemType == null)? 0 :this.completionItemType.hashCode())); - result = ((result* 31)+((this.errorResponse == null)? 0 :this.errorResponse.hashCode())); - result = ((result* 31)+((this.restartResponse == null)? 0 :this.restartResponse.hashCode())); - result = ((result* 31)+((this.initializeResponse == null)? 0 :this.initializeResponse.hashCode())); - result = ((result* 31)+((this.attachResponse == null)? 0 :this.attachResponse.hashCode())); - result = ((result* 31)+((this.stepInTargetsResponse == null)? 0 :this.stepInTargetsResponse.hashCode())); - result = ((result* 31)+((this.stackTraceResponse == null)? 0 :this.stackTraceResponse.hashCode())); - result = ((result* 31)+((this.writeMemoryRequest == null)? 0 :this.writeMemoryRequest.hashCode())); - result = ((result* 31)+((this.stoppedEvent == null)? 0 :this.stoppedEvent.hashCode())); - result = ((result* 31)+((this.response == null)? 0 :this.response.hashCode())); - result = ((result* 31)+((this.disconnectResponse == null)? 0 :this.disconnectResponse.hashCode())); - result = ((result* 31)+((this.initializedEvent == null)? 0 :this.initializedEvent.hashCode())); - result = ((result* 31)+((this.progressStartEvent == null)? 0 :this.progressStartEvent.hashCode())); - result = ((result* 31)+((this.variable == null)? 0 :this.variable.hashCode())); - result = ((result* 31)+((this.gotoTargetsArguments == null)? 0 :this.gotoTargetsArguments.hashCode())); - result = ((result* 31)+((this.stepBackResponse == null)? 0 :this.stepBackResponse.hashCode())); - result = ((result* 31)+((this.initializeRequestArguments == null)? 0 :this.initializeRequestArguments.hashCode())); - result = ((result* 31)+((this.configurationDoneResponse == null)? 0 :this.configurationDoneResponse.hashCode())); - result = ((result* 31)+((this.nextRequest == null)? 0 :this.nextRequest.hashCode())); - result = ((result* 31)+((this.terminateResponse == null)? 0 :this.terminateResponse.hashCode())); - result = ((result* 31)+((this.setExpressionResponse == null)? 0 :this.setExpressionResponse.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof DebugProtocol) == false) { - return false; - } - DebugProtocol rhs = ((DebugProtocol) other); - return (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((this.setFunctionBreakpointsResponse == rhs.setFunctionBreakpointsResponse)||((this.setFunctionBreakpointsResponse!= null)&&this.setFunctionBreakpointsResponse.equals(rhs.setFunctionBreakpointsResponse)))&&((this.breakpointLocation == rhs.breakpointLocation)||((this.breakpointLocation!= null)&&this.breakpointLocation.equals(rhs.breakpointLocation))))&&((this.sourceRequest == rhs.sourceRequest)||((this.sourceRequest!= null)&&this.sourceRequest.equals(rhs.sourceRequest))))&&((this.writeMemoryArguments == rhs.writeMemoryArguments)||((this.writeMemoryArguments!= null)&&this.writeMemoryArguments.equals(rhs.writeMemoryArguments))))&&((this.continueArguments == rhs.continueArguments)||((this.continueArguments!= null)&&this.continueArguments.equals(rhs.continueArguments))))&&((this.processEvent == rhs.processEvent)||((this.processEvent!= null)&&this.processEvent.equals(rhs.processEvent))))&&((this.stepInTargetsArguments == rhs.stepInTargetsArguments)||((this.stepInTargetsArguments!= null)&&this.stepInTargetsArguments.equals(rhs.stepInTargetsArguments))))&&((this.terminateThreadsRequest == rhs.terminateThreadsRequest)||((this.terminateThreadsRequest!= null)&&this.terminateThreadsRequest.equals(rhs.terminateThreadsRequest))))&&((this.exceptionInfoResponse == rhs.exceptionInfoResponse)||((this.exceptionInfoResponse!= null)&&this.exceptionInfoResponse.equals(rhs.exceptionInfoResponse))))&&((this.progressEndEvent == rhs.progressEndEvent)||((this.progressEndEvent!= null)&&this.progressEndEvent.equals(rhs.progressEndEvent))))&&((this.sourceResponse == rhs.sourceResponse)||((this.sourceResponse!= null)&&this.sourceResponse.equals(rhs.sourceResponse))))&&((this.setExceptionBreakpointsResponse == rhs.setExceptionBreakpointsResponse)||((this.setExceptionBreakpointsResponse!= null)&&this.setExceptionBreakpointsResponse.equals(rhs.setExceptionBreakpointsResponse))))&&((this.instructionBreakpoint == rhs.instructionBreakpoint)||((this.instructionBreakpoint!= null)&&this.instructionBreakpoint.equals(rhs.instructionBreakpoint))))&&((this.restartArguments == rhs.restartArguments)||((this.restartArguments!= null)&&this.restartArguments.equals(rhs.restartArguments))))&&((this.loadedSourcesArguments == rhs.loadedSourcesArguments)||((this.loadedSourcesArguments!= null)&&this.loadedSourcesArguments.equals(rhs.loadedSourcesArguments))))&&((this.loadedSourcesResponse == rhs.loadedSourcesResponse)||((this.loadedSourcesResponse!= null)&&this.loadedSourcesResponse.equals(rhs.loadedSourcesResponse))))&&((this.stepOutArguments == rhs.stepOutArguments)||((this.stepOutArguments!= null)&&this.stepOutArguments.equals(rhs.stepOutArguments))))&&((this.launchRequestArguments == rhs.launchRequestArguments)||((this.launchRequestArguments!= null)&&this.launchRequestArguments.equals(rhs.launchRequestArguments))))&&((this.stepInArguments == rhs.stepInArguments)||((this.stepInArguments!= null)&&this.stepInArguments.equals(rhs.stepInArguments))))&&((this.threadEvent == rhs.threadEvent)||((this.threadEvent!= null)&&this.threadEvent.equals(rhs.threadEvent))))&&((this.readMemoryArguments == rhs.readMemoryArguments)||((this.readMemoryArguments!= null)&&this.readMemoryArguments.equals(rhs.readMemoryArguments))))&&((this.setInstructionBreakpointsRequest == rhs.setInstructionBreakpointsRequest)||((this.setInstructionBreakpointsRequest!= null)&&this.setInstructionBreakpointsRequest.equals(rhs.setInstructionBreakpointsRequest))))&&((this.disassembleArguments == rhs.disassembleArguments)||((this.disassembleArguments!= null)&&this.disassembleArguments.equals(rhs.disassembleArguments))))&&((this.protocolMessage == rhs.protocolMessage)||((this.protocolMessage!= null)&&this.protocolMessage.equals(rhs.protocolMessage))))&&((this.setInstructionBreakpointsResponse == rhs.setInstructionBreakpointsResponse)||((this.setInstructionBreakpointsResponse!= null)&&this.setInstructionBreakpointsResponse.equals(rhs.setInstructionBreakpointsResponse))))&&((this.exceptionInfoArguments == rhs.exceptionInfoArguments)||((this.exceptionInfoArguments!= null)&&this.exceptionInfoArguments.equals(rhs.exceptionInfoArguments))))&&((this.exceptionDetails == rhs.exceptionDetails)||((this.exceptionDetails!= null)&&this.exceptionDetails.equals(rhs.exceptionDetails))))&&((this.module == rhs.module)||((this.module!= null)&&this.module.equals(rhs.module))))&&((this.steppingGranularity == rhs.steppingGranularity)||((this.steppingGranularity!= null)&&this.steppingGranularity.equals(rhs.steppingGranularity))))&&((this.gotoTarget == rhs.gotoTarget)||((this.gotoTarget!= null)&&this.gotoTarget.equals(rhs.gotoTarget))))&&((this.setVariableRequest == rhs.setVariableRequest)||((this.setVariableRequest!= null)&&this.setVariableRequest.equals(rhs.setVariableRequest))))&&((this.setFunctionBreakpointsArguments == rhs.setFunctionBreakpointsArguments)||((this.setFunctionBreakpointsArguments!= null)&&this.setFunctionBreakpointsArguments.equals(rhs.setFunctionBreakpointsArguments))))&&((this.stackTraceArguments == rhs.stackTraceArguments)||((this.stackTraceArguments!= null)&&this.stackTraceArguments.equals(rhs.stackTraceArguments))))&&((this.gotoTargetsResponse == rhs.gotoTargetsResponse)||((this.gotoTargetsResponse!= null)&&this.gotoTargetsResponse.equals(rhs.gotoTargetsResponse))))&&((this.setExceptionBreakpointsArguments == rhs.setExceptionBreakpointsArguments)||((this.setExceptionBreakpointsArguments!= null)&&this.setExceptionBreakpointsArguments.equals(rhs.setExceptionBreakpointsArguments))))&&((this.reverseContinueArguments == rhs.reverseContinueArguments)||((this.reverseContinueArguments!= null)&&this.reverseContinueArguments.equals(rhs.reverseContinueArguments))))&&((this.terminateArguments == rhs.terminateArguments)||((this.terminateArguments!= null)&&this.terminateArguments.equals(rhs.terminateArguments))))&&((this.configurationDoneRequest == rhs.configurationDoneRequest)||((this.configurationDoneRequest!= null)&&this.configurationDoneRequest.equals(rhs.configurationDoneRequest))))&&((this.continueRequest == rhs.continueRequest)||((this.continueRequest!= null)&&this.continueRequest.equals(rhs.continueRequest))))&&((this.sourceArguments == rhs.sourceArguments)||((this.sourceArguments!= null)&&this.sourceArguments.equals(rhs.sourceArguments))))&&((this.memoryEvent == rhs.memoryEvent)||((this.memoryEvent!= null)&&this.memoryEvent.equals(rhs.memoryEvent))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.exceptionFilterOptions == rhs.exceptionFilterOptions)||((this.exceptionFilterOptions!= null)&&this.exceptionFilterOptions.equals(rhs.exceptionFilterOptions))))&&((this.setExceptionBreakpointsRequest == rhs.setExceptionBreakpointsRequest)||((this.setExceptionBreakpointsRequest!= null)&&this.setExceptionBreakpointsRequest.equals(rhs.setExceptionBreakpointsRequest))))&&((this.restartRequest == rhs.restartRequest)||((this.restartRequest!= null)&&this.restartRequest.equals(rhs.restartRequest))))&&((this.setVariableResponse == rhs.setVariableResponse)||((this.setVariableResponse!= null)&&this.setVariableResponse.equals(rhs.setVariableResponse))))&&((this.cancelResponse == rhs.cancelResponse)||((this.cancelResponse!= null)&&this.cancelResponse.equals(rhs.cancelResponse))))&&((this.setBreakpointsRequest == rhs.setBreakpointsRequest)||((this.setBreakpointsRequest!= null)&&this.setBreakpointsRequest.equals(rhs.setBreakpointsRequest))))&&((this.stepInTargetsRequest == rhs.stepInTargetsRequest)||((this.stepInTargetsRequest!= null)&&this.stepInTargetsRequest.equals(rhs.stepInTargetsRequest))))&&((this.dataBreakpointInfoRequest == rhs.dataBreakpointInfoRequest)||((this.dataBreakpointInfoRequest!= null)&&this.dataBreakpointInfoRequest.equals(rhs.dataBreakpointInfoRequest))))&&((this.scopesArguments == rhs.scopesArguments)||((this.scopesArguments!= null)&&this.scopesArguments.equals(rhs.scopesArguments))))&&((this.readMemoryRequest == rhs.readMemoryRequest)||((this.readMemoryRequest!= null)&&this.readMemoryRequest.equals(rhs.readMemoryRequest))))&&((this.breakpointLocationsResponse == rhs.breakpointLocationsResponse)||((this.breakpointLocationsResponse!= null)&&this.breakpointLocationsResponse.equals(rhs.breakpointLocationsResponse))))&&((this.restartFrameArguments == rhs.restartFrameArguments)||((this.restartFrameArguments!= null)&&this.restartFrameArguments.equals(rhs.restartFrameArguments))))&&((this.breakpointLocationsArguments == rhs.breakpointLocationsArguments)||((this.breakpointLocationsArguments!= null)&&this.breakpointLocationsArguments.equals(rhs.breakpointLocationsArguments))))&&((this.evaluateResponse == rhs.evaluateResponse)||((this.evaluateResponse!= null)&&this.evaluateResponse.equals(rhs.evaluateResponse))))&&((this.runInTerminalRequest == rhs.runInTerminalRequest)||((this.runInTerminalRequest!= null)&&this.runInTerminalRequest.equals(rhs.runInTerminalRequest))))&&((this.reverseContinueRequest == rhs.reverseContinueRequest)||((this.reverseContinueRequest!= null)&&this.reverseContinueRequest.equals(rhs.reverseContinueRequest))))&&((this.restartFrameResponse == rhs.restartFrameResponse)||((this.restartFrameResponse!= null)&&this.restartFrameResponse.equals(rhs.restartFrameResponse))))&&((this.invalidatedEvent == rhs.invalidatedEvent)||((this.invalidatedEvent!= null)&&this.invalidatedEvent.equals(rhs.invalidatedEvent))))&&((this.breakpointEvent == rhs.breakpointEvent)||((this.breakpointEvent!= null)&&this.breakpointEvent.equals(rhs.breakpointEvent))))&&((this.loadedSourceEvent == rhs.loadedSourceEvent)||((this.loadedSourceEvent!= null)&&this.loadedSourceEvent.equals(rhs.loadedSourceEvent))))&&((this.runInTerminalResponse == rhs.runInTerminalResponse)||((this.runInTerminalResponse!= null)&&this.runInTerminalResponse.equals(rhs.runInTerminalResponse))))&&((this.readMemoryResponse == rhs.readMemoryResponse)||((this.readMemoryResponse!= null)&&this.readMemoryResponse.equals(rhs.readMemoryResponse))))&&((this.startDebuggingResponse == rhs.startDebuggingResponse)||((this.startDebuggingResponse!= null)&&this.startDebuggingResponse.equals(rhs.startDebuggingResponse))))&&((this.modulesResponse == rhs.modulesResponse)||((this.modulesResponse!= null)&&this.modulesResponse.equals(rhs.modulesResponse))))&&((this.dataBreakpointAccessType == rhs.dataBreakpointAccessType)||((this.dataBreakpointAccessType!= null)&&this.dataBreakpointAccessType.equals(rhs.dataBreakpointAccessType))))&&((this.disassembleResponse == rhs.disassembleResponse)||((this.disassembleResponse!= null)&&this.disassembleResponse.equals(rhs.disassembleResponse))))&&((this.exceptionPathSegment == rhs.exceptionPathSegment)||((this.exceptionPathSegment!= null)&&this.exceptionPathSegment.equals(rhs.exceptionPathSegment))))&&((this.completionsArguments == rhs.completionsArguments)||((this.completionsArguments!= null)&&this.completionsArguments.equals(rhs.completionsArguments))))&&((this.completionItem == rhs.completionItem)||((this.completionItem!= null)&&this.completionItem.equals(rhs.completionItem))))&&((this.event == rhs.event)||((this.event!= null)&&this.event.equals(rhs.event))))&&((this.stepBackRequest == rhs.stepBackRequest)||((this.stepBackRequest!= null)&&this.stepBackRequest.equals(rhs.stepBackRequest))))&&((this.evaluateArguments == rhs.evaluateArguments)||((this.evaluateArguments!= null)&&this.evaluateArguments.equals(rhs.evaluateArguments))))&&((this.stepInTarget == rhs.stepInTarget)||((this.stepInTarget!= null)&&this.stepInTarget.equals(rhs.stepInTarget))))&&((this.dataBreakpointInfoArguments == rhs.dataBreakpointInfoArguments)||((this.dataBreakpointInfoArguments!= null)&&this.dataBreakpointInfoArguments.equals(rhs.dataBreakpointInfoArguments))))&&((this.nextArguments == rhs.nextArguments)||((this.nextArguments!= null)&&this.nextArguments.equals(rhs.nextArguments))))&&((this.progressUpdateEvent == rhs.progressUpdateEvent)||((this.progressUpdateEvent!= null)&&this.progressUpdateEvent.equals(rhs.progressUpdateEvent))))&&((this.setDataBreakpointsArguments == rhs.setDataBreakpointsArguments)||((this.setDataBreakpointsArguments!= null)&&this.setDataBreakpointsArguments.equals(rhs.setDataBreakpointsArguments))))&&((this.exitedEvent == rhs.exitedEvent)||((this.exitedEvent!= null)&&this.exitedEvent.equals(rhs.exitedEvent))))&&((this.terminateRequest == rhs.terminateRequest)||((this.terminateRequest!= null)&&this.terminateRequest.equals(rhs.terminateRequest))))&&((this.launchResponse == rhs.launchResponse)||((this.launchResponse!= null)&&this.launchResponse.equals(rhs.launchResponse))))&&((this.gotoArguments == rhs.gotoArguments)||((this.gotoArguments!= null)&&this.gotoArguments.equals(rhs.gotoArguments))))&&((this.setDataBreakpointsResponse == rhs.setDataBreakpointsResponse)||((this.setDataBreakpointsResponse!= null)&&this.setDataBreakpointsResponse.equals(rhs.setDataBreakpointsResponse))))&&((this.valueFormat == rhs.valueFormat)||((this.valueFormat!= null)&&this.valueFormat.equals(rhs.valueFormat))))&&((this.runInTerminalRequestArguments == rhs.runInTerminalRequestArguments)||((this.runInTerminalRequestArguments!= null)&&this.runInTerminalRequestArguments.equals(rhs.runInTerminalRequestArguments))))&&((this.variablePresentationHint == rhs.variablePresentationHint)||((this.variablePresentationHint!= null)&&this.variablePresentationHint.equals(rhs.variablePresentationHint))))&&((this.breakpoint == rhs.breakpoint)||((this.breakpoint!= null)&&this.breakpoint.equals(rhs.breakpoint))))&&((this.variablesResponse == rhs.variablesResponse)||((this.variablesResponse!= null)&&this.variablesResponse.equals(rhs.variablesResponse))))&&((this.stepOutResponse == rhs.stepOutResponse)||((this.stepOutResponse!= null)&&this.stepOutResponse.equals(rhs.stepOutResponse))))&&((this.continueResponse == rhs.continueResponse)||((this.continueResponse!= null)&&this.continueResponse.equals(rhs.continueResponse))))&&((this.writeMemoryResponse == rhs.writeMemoryResponse)||((this.writeMemoryResponse!= null)&&this.writeMemoryResponse.equals(rhs.writeMemoryResponse))))&&((this.setBreakpointsResponse == rhs.setBreakpointsResponse)||((this.setBreakpointsResponse!= null)&&this.setBreakpointsResponse.equals(rhs.setBreakpointsResponse))))&&((this.outputEvent == rhs.outputEvent)||((this.outputEvent!= null)&&this.outputEvent.equals(rhs.outputEvent))))&&((this.columnDescriptor == rhs.columnDescriptor)||((this.columnDescriptor!= null)&&this.columnDescriptor.equals(rhs.columnDescriptor))))&&((this.scopesRequest == rhs.scopesRequest)||((this.scopesRequest!= null)&&this.scopesRequest.equals(rhs.scopesRequest))))&&((this.attachRequestArguments == rhs.attachRequestArguments)||((this.attachRequestArguments!= null)&&this.attachRequestArguments.equals(rhs.attachRequestArguments))))&&((this.stepInResponse == rhs.stepInResponse)||((this.stepInResponse!= null)&&this.stepInResponse.equals(rhs.stepInResponse))))&&((this.setInstructionBreakpointsArguments == rhs.setInstructionBreakpointsArguments)||((this.setInstructionBreakpointsArguments!= null)&&this.setInstructionBreakpointsArguments.equals(rhs.setInstructionBreakpointsArguments))))&&((this.launchRequest == rhs.launchRequest)||((this.launchRequest!= null)&&this.launchRequest.equals(rhs.launchRequest))))&&((this.variablesRequest == rhs.variablesRequest)||((this.variablesRequest!= null)&&this.variablesRequest.equals(rhs.variablesRequest))))&&((this.modulesArguments == rhs.modulesArguments)||((this.modulesArguments!= null)&&this.modulesArguments.equals(rhs.modulesArguments))))&&((this.startDebuggingRequest == rhs.startDebuggingRequest)||((this.startDebuggingRequest!= null)&&this.startDebuggingRequest.equals(rhs.startDebuggingRequest))))&&((this.continuedEvent == rhs.continuedEvent)||((this.continuedEvent!= null)&&this.continuedEvent.equals(rhs.continuedEvent))))&&((this.exceptionInfoRequest == rhs.exceptionInfoRequest)||((this.exceptionInfoRequest!= null)&&this.exceptionInfoRequest.equals(rhs.exceptionInfoRequest))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.terminatedEvent == rhs.terminatedEvent)||((this.terminatedEvent!= null)&&this.terminatedEvent.equals(rhs.terminatedEvent))))&&((this.stackFrameFormat == rhs.stackFrameFormat)||((this.stackFrameFormat!= null)&&this.stackFrameFormat.equals(rhs.stackFrameFormat))))&&((this.exceptionBreakpointsFilter == rhs.exceptionBreakpointsFilter)||((this.exceptionBreakpointsFilter!= null)&&this.exceptionBreakpointsFilter.equals(rhs.exceptionBreakpointsFilter))))&&((this.capabilitiesEvent == rhs.capabilitiesEvent)||((this.capabilitiesEvent!= null)&&this.capabilitiesEvent.equals(rhs.capabilitiesEvent))))&&((this.disassembledInstruction == rhs.disassembledInstruction)||((this.disassembledInstruction!= null)&&this.disassembledInstruction.equals(rhs.disassembledInstruction))))&&((this.threadsResponse == rhs.threadsResponse)||((this.threadsResponse!= null)&&this.threadsResponse.equals(rhs.threadsResponse))))&&((this.variablesArguments == rhs.variablesArguments)||((this.variablesArguments!= null)&&this.variablesArguments.equals(rhs.variablesArguments))))&&((this.setBreakpointsArguments == rhs.setBreakpointsArguments)||((this.setBreakpointsArguments!= null)&&this.setBreakpointsArguments.equals(rhs.setBreakpointsArguments))))&&((this.cancelRequest == rhs.cancelRequest)||((this.cancelRequest!= null)&&this.cancelRequest.equals(rhs.cancelRequest))))&&((this.stepBackArguments == rhs.stepBackArguments)||((this.stepBackArguments!= null)&&this.stepBackArguments.equals(rhs.stepBackArguments))))&&((this.attachRequest == rhs.attachRequest)||((this.attachRequest!= null)&&this.attachRequest.equals(rhs.attachRequest))))&&((this.terminateThreadsArguments == rhs.terminateThreadsArguments)||((this.terminateThreadsArguments!= null)&&this.terminateThreadsArguments.equals(rhs.terminateThreadsArguments))))&&((this.gotoRequest == rhs.gotoRequest)||((this.gotoRequest!= null)&&this.gotoRequest.equals(rhs.gotoRequest))))&&((this.initializeRequest == rhs.initializeRequest)||((this.initializeRequest!= null)&&this.initializeRequest.equals(rhs.initializeRequest))))&&((this.startDebuggingRequestArguments == rhs.startDebuggingRequestArguments)||((this.startDebuggingRequestArguments!= null)&&this.startDebuggingRequestArguments.equals(rhs.startDebuggingRequestArguments))))&&((this.functionBreakpoint == rhs.functionBreakpoint)||((this.functionBreakpoint!= null)&&this.functionBreakpoint.equals(rhs.functionBreakpoint))))&&((this.scopesResponse == rhs.scopesResponse)||((this.scopesResponse!= null)&&this.scopesResponse.equals(rhs.scopesResponse))))&&((this.evaluateRequest == rhs.evaluateRequest)||((this.evaluateRequest!= null)&&this.evaluateRequest.equals(rhs.evaluateRequest))))&&((this.disassembleRequest == rhs.disassembleRequest)||((this.disassembleRequest!= null)&&this.disassembleRequest.equals(rhs.disassembleRequest))))&&((this.pauseArguments == rhs.pauseArguments)||((this.pauseArguments!= null)&&this.pauseArguments.equals(rhs.pauseArguments))))&&((this.pauseRequest == rhs.pauseRequest)||((this.pauseRequest!= null)&&this.pauseRequest.equals(rhs.pauseRequest))))&&((this.setFunctionBreakpointsRequest == rhs.setFunctionBreakpointsRequest)||((this.setFunctionBreakpointsRequest!= null)&&this.setFunctionBreakpointsRequest.equals(rhs.setFunctionBreakpointsRequest))))&&((this.dataBreakpointInfoResponse == rhs.dataBreakpointInfoResponse)||((this.dataBreakpointInfoResponse!= null)&&this.dataBreakpointInfoResponse.equals(rhs.dataBreakpointInfoResponse))))&&((this.gotoTargetsRequest == rhs.gotoTargetsRequest)||((this.gotoTargetsRequest!= null)&&this.gotoTargetsRequest.equals(rhs.gotoTargetsRequest))))&&((this.setVariableArguments == rhs.setVariableArguments)||((this.setVariableArguments!= null)&&this.setVariableArguments.equals(rhs.setVariableArguments))))&&((this.disconnectRequest == rhs.disconnectRequest)||((this.disconnectRequest!= null)&&this.disconnectRequest.equals(rhs.disconnectRequest))))&&((this.stepInRequest == rhs.stepInRequest)||((this.stepInRequest!= null)&&this.stepInRequest.equals(rhs.stepInRequest))))&&((this.exceptionBreakMode == rhs.exceptionBreakMode)||((this.exceptionBreakMode!= null)&&this.exceptionBreakMode.equals(rhs.exceptionBreakMode))))&&((this.request == rhs.request)||((this.request!= null)&&this.request.equals(rhs.request))))&&((this.loadedSourcesRequest == rhs.loadedSourcesRequest)||((this.loadedSourcesRequest!= null)&&this.loadedSourcesRequest.equals(rhs.loadedSourcesRequest))))&&((this.cancelArguments == rhs.cancelArguments)||((this.cancelArguments!= null)&&this.cancelArguments.equals(rhs.cancelArguments))))&&((this.configurationDoneArguments == rhs.configurationDoneArguments)||((this.configurationDoneArguments!= null)&&this.configurationDoneArguments.equals(rhs.configurationDoneArguments))))&&((this.nextResponse == rhs.nextResponse)||((this.nextResponse!= null)&&this.nextResponse.equals(rhs.nextResponse))))&&((this.stackFrame == rhs.stackFrame)||((this.stackFrame!= null)&&this.stackFrame.equals(rhs.stackFrame))))&&((this.restartFrameRequest == rhs.restartFrameRequest)||((this.restartFrameRequest!= null)&&this.restartFrameRequest.equals(rhs.restartFrameRequest))))&&((this.setExpressionArguments == rhs.setExpressionArguments)||((this.setExpressionArguments!= null)&&this.setExpressionArguments.equals(rhs.setExpressionArguments))))&&((this.exceptionOptions == rhs.exceptionOptions)||((this.exceptionOptions!= null)&&this.exceptionOptions.equals(rhs.exceptionOptions))))&&((this.completionsRequest == rhs.completionsRequest)||((this.completionsRequest!= null)&&this.completionsRequest.equals(rhs.completionsRequest))))&&((this.sourceBreakpoint == rhs.sourceBreakpoint)||((this.sourceBreakpoint!= null)&&this.sourceBreakpoint.equals(rhs.sourceBreakpoint))))&&((this.moduleEvent == rhs.moduleEvent)||((this.moduleEvent!= null)&&this.moduleEvent.equals(rhs.moduleEvent))))&&((this.reverseContinueResponse == rhs.reverseContinueResponse)||((this.reverseContinueResponse!= null)&&this.reverseContinueResponse.equals(rhs.reverseContinueResponse))))&&((this.setExpressionRequest == rhs.setExpressionRequest)||((this.setExpressionRequest!= null)&&this.setExpressionRequest.equals(rhs.setExpressionRequest))))&&((this.scope == rhs.scope)||((this.scope!= null)&&this.scope.equals(rhs.scope))))&&((this.checksum == rhs.checksum)||((this.checksum!= null)&&this.checksum.equals(rhs.checksum))))&&((this.invalidatedAreas == rhs.invalidatedAreas)||((this.invalidatedAreas!= null)&&this.invalidatedAreas.equals(rhs.invalidatedAreas))))&&((this.breakpointLocationsRequest == rhs.breakpointLocationsRequest)||((this.breakpointLocationsRequest!= null)&&this.breakpointLocationsRequest.equals(rhs.breakpointLocationsRequest))))&&((this.modulesRequest == rhs.modulesRequest)||((this.modulesRequest!= null)&&this.modulesRequest.equals(rhs.modulesRequest))))&&((this.disconnectArguments == rhs.disconnectArguments)||((this.disconnectArguments!= null)&&this.disconnectArguments.equals(rhs.disconnectArguments))))&&((this.pauseResponse == rhs.pauseResponse)||((this.pauseResponse!= null)&&this.pauseResponse.equals(rhs.pauseResponse))))&&((this.capabilities == rhs.capabilities)||((this.capabilities!= null)&&this.capabilities.equals(rhs.capabilities))))&&((this.gotoResponse == rhs.gotoResponse)||((this.gotoResponse!= null)&&this.gotoResponse.equals(rhs.gotoResponse))))&&((this.dataBreakpoint == rhs.dataBreakpoint)||((this.dataBreakpoint!= null)&&this.dataBreakpoint.equals(rhs.dataBreakpoint))))&&((this.completionsResponse == rhs.completionsResponse)||((this.completionsResponse!= null)&&this.completionsResponse.equals(rhs.completionsResponse))))&&((this.stepOutRequest == rhs.stepOutRequest)||((this.stepOutRequest!= null)&&this.stepOutRequest.equals(rhs.stepOutRequest))))&&((this.threadsRequest == rhs.threadsRequest)||((this.threadsRequest!= null)&&this.threadsRequest.equals(rhs.threadsRequest))))&&((this.checksumAlgorithm == rhs.checksumAlgorithm)||((this.checksumAlgorithm!= null)&&this.checksumAlgorithm.equals(rhs.checksumAlgorithm))))&&((this.setDataBreakpointsRequest == rhs.setDataBreakpointsRequest)||((this.setDataBreakpointsRequest!= null)&&this.setDataBreakpointsRequest.equals(rhs.setDataBreakpointsRequest))))&&((this.thread == rhs.thread)||((this.thread!= null)&&this.thread.equals(rhs.thread))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.stackTraceRequest == rhs.stackTraceRequest)||((this.stackTraceRequest!= null)&&this.stackTraceRequest.equals(rhs.stackTraceRequest))))&&((this.terminateThreadsResponse == rhs.terminateThreadsResponse)||((this.terminateThreadsResponse!= null)&&this.terminateThreadsResponse.equals(rhs.terminateThreadsResponse))))&&((this.completionItemType == rhs.completionItemType)||((this.completionItemType!= null)&&this.completionItemType.equals(rhs.completionItemType))))&&((this.errorResponse == rhs.errorResponse)||((this.errorResponse!= null)&&this.errorResponse.equals(rhs.errorResponse))))&&((this.restartResponse == rhs.restartResponse)||((this.restartResponse!= null)&&this.restartResponse.equals(rhs.restartResponse))))&&((this.initializeResponse == rhs.initializeResponse)||((this.initializeResponse!= null)&&this.initializeResponse.equals(rhs.initializeResponse))))&&((this.attachResponse == rhs.attachResponse)||((this.attachResponse!= null)&&this.attachResponse.equals(rhs.attachResponse))))&&((this.stepInTargetsResponse == rhs.stepInTargetsResponse)||((this.stepInTargetsResponse!= null)&&this.stepInTargetsResponse.equals(rhs.stepInTargetsResponse))))&&((this.stackTraceResponse == rhs.stackTraceResponse)||((this.stackTraceResponse!= null)&&this.stackTraceResponse.equals(rhs.stackTraceResponse))))&&((this.writeMemoryRequest == rhs.writeMemoryRequest)||((this.writeMemoryRequest!= null)&&this.writeMemoryRequest.equals(rhs.writeMemoryRequest))))&&((this.stoppedEvent == rhs.stoppedEvent)||((this.stoppedEvent!= null)&&this.stoppedEvent.equals(rhs.stoppedEvent))))&&((this.response == rhs.response)||((this.response!= null)&&this.response.equals(rhs.response))))&&((this.disconnectResponse == rhs.disconnectResponse)||((this.disconnectResponse!= null)&&this.disconnectResponse.equals(rhs.disconnectResponse))))&&((this.initializedEvent == rhs.initializedEvent)||((this.initializedEvent!= null)&&this.initializedEvent.equals(rhs.initializedEvent))))&&((this.progressStartEvent == rhs.progressStartEvent)||((this.progressStartEvent!= null)&&this.progressStartEvent.equals(rhs.progressStartEvent))))&&((this.variable == rhs.variable)||((this.variable!= null)&&this.variable.equals(rhs.variable))))&&((this.gotoTargetsArguments == rhs.gotoTargetsArguments)||((this.gotoTargetsArguments!= null)&&this.gotoTargetsArguments.equals(rhs.gotoTargetsArguments))))&&((this.stepBackResponse == rhs.stepBackResponse)||((this.stepBackResponse!= null)&&this.stepBackResponse.equals(rhs.stepBackResponse))))&&((this.initializeRequestArguments == rhs.initializeRequestArguments)||((this.initializeRequestArguments!= null)&&this.initializeRequestArguments.equals(rhs.initializeRequestArguments))))&&((this.configurationDoneResponse == rhs.configurationDoneResponse)||((this.configurationDoneResponse!= null)&&this.configurationDoneResponse.equals(rhs.configurationDoneResponse))))&&((this.nextRequest == rhs.nextRequest)||((this.nextRequest!= null)&&this.nextRequest.equals(rhs.nextRequest))))&&((this.terminateResponse == rhs.terminateResponse)||((this.terminateResponse!= null)&&this.terminateResponse.equals(rhs.terminateResponse))))&&((this.setExpressionResponse == rhs.setExpressionResponse)||((this.setExpressionResponse!= null)&&this.setExpressionResponse.equals(rhs.setExpressionResponse)))); - } - - - /** - * This enumeration defines all possible conditions when a thrown exception should result in a break. - * never: never breaks, - * always: always breaks, - * unhandled: breaks when exception unhandled, - * userUnhandled: breaks if the exception is not handled by user code. - * - */ - @Generated("jsonschema2pojo") - public enum ExceptionBreakMode { - - NEVER("never"), - ALWAYS("always"), - UNHANDLED("unhandled"), - USER_UNHANDLED("userUnhandled"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (ExceptionBreakMode c: values()) { - CONSTANTS.put(c.value, c); - } - } - - ExceptionBreakMode(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static ExceptionBreakMode fromValue(String value) { - ExceptionBreakMode constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArguments.java deleted file mode 100644 index 8b00576..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArguments.java +++ /dev/null @@ -1,238 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `disassemble` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "memoryReference", - "offset", - "instructionOffset", - "instructionCount", - "resolveSymbols" -}) -@Generated("jsonschema2pojo") -public class DisassembleArguments { - - /** - * Memory reference to the base location containing the instructions to disassemble. - * (Required) - * - */ - @JsonProperty("memoryReference") - @JsonPropertyDescription("Memory reference to the base location containing the instructions to disassemble.") - private String memoryReference; - /** - * Offset (in bytes) to be applied to the reference location before disassembling. Can be negative. - * - */ - @JsonProperty("offset") - @JsonPropertyDescription("Offset (in bytes) to be applied to the reference location before disassembling. Can be negative.") - private Integer offset; - /** - * Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. - * - */ - @JsonProperty("instructionOffset") - @JsonPropertyDescription("Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative.") - private Integer instructionOffset; - /** - * Number of instructions to disassemble starting at the specified location and offset. - * An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. - * (Required) - * - */ - @JsonProperty("instructionCount") - @JsonPropertyDescription("Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value.") - private Integer instructionCount; - /** - * If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. - * - */ - @JsonProperty("resolveSymbols") - @JsonPropertyDescription("If true, the adapter should attempt to resolve memory addresses and other values to symbolic names.") - private Boolean resolveSymbols; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Memory reference to the base location containing the instructions to disassemble. - * (Required) - * - */ - @JsonProperty("memoryReference") - public String getMemoryReference() { - return memoryReference; - } - - /** - * Memory reference to the base location containing the instructions to disassemble. - * (Required) - * - */ - @JsonProperty("memoryReference") - public void setMemoryReference(String memoryReference) { - this.memoryReference = memoryReference; - } - - /** - * Offset (in bytes) to be applied to the reference location before disassembling. Can be negative. - * - */ - @JsonProperty("offset") - public Integer getOffset() { - return offset; - } - - /** - * Offset (in bytes) to be applied to the reference location before disassembling. Can be negative. - * - */ - @JsonProperty("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. - * - */ - @JsonProperty("instructionOffset") - public Integer getInstructionOffset() { - return instructionOffset; - } - - /** - * Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. - * - */ - @JsonProperty("instructionOffset") - public void setInstructionOffset(Integer instructionOffset) { - this.instructionOffset = instructionOffset; - } - - /** - * Number of instructions to disassemble starting at the specified location and offset. - * An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. - * (Required) - * - */ - @JsonProperty("instructionCount") - public Integer getInstructionCount() { - return instructionCount; - } - - /** - * Number of instructions to disassemble starting at the specified location and offset. - * An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. - * (Required) - * - */ - @JsonProperty("instructionCount") - public void setInstructionCount(Integer instructionCount) { - this.instructionCount = instructionCount; - } - - /** - * If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. - * - */ - @JsonProperty("resolveSymbols") - public Boolean getResolveSymbols() { - return resolveSymbols; - } - - /** - * If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. - * - */ - @JsonProperty("resolveSymbols") - public void setResolveSymbols(Boolean resolveSymbols) { - this.resolveSymbols = resolveSymbols; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DisassembleArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("memoryReference"); - sb.append('='); - sb.append(((this.memoryReference == null)?"":this.memoryReference)); - sb.append(','); - sb.append("offset"); - sb.append('='); - sb.append(((this.offset == null)?"":this.offset)); - sb.append(','); - sb.append("instructionOffset"); - sb.append('='); - sb.append(((this.instructionOffset == null)?"":this.instructionOffset)); - sb.append(','); - sb.append("instructionCount"); - sb.append('='); - sb.append(((this.instructionCount == null)?"":this.instructionCount)); - sb.append(','); - sb.append("resolveSymbols"); - sb.append('='); - sb.append(((this.resolveSymbols == null)?"":this.resolveSymbols)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.instructionOffset == null)? 0 :this.instructionOffset.hashCode())); - result = ((result* 31)+((this.resolveSymbols == null)? 0 :this.resolveSymbols.hashCode())); - result = ((result* 31)+((this.memoryReference == null)? 0 :this.memoryReference.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); - result = ((result* 31)+((this.instructionCount == null)? 0 :this.instructionCount.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof DisassembleArguments) == false) { - return false; - } - DisassembleArguments rhs = ((DisassembleArguments) other); - return (((((((this.instructionOffset == rhs.instructionOffset)||((this.instructionOffset!= null)&&this.instructionOffset.equals(rhs.instructionOffset)))&&((this.resolveSymbols == rhs.resolveSymbols)||((this.resolveSymbols!= null)&&this.resolveSymbols.equals(rhs.resolveSymbols))))&&((this.memoryReference == rhs.memoryReference)||((this.memoryReference!= null)&&this.memoryReference.equals(rhs.memoryReference))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.instructionCount == rhs.instructionCount)||((this.instructionCount!= null)&&this.instructionCount.equals(rhs.instructionCount)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArgumentsClass.java new file mode 100644 index 0000000..d19127d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleArgumentsClass.java @@ -0,0 +1,59 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `disassemble` request. + */ +public class DisassembleArgumentsClass { + private long instructionCount; + private Long instructionOffset; + private String memoryReference; + private Long offset; + private Boolean resolveSymbols; + + /** + * Number of instructions to disassemble starting at the specified location and offset. + * An adapter must return exactly this number of instructions - any unavailable instructions + * should be replaced with an implementation-defined 'invalid instruction' value. + */ + @JsonProperty("instructionCount") + public long getInstructionCount() { return instructionCount; } + @JsonProperty("instructionCount") + public void setInstructionCount(long value) { this.instructionCount = value; } + + /** + * Offset (in instructions) to be applied after the byte offset (if any) before + * disassembling. Can be negative. + */ + @JsonProperty("instructionOffset") + public Long getInstructionOffset() { return instructionOffset; } + @JsonProperty("instructionOffset") + public void setInstructionOffset(Long value) { this.instructionOffset = value; } + + /** + * Memory reference to the base location containing the instructions to disassemble. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * Offset (in bytes) to be applied to the reference location before disassembling. Can be + * negative. + */ + @JsonProperty("offset") + public Long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(Long value) { this.offset = value; } + + /** + * If true, the adapter should attempt to resolve memory addresses and other values to + * symbolic names. + */ + @JsonProperty("resolveSymbols") + public Boolean getResolveSymbols() { return resolveSymbols; } + @JsonProperty("resolveSymbols") + public void setResolveSymbols(Boolean value) { this.resolveSymbols = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestArguments.java new file mode 100644 index 0000000..25b9b51 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestArguments.java @@ -0,0 +1,59 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `disassemble` request. + */ +public class DisassembleRequestArguments { + private long instructionCount; + private Long instructionOffset; + private String memoryReference; + private Long offset; + private Boolean resolveSymbols; + + /** + * Number of instructions to disassemble starting at the specified location and offset. + * An adapter must return exactly this number of instructions - any unavailable instructions + * should be replaced with an implementation-defined 'invalid instruction' value. + */ + @JsonProperty("instructionCount") + public long getInstructionCount() { return instructionCount; } + @JsonProperty("instructionCount") + public void setInstructionCount(long value) { this.instructionCount = value; } + + /** + * Offset (in instructions) to be applied after the byte offset (if any) before + * disassembling. Can be negative. + */ + @JsonProperty("instructionOffset") + public Long getInstructionOffset() { return instructionOffset; } + @JsonProperty("instructionOffset") + public void setInstructionOffset(Long value) { this.instructionOffset = value; } + + /** + * Memory reference to the base location containing the instructions to disassemble. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * Offset (in bytes) to be applied to the reference location before disassembling. Can be + * negative. + */ + @JsonProperty("offset") + public Long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(Long value) { this.offset = value; } + + /** + * If true, the adapter should attempt to resolve memory addresses and other values to + * symbolic names. + */ + @JsonProperty("resolveSymbols") + public Boolean getResolveSymbols() { return resolveSymbols; } + @JsonProperty("resolveSymbols") + public void setResolveSymbols(Boolean value) { this.resolveSymbols = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestClass.java new file mode 100644 index 0000000..ea1031b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestClass.java @@ -0,0 +1,56 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Disassembles code stored at the provided location. + * Clients should only call this request if the corresponding capability + * `supportsDisassembleRequest` is true. + */ +public class DisassembleRequestClass { + private long seq; + private AttachRequestType type; + private DisassembleRequestArguments arguments; + private DisassembleRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public DisassembleRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(DisassembleRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public DisassembleRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(DisassembleRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestCommand.java new file mode 100644 index 0000000..7b5c3d7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum DisassembleRequestCommand { + DISASSEMBLE; + + @JsonValue + public String toValue() { + switch (this) { + case DISASSEMBLE: return "disassemble"; + } + return null; + } + + @JsonCreator + public static DisassembleRequestCommand forValue(String value) throws IOException { + if (value.equals("disassemble")) return DISASSEMBLE; + throw new IOException("Cannot deserialize DisassembleRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleResponseBody.java new file mode 100644 index 0000000..7b2ad67 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class DisassembleResponseBody { + private DisassembledInstruction[] instructions; + + /** + * The list of disassembled instructions. + */ + @JsonProperty("instructions") + public DisassembledInstruction[] getInstructions() { return instructions; } + @JsonProperty("instructions") + public void setInstructions(DisassembledInstruction[] value) { this.instructions = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleResponseClass.java new file mode 100644 index 0000000..8610d88 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembleResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `disassemble` request. + */ +public class DisassembleResponseClass { + private long seq; + private AttachResponseType type; + private DisassembleResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public DisassembleResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(DisassembleResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstruction.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstruction.java index dd229ed..eb7087b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstruction.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstruction.java @@ -1,449 +1,108 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - +import com.fasterxml.jackson.annotation.*; /** * Represents a single disassembled instruction. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "address", - "instructionBytes", - "instruction", - "symbol", - "location", - "line", - "column", - "endLine", - "endColumn", - "presentationHint" -}) -@Generated("jsonschema2pojo") public class DisassembledInstruction { - - /** - * The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. - * (Required) - * - */ - @JsonProperty("address") - @JsonPropertyDescription("The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise.") private String address; - /** - * Raw bytes representing the instruction and its operands, in an implementation-defined format. - * - */ - @JsonProperty("instructionBytes") - @JsonPropertyDescription("Raw bytes representing the instruction and its operands, in an implementation-defined format.") - private String instructionBytes; - /** - * Text representing the instruction and its operands, in an implementation-defined format. - * (Required) - * - */ - @JsonProperty("instruction") - @JsonPropertyDescription("Text representing the instruction and its operands, in an implementation-defined format.") + private Long column; + private Long endColumn; + private Long endLine; private String instruction; - /** - * Name of the symbol that corresponds with the location of this instruction, if any. - * - */ - @JsonProperty("symbol") - @JsonPropertyDescription("Name of the symbol that corresponds with the location of this instruction, if any.") - private String symbol; - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("location") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") + private String instructionBytes; + private Long line; private Source location; - /** - * The line within the source location that corresponds to this instruction, if any. - * - */ - @JsonProperty("line") - @JsonPropertyDescription("The line within the source location that corresponds to this instruction, if any.") - private Integer line; - /** - * The column within the line that corresponds to this instruction, if any. - * - */ - @JsonProperty("column") - @JsonPropertyDescription("The column within the line that corresponds to this instruction, if any.") - private Integer column; - /** - * The end line of the range that corresponds to this instruction, if any. - * - */ - @JsonProperty("endLine") - @JsonPropertyDescription("The end line of the range that corresponds to this instruction, if any.") - private Integer endLine; - /** - * The end column of the range that corresponds to this instruction, if any. - * - */ - @JsonProperty("endColumn") - @JsonPropertyDescription("The end column of the range that corresponds to this instruction, if any.") - private Integer endColumn; - /** - * A hint for how to present the instruction in the UI. - * - * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' - * - */ - @JsonProperty("presentationHint") - @JsonPropertyDescription("A hint for how to present the instruction in the UI.\n\nA value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'") - private PresentationHint presentationHint; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + private DisassembledInstructionPresentationHint presentationHint; + private String symbol; /** - * The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. - * (Required) - * + * The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a + * decimal value otherwise. */ @JsonProperty("address") - public String getAddress() { - return address; - } - - /** - * The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. - * (Required) - * - */ + public String getAddress() { return address; } @JsonProperty("address") - public void setAddress(String address) { - this.address = address; - } + public void setAddress(String value) { this.address = value; } /** - * Raw bytes representing the instruction and its operands, in an implementation-defined format. - * + * The column within the line that corresponds to this instruction, if any. */ - @JsonProperty("instructionBytes") - public String getInstructionBytes() { - return instructionBytes; - } + @JsonProperty("column") + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } /** - * Raw bytes representing the instruction and its operands, in an implementation-defined format. - * + * The end column of the range that corresponds to this instruction, if any. */ - @JsonProperty("instructionBytes") - public void setInstructionBytes(String instructionBytes) { - this.instructionBytes = instructionBytes; - } + @JsonProperty("endColumn") + public Long getEndColumn() { return endColumn; } + @JsonProperty("endColumn") + public void setEndColumn(Long value) { this.endColumn = value; } /** - * Text representing the instruction and its operands, in an implementation-defined format. - * (Required) - * + * The end line of the range that corresponds to this instruction, if any. */ - @JsonProperty("instruction") - public String getInstruction() { - return instruction; - } + @JsonProperty("endLine") + public Long getEndLine() { return endLine; } + @JsonProperty("endLine") + public void setEndLine(Long value) { this.endLine = value; } /** * Text representing the instruction and its operands, in an implementation-defined format. - * (Required) - * */ @JsonProperty("instruction") - public void setInstruction(String instruction) { - this.instruction = instruction; - } - - /** - * Name of the symbol that corresponds with the location of this instruction, if any. - * - */ - @JsonProperty("symbol") - public String getSymbol() { - return symbol; - } - - /** - * Name of the symbol that corresponds with the location of this instruction, if any. - * - */ - @JsonProperty("symbol") - public void setSymbol(String symbol) { - this.symbol = symbol; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("location") - public Source getLocation() { - return location; - } + public String getInstruction() { return instruction; } + @JsonProperty("instruction") + public void setInstruction(String value) { this.instruction = value; } /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * + * Raw bytes representing the instruction and its operands, in an implementation-defined + * format. */ - @JsonProperty("location") - public void setLocation(Source location) { - this.location = location; - } + @JsonProperty("instructionBytes") + public String getInstructionBytes() { return instructionBytes; } + @JsonProperty("instructionBytes") + public void setInstructionBytes(String value) { this.instructionBytes = value; } /** * The line within the source location that corresponds to this instruction, if any. - * */ @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * The line within the source location that corresponds to this instruction, if any. - * - */ + public Long getLine() { return line; } @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - /** - * The column within the line that corresponds to this instruction, if any. - * - */ - @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * The column within the line that corresponds to this instruction, if any. - * - */ - @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } - - /** - * The end line of the range that corresponds to this instruction, if any. - * - */ - @JsonProperty("endLine") - public Integer getEndLine() { - return endLine; - } - - /** - * The end line of the range that corresponds to this instruction, if any. - * - */ - @JsonProperty("endLine") - public void setEndLine(Integer endLine) { - this.endLine = endLine; - } + public void setLine(Long value) { this.line = value; } /** - * The end column of the range that corresponds to this instruction, if any. - * + * Source location that corresponds to this instruction, if any. + * Should always be set (if available) on the first instruction returned, + * but can be omitted afterwards if this instruction maps to the same source file as the + * previous instruction. */ - @JsonProperty("endColumn") - public Integer getEndColumn() { - return endColumn; - } - - /** - * The end column of the range that corresponds to this instruction, if any. - * - */ - @JsonProperty("endColumn") - public void setEndColumn(Integer endColumn) { - this.endColumn = endColumn; - } + @JsonProperty("location") + public Source getLocation() { return location; } + @JsonProperty("location") + public void setLocation(Source value) { this.location = value; } /** * A hint for how to present the instruction in the UI. - * - * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' - * + * + * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be + * reached by the program. For example, unreadable memory addresses may be presented is + * 'invalid.' */ @JsonProperty("presentationHint") - public PresentationHint getPresentationHint() { - return presentationHint; - } - - /** - * A hint for how to present the instruction in the UI. - * - * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' - * - */ + public DisassembledInstructionPresentationHint getPresentationHint() { return presentationHint; } @JsonProperty("presentationHint") - public void setPresentationHint(PresentationHint presentationHint) { - this.presentationHint = presentationHint; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DisassembledInstruction.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("address"); - sb.append('='); - sb.append(((this.address == null)?"":this.address)); - sb.append(','); - sb.append("instructionBytes"); - sb.append('='); - sb.append(((this.instructionBytes == null)?"":this.instructionBytes)); - sb.append(','); - sb.append("instruction"); - sb.append('='); - sb.append(((this.instruction == null)?"":this.instruction)); - sb.append(','); - sb.append("symbol"); - sb.append('='); - sb.append(((this.symbol == null)?"":this.symbol)); - sb.append(','); - sb.append("location"); - sb.append('='); - sb.append(((this.location == null)?"":this.location)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("endLine"); - sb.append('='); - sb.append(((this.endLine == null)?"":this.endLine)); - sb.append(','); - sb.append("endColumn"); - sb.append('='); - sb.append(((this.endColumn == null)?"":this.endColumn)); - sb.append(','); - sb.append("presentationHint"); - sb.append('='); - sb.append(((this.presentationHint == null)?"":this.presentationHint)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); - result = ((result* 31)+((this.symbol == null)? 0 :this.symbol.hashCode())); - result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); - result = ((result* 31)+((this.address == null)? 0 :this.address.hashCode())); - result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); - result = ((result* 31)+((this.instruction == null)? 0 :this.instruction.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - result = ((result* 31)+((this.instructionBytes == null)? 0 :this.instructionBytes.hashCode())); - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof DisassembledInstruction) == false) { - return false; - } - DisassembledInstruction rhs = ((DisassembledInstruction) other); - return ((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.symbol == rhs.symbol)||((this.symbol!= null)&&this.symbol.equals(rhs.symbol))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.address == rhs.address)||((this.address!= null)&&this.address.equals(rhs.address))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.instruction == rhs.instruction)||((this.instruction!= null)&&this.instruction.equals(rhs.instruction))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.instructionBytes == rhs.instructionBytes)||((this.instructionBytes!= null)&&this.instructionBytes.equals(rhs.instructionBytes))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + public void setPresentationHint(DisassembledInstructionPresentationHint value) { this.presentationHint = value; } /** - * A hint for how to present the instruction in the UI. - * - * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' - * + * Name of the symbol that corresponds with the location of this instruction, if any. */ - @Generated("jsonschema2pojo") - public enum PresentationHint { - - NORMAL("normal"), - INVALID("invalid"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (PresentationHint c: values()) { - CONSTANTS.put(c.value, c); - } - } - - PresentationHint(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static PresentationHint fromValue(String value) { - PresentationHint constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + @JsonProperty("symbol") + public String getSymbol() { return symbol; } + @JsonProperty("symbol") + public void setSymbol(String value) { this.symbol = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstructionPresentationHint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstructionPresentationHint.java new file mode 100644 index 0000000..5850542 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisassembledInstructionPresentationHint.java @@ -0,0 +1,31 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * A hint for how to present the instruction in the UI. + * + * A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be + * reached by the program. For example, unreadable memory addresses may be presented is + * 'invalid.' + */ +public enum DisassembledInstructionPresentationHint { + INVALID, NORMAL; + + @JsonValue + public String toValue() { + switch (this) { + case INVALID: return "invalid"; + case NORMAL: return "normal"; + } + return null; + } + + @JsonCreator + public static DisassembledInstructionPresentationHint forValue(String value) throws IOException { + if (value.equals("invalid")) return INVALID; + if (value.equals("normal")) return NORMAL; + throw new IOException("Cannot deserialize DisassembledInstructionPresentationHint"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArguments.java deleted file mode 100644 index 1fb52f4..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArguments.java +++ /dev/null @@ -1,179 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `disconnect` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "restart", - "terminateDebuggee", - "suspendDebuggee" -}) -@Generated("jsonschema2pojo") -public class DisconnectArguments { - - /** - * A value of true indicates that this `disconnect` request is part of a restart sequence. - * - */ - @JsonProperty("restart") - @JsonPropertyDescription("A value of true indicates that this `disconnect` request is part of a restart sequence.") - private Boolean restart; - /** - * Indicates whether the debuggee should be terminated when the debugger is disconnected. - * If unspecified, the debug adapter is free to do whatever it thinks is best. - * The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true. - * - */ - @JsonProperty("terminateDebuggee") - @JsonPropertyDescription("Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true.") - private Boolean terminateDebuggee; - /** - * Indicates whether the debuggee should stay suspended when the debugger is disconnected. - * If unspecified, the debuggee should resume execution. - * The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true. - * - */ - @JsonProperty("suspendDebuggee") - @JsonPropertyDescription("Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true.") - private Boolean suspendDebuggee; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * A value of true indicates that this `disconnect` request is part of a restart sequence. - * - */ - @JsonProperty("restart") - public Boolean getRestart() { - return restart; - } - - /** - * A value of true indicates that this `disconnect` request is part of a restart sequence. - * - */ - @JsonProperty("restart") - public void setRestart(Boolean restart) { - this.restart = restart; - } - - /** - * Indicates whether the debuggee should be terminated when the debugger is disconnected. - * If unspecified, the debug adapter is free to do whatever it thinks is best. - * The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true. - * - */ - @JsonProperty("terminateDebuggee") - public Boolean getTerminateDebuggee() { - return terminateDebuggee; - } - - /** - * Indicates whether the debuggee should be terminated when the debugger is disconnected. - * If unspecified, the debug adapter is free to do whatever it thinks is best. - * The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true. - * - */ - @JsonProperty("terminateDebuggee") - public void setTerminateDebuggee(Boolean terminateDebuggee) { - this.terminateDebuggee = terminateDebuggee; - } - - /** - * Indicates whether the debuggee should stay suspended when the debugger is disconnected. - * If unspecified, the debuggee should resume execution. - * The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true. - * - */ - @JsonProperty("suspendDebuggee") - public Boolean getSuspendDebuggee() { - return suspendDebuggee; - } - - /** - * Indicates whether the debuggee should stay suspended when the debugger is disconnected. - * If unspecified, the debuggee should resume execution. - * The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true. - * - */ - @JsonProperty("suspendDebuggee") - public void setSuspendDebuggee(Boolean suspendDebuggee) { - this.suspendDebuggee = suspendDebuggee; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DisconnectArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("restart"); - sb.append('='); - sb.append(((this.restart == null)?"":this.restart)); - sb.append(','); - sb.append("terminateDebuggee"); - sb.append('='); - sb.append(((this.terminateDebuggee == null)?"":this.terminateDebuggee)); - sb.append(','); - sb.append("suspendDebuggee"); - sb.append('='); - sb.append(((this.suspendDebuggee == null)?"":this.suspendDebuggee)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.terminateDebuggee == null)? 0 :this.terminateDebuggee.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.restart == null)? 0 :this.restart.hashCode())); - result = ((result* 31)+((this.suspendDebuggee == null)? 0 :this.suspendDebuggee.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof DisconnectArguments) == false) { - return false; - } - DisconnectArguments rhs = ((DisconnectArguments) other); - return (((((this.terminateDebuggee == rhs.terminateDebuggee)||((this.terminateDebuggee!= null)&&this.terminateDebuggee.equals(rhs.terminateDebuggee)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.restart == rhs.restart)||((this.restart!= null)&&this.restart.equals(rhs.restart))))&&((this.suspendDebuggee == rhs.suspendDebuggee)||((this.suspendDebuggee!= null)&&this.suspendDebuggee.equals(rhs.suspendDebuggee)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArgumentsClass.java new file mode 100644 index 0000000..82280a0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectArgumentsClass.java @@ -0,0 +1,42 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `disconnect` request. + */ +public class DisconnectArgumentsClass { + private Boolean restart; + private Boolean suspendDebuggee; + private Boolean terminateDebuggee; + + /** + * A value of true indicates that this `disconnect` request is part of a restart sequence. + */ + @JsonProperty("restart") + public Boolean getRestart() { return restart; } + @JsonProperty("restart") + public void setRestart(Boolean value) { this.restart = value; } + + /** + * Indicates whether the debuggee should stay suspended when the debugger is disconnected. + * If unspecified, the debuggee should resume execution. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportSuspendDebuggee` is true. + */ + @JsonProperty("suspendDebuggee") + public Boolean getSuspendDebuggee() { return suspendDebuggee; } + @JsonProperty("suspendDebuggee") + public void setSuspendDebuggee(Boolean value) { this.suspendDebuggee = value; } + + /** + * Indicates whether the debuggee should be terminated when the debugger is disconnected. + * If unspecified, the debug adapter is free to do whatever it thinks is best. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportTerminateDebuggee` is true. + */ + @JsonProperty("terminateDebuggee") + public Boolean getTerminateDebuggee() { return terminateDebuggee; } + @JsonProperty("terminateDebuggee") + public void setTerminateDebuggee(Boolean value) { this.terminateDebuggee = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestArguments.java new file mode 100644 index 0000000..dcfae08 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestArguments.java @@ -0,0 +1,42 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `disconnect` request. + */ +public class DisconnectRequestArguments { + private Boolean restart; + private Boolean suspendDebuggee; + private Boolean terminateDebuggee; + + /** + * A value of true indicates that this `disconnect` request is part of a restart sequence. + */ + @JsonProperty("restart") + public Boolean getRestart() { return restart; } + @JsonProperty("restart") + public void setRestart(Boolean value) { this.restart = value; } + + /** + * Indicates whether the debuggee should stay suspended when the debugger is disconnected. + * If unspecified, the debuggee should resume execution. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportSuspendDebuggee` is true. + */ + @JsonProperty("suspendDebuggee") + public Boolean getSuspendDebuggee() { return suspendDebuggee; } + @JsonProperty("suspendDebuggee") + public void setSuspendDebuggee(Boolean value) { this.suspendDebuggee = value; } + + /** + * Indicates whether the debuggee should be terminated when the debugger is disconnected. + * If unspecified, the debug adapter is free to do whatever it thinks is best. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportTerminateDebuggee` is true. + */ + @JsonProperty("terminateDebuggee") + public Boolean getTerminateDebuggee() { return terminateDebuggee; } + @JsonProperty("terminateDebuggee") + public void setTerminateDebuggee(Boolean value) { this.terminateDebuggee = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java new file mode 100644 index 0000000..ec4378f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java @@ -0,0 +1,61 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus + * ending the debug session) and then to shut down itself (the debug adapter). + * In addition, the debug adapter must terminate the debuggee if it was started with the + * `launch` request. If an `attach` request was used to connect to the debuggee, then the + * debug adapter must not terminate the debuggee. + * This implicit behavior of when to terminate the debuggee can be overridden with the + * `terminateDebuggee` argument (which is only supported by a debug adapter if the + * corresponding capability `supportTerminateDebuggee` is true). + */ +public class DisconnectRequestClass { + private long seq; + private AttachRequestType type; + private DisconnectRequestArguments arguments; + private DisconnectRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public DisconnectRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(DisconnectRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public DisconnectRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(DisconnectRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestCommand.java new file mode 100644 index 0000000..6b74ae3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum DisconnectRequestCommand { + DISCONNECT; + + @JsonValue + public String toValue() { + switch (this) { + case DISCONNECT: return "disconnect"; + } + return null; + } + + @JsonCreator + public static DisconnectRequestCommand forValue(String value) throws IOException { + if (value.equals("disconnect")) return DISCONNECT; + throw new IOException("Cannot deserialize DisconnectRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java new file mode 100644 index 0000000..b3b1ad6 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `disconnect` request. This is just an acknowledgement, so no body field is + * required. + */ +public class DisconnectResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Env.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Env.java deleted file mode 100644 index cf25eb9..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Env.java +++ /dev/null @@ -1,73 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Environment key-value pairs that are added to or removed from the default environment. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - -}) -@Generated("jsonschema2pojo") -public class Env { - - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, String value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Env.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Env) == false) { - return false; - } - Env rhs = ((Env) other); - return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ErrorResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ErrorResponseBody.java new file mode 100644 index 0000000..f8ff21b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ErrorResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ErrorResponseBody { + private Message error; + + /** + * A structured error message. + */ + @JsonProperty("error") + public Message getError() { return error; } + @JsonProperty("error") + public void setError(Message value) { this.error = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ErrorResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ErrorResponseClass.java new file mode 100644 index 0000000..d5ad76e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ErrorResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * On error (whenever `success` is false), the body can provide more details. + */ +public class ErrorResponseClass { + private long seq; + private AttachResponseType type; + private ErrorResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public ErrorResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ErrorResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArguments.java deleted file mode 100644 index f073bfa..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArguments.java +++ /dev/null @@ -1,201 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `evaluate` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "expression", - "frameId", - "context", - "format" -}) -@Generated("jsonschema2pojo") -public class EvaluateArguments { - - /** - * The expression to evaluate. - * (Required) - * - */ - @JsonProperty("expression") - @JsonPropertyDescription("The expression to evaluate.") - private String expression; - /** - * Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. - * - */ - @JsonProperty("frameId") - @JsonPropertyDescription("Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope.") - private Integer frameId; - /** - * The context in which the evaluate request is used. - * - */ - @JsonProperty("context") - @JsonPropertyDescription("The context in which the evaluate request is used.") - private String context; - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - @JsonPropertyDescription("Provides formatting information for a value.") - private ValueFormat format; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The expression to evaluate. - * (Required) - * - */ - @JsonProperty("expression") - public String getExpression() { - return expression; - } - - /** - * The expression to evaluate. - * (Required) - * - */ - @JsonProperty("expression") - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. - * - */ - @JsonProperty("frameId") - public Integer getFrameId() { - return frameId; - } - - /** - * Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. - * - */ - @JsonProperty("frameId") - public void setFrameId(Integer frameId) { - this.frameId = frameId; - } - - /** - * The context in which the evaluate request is used. - * - */ - @JsonProperty("context") - public String getContext() { - return context; - } - - /** - * The context in which the evaluate request is used. - * - */ - @JsonProperty("context") - public void setContext(String context) { - this.context = context; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - public ValueFormat getFormat() { - return format; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - public void setFormat(ValueFormat format) { - this.format = format; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(EvaluateArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("expression"); - sb.append('='); - sb.append(((this.expression == null)?"":this.expression)); - sb.append(','); - sb.append("frameId"); - sb.append('='); - sb.append(((this.frameId == null)?"":this.frameId)); - sb.append(','); - sb.append("context"); - sb.append('='); - sb.append(((this.context == null)?"":this.context)); - sb.append(','); - sb.append("format"); - sb.append('='); - sb.append(((this.format == null)?"":this.format)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.context == null)? 0 :this.context.hashCode())); - result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); - result = ((result* 31)+((this.expression == null)? 0 :this.expression.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof EvaluateArguments) == false) { - return false; - } - EvaluateArguments rhs = ((EvaluateArguments) other); - return ((((((this.context == rhs.context)||((this.context!= null)&&this.context.equals(rhs.context)))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.expression == rhs.expression)||((this.expression!= null)&&this.expression.equals(rhs.expression))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArgumentsClass.java new file mode 100644 index 0000000..146ffdf --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateArgumentsClass.java @@ -0,0 +1,48 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `evaluate` request. + */ +public class EvaluateArgumentsClass { + private String context; + private String expression; + private ValueFormat format; + private Long frameID; + + /** + * The context in which the evaluate request is used. + */ + @JsonProperty("context") + public String getContext() { return context; } + @JsonProperty("context") + public void setContext(String value) { this.context = value; } + + /** + * The expression to evaluate. + */ + @JsonProperty("expression") + public String getExpression() { return expression; } + @JsonProperty("expression") + public void setExpression(String value) { this.expression = value; } + + /** + * Specifies details on how to format the result. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + */ + @JsonProperty("format") + public ValueFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(ValueFormat value) { this.format = value; } + + /** + * Evaluate the expression in the scope of this stack frame. If not specified, the + * expression is evaluated in the global scope. + */ + @JsonProperty("frameId") + public Long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(Long value) { this.frameID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestArguments.java new file mode 100644 index 0000000..1d81bd5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestArguments.java @@ -0,0 +1,48 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `evaluate` request. + */ +public class EvaluateRequestArguments { + private String context; + private String expression; + private ValueFormat format; + private Long frameID; + + /** + * The context in which the evaluate request is used. + */ + @JsonProperty("context") + public String getContext() { return context; } + @JsonProperty("context") + public void setContext(String value) { this.context = value; } + + /** + * The expression to evaluate. + */ + @JsonProperty("expression") + public String getExpression() { return expression; } + @JsonProperty("expression") + public void setExpression(String value) { this.expression = value; } + + /** + * Specifies details on how to format the result. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + */ + @JsonProperty("format") + public ValueFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(ValueFormat value) { this.format = value; } + + /** + * Evaluate the expression in the scope of this stack frame. If not specified, the + * expression is evaluated in the global scope. + */ + @JsonProperty("frameId") + public Long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(Long value) { this.frameID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java new file mode 100644 index 0000000..e03d419 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java @@ -0,0 +1,55 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Evaluates the given expression in the context of the topmost stack frame. + * The expression has access to any variables and arguments that are in scope. + */ +public class EvaluateRequestClass { + private long seq; + private AttachRequestType type; + private EvaluateRequestArguments arguments; + private EvaluateRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public EvaluateRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(EvaluateRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public EvaluateRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(EvaluateRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestCommand.java new file mode 100644 index 0000000..df80a08 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum EvaluateRequestCommand { + EVALUATE; + + @JsonValue + public String toValue() { + switch (this) { + case EVALUATE: return "evaluate"; + } + return null; + } + + @JsonCreator + public static EvaluateRequestCommand forValue(String value) throws IOException { + if (value.equals("evaluate")) return EVALUATE; + throw new IOException("Cannot deserialize EvaluateRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseBody.java new file mode 100644 index 0000000..d61d662 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseBody.java @@ -0,0 +1,85 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class EvaluateResponseBody { + private Long indexedVariables; + private String memoryReference; + private Long namedVariables; + private VariablePresentationHint presentationHint; + private String result; + private String type; + private long variablesReference; + + /** + * The number of indexed child variables. + * The client can use this information to present the variables in a paged UI and fetch them + * in chunks. + * The value should be less than or equal to 2147483647 (2^31-1). + */ + @JsonProperty("indexedVariables") + public Long getIndexedVariables() { return indexedVariables; } + @JsonProperty("indexedVariables") + public void setIndexedVariables(Long value) { this.indexedVariables = value; } + + /** + * A memory reference to a location appropriate for this result. + * For pointer type eval results, this is generally a reference to the memory address + * contained in the pointer. + * This attribute may be returned by a debug adapter if corresponding capability + * `supportsMemoryReferences` is true. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * The number of named child variables. + * The client can use this information to present the variables in a paged UI and fetch them + * in chunks. + * The value should be less than or equal to 2147483647 (2^31-1). + */ + @JsonProperty("namedVariables") + public Long getNamedVariables() { return namedVariables; } + @JsonProperty("namedVariables") + public void setNamedVariables(Long value) { this.namedVariables = value; } + + /** + * Properties of an evaluate result that can be used to determine how to render the result + * in the UI. + */ + @JsonProperty("presentationHint") + public VariablePresentationHint getPresentationHint() { return presentationHint; } + @JsonProperty("presentationHint") + public void setPresentationHint(VariablePresentationHint value) { this.presentationHint = value; } + + /** + * The result of the evaluate request. + */ + @JsonProperty("result") + public String getResult() { return result; } + @JsonProperty("result") + public void setResult(String value) { this.result = value; } + + /** + * The type of the evaluate result. + * This attribute should only be returned by a debug adapter if the corresponding capability + * `supportsVariableType` is true. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * If `variablesReference` is > 0, the evaluate result is structured and its children can be + * retrieved by passing `variablesReference` to the `variables` request as long as execution + * remains suspended. See 'Lifetime of Object References' in the Overview section for + * details. + */ + @JsonProperty("variablesReference") + public long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java new file mode 100644 index 0000000..122d252 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `evaluate` request. + */ +public class EvaluateResponseClass { + private long seq; + private AttachResponseType type; + private EvaluateResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public EvaluateResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(EvaluateResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Event.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Event.java new file mode 100644 index 0000000..f498655 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Event.java @@ -0,0 +1,52 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + */ +public class Event { + private long seq; + private BreakpointEventType type; + private Restart body; + private String event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public String getEvent() { return event; } + @JsonProperty("event") + public void setEvent(String value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakMode.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakMode.java new file mode 100644 index 0000000..32bf985 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakMode.java @@ -0,0 +1,40 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * This enumeration defines all possible conditions when a thrown exception should result in + * a break. + * never: never breaks, + * always: always breaks, + * unhandled: breaks when exception unhandled, + * userUnhandled: breaks if the exception is not handled by user code. + * + * Mode that caused the exception notification to be raised. + * + * Condition when a thrown exception should result in a break. + */ +public enum ExceptionBreakMode { + ALWAYS, NEVER, UNHANDLED, USER_UNHANDLED; + + @JsonValue + public String toValue() { + switch (this) { + case ALWAYS: return "always"; + case NEVER: return "never"; + case UNHANDLED: return "unhandled"; + case USER_UNHANDLED: return "userUnhandled"; + } + return null; + } + + @JsonCreator + public static ExceptionBreakMode forValue(String value) throws IOException { + if (value.equals("always")) return ALWAYS; + if (value.equals("never")) return NEVER; + if (value.equals("unhandled")) return UNHANDLED; + if (value.equals("userUnhandled")) return USER_UNHANDLED; + throw new IOException("Cannot deserialize ExceptionBreakMode"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakpointsFilter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakpointsFilter.java index 0d42024..adbb3da 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakpointsFilter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionBreakpointsFilter.java @@ -1,266 +1,68 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** - * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. - * + * An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring + * how exceptions are dealt with. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "filter", - "label", - "description", - "default", - "supportsCondition", - "conditionDescription" -}) -@Generated("jsonschema2pojo") public class ExceptionBreakpointsFilter { - - /** - * The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. - * (Required) - * - */ - @JsonProperty("filter") - @JsonPropertyDescription("The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request.") + private String conditionDescription; + private Boolean exceptionBreakpointsFilterDefault; + private String description; private String filter; - /** - * The name of the filter option. This is shown in the UI. - * (Required) - * - */ - @JsonProperty("label") - @JsonPropertyDescription("The name of the filter option. This is shown in the UI.") private String label; + private Boolean supportsCondition; + /** - * A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated. - * + * A help text providing information about the condition. This string is shown as the + * placeholder text for a text box and can be translated. */ - @JsonProperty("description") - @JsonPropertyDescription("A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated.") - private String description; + @JsonProperty("conditionDescription") + public String getConditionDescription() { return conditionDescription; } + @JsonProperty("conditionDescription") + public void setConditionDescription(String value) { this.conditionDescription = value; } + /** * Initial value of the filter option. If not specified a value false is assumed. - * */ @JsonProperty("default") - @JsonPropertyDescription("Initial value of the filter option. If not specified a value false is assumed.") - private Boolean _default; - /** - * Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. - * - */ - @JsonProperty("supportsCondition") - @JsonPropertyDescription("Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set.") - private Boolean supportsCondition; - /** - * A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated. - * - */ - @JsonProperty("conditionDescription") - @JsonPropertyDescription("A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated.") - private String conditionDescription; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public Boolean getExceptionBreakpointsFilterDefault() { return exceptionBreakpointsFilterDefault; } + @JsonProperty("default") + public void setExceptionBreakpointsFilterDefault(Boolean value) { this.exceptionBreakpointsFilterDefault = value; } /** - * The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. - * (Required) - * + * A help text providing additional information about the exception filter. This string is + * typically shown as a hover and can be translated. */ - @JsonProperty("filter") - public String getFilter() { - return filter; - } + @JsonProperty("description") + public String getDescription() { return description; } + @JsonProperty("description") + public void setDescription(String value) { this.description = value; } /** - * The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. - * (Required) - * + * The internal ID of the filter option. This value is passed to the + * `setExceptionBreakpoints` request. */ @JsonProperty("filter") - public void setFilter(String filter) { - this.filter = filter; - } + public String getFilter() { return filter; } + @JsonProperty("filter") + public void setFilter(String value) { this.filter = value; } /** * The name of the filter option. This is shown in the UI. - * (Required) - * */ @JsonProperty("label") - public String getLabel() { - return label; - } - - /** - * The name of the filter option. This is shown in the UI. - * (Required) - * - */ + public String getLabel() { return label; } @JsonProperty("label") - public void setLabel(String label) { - this.label = label; - } + public void setLabel(String value) { this.label = value; } /** - * A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated. - * - */ - @JsonProperty("description") - public String getDescription() { - return description; - } - - /** - * A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated. - * - */ - @JsonProperty("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Initial value of the filter option. If not specified a value false is assumed. - * - */ - @JsonProperty("default") - public Boolean getDefault() { - return _default; - } - - /** - * Initial value of the filter option. If not specified a value false is assumed. - * - */ - @JsonProperty("default") - public void setDefault(Boolean _default) { - this._default = _default; - } - - /** - * Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. - * + * Controls whether a condition can be specified for this filter option. If false or + * missing, a condition can not be set. */ @JsonProperty("supportsCondition") - public Boolean getSupportsCondition() { - return supportsCondition; - } - - /** - * Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. - * - */ + public Boolean getSupportsCondition() { return supportsCondition; } @JsonProperty("supportsCondition") - public void setSupportsCondition(Boolean supportsCondition) { - this.supportsCondition = supportsCondition; - } - - /** - * A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated. - * - */ - @JsonProperty("conditionDescription") - public String getConditionDescription() { - return conditionDescription; - } - - /** - * A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated. - * - */ - @JsonProperty("conditionDescription") - public void setConditionDescription(String conditionDescription) { - this.conditionDescription = conditionDescription; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExceptionBreakpointsFilter.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("filter"); - sb.append('='); - sb.append(((this.filter == null)?"":this.filter)); - sb.append(','); - sb.append("label"); - sb.append('='); - sb.append(((this.label == null)?"":this.label)); - sb.append(','); - sb.append("description"); - sb.append('='); - sb.append(((this.description == null)?"":this.description)); - sb.append(','); - sb.append("_default"); - sb.append('='); - sb.append(((this._default == null)?"":this._default)); - sb.append(','); - sb.append("supportsCondition"); - sb.append('='); - sb.append(((this.supportsCondition == null)?"":this.supportsCondition)); - sb.append(','); - sb.append("conditionDescription"); - sb.append('='); - sb.append(((this.conditionDescription == null)?"":this.conditionDescription)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.filter == null)? 0 :this.filter.hashCode())); - result = ((result* 31)+((this._default == null)? 0 :this._default.hashCode())); - result = ((result* 31)+((this.supportsCondition == null)? 0 :this.supportsCondition.hashCode())); - result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); - result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.conditionDescription == null)? 0 :this.conditionDescription.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ExceptionBreakpointsFilter) == false) { - return false; - } - ExceptionBreakpointsFilter rhs = ((ExceptionBreakpointsFilter) other); - return ((((((((this.filter == rhs.filter)||((this.filter!= null)&&this.filter.equals(rhs.filter)))&&((this._default == rhs._default)||((this._default!= null)&&this._default.equals(rhs._default))))&&((this.supportsCondition == rhs.supportsCondition)||((this.supportsCondition!= null)&&this.supportsCondition.equals(rhs.supportsCondition))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.conditionDescription == rhs.conditionDescription)||((this.conditionDescription!= null)&&this.conditionDescription.equals(rhs.conditionDescription)))); - } - + public void setSupportsCondition(Boolean value) { this.supportsCondition = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionDetails.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionDetails.java index f2342f1..108e655 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionDetails.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionDetails.java @@ -1,262 +1,65 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * Detailed information about an exception that has occurred. - * + * + * Detailed information about the exception. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "message", - "typeName", - "fullTypeName", - "evaluateName", - "stackTrace", - "innerException" -}) -@Generated("jsonschema2pojo") public class ExceptionDetails { - - /** - * Message contained in the exception. - * - */ - @JsonProperty("message") - @JsonPropertyDescription("Message contained in the exception.") + private String evaluateName; + private String fullTypeName; + private ExceptionDetails[] innerException; private String message; - /** - * Short type name of the exception object. - * - */ - @JsonProperty("typeName") - @JsonPropertyDescription("Short type name of the exception object.") + private String stackTrace; private String typeName; - /** - * Fully-qualified type name of the exception object. - * - */ - @JsonProperty("fullTypeName") - @JsonPropertyDescription("Fully-qualified type name of the exception object.") - private String fullTypeName; + /** * An expression that can be evaluated in the current scope to obtain the exception object. - * */ @JsonProperty("evaluateName") - @JsonPropertyDescription("An expression that can be evaluated in the current scope to obtain the exception object.") - private String evaluateName; - /** - * Stack trace at the time the exception was thrown. - * - */ - @JsonProperty("stackTrace") - @JsonPropertyDescription("Stack trace at the time the exception was thrown.") - private String stackTrace; - /** - * Details of the exception contained by this exception, if any. - * - */ - @JsonProperty("innerException") - @JsonPropertyDescription("Details of the exception contained by this exception, if any.") - private List innerException = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Message contained in the exception. - * - */ - @JsonProperty("message") - public String getMessage() { - return message; - } - - /** - * Message contained in the exception. - * - */ - @JsonProperty("message") - public void setMessage(String message) { - this.message = message; - } - - /** - * Short type name of the exception object. - * - */ - @JsonProperty("typeName") - public String getTypeName() { - return typeName; - } - - /** - * Short type name of the exception object. - * - */ - @JsonProperty("typeName") - public void setTypeName(String typeName) { - this.typeName = typeName; - } + public String getEvaluateName() { return evaluateName; } + @JsonProperty("evaluateName") + public void setEvaluateName(String value) { this.evaluateName = value; } /** * Fully-qualified type name of the exception object. - * */ @JsonProperty("fullTypeName") - public String getFullTypeName() { - return fullTypeName; - } - - /** - * Fully-qualified type name of the exception object. - * - */ + public String getFullTypeName() { return fullTypeName; } @JsonProperty("fullTypeName") - public void setFullTypeName(String fullTypeName) { - this.fullTypeName = fullTypeName; - } + public void setFullTypeName(String value) { this.fullTypeName = value; } /** - * An expression that can be evaluated in the current scope to obtain the exception object. - * + * Details of the exception contained by this exception, if any. */ - @JsonProperty("evaluateName") - public String getEvaluateName() { - return evaluateName; - } + @JsonProperty("innerException") + public ExceptionDetails[] getInnerException() { return innerException; } + @JsonProperty("innerException") + public void setInnerException(ExceptionDetails[] value) { this.innerException = value; } /** - * An expression that can be evaluated in the current scope to obtain the exception object. - * + * Message contained in the exception. */ - @JsonProperty("evaluateName") - public void setEvaluateName(String evaluateName) { - this.evaluateName = evaluateName; - } + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } /** * Stack trace at the time the exception was thrown. - * */ @JsonProperty("stackTrace") - public String getStackTrace() { - return stackTrace; - } - - /** - * Stack trace at the time the exception was thrown. - * - */ + public String getStackTrace() { return stackTrace; } @JsonProperty("stackTrace") - public void setStackTrace(String stackTrace) { - this.stackTrace = stackTrace; - } + public void setStackTrace(String value) { this.stackTrace = value; } /** - * Details of the exception contained by this exception, if any. - * - */ - @JsonProperty("innerException") - public List getInnerException() { - return innerException; - } - - /** - * Details of the exception contained by this exception, if any. - * + * Short type name of the exception object. */ - @JsonProperty("innerException") - public void setInnerException(List innerException) { - this.innerException = innerException; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExceptionDetails.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("message"); - sb.append('='); - sb.append(((this.message == null)?"":this.message)); - sb.append(','); - sb.append("typeName"); - sb.append('='); - sb.append(((this.typeName == null)?"":this.typeName)); - sb.append(','); - sb.append("fullTypeName"); - sb.append('='); - sb.append(((this.fullTypeName == null)?"":this.fullTypeName)); - sb.append(','); - sb.append("evaluateName"); - sb.append('='); - sb.append(((this.evaluateName == null)?"":this.evaluateName)); - sb.append(','); - sb.append("stackTrace"); - sb.append('='); - sb.append(((this.stackTrace == null)?"":this.stackTrace)); - sb.append(','); - sb.append("innerException"); - sb.append('='); - sb.append(((this.innerException == null)?"":this.innerException)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.innerException == null)? 0 :this.innerException.hashCode())); - result = ((result* 31)+((this.typeName == null)? 0 :this.typeName.hashCode())); - result = ((result* 31)+((this.fullTypeName == null)? 0 :this.fullTypeName.hashCode())); - result = ((result* 31)+((this.evaluateName == null)? 0 :this.evaluateName.hashCode())); - result = ((result* 31)+((this.stackTrace == null)? 0 :this.stackTrace.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ExceptionDetails) == false) { - return false; - } - ExceptionDetails rhs = ((ExceptionDetails) other); - return ((((((((this.innerException == rhs.innerException)||((this.innerException!= null)&&this.innerException.equals(rhs.innerException)))&&((this.typeName == rhs.typeName)||((this.typeName!= null)&&this.typeName.equals(rhs.typeName))))&&((this.fullTypeName == rhs.fullTypeName)||((this.fullTypeName!= null)&&this.fullTypeName.equals(rhs.fullTypeName))))&&((this.evaluateName == rhs.evaluateName)||((this.evaluateName!= null)&&this.evaluateName.equals(rhs.evaluateName))))&&((this.stackTrace == rhs.stackTrace)||((this.stackTrace!= null)&&this.stackTrace.equals(rhs.stackTrace))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message)))); - } - + @JsonProperty("typeName") + public String getTypeName() { return typeName; } + @JsonProperty("typeName") + public void setTypeName(String value) { this.typeName = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionFilterOptions.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionFilterOptions.java index 0bce677..aade121 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionFilterOptions.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionFilterOptions.java @@ -1,142 +1,29 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** - * An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. - * + * An `ExceptionFilterOptions` is used to specify an exception filter together with a + * condition for the `setExceptionBreakpoints` request. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "filterId", - "condition" -}) -@Generated("jsonschema2pojo") public class ExceptionFilterOptions { + private String condition; + private String filterID; - /** - * ID of an exception filter returned by the `exceptionBreakpointFilters` capability. - * (Required) - * - */ - @JsonProperty("filterId") - @JsonPropertyDescription("ID of an exception filter returned by the `exceptionBreakpointFilters` capability.") - private String filterId; /** * An expression for conditional exceptions. * The exception breaks into the debugger if the result of the condition is true. - * */ @JsonProperty("condition") - @JsonPropertyDescription("An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is true.") - private String condition; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public String getCondition() { return condition; } + @JsonProperty("condition") + public void setCondition(String value) { this.condition = value; } /** * ID of an exception filter returned by the `exceptionBreakpointFilters` capability. - * (Required) - * */ @JsonProperty("filterId") - public String getFilterId() { - return filterId; - } - - /** - * ID of an exception filter returned by the `exceptionBreakpointFilters` capability. - * (Required) - * - */ + public String getFilterID() { return filterID; } @JsonProperty("filterId") - public void setFilterId(String filterId) { - this.filterId = filterId; - } - - /** - * An expression for conditional exceptions. - * The exception breaks into the debugger if the result of the condition is true. - * - */ - @JsonProperty("condition") - public String getCondition() { - return condition; - } - - /** - * An expression for conditional exceptions. - * The exception breaks into the debugger if the result of the condition is true. - * - */ - @JsonProperty("condition") - public void setCondition(String condition) { - this.condition = condition; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExceptionFilterOptions.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("filterId"); - sb.append('='); - sb.append(((this.filterId == null)?"":this.filterId)); - sb.append(','); - sb.append("condition"); - sb.append('='); - sb.append(((this.condition == null)?"":this.condition)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.filterId == null)? 0 :this.filterId.hashCode())); - result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ExceptionFilterOptions) == false) { - return false; - } - ExceptionFilterOptions rhs = ((ExceptionFilterOptions) other); - return ((((this.filterId == rhs.filterId)||((this.filterId!= null)&&this.filterId.equals(rhs.filterId)))&&((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + public void setFilterID(String value) { this.filterID = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArguments.java deleted file mode 100644 index d919b07..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArguments.java +++ /dev/null @@ -1,108 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `exceptionInfo` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId" -}) -@Generated("jsonschema2pojo") -public class ExceptionInfoArguments { - - /** - * Thread for which exception information should be retrieved. - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Thread for which exception information should be retrieved.") - private Integer threadId; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Thread for which exception information should be retrieved. - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Thread for which exception information should be retrieved. - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExceptionInfoArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ExceptionInfoArguments) == false) { - return false; - } - ExceptionInfoArguments rhs = ((ExceptionInfoArguments) other); - return (((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArgumentsClass.java new file mode 100644 index 0000000..3b60ef5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoArgumentsClass.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `exceptionInfo` request. + */ +public class ExceptionInfoArgumentsClass { + private long threadID; + + /** + * Thread for which exception information should be retrieved. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestArguments.java new file mode 100644 index 0000000..af571c2 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestArguments.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `exceptionInfo` request. + */ +public class ExceptionInfoRequestArguments { + private long threadID; + + /** + * Thread for which exception information should be retrieved. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestClass.java new file mode 100644 index 0000000..b5b509f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestClass.java @@ -0,0 +1,56 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Retrieves the details of the exception that caused this event to be raised. + * Clients should only call this request if the corresponding capability + * `supportsExceptionInfoRequest` is true. + */ +public class ExceptionInfoRequestClass { + private long seq; + private AttachRequestType type; + private ExceptionInfoRequestArguments arguments; + private ExceptionInfoRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public ExceptionInfoRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(ExceptionInfoRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public ExceptionInfoRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(ExceptionInfoRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestCommand.java new file mode 100644 index 0000000..548e9c9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ExceptionInfoRequestCommand { + EXCEPTION_INFO; + + @JsonValue + public String toValue() { + switch (this) { + case EXCEPTION_INFO: return "exceptionInfo"; + } + return null; + } + + @JsonCreator + public static ExceptionInfoRequestCommand forValue(String value) throws IOException { + if (value.equals("exceptionInfo")) return EXCEPTION_INFO; + throw new IOException("Cannot deserialize ExceptionInfoRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoResponseBody.java new file mode 100644 index 0000000..01b9f0b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoResponseBody.java @@ -0,0 +1,42 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ExceptionInfoResponseBody { + private ExceptionBreakMode breakMode; + private String description; + private ExceptionDetails details; + private String exceptionID; + + /** + * Mode that caused the exception notification to be raised. + */ + @JsonProperty("breakMode") + public ExceptionBreakMode getBreakMode() { return breakMode; } + @JsonProperty("breakMode") + public void setBreakMode(ExceptionBreakMode value) { this.breakMode = value; } + + /** + * Descriptive text for the exception. + */ + @JsonProperty("description") + public String getDescription() { return description; } + @JsonProperty("description") + public void setDescription(String value) { this.description = value; } + + /** + * Detailed information about the exception. + */ + @JsonProperty("details") + public ExceptionDetails getDetails() { return details; } + @JsonProperty("details") + public void setDetails(ExceptionDetails value) { this.details = value; } + + /** + * ID of the exception that was thrown. + */ + @JsonProperty("exceptionId") + public String getExceptionID() { return exceptionID; } + @JsonProperty("exceptionId") + public void setExceptionID(String value) { this.exceptionID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoResponseClass.java new file mode 100644 index 0000000..5872fc0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionInfoResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `exceptionInfo` request. + */ +public class ExceptionInfoResponseClass { + private long seq; + private AttachResponseType type; + private ExceptionInfoResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public ExceptionInfoResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ExceptionInfoResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionOptions.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionOptions.java index 5d37197..c00114e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionOptions.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionOptions.java @@ -1,156 +1,30 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * An `ExceptionOptions` assigns configuration options to a set of exceptions. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "path", - "breakMode" -}) -@Generated("jsonschema2pojo") public class ExceptionOptions { + private ExceptionBreakMode breakMode; + private ExceptionPathSegment[] path; /** - * A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected. - * By convention the first segment of the path is a category that is used to group exceptions in the UI. - * - */ - @JsonProperty("path") - @JsonPropertyDescription("A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI.") - private List path = new ArrayList(); - /** - * This enumeration defines all possible conditions when a thrown exception should result in a break. - * never: never breaks, - * always: always breaks, - * unhandled: breaks when exception unhandled, - * userUnhandled: breaks if the exception is not handled by user code. - * (Required) - * + * Condition when a thrown exception should result in a break. */ @JsonProperty("breakMode") - @JsonPropertyDescription("This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.") - private DebugProtocol.ExceptionBreakMode breakMode; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public ExceptionBreakMode getBreakMode() { return breakMode; } + @JsonProperty("breakMode") + public void setBreakMode(ExceptionBreakMode value) { this.breakMode = value; } /** - * A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected. - * By convention the first segment of the path is a category that is used to group exceptions in the UI. - * + * A path that selects a single or multiple exceptions in a tree. If `path` is missing, the + * whole tree is selected. + * By convention the first segment of the path is a category that is used to group + * exceptions in the UI. */ @JsonProperty("path") - public List getPath() { - return path; - } - - /** - * A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected. - * By convention the first segment of the path is a category that is used to group exceptions in the UI. - * - */ + public ExceptionPathSegment[] getPath() { return path; } @JsonProperty("path") - public void setPath(List path) { - this.path = path; - } - - /** - * This enumeration defines all possible conditions when a thrown exception should result in a break. - * never: never breaks, - * always: always breaks, - * unhandled: breaks when exception unhandled, - * userUnhandled: breaks if the exception is not handled by user code. - * (Required) - * - */ - @JsonProperty("breakMode") - public DebugProtocol.ExceptionBreakMode getBreakMode() { - return breakMode; - } - - /** - * This enumeration defines all possible conditions when a thrown exception should result in a break. - * never: never breaks, - * always: always breaks, - * unhandled: breaks when exception unhandled, - * userUnhandled: breaks if the exception is not handled by user code. - * (Required) - * - */ - @JsonProperty("breakMode") - public void setBreakMode(DebugProtocol.ExceptionBreakMode breakMode) { - this.breakMode = breakMode; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExceptionOptions.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("path"); - sb.append('='); - sb.append(((this.path == null)?"":this.path)); - sb.append(','); - sb.append("breakMode"); - sb.append('='); - sb.append(((this.breakMode == null)?"":this.breakMode)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.path == null)? 0 :this.path.hashCode())); - result = ((result* 31)+((this.breakMode == null)? 0 :this.breakMode.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ExceptionOptions) == false) { - return false; - } - ExceptionOptions rhs = ((ExceptionOptions) other); - return ((((this.path == rhs.path)||((this.path!= null)&&this.path.equals(rhs.path)))&&((this.breakMode == rhs.breakMode)||((this.breakMode!= null)&&this.breakMode.equals(rhs.breakMode))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + public void setPath(ExceptionPathSegment[] value) { this.path = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionPathSegment.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionPathSegment.java index df5620a..88c6c87 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionPathSegment.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExceptionPathSegment.java @@ -1,142 +1,31 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** - * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. - * If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. - * + * An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or + * nodes in a tree of exceptions. + * If a segment consists of more than one name, it matches the names provided if `negate` is + * false or missing, or it matches anything except the names provided if `negate` is true. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "negate", - "names" -}) -@Generated("jsonschema2pojo") public class ExceptionPathSegment { - - /** - * If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. - * - */ - @JsonProperty("negate") - @JsonPropertyDescription("If false or missing this segment matches the names provided, otherwise it matches anything except the names provided.") + private String[] names; private Boolean negate; + /** * Depending on the value of `negate` the names that should match or not match. - * (Required) - * */ @JsonProperty("names") - @JsonPropertyDescription("Depending on the value of `negate` the names that should match or not match.") - private List names = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public String[] getNames() { return names; } + @JsonProperty("names") + public void setNames(String[] value) { this.names = value; } /** - * If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. - * + * If false or missing this segment matches the names provided, otherwise it matches + * anything except the names provided. */ @JsonProperty("negate") - public Boolean getNegate() { - return negate; - } - - /** - * If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. - * - */ + public Boolean getNegate() { return negate; } @JsonProperty("negate") - public void setNegate(Boolean negate) { - this.negate = negate; - } - - /** - * Depending on the value of `negate` the names that should match or not match. - * (Required) - * - */ - @JsonProperty("names") - public List getNames() { - return names; - } - - /** - * Depending on the value of `negate` the names that should match or not match. - * (Required) - * - */ - @JsonProperty("names") - public void setNames(List names) { - this.names = names; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExceptionPathSegment.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("negate"); - sb.append('='); - sb.append(((this.negate == null)?"":this.negate)); - sb.append(','); - sb.append("names"); - sb.append('='); - sb.append(((this.names == null)?"":this.names)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.negate == null)? 0 :this.negate.hashCode())); - result = ((result* 31)+((this.names == null)? 0 :this.names.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ExceptionPathSegment) == false) { - return false; - } - ExceptionPathSegment rhs = ((ExceptionPathSegment) other); - return ((((this.negate == rhs.negate)||((this.negate!= null)&&this.negate.equals(rhs.negate)))&&((this.names == rhs.names)||((this.names!= null)&&this.names.equals(rhs.names))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + public void setNegate(Boolean value) { this.negate = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventBody.java new file mode 100644 index 0000000..bb30527 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ExitedEventBody { + private long exitCode; + + /** + * The exit code returned from the debuggee. + */ + @JsonProperty("exitCode") + public long getExitCode() { return exitCode; } + @JsonProperty("exitCode") + public void setExitCode(long value) { this.exitCode = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventClass.java new file mode 100644 index 0000000..11ef36b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventClass.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that the debuggee has exited and returns its exit code. + */ +public class ExitedEventClass { + private long seq; + private BreakpointEventType type; + private ExitedEventBody body; + private ExitedEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public ExitedEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ExitedEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public ExitedEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(ExitedEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventEvent.java new file mode 100644 index 0000000..9406e78 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ExitedEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ExitedEventEvent { + EXITED; + + @JsonValue + public String toValue() { + switch (this) { + case EXITED: return "exited"; + } + return null; + } + + @JsonCreator + public static ExitedEventEvent forValue(String value) throws IOException { + if (value.equals("exited")) return EXITED; + throw new IOException("Cannot deserialize ExitedEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Filter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Filter.java new file mode 100644 index 0000000..7197ac4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Filter.java @@ -0,0 +1,28 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * Filter to limit the child variables to either named or indexed. If omitted, both types + * are fetched. + */ +public enum Filter { + INDEXED, NAMED; + + @JsonValue + public String toValue() { + switch (this) { + case INDEXED: return "indexed"; + case NAMED: return "named"; + } + return null; + } + + @JsonCreator + public static Filter forValue(String value) throws IOException { + if (value.equals("indexed")) return INDEXED; + if (value.equals("named")) return NAMED; + throw new IOException("Cannot deserialize Filter"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/FunctionBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/FunctionBreakpoint.java index f069a92..3a65664 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/FunctionBreakpoint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/FunctionBreakpoint.java @@ -1,179 +1,41 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * Properties of a breakpoint passed to the `setFunctionBreakpoints` request. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "name", - "condition", - "hitCondition" -}) -@Generated("jsonschema2pojo") public class FunctionBreakpoint { - - /** - * The name of the function. - * (Required) - * - */ - @JsonProperty("name") - @JsonPropertyDescription("The name of the function.") - private String name; - /** - * An expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * - */ - @JsonProperty("condition") - @JsonPropertyDescription("An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.") private String condition; - /** - * An expression that controls how many hits of the breakpoint are ignored. - * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * - */ - @JsonProperty("hitCondition") - @JsonPropertyDescription("An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.") private String hitCondition; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The name of the function. - * (Required) - * - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * The name of the function. - * (Required) - * - */ - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } + private String name; /** * An expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * + * It is only honored by a debug adapter if the corresponding capability + * `supportsConditionalBreakpoints` is true. */ @JsonProperty("condition") - public String getCondition() { - return condition; - } - - /** - * An expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * - */ + public String getCondition() { return condition; } @JsonProperty("condition") - public void setCondition(String condition) { - this.condition = condition; - } + public void setCondition(String value) { this.condition = value; } /** * An expression that controls how many hits of the breakpoint are ignored. * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsHitConditionalBreakpoints` is true. */ @JsonProperty("hitCondition") - public String getHitCondition() { - return hitCondition; - } + public String getHitCondition() { return hitCondition; } + @JsonProperty("hitCondition") + public void setHitCondition(String value) { this.hitCondition = value; } /** - * An expression that controls how many hits of the breakpoint are ignored. - * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * + * The name of the function. */ - @JsonProperty("hitCondition") - public void setHitCondition(String hitCondition) { - this.hitCondition = hitCondition; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(FunctionBreakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("condition"); - sb.append('='); - sb.append(((this.condition == null)?"":this.condition)); - sb.append(','); - sb.append("hitCondition"); - sb.append('='); - sb.append(((this.hitCondition == null)?"":this.hitCondition)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); - result = ((result* 31)+((this.hitCondition == null)? 0 :this.hitCondition.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof FunctionBreakpoint) == false) { - return false; - } - FunctionBreakpoint rhs = ((FunctionBreakpoint) other); - return (((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition))))&&((this.hitCondition == rhs.hitCondition)||((this.hitCondition!= null)&&this.hitCondition.equals(rhs.hitCondition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArguments.java deleted file mode 100644 index b77e13c..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArguments.java +++ /dev/null @@ -1,142 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `goto` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId", - "targetId" -}) -@Generated("jsonschema2pojo") -public class GotoArguments { - - /** - * Set the goto target for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Set the goto target for this thread.") - private Integer threadId; - /** - * The location where the debuggee will continue to run. - * (Required) - * - */ - @JsonProperty("targetId") - @JsonPropertyDescription("The location where the debuggee will continue to run.") - private Integer targetId; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Set the goto target for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Set the goto target for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - /** - * The location where the debuggee will continue to run. - * (Required) - * - */ - @JsonProperty("targetId") - public Integer getTargetId() { - return targetId; - } - - /** - * The location where the debuggee will continue to run. - * (Required) - * - */ - @JsonProperty("targetId") - public void setTargetId(Integer targetId) { - this.targetId = targetId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(GotoArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("targetId"); - sb.append('='); - sb.append(((this.targetId == null)?"":this.targetId)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.targetId == null)? 0 :this.targetId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof GotoArguments) == false) { - return false; - } - GotoArguments rhs = ((GotoArguments) other); - return ((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.targetId == rhs.targetId)||((this.targetId!= null)&&this.targetId.equals(rhs.targetId))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArgumentsClass.java new file mode 100644 index 0000000..f222550 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoArgumentsClass.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `goto` request. + */ +public class GotoArgumentsClass { + private long targetID; + private long threadID; + + /** + * The location where the debuggee will continue to run. + */ + @JsonProperty("targetId") + public long getTargetID() { return targetID; } + @JsonProperty("targetId") + public void setTargetID(long value) { this.targetID = value; } + + /** + * Set the goto target for this thread. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestArguments.java new file mode 100644 index 0000000..0265f95 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestArguments.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `goto` request. + */ +public class GotoRequestArguments { + private long targetID; + private long threadID; + + /** + * The location where the debuggee will continue to run. + */ + @JsonProperty("targetId") + public long getTargetID() { return targetID; } + @JsonProperty("targetId") + public void setTargetID(long value) { this.targetID = value; } + + /** + * Set the goto target for this thread. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestClass.java new file mode 100644 index 0000000..cbbc6c5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestClass.java @@ -0,0 +1,60 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request sets the location where the debuggee will continue to run. + * This makes it possible to skip the execution of code or to execute code again. + * The code between the current location and the goto target is not executed but skipped. + * The debug adapter first sends the response and then a `stopped` event with reason `goto`. + * Clients should only call this request if the corresponding capability + * `supportsGotoTargetsRequest` is true (because only then goto targets exist that can be + * passed as arguments). + */ +public class GotoRequestClass { + private long seq; + private AttachRequestType type; + private GotoRequestArguments arguments; + private GotoRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public GotoRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(GotoRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public GotoRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(GotoRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestCommand.java new file mode 100644 index 0000000..500224c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum GotoRequestCommand { + GOTO; + + @JsonValue + public String toValue() { + switch (this) { + case GOTO: return "goto"; + } + return null; + } + + @JsonCreator + public static GotoRequestCommand forValue(String value) throws IOException { + if (value.equals("goto")) return GOTO; + throw new IOException("Cannot deserialize GotoRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoResponseClass.java new file mode 100644 index 0000000..cecba40 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `goto` request. This is just an acknowledgement, so no body field is required. + */ +public class GotoResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTarget.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTarget.java index b634c7c..a37542c 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTarget.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTarget.java @@ -1,301 +1,74 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** - * A `GotoTarget` describes a code location that can be used as a target in the `goto` request. + * A `GotoTarget` describes a code location that can be used as a target in the `goto` + * request. * The possible goto targets can be determined via the `gotoTargets` request. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "label", - "line", - "column", - "endLine", - "endColumn", - "instructionPointerReference" -}) -@Generated("jsonschema2pojo") public class GotoTarget { - - /** - * Unique identifier for a goto target. This is used in the `goto` request. - * (Required) - * - */ - @JsonProperty("id") - @JsonPropertyDescription("Unique identifier for a goto target. This is used in the `goto` request.") - private Integer id; - /** - * The name of the goto target (shown in the UI). - * (Required) - * - */ - @JsonProperty("label") - @JsonPropertyDescription("The name of the goto target (shown in the UI).") + private Long column; + private Long endColumn; + private Long endLine; + private long id; + private String instructionPointerReference; private String label; - /** - * The line of the goto target. - * (Required) - * - */ - @JsonProperty("line") - @JsonPropertyDescription("The line of the goto target.") - private Integer line; + private long line; + /** * The column of the goto target. - * */ @JsonProperty("column") - @JsonPropertyDescription("The column of the goto target.") - private Integer column; - /** - * The end line of the range covered by the goto target. - * - */ - @JsonProperty("endLine") - @JsonPropertyDescription("The end line of the range covered by the goto target.") - private Integer endLine; + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } + /** * The end column of the range covered by the goto target. - * */ @JsonProperty("endColumn") - @JsonPropertyDescription("The end column of the range covered by the goto target.") - private Integer endColumn; - /** - * A memory reference for the instruction pointer value represented by this target. - * - */ - @JsonProperty("instructionPointerReference") - @JsonPropertyDescription("A memory reference for the instruction pointer value represented by this target.") - private String instructionPointerReference; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public Long getEndColumn() { return endColumn; } + @JsonProperty("endColumn") + public void setEndColumn(Long value) { this.endColumn = value; } /** - * Unique identifier for a goto target. This is used in the `goto` request. - * (Required) - * + * The end line of the range covered by the goto target. */ - @JsonProperty("id") - public Integer getId() { - return id; - } + @JsonProperty("endLine") + public Long getEndLine() { return endLine; } + @JsonProperty("endLine") + public void setEndLine(Long value) { this.endLine = value; } /** * Unique identifier for a goto target. This is used in the `goto` request. - * (Required) - * */ @JsonProperty("id") - public void setId(Integer id) { - this.id = id; - } + public long getID() { return id; } + @JsonProperty("id") + public void setID(long value) { this.id = value; } /** - * The name of the goto target (shown in the UI). - * (Required) - * + * A memory reference for the instruction pointer value represented by this target. */ - @JsonProperty("label") - public String getLabel() { - return label; - } + @JsonProperty("instructionPointerReference") + public String getInstructionPointerReference() { return instructionPointerReference; } + @JsonProperty("instructionPointerReference") + public void setInstructionPointerReference(String value) { this.instructionPointerReference = value; } /** * The name of the goto target (shown in the UI). - * (Required) - * */ @JsonProperty("label") - public void setLabel(String label) { - this.label = label; - } + public String getLabel() { return label; } + @JsonProperty("label") + public void setLabel(String value) { this.label = value; } /** * The line of the goto target. - * (Required) - * */ @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * The line of the goto target. - * (Required) - * - */ + public long getLine() { return line; } @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - /** - * The column of the goto target. - * - */ - @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * The column of the goto target. - * - */ - @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } - - /** - * The end line of the range covered by the goto target. - * - */ - @JsonProperty("endLine") - public Integer getEndLine() { - return endLine; - } - - /** - * The end line of the range covered by the goto target. - * - */ - @JsonProperty("endLine") - public void setEndLine(Integer endLine) { - this.endLine = endLine; - } - - /** - * The end column of the range covered by the goto target. - * - */ - @JsonProperty("endColumn") - public Integer getEndColumn() { - return endColumn; - } - - /** - * The end column of the range covered by the goto target. - * - */ - @JsonProperty("endColumn") - public void setEndColumn(Integer endColumn) { - this.endColumn = endColumn; - } - - /** - * A memory reference for the instruction pointer value represented by this target. - * - */ - @JsonProperty("instructionPointerReference") - public String getInstructionPointerReference() { - return instructionPointerReference; - } - - /** - * A memory reference for the instruction pointer value represented by this target. - * - */ - @JsonProperty("instructionPointerReference") - public void setInstructionPointerReference(String instructionPointerReference) { - this.instructionPointerReference = instructionPointerReference; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(GotoTarget.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("id"); - sb.append('='); - sb.append(((this.id == null)?"":this.id)); - sb.append(','); - sb.append("label"); - sb.append('='); - sb.append(((this.label == null)?"":this.label)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("endLine"); - sb.append('='); - sb.append(((this.endLine == null)?"":this.endLine)); - sb.append(','); - sb.append("endColumn"); - sb.append('='); - sb.append(((this.endColumn == null)?"":this.endColumn)); - sb.append(','); - sb.append("instructionPointerReference"); - sb.append('='); - sb.append(((this.instructionPointerReference == null)?"":this.instructionPointerReference)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); - result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); - result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.instructionPointerReference == null)? 0 :this.instructionPointerReference.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof GotoTarget) == false) { - return false; - } - GotoTarget rhs = ((GotoTarget) other); - return (((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.instructionPointerReference == rhs.instructionPointerReference)||((this.instructionPointerReference!= null)&&this.instructionPointerReference.equals(rhs.instructionPointerReference)))); - } - + public void setLine(long value) { this.line = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArguments.java deleted file mode 100644 index 0f034af..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArguments.java +++ /dev/null @@ -1,176 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `gotoTargets` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "source", - "line", - "column" -}) -@Generated("jsonschema2pojo") -public class GotoTargetsArguments { - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") - private Source source; - /** - * The line location for which the goto targets are determined. - * (Required) - * - */ - @JsonProperty("line") - @JsonPropertyDescription("The line location for which the goto targets are determined.") - private Integer line; - /** - * The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - @JsonPropertyDescription("The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer column; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - public Source getSource() { - return source; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - public void setSource(Source source) { - this.source = source; - } - - /** - * The line location for which the goto targets are determined. - * (Required) - * - */ - @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * The line location for which the goto targets are determined. - * (Required) - * - */ - @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - /** - * The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(GotoTargetsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("source"); - sb.append('='); - sb.append(((this.source == null)?"":this.source)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof GotoTargetsArguments) == false) { - return false; - } - GotoTargetsArguments rhs = ((GotoTargetsArguments) other); - return (((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArgumentsClass.java new file mode 100644 index 0000000..0876998 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsArgumentsClass.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `gotoTargets` request. + */ +public class GotoTargetsArgumentsClass { + private Long column; + private long line; + private Source source; + + /** + * The position within `line` for which the goto targets are determined. It is measured in + * UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- + * or 1-based. + */ + @JsonProperty("column") + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } + + /** + * The line location for which the goto targets are determined. + */ + @JsonProperty("line") + public long getLine() { return line; } + @JsonProperty("line") + public void setLine(long value) { this.line = value; } + + /** + * The source location for which the goto targets are determined. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestArguments.java new file mode 100644 index 0000000..ff865c2 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestArguments.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `gotoTargets` request. + */ +public class GotoTargetsRequestArguments { + private Long column; + private long line; + private Source source; + + /** + * The position within `line` for which the goto targets are determined. It is measured in + * UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- + * or 1-based. + */ + @JsonProperty("column") + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } + + /** + * The line location for which the goto targets are determined. + */ + @JsonProperty("line") + public long getLine() { return line; } + @JsonProperty("line") + public void setLine(long value) { this.line = value; } + + /** + * The source location for which the goto targets are determined. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestClass.java new file mode 100644 index 0000000..e5f1bcf --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * This request retrieves the possible goto targets for the specified source location. + * These targets can be used in the `goto` request. + * Clients should only call this request if the corresponding capability + * `supportsGotoTargetsRequest` is true. + */ +public class GotoTargetsRequestClass { + private long seq; + private AttachRequestType type; + private GotoTargetsRequestArguments arguments; + private GotoTargetsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public GotoTargetsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(GotoTargetsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public GotoTargetsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(GotoTargetsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestCommand.java new file mode 100644 index 0000000..bbe4579 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum GotoTargetsRequestCommand { + GOTO_TARGETS; + + @JsonValue + public String toValue() { + switch (this) { + case GOTO_TARGETS: return "gotoTargets"; + } + return null; + } + + @JsonCreator + public static GotoTargetsRequestCommand forValue(String value) throws IOException { + if (value.equals("gotoTargets")) return GOTO_TARGETS; + throw new IOException("Cannot deserialize GotoTargetsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsResponseBody.java new file mode 100644 index 0000000..1cb2253 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class GotoTargetsResponseBody { + private GotoTarget[] targets; + + /** + * The possible goto targets of the specified location. + */ + @JsonProperty("targets") + public GotoTarget[] getTargets() { return targets; } + @JsonProperty("targets") + public void setTargets(GotoTarget[] value) { this.targets = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsResponseClass.java new file mode 100644 index 0000000..d3ec76c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/GotoTargetsResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `gotoTargets` request. + */ +public class GotoTargetsResponseClass { + private long seq; + private AttachResponseType type; + private GotoTargetsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public GotoTargetsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(GotoTargetsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Group.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Group.java new file mode 100644 index 0000000..d28d4d6 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Group.java @@ -0,0 +1,29 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * Support for keeping an output log organized by grouping related messages. + */ +public enum Group { + END, START, START_COLLAPSED; + + @JsonValue + public String toValue() { + switch (this) { + case END: return "end"; + case START: return "start"; + case START_COLLAPSED: return "startCollapsed"; + } + return null; + } + + @JsonCreator + public static Group forValue(String value) throws IOException { + if (value.equals("end")) return END; + if (value.equals("start")) return START; + if (value.equals("startCollapsed")) return START_COLLAPSED; + throw new IOException("Cannot deserialize Group"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/IDUnion.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/IDUnion.java new file mode 100644 index 0000000..36b3436 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/IDUnion.java @@ -0,0 +1,52 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; + +import com.fasterxml.jackson.core.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.annotation.*; + +/** + * Unique identifier for the module. + * + * The module associated with this frame, if any. + */ +@JsonDeserialize(using = IDUnion.Deserializer.class) +@JsonSerialize(using = IDUnion.Serializer.class) +public class IDUnion { + public Long integerValue; + public String stringValue; + + static class Deserializer extends JsonDeserializer { + @Override + public IDUnion deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { + IDUnion value = new IDUnion(); + switch (jsonParser.currentToken()) { + case VALUE_NUMBER_INT: + value.integerValue = jsonParser.readValueAs(Long.class); + break; + case VALUE_STRING: + String string = jsonParser.readValueAs(String.class); + value.stringValue = string; + break; + default: throw new IOException("Cannot deserialize IDUnion"); + } + return value; + } + } + + static class Serializer extends JsonSerializer { + @Override + public void serialize(IDUnion obj, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { + if (obj.integerValue != null) { + jsonGenerator.writeObject(obj.integerValue); + return; + } + if (obj.stringValue != null) { + jsonGenerator.writeObject(obj.stringValue); + return; + } + throw new IOException("IDUnion must not be null"); + } + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArguments.java index 8b5c6df..999fedd 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArguments.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArguments.java @@ -1,573 +1,156 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * Arguments for `initialize` request. - * */ @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "clientID", - "clientName", - "adapterID", - "locale", - "linesStartAt1", - "columnsStartAt1", - "pathFormat", - "supportsVariableType", - "supportsVariablePaging", - "supportsRunInTerminalRequest", - "supportsMemoryReferences", - "supportsProgressReporting", - "supportsInvalidatedEvent", - "supportsMemoryEvent", - "supportsArgsCanBeInterpretedByShell", - "supportsStartDebuggingRequest" -}) -@Generated("jsonschema2pojo") public class InitializeRequestArguments { - - /** - * The ID of the client using this adapter. - * - */ - @JsonProperty("clientID") - @JsonPropertyDescription("The ID of the client using this adapter.") + private String adapterID; private String clientID; - /** - * The human-readable name of the client using this adapter. - * - */ - @JsonProperty("clientName") - @JsonPropertyDescription("The human-readable name of the client using this adapter.") private String clientName; - /** - * The ID of the debug adapter. - * (Required) - * - */ - @JsonProperty("adapterID") - @JsonPropertyDescription("The ID of the debug adapter.") - private String adapterID; - /** - * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. - * - */ - @JsonProperty("locale") - @JsonPropertyDescription("The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH.") - private String locale; - /** - * If true all line numbers are 1-based (default). - * - */ - @JsonProperty("linesStartAt1") - @JsonPropertyDescription("If true all line numbers are 1-based (default).") - private Boolean linesStartAt1; - /** - * If true all column numbers are 1-based (default). - * - */ - @JsonProperty("columnsStartAt1") - @JsonPropertyDescription("If true all column numbers are 1-based (default).") private Boolean columnsStartAt1; - /** - * Determines in what format paths are specified. The default is `path`, which is the native format. - * - */ - @JsonProperty("pathFormat") - @JsonPropertyDescription("Determines in what format paths are specified. The default is `path`, which is the native format.") + private Boolean linesStartAt1; + private String locale; private String pathFormat; - /** - * Client supports the `type` attribute for variables. - * - */ - @JsonProperty("supportsVariableType") - @JsonPropertyDescription("Client supports the `type` attribute for variables.") - private Boolean supportsVariableType; - /** - * Client supports the paging of variables. - * - */ - @JsonProperty("supportsVariablePaging") - @JsonPropertyDescription("Client supports the paging of variables.") - private Boolean supportsVariablePaging; - /** - * Client supports the `runInTerminal` request. - * - */ - @JsonProperty("supportsRunInTerminalRequest") - @JsonPropertyDescription("Client supports the `runInTerminal` request.") - private Boolean supportsRunInTerminalRequest; - /** - * Client supports memory references. - * - */ - @JsonProperty("supportsMemoryReferences") - @JsonPropertyDescription("Client supports memory references.") - private Boolean supportsMemoryReferences; - /** - * Client supports progress reporting. - * - */ - @JsonProperty("supportsProgressReporting") - @JsonPropertyDescription("Client supports progress reporting.") - private Boolean supportsProgressReporting; - /** - * Client supports the `invalidated` event. - * - */ - @JsonProperty("supportsInvalidatedEvent") - @JsonPropertyDescription("Client supports the `invalidated` event.") + private Boolean supportsArgsCanBeInterpretedByShell; private Boolean supportsInvalidatedEvent; - /** - * Client supports the `memory` event. - * - */ - @JsonProperty("supportsMemoryEvent") - @JsonPropertyDescription("Client supports the `memory` event.") private Boolean supportsMemoryEvent; - /** - * Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request. - * - */ - @JsonProperty("supportsArgsCanBeInterpretedByShell") - @JsonPropertyDescription("Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request.") - private Boolean supportsArgsCanBeInterpretedByShell; - /** - * Client supports the `startDebugging` request. - * - */ - @JsonProperty("supportsStartDebuggingRequest") - @JsonPropertyDescription("Client supports the `startDebugging` request.") + private Boolean supportsMemoryReferences; + private Boolean supportsProgressReporting; + private Boolean supportsRunInTerminalRequest; private Boolean supportsStartDebuggingRequest; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + private Boolean supportsVariablePaging; + private Boolean supportsVariableType; /** - * The ID of the client using this adapter. - * + * The ID of the debug adapter. */ - @JsonProperty("clientID") - public String getClientID() { - return clientID; - } + @JsonProperty("adapterID") + public String getAdapterID() { return adapterID; } + @JsonProperty("adapterID") + public void setAdapterID(String value) { this.adapterID = value; } /** * The ID of the client using this adapter. - * */ @JsonProperty("clientID") - public void setClientID(String clientID) { - this.clientID = clientID; - } + public String getClientID() { return clientID; } + @JsonProperty("clientID") + public void setClientID(String value) { this.clientID = value; } /** * The human-readable name of the client using this adapter. - * */ @JsonProperty("clientName") - public String getClientName() { - return clientName; - } - - /** - * The human-readable name of the client using this adapter. - * - */ + public String getClientName() { return clientName; } @JsonProperty("clientName") - public void setClientName(String clientName) { - this.clientName = clientName; - } + public void setClientName(String value) { this.clientName = value; } /** - * The ID of the debug adapter. - * (Required) - * - */ - @JsonProperty("adapterID") - public String getAdapterID() { - return adapterID; - } - - /** - * The ID of the debug adapter. - * (Required) - * - */ - @JsonProperty("adapterID") - public void setAdapterID(String adapterID) { - this.adapterID = adapterID; - } - - /** - * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. - * - */ - @JsonProperty("locale") - public String getLocale() { - return locale; - } - - /** - * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. - * + * If true all column numbers are 1-based (default). */ - @JsonProperty("locale") - public void setLocale(String locale) { - this.locale = locale; - } + @JsonProperty("columnsStartAt1") + public Boolean getColumnsStartAt1() { return columnsStartAt1; } + @JsonProperty("columnsStartAt1") + public void setColumnsStartAt1(Boolean value) { this.columnsStartAt1 = value; } /** * If true all line numbers are 1-based (default). - * */ @JsonProperty("linesStartAt1") - public Boolean getLinesStartAt1() { - return linesStartAt1; - } - - /** - * If true all line numbers are 1-based (default). - * - */ + public Boolean getLinesStartAt1() { return linesStartAt1; } @JsonProperty("linesStartAt1") - public void setLinesStartAt1(Boolean linesStartAt1) { - this.linesStartAt1 = linesStartAt1; - } + public void setLinesStartAt1(Boolean value) { this.linesStartAt1 = value; } /** - * If true all column numbers are 1-based (default). - * - */ - @JsonProperty("columnsStartAt1") - public Boolean getColumnsStartAt1() { - return columnsStartAt1; - } - - /** - * If true all column numbers are 1-based (default). - * + * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. */ - @JsonProperty("columnsStartAt1") - public void setColumnsStartAt1(Boolean columnsStartAt1) { - this.columnsStartAt1 = columnsStartAt1; - } + @JsonProperty("locale") + public String getLocale() { return locale; } + @JsonProperty("locale") + public void setLocale(String value) { this.locale = value; } /** - * Determines in what format paths are specified. The default is `path`, which is the native format. - * + * Determines in what format paths are specified. The default is `path`, which is the native + * format. */ @JsonProperty("pathFormat") - public String getPathFormat() { - return pathFormat; - } - - /** - * Determines in what format paths are specified. The default is `path`, which is the native format. - * - */ + public String getPathFormat() { return pathFormat; } @JsonProperty("pathFormat") - public void setPathFormat(String pathFormat) { - this.pathFormat = pathFormat; - } + public void setPathFormat(String value) { this.pathFormat = value; } /** - * Client supports the `type` attribute for variables. - * + * Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` + * request. */ - @JsonProperty("supportsVariableType") - public Boolean getSupportsVariableType() { - return supportsVariableType; - } - - /** - * Client supports the `type` attribute for variables. - * - */ - @JsonProperty("supportsVariableType") - public void setSupportsVariableType(Boolean supportsVariableType) { - this.supportsVariableType = supportsVariableType; - } - - /** - * Client supports the paging of variables. - * - */ - @JsonProperty("supportsVariablePaging") - public Boolean getSupportsVariablePaging() { - return supportsVariablePaging; - } - - /** - * Client supports the paging of variables. - * - */ - @JsonProperty("supportsVariablePaging") - public void setSupportsVariablePaging(Boolean supportsVariablePaging) { - this.supportsVariablePaging = supportsVariablePaging; - } + @JsonProperty("supportsArgsCanBeInterpretedByShell") + public Boolean getSupportsArgsCanBeInterpretedByShell() { return supportsArgsCanBeInterpretedByShell; } + @JsonProperty("supportsArgsCanBeInterpretedByShell") + public void setSupportsArgsCanBeInterpretedByShell(Boolean value) { this.supportsArgsCanBeInterpretedByShell = value; } /** - * Client supports the `runInTerminal` request. - * + * Client supports the `invalidated` event. */ - @JsonProperty("supportsRunInTerminalRequest") - public Boolean getSupportsRunInTerminalRequest() { - return supportsRunInTerminalRequest; - } + @JsonProperty("supportsInvalidatedEvent") + public Boolean getSupportsInvalidatedEvent() { return supportsInvalidatedEvent; } + @JsonProperty("supportsInvalidatedEvent") + public void setSupportsInvalidatedEvent(Boolean value) { this.supportsInvalidatedEvent = value; } /** - * Client supports the `runInTerminal` request. - * + * Client supports the `memory` event. */ - @JsonProperty("supportsRunInTerminalRequest") - public void setSupportsRunInTerminalRequest(Boolean supportsRunInTerminalRequest) { - this.supportsRunInTerminalRequest = supportsRunInTerminalRequest; - } + @JsonProperty("supportsMemoryEvent") + public Boolean getSupportsMemoryEvent() { return supportsMemoryEvent; } + @JsonProperty("supportsMemoryEvent") + public void setSupportsMemoryEvent(Boolean value) { this.supportsMemoryEvent = value; } /** * Client supports memory references. - * */ @JsonProperty("supportsMemoryReferences") - public Boolean getSupportsMemoryReferences() { - return supportsMemoryReferences; - } - - /** - * Client supports memory references. - * - */ + public Boolean getSupportsMemoryReferences() { return supportsMemoryReferences; } @JsonProperty("supportsMemoryReferences") - public void setSupportsMemoryReferences(Boolean supportsMemoryReferences) { - this.supportsMemoryReferences = supportsMemoryReferences; - } + public void setSupportsMemoryReferences(Boolean value) { this.supportsMemoryReferences = value; } /** * Client supports progress reporting. - * */ @JsonProperty("supportsProgressReporting") - public Boolean getSupportsProgressReporting() { - return supportsProgressReporting; - } - - /** - * Client supports progress reporting. - * - */ + public Boolean getSupportsProgressReporting() { return supportsProgressReporting; } @JsonProperty("supportsProgressReporting") - public void setSupportsProgressReporting(Boolean supportsProgressReporting) { - this.supportsProgressReporting = supportsProgressReporting; - } - - /** - * Client supports the `invalidated` event. - * - */ - @JsonProperty("supportsInvalidatedEvent") - public Boolean getSupportsInvalidatedEvent() { - return supportsInvalidatedEvent; - } - - /** - * Client supports the `invalidated` event. - * - */ - @JsonProperty("supportsInvalidatedEvent") - public void setSupportsInvalidatedEvent(Boolean supportsInvalidatedEvent) { - this.supportsInvalidatedEvent = supportsInvalidatedEvent; - } - - /** - * Client supports the `memory` event. - * - */ - @JsonProperty("supportsMemoryEvent") - public Boolean getSupportsMemoryEvent() { - return supportsMemoryEvent; - } - - /** - * Client supports the `memory` event. - * - */ - @JsonProperty("supportsMemoryEvent") - public void setSupportsMemoryEvent(Boolean supportsMemoryEvent) { - this.supportsMemoryEvent = supportsMemoryEvent; - } + public void setSupportsProgressReporting(Boolean value) { this.supportsProgressReporting = value; } /** - * Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request. - * - */ - @JsonProperty("supportsArgsCanBeInterpretedByShell") - public Boolean getSupportsArgsCanBeInterpretedByShell() { - return supportsArgsCanBeInterpretedByShell; - } - - /** - * Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request. - * + * Client supports the `runInTerminal` request. */ - @JsonProperty("supportsArgsCanBeInterpretedByShell") - public void setSupportsArgsCanBeInterpretedByShell(Boolean supportsArgsCanBeInterpretedByShell) { - this.supportsArgsCanBeInterpretedByShell = supportsArgsCanBeInterpretedByShell; - } + @JsonProperty("supportsRunInTerminalRequest") + public Boolean getSupportsRunInTerminalRequest() { return supportsRunInTerminalRequest; } + @JsonProperty("supportsRunInTerminalRequest") + public void setSupportsRunInTerminalRequest(Boolean value) { this.supportsRunInTerminalRequest = value; } /** * Client supports the `startDebugging` request. - * */ @JsonProperty("supportsStartDebuggingRequest") - public Boolean getSupportsStartDebuggingRequest() { - return supportsStartDebuggingRequest; - } + public Boolean getSupportsStartDebuggingRequest() { return supportsStartDebuggingRequest; } + @JsonProperty("supportsStartDebuggingRequest") + public void setSupportsStartDebuggingRequest(Boolean value) { this.supportsStartDebuggingRequest = value; } /** - * Client supports the `startDebugging` request. - * + * Client supports the paging of variables. */ - @JsonProperty("supportsStartDebuggingRequest") - public void setSupportsStartDebuggingRequest(Boolean supportsStartDebuggingRequest) { - this.supportsStartDebuggingRequest = supportsStartDebuggingRequest; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(InitializeRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("clientID"); - sb.append('='); - sb.append(((this.clientID == null)?"":this.clientID)); - sb.append(','); - sb.append("clientName"); - sb.append('='); - sb.append(((this.clientName == null)?"":this.clientName)); - sb.append(','); - sb.append("adapterID"); - sb.append('='); - sb.append(((this.adapterID == null)?"":this.adapterID)); - sb.append(','); - sb.append("locale"); - sb.append('='); - sb.append(((this.locale == null)?"":this.locale)); - sb.append(','); - sb.append("linesStartAt1"); - sb.append('='); - sb.append(((this.linesStartAt1 == null)?"":this.linesStartAt1)); - sb.append(','); - sb.append("columnsStartAt1"); - sb.append('='); - sb.append(((this.columnsStartAt1 == null)?"":this.columnsStartAt1)); - sb.append(','); - sb.append("pathFormat"); - sb.append('='); - sb.append(((this.pathFormat == null)?"":this.pathFormat)); - sb.append(','); - sb.append("supportsVariableType"); - sb.append('='); - sb.append(((this.supportsVariableType == null)?"":this.supportsVariableType)); - sb.append(','); - sb.append("supportsVariablePaging"); - sb.append('='); - sb.append(((this.supportsVariablePaging == null)?"":this.supportsVariablePaging)); - sb.append(','); - sb.append("supportsRunInTerminalRequest"); - sb.append('='); - sb.append(((this.supportsRunInTerminalRequest == null)?"":this.supportsRunInTerminalRequest)); - sb.append(','); - sb.append("supportsMemoryReferences"); - sb.append('='); - sb.append(((this.supportsMemoryReferences == null)?"":this.supportsMemoryReferences)); - sb.append(','); - sb.append("supportsProgressReporting"); - sb.append('='); - sb.append(((this.supportsProgressReporting == null)?"":this.supportsProgressReporting)); - sb.append(','); - sb.append("supportsInvalidatedEvent"); - sb.append('='); - sb.append(((this.supportsInvalidatedEvent == null)?"":this.supportsInvalidatedEvent)); - sb.append(','); - sb.append("supportsMemoryEvent"); - sb.append('='); - sb.append(((this.supportsMemoryEvent == null)?"":this.supportsMemoryEvent)); - sb.append(','); - sb.append("supportsArgsCanBeInterpretedByShell"); - sb.append('='); - sb.append(((this.supportsArgsCanBeInterpretedByShell == null)?"":this.supportsArgsCanBeInterpretedByShell)); - sb.append(','); - sb.append("supportsStartDebuggingRequest"); - sb.append('='); - sb.append(((this.supportsStartDebuggingRequest == null)?"":this.supportsStartDebuggingRequest)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.supportsVariableType == null)? 0 :this.supportsVariableType.hashCode())); - result = ((result* 31)+((this.clientID == null)? 0 :this.clientID.hashCode())); - result = ((result* 31)+((this.clientName == null)? 0 :this.clientName.hashCode())); - result = ((result* 31)+((this.columnsStartAt1 == null)? 0 :this.columnsStartAt1 .hashCode())); - result = ((result* 31)+((this.locale == null)? 0 :this.locale.hashCode())); - result = ((result* 31)+((this.supportsMemoryReferences == null)? 0 :this.supportsMemoryReferences.hashCode())); - result = ((result* 31)+((this.linesStartAt1 == null)? 0 :this.linesStartAt1 .hashCode())); - result = ((result* 31)+((this.supportsMemoryEvent == null)? 0 :this.supportsMemoryEvent.hashCode())); - result = ((result* 31)+((this.supportsRunInTerminalRequest == null)? 0 :this.supportsRunInTerminalRequest.hashCode())); - result = ((result* 31)+((this.supportsProgressReporting == null)? 0 :this.supportsProgressReporting.hashCode())); - result = ((result* 31)+((this.supportsStartDebuggingRequest == null)? 0 :this.supportsStartDebuggingRequest.hashCode())); - result = ((result* 31)+((this.supportsVariablePaging == null)? 0 :this.supportsVariablePaging.hashCode())); - result = ((result* 31)+((this.supportsInvalidatedEvent == null)? 0 :this.supportsInvalidatedEvent.hashCode())); - result = ((result* 31)+((this.pathFormat == null)? 0 :this.pathFormat.hashCode())); - result = ((result* 31)+((this.adapterID == null)? 0 :this.adapterID.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.supportsArgsCanBeInterpretedByShell == null)? 0 :this.supportsArgsCanBeInterpretedByShell.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof InitializeRequestArguments) == false) { - return false; - } - InitializeRequestArguments rhs = ((InitializeRequestArguments) other); - return ((((((((((((((((((this.supportsVariableType == rhs.supportsVariableType)||((this.supportsVariableType!= null)&&this.supportsVariableType.equals(rhs.supportsVariableType)))&&((this.clientID == rhs.clientID)||((this.clientID!= null)&&this.clientID.equals(rhs.clientID))))&&((this.clientName == rhs.clientName)||((this.clientName!= null)&&this.clientName.equals(rhs.clientName))))&&((this.columnsStartAt1 == rhs.columnsStartAt1)||((this.columnsStartAt1 != null)&&this.columnsStartAt1 .equals(rhs.columnsStartAt1))))&&((this.locale == rhs.locale)||((this.locale!= null)&&this.locale.equals(rhs.locale))))&&((this.supportsMemoryReferences == rhs.supportsMemoryReferences)||((this.supportsMemoryReferences!= null)&&this.supportsMemoryReferences.equals(rhs.supportsMemoryReferences))))&&((this.linesStartAt1 == rhs.linesStartAt1)||((this.linesStartAt1 != null)&&this.linesStartAt1 .equals(rhs.linesStartAt1))))&&((this.supportsMemoryEvent == rhs.supportsMemoryEvent)||((this.supportsMemoryEvent!= null)&&this.supportsMemoryEvent.equals(rhs.supportsMemoryEvent))))&&((this.supportsRunInTerminalRequest == rhs.supportsRunInTerminalRequest)||((this.supportsRunInTerminalRequest!= null)&&this.supportsRunInTerminalRequest.equals(rhs.supportsRunInTerminalRequest))))&&((this.supportsProgressReporting == rhs.supportsProgressReporting)||((this.supportsProgressReporting!= null)&&this.supportsProgressReporting.equals(rhs.supportsProgressReporting))))&&((this.supportsStartDebuggingRequest == rhs.supportsStartDebuggingRequest)||((this.supportsStartDebuggingRequest!= null)&&this.supportsStartDebuggingRequest.equals(rhs.supportsStartDebuggingRequest))))&&((this.supportsVariablePaging == rhs.supportsVariablePaging)||((this.supportsVariablePaging!= null)&&this.supportsVariablePaging.equals(rhs.supportsVariablePaging))))&&((this.supportsInvalidatedEvent == rhs.supportsInvalidatedEvent)||((this.supportsInvalidatedEvent!= null)&&this.supportsInvalidatedEvent.equals(rhs.supportsInvalidatedEvent))))&&((this.pathFormat == rhs.pathFormat)||((this.pathFormat!= null)&&this.pathFormat.equals(rhs.pathFormat))))&&((this.adapterID == rhs.adapterID)||((this.adapterID!= null)&&this.adapterID.equals(rhs.adapterID))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.supportsArgsCanBeInterpretedByShell == rhs.supportsArgsCanBeInterpretedByShell)||((this.supportsArgsCanBeInterpretedByShell!= null)&&this.supportsArgsCanBeInterpretedByShell.equals(rhs.supportsArgsCanBeInterpretedByShell)))); - } + @JsonProperty("supportsVariablePaging") + public Boolean getSupportsVariablePaging() { return supportsVariablePaging; } + @JsonProperty("supportsVariablePaging") + public void setSupportsVariablePaging(Boolean value) { this.supportsVariablePaging = value; } + /** + * Client supports the `type` attribute for variables. + */ + @JsonProperty("supportsVariableType") + public Boolean getSupportsVariableType() { return supportsVariableType; } + @JsonProperty("supportsVariableType") + public void setSupportsVariableType(Boolean value) { this.supportsVariableType = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArgumentsClass.java new file mode 100644 index 0000000..b72a750 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestArgumentsClass.java @@ -0,0 +1,155 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `initialize` request. + */ +public class InitializeRequestArgumentsClass { + private String adapterID; + private String clientID; + private String clientName; + private Boolean columnsStartAt1; + private Boolean linesStartAt1; + private String locale; + private String pathFormat; + private Boolean supportsArgsCanBeInterpretedByShell; + private Boolean supportsInvalidatedEvent; + private Boolean supportsMemoryEvent; + private Boolean supportsMemoryReferences; + private Boolean supportsProgressReporting; + private Boolean supportsRunInTerminalRequest; + private Boolean supportsStartDebuggingRequest; + private Boolean supportsVariablePaging; + private Boolean supportsVariableType; + + /** + * The ID of the debug adapter. + */ + @JsonProperty("adapterID") + public String getAdapterID() { return adapterID; } + @JsonProperty("adapterID") + public void setAdapterID(String value) { this.adapterID = value; } + + /** + * The ID of the client using this adapter. + */ + @JsonProperty("clientID") + public String getClientID() { return clientID; } + @JsonProperty("clientID") + public void setClientID(String value) { this.clientID = value; } + + /** + * The human-readable name of the client using this adapter. + */ + @JsonProperty("clientName") + public String getClientName() { return clientName; } + @JsonProperty("clientName") + public void setClientName(String value) { this.clientName = value; } + + /** + * If true all column numbers are 1-based (default). + */ + @JsonProperty("columnsStartAt1") + public Boolean getColumnsStartAt1() { return columnsStartAt1; } + @JsonProperty("columnsStartAt1") + public void setColumnsStartAt1(Boolean value) { this.columnsStartAt1 = value; } + + /** + * If true all line numbers are 1-based (default). + */ + @JsonProperty("linesStartAt1") + public Boolean getLinesStartAt1() { return linesStartAt1; } + @JsonProperty("linesStartAt1") + public void setLinesStartAt1(Boolean value) { this.linesStartAt1 = value; } + + /** + * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. + */ + @JsonProperty("locale") + public String getLocale() { return locale; } + @JsonProperty("locale") + public void setLocale(String value) { this.locale = value; } + + /** + * Determines in what format paths are specified. The default is `path`, which is the native + * format. + */ + @JsonProperty("pathFormat") + public String getPathFormat() { return pathFormat; } + @JsonProperty("pathFormat") + public void setPathFormat(String value) { this.pathFormat = value; } + + /** + * Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` + * request. + */ + @JsonProperty("supportsArgsCanBeInterpretedByShell") + public Boolean getSupportsArgsCanBeInterpretedByShell() { return supportsArgsCanBeInterpretedByShell; } + @JsonProperty("supportsArgsCanBeInterpretedByShell") + public void setSupportsArgsCanBeInterpretedByShell(Boolean value) { this.supportsArgsCanBeInterpretedByShell = value; } + + /** + * Client supports the `invalidated` event. + */ + @JsonProperty("supportsInvalidatedEvent") + public Boolean getSupportsInvalidatedEvent() { return supportsInvalidatedEvent; } + @JsonProperty("supportsInvalidatedEvent") + public void setSupportsInvalidatedEvent(Boolean value) { this.supportsInvalidatedEvent = value; } + + /** + * Client supports the `memory` event. + */ + @JsonProperty("supportsMemoryEvent") + public Boolean getSupportsMemoryEvent() { return supportsMemoryEvent; } + @JsonProperty("supportsMemoryEvent") + public void setSupportsMemoryEvent(Boolean value) { this.supportsMemoryEvent = value; } + + /** + * Client supports memory references. + */ + @JsonProperty("supportsMemoryReferences") + public Boolean getSupportsMemoryReferences() { return supportsMemoryReferences; } + @JsonProperty("supportsMemoryReferences") + public void setSupportsMemoryReferences(Boolean value) { this.supportsMemoryReferences = value; } + + /** + * Client supports progress reporting. + */ + @JsonProperty("supportsProgressReporting") + public Boolean getSupportsProgressReporting() { return supportsProgressReporting; } + @JsonProperty("supportsProgressReporting") + public void setSupportsProgressReporting(Boolean value) { this.supportsProgressReporting = value; } + + /** + * Client supports the `runInTerminal` request. + */ + @JsonProperty("supportsRunInTerminalRequest") + public Boolean getSupportsRunInTerminalRequest() { return supportsRunInTerminalRequest; } + @JsonProperty("supportsRunInTerminalRequest") + public void setSupportsRunInTerminalRequest(Boolean value) { this.supportsRunInTerminalRequest = value; } + + /** + * Client supports the `startDebugging` request. + */ + @JsonProperty("supportsStartDebuggingRequest") + public Boolean getSupportsStartDebuggingRequest() { return supportsStartDebuggingRequest; } + @JsonProperty("supportsStartDebuggingRequest") + public void setSupportsStartDebuggingRequest(Boolean value) { this.supportsStartDebuggingRequest = value; } + + /** + * Client supports the paging of variables. + */ + @JsonProperty("supportsVariablePaging") + public Boolean getSupportsVariablePaging() { return supportsVariablePaging; } + @JsonProperty("supportsVariablePaging") + public void setSupportsVariablePaging(Boolean value) { this.supportsVariablePaging = value; } + + /** + * Client supports the `type` attribute for variables. + */ + @JsonProperty("supportsVariableType") + public Boolean getSupportsVariableType() { return supportsVariableType; } + @JsonProperty("supportsVariableType") + public void setSupportsVariableType(Boolean value) { this.supportsVariableType = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestClass.java new file mode 100644 index 0000000..d0641f5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestClass.java @@ -0,0 +1,62 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The `initialize` request is sent as the first request from the client to the debug + * adapter in order to configure it with client capabilities and to retrieve capabilities + * from the debug adapter. + * Until the debug adapter has responded with an `initialize` response, the client must not + * send any additional requests or events to the debug adapter. + * In addition the debug adapter is not allowed to send any requests or events to the client + * until it has responded with an `initialize` response. + * The `initialize` request may only be sent once. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class InitializeRequestClass implements DAPRequest { + private long seq; + private String type = "request"; + private InitializeRequestArguments arguments; + private InitializeRequestCommand command = InitializeRequestCommand.INITIALIZE; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public InitializeRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(InitializeRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public InitializeRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(InitializeRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestCommand.java new file mode 100644 index 0000000..c2bd6ab --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum InitializeRequestCommand { + INITIALIZE; + + @JsonValue + public String toValue() { + switch (this) { + case INITIALIZE: return "initialize"; + } + return null; + } + + @JsonCreator + public static InitializeRequestCommand forValue(String value) throws IOException { + if (value.equals("initialize")) return INITIALIZE; + throw new IOException("Cannot deserialize InitializeRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeResponseClass.java new file mode 100644 index 0000000..da32408 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeResponseClass.java @@ -0,0 +1,90 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `initialize` request. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class InitializeResponseClass implements DAPResponse { + private long seq; + private String type; + private BodyClass body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + * + * The capabilities of this debug adapter. + */ + @JsonProperty("body") + public BodyClass getBody() { return body; } + @JsonProperty("body") + public void setBody(BodyClass value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventClass.java new file mode 100644 index 0000000..8368826 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventClass.java @@ -0,0 +1,68 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * This event indicates that the debug adapter is ready to accept configuration requests + * (e.g. `setBreakpoints`, `setExceptionBreakpoints`). + * A debug adapter is expected to send this event when it is ready to accept configuration + * requests (but not before the `initialize` request has finished). + * The sequence of events/requests is as follows: + * - adapters sends `initialized` event (after the `initialize` request has returned) + * - client sends zero or more `setBreakpoints` requests + * - client sends one `setFunctionBreakpoints` request (if corresponding capability + * `supportsFunctionBreakpoints` is true) + * - client sends a `setExceptionBreakpoints` request if one or more + * `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` + * is not true) + * - client sends other future configuration requests + * - client sends one `configurationDone` request to indicate the end of the configuration. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class InitializedEventClass implements DAPEvent { + private long seq; + private String type; + private Restart body; + private String event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public String getEvent() { return event; } + @JsonProperty("event") + public void setEvent(String value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventEvent.java new file mode 100644 index 0000000..9adde44 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum InitializedEventEvent { + INITIALIZED; + + @JsonValue + public String toValue() { + switch (this) { + case INITIALIZED: return "initialized"; + } + return null; + } + + @JsonCreator + public static InitializedEventEvent forValue(String value) throws IOException { + if (value.equals("initialized")) return INITIALIZED; + throw new IOException("Cannot deserialize InitializedEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InstructionBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InstructionBreakpoint.java index 0a22264..a1cfbfb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InstructionBreakpoint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InstructionBreakpoint.java @@ -1,216 +1,53 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * Properties of a breakpoint passed to the `setInstructionBreakpoints` request - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "instructionReference", - "offset", - "condition", - "hitCondition" -}) -@Generated("jsonschema2pojo") public class InstructionBreakpoint { - - /** - * The instruction reference of the breakpoint. - * This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. - * (Required) - * - */ - @JsonProperty("instructionReference") - @JsonPropertyDescription("The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`.") + private String condition; + private String hitCondition; private String instructionReference; - /** - * The offset from the instruction reference in bytes. - * This can be negative. - * - */ - @JsonProperty("offset") - @JsonPropertyDescription("The offset from the instruction reference in bytes.\nThis can be negative.") - private Integer offset; + private Long offset; + /** * An expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * + * It is only honored by a debug adapter if the corresponding capability + * `supportsConditionalBreakpoints` is true. */ @JsonProperty("condition") - @JsonPropertyDescription("An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.") - private String condition; + public String getCondition() { return condition; } + @JsonProperty("condition") + public void setCondition(String value) { this.condition = value; } + /** * An expression that controls how many hits of the breakpoint are ignored. * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsHitConditionalBreakpoints` is true. */ @JsonProperty("hitCondition") - @JsonPropertyDescription("An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.") - private String hitCondition; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public String getHitCondition() { return hitCondition; } + @JsonProperty("hitCondition") + public void setHitCondition(String value) { this.hitCondition = value; } /** * The instruction reference of the breakpoint. - * This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. - * (Required) - * + * This should be a memory or instruction pointer reference from an `EvaluateResponse`, + * `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. */ @JsonProperty("instructionReference") - public String getInstructionReference() { - return instructionReference; - } - - /** - * The instruction reference of the breakpoint. - * This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. - * (Required) - * - */ + public String getInstructionReference() { return instructionReference; } @JsonProperty("instructionReference") - public void setInstructionReference(String instructionReference) { - this.instructionReference = instructionReference; - } + public void setInstructionReference(String value) { this.instructionReference = value; } /** * The offset from the instruction reference in bytes. * This can be negative. - * */ @JsonProperty("offset") - public Integer getOffset() { - return offset; - } - - /** - * The offset from the instruction reference in bytes. - * This can be negative. - * - */ + public Long getOffset() { return offset; } @JsonProperty("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * An expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * - */ - @JsonProperty("condition") - public String getCondition() { - return condition; - } - - /** - * An expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * - */ - @JsonProperty("condition") - public void setCondition(String condition) { - this.condition = condition; - } - - /** - * An expression that controls how many hits of the breakpoint are ignored. - * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * - */ - @JsonProperty("hitCondition") - public String getHitCondition() { - return hitCondition; - } - - /** - * An expression that controls how many hits of the breakpoint are ignored. - * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * - */ - @JsonProperty("hitCondition") - public void setHitCondition(String hitCondition) { - this.hitCondition = hitCondition; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(InstructionBreakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("instructionReference"); - sb.append('='); - sb.append(((this.instructionReference == null)?"":this.instructionReference)); - sb.append(','); - sb.append("offset"); - sb.append('='); - sb.append(((this.offset == null)?"":this.offset)); - sb.append(','); - sb.append("condition"); - sb.append('='); - sb.append(((this.condition == null)?"":this.condition)); - sb.append(','); - sb.append("hitCondition"); - sb.append('='); - sb.append(((this.hitCondition == null)?"":this.hitCondition)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); - result = ((result* 31)+((this.hitCondition == null)? 0 :this.hitCondition.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); - result = ((result* 31)+((this.instructionReference == null)? 0 :this.instructionReference.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof InstructionBreakpoint) == false) { - return false; - } - InstructionBreakpoint rhs = ((InstructionBreakpoint) other); - return ((((((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition)))&&((this.hitCondition == rhs.hitCondition)||((this.hitCondition!= null)&&this.hitCondition.equals(rhs.hitCondition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.instructionReference == rhs.instructionReference)||((this.instructionReference!= null)&&this.instructionReference.equals(rhs.instructionReference)))); - } - + public void setOffset(Long value) { this.offset = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventBody.java new file mode 100644 index 0000000..cace39b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventBody.java @@ -0,0 +1,37 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class InvalidatedEventBody { + private String[] areas; + private Long stackFrameID; + private Long threadID; + + /** + * Set of logical areas that got invalidated. This property has a hint characteristic: a + * client can only be expected to make a 'best effort' in honoring the areas but there are + * no guarantees. If this property is missing, empty, or if values are not understood, the + * client should assume a single value `all`. + */ + @JsonProperty("areas") + public String[] getAreas() { return areas; } + @JsonProperty("areas") + public void setAreas(String[] value) { this.areas = value; } + + /** + * If specified, the client only needs to refetch data related to this stack frame (and the + * `threadId` is ignored). + */ + @JsonProperty("stackFrameId") + public Long getStackFrameID() { return stackFrameID; } + @JsonProperty("stackFrameId") + public void setStackFrameID(Long value) { this.stackFrameID = value; } + + /** + * If specified, the client only needs to refetch data related to this thread. + */ + @JsonProperty("threadId") + public Long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(Long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventClass.java new file mode 100644 index 0000000..dfb1154 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventClass.java @@ -0,0 +1,61 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * This event signals that some state in the debug adapter has changed and requires that the + * client needs to re-render the data snapshot previously requested. + * Debug adapters do not have to emit this event for runtime changes like stopped or thread + * events because in that case the client refetches the new state anyway. But the event can + * be used for example to refresh the UI after rendering formatting has changed in the debug + * adapter. + * This event should only be sent if the corresponding capability `supportsInvalidatedEvent` + * is true. + */ +public class InvalidatedEventClass { + private long seq; + private BreakpointEventType type; + private InvalidatedEventBody body; + private InvalidatedEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public InvalidatedEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(InvalidatedEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public InvalidatedEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(InvalidatedEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventEvent.java new file mode 100644 index 0000000..121cf6a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InvalidatedEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum InvalidatedEventEvent { + INVALIDATED; + + @JsonValue + public String toValue() { + switch (this) { + case INVALIDATED: return "invalidated"; + } + return null; + } + + @JsonCreator + public static InvalidatedEventEvent forValue(String value) throws IOException { + if (value.equals("invalidated")) return INVALIDATED; + throw new IOException("Cannot deserialize InvalidatedEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Kind.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Kind.java new file mode 100644 index 0000000..57fa32e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Kind.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * What kind of terminal to launch. Defaults to `integrated` if not specified. + */ +public enum Kind { + EXTERNAL, INTEGRATED; + + @JsonValue + public String toValue() { + switch (this) { + case EXTERNAL: return "external"; + case INTEGRATED: return "integrated"; + } + return null; + } + + @JsonCreator + public static Kind forValue(String value) throws IOException { + if (value.equals("external")) return EXTERNAL; + if (value.equals("integrated")) return INTEGRATED; + throw new IOException("Cannot deserialize Kind"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArguments.java index 5deec16..109af8a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArguments.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArguments.java @@ -1,142 +1,29 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * Arguments for `launch` request. Additional attributes are implementation specific. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "noDebug", - "__restart" -}) -@Generated("jsonschema2pojo") public class LaunchRequestArguments { - - /** - * If true, the launch request should launch the program without enabling debugging. - * - */ - @JsonProperty("noDebug") - @JsonPropertyDescription("If true, the launch request should launch the program without enabling debugging.") + private Restart restart; private Boolean noDebug; + /** * Arbitrary data from the previous, restarted session. * The data is sent as the `restart` attribute of the `terminated` event. * The client should leave the data intact. - * */ @JsonProperty("__restart") - @JsonPropertyDescription("Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact.") - private Object restart; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public Restart getRestart() { return restart; } + @JsonProperty("__restart") + public void setRestart(Restart value) { this.restart = value; } /** * If true, the launch request should launch the program without enabling debugging. - * */ @JsonProperty("noDebug") - public Boolean getNoDebug() { - return noDebug; - } - - /** - * If true, the launch request should launch the program without enabling debugging. - * - */ + public Boolean getNoDebug() { return noDebug; } @JsonProperty("noDebug") - public void setNoDebug(Boolean noDebug) { - this.noDebug = noDebug; - } - - /** - * Arbitrary data from the previous, restarted session. - * The data is sent as the `restart` attribute of the `terminated` event. - * The client should leave the data intact. - * - */ - @JsonProperty("__restart") - public Object getRestart() { - return restart; - } - - /** - * Arbitrary data from the previous, restarted session. - * The data is sent as the `restart` attribute of the `terminated` event. - * The client should leave the data intact. - * - */ - @JsonProperty("__restart") - public void setRestart(Object restart) { - this.restart = restart; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LaunchRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("noDebug"); - sb.append('='); - sb.append(((this.noDebug == null)?"":this.noDebug)); - sb.append(','); - sb.append("restart"); - sb.append('='); - sb.append(((this.restart == null)?"":this.restart)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.restart == null)? 0 :this.restart.hashCode())); - result = ((result* 31)+((this.noDebug == null)? 0 :this.noDebug.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof LaunchRequestArguments) == false) { - return false; - } - LaunchRequestArguments rhs = ((LaunchRequestArguments) other); - return ((((this.restart == rhs.restart)||((this.restart!= null)&&this.restart.equals(rhs.restart)))&&((this.noDebug == rhs.noDebug)||((this.noDebug!= null)&&this.noDebug.equals(rhs.noDebug))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + public void setNoDebug(Boolean value) { this.noDebug = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArgumentsClass.java new file mode 100644 index 0000000..0ddc3b6 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestArgumentsClass.java @@ -0,0 +1,29 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `launch` request. Additional attributes are implementation specific. + */ +public class LaunchRequestArgumentsClass { + private Restart restart; + private Boolean noDebug; + + /** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + */ + @JsonProperty("__restart") + public Restart getRestart() { return restart; } + @JsonProperty("__restart") + public void setRestart(Restart value) { this.restart = value; } + + /** + * If true, the launch request should launch the program without enabling debugging. + */ + @JsonProperty("noDebug") + public Boolean getNoDebug() { return noDebug; } + @JsonProperty("noDebug") + public void setNoDebug(Boolean value) { this.noDebug = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestClass.java new file mode 100644 index 0000000..e4be19f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * This launch request is sent from the client to the debug adapter to start the debuggee + * with or without debugging (if `noDebug` is true). + * Since launching is debugger/runtime specific, the arguments for this request are not part + * of this specification. + */ +public class LaunchRequestClass { + private long seq; + private AttachRequestType type; + private LaunchRequestArguments arguments; + private LaunchRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public LaunchRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(LaunchRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public LaunchRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(LaunchRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestCommand.java new file mode 100644 index 0000000..b8abbf2 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum LaunchRequestCommand { + LAUNCH; + + @JsonValue + public String toValue() { + switch (this) { + case LAUNCH: return "launch"; + } + return null; + } + + @JsonCreator + public static LaunchRequestCommand forValue(String value) throws IOException { + if (value.equals("launch")) return LAUNCH; + throw new IOException("Cannot deserialize LaunchRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchResponseClass.java new file mode 100644 index 0000000..0eec160 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LaunchResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `launch` request. This is just an acknowledgement, so no body field is + * required. + */ +public class LaunchResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventBody.java new file mode 100644 index 0000000..f12c39c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventBody.java @@ -0,0 +1,24 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class LoadedSourceEventBody { + private BodyReason reason; + private Source source; + + /** + * The reason for the event. + */ + @JsonProperty("reason") + public BodyReason getReason() { return reason; } + @JsonProperty("reason") + public void setReason(BodyReason value) { this.reason = value; } + + /** + * The new, changed, or removed source. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventClass.java new file mode 100644 index 0000000..3fd84c7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventClass.java @@ -0,0 +1,55 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that some source has been added, changed, or removed from the set of + * all loaded sources. + */ +public class LoadedSourceEventClass { + private long seq; + private BreakpointEventType type; + private LoadedSourceEventBody body; + private LoadedSourceEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public LoadedSourceEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(LoadedSourceEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public LoadedSourceEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(LoadedSourceEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventEvent.java new file mode 100644 index 0000000..91d8f68 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourceEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum LoadedSourceEventEvent { + LOADED_SOURCE; + + @JsonValue + public String toValue() { + switch (this) { + case LOADED_SOURCE: return "loadedSource"; + } + return null; + } + + @JsonCreator + public static LoadedSourceEventEvent forValue(String value) throws IOException { + if (value.equals("loadedSource")) return LOADED_SOURCE; + throw new IOException("Cannot deserialize LoadedSourceEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesArguments.java deleted file mode 100644 index 9c92f0a..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesArguments.java +++ /dev/null @@ -1,73 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `loadedSources` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - -}) -@Generated("jsonschema2pojo") -public class LoadedSourcesArguments { - - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LoadedSourcesArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof LoadedSourcesArguments) == false) { - return false; - } - LoadedSourcesArguments rhs = ((LoadedSourcesArguments) other); - return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesRequestClass.java new file mode 100644 index 0000000..3f9079a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; +import java.util.Map; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Retrieves the set of all sources currently loaded by the debugged process. + * Clients should only call this request if the corresponding capability + * `supportsLoadedSourcesRequest` is true. + */ +public class LoadedSourcesRequestClass { + private long seq; + private AttachRequestType type; + private Map arguments; + private LoadedSourcesRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public Map getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(Map value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public LoadedSourcesRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(LoadedSourcesRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesRequestCommand.java new file mode 100644 index 0000000..912bf13 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum LoadedSourcesRequestCommand { + LOADED_SOURCES; + + @JsonValue + public String toValue() { + switch (this) { + case LOADED_SOURCES: return "loadedSources"; + } + return null; + } + + @JsonCreator + public static LoadedSourcesRequestCommand forValue(String value) throws IOException { + if (value.equals("loadedSources")) return LOADED_SOURCES; + throw new IOException("Cannot deserialize LoadedSourcesRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesResponseBody.java new file mode 100644 index 0000000..5a6b0f1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class LoadedSourcesResponseBody { + private Source[] sources; + + /** + * Set of loaded sources. + */ + @JsonProperty("sources") + public Source[] getSources() { return sources; } + @JsonProperty("sources") + public void setSources(Source[] value) { this.sources = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesResponseClass.java new file mode 100644 index 0000000..ebac73d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/LoadedSourcesResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `loadedSources` request. + */ +public class LoadedSourcesResponseClass { + private long seq; + private AttachResponseType type; + private LoadedSourcesResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public LoadedSourcesResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(LoadedSourcesResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventBody.java new file mode 100644 index 0000000..c89c76b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventBody.java @@ -0,0 +1,33 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class MemoryEventBody { + private long count; + private String memoryReference; + private long offset; + + /** + * Number of bytes updated. + */ + @JsonProperty("count") + public long getCount() { return count; } + @JsonProperty("count") + public void setCount(long value) { this.count = value; } + + /** + * Memory reference of a memory range that has been updated. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * Starting offset in bytes where memory has been updated. Can be negative. + */ + @JsonProperty("offset") + public long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(long value) { this.offset = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventClass.java new file mode 100644 index 0000000..45f76d3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventClass.java @@ -0,0 +1,65 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * This event indicates that some memory range has been updated. It should only be sent if + * the corresponding capability `supportsMemoryEvent` is true. + * Clients typically react to the event by re-issuing a `readMemory` request if they show + * the memory identified by the `memoryReference` and if the updated memory range overlaps + * the displayed range. Clients should not make assumptions how individual memory references + * relate to each other, so they should not assume that they are part of a single continuous + * address range and might overlap. + * Debug adapters can use this event to indicate that the contents of a memory range has + * changed due to some other request like `setVariable` or `setExpression`. Debug adapters + * are not expected to emit this event for each and every memory change of a running + * program, because that information is typically not available from debuggers and it would + * flood clients with too many events. + */ +public class MemoryEventClass { + private long seq; + private BreakpointEventType type; + private MemoryEventBody body; + private MemoryEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public MemoryEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(MemoryEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public MemoryEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(MemoryEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventEvent.java new file mode 100644 index 0000000..ceefad1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/MemoryEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum MemoryEventEvent { + MEMORY; + + @JsonValue + public String toValue() { + switch (this) { + case MEMORY: return "memory"; + } + return null; + } + + @JsonCreator + public static MemoryEventEvent forValue(String value) throws IOException { + if (value.equals("memory")) return MEMORY; + throw new IOException("Cannot deserialize MemoryEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Message.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Message.java index e05ecb4..be00719 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Message.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Message.java @@ -1,300 +1,80 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; +import com.fasterxml.jackson.annotation.*; import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - /** + * A structured error message. + * * A structured message object. Used to return errors from requests. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "format", - "variables", - "sendTelemetry", - "showUser", - "url", - "urlLabel" -}) -@Generated("jsonschema2pojo") public class Message { - - /** - * Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. - * (Required) - * - */ - @JsonProperty("id") - @JsonPropertyDescription("Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily.") - private Integer id; - /** - * A format string for the message. Embedded variables have the form `{name}`. - * If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes. - * (Required) - * - */ - @JsonProperty("format") - @JsonPropertyDescription("A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes.") private String format; - /** - * An object used as a dictionary for looking up the variables in the format string. - * - */ - @JsonProperty("variables") - @JsonPropertyDescription("An object used as a dictionary for looking up the variables in the format string.") - private Variables variables; - /** - * If true send to telemetry. - * - */ - @JsonProperty("sendTelemetry") - @JsonPropertyDescription("If true send to telemetry.") + private long id; private Boolean sendTelemetry; - /** - * If true show user. - * - */ - @JsonProperty("showUser") - @JsonPropertyDescription("If true show user.") private Boolean showUser; - /** - * A url where additional information about this message can be found. - * - */ - @JsonProperty("url") - @JsonPropertyDescription("A url where additional information about this message can be found.") private String url; - /** - * A label that is presented to the user as the UI for opening the url. - * - */ - @JsonProperty("urlLabel") - @JsonPropertyDescription("A label that is presented to the user as the UI for opening the url.") private String urlLabel; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. - * (Required) - * - */ - @JsonProperty("id") - public Integer getId() { - return id; - } - - /** - * Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. - * (Required) - * - */ - @JsonProperty("id") - public void setId(Integer id) { - this.id = id; - } + private Map variables; /** * A format string for the message. Embedded variables have the form `{name}`. - * If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes. - * (Required) - * + * If variable name starts with an underscore character, the variable does not contain user + * data (PII) and can be safely used for telemetry purposes. */ @JsonProperty("format") - public String getFormat() { - return format; - } - - /** - * A format string for the message. Embedded variables have the form `{name}`. - * If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes. - * (Required) - * - */ + public String getFormat() { return format; } @JsonProperty("format") - public void setFormat(String format) { - this.format = format; - } - - /** - * An object used as a dictionary for looking up the variables in the format string. - * - */ - @JsonProperty("variables") - public Variables getVariables() { - return variables; - } + public void setFormat(String value) { this.format = value; } /** - * An object used as a dictionary for looking up the variables in the format string. - * + * Unique (within a debug adapter implementation) identifier for the message. The purpose of + * these error IDs is to help extension authors that have the requirement that every user + * visible error message needs a corresponding error number, so that users or customer + * support can find information about the specific error more easily. */ - @JsonProperty("variables") - public void setVariables(Variables variables) { - this.variables = variables; - } + @JsonProperty("id") + public long getID() { return id; } + @JsonProperty("id") + public void setID(long value) { this.id = value; } /** * If true send to telemetry. - * */ @JsonProperty("sendTelemetry") - public Boolean getSendTelemetry() { - return sendTelemetry; - } - - /** - * If true send to telemetry. - * - */ + public Boolean getSendTelemetry() { return sendTelemetry; } @JsonProperty("sendTelemetry") - public void setSendTelemetry(Boolean sendTelemetry) { - this.sendTelemetry = sendTelemetry; - } + public void setSendTelemetry(Boolean value) { this.sendTelemetry = value; } /** * If true show user. - * */ @JsonProperty("showUser") - public Boolean getShowUser() { - return showUser; - } - - /** - * If true show user. - * - */ + public Boolean getShowUser() { return showUser; } @JsonProperty("showUser") - public void setShowUser(Boolean showUser) { - this.showUser = showUser; - } + public void setShowUser(Boolean value) { this.showUser = value; } /** * A url where additional information about this message can be found. - * */ @JsonProperty("url") - public String getUrl() { - return url; - } - - /** - * A url where additional information about this message can be found. - * - */ + public String getURL() { return url; } @JsonProperty("url") - public void setUrl(String url) { - this.url = url; - } + public void setURL(String value) { this.url = value; } /** * A label that is presented to the user as the UI for opening the url. - * */ @JsonProperty("urlLabel") - public String getUrlLabel() { - return urlLabel; - } + public String getURLLabel() { return urlLabel; } + @JsonProperty("urlLabel") + public void setURLLabel(String value) { this.urlLabel = value; } /** - * A label that is presented to the user as the UI for opening the url. - * + * An object used as a dictionary for looking up the variables in the format string. */ - @JsonProperty("urlLabel") - public void setUrlLabel(String urlLabel) { - this.urlLabel = urlLabel; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Message.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("id"); - sb.append('='); - sb.append(((this.id == null)?"":this.id)); - sb.append(','); - sb.append("format"); - sb.append('='); - sb.append(((this.format == null)?"":this.format)); - sb.append(','); - sb.append("variables"); - sb.append('='); - sb.append(((this.variables == null)?"":this.variables)); - sb.append(','); - sb.append("sendTelemetry"); - sb.append('='); - sb.append(((this.sendTelemetry == null)?"":this.sendTelemetry)); - sb.append(','); - sb.append("showUser"); - sb.append('='); - sb.append(((this.showUser == null)?"":this.showUser)); - sb.append(','); - sb.append("url"); - sb.append('='); - sb.append(((this.url == null)?"":this.url)); - sb.append(','); - sb.append("urlLabel"); - sb.append('='); - sb.append(((this.urlLabel == null)?"":this.urlLabel)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.variables == null)? 0 :this.variables.hashCode())); - result = ((result* 31)+((this.urlLabel == null)? 0 :this.urlLabel.hashCode())); - result = ((result* 31)+((this.showUser == null)? 0 :this.showUser.hashCode())); - result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); - result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.sendTelemetry == null)? 0 :this.sendTelemetry.hashCode())); - result = ((result* 31)+((this.url == null)? 0 :this.url.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Message) == false) { - return false; - } - Message rhs = ((Message) other); - return (((((((((this.variables == rhs.variables)||((this.variables!= null)&&this.variables.equals(rhs.variables)))&&((this.urlLabel == rhs.urlLabel)||((this.urlLabel!= null)&&this.urlLabel.equals(rhs.urlLabel))))&&((this.showUser == rhs.showUser)||((this.showUser!= null)&&this.showUser.equals(rhs.showUser))))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.sendTelemetry == rhs.sendTelemetry)||((this.sendTelemetry!= null)&&this.sendTelemetry.equals(rhs.sendTelemetry))))&&((this.url == rhs.url)||((this.url!= null)&&this.url.equals(rhs.url)))); - } - + @JsonProperty("variables") + public Map getVariables() { return variables; } + @JsonProperty("variables") + public void setVariables(Map value) { this.variables = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Module.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Module.java index eb3ae00..ac62a05 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Module.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Module.java @@ -1,396 +1,113 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * A Module object represents a row in the modules view. - * The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. + * The `id` attribute identifies a module in the modules view and is used in a `module` + * event for identifying a module for adding, updating or deleting. * The `name` attribute is used to minimally render the module in the UI. - * - * Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. - * - * To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. - * + * + * Additional attributes can be added to the module. They show up in the module view if they + * have a corresponding `ColumnDescriptor`. + * + * To avoid an unnecessary proliferation of additional attributes with similar semantics but + * different names, we recommend to re-use attributes from the 'recommended' list below + * first, and only introduce new attributes if nothing appropriate could be found. + * + * The new, changed, or removed module. In case of `removed` only the module id is used. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "name", - "path", - "isOptimized", - "isUserCode", - "version", - "symbolStatus", - "symbolFilePath", - "dateTimeStamp", - "addressRange" -}) -@Generated("jsonschema2pojo") public class Module { - - /** - * Unique identifier for the module. - * (Required) - * - */ - @JsonProperty("id") - @JsonPropertyDescription("Unique identifier for the module.") - private Object id; - /** - * A name of the module. - * (Required) - * - */ - @JsonProperty("name") - @JsonPropertyDescription("A name of the module.") - private String name; - /** - * Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module. - * - */ - @JsonProperty("path") - @JsonPropertyDescription("Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module.") - private String path; - /** - * True if the module is optimized. - * - */ - @JsonProperty("isOptimized") - @JsonPropertyDescription("True if the module is optimized.") + private String addressRange; + private String dateTimeStamp; + private IDUnion id; private Boolean isOptimized; - /** - * True if the module is considered 'user code' by a debugger that supports 'Just My Code'. - * - */ - @JsonProperty("isUserCode") - @JsonPropertyDescription("True if the module is considered 'user code' by a debugger that supports 'Just My Code'.") private Boolean isUserCode; - /** - * Version of Module. - * - */ - @JsonProperty("version") - @JsonPropertyDescription("Version of Module.") - private String version; - /** - * User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.) - * - */ - @JsonProperty("symbolStatus") - @JsonPropertyDescription("User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)") - private String symbolStatus; - /** - * Logical full path to the symbol file. The exact definition is implementation defined. - * - */ - @JsonProperty("symbolFilePath") - @JsonPropertyDescription("Logical full path to the symbol file. The exact definition is implementation defined.") + private String name; + private String path; private String symbolFilePath; - /** - * Module created or modified, encoded as a RFC 3339 timestamp. - * - */ - @JsonProperty("dateTimeStamp") - @JsonPropertyDescription("Module created or modified, encoded as a RFC 3339 timestamp.") - private String dateTimeStamp; + private String symbolStatus; + private String version; + /** * Address range covered by this module. - * */ @JsonProperty("addressRange") - @JsonPropertyDescription("Address range covered by this module.") - private String addressRange; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public String getAddressRange() { return addressRange; } + @JsonProperty("addressRange") + public void setAddressRange(String value) { this.addressRange = value; } /** - * Unique identifier for the module. - * (Required) - * + * Module created or modified, encoded as a RFC 3339 timestamp. */ - @JsonProperty("id") - public Object getId() { - return id; - } + @JsonProperty("dateTimeStamp") + public String getDateTimeStamp() { return dateTimeStamp; } + @JsonProperty("dateTimeStamp") + public void setDateTimeStamp(String value) { this.dateTimeStamp = value; } /** * Unique identifier for the module. - * (Required) - * */ @JsonProperty("id") - public void setId(Object id) { - this.id = id; - } - - /** - * A name of the module. - * (Required) - * - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * A name of the module. - * (Required) - * - */ - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module. - * - */ - @JsonProperty("path") - public String getPath() { - return path; - } - - /** - * Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module. - * - */ - @JsonProperty("path") - public void setPath(String path) { - this.path = path; - } + public IDUnion getID() { return id; } + @JsonProperty("id") + public void setID(IDUnion value) { this.id = value; } /** * True if the module is optimized. - * */ @JsonProperty("isOptimized") - public Boolean getIsOptimized() { - return isOptimized; - } - - /** - * True if the module is optimized. - * - */ + public Boolean getIsOptimized() { return isOptimized; } @JsonProperty("isOptimized") - public void setIsOptimized(Boolean isOptimized) { - this.isOptimized = isOptimized; - } + public void setIsOptimized(Boolean value) { this.isOptimized = value; } /** * True if the module is considered 'user code' by a debugger that supports 'Just My Code'. - * */ @JsonProperty("isUserCode") - public Boolean getIsUserCode() { - return isUserCode; - } - - /** - * True if the module is considered 'user code' by a debugger that supports 'Just My Code'. - * - */ + public Boolean getIsUserCode() { return isUserCode; } @JsonProperty("isUserCode") - public void setIsUserCode(Boolean isUserCode) { - this.isUserCode = isUserCode; - } - - /** - * Version of Module. - * - */ - @JsonProperty("version") - public String getVersion() { - return version; - } - - /** - * Version of Module. - * - */ - @JsonProperty("version") - public void setVersion(String version) { - this.version = version; - } + public void setIsUserCode(Boolean value) { this.isUserCode = value; } /** - * User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.) - * + * A name of the module. */ - @JsonProperty("symbolStatus") - public String getSymbolStatus() { - return symbolStatus; - } + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } /** - * User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.) - * + * Logical full path to the module. The exact definition is implementation defined, but + * usually this would be a full path to the on-disk file for the module. */ - @JsonProperty("symbolStatus") - public void setSymbolStatus(String symbolStatus) { - this.symbolStatus = symbolStatus; - } + @JsonProperty("path") + public String getPath() { return path; } + @JsonProperty("path") + public void setPath(String value) { this.path = value; } /** * Logical full path to the symbol file. The exact definition is implementation defined. - * */ @JsonProperty("symbolFilePath") - public String getSymbolFilePath() { - return symbolFilePath; - } - - /** - * Logical full path to the symbol file. The exact definition is implementation defined. - * - */ + public String getSymbolFilePath() { return symbolFilePath; } @JsonProperty("symbolFilePath") - public void setSymbolFilePath(String symbolFilePath) { - this.symbolFilePath = symbolFilePath; - } - - /** - * Module created or modified, encoded as a RFC 3339 timestamp. - * - */ - @JsonProperty("dateTimeStamp") - public String getDateTimeStamp() { - return dateTimeStamp; - } - - /** - * Module created or modified, encoded as a RFC 3339 timestamp. - * - */ - @JsonProperty("dateTimeStamp") - public void setDateTimeStamp(String dateTimeStamp) { - this.dateTimeStamp = dateTimeStamp; - } + public void setSymbolFilePath(String value) { this.symbolFilePath = value; } /** - * Address range covered by this module. - * + * User-understandable description of if symbols were found for the module (ex: 'Symbols + * Loaded', 'Symbols not found', etc.) */ - @JsonProperty("addressRange") - public String getAddressRange() { - return addressRange; - } + @JsonProperty("symbolStatus") + public String getSymbolStatus() { return symbolStatus; } + @JsonProperty("symbolStatus") + public void setSymbolStatus(String value) { this.symbolStatus = value; } /** - * Address range covered by this module. - * + * Version of Module. */ - @JsonProperty("addressRange") - public void setAddressRange(String addressRange) { - this.addressRange = addressRange; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Module.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("id"); - sb.append('='); - sb.append(((this.id == null)?"":this.id)); - sb.append(','); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("path"); - sb.append('='); - sb.append(((this.path == null)?"":this.path)); - sb.append(','); - sb.append("isOptimized"); - sb.append('='); - sb.append(((this.isOptimized == null)?"":this.isOptimized)); - sb.append(','); - sb.append("isUserCode"); - sb.append('='); - sb.append(((this.isUserCode == null)?"":this.isUserCode)); - sb.append(','); - sb.append("version"); - sb.append('='); - sb.append(((this.version == null)?"":this.version)); - sb.append(','); - sb.append("symbolStatus"); - sb.append('='); - sb.append(((this.symbolStatus == null)?"":this.symbolStatus)); - sb.append(','); - sb.append("symbolFilePath"); - sb.append('='); - sb.append(((this.symbolFilePath == null)?"":this.symbolFilePath)); - sb.append(','); - sb.append("dateTimeStamp"); - sb.append('='); - sb.append(((this.dateTimeStamp == null)?"":this.dateTimeStamp)); - sb.append(','); - sb.append("addressRange"); - sb.append('='); - sb.append(((this.addressRange == null)?"":this.addressRange)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.path == null)? 0 :this.path.hashCode())); - result = ((result* 31)+((this.isOptimized == null)? 0 :this.isOptimized.hashCode())); - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.addressRange == null)? 0 :this.addressRange.hashCode())); - result = ((result* 31)+((this.symbolStatus == null)? 0 :this.symbolStatus.hashCode())); - result = ((result* 31)+((this.dateTimeStamp == null)? 0 :this.dateTimeStamp.hashCode())); - result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); - result = ((result* 31)+((this.symbolFilePath == null)? 0 :this.symbolFilePath.hashCode())); - result = ((result* 31)+((this.isUserCode == null)? 0 :this.isUserCode.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Module) == false) { - return false; - } - Module rhs = ((Module) other); - return ((((((((((((this.path == rhs.path)||((this.path!= null)&&this.path.equals(rhs.path)))&&((this.isOptimized == rhs.isOptimized)||((this.isOptimized!= null)&&this.isOptimized.equals(rhs.isOptimized))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.addressRange == rhs.addressRange)||((this.addressRange!= null)&&this.addressRange.equals(rhs.addressRange))))&&((this.symbolStatus == rhs.symbolStatus)||((this.symbolStatus!= null)&&this.symbolStatus.equals(rhs.symbolStatus))))&&((this.dateTimeStamp == rhs.dateTimeStamp)||((this.dateTimeStamp!= null)&&this.dateTimeStamp.equals(rhs.dateTimeStamp))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.symbolFilePath == rhs.symbolFilePath)||((this.symbolFilePath!= null)&&this.symbolFilePath.equals(rhs.symbolFilePath))))&&((this.isUserCode == rhs.isUserCode)||((this.isUserCode!= null)&&this.isUserCode.equals(rhs.isUserCode)))); - } - + @JsonProperty("version") + public String getVersion() { return version; } + @JsonProperty("version") + public void setVersion(String value) { this.version = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventBody.java new file mode 100644 index 0000000..7d42e53 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventBody.java @@ -0,0 +1,24 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ModuleEventBody { + private Module module; + private BodyReason reason; + + /** + * The new, changed, or removed module. In case of `removed` only the module id is used. + */ + @JsonProperty("module") + public Module getModule() { return module; } + @JsonProperty("module") + public void setModule(Module value) { this.module = value; } + + /** + * The reason for the event. + */ + @JsonProperty("reason") + public BodyReason getReason() { return reason; } + @JsonProperty("reason") + public void setReason(BodyReason value) { this.reason = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventClass.java new file mode 100644 index 0000000..c7a0701 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventClass.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that some information about a module has changed. + */ +public class ModuleEventClass { + private long seq; + private BreakpointEventType type; + private ModuleEventBody body; + private ModuleEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public ModuleEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ModuleEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public ModuleEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(ModuleEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventEvent.java new file mode 100644 index 0000000..208ef80 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ModuleEventEvent { + MODULE; + + @JsonValue + public String toValue() { + switch (this) { + case MODULE: return "module"; + } + return null; + } + + @JsonCreator + public static ModuleEventEvent forValue(String value) throws IOException { + if (value.equals("module")) return MODULE; + throw new IOException("Cannot deserialize ModuleEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleIDUnion.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleIDUnion.java new file mode 100644 index 0000000..6db20d3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModuleIDUnion.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; + +import com.fasterxml.jackson.core.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.annotation.*; + +/** + * Unique identifier for the module. + * + * The module associated with this frame, if any. + */ +@JsonDeserialize(using = ModuleIDUnion.Deserializer.class) +@JsonSerialize(using = ModuleIDUnion.Serializer.class) +public class ModuleIDUnion { + public Long integerValue; + public String stringValue; + + static class Deserializer extends JsonDeserializer { + @Override + public ModuleIDUnion deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { + ModuleIDUnion value = new ModuleIDUnion(); + switch (jsonParser.currentToken()) { + case VALUE_NULL: + break; + case VALUE_NUMBER_INT: + value.integerValue = jsonParser.readValueAs(Long.class); + break; + case VALUE_STRING: + String string = jsonParser.readValueAs(String.class); + value.stringValue = string; + break; + default: throw new IOException("Cannot deserialize ModuleIDUnion"); + } + return value; + } + } + + static class Serializer extends JsonSerializer { + @Override + public void serialize(ModuleIDUnion obj, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { + if (obj.integerValue != null) { + jsonGenerator.writeObject(obj.integerValue); + return; + } + if (obj.stringValue != null) { + jsonGenerator.writeObject(obj.stringValue); + return; + } + jsonGenerator.writeNull(); + } + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArguments.java deleted file mode 100644 index 6401367..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArguments.java +++ /dev/null @@ -1,136 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `modules` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "startModule", - "moduleCount" -}) -@Generated("jsonschema2pojo") -public class ModulesArguments { - - /** - * The index of the first module to return; if omitted modules start at 0. - * - */ - @JsonProperty("startModule") - @JsonPropertyDescription("The index of the first module to return; if omitted modules start at 0.") - private Integer startModule; - /** - * The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned. - * - */ - @JsonProperty("moduleCount") - @JsonPropertyDescription("The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned.") - private Integer moduleCount; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The index of the first module to return; if omitted modules start at 0. - * - */ - @JsonProperty("startModule") - public Integer getStartModule() { - return startModule; - } - - /** - * The index of the first module to return; if omitted modules start at 0. - * - */ - @JsonProperty("startModule") - public void setStartModule(Integer startModule) { - this.startModule = startModule; - } - - /** - * The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned. - * - */ - @JsonProperty("moduleCount") - public Integer getModuleCount() { - return moduleCount; - } - - /** - * The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned. - * - */ - @JsonProperty("moduleCount") - public void setModuleCount(Integer moduleCount) { - this.moduleCount = moduleCount; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ModulesArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("startModule"); - sb.append('='); - sb.append(((this.startModule == null)?"":this.startModule)); - sb.append(','); - sb.append("moduleCount"); - sb.append('='); - sb.append(((this.moduleCount == null)?"":this.moduleCount)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.moduleCount == null)? 0 :this.moduleCount.hashCode())); - result = ((result* 31)+((this.startModule == null)? 0 :this.startModule.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ModulesArguments) == false) { - return false; - } - ModulesArguments rhs = ((ModulesArguments) other); - return ((((this.moduleCount == rhs.moduleCount)||((this.moduleCount!= null)&&this.moduleCount.equals(rhs.moduleCount)))&&((this.startModule == rhs.startModule)||((this.startModule!= null)&&this.startModule.equals(rhs.startModule))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArgumentsClass.java new file mode 100644 index 0000000..5089be0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesArgumentsClass.java @@ -0,0 +1,28 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `modules` request. + */ +public class ModulesArgumentsClass { + private Long moduleCount; + private Long startModule; + + /** + * The number of modules to return. If `moduleCount` is not specified or 0, all modules are + * returned. + */ + @JsonProperty("moduleCount") + public Long getModuleCount() { return moduleCount; } + @JsonProperty("moduleCount") + public void setModuleCount(Long value) { this.moduleCount = value; } + + /** + * The index of the first module to return; if omitted modules start at 0. + */ + @JsonProperty("startModule") + public Long getStartModule() { return startModule; } + @JsonProperty("startModule") + public void setStartModule(Long value) { this.startModule = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestArguments.java new file mode 100644 index 0000000..0f88438 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestArguments.java @@ -0,0 +1,28 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `modules` request. + */ +public class ModulesRequestArguments { + private Long moduleCount; + private Long startModule; + + /** + * The number of modules to return. If `moduleCount` is not specified or 0, all modules are + * returned. + */ + @JsonProperty("moduleCount") + public Long getModuleCount() { return moduleCount; } + @JsonProperty("moduleCount") + public void setModuleCount(Long value) { this.moduleCount = value; } + + /** + * The index of the first module to return; if omitted modules start at 0. + */ + @JsonProperty("startModule") + public Long getStartModule() { return startModule; } + @JsonProperty("startModule") + public void setStartModule(Long value) { this.startModule = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestClass.java new file mode 100644 index 0000000..e15c6ca --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Modules can be retrieved from the debug adapter with this request which can either return + * all modules or a range of modules to support paging. + * Clients should only call this request if the corresponding capability + * `supportsModulesRequest` is true. + */ +public class ModulesRequestClass { + private long seq; + private AttachRequestType type; + private ModulesRequestArguments arguments; + private ModulesRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public ModulesRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(ModulesRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public ModulesRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(ModulesRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestCommand.java new file mode 100644 index 0000000..04172dc --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ModulesRequestCommand { + MODULES; + + @JsonValue + public String toValue() { + switch (this) { + case MODULES: return "modules"; + } + return null; + } + + @JsonCreator + public static ModulesRequestCommand forValue(String value) throws IOException { + if (value.equals("modules")) return MODULES; + throw new IOException("Cannot deserialize ModulesRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesResponseBody.java new file mode 100644 index 0000000..5bb3aa2 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesResponseBody.java @@ -0,0 +1,24 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ModulesResponseBody { + private Module[] modules; + private Long totalModules; + + /** + * All modules or range of modules. + */ + @JsonProperty("modules") + public Module[] getModules() { return modules; } + @JsonProperty("modules") + public void setModules(Module[] value) { this.modules = value; } + + /** + * The total number of modules available. + */ + @JsonProperty("totalModules") + public Long getTotalModules() { return totalModules; } + @JsonProperty("totalModules") + public void setTotalModules(Long value) { this.totalModules = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesResponseClass.java new file mode 100644 index 0000000..f48f356 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ModulesResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `modules` request. + */ +public class ModulesResponseClass { + private long seq; + private AttachResponseType type; + private ModulesResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public ModulesResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ModulesResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArguments.java deleted file mode 100644 index cc7ba27..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArguments.java +++ /dev/null @@ -1,219 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - - -/** - * Arguments for `next` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId", - "singleThread", - "granularity" -}) -@Generated("jsonschema2pojo") -public class NextArguments { - - /** - * Specifies the thread for which to resume execution for one step (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Specifies the thread for which to resume execution for one step (of the given granularity).") - private Integer threadId; - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - @JsonPropertyDescription("If this flag is true, all other suspended threads are not resumed.") - private Boolean singleThread; - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") - private SteppingGranularity granularity; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Specifies the thread for which to resume execution for one step (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Specifies the thread for which to resume execution for one step (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - public Boolean getSingleThread() { - return singleThread; - } - - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - public void setSingleThread(Boolean singleThread) { - this.singleThread = singleThread; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - public SteppingGranularity getGranularity() { - return granularity; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - public void setGranularity(SteppingGranularity granularity) { - this.granularity = granularity; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(NextArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("singleThread"); - sb.append('='); - sb.append(((this.singleThread == null)?"":this.singleThread)); - sb.append(','); - sb.append("granularity"); - sb.append('='); - sb.append(((this.granularity == null)?"":this.granularity)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); - result = ((result* 31)+((this.granularity == null)? 0 :this.granularity.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof NextArguments) == false) { - return false; - } - NextArguments rhs = ((NextArguments) other); - return (((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.granularity == rhs.granularity)||((this.granularity!= null)&&this.granularity.equals(rhs.granularity)))); - } - - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @Generated("jsonschema2pojo") - public enum SteppingGranularity { - - STATEMENT("statement"), - LINE("line"), - INSTRUCTION("instruction"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (SteppingGranularity c: values()) { - CONSTANTS.put(c.value, c); - } - } - - SteppingGranularity(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static SteppingGranularity fromValue(String value) { - SteppingGranularity constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArgumentsClass.java new file mode 100644 index 0000000..a17779e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextArgumentsClass.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `next` request. + */ +public class NextArgumentsClass { + private SteppingGranularity granularity; + private Boolean singleThread; + private long threadID; + + /** + * Stepping granularity. If no granularity is specified, a granularity of `statement` is + * assumed. + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { return granularity; } + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity value) { this.granularity = value; } + + /** + * If this flag is true, all other suspended threads are not resumed. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the thread for which to resume execution for one step (of the given + * granularity). + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestArguments.java new file mode 100644 index 0000000..1e78799 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestArguments.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `next` request. + */ +public class NextRequestArguments { + private SteppingGranularity granularity; + private Boolean singleThread; + private long threadID; + + /** + * Stepping granularity. If no granularity is specified, a granularity of `statement` is + * assumed. + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { return granularity; } + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity value) { this.granularity = value; } + + /** + * If this flag is true, all other suspended threads are not resumed. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the thread for which to resume execution for one step (of the given + * granularity). + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestClass.java new file mode 100644 index 0000000..8e5b490 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestClass.java @@ -0,0 +1,60 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request executes one step (in the given granularity) for the specified thread and + * allows all other threads to run freely by resuming them. + * If the debug adapter supports single thread execution (see capability + * `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true + * prevents other suspended threads from resuming. + * The debug adapter first sends the response and then a `stopped` event (with reason + * `step`) after the step has completed. + */ +public class NextRequestClass { + private long seq; + private AttachRequestType type; + private NextRequestArguments arguments; + private NextRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public NextRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(NextRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public NextRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(NextRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestCommand.java new file mode 100644 index 0000000..fccaccf --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum NextRequestCommand { + NEXT; + + @JsonValue + public String toValue() { + switch (this) { + case NEXT: return "next"; + } + return null; + } + + @JsonCreator + public static NextRequestCommand forValue(String value) throws IOException { + if (value.equals("next")) return NEXT; + throw new IOException("Cannot deserialize NextRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextResponseClass.java new file mode 100644 index 0000000..f9e05e1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/NextResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `next` request. This is just an acknowledgement, so no body field is required. + */ +public class NextResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventBody.java new file mode 100644 index 0000000..16a4949 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventBody.java @@ -0,0 +1,84 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class OutputEventBody { + private String category; + private Long column; + private Restart data; + private Group group; + private Long line; + private String output; + private Source source; + private Long variablesReference; + + /** + * The output category. If not specified or if the category is not understood by the client, + * `console` is assumed. + */ + @JsonProperty("category") + public String getCategory() { return category; } + @JsonProperty("category") + public void setCategory(String value) { this.category = value; } + + /** + * The position in `line` where the output was produced. It is measured in UTF-16 code units + * and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + */ + @JsonProperty("column") + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } + + /** + * Additional data to report. For the `telemetry` category the data is sent to telemetry, + * for the other categories the data is shown in JSON format. + */ + @JsonProperty("data") + public Restart getData() { return data; } + @JsonProperty("data") + public void setData(Restart value) { this.data = value; } + + /** + * Support for keeping an output log organized by grouping related messages. + */ + @JsonProperty("group") + public Group getGroup() { return group; } + @JsonProperty("group") + public void setGroup(Group value) { this.group = value; } + + /** + * The source location's line where the output was produced. + */ + @JsonProperty("line") + public Long getLine() { return line; } + @JsonProperty("line") + public void setLine(Long value) { this.line = value; } + + /** + * The output to report. + */ + @JsonProperty("output") + public String getOutput() { return output; } + @JsonProperty("output") + public void setOutput(String value) { this.output = value; } + + /** + * The source location where the output was produced. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } + + /** + * If an attribute `variablesReference` exists and its value is > 0, the output contains + * objects which can be retrieved by passing `variablesReference` to the `variables` request + * as long as execution remains suspended. See 'Lifetime of Object References' in the + * Overview section for details. + */ + @JsonProperty("variablesReference") + public Long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(Long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventClass.java new file mode 100644 index 0000000..89bde7f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventClass.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that the target has produced some output. + */ +public class OutputEventClass { + private long seq; + private BreakpointEventType type; + private OutputEventBody body; + private OutputEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public OutputEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(OutputEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public OutputEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(OutputEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventEvent.java new file mode 100644 index 0000000..f5a611b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/OutputEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum OutputEventEvent { + OUTPUT; + + @JsonValue + public String toValue() { + switch (this) { + case OUTPUT: return "output"; + } + return null; + } + + @JsonCreator + public static OutputEventEvent forValue(String value) throws IOException { + if (value.equals("output")) return OUTPUT; + throw new IOException("Cannot deserialize OutputEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArguments.java deleted file mode 100644 index 69bad3f..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArguments.java +++ /dev/null @@ -1,108 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `pause` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId" -}) -@Generated("jsonschema2pojo") -public class PauseArguments { - - /** - * Pause execution for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Pause execution for this thread.") - private Integer threadId; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Pause execution for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Pause execution for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PauseArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof PauseArguments) == false) { - return false; - } - PauseArguments rhs = ((PauseArguments) other); - return (((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArgumentsClass.java new file mode 100644 index 0000000..8cec922 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseArgumentsClass.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `pause` request. + */ +public class PauseArgumentsClass { + private long threadID; + + /** + * Pause execution for this thread. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestArguments.java new file mode 100644 index 0000000..935e72b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestArguments.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `pause` request. + */ +public class PauseRequestArguments { + private long threadID; + + /** + * Pause execution for this thread. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestClass.java new file mode 100644 index 0000000..a75aab4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request suspends the debuggee. + * The debug adapter first sends the response and then a `stopped` event (with reason + * `pause`) after the thread has been paused successfully. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class PauseRequestClass implements DAPRequest { + private long seq; + private String type = "request"; + private PauseRequestArguments arguments; + private String command = "pause"; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public PauseRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(PauseRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestCommand.java new file mode 100644 index 0000000..e290a7c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum PauseRequestCommand { + PAUSE; + + @JsonValue + public String toValue() { + switch (this) { + case PAUSE: return "pause"; + } + return null; + } + + @JsonCreator + public static PauseRequestCommand forValue(String value) throws IOException { + if (value.equals("pause")) return PAUSE; + throw new IOException("Cannot deserialize PauseRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java new file mode 100644 index 0000000..8a26d36 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `pause` request. This is just an acknowledgement, so no body field is + * required. + */ +public class PauseResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventBody.java new file mode 100644 index 0000000..9a2cbc1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventBody.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ProcessEventBody { + private Boolean isLocalProcess; + private String name; + private Long pointerSize; + private StartMethod startMethod; + private Long systemProcessID; + + /** + * If true, the process is running on the same computer as the debug adapter. + */ + @JsonProperty("isLocalProcess") + public Boolean getIsLocalProcess() { return isLocalProcess; } + @JsonProperty("isLocalProcess") + public void setIsLocalProcess(Boolean value) { this.isLocalProcess = value; } + + /** + * The logical name of the process. This is usually the full path to process's executable + * file. Example: /home/example/myproj/program.js. + */ + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } + + /** + * The size of a pointer or address for this process, in bits. This value may be used by + * clients when formatting addresses for display. + */ + @JsonProperty("pointerSize") + public Long getPointerSize() { return pointerSize; } + @JsonProperty("pointerSize") + public void setPointerSize(Long value) { this.pointerSize = value; } + + /** + * Describes how the debug engine started debugging this process. + */ + @JsonProperty("startMethod") + public StartMethod getStartMethod() { return startMethod; } + @JsonProperty("startMethod") + public void setStartMethod(StartMethod value) { this.startMethod = value; } + + /** + * The system process id of the debugged process. This property is missing for non-system + * processes. + */ + @JsonProperty("systemProcessId") + public Long getSystemProcessID() { return systemProcessID; } + @JsonProperty("systemProcessId") + public void setSystemProcessID(Long value) { this.systemProcessID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventClass.java new file mode 100644 index 0000000..a7063bb --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventClass.java @@ -0,0 +1,55 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that the debugger has begun debugging a new process. Either one that + * it has launched, or one that it has attached to. + */ +public class ProcessEventClass { + private long seq; + private BreakpointEventType type; + private ProcessEventBody body; + private ProcessEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public ProcessEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ProcessEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public ProcessEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(ProcessEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventEvent.java new file mode 100644 index 0000000..c2ad3b8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProcessEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ProcessEventEvent { + PROCESS; + + @JsonValue + public String toValue() { + switch (this) { + case PROCESS: return "process"; + } + return null; + } + + @JsonCreator + public static ProcessEventEvent forValue(String value) throws IOException { + if (value.equals("process")) return PROCESS; + throw new IOException("Cannot deserialize ProcessEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventBody.java new file mode 100644 index 0000000..eddca9c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventBody.java @@ -0,0 +1,24 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ProgressEndEventBody { + private String message; + private String progressID; + + /** + * More detailed progress message. If omitted, the previous message (if any) is used. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * The ID that was introduced in the initial `ProgressStartEvent`. + */ + @JsonProperty("progressId") + public String getProgressID() { return progressID; } + @JsonProperty("progressId") + public void setProgressID(String value) { this.progressID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventClass.java new file mode 100644 index 0000000..6530964 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventClass.java @@ -0,0 +1,56 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event signals the end of the progress reporting with a final message. + * This event should only be sent if the corresponding capability + * `supportsProgressReporting` is true. + */ +public class ProgressEndEventClass { + private long seq; + private BreakpointEventType type; + private ProgressEndEventBody body; + private ProgressEndEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public ProgressEndEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ProgressEndEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public ProgressEndEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(ProgressEndEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventEvent.java new file mode 100644 index 0000000..f92b269 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressEndEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ProgressEndEventEvent { + PROGRESS_END; + + @JsonValue + public String toValue() { + switch (this) { + case PROGRESS_END: return "progressEnd"; + } + return null; + } + + @JsonCreator + public static ProgressEndEventEvent forValue(String value) throws IOException { + if (value.equals("progressEnd")) return PROGRESS_END; + throw new IOException("Cannot deserialize ProgressEndEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventBody.java new file mode 100644 index 0000000..bc4ec08 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventBody.java @@ -0,0 +1,70 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ProgressStartEventBody { + private Boolean cancellable; + private String message; + private Double percentage; + private String progressID; + private Long requestID; + private String title; + + /** + * If true, the request that reports progress may be cancelled with a `cancel` request. + * So this property basically controls whether the client should use UX that supports + * cancellation. + * Clients that don't support cancellation are allowed to ignore the setting. + */ + @JsonProperty("cancellable") + public Boolean getCancellable() { return cancellable; } + @JsonProperty("cancellable") + public void setCancellable(Boolean value) { this.cancellable = value; } + + /** + * More detailed progress message. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown. + */ + @JsonProperty("percentage") + public Double getPercentage() { return percentage; } + @JsonProperty("percentage") + public void setPercentage(Double value) { this.percentage = value; } + + /** + * An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make + * them refer to the same progress reporting. + * IDs must be unique within a debug session. + */ + @JsonProperty("progressId") + public String getProgressID() { return progressID; } + @JsonProperty("progressId") + public void setProgressID(String value) { this.progressID = value; } + + /** + * The request ID that this progress report is related to. If specified a debug adapter is + * expected to emit progress events for the long running request until the request has been + * either completed or cancelled. + * If the request ID is omitted, the progress report is assumed to be related to some + * general activity of the debug adapter. + */ + @JsonProperty("requestId") + public Long getRequestID() { return requestID; } + @JsonProperty("requestId") + public void setRequestID(Long value) { this.requestID = value; } + + /** + * Short title of the progress reporting. Shown in the UI to describe the long running + * operation. + */ + @JsonProperty("title") + public String getTitle() { return title; } + @JsonProperty("title") + public void setTitle(String value) { this.title = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventClass.java new file mode 100644 index 0000000..901be4a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventClass.java @@ -0,0 +1,58 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event signals that a long running operation is about to start and provides additional + * information for the client to set up a corresponding progress and cancellation UI. + * The client is free to delay the showing of the UI in order to reduce flicker. + * This event should only be sent if the corresponding capability + * `supportsProgressReporting` is true. + */ +public class ProgressStartEventClass { + private long seq; + private BreakpointEventType type; + private ProgressStartEventBody body; + private ProgressStartEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public ProgressStartEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ProgressStartEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public ProgressStartEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(ProgressStartEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventEvent.java new file mode 100644 index 0000000..a0e49a7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressStartEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ProgressStartEventEvent { + PROGRESS_START; + + @JsonValue + public String toValue() { + switch (this) { + case PROGRESS_START: return "progressStart"; + } + return null; + } + + @JsonCreator + public static ProgressStartEventEvent forValue(String value) throws IOException { + if (value.equals("progressStart")) return PROGRESS_START; + throw new IOException("Cannot deserialize ProgressStartEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventBody.java new file mode 100644 index 0000000..84f8a64 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventBody.java @@ -0,0 +1,33 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ProgressUpdateEventBody { + private String message; + private Double percentage; + private String progressID; + + /** + * More detailed progress message. If omitted, the previous message (if any) is used. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown. + */ + @JsonProperty("percentage") + public Double getPercentage() { return percentage; } + @JsonProperty("percentage") + public void setPercentage(Double value) { this.percentage = value; } + + /** + * The ID that was introduced in the initial `progressStart` event. + */ + @JsonProperty("progressId") + public String getProgressID() { return progressID; } + @JsonProperty("progressId") + public void setProgressID(String value) { this.progressID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventClass.java new file mode 100644 index 0000000..92ff800 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventClass.java @@ -0,0 +1,59 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event signals that the progress reporting needs to be updated with a new message + * and/or percentage. + * The client does not have to update the UI immediately, but the clients needs to keep + * track of the message and/or percentage values. + * This event should only be sent if the corresponding capability + * `supportsProgressReporting` is true. + */ +public class ProgressUpdateEventClass { + private long seq; + private BreakpointEventType type; + private ProgressUpdateEventBody body; + private ProgressUpdateEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public ProgressUpdateEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ProgressUpdateEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public ProgressUpdateEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(ProgressUpdateEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventEvent.java new file mode 100644 index 0000000..12b0a1f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProgressUpdateEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ProgressUpdateEventEvent { + PROGRESS_UPDATE; + + @JsonValue + public String toValue() { + switch (this) { + case PROGRESS_UPDATE: return "progressUpdate"; + } + return null; + } + + @JsonCreator + public static ProgressUpdateEventEvent forValue(String value) throws IOException { + if (value.equals("progressUpdate")) return PROGRESS_UPDATE; + throw new IOException("Cannot deserialize ProgressUpdateEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProtocolMessage.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProtocolMessage.java deleted file mode 100644 index f2951b0..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ProtocolMessage.java +++ /dev/null @@ -1,144 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Base Protocol - *

- * Base class of requests, responses, and events. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "seq", - "type" -}) -@Generated("jsonschema2pojo") -public class ProtocolMessage { - - /** - * Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - * (Required) - * - */ - @JsonProperty("seq") - @JsonPropertyDescription("Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.") - private Integer seq; - /** - * Message type. - * (Required) - * - */ - @JsonProperty("type") - @JsonPropertyDescription("Message type.") - private String type; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - * (Required) - * - */ - @JsonProperty("seq") - public Integer getSeq() { - return seq; - } - - /** - * Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - * (Required) - * - */ - @JsonProperty("seq") - public void setSeq(Integer seq) { - this.seq = seq; - } - - /** - * Message type. - * (Required) - * - */ - @JsonProperty("type") - public String getType() { - return type; - } - - /** - * Message type. - * (Required) - * - */ - @JsonProperty("type") - public void setType(String type) { - this.type = type; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ProtocolMessage.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("seq"); - sb.append('='); - sb.append(((this.seq == null)?"":this.seq)); - sb.append(','); - sb.append("type"); - sb.append('='); - sb.append(((this.type == null)?"":this.type)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); - result = ((result* 31)+((this.seq == null)? 0 :this.seq.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ProtocolMessage) == false) { - return false; - } - ProtocolMessage rhs = ((ProtocolMessage) other); - return ((((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type)))&&((this.seq == rhs.seq)||((this.seq!= null)&&this.seq.equals(rhs.seq))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArguments.java deleted file mode 100644 index c911ca0..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArguments.java +++ /dev/null @@ -1,173 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `readMemory` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "memoryReference", - "offset", - "count" -}) -@Generated("jsonschema2pojo") -public class ReadMemoryArguments { - - /** - * Memory reference to the base location from which data should be read. - * (Required) - * - */ - @JsonProperty("memoryReference") - @JsonPropertyDescription("Memory reference to the base location from which data should be read.") - private String memoryReference; - /** - * Offset (in bytes) to be applied to the reference location before reading data. Can be negative. - * - */ - @JsonProperty("offset") - @JsonPropertyDescription("Offset (in bytes) to be applied to the reference location before reading data. Can be negative.") - private Integer offset; - /** - * Number of bytes to read at the specified location and offset. - * (Required) - * - */ - @JsonProperty("count") - @JsonPropertyDescription("Number of bytes to read at the specified location and offset.") - private Integer count; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Memory reference to the base location from which data should be read. - * (Required) - * - */ - @JsonProperty("memoryReference") - public String getMemoryReference() { - return memoryReference; - } - - /** - * Memory reference to the base location from which data should be read. - * (Required) - * - */ - @JsonProperty("memoryReference") - public void setMemoryReference(String memoryReference) { - this.memoryReference = memoryReference; - } - - /** - * Offset (in bytes) to be applied to the reference location before reading data. Can be negative. - * - */ - @JsonProperty("offset") - public Integer getOffset() { - return offset; - } - - /** - * Offset (in bytes) to be applied to the reference location before reading data. Can be negative. - * - */ - @JsonProperty("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * Number of bytes to read at the specified location and offset. - * (Required) - * - */ - @JsonProperty("count") - public Integer getCount() { - return count; - } - - /** - * Number of bytes to read at the specified location and offset. - * (Required) - * - */ - @JsonProperty("count") - public void setCount(Integer count) { - this.count = count; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ReadMemoryArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("memoryReference"); - sb.append('='); - sb.append(((this.memoryReference == null)?"":this.memoryReference)); - sb.append(','); - sb.append("offset"); - sb.append('='); - sb.append(((this.offset == null)?"":this.offset)); - sb.append(','); - sb.append("count"); - sb.append('='); - sb.append(((this.count == null)?"":this.count)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.count == null)? 0 :this.count.hashCode())); - result = ((result* 31)+((this.memoryReference == null)? 0 :this.memoryReference.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ReadMemoryArguments) == false) { - return false; - } - ReadMemoryArguments rhs = ((ReadMemoryArguments) other); - return (((((this.count == rhs.count)||((this.count!= null)&&this.count.equals(rhs.count)))&&((this.memoryReference == rhs.memoryReference)||((this.memoryReference!= null)&&this.memoryReference.equals(rhs.memoryReference))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArgumentsClass.java new file mode 100644 index 0000000..32d244e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryArgumentsClass.java @@ -0,0 +1,37 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `readMemory` request. + */ +public class ReadMemoryArgumentsClass { + private long count; + private String memoryReference; + private Long offset; + + /** + * Number of bytes to read at the specified location and offset. + */ + @JsonProperty("count") + public long getCount() { return count; } + @JsonProperty("count") + public void setCount(long value) { this.count = value; } + + /** + * Memory reference to the base location from which data should be read. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * Offset (in bytes) to be applied to the reference location before reading data. Can be + * negative. + */ + @JsonProperty("offset") + public Long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(Long value) { this.offset = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestArguments.java new file mode 100644 index 0000000..a7381e4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestArguments.java @@ -0,0 +1,37 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `readMemory` request. + */ +public class ReadMemoryRequestArguments { + private long count; + private String memoryReference; + private Long offset; + + /** + * Number of bytes to read at the specified location and offset. + */ + @JsonProperty("count") + public long getCount() { return count; } + @JsonProperty("count") + public void setCount(long value) { this.count = value; } + + /** + * Memory reference to the base location from which data should be read. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * Offset (in bytes) to be applied to the reference location before reading data. Can be + * negative. + */ + @JsonProperty("offset") + public Long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(Long value) { this.offset = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestClass.java new file mode 100644 index 0000000..5341f55 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestClass.java @@ -0,0 +1,56 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Reads bytes from memory at the provided location. + * Clients should only call this request if the corresponding capability + * `supportsReadMemoryRequest` is true. + */ +public class ReadMemoryRequestClass { + private long seq; + private AttachRequestType type; + private ReadMemoryRequestArguments arguments; + private ReadMemoryRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public ReadMemoryRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(ReadMemoryRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public ReadMemoryRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(ReadMemoryRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestCommand.java new file mode 100644 index 0000000..5d818a9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ReadMemoryRequestCommand { + READ_MEMORY; + + @JsonValue + public String toValue() { + switch (this) { + case READ_MEMORY: return "readMemory"; + } + return null; + } + + @JsonCreator + public static ReadMemoryRequestCommand forValue(String value) throws IOException { + if (value.equals("readMemory")) return READ_MEMORY; + throw new IOException("Cannot deserialize ReadMemoryRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryResponseBody.java new file mode 100644 index 0000000..6688f4b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryResponseBody.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ReadMemoryResponseBody { + private String address; + private String data; + private Long unreadableBytes; + + /** + * The address of the first byte of data returned. + * Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. + */ + @JsonProperty("address") + public String getAddress() { return address; } + @JsonProperty("address") + public void setAddress(String value) { this.address = value; } + + /** + * The bytes read from memory, encoded using base64. If the decoded length of `data` is less + * than the requested `count` in the original `readMemory` request, and `unreadableBytes` is + * zero or omitted, then the client should assume it's reached the end of readable memory. + */ + @JsonProperty("data") + public String getData() { return data; } + @JsonProperty("data") + public void setData(String value) { this.data = value; } + + /** + * The number of unreadable bytes encountered after the last successfully read byte. + * This can be used to determine the number of bytes that should be skipped before a + * subsequent `readMemory` request succeeds. + */ + @JsonProperty("unreadableBytes") + public Long getUnreadableBytes() { return unreadableBytes; } + @JsonProperty("unreadableBytes") + public void setUnreadableBytes(Long value) { this.unreadableBytes = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryResponseClass.java new file mode 100644 index 0000000..fa6c3b6 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReadMemoryResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `readMemory` request. + */ +public class ReadMemoryResponseClass { + private long seq; + private AttachResponseType type; + private ReadMemoryResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public ReadMemoryResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ReadMemoryResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Request.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Request.java new file mode 100644 index 0000000..f9bc067 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Request.java @@ -0,0 +1,52 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + */ +public class Request { + private long seq; + private AttachRequestType type; + private Restart arguments; + private String command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public Restart getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(Restart value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RequestEnum.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RequestEnum.java new file mode 100644 index 0000000..74c5e3c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RequestEnum.java @@ -0,0 +1,28 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * Indicates whether the new debug session should be started with a `launch` or `attach` + * request. + */ +public enum RequestEnum { + ATTACH, LAUNCH; + + @JsonValue + public String toValue() { + switch (this) { + case ATTACH: return "attach"; + case LAUNCH: return "launch"; + } + return null; + } + + @JsonCreator + public static RequestEnum forValue(String value) throws IOException { + if (value.equals("attach")) return ATTACH; + if (value.equals("launch")) return LAUNCH; + throw new IOException("Cannot deserialize RequestEnum"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Response.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Response.java new file mode 100644 index 0000000..42496b6 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Response.java @@ -0,0 +1,85 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + */ +public class Response { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Restart.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Restart.java new file mode 100644 index 0000000..4cd6483 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Restart.java @@ -0,0 +1,106 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; + +import com.fasterxml.jackson.core.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.annotation.*; +import java.util.Map; + +/** + * Arbitrary data from the previous, restarted session. + * The data is sent as the `restart` attribute of the `terminated` event. + * The client should leave the data intact. + * + * Contains request result if success is true and error details if success is false. + * + * Additional data that a debug adapter might want to loop through the client. + * The client should leave the data intact and persist it across sessions. The client should + * not interpret the data. + * + * Event-specific information. + * + * Additional data to report. For the `telemetry` category the data is sent to telemetry, + * for the other categories the data is shown in JSON format. + * + * Object containing arguments for the command. + * + * A debug adapter may set `restart` to true (or to an arbitrary object) to request that the + * client restarts the session. + * The value is not interpreted by the client and passed unmodified as an attribute + * `__restart` to the `launch` and `attach` requests. + */ +@JsonDeserialize(using = Restart.Deserializer.class) +@JsonSerialize(using = Restart.Serializer.class) +public class Restart { + public Double doubleValue; + public Long integerValue; + public Boolean boolValue; + public String stringValue; + public Object[] anythingArrayValue; + public Map anythingMapValue; + + static class Deserializer extends JsonDeserializer { + @Override + public Restart deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { + Restart value = new Restart(); + switch (jsonParser.currentToken()) { + case VALUE_NULL: + break; + case VALUE_NUMBER_INT: + value.integerValue = jsonParser.readValueAs(Long.class); + break; + case VALUE_NUMBER_FLOAT: + value.doubleValue = jsonParser.readValueAs(Double.class); + break; + case VALUE_TRUE: + case VALUE_FALSE: + value.boolValue = jsonParser.readValueAs(Boolean.class); + break; + case VALUE_STRING: + String string = jsonParser.readValueAs(String.class); + value.stringValue = string; + break; + case START_ARRAY: + value.anythingArrayValue = jsonParser.readValueAs(Object[].class); + break; + case START_OBJECT: + value.anythingMapValue = jsonParser.readValueAs(Map.class); + break; + default: throw new IOException("Cannot deserialize Restart"); + } + return value; + } + } + + static class Serializer extends JsonSerializer { + @Override + public void serialize(Restart obj, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { + if (obj.doubleValue != null) { + jsonGenerator.writeObject(obj.doubleValue); + return; + } + if (obj.integerValue != null) { + jsonGenerator.writeObject(obj.integerValue); + return; + } + if (obj.boolValue != null) { + jsonGenerator.writeObject(obj.boolValue); + return; + } + if (obj.stringValue != null) { + jsonGenerator.writeObject(obj.stringValue); + return; + } + if (obj.anythingArrayValue != null) { + jsonGenerator.writeObject(obj.anythingArrayValue); + return; + } + if (obj.anythingMapValue != null) { + jsonGenerator.writeObject(obj.anythingMapValue); + return; + } + jsonGenerator.writeNull(); + } + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArguments.java deleted file mode 100644 index eb147cc..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArguments.java +++ /dev/null @@ -1,105 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `restart` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "arguments" -}) -@Generated("jsonschema2pojo") -public class RestartArguments { - - /** - * The latest version of the `launch` or `attach` configuration. - * - */ - @JsonProperty("arguments") - @JsonPropertyDescription("The latest version of the `launch` or `attach` configuration.") - private Object arguments; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The latest version of the `launch` or `attach` configuration. - * - */ - @JsonProperty("arguments") - public Object getArguments() { - return arguments; - } - - /** - * The latest version of the `launch` or `attach` configuration. - * - */ - @JsonProperty("arguments") - public void setArguments(Object arguments) { - this.arguments = arguments; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(RestartArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("arguments"); - sb.append('='); - sb.append(((this.arguments == null)?"":this.arguments)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.arguments == null)? 0 :this.arguments.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RestartArguments) == false) { - return false; - } - RestartArguments rhs = ((RestartArguments) other); - return (((this.arguments == rhs.arguments)||((this.arguments!= null)&&this.arguments.equals(rhs.arguments)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArgumentsClass.java new file mode 100644 index 0000000..838cfd8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartArgumentsClass.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `restart` request. + */ +public class RestartArgumentsClass { + private ChRequestArguments arguments; + + /** + * The latest version of the `launch` or `attach` configuration. + */ + @JsonProperty("arguments") + public ChRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(ChRequestArguments value) { this.arguments = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArguments.java deleted file mode 100644 index a1a5ae9..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArguments.java +++ /dev/null @@ -1,108 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `restartFrame` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "frameId" -}) -@Generated("jsonschema2pojo") -public class RestartFrameArguments { - - /** - * Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("frameId") - @JsonPropertyDescription("Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") - private Integer frameId; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("frameId") - public Integer getFrameId() { - return frameId; - } - - /** - * Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("frameId") - public void setFrameId(Integer frameId) { - this.frameId = frameId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(RestartFrameArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("frameId"); - sb.append('='); - sb.append(((this.frameId == null)?"":this.frameId)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RestartFrameArguments) == false) { - return false; - } - RestartFrameArguments rhs = ((RestartFrameArguments) other); - return (((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArgumentsClass.java new file mode 100644 index 0000000..7b4e7f8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameArgumentsClass.java @@ -0,0 +1,20 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `restartFrame` request. + */ +public class RestartFrameArgumentsClass { + private long frameID; + + /** + * Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in + * the current suspended state. See 'Lifetime of Object References' in the Overview section + * for details. + */ + @JsonProperty("frameId") + public long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(long value) { this.frameID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestArguments.java new file mode 100644 index 0000000..7c271ea --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestArguments.java @@ -0,0 +1,20 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `restartFrame` request. + */ +public class RestartFrameRequestArguments { + private long frameID; + + /** + * Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in + * the current suspended state. See 'Lifetime of Object References' in the Overview section + * for details. + */ + @JsonProperty("frameId") + public long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(long value) { this.frameID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestClass.java new file mode 100644 index 0000000..02f67c5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestClass.java @@ -0,0 +1,58 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request restarts execution of the specified stack frame. + * The debug adapter first sends the response and then a `stopped` event (with reason + * `restart`) after the restart has completed. + * Clients should only call this request if the corresponding capability + * `supportsRestartFrame` is true. + */ +public class RestartFrameRequestClass { + private long seq; + private AttachRequestType type; + private RestartFrameRequestArguments arguments; + private RestartFrameRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public RestartFrameRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(RestartFrameRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public RestartFrameRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(RestartFrameRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestCommand.java new file mode 100644 index 0000000..fd7c924 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum RestartFrameRequestCommand { + RESTART_FRAME; + + @JsonValue + public String toValue() { + switch (this) { + case RESTART_FRAME: return "restartFrame"; + } + return null; + } + + @JsonCreator + public static RestartFrameRequestCommand forValue(String value) throws IOException { + if (value.equals("restartFrame")) return RESTART_FRAME; + throw new IOException("Cannot deserialize RestartFrameRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameResponseClass.java new file mode 100644 index 0000000..d4eaef2 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartFrameResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `restartFrame` request. This is just an acknowledgement, so no body field is + * required. + */ +public class RestartFrameResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestArguments.java new file mode 100644 index 0000000..c2b8400 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestArguments.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `restart` request. + */ +public class RestartRequestArguments { + private ChRequestArguments arguments; + + /** + * The latest version of the `launch` or `attach` configuration. + */ + @JsonProperty("arguments") + public ChRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(ChRequestArguments value) { this.arguments = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestClass.java new file mode 100644 index 0000000..a79ef7d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Restarts a debug session. Clients should only call this request if the corresponding + * capability `supportsRestartRequest` is true. + * If the capability is missing or has the value false, a typical client emulates `restart` + * by terminating the debug adapter first and then launching it anew. + */ +public class RestartRequestClass { + private long seq; + private AttachRequestType type; + private RestartRequestArguments arguments; + private RestartRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public RestartRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(RestartRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public RestartRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(RestartRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestCommand.java new file mode 100644 index 0000000..56e516c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum RestartRequestCommand { + RESTART; + + @JsonValue + public String toValue() { + switch (this) { + case RESTART: return "restart"; + } + return null; + } + + @JsonCreator + public static RestartRequestCommand forValue(String value) throws IOException { + if (value.equals("restart")) return RESTART; + throw new IOException("Cannot deserialize RestartRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartResponseClass.java new file mode 100644 index 0000000..453cd96 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RestartResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `restart` request. This is just an acknowledgement, so no body field is + * required. + */ +public class RestartResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArguments.java deleted file mode 100644 index 780baf3..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArguments.java +++ /dev/null @@ -1,139 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `reverseContinue` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId", - "singleThread" -}) -@Generated("jsonschema2pojo") -public class ReverseContinueArguments { - - /** - * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed. - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed.") - private Integer threadId; - /** - * If this flag is true, backward execution is resumed only for the thread with given `threadId`. - * - */ - @JsonProperty("singleThread") - @JsonPropertyDescription("If this flag is true, backward execution is resumed only for the thread with given `threadId`.") - private Boolean singleThread; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed. - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed. - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - /** - * If this flag is true, backward execution is resumed only for the thread with given `threadId`. - * - */ - @JsonProperty("singleThread") - public Boolean getSingleThread() { - return singleThread; - } - - /** - * If this flag is true, backward execution is resumed only for the thread with given `threadId`. - * - */ - @JsonProperty("singleThread") - public void setSingleThread(Boolean singleThread) { - this.singleThread = singleThread; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ReverseContinueArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("singleThread"); - sb.append('='); - sb.append(((this.singleThread == null)?"":this.singleThread)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ReverseContinueArguments) == false) { - return false; - } - ReverseContinueArguments rhs = ((ReverseContinueArguments) other); - return ((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArgumentsClass.java new file mode 100644 index 0000000..54b720c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueArgumentsClass.java @@ -0,0 +1,30 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `reverseContinue` request. + */ +public class ReverseContinueArgumentsClass { + private Boolean singleThread; + private long threadID; + + /** + * If this flag is true, backward execution is resumed only for the thread with given + * `threadId`. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see + * `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only + * the thread with this ID is resumed. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestArguments.java new file mode 100644 index 0000000..68e836d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestArguments.java @@ -0,0 +1,30 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `reverseContinue` request. + */ +public class ReverseContinueRequestArguments { + private Boolean singleThread; + private long threadID; + + /** + * If this flag is true, backward execution is resumed only for the thread with given + * `threadId`. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the active thread. If the debug adapter supports single thread execution (see + * `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only + * the thread with this ID is resumed. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestClass.java new file mode 100644 index 0000000..fb1258c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestClass.java @@ -0,0 +1,59 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request resumes backward execution of all threads. If the debug adapter supports + * single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting + * the `singleThread` argument to true resumes only the specified thread. If not all threads + * were resumed, the `allThreadsContinued` attribute of the response should be set to false. + * Clients should only call this request if the corresponding capability `supportsStepBack` + * is true. + */ +public class ReverseContinueRequestClass { + private long seq; + private AttachRequestType type; + private ReverseContinueRequestArguments arguments; + private ReverseContinueRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public ReverseContinueRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(ReverseContinueRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public ReverseContinueRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(ReverseContinueRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestCommand.java new file mode 100644 index 0000000..deda5c4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ReverseContinueRequestCommand { + REVERSE_CONTINUE; + + @JsonValue + public String toValue() { + switch (this) { + case REVERSE_CONTINUE: return "reverseContinue"; + } + return null; + } + + @JsonCreator + public static ReverseContinueRequestCommand forValue(String value) throws IOException { + if (value.equals("reverseContinue")) return REVERSE_CONTINUE; + throw new IOException("Cannot deserialize ReverseContinueRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueResponseClass.java new file mode 100644 index 0000000..7245e7c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ReverseContinueResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `reverseContinue` request. This is just an acknowledgement, so no body field + * is required. + */ +public class ReverseContinueResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArguments.java index 939416e..14e3ddd 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArguments.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArguments.java @@ -1,316 +1,69 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; +import com.fasterxml.jackson.annotation.*; import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Arguments for `runInTerminal` request. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "kind", - "title", - "cwd", - "args", - "env", - "argsCanBeInterpretedByShell" -}) -@Generated("jsonschema2pojo") public class RunInTerminalRequestArguments { - - /** - * What kind of terminal to launch. Defaults to `integrated` if not specified. - * - */ - @JsonProperty("kind") - @JsonPropertyDescription("What kind of terminal to launch. Defaults to `integrated` if not specified.") + private String[] args; + private Boolean argsCanBeInterpretedByShell; + private String cwd; + private Map env; private Kind kind; - /** - * Title of the terminal. - * - */ - @JsonProperty("title") - @JsonPropertyDescription("Title of the terminal.") private String title; - /** - * Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. - * (Required) - * - */ - @JsonProperty("cwd") - @JsonPropertyDescription("Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command.") - private String cwd; + /** * List of arguments. The first argument is the command to run. - * (Required) - * */ @JsonProperty("args") - @JsonPropertyDescription("List of arguments. The first argument is the command to run.") - private List args = new ArrayList(); - /** - * Environment key-value pairs that are added to or removed from the default environment. - * - */ - @JsonProperty("env") - @JsonPropertyDescription("Environment key-value pairs that are added to or removed from the default environment.") - private Env env; - /** - * This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells. - * - */ - @JsonProperty("argsCanBeInterpretedByShell") - @JsonPropertyDescription("This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells.") - private Boolean argsCanBeInterpretedByShell; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * What kind of terminal to launch. Defaults to `integrated` if not specified. - * - */ - @JsonProperty("kind") - public Kind getKind() { - return kind; - } - - /** - * What kind of terminal to launch. Defaults to `integrated` if not specified. - * - */ - @JsonProperty("kind") - public void setKind(Kind kind) { - this.kind = kind; - } - - /** - * Title of the terminal. - * - */ - @JsonProperty("title") - public String getTitle() { - return title; - } + public String[] getArgs() { return args; } + @JsonProperty("args") + public void setArgs(String[] value) { this.args = value; } /** - * Title of the terminal. - * + * This property should only be set if the corresponding capability + * `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell + * to launch the application, then the client must not attempt to escape characters with + * special meanings for the shell. The user is fully responsible for escaping as needed and + * that arguments using special characters may not be portable across shells. */ - @JsonProperty("title") - public void setTitle(String title) { - this.title = title; - } + @JsonProperty("argsCanBeInterpretedByShell") + public Boolean getArgsCanBeInterpretedByShell() { return argsCanBeInterpretedByShell; } + @JsonProperty("argsCanBeInterpretedByShell") + public void setArgsCanBeInterpretedByShell(Boolean value) { this.argsCanBeInterpretedByShell = value; } /** - * Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. - * (Required) - * + * Working directory for the command. For non-empty, valid paths this typically results in + * execution of a change directory command. */ @JsonProperty("cwd") - public String getCwd() { - return cwd; - } - - /** - * Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. - * (Required) - * - */ + public String getCwd() { return cwd; } @JsonProperty("cwd") - public void setCwd(String cwd) { - this.cwd = cwd; - } - - /** - * List of arguments. The first argument is the command to run. - * (Required) - * - */ - @JsonProperty("args") - public List getArgs() { - return args; - } - - /** - * List of arguments. The first argument is the command to run. - * (Required) - * - */ - @JsonProperty("args") - public void setArgs(List args) { - this.args = args; - } + public void setCwd(String value) { this.cwd = value; } /** * Environment key-value pairs that are added to or removed from the default environment. - * */ @JsonProperty("env") - public Env getEnv() { - return env; - } - - /** - * Environment key-value pairs that are added to or removed from the default environment. - * - */ + public Map getEnv() { return env; } @JsonProperty("env") - public void setEnv(Env env) { - this.env = env; - } - - /** - * This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells. - * - */ - @JsonProperty("argsCanBeInterpretedByShell") - public Boolean getArgsCanBeInterpretedByShell() { - return argsCanBeInterpretedByShell; - } + public void setEnv(Map value) { this.env = value; } /** - * This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells. - * + * What kind of terminal to launch. Defaults to `integrated` if not specified. */ - @JsonProperty("argsCanBeInterpretedByShell") - public void setArgsCanBeInterpretedByShell(Boolean argsCanBeInterpretedByShell) { - this.argsCanBeInterpretedByShell = argsCanBeInterpretedByShell; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(RunInTerminalRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("kind"); - sb.append('='); - sb.append(((this.kind == null)?"":this.kind)); - sb.append(','); - sb.append("title"); - sb.append('='); - sb.append(((this.title == null)?"":this.title)); - sb.append(','); - sb.append("cwd"); - sb.append('='); - sb.append(((this.cwd == null)?"":this.cwd)); - sb.append(','); - sb.append("args"); - sb.append('='); - sb.append(((this.args == null)?"":this.args)); - sb.append(','); - sb.append("env"); - sb.append('='); - sb.append(((this.env == null)?"":this.env)); - sb.append(','); - sb.append("argsCanBeInterpretedByShell"); - sb.append('='); - sb.append(((this.argsCanBeInterpretedByShell == null)?"":this.argsCanBeInterpretedByShell)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.args == null)? 0 :this.args.hashCode())); - result = ((result* 31)+((this.cwd == null)? 0 :this.cwd.hashCode())); - result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); - result = ((result* 31)+((this.argsCanBeInterpretedByShell == null)? 0 :this.argsCanBeInterpretedByShell.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.title == null)? 0 :this.title.hashCode())); - result = ((result* 31)+((this.env == null)? 0 :this.env.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RunInTerminalRequestArguments) == false) { - return false; - } - RunInTerminalRequestArguments rhs = ((RunInTerminalRequestArguments) other); - return ((((((((this.args == rhs.args)||((this.args!= null)&&this.args.equals(rhs.args)))&&((this.cwd == rhs.cwd)||((this.cwd!= null)&&this.cwd.equals(rhs.cwd))))&&((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind))))&&((this.argsCanBeInterpretedByShell == rhs.argsCanBeInterpretedByShell)||((this.argsCanBeInterpretedByShell!= null)&&this.argsCanBeInterpretedByShell.equals(rhs.argsCanBeInterpretedByShell))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.title == rhs.title)||((this.title!= null)&&this.title.equals(rhs.title))))&&((this.env == rhs.env)||((this.env!= null)&&this.env.equals(rhs.env)))); - } - + @JsonProperty("kind") + public Kind getKind() { return kind; } + @JsonProperty("kind") + public void setKind(Kind value) { this.kind = value; } /** - * What kind of terminal to launch. Defaults to `integrated` if not specified. - * + * Title of the terminal. */ - @Generated("jsonschema2pojo") - public enum Kind { - - INTEGRATED("integrated"), - EXTERNAL("external"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (Kind c: values()) { - CONSTANTS.put(c.value, c); - } - } - - Kind(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static Kind fromValue(String value) { - Kind constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + @JsonProperty("title") + public String getTitle() { return title; } + @JsonProperty("title") + public void setTitle(String value) { this.title = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArgumentsClass.java new file mode 100644 index 0000000..cf41431 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestArgumentsClass.java @@ -0,0 +1,69 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; +import java.util.Map; + +/** + * Arguments for `runInTerminal` request. + */ +public class RunInTerminalRequestArgumentsClass { + private String[] args; + private Boolean argsCanBeInterpretedByShell; + private String cwd; + private Map env; + private Kind kind; + private String title; + + /** + * List of arguments. The first argument is the command to run. + */ + @JsonProperty("args") + public String[] getArgs() { return args; } + @JsonProperty("args") + public void setArgs(String[] value) { this.args = value; } + + /** + * This property should only be set if the corresponding capability + * `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell + * to launch the application, then the client must not attempt to escape characters with + * special meanings for the shell. The user is fully responsible for escaping as needed and + * that arguments using special characters may not be portable across shells. + */ + @JsonProperty("argsCanBeInterpretedByShell") + public Boolean getArgsCanBeInterpretedByShell() { return argsCanBeInterpretedByShell; } + @JsonProperty("argsCanBeInterpretedByShell") + public void setArgsCanBeInterpretedByShell(Boolean value) { this.argsCanBeInterpretedByShell = value; } + + /** + * Working directory for the command. For non-empty, valid paths this typically results in + * execution of a change directory command. + */ + @JsonProperty("cwd") + public String getCwd() { return cwd; } + @JsonProperty("cwd") + public void setCwd(String value) { this.cwd = value; } + + /** + * Environment key-value pairs that are added to or removed from the default environment. + */ + @JsonProperty("env") + public Map getEnv() { return env; } + @JsonProperty("env") + public void setEnv(Map value) { this.env = value; } + + /** + * What kind of terminal to launch. Defaults to `integrated` if not specified. + */ + @JsonProperty("kind") + public Kind getKind() { return kind; } + @JsonProperty("kind") + public void setKind(Kind value) { this.kind = value; } + + /** + * Title of the terminal. + */ + @JsonProperty("title") + public String getTitle() { return title; } + @JsonProperty("title") + public void setTitle(String value) { this.title = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestClass.java new file mode 100644 index 0000000..decea03 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestClass.java @@ -0,0 +1,67 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * This request is sent from the debug adapter to the client to run a command in a terminal. + * This is typically used to launch the debuggee in a terminal provided by the client. + * This request should only be called if the corresponding client capability + * `supportsRunInTerminalRequest` is true. + * Client implementations of `runInTerminal` are free to run the command however they choose + * including issuing the command to a command line interpreter (aka 'shell'). Argument + * strings passed to the `runInTerminal` request must arrive verbatim in the command to be + * run. As a consequence, clients which use a shell are responsible for escaping any special + * shell characters in the argument strings to prevent them from being interpreted (and + * modified) by the shell. + * Some users may wish to take advantage of shell processing in the argument strings. For + * clients which implement `runInTerminal` using an intermediary shell, the + * `argsCanBeInterpretedByShell` property can be set to true. In this case the client is + * requested not to escape any special shell characters in the argument strings. + */ +public class RunInTerminalRequestClass { + private long seq; + private AttachRequestType type; + private RunInTerminalRequestArguments arguments; + private RunInTerminalRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public RunInTerminalRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(RunInTerminalRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public RunInTerminalRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(RunInTerminalRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestCommand.java new file mode 100644 index 0000000..348c23b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum RunInTerminalRequestCommand { + RUN_IN_TERMINAL; + + @JsonValue + public String toValue() { + switch (this) { + case RUN_IN_TERMINAL: return "runInTerminal"; + } + return null; + } + + @JsonCreator + public static RunInTerminalRequestCommand forValue(String value) throws IOException { + if (value.equals("runInTerminal")) return RUN_IN_TERMINAL; + throw new IOException("Cannot deserialize RunInTerminalRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalResponseBody.java new file mode 100644 index 0000000..e8a5f75 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalResponseBody.java @@ -0,0 +1,25 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class RunInTerminalResponseBody { + private Long processID; + private Long shellProcessID; + + /** + * The process ID. The value should be less than or equal to 2147483647 (2^31-1). + */ + @JsonProperty("processId") + public Long getProcessID() { return processID; } + @JsonProperty("processId") + public void setProcessID(Long value) { this.processID = value; } + + /** + * The process ID of the terminal shell. The value should be less than or equal to + * 2147483647 (2^31-1). + */ + @JsonProperty("shellProcessId") + public Long getShellProcessID() { return shellProcessID; } + @JsonProperty("shellProcessId") + public void setShellProcessID(Long value) { this.shellProcessID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalResponseClass.java new file mode 100644 index 0000000..ea071b7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/RunInTerminalResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `runInTerminal` request. + */ +public class RunInTerminalResponseClass { + private long seq; + private AttachResponseType type; + private RunInTerminalResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public RunInTerminalResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(RunInTerminalResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Scope.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Scope.java index 4912f94..ad870c6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Scope.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Scope.java @@ -1,433 +1,119 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** - * A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. - * + * A `Scope` is a named container for variables. Optionally a scope can map to a source or a + * range within a source. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "name", - "presentationHint", - "variablesReference", - "namedVariables", - "indexedVariables", - "expensive", - "source", - "line", - "column", - "endLine", - "endColumn" -}) -@Generated("jsonschema2pojo") public class Scope { - - /** - * Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. - * (Required) - * - */ - @JsonProperty("name") - @JsonPropertyDescription("Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated.") + private Long column; + private Long endColumn; + private Long endLine; + private boolean expensive; + private Long indexedVariables; + private Long line; private String name; - /** - * A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI. - * - */ - @JsonProperty("presentationHint") - @JsonPropertyDescription("A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.") + private Long namedVariables; private String presentationHint; - /** - * The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - @JsonPropertyDescription("The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.") - private Integer variablesReference; - /** - * The number of named variables in this scope. - * The client can use this information to present the variables in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("namedVariables") - @JsonPropertyDescription("The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.") - private Integer namedVariables; - /** - * The number of indexed variables in this scope. - * The client can use this information to present the variables in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("indexedVariables") - @JsonPropertyDescription("The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.") - private Integer indexedVariables; - /** - * If true, the number of variables in this scope is large or expensive to retrieve. - * (Required) - * - */ - @JsonProperty("expensive") - @JsonPropertyDescription("If true, the number of variables in this scope is large or expensive to retrieve.") - private Boolean expensive; - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") private Source source; - /** - * The start line of the range covered by this scope. - * - */ - @JsonProperty("line") - @JsonPropertyDescription("The start line of the range covered by this scope.") - private Integer line; - /** - * Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - @JsonPropertyDescription("Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer column; - /** - * The end line of the range covered by this scope. - * - */ - @JsonProperty("endLine") - @JsonPropertyDescription("The end line of the range covered by this scope.") - private Integer endLine; - /** - * End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("endColumn") - @JsonPropertyDescription("End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer endColumn; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. - * (Required) - * - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. - * (Required) - * - */ - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI. - * - */ - @JsonProperty("presentationHint") - public String getPresentationHint() { - return presentationHint; - } - - /** - * A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI. - * - */ - @JsonProperty("presentationHint") - public void setPresentationHint(String presentationHint) { - this.presentationHint = presentationHint; - } - - /** - * The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - public Integer getVariablesReference() { - return variablesReference; - } + private long variablesReference; /** - * The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * + * Start position of the range covered by the scope. It is measured in UTF-16 code units and + * the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */ - @JsonProperty("variablesReference") - public void setVariablesReference(Integer variablesReference) { - this.variablesReference = variablesReference; - } - - /** - * The number of named variables in this scope. - * The client can use this information to present the variables in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("namedVariables") - public Integer getNamedVariables() { - return namedVariables; - } - - /** - * The number of named variables in this scope. - * The client can use this information to present the variables in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("namedVariables") - public void setNamedVariables(Integer namedVariables) { - this.namedVariables = namedVariables; - } + @JsonProperty("column") + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } /** - * The number of indexed variables in this scope. - * The client can use this information to present the variables in a paged UI and fetch them in chunks. - * + * End position of the range covered by the scope. It is measured in UTF-16 code units and + * the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */ - @JsonProperty("indexedVariables") - public Integer getIndexedVariables() { - return indexedVariables; - } + @JsonProperty("endColumn") + public Long getEndColumn() { return endColumn; } + @JsonProperty("endColumn") + public void setEndColumn(Long value) { this.endColumn = value; } /** - * The number of indexed variables in this scope. - * The client can use this information to present the variables in a paged UI and fetch them in chunks. - * + * The end line of the range covered by this scope. */ - @JsonProperty("indexedVariables") - public void setIndexedVariables(Integer indexedVariables) { - this.indexedVariables = indexedVariables; - } + @JsonProperty("endLine") + public Long getEndLine() { return endLine; } + @JsonProperty("endLine") + public void setEndLine(Long value) { this.endLine = value; } /** * If true, the number of variables in this scope is large or expensive to retrieve. - * (Required) - * */ @JsonProperty("expensive") - public Boolean getExpensive() { - return expensive; - } - - /** - * If true, the number of variables in this scope is large or expensive to retrieve. - * (Required) - * - */ + public boolean getExpensive() { return expensive; } @JsonProperty("expensive") - public void setExpensive(Boolean expensive) { - this.expensive = expensive; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - public Source getSource() { - return source; - } + public void setExpensive(boolean value) { this.expensive = value; } /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * + * The number of indexed variables in this scope. + * The client can use this information to present the variables in a paged UI and fetch them + * in chunks. */ - @JsonProperty("source") - public void setSource(Source source) { - this.source = source; - } + @JsonProperty("indexedVariables") + public Long getIndexedVariables() { return indexedVariables; } + @JsonProperty("indexedVariables") + public void setIndexedVariables(Long value) { this.indexedVariables = value; } /** * The start line of the range covered by this scope. - * */ @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * The start line of the range covered by this scope. - * - */ + public Long getLine() { return line; } @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - /** - * Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - public Integer getColumn() { - return column; - } + public void setLine(Long value) { this.line = value; } /** - * Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in + * the UI as is and can be translated. */ - @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } /** - * The end line of the range covered by this scope. - * + * The number of named variables in this scope. + * The client can use this information to present the variables in a paged UI and fetch them + * in chunks. */ - @JsonProperty("endLine") - public Integer getEndLine() { - return endLine; - } + @JsonProperty("namedVariables") + public Long getNamedVariables() { return namedVariables; } + @JsonProperty("namedVariables") + public void setNamedVariables(Long value) { this.namedVariables = value; } /** - * The end line of the range covered by this scope. - * + * A hint for how to present this scope in the UI. If this attribute is missing, the scope + * is shown with a generic UI. */ - @JsonProperty("endLine") - public void setEndLine(Integer endLine) { - this.endLine = endLine; - } + @JsonProperty("presentationHint") + public String getPresentationHint() { return presentationHint; } + @JsonProperty("presentationHint") + public void setPresentationHint(String value) { this.presentationHint = value; } /** - * End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * The source for this scope. */ - @JsonProperty("endColumn") - public Integer getEndColumn() { - return endColumn; - } + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } /** - * End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * The variables of this scope can be retrieved by passing the value of `variablesReference` + * to the `variables` request as long as execution remains suspended. See 'Lifetime of + * Object References' in the Overview section for details. */ - @JsonProperty("endColumn") - public void setEndColumn(Integer endColumn) { - this.endColumn = endColumn; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Scope.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("presentationHint"); - sb.append('='); - sb.append(((this.presentationHint == null)?"":this.presentationHint)); - sb.append(','); - sb.append("variablesReference"); - sb.append('='); - sb.append(((this.variablesReference == null)?"":this.variablesReference)); - sb.append(','); - sb.append("namedVariables"); - sb.append('='); - sb.append(((this.namedVariables == null)?"":this.namedVariables)); - sb.append(','); - sb.append("indexedVariables"); - sb.append('='); - sb.append(((this.indexedVariables == null)?"":this.indexedVariables)); - sb.append(','); - sb.append("expensive"); - sb.append('='); - sb.append(((this.expensive == null)?"":this.expensive)); - sb.append(','); - sb.append("source"); - sb.append('='); - sb.append(((this.source == null)?"":this.source)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("endLine"); - sb.append('='); - sb.append(((this.endLine == null)?"":this.endLine)); - sb.append(','); - sb.append("endColumn"); - sb.append('='); - sb.append(((this.endColumn == null)?"":this.endColumn)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); - result = ((result* 31)+((this.indexedVariables == null)? 0 :this.indexedVariables.hashCode())); - result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); - result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.namedVariables == null)? 0 :this.namedVariables.hashCode())); - result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); - result = ((result* 31)+((this.expensive == null)? 0 :this.expensive.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Scope) == false) { - return false; - } - Scope rhs = ((Scope) other); - return (((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.indexedVariables == rhs.indexedVariables)||((this.indexedVariables!= null)&&this.indexedVariables.equals(rhs.indexedVariables))))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.namedVariables == rhs.namedVariables)||((this.namedVariables!= null)&&this.namedVariables.equals(rhs.namedVariables))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference))))&&((this.expensive == rhs.expensive)||((this.expensive!= null)&&this.expensive.equals(rhs.expensive)))); - } - + @JsonProperty("variablesReference") + public long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(long value) { this.variablesReference = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArguments.java deleted file mode 100644 index 9ac6640..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArguments.java +++ /dev/null @@ -1,108 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `scopes` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "frameId" -}) -@Generated("jsonschema2pojo") -public class ScopesArguments { - - /** - * Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("frameId") - @JsonPropertyDescription("Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") - private Integer frameId; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("frameId") - public Integer getFrameId() { - return frameId; - } - - /** - * Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("frameId") - public void setFrameId(Integer frameId) { - this.frameId = frameId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ScopesArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("frameId"); - sb.append('='); - sb.append(((this.frameId == null)?"":this.frameId)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ScopesArguments) == false) { - return false; - } - ScopesArguments rhs = ((ScopesArguments) other); - return (((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArgumentsClass.java new file mode 100644 index 0000000..0ab983c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesArgumentsClass.java @@ -0,0 +1,20 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `scopes` request. + */ +public class ScopesArgumentsClass { + private long frameID; + + /** + * Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have + * been obtained in the current suspended state. See 'Lifetime of Object References' in the + * Overview section for details. + */ + @JsonProperty("frameId") + public long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(long value) { this.frameID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestArguments.java new file mode 100644 index 0000000..795115a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestArguments.java @@ -0,0 +1,20 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `scopes` request. + */ +public class ScopesRequestArguments { + private long frameID; + + /** + * Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have + * been obtained in the current suspended state. See 'Lifetime of Object References' in the + * Overview section for details. + */ + @JsonProperty("frameId") + public long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(long value) { this.frameID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestClass.java new file mode 100644 index 0000000..696a84f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestClass.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request returns the variable scopes for a given stack frame ID. + */ +public class ScopesRequestClass { + private long seq; + private AttachRequestType type; + private ScopesRequestArguments arguments; + private ScopesRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public ScopesRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(ScopesRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public ScopesRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(ScopesRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestCommand.java new file mode 100644 index 0000000..9ad8b50 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ScopesRequestCommand { + SCOPES; + + @JsonValue + public String toValue() { + switch (this) { + case SCOPES: return "scopes"; + } + return null; + } + + @JsonCreator + public static ScopesRequestCommand forValue(String value) throws IOException { + if (value.equals("scopes")) return SCOPES; + throw new IOException("Cannot deserialize ScopesRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesResponseBody.java new file mode 100644 index 0000000..17f13f8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesResponseBody.java @@ -0,0 +1,16 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ScopesResponseBody { + private Scope[] scopes; + + /** + * The scopes of the stack frame. If the array has length zero, there are no scopes + * available. + */ + @JsonProperty("scopes") + public Scope[] getScopes() { return scopes; } + @JsonProperty("scopes") + public void setScopes(Scope[] value) { this.scopes = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesResponseClass.java new file mode 100644 index 0000000..8f57454 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ScopesResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `scopes` request. + */ +public class ScopesResponseClass { + private long seq; + private AttachResponseType type; + private ScopesResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public ScopesResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ScopesResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArguments.java deleted file mode 100644 index 81d2d06..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArguments.java +++ /dev/null @@ -1,206 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `setBreakpoints` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "source", - "breakpoints", - "lines", - "sourceModified" -}) -@Generated("jsonschema2pojo") -public class SetBreakpointsArguments { - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") - private Source source; - /** - * The code locations of the breakpoints. - * - */ - @JsonProperty("breakpoints") - @JsonPropertyDescription("The code locations of the breakpoints.") - private List breakpoints = new ArrayList(); - /** - * Deprecated: The code locations of the breakpoints. - * - */ - @JsonProperty("lines") - @JsonPropertyDescription("Deprecated: The code locations of the breakpoints.") - private List lines = new ArrayList(); - /** - * A value of true indicates that the underlying source has been modified which results in new breakpoint locations. - * - */ - @JsonProperty("sourceModified") - @JsonPropertyDescription("A value of true indicates that the underlying source has been modified which results in new breakpoint locations.") - private Boolean sourceModified; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - public Source getSource() { - return source; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * (Required) - * - */ - @JsonProperty("source") - public void setSource(Source source) { - this.source = source; - } - - /** - * The code locations of the breakpoints. - * - */ - @JsonProperty("breakpoints") - public List getBreakpoints() { - return breakpoints; - } - - /** - * The code locations of the breakpoints. - * - */ - @JsonProperty("breakpoints") - public void setBreakpoints(List breakpoints) { - this.breakpoints = breakpoints; - } - - /** - * Deprecated: The code locations of the breakpoints. - * - */ - @JsonProperty("lines") - public List getLines() { - return lines; - } - - /** - * Deprecated: The code locations of the breakpoints. - * - */ - @JsonProperty("lines") - public void setLines(List lines) { - this.lines = lines; - } - - /** - * A value of true indicates that the underlying source has been modified which results in new breakpoint locations. - * - */ - @JsonProperty("sourceModified") - public Boolean getSourceModified() { - return sourceModified; - } - - /** - * A value of true indicates that the underlying source has been modified which results in new breakpoint locations. - * - */ - @JsonProperty("sourceModified") - public void setSourceModified(Boolean sourceModified) { - this.sourceModified = sourceModified; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SetBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("source"); - sb.append('='); - sb.append(((this.source == null)?"":this.source)); - sb.append(','); - sb.append("breakpoints"); - sb.append('='); - sb.append(((this.breakpoints == null)?"":this.breakpoints)); - sb.append(','); - sb.append("lines"); - sb.append('='); - sb.append(((this.lines == null)?"":this.lines)); - sb.append(','); - sb.append("sourceModified"); - sb.append('='); - sb.append(((this.sourceModified == null)?"":this.sourceModified)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); - result = ((result* 31)+((this.breakpoints == null)? 0 :this.breakpoints.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.lines == null)? 0 :this.lines.hashCode())); - result = ((result* 31)+((this.sourceModified == null)? 0 :this.sourceModified.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SetBreakpointsArguments) == false) { - return false; - } - SetBreakpointsArguments rhs = ((SetBreakpointsArguments) other); - return ((((((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source)))&&((this.breakpoints == rhs.breakpoints)||((this.breakpoints!= null)&&this.breakpoints.equals(rhs.breakpoints))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.lines == rhs.lines)||((this.lines!= null)&&this.lines.equals(rhs.lines))))&&((this.sourceModified == rhs.sourceModified)||((this.sourceModified!= null)&&this.sourceModified.equals(rhs.sourceModified)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArgumentsClass.java new file mode 100644 index 0000000..7bf00ba --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsArgumentsClass.java @@ -0,0 +1,47 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setBreakpoints` request. + */ +public class SetBreakpointsArgumentsClass { + private SourceBreakpoint[] breakpoints; + private long[] lines; + private Source source; + private Boolean sourceModified; + + /** + * The code locations of the breakpoints. + */ + @JsonProperty("breakpoints") + public SourceBreakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(SourceBreakpoint[] value) { this.breakpoints = value; } + + /** + * Deprecated: The code locations of the breakpoints. + */ + @JsonProperty("lines") + public long[] getLines() { return lines; } + @JsonProperty("lines") + public void setLines(long[] value) { this.lines = value; } + + /** + * The source location of the breakpoints; either `source.path` or `source.sourceReference` + * must be specified. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } + + /** + * A value of true indicates that the underlying source has been modified which results in + * new breakpoint locations. + */ + @JsonProperty("sourceModified") + public Boolean getSourceModified() { return sourceModified; } + @JsonProperty("sourceModified") + public void setSourceModified(Boolean value) { this.sourceModified = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestArguments.java new file mode 100644 index 0000000..91f1c35 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestArguments.java @@ -0,0 +1,47 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setBreakpoints` request. + */ +public class SetBreakpointsRequestArguments { + private SourceBreakpoint[] breakpoints; + private long[] lines; + private Source source; + private Boolean sourceModified; + + /** + * The code locations of the breakpoints. + */ + @JsonProperty("breakpoints") + public SourceBreakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(SourceBreakpoint[] value) { this.breakpoints = value; } + + /** + * Deprecated: The code locations of the breakpoints. + */ + @JsonProperty("lines") + public long[] getLines() { return lines; } + @JsonProperty("lines") + public void setLines(long[] value) { this.lines = value; } + + /** + * The source location of the breakpoints; either `source.path` or `source.sourceReference` + * must be specified. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } + + /** + * A value of true indicates that the underlying source has been modified which results in + * new breakpoint locations. + */ + @JsonProperty("sourceModified") + public Boolean getSourceModified() { return sourceModified; } + @JsonProperty("sourceModified") + public void setSourceModified(Boolean value) { this.sourceModified = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java new file mode 100644 index 0000000..6cb13a6 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Sets multiple breakpoints for a single source and clears all previous breakpoints in that + * source. + * To clear all breakpoint for a source, specify an empty array. + * When a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated. + */ +public class SetBreakpointsRequestClass { + private long seq; + private AttachRequestType type; + private SetBreakpointsRequestArguments arguments; + private SetBreakpointsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public SetBreakpointsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(SetBreakpointsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public SetBreakpointsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(SetBreakpointsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestCommand.java new file mode 100644 index 0000000..4398e5f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum SetBreakpointsRequestCommand { + SET_BREAKPOINTS; + + @JsonValue + public String toValue() { + switch (this) { + case SET_BREAKPOINTS: return "setBreakpoints"; + } + return null; + } + + @JsonCreator + public static SetBreakpointsRequestCommand forValue(String value) throws IOException { + if (value.equals("setBreakpoints")) return SET_BREAKPOINTS; + throw new IOException("Cannot deserialize SetBreakpointsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseBody.java new file mode 100644 index 0000000..6d4fa2a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseBody.java @@ -0,0 +1,17 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class SetBreakpointsResponseBody { + private Breakpoint[] breakpoints; + + /** + * Information about the breakpoints. + * The array elements are in the same order as the elements of the `breakpoints` (or the + * deprecated `lines`) array in the arguments. + */ + @JsonProperty("breakpoints") + public Breakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(Breakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java new file mode 100644 index 0000000..7ff351e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java @@ -0,0 +1,91 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `setBreakpoints` request. + * Returned is information about each breakpoint created by this request. + * This includes the actual code location and whether the breakpoint could be verified. + * The breakpoints returned are in the same order as the elements of the `breakpoints` + * (or the deprecated `lines`) array in the arguments. + */ +public class SetBreakpointsResponseClass { + private long seq; + private AttachResponseType type; + private SetBreakpointsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public SetBreakpointsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(SetBreakpointsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArguments.java deleted file mode 100644 index 7a3d4ce..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArguments.java +++ /dev/null @@ -1,110 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `setDataBreakpoints` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "breakpoints" -}) -@Generated("jsonschema2pojo") -public class SetDataBreakpointsArguments { - - /** - * The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. - * (Required) - * - */ - @JsonProperty("breakpoints") - @JsonPropertyDescription("The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints.") - private List breakpoints = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. - * (Required) - * - */ - @JsonProperty("breakpoints") - public List getBreakpoints() { - return breakpoints; - } - - /** - * The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. - * (Required) - * - */ - @JsonProperty("breakpoints") - public void setBreakpoints(List breakpoints) { - this.breakpoints = breakpoints; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SetDataBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("breakpoints"); - sb.append('='); - sb.append(((this.breakpoints == null)?"":this.breakpoints)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.breakpoints == null)? 0 :this.breakpoints.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SetDataBreakpointsArguments) == false) { - return false; - } - SetDataBreakpointsArguments rhs = ((SetDataBreakpointsArguments) other); - return (((this.breakpoints == rhs.breakpoints)||((this.breakpoints!= null)&&this.breakpoints.equals(rhs.breakpoints)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArgumentsClass.java new file mode 100644 index 0000000..da6c318 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsArgumentsClass.java @@ -0,0 +1,19 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setDataBreakpoints` request. + */ +public class SetDataBreakpointsArgumentsClass { + private DataBreakpoint[] breakpoints; + + /** + * The contents of this array replaces all existing data breakpoints. An empty array clears + * all data breakpoints. + */ + @JsonProperty("breakpoints") + public DataBreakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(DataBreakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestArguments.java new file mode 100644 index 0000000..735837f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestArguments.java @@ -0,0 +1,19 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setDataBreakpoints` request. + */ +public class SetDataBreakpointsRequestArguments { + private DataBreakpoint[] breakpoints; + + /** + * The contents of this array replaces all existing data breakpoints. An empty array clears + * all data breakpoints. + */ + @JsonProperty("breakpoints") + public DataBreakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(DataBreakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestClass.java new file mode 100644 index 0000000..da83ed5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestClass.java @@ -0,0 +1,59 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Replaces all existing data breakpoints with new data breakpoints. + * To clear all data breakpoints, specify an empty array. + * When a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is + * generated. + * Clients should only call this request if the corresponding capability + * `supportsDataBreakpoints` is true. + */ +public class SetDataBreakpointsRequestClass { + private long seq; + private AttachRequestType type; + private SetDataBreakpointsRequestArguments arguments; + private SetDataBreakpointsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public SetDataBreakpointsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(SetDataBreakpointsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public SetDataBreakpointsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(SetDataBreakpointsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestCommand.java new file mode 100644 index 0000000..df69636 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum SetDataBreakpointsRequestCommand { + SET_DATA_BREAKPOINTS; + + @JsonValue + public String toValue() { + switch (this) { + case SET_DATA_BREAKPOINTS: return "setDataBreakpoints"; + } + return null; + } + + @JsonCreator + public static SetDataBreakpointsRequestCommand forValue(String value) throws IOException { + if (value.equals("setDataBreakpoints")) return SET_DATA_BREAKPOINTS; + throw new IOException("Cannot deserialize SetDataBreakpointsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsResponseBody.java new file mode 100644 index 0000000..1f2783e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsResponseBody.java @@ -0,0 +1,16 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class SetDataBreakpointsResponseBody { + private Breakpoint[] breakpoints; + + /** + * Information about the data breakpoints. The array elements correspond to the elements of + * the input argument `breakpoints` array. + */ + @JsonProperty("breakpoints") + public Breakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(Breakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsResponseClass.java new file mode 100644 index 0000000..5337e4b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetDataBreakpointsResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `setDataBreakpoints` request. + * Returned is information about each breakpoint created by this request. + */ +public class SetDataBreakpointsResponseClass { + private long seq; + private AttachResponseType type; + private SetDataBreakpointsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public SetDataBreakpointsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(SetDataBreakpointsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArguments.java deleted file mode 100644 index 0742560..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArguments.java +++ /dev/null @@ -1,175 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `setExceptionBreakpoints` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "filters", - "filterOptions", - "exceptionOptions" -}) -@Generated("jsonschema2pojo") -public class SetExceptionBreakpointsArguments { - - /** - * Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive. - * (Required) - * - */ - @JsonProperty("filters") - @JsonPropertyDescription("Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive.") - private List filters = new ArrayList(); - /** - * Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive. - * - */ - @JsonProperty("filterOptions") - @JsonPropertyDescription("Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive.") - private List filterOptions = new ArrayList(); - /** - * Configuration options for selected exceptions. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true. - * - */ - @JsonProperty("exceptionOptions") - @JsonPropertyDescription("Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true.") - private List exceptionOptions = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive. - * (Required) - * - */ - @JsonProperty("filters") - public List getFilters() { - return filters; - } - - /** - * Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive. - * (Required) - * - */ - @JsonProperty("filters") - public void setFilters(List filters) { - this.filters = filters; - } - - /** - * Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive. - * - */ - @JsonProperty("filterOptions") - public List getFilterOptions() { - return filterOptions; - } - - /** - * Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive. - * - */ - @JsonProperty("filterOptions") - public void setFilterOptions(List filterOptions) { - this.filterOptions = filterOptions; - } - - /** - * Configuration options for selected exceptions. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true. - * - */ - @JsonProperty("exceptionOptions") - public List getExceptionOptions() { - return exceptionOptions; - } - - /** - * Configuration options for selected exceptions. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true. - * - */ - @JsonProperty("exceptionOptions") - public void setExceptionOptions(List exceptionOptions) { - this.exceptionOptions = exceptionOptions; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SetExceptionBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("filters"); - sb.append('='); - sb.append(((this.filters == null)?"":this.filters)); - sb.append(','); - sb.append("filterOptions"); - sb.append('='); - sb.append(((this.filterOptions == null)?"":this.filterOptions)); - sb.append(','); - sb.append("exceptionOptions"); - sb.append('='); - sb.append(((this.exceptionOptions == null)?"":this.exceptionOptions)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.filters == null)? 0 :this.filters.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.exceptionOptions == null)? 0 :this.exceptionOptions.hashCode())); - result = ((result* 31)+((this.filterOptions == null)? 0 :this.filterOptions.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SetExceptionBreakpointsArguments) == false) { - return false; - } - SetExceptionBreakpointsArguments rhs = ((SetExceptionBreakpointsArguments) other); - return (((((this.filters == rhs.filters)||((this.filters!= null)&&this.filters.equals(rhs.filters)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.exceptionOptions == rhs.exceptionOptions)||((this.exceptionOptions!= null)&&this.exceptionOptions.equals(rhs.exceptionOptions))))&&((this.filterOptions == rhs.filterOptions)||((this.filterOptions!= null)&&this.filterOptions.equals(rhs.filterOptions)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArgumentsClass.java new file mode 100644 index 0000000..e24bfd4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsArgumentsClass.java @@ -0,0 +1,43 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setExceptionBreakpoints` request. + */ +public class SetExceptionBreakpointsArgumentsClass { + private ExceptionOptions[] exceptionOptions; + private ExceptionFilterOptions[] filterOptions; + private String[] filters; + + /** + * Configuration options for selected exceptions. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsExceptionOptions` is true. + */ + @JsonProperty("exceptionOptions") + public ExceptionOptions[] getExceptionOptions() { return exceptionOptions; } + @JsonProperty("exceptionOptions") + public void setExceptionOptions(ExceptionOptions[] value) { this.exceptionOptions = value; } + + /** + * Set of exception filters and their options. The set of all possible exception filters is + * defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by + * a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. + * The `filter` and `filterOptions` sets are additive. + */ + @JsonProperty("filterOptions") + public ExceptionFilterOptions[] getFilterOptions() { return filterOptions; } + @JsonProperty("filterOptions") + public void setFilterOptions(ExceptionFilterOptions[] value) { this.filterOptions = value; } + + /** + * Set of exception filters specified by their ID. The set of all possible exception filters + * is defined by the `exceptionBreakpointFilters` capability. The `filter` and + * `filterOptions` sets are additive. + */ + @JsonProperty("filters") + public String[] getFilters() { return filters; } + @JsonProperty("filters") + public void setFilters(String[] value) { this.filters = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestArguments.java new file mode 100644 index 0000000..db65d2a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestArguments.java @@ -0,0 +1,43 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setExceptionBreakpoints` request. + */ +public class SetExceptionBreakpointsRequestArguments { + private ExceptionOptions[] exceptionOptions; + private ExceptionFilterOptions[] filterOptions; + private String[] filters; + + /** + * Configuration options for selected exceptions. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsExceptionOptions` is true. + */ + @JsonProperty("exceptionOptions") + public ExceptionOptions[] getExceptionOptions() { return exceptionOptions; } + @JsonProperty("exceptionOptions") + public void setExceptionOptions(ExceptionOptions[] value) { this.exceptionOptions = value; } + + /** + * Set of exception filters and their options. The set of all possible exception filters is + * defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by + * a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. + * The `filter` and `filterOptions` sets are additive. + */ + @JsonProperty("filterOptions") + public ExceptionFilterOptions[] getFilterOptions() { return filterOptions; } + @JsonProperty("filterOptions") + public void setFilterOptions(ExceptionFilterOptions[] value) { this.filterOptions = value; } + + /** + * Set of exception filters specified by their ID. The set of all possible exception filters + * is defined by the `exceptionBreakpointFilters` capability. The `filter` and + * `filterOptions` sets are additive. + */ + @JsonProperty("filters") + public String[] getFilters() { return filters; } + @JsonProperty("filters") + public void setFilters(String[] value) { this.filters = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestClass.java new file mode 100644 index 0000000..2d75ff5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestClass.java @@ -0,0 +1,58 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request configures the debugger's response to thrown exceptions. + * If an exception is configured to break, a `stopped` event is fired (with reason + * `exception`). + * Clients should only call this request if the corresponding capability + * `exceptionBreakpointFilters` returns one or more filters. + */ +public class SetExceptionBreakpointsRequestClass { + private long seq; + private AttachRequestType type; + private SetExceptionBreakpointsRequestArguments arguments; + private SetExceptionBreakpointsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public SetExceptionBreakpointsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(SetExceptionBreakpointsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public SetExceptionBreakpointsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(SetExceptionBreakpointsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestCommand.java new file mode 100644 index 0000000..c606be3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum SetExceptionBreakpointsRequestCommand { + SET_EXCEPTION_BREAKPOINTS; + + @JsonValue + public String toValue() { + switch (this) { + case SET_EXCEPTION_BREAKPOINTS: return "setExceptionBreakpoints"; + } + return null; + } + + @JsonCreator + public static SetExceptionBreakpointsRequestCommand forValue(String value) throws IOException { + if (value.equals("setExceptionBreakpoints")) return SET_EXCEPTION_BREAKPOINTS; + throw new IOException("Cannot deserialize SetExceptionBreakpointsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsResponseBody.java new file mode 100644 index 0000000..6d5d21d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsResponseBody.java @@ -0,0 +1,19 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class SetExceptionBreakpointsResponseBody { + private Breakpoint[] breakpoints; + + /** + * Information about the exception breakpoints or filters. + * The breakpoints returned are in the same order as the elements of the `filters`, + * `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and + * `filterOptions` are given, the returned array must start with `filters` information + * first, followed by `filterOptions` information. + */ + @JsonProperty("breakpoints") + public Breakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(Breakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsResponseClass.java new file mode 100644 index 0000000..50674fa --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExceptionBreakpointsResponseClass.java @@ -0,0 +1,100 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `setExceptionBreakpoints` request. + * The response contains an array of `Breakpoint` objects with information about each + * exception breakpoint or filter. The `Breakpoint` objects are in the same order as the + * elements of the `filters`, `filterOptions`, `exceptionOptions` arrays given as arguments. + * If both `filters` and `filterOptions` are given, the returned array must start with + * `filters` information first, followed by `filterOptions` information. + * The `verified` property of a `Breakpoint` object signals whether the exception breakpoint + * or filter could be successfully created and whether the condition is valid. In case of an + * error the `message` property explains the problem. The `id` property can be used to + * introduce a unique ID for the exception breakpoint or filter so that it can be updated + * subsequently by sending breakpoint events. + * For backward compatibility both the `breakpoints` array and the enclosing `body` are + * optional. If these elements are missing a client is not able to show problems for + * individual exception breakpoints or filters. + */ +public class SetExceptionBreakpointsResponseClass { + private long seq; + private AttachResponseType type; + private SetExceptionBreakpointsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public SetExceptionBreakpointsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(SetExceptionBreakpointsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArguments.java deleted file mode 100644 index cf72b26..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArguments.java +++ /dev/null @@ -1,204 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `setExpression` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "expression", - "value", - "frameId", - "format" -}) -@Generated("jsonschema2pojo") -public class SetExpressionArguments { - - /** - * The l-value expression to assign to. - * (Required) - * - */ - @JsonProperty("expression") - @JsonPropertyDescription("The l-value expression to assign to.") - private String expression; - /** - * The value expression to assign to the l-value expression. - * (Required) - * - */ - @JsonProperty("value") - @JsonPropertyDescription("The value expression to assign to the l-value expression.") - private String value; - /** - * Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope. - * - */ - @JsonProperty("frameId") - @JsonPropertyDescription("Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope.") - private Integer frameId; - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - @JsonPropertyDescription("Provides formatting information for a value.") - private ValueFormat format; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The l-value expression to assign to. - * (Required) - * - */ - @JsonProperty("expression") - public String getExpression() { - return expression; - } - - /** - * The l-value expression to assign to. - * (Required) - * - */ - @JsonProperty("expression") - public void setExpression(String expression) { - this.expression = expression; - } - - /** - * The value expression to assign to the l-value expression. - * (Required) - * - */ - @JsonProperty("value") - public String getValue() { - return value; - } - - /** - * The value expression to assign to the l-value expression. - * (Required) - * - */ - @JsonProperty("value") - public void setValue(String value) { - this.value = value; - } - - /** - * Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope. - * - */ - @JsonProperty("frameId") - public Integer getFrameId() { - return frameId; - } - - /** - * Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope. - * - */ - @JsonProperty("frameId") - public void setFrameId(Integer frameId) { - this.frameId = frameId; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - public ValueFormat getFormat() { - return format; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - public void setFormat(ValueFormat format) { - this.format = format; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SetExpressionArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("expression"); - sb.append('='); - sb.append(((this.expression == null)?"":this.expression)); - sb.append(','); - sb.append("value"); - sb.append('='); - sb.append(((this.value == null)?"":this.value)); - sb.append(','); - sb.append("frameId"); - sb.append('='); - sb.append(((this.frameId == null)?"":this.frameId)); - sb.append(','); - sb.append("format"); - sb.append('='); - sb.append(((this.format == null)?"":this.format)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); - result = ((result* 31)+((this.expression == null)? 0 :this.expression.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.value == null)? 0 :this.value.hashCode())); - result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SetExpressionArguments) == false) { - return false; - } - SetExpressionArguments rhs = ((SetExpressionArguments) other); - return ((((((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format)))&&((this.expression == rhs.expression)||((this.expression!= null)&&this.expression.equals(rhs.expression))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.value == rhs.value)||((this.value!= null)&&this.value.equals(rhs.value))))&&((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArgumentsClass.java new file mode 100644 index 0000000..27118da --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionArgumentsClass.java @@ -0,0 +1,46 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setExpression` request. + */ +public class SetExpressionArgumentsClass { + private String expression; + private ValueFormat format; + private Long frameID; + private String value; + + /** + * The l-value expression to assign to. + */ + @JsonProperty("expression") + public String getExpression() { return expression; } + @JsonProperty("expression") + public void setExpression(String value) { this.expression = value; } + + /** + * Specifies how the resulting value should be formatted. + */ + @JsonProperty("format") + public ValueFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(ValueFormat value) { this.format = value; } + + /** + * Evaluate the expressions in the scope of this stack frame. If not specified, the + * expressions are evaluated in the global scope. + */ + @JsonProperty("frameId") + public Long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(Long value) { this.frameID = value; } + + /** + * The value expression to assign to the l-value expression. + */ + @JsonProperty("value") + public String getValue() { return value; } + @JsonProperty("value") + public void setValue(String value) { this.value = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestArguments.java new file mode 100644 index 0000000..200ea4a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestArguments.java @@ -0,0 +1,46 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setExpression` request. + */ +public class SetExpressionRequestArguments { + private String expression; + private ValueFormat format; + private Long frameID; + private String value; + + /** + * The l-value expression to assign to. + */ + @JsonProperty("expression") + public String getExpression() { return expression; } + @JsonProperty("expression") + public void setExpression(String value) { this.expression = value; } + + /** + * Specifies how the resulting value should be formatted. + */ + @JsonProperty("format") + public ValueFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(ValueFormat value) { this.format = value; } + + /** + * Evaluate the expressions in the scope of this stack frame. If not specified, the + * expressions are evaluated in the global scope. + */ + @JsonProperty("frameId") + public Long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(Long value) { this.frameID = value; } + + /** + * The value expression to assign to the l-value expression. + */ + @JsonProperty("value") + public String getValue() { return value; } + @JsonProperty("value") + public void setValue(String value) { this.value = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestClass.java new file mode 100644 index 0000000..a6433f1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestClass.java @@ -0,0 +1,61 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Evaluates the given `value` expression and assigns it to the `expression` which must be a + * modifiable l-value. + * The expressions have access to any variables and arguments that are in scope of the + * specified frame. + * Clients should only call this request if the corresponding capability + * `supportsSetExpression` is true. + * If a debug adapter implements both `setExpression` and `setVariable`, a client uses + * `setExpression` if the variable has an `evaluateName` property. + */ +public class SetExpressionRequestClass { + private long seq; + private AttachRequestType type; + private SetExpressionRequestArguments arguments; + private SetExpressionRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public SetExpressionRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(SetExpressionRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public SetExpressionRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(SetExpressionRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestCommand.java new file mode 100644 index 0000000..59a905b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum SetExpressionRequestCommand { + SET_EXPRESSION; + + @JsonValue + public String toValue() { + switch (this) { + case SET_EXPRESSION: return "setExpression"; + } + return null; + } + + @JsonCreator + public static SetExpressionRequestCommand forValue(String value) throws IOException { + if (value.equals("setExpression")) return SET_EXPRESSION; + throw new IOException("Cannot deserialize SetExpressionRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionResponseBody.java new file mode 100644 index 0000000..d4fc669 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionResponseBody.java @@ -0,0 +1,84 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class SetExpressionResponseBody { + private Long indexedVariables; + private String memoryReference; + private Long namedVariables; + private VariablePresentationHint presentationHint; + private String type; + private String value; + private Long variablesReference; + + /** + * The number of indexed child variables. + * The client can use this information to present the variables in a paged UI and fetch them + * in chunks. + * The value should be less than or equal to 2147483647 (2^31-1). + */ + @JsonProperty("indexedVariables") + public Long getIndexedVariables() { return indexedVariables; } + @JsonProperty("indexedVariables") + public void setIndexedVariables(Long value) { this.indexedVariables = value; } + + /** + * A memory reference to a location appropriate for this result. + * For pointer type eval results, this is generally a reference to the memory address + * contained in the pointer. + * This attribute may be returned by a debug adapter if corresponding capability + * `supportsMemoryReferences` is true. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * The number of named child variables. + * The client can use this information to present the variables in a paged UI and fetch them + * in chunks. + * The value should be less than or equal to 2147483647 (2^31-1). + */ + @JsonProperty("namedVariables") + public Long getNamedVariables() { return namedVariables; } + @JsonProperty("namedVariables") + public void setNamedVariables(Long value) { this.namedVariables = value; } + + /** + * Properties of a value that can be used to determine how to render the result in the UI. + */ + @JsonProperty("presentationHint") + public VariablePresentationHint getPresentationHint() { return presentationHint; } + @JsonProperty("presentationHint") + public void setPresentationHint(VariablePresentationHint value) { this.presentationHint = value; } + + /** + * The type of the value. + * This attribute should only be returned by a debug adapter if the corresponding capability + * `supportsVariableType` is true. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * The new value of the expression. + */ + @JsonProperty("value") + public String getValue() { return value; } + @JsonProperty("value") + public void setValue(String value) { this.value = value; } + + /** + * If `variablesReference` is > 0, the evaluate result is structured and its children can be + * retrieved by passing `variablesReference` to the `variables` request as long as execution + * remains suspended. See 'Lifetime of Object References' in the Overview section for + * details. + */ + @JsonProperty("variablesReference") + public Long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(Long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionResponseClass.java new file mode 100644 index 0000000..c084087 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetExpressionResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `setExpression` request. + */ +public class SetExpressionResponseClass { + private long seq; + private AttachResponseType type; + private SetExpressionResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public SetExpressionResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(SetExpressionResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArguments.java deleted file mode 100644 index dc210f1..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArguments.java +++ /dev/null @@ -1,110 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `setFunctionBreakpoints` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "breakpoints" -}) -@Generated("jsonschema2pojo") -public class SetFunctionBreakpointsArguments { - - /** - * The function names of the breakpoints. - * (Required) - * - */ - @JsonProperty("breakpoints") - @JsonPropertyDescription("The function names of the breakpoints.") - private List breakpoints = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The function names of the breakpoints. - * (Required) - * - */ - @JsonProperty("breakpoints") - public List getBreakpoints() { - return breakpoints; - } - - /** - * The function names of the breakpoints. - * (Required) - * - */ - @JsonProperty("breakpoints") - public void setBreakpoints(List breakpoints) { - this.breakpoints = breakpoints; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SetFunctionBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("breakpoints"); - sb.append('='); - sb.append(((this.breakpoints == null)?"":this.breakpoints)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.breakpoints == null)? 0 :this.breakpoints.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SetFunctionBreakpointsArguments) == false) { - return false; - } - SetFunctionBreakpointsArguments rhs = ((SetFunctionBreakpointsArguments) other); - return (((this.breakpoints == rhs.breakpoints)||((this.breakpoints!= null)&&this.breakpoints.equals(rhs.breakpoints)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArgumentsClass.java new file mode 100644 index 0000000..58f6664 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsArgumentsClass.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setFunctionBreakpoints` request. + */ +public class SetFunctionBreakpointsArgumentsClass { + private FunctionBreakpoint[] breakpoints; + + /** + * The function names of the breakpoints. + */ + @JsonProperty("breakpoints") + public FunctionBreakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(FunctionBreakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestArguments.java new file mode 100644 index 0000000..cfeb1ff --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestArguments.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setFunctionBreakpoints` request. + */ +public class SetFunctionBreakpointsRequestArguments { + private FunctionBreakpoint[] breakpoints; + + /** + * The function names of the breakpoints. + */ + @JsonProperty("breakpoints") + public FunctionBreakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(FunctionBreakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestClass.java new file mode 100644 index 0000000..58a3b6a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestClass.java @@ -0,0 +1,59 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Replaces all existing function breakpoints with new function breakpoints. + * To clear all function breakpoints, specify an empty array. + * When a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) + * is generated. + * Clients should only call this request if the corresponding capability + * `supportsFunctionBreakpoints` is true. + */ +public class SetFunctionBreakpointsRequestClass { + private long seq; + private AttachRequestType type; + private SetFunctionBreakpointsRequestArguments arguments; + private SetFunctionBreakpointsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public SetFunctionBreakpointsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(SetFunctionBreakpointsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public SetFunctionBreakpointsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(SetFunctionBreakpointsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestCommand.java new file mode 100644 index 0000000..fdce962 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum SetFunctionBreakpointsRequestCommand { + SET_FUNCTION_BREAKPOINTS; + + @JsonValue + public String toValue() { + switch (this) { + case SET_FUNCTION_BREAKPOINTS: return "setFunctionBreakpoints"; + } + return null; + } + + @JsonCreator + public static SetFunctionBreakpointsRequestCommand forValue(String value) throws IOException { + if (value.equals("setFunctionBreakpoints")) return SET_FUNCTION_BREAKPOINTS; + throw new IOException("Cannot deserialize SetFunctionBreakpointsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsResponseBody.java new file mode 100644 index 0000000..037357d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsResponseBody.java @@ -0,0 +1,16 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class SetFunctionBreakpointsResponseBody { + private Breakpoint[] breakpoints; + + /** + * Information about the breakpoints. The array elements correspond to the elements of the + * `breakpoints` array. + */ + @JsonProperty("breakpoints") + public Breakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(Breakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsResponseClass.java new file mode 100644 index 0000000..d050fc3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetFunctionBreakpointsResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `setFunctionBreakpoints` request. + * Returned is information about each breakpoint created by this request. + */ +public class SetFunctionBreakpointsResponseClass { + private long seq; + private AttachResponseType type; + private SetFunctionBreakpointsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public SetFunctionBreakpointsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(SetFunctionBreakpointsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArguments.java deleted file mode 100644 index 1112cf1..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArguments.java +++ /dev/null @@ -1,110 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `setInstructionBreakpoints` request - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "breakpoints" -}) -@Generated("jsonschema2pojo") -public class SetInstructionBreakpointsArguments { - - /** - * The instruction references of the breakpoints - * (Required) - * - */ - @JsonProperty("breakpoints") - @JsonPropertyDescription("The instruction references of the breakpoints") - private List breakpoints = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The instruction references of the breakpoints - * (Required) - * - */ - @JsonProperty("breakpoints") - public List getBreakpoints() { - return breakpoints; - } - - /** - * The instruction references of the breakpoints - * (Required) - * - */ - @JsonProperty("breakpoints") - public void setBreakpoints(List breakpoints) { - this.breakpoints = breakpoints; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SetInstructionBreakpointsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("breakpoints"); - sb.append('='); - sb.append(((this.breakpoints == null)?"":this.breakpoints)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.breakpoints == null)? 0 :this.breakpoints.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SetInstructionBreakpointsArguments) == false) { - return false; - } - SetInstructionBreakpointsArguments rhs = ((SetInstructionBreakpointsArguments) other); - return (((this.breakpoints == rhs.breakpoints)||((this.breakpoints!= null)&&this.breakpoints.equals(rhs.breakpoints)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArgumentsClass.java new file mode 100644 index 0000000..9c94daf --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsArgumentsClass.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setInstructionBreakpoints` request + */ +public class SetInstructionBreakpointsArgumentsClass { + private InstructionBreakpoint[] breakpoints; + + /** + * The instruction references of the breakpoints + */ + @JsonProperty("breakpoints") + public InstructionBreakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(InstructionBreakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestArguments.java new file mode 100644 index 0000000..93a888f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestArguments.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setInstructionBreakpoints` request + */ +public class SetInstructionBreakpointsRequestArguments { + private InstructionBreakpoint[] breakpoints; + + /** + * The instruction references of the breakpoints + */ + @JsonProperty("breakpoints") + public InstructionBreakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(InstructionBreakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestClass.java new file mode 100644 index 0000000..e21951a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestClass.java @@ -0,0 +1,60 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Replaces all existing instruction breakpoints. Typically, instruction breakpoints would + * be set from a disassembly window. + * To clear all instruction breakpoints, specify an empty array. + * When an instruction breakpoint is hit, a `stopped` event (with reason `instruction + * breakpoint`) is generated. + * Clients should only call this request if the corresponding capability + * `supportsInstructionBreakpoints` is true. + */ +public class SetInstructionBreakpointsRequestClass { + private long seq; + private AttachRequestType type; + private SetInstructionBreakpointsRequestArguments arguments; + private SetInstructionBreakpointsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public SetInstructionBreakpointsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(SetInstructionBreakpointsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public SetInstructionBreakpointsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(SetInstructionBreakpointsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestCommand.java new file mode 100644 index 0000000..09c8386 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum SetInstructionBreakpointsRequestCommand { + SET_INSTRUCTION_BREAKPOINTS; + + @JsonValue + public String toValue() { + switch (this) { + case SET_INSTRUCTION_BREAKPOINTS: return "setInstructionBreakpoints"; + } + return null; + } + + @JsonCreator + public static SetInstructionBreakpointsRequestCommand forValue(String value) throws IOException { + if (value.equals("setInstructionBreakpoints")) return SET_INSTRUCTION_BREAKPOINTS; + throw new IOException("Cannot deserialize SetInstructionBreakpointsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsResponseBody.java new file mode 100644 index 0000000..fcf09c0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsResponseBody.java @@ -0,0 +1,16 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class SetInstructionBreakpointsResponseBody { + private Breakpoint[] breakpoints; + + /** + * Information about the breakpoints. The array elements correspond to the elements of the + * `breakpoints` array. + */ + @JsonProperty("breakpoints") + public Breakpoint[] getBreakpoints() { return breakpoints; } + @JsonProperty("breakpoints") + public void setBreakpoints(Breakpoint[] value) { this.breakpoints = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsResponseClass.java new file mode 100644 index 0000000..01f4be8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetInstructionBreakpointsResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `setInstructionBreakpoints` request + */ +public class SetInstructionBreakpointsResponseClass { + private long seq; + private AttachResponseType type; + private SetInstructionBreakpointsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public SetInstructionBreakpointsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(SetInstructionBreakpointsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArguments.java deleted file mode 100644 index cd64b29..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArguments.java +++ /dev/null @@ -1,207 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `setVariable` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "variablesReference", - "name", - "value", - "format" -}) -@Generated("jsonschema2pojo") -public class SetVariableArguments { - - /** - * The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - @JsonPropertyDescription("The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") - private Integer variablesReference; - /** - * The name of the variable in the container. - * (Required) - * - */ - @JsonProperty("name") - @JsonPropertyDescription("The name of the variable in the container.") - private String name; - /** - * The value of the variable. - * (Required) - * - */ - @JsonProperty("value") - @JsonPropertyDescription("The value of the variable.") - private String value; - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - @JsonPropertyDescription("Provides formatting information for a value.") - private ValueFormat format; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - public Integer getVariablesReference() { - return variablesReference; - } - - /** - * The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - public void setVariablesReference(Integer variablesReference) { - this.variablesReference = variablesReference; - } - - /** - * The name of the variable in the container. - * (Required) - * - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * The name of the variable in the container. - * (Required) - * - */ - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * The value of the variable. - * (Required) - * - */ - @JsonProperty("value") - public String getValue() { - return value; - } - - /** - * The value of the variable. - * (Required) - * - */ - @JsonProperty("value") - public void setValue(String value) { - this.value = value; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - public ValueFormat getFormat() { - return format; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - public void setFormat(ValueFormat format) { - this.format = format; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SetVariableArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("variablesReference"); - sb.append('='); - sb.append(((this.variablesReference == null)?"":this.variablesReference)); - sb.append(','); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("value"); - sb.append('='); - sb.append(((this.value == null)?"":this.value)); - sb.append(','); - sb.append("format"); - sb.append('='); - sb.append(((this.format == null)?"":this.format)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); - result = ((result* 31)+((this.value == null)? 0 :this.value.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SetVariableArguments) == false) { - return false; - } - SetVariableArguments rhs = ((SetVariableArguments) other); - return ((((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference))))&&((this.value == rhs.value)||((this.value!= null)&&this.value.equals(rhs.value)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArgumentsClass.java new file mode 100644 index 0000000..97cfe07 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableArgumentsClass.java @@ -0,0 +1,47 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setVariable` request. + */ +public class SetVariableArgumentsClass { + private ValueFormat format; + private String name; + private String value; + private long variablesReference; + + /** + * Specifies details on how to format the response value. + */ + @JsonProperty("format") + public ValueFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(ValueFormat value) { this.format = value; } + + /** + * The name of the variable in the container. + */ + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } + + /** + * The value of the variable. + */ + @JsonProperty("value") + public String getValue() { return value; } + @JsonProperty("value") + public void setValue(String value) { this.value = value; } + + /** + * The reference of the variable container. The `variablesReference` must have been obtained + * in the current suspended state. See 'Lifetime of Object References' in the Overview + * section for details. + */ + @JsonProperty("variablesReference") + public long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestArguments.java new file mode 100644 index 0000000..02b0497 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestArguments.java @@ -0,0 +1,47 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `setVariable` request. + */ +public class SetVariableRequestArguments { + private ValueFormat format; + private String name; + private String value; + private long variablesReference; + + /** + * Specifies details on how to format the response value. + */ + @JsonProperty("format") + public ValueFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(ValueFormat value) { this.format = value; } + + /** + * The name of the variable in the container. + */ + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } + + /** + * The value of the variable. + */ + @JsonProperty("value") + public String getValue() { return value; } + @JsonProperty("value") + public void setValue(String value) { this.value = value; } + + /** + * The reference of the variable container. The `variablesReference` must have been obtained + * in the current suspended state. See 'Lifetime of Object References' in the Overview + * section for details. + */ + @JsonProperty("variablesReference") + public long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestClass.java new file mode 100644 index 0000000..6438e43 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestClass.java @@ -0,0 +1,58 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Set the variable with the given name in the variable container to a new value. Clients + * should only call this request if the corresponding capability `supportsSetVariable` is + * true. + * If a debug adapter implements both `setVariable` and `setExpression`, a client will only + * use `setExpression` if the variable has an `evaluateName` property. + */ +public class SetVariableRequestClass { + private long seq; + private AttachRequestType type; + private SetVariableRequestArguments arguments; + private SetVariableRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public SetVariableRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(SetVariableRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public SetVariableRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(SetVariableRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestCommand.java new file mode 100644 index 0000000..fba23a4 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum SetVariableRequestCommand { + SET_VARIABLE; + + @JsonValue + public String toValue() { + switch (this) { + case SET_VARIABLE: return "setVariable"; + } + return null; + } + + @JsonCreator + public static SetVariableRequestCommand forValue(String value) throws IOException { + if (value.equals("setVariable")) return SET_VARIABLE; + throw new IOException("Cannot deserialize SetVariableRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableResponseBody.java new file mode 100644 index 0000000..186bd8f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableResponseBody.java @@ -0,0 +1,73 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class SetVariableResponseBody { + private Long indexedVariables; + private String memoryReference; + private Long namedVariables; + private String type; + private String value; + private Long variablesReference; + + /** + * The number of indexed child variables. + * The client can use this information to present the variables in a paged UI and fetch them + * in chunks. + * The value should be less than or equal to 2147483647 (2^31-1). + */ + @JsonProperty("indexedVariables") + public Long getIndexedVariables() { return indexedVariables; } + @JsonProperty("indexedVariables") + public void setIndexedVariables(Long value) { this.indexedVariables = value; } + + /** + * A memory reference to a location appropriate for this result. + * For pointer type eval results, this is generally a reference to the memory address + * contained in the pointer. + * This attribute may be returned by a debug adapter if corresponding capability + * `supportsMemoryReferences` is true. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * The number of named child variables. + * The client can use this information to present the variables in a paged UI and fetch them + * in chunks. + * The value should be less than or equal to 2147483647 (2^31-1). + */ + @JsonProperty("namedVariables") + public Long getNamedVariables() { return namedVariables; } + @JsonProperty("namedVariables") + public void setNamedVariables(Long value) { this.namedVariables = value; } + + /** + * The type of the new value. Typically shown in the UI when hovering over the value. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * The new value of the variable. + */ + @JsonProperty("value") + public String getValue() { return value; } + @JsonProperty("value") + public void setValue(String value) { this.value = value; } + + /** + * If `variablesReference` is > 0, the new value is structured and its children can be + * retrieved by passing `variablesReference` to the `variables` request as long as execution + * remains suspended. See 'Lifetime of Object References' in the Overview section for + * details. + */ + @JsonProperty("variablesReference") + public Long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(Long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableResponseClass.java new file mode 100644 index 0000000..3b322de --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetVariableResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `setVariable` request. + */ +public class SetVariableResponseClass { + private long seq; + private AttachResponseType type; + private SetVariableResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public SetVariableResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(SetVariableResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java index 1e3bce7..8a36542 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java @@ -1,393 +1,119 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - +import com.fasterxml.jackson.annotation.*; /** + * The source where the breakpoint is located. + * * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * + * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients + * when specifying breakpoints. + * + * The source location of the breakpoints; either `source.path` or `source.sourceReference` + * must be specified. + * + * Source location that corresponds to this instruction, if any. + * Should always be set (if available) on the first instruction returned, + * but can be omitted afterwards if this instruction maps to the same source file as the + * previous instruction. + * + * The source location for which the goto targets are determined. + * + * The new, changed, or removed source. + * + * The source location where the output was produced. + * + * The source for this scope. + * + * Specifies the source content to load. Either `source.path` or `source.sourceReference` + * must be specified. + * + * The source of the frame. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "name", - "path", - "sourceReference", - "presentationHint", - "origin", - "sources", - "adapterData", - "checksums" -}) -@Generated("jsonschema2pojo") public class Source { - - /** - * The short name of the source. Every source returned from the debug adapter has a name. - * When sending a source to the debug adapter this name is optional. - * - */ - @JsonProperty("name") - @JsonPropertyDescription("The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional.") + private Restart adapterData; + private Checksum[] checksums; private String name; - /** - * The path of the source to be shown in the UI. - * It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0). - * - */ - @JsonProperty("path") - @JsonPropertyDescription("The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0).") - private String path; - /** - * If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified). - * Since a `sourceReference` is only valid for a session, it can not be used to persist a source. - * The value should be less than or equal to 2147483647 (2^31-1). - * - */ - @JsonProperty("sourceReference") - @JsonPropertyDescription("If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1).") - private Integer sourceReference; - /** - * A hint for how to present the source in the UI. - * A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. - * - */ - @JsonProperty("presentationHint") - @JsonPropertyDescription("A hint for how to present the source in the UI.\nA value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.") - private PresentationHint presentationHint; - /** - * The origin of this source. For example, 'internal module', 'inlined content from source map', etc. - * - */ - @JsonProperty("origin") - @JsonPropertyDescription("The origin of this source. For example, 'internal module', 'inlined content from source map', etc.") private String origin; - /** - * A list of sources that are related to this source. These may be the source that generated this source. - * - */ - @JsonProperty("sources") - @JsonPropertyDescription("A list of sources that are related to this source. These may be the source that generated this source.") - private List sources = new ArrayList(); + private String path; + private SourcePresentationHint presentationHint; + private Long sourceReference; + private Source[] sources; + /** * Additional data that a debug adapter might want to loop through the client. - * The client should leave the data intact and persist it across sessions. The client should not interpret the data. - * + * The client should leave the data intact and persist it across sessions. The client should + * not interpret the data. */ @JsonProperty("adapterData") - @JsonPropertyDescription("Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data.") - private Object adapterData; + public Restart getAdapterData() { return adapterData; } + @JsonProperty("adapterData") + public void setAdapterData(Restart value) { this.adapterData = value; } + /** * The checksums associated with this file. - * */ @JsonProperty("checksums") - @JsonPropertyDescription("The checksums associated with this file.") - private List checksums = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public Checksum[] getChecksums() { return checksums; } + @JsonProperty("checksums") + public void setChecksums(Checksum[] value) { this.checksums = value; } /** * The short name of the source. Every source returned from the debug adapter has a name. * When sending a source to the debug adapter this name is optional. - * */ @JsonProperty("name") - public String getName() { - return name; - } - - /** - * The short name of the source. Every source returned from the debug adapter has a name. - * When sending a source to the debug adapter this name is optional. - * - */ + public String getName() { return name; } @JsonProperty("name") - public void setName(String name) { - this.name = name; - } + public void setName(String value) { this.name = value; } /** - * The path of the source to be shown in the UI. - * It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0). - * + * The origin of this source. For example, 'internal module', 'inlined content from source + * map', etc. */ - @JsonProperty("path") - public String getPath() { - return path; - } + @JsonProperty("origin") + public String getOrigin() { return origin; } + @JsonProperty("origin") + public void setOrigin(String value) { this.origin = value; } /** * The path of the source to be shown in the UI. - * It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0). - * + * It is only used to locate and load the content of the source if no `sourceReference` is + * specified (or its value is 0). */ @JsonProperty("path") - public void setPath(String path) { - this.path = path; - } - - /** - * If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified). - * Since a `sourceReference` is only valid for a session, it can not be used to persist a source. - * The value should be less than or equal to 2147483647 (2^31-1). - * - */ - @JsonProperty("sourceReference") - public Integer getSourceReference() { - return sourceReference; - } - - /** - * If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified). - * Since a `sourceReference` is only valid for a session, it can not be used to persist a source. - * The value should be less than or equal to 2147483647 (2^31-1). - * - */ - @JsonProperty("sourceReference") - public void setSourceReference(Integer sourceReference) { - this.sourceReference = sourceReference; - } + public String getPath() { return path; } + @JsonProperty("path") + public void setPath(String value) { this.path = value; } /** * A hint for how to present the source in the UI. - * A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. - * + * A value of `deemphasize` can be used to indicate that the source is not available or that + * it is skipped on stepping. */ @JsonProperty("presentationHint") - public PresentationHint getPresentationHint() { - return presentationHint; - } - - /** - * A hint for how to present the source in the UI. - * A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. - * - */ + public SourcePresentationHint getPresentationHint() { return presentationHint; } @JsonProperty("presentationHint") - public void setPresentationHint(PresentationHint presentationHint) { - this.presentationHint = presentationHint; - } - - /** - * The origin of this source. For example, 'internal module', 'inlined content from source map', etc. - * - */ - @JsonProperty("origin") - public String getOrigin() { - return origin; - } + public void setPresentationHint(SourcePresentationHint value) { this.presentationHint = value; } /** - * The origin of this source. For example, 'internal module', 'inlined content from source map', etc. - * + * If the value > 0 the contents of the source must be retrieved through the `source` + * request (even if a path is specified). + * Since a `sourceReference` is only valid for a session, it can not be used to persist a + * source. + * The value should be less than or equal to 2147483647 (2^31-1). */ - @JsonProperty("origin") - public void setOrigin(String origin) { - this.origin = origin; - } + @JsonProperty("sourceReference") + public Long getSourceReference() { return sourceReference; } + @JsonProperty("sourceReference") + public void setSourceReference(Long value) { this.sourceReference = value; } /** - * A list of sources that are related to this source. These may be the source that generated this source. - * + * A list of sources that are related to this source. These may be the source that generated + * this source. */ @JsonProperty("sources") - public List getSources() { - return sources; - } - - /** - * A list of sources that are related to this source. These may be the source that generated this source. - * - */ + public Source[] getSources() { return sources; } @JsonProperty("sources") - public void setSources(List sources) { - this.sources = sources; - } - - /** - * Additional data that a debug adapter might want to loop through the client. - * The client should leave the data intact and persist it across sessions. The client should not interpret the data. - * - */ - @JsonProperty("adapterData") - public Object getAdapterData() { - return adapterData; - } - - /** - * Additional data that a debug adapter might want to loop through the client. - * The client should leave the data intact and persist it across sessions. The client should not interpret the data. - * - */ - @JsonProperty("adapterData") - public void setAdapterData(Object adapterData) { - this.adapterData = adapterData; - } - - /** - * The checksums associated with this file. - * - */ - @JsonProperty("checksums") - public List getChecksums() { - return checksums; - } - - /** - * The checksums associated with this file. - * - */ - @JsonProperty("checksums") - public void setChecksums(List checksums) { - this.checksums = checksums; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Source.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("path"); - sb.append('='); - sb.append(((this.path == null)?"":this.path)); - sb.append(','); - sb.append("sourceReference"); - sb.append('='); - sb.append(((this.sourceReference == null)?"":this.sourceReference)); - sb.append(','); - sb.append("presentationHint"); - sb.append('='); - sb.append(((this.presentationHint == null)?"":this.presentationHint)); - sb.append(','); - sb.append("origin"); - sb.append('='); - sb.append(((this.origin == null)?"":this.origin)); - sb.append(','); - sb.append("sources"); - sb.append('='); - sb.append(((this.sources == null)?"":this.sources)); - sb.append(','); - sb.append("adapterData"); - sb.append('='); - sb.append(((this.adapterData == null)?"":this.adapterData)); - sb.append(','); - sb.append("checksums"); - sb.append('='); - sb.append(((this.checksums == null)?"":this.checksums)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.sourceReference == null)? 0 :this.sourceReference.hashCode())); - result = ((result* 31)+((this.checksums == null)? 0 :this.checksums.hashCode())); - result = ((result* 31)+((this.path == null)? 0 :this.path.hashCode())); - result = ((result* 31)+((this.sources == null)? 0 :this.sources.hashCode())); - result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); - result = ((result* 31)+((this.adapterData == null)? 0 :this.adapterData.hashCode())); - result = ((result* 31)+((this.origin == null)? 0 :this.origin.hashCode())); - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Source) == false) { - return false; - } - Source rhs = ((Source) other); - return ((((((((((this.sourceReference == rhs.sourceReference)||((this.sourceReference!= null)&&this.sourceReference.equals(rhs.sourceReference)))&&((this.checksums == rhs.checksums)||((this.checksums!= null)&&this.checksums.equals(rhs.checksums))))&&((this.path == rhs.path)||((this.path!= null)&&this.path.equals(rhs.path))))&&((this.sources == rhs.sources)||((this.sources!= null)&&this.sources.equals(rhs.sources))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.adapterData == rhs.adapterData)||((this.adapterData!= null)&&this.adapterData.equals(rhs.adapterData))))&&((this.origin == rhs.origin)||((this.origin!= null)&&this.origin.equals(rhs.origin))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - - - /** - * A hint for how to present the source in the UI. - * A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. - * - */ - @Generated("jsonschema2pojo") - public enum PresentationHint { - - NORMAL("normal"), - EMPHASIZE("emphasize"), - DEEMPHASIZE("deemphasize"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (PresentationHint c: values()) { - CONSTANTS.put(c.value, c); - } - } - - PresentationHint(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static PresentationHint fromValue(String value) { - PresentationHint constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + public void setSources(Source[] value) { this.sources = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArguments.java deleted file mode 100644 index 0d280c5..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArguments.java +++ /dev/null @@ -1,145 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `source` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "source", - "sourceReference" -}) -@Generated("jsonschema2pojo") -public class SourceArguments { - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") - private Source source; - /** - * The reference to the source. This is the same as `source.sourceReference`. - * This is provided for backward compatibility since old clients do not understand the `source` attribute. - * (Required) - * - */ - @JsonProperty("sourceReference") - @JsonPropertyDescription("The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute.") - private Integer sourceReference; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - public Source getSource() { - return source; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - public void setSource(Source source) { - this.source = source; - } - - /** - * The reference to the source. This is the same as `source.sourceReference`. - * This is provided for backward compatibility since old clients do not understand the `source` attribute. - * (Required) - * - */ - @JsonProperty("sourceReference") - public Integer getSourceReference() { - return sourceReference; - } - - /** - * The reference to the source. This is the same as `source.sourceReference`. - * This is provided for backward compatibility since old clients do not understand the `source` attribute. - * (Required) - * - */ - @JsonProperty("sourceReference") - public void setSourceReference(Integer sourceReference) { - this.sourceReference = sourceReference; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SourceArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("source"); - sb.append('='); - sb.append(((this.source == null)?"":this.source)); - sb.append(','); - sb.append("sourceReference"); - sb.append('='); - sb.append(((this.sourceReference == null)?"":this.sourceReference)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.sourceReference == null)? 0 :this.sourceReference.hashCode())); - result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SourceArguments) == false) { - return false; - } - SourceArguments rhs = ((SourceArguments) other); - return ((((this.sourceReference == rhs.sourceReference)||((this.sourceReference!= null)&&this.sourceReference.equals(rhs.sourceReference)))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArgumentsClass.java new file mode 100644 index 0000000..d8288c7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceArgumentsClass.java @@ -0,0 +1,30 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `source` request. + */ +public class SourceArgumentsClass { + private Source source; + private long sourceReference; + + /** + * Specifies the source content to load. Either `source.path` or `source.sourceReference` + * must be specified. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } + + /** + * The reference to the source. This is the same as `source.sourceReference`. + * This is provided for backward compatibility since old clients do not understand the + * `source` attribute. + */ + @JsonProperty("sourceReference") + public long getSourceReference() { return sourceReference; } + @JsonProperty("sourceReference") + public void setSourceReference(long value) { this.sourceReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java index 6c76c02..3496dae 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java @@ -1,253 +1,69 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "line", - "column", - "condition", - "hitCondition", - "logMessage" -}) -@Generated("jsonschema2pojo") public class SourceBreakpoint { - - /** - * The source line of the breakpoint or logpoint. - * (Required) - * - */ - @JsonProperty("line") - @JsonPropertyDescription("The source line of the breakpoint or logpoint.") - private Integer line; - /** - * Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - @JsonPropertyDescription("Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer column; - /** - * The expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * - */ - @JsonProperty("condition") - @JsonPropertyDescription("The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.") + private Long column; private String condition; - /** - * The expression that controls how many hits of the breakpoint are ignored. - * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met. - * - */ - @JsonProperty("hitCondition") - @JsonPropertyDescription("The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met.") private String hitCondition; - /** - * If this attribute exists and is non-empty, the debug adapter must not 'break' (stop) - * but log the message instead. Expressions within `{}` are interpolated. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true. - * If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met. - * - */ - @JsonProperty("logMessage") - @JsonPropertyDescription("If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met.") + private long line; private String logMessage; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); /** - * The source line of the breakpoint or logpoint. - * (Required) - * - */ - @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * The source line of the breakpoint or logpoint. - * (Required) - * - */ - @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - /** - * Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 + * code units and the client capability `columnsStartAt1` determines whether it is 0- or + * 1-based. */ @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ + public Long getColumn() { return column; } @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } + public void setColumn(Long value) { this.column = value; } /** * The expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * + * It is only honored by a debug adapter if the corresponding capability + * `supportsConditionalBreakpoints` is true. */ @JsonProperty("condition") - public String getCondition() { - return condition; - } - - /** - * The expression for conditional breakpoints. - * It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. - * - */ + public String getCondition() { return condition; } @JsonProperty("condition") - public void setCondition(String condition) { - this.condition = condition; - } + public void setCondition(String value) { this.condition = value; } /** * The expression that controls how many hits of the breakpoint are ignored. * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met. - * + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsHitConditionalBreakpoints` is true. + * If both this property and `condition` are specified, `hitCondition` should be evaluated + * only if the `condition` is met, and the debug adapter should stop only if both conditions + * are met. */ @JsonProperty("hitCondition") - public String getHitCondition() { - return hitCondition; - } - - /** - * The expression that controls how many hits of the breakpoint are ignored. - * The debug adapter is expected to interpret the expression as needed. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. - * If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met. - * - */ + public String getHitCondition() { return hitCondition; } @JsonProperty("hitCondition") - public void setHitCondition(String hitCondition) { - this.hitCondition = hitCondition; - } + public void setHitCondition(String value) { this.hitCondition = value; } /** - * If this attribute exists and is non-empty, the debug adapter must not 'break' (stop) - * but log the message instead. Expressions within `{}` are interpolated. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true. - * If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met. - * + * The source line of the breakpoint or logpoint. */ - @JsonProperty("logMessage") - public String getLogMessage() { - return logMessage; - } + @JsonProperty("line") + public long getLine() { return line; } + @JsonProperty("line") + public void setLine(long value) { this.line = value; } /** * If this attribute exists and is non-empty, the debug adapter must not 'break' (stop) * but log the message instead. Expressions within `{}` are interpolated. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true. - * If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met. - * + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsLogPoints` is true. + * If either `hitCondition` or `condition` is specified, then the message should only be + * logged if those conditions are met. */ @JsonProperty("logMessage") - public void setLogMessage(String logMessage) { - this.logMessage = logMessage; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SourceBreakpoint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("condition"); - sb.append('='); - sb.append(((this.condition == null)?"":this.condition)); - sb.append(','); - sb.append("hitCondition"); - sb.append('='); - sb.append(((this.hitCondition == null)?"":this.hitCondition)); - sb.append(','); - sb.append("logMessage"); - sb.append('='); - sb.append(((this.logMessage == null)?"":this.logMessage)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.condition == null)? 0 :this.condition.hashCode())); - result = ((result* 31)+((this.hitCondition == null)? 0 :this.hitCondition.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - result = ((result* 31)+((this.logMessage == null)? 0 :this.logMessage.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SourceBreakpoint) == false) { - return false; - } - SourceBreakpoint rhs = ((SourceBreakpoint) other); - return (((((((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column)))&&((this.condition == rhs.condition)||((this.condition!= null)&&this.condition.equals(rhs.condition))))&&((this.hitCondition == rhs.hitCondition)||((this.hitCondition!= null)&&this.hitCondition.equals(rhs.hitCondition))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.logMessage == rhs.logMessage)||((this.logMessage!= null)&&this.logMessage.equals(rhs.logMessage)))); - } - + public String getLogMessage() { return logMessage; } + @JsonProperty("logMessage") + public void setLogMessage(String value) { this.logMessage = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourcePresentationHint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourcePresentationHint.java new file mode 100644 index 0000000..4883dca --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourcePresentationHint.java @@ -0,0 +1,31 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * A hint for how to present the source in the UI. + * A value of `deemphasize` can be used to indicate that the source is not available or that + * it is skipped on stepping. + */ +public enum SourcePresentationHint { + DEEMPHASIZE, EMPHASIZE, NORMAL; + + @JsonValue + public String toValue() { + switch (this) { + case DEEMPHASIZE: return "deemphasize"; + case EMPHASIZE: return "emphasize"; + case NORMAL: return "normal"; + } + return null; + } + + @JsonCreator + public static SourcePresentationHint forValue(String value) throws IOException { + if (value.equals("deemphasize")) return DEEMPHASIZE; + if (value.equals("emphasize")) return EMPHASIZE; + if (value.equals("normal")) return NORMAL; + throw new IOException("Cannot deserialize SourcePresentationHint"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestArguments.java new file mode 100644 index 0000000..0c04e71 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestArguments.java @@ -0,0 +1,30 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `source` request. + */ +public class SourceRequestArguments { + private Source source; + private long sourceReference; + + /** + * Specifies the source content to load. Either `source.path` or `source.sourceReference` + * must be specified. + */ + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } + + /** + * The reference to the source. This is the same as `source.sourceReference`. + * This is provided for backward compatibility since old clients do not understand the + * `source` attribute. + */ + @JsonProperty("sourceReference") + public long getSourceReference() { return sourceReference; } + @JsonProperty("sourceReference") + public void setSourceReference(long value) { this.sourceReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestClass.java new file mode 100644 index 0000000..b7231e6 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestClass.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request retrieves the source code for a given source reference. + */ +public class SourceRequestClass { + private long seq; + private AttachRequestType type; + private SourceRequestArguments arguments; + private SourceRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public SourceRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(SourceRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public SourceRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(SourceRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestCommand.java new file mode 100644 index 0000000..572f8c0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum SourceRequestCommand { + SOURCE; + + @JsonValue + public String toValue() { + switch (this) { + case SOURCE: return "source"; + } + return null; + } + + @JsonCreator + public static SourceRequestCommand forValue(String value) throws IOException { + if (value.equals("source")) return SOURCE; + throw new IOException("Cannot deserialize SourceRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceResponseBody.java new file mode 100644 index 0000000..fd0c01a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceResponseBody.java @@ -0,0 +1,24 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class SourceResponseBody { + private String content; + private String mimeType; + + /** + * Content of the source reference. + */ + @JsonProperty("content") + public String getContent() { return content; } + @JsonProperty("content") + public void setContent(String value) { this.content = value; } + + /** + * Content type (MIME type) of the source. + */ + @JsonProperty("mimeType") + public String getMIMEType() { return mimeType; } + @JsonProperty("mimeType") + public void setMIMEType(String value) { this.mimeType = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceResponseClass.java new file mode 100644 index 0000000..b882a08 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `source` request. + */ +public class SourceResponseClass { + private long seq; + private AttachResponseType type; + private SourceResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public SourceResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(SourceResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java index ad36120..6e67a0f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java @@ -1,486 +1,121 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - +import com.fasterxml.jackson.annotation.*; /** * A Stackframe contains the source location. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "name", - "source", - "line", - "column", - "endLine", - "endColumn", - "canRestart", - "instructionPointerReference", - "moduleId", - "presentationHint" -}) -@Generated("jsonschema2pojo") public class StackFrame { - - /** - * An identifier for the stack frame. It must be unique across all threads. - * This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame. - * (Required) - * - */ - @JsonProperty("id") - @JsonPropertyDescription("An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame.") - private Integer id; - /** - * The name of the stack frame, typically a method name. - * (Required) - * - */ - @JsonProperty("name") - @JsonPropertyDescription("The name of the stack frame, typically a method name.") - private String name; - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - @JsonPropertyDescription("A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.") - private Source source; - /** - * The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client. - * (Required) - * - */ - @JsonProperty("line") - @JsonPropertyDescription("The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client.") - private Integer line; - /** - * Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client. - * (Required) - * - */ - @JsonProperty("column") - @JsonPropertyDescription("Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client.") - private Integer column; - /** - * The end line of the range covered by the stack frame. - * - */ - @JsonProperty("endLine") - @JsonPropertyDescription("The end line of the range covered by the stack frame.") - private Integer endLine; - /** - * End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("endColumn") - @JsonPropertyDescription("End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer endColumn; - /** - * Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent. - * - */ - @JsonProperty("canRestart") - @JsonPropertyDescription("Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent.") private Boolean canRestart; - /** - * A memory reference for the current instruction pointer in this frame. - * - */ - @JsonProperty("instructionPointerReference") - @JsonPropertyDescription("A memory reference for the current instruction pointer in this frame.") + private long column; + private Long endColumn; + private Long endLine; + private long id; private String instructionPointerReference; - /** - * The module associated with this frame, if any. - * - */ - @JsonProperty("moduleId") - @JsonPropertyDescription("The module associated with this frame, if any.") - private Object moduleId; - /** - * A hint for how to present this frame in the UI. - * A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. - * - */ - @JsonProperty("presentationHint") - @JsonPropertyDescription("A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way.") - private PresentationHint presentationHint; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * An identifier for the stack frame. It must be unique across all threads. - * This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame. - * (Required) - * - */ - @JsonProperty("id") - public Integer getId() { - return id; - } - - /** - * An identifier for the stack frame. It must be unique across all threads. - * This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame. - * (Required) - * - */ - @JsonProperty("id") - public void setId(Integer id) { - this.id = id; - } - - /** - * The name of the stack frame, typically a method name. - * (Required) - * - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * The name of the stack frame, typically a method name. - * (Required) - * - */ - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - public Source getSource() { - return source; - } - - /** - * A `Source` is a descriptor for source code. - * It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. - * - */ - @JsonProperty("source") - public void setSource(Source source) { - this.source = source; - } - - /** - * The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client. - * (Required) - * - */ - @JsonProperty("line") - public Integer getLine() { - return line; - } + private long line; + private ModuleIDUnion moduleID; + private String name; + private StackFramePresentationHint presentationHint; + private Source source; /** - * The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client. - * (Required) - * + * Indicates whether this frame can be restarted with the `restart` request. Clients should + * only use this if the debug adapter supports the `restart` request and the corresponding + * capability `supportsRestartRequest` is true. If a debug adapter has this capability, then + * `canRestart` defaults to `true` if the property is absent. */ - @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } + @JsonProperty("canRestart") + public Boolean getCanRestart() { return canRestart; } + @JsonProperty("canRestart") + public void setCanRestart(Boolean value) { this.canRestart = value; } /** - * Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client. - * (Required) - * + * Start position of the range covered by the stack frame. It is measured in UTF-16 code + * units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + * If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by + * the client. */ @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client. - * (Required) - * - */ + public long getColumn() { return column; } @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } - - /** - * The end line of the range covered by the stack frame. - * - */ - @JsonProperty("endLine") - public Integer getEndLine() { - return endLine; - } + public void setColumn(long value) { this.column = value; } /** - * The end line of the range covered by the stack frame. - * - */ - @JsonProperty("endLine") - public void setEndLine(Integer endLine) { - this.endLine = endLine; - } - - /** - * End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * End position of the range covered by the stack frame. It is measured in UTF-16 code units + * and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */ @JsonProperty("endColumn") - public Integer getEndColumn() { - return endColumn; - } - - /** - * End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ + public Long getEndColumn() { return endColumn; } @JsonProperty("endColumn") - public void setEndColumn(Integer endColumn) { - this.endColumn = endColumn; - } + public void setEndColumn(Long value) { this.endColumn = value; } /** - * Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent. - * + * The end line of the range covered by the stack frame. */ - @JsonProperty("canRestart") - public Boolean getCanRestart() { - return canRestart; - } + @JsonProperty("endLine") + public Long getEndLine() { return endLine; } + @JsonProperty("endLine") + public void setEndLine(Long value) { this.endLine = value; } /** - * Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent. - * + * An identifier for the stack frame. It must be unique across all threads. + * This id can be used to retrieve the scopes of the frame with the `scopes` request or to + * restart the execution of a stack frame. */ - @JsonProperty("canRestart") - public void setCanRestart(Boolean canRestart) { - this.canRestart = canRestart; - } + @JsonProperty("id") + public long getID() { return id; } + @JsonProperty("id") + public void setID(long value) { this.id = value; } /** * A memory reference for the current instruction pointer in this frame. - * */ @JsonProperty("instructionPointerReference") - public String getInstructionPointerReference() { - return instructionPointerReference; - } - - /** - * A memory reference for the current instruction pointer in this frame. - * - */ + public String getInstructionPointerReference() { return instructionPointerReference; } @JsonProperty("instructionPointerReference") - public void setInstructionPointerReference(String instructionPointerReference) { - this.instructionPointerReference = instructionPointerReference; - } + public void setInstructionPointerReference(String value) { this.instructionPointerReference = value; } /** - * The module associated with this frame, if any. - * + * The line within the source of the frame. If the source attribute is missing or doesn't + * exist, `line` is 0 and should be ignored by the client. */ - @JsonProperty("moduleId") - public Object getModuleId() { - return moduleId; - } + @JsonProperty("line") + public long getLine() { return line; } + @JsonProperty("line") + public void setLine(long value) { this.line = value; } /** * The module associated with this frame, if any. - * */ @JsonProperty("moduleId") - public void setModuleId(Object moduleId) { - this.moduleId = moduleId; - } + public ModuleIDUnion getModuleID() { return moduleID; } + @JsonProperty("moduleId") + public void setModuleID(ModuleIDUnion value) { this.moduleID = value; } /** - * A hint for how to present this frame in the UI. - * A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. - * + * The name of the stack frame, typically a method name. */ - @JsonProperty("presentationHint") - public PresentationHint getPresentationHint() { - return presentationHint; - } + @JsonProperty("name") + public String getName() { return name; } + @JsonProperty("name") + public void setName(String value) { this.name = value; } /** * A hint for how to present this frame in the UI. - * A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. - * + * A value of `label` can be used to indicate that the frame is an artificial frame that is + * used as a visual label or separator. A value of `subtle` can be used to change the + * appearance of a frame in a 'subtle' way. */ @JsonProperty("presentationHint") - public void setPresentationHint(PresentationHint presentationHint) { - this.presentationHint = presentationHint; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(StackFrame.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("id"); - sb.append('='); - sb.append(((this.id == null)?"":this.id)); - sb.append(','); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("source"); - sb.append('='); - sb.append(((this.source == null)?"":this.source)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("endLine"); - sb.append('='); - sb.append(((this.endLine == null)?"":this.endLine)); - sb.append(','); - sb.append("endColumn"); - sb.append('='); - sb.append(((this.endColumn == null)?"":this.endColumn)); - sb.append(','); - sb.append("canRestart"); - sb.append('='); - sb.append(((this.canRestart == null)?"":this.canRestart)); - sb.append(','); - sb.append("instructionPointerReference"); - sb.append('='); - sb.append(((this.instructionPointerReference == null)?"":this.instructionPointerReference)); - sb.append(','); - sb.append("moduleId"); - sb.append('='); - sb.append(((this.moduleId == null)?"":this.moduleId)); - sb.append(','); - sb.append("presentationHint"); - sb.append('='); - sb.append(((this.presentationHint == null)?"":this.presentationHint)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); - result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); - result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - result = ((result* 31)+((this.canRestart == null)? 0 :this.canRestart.hashCode())); - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); - result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.moduleId == null)? 0 :this.moduleId.hashCode())); - result = ((result* 31)+((this.instructionPointerReference == null)? 0 :this.instructionPointerReference.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof StackFrame) == false) { - return false; - } - StackFrame rhs = ((StackFrame) other); - return (((((((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.canRestart == rhs.canRestart)||((this.canRestart!= null)&&this.canRestart.equals(rhs.canRestart))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.moduleId == rhs.moduleId)||((this.moduleId!= null)&&this.moduleId.equals(rhs.moduleId))))&&((this.instructionPointerReference == rhs.instructionPointerReference)||((this.instructionPointerReference!= null)&&this.instructionPointerReference.equals(rhs.instructionPointerReference)))); - } - + public StackFramePresentationHint getPresentationHint() { return presentationHint; } + @JsonProperty("presentationHint") + public void setPresentationHint(StackFramePresentationHint value) { this.presentationHint = value; } /** - * A hint for how to present this frame in the UI. - * A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. - * + * The source of the frame. */ - @Generated("jsonschema2pojo") - public enum PresentationHint { - - NORMAL("normal"), - LABEL("label"), - SUBTLE("subtle"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (PresentationHint c: values()) { - CONSTANTS.put(c.value, c); - } - } - - PresentationHint(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static PresentationHint fromValue(String value) { - PresentationHint constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + @JsonProperty("source") + public Source getSource() { return source; } + @JsonProperty("source") + public void setSource(Source value) { this.source = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrameFormat.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrameFormat.java new file mode 100644 index 0000000..d8d63fa --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrameFormat.java @@ -0,0 +1,99 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Specifies details on how to format the stack frames. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + * + * Specifies details on how to format the result. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + * + * Provides formatting information for a value. + * + * Specifies how the resulting value should be formatted. + * + * Specifies details on how to format the response value. + * + * Specifies details on how to format the Variable values. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + * + * Provides formatting information for a stack frame. + */ +public class StackFrameFormat { + private Boolean hex; + private Boolean includeAll; + private Boolean line; + private Boolean module; + private Boolean parameterNames; + private Boolean parameters; + private Boolean parameterTypes; + private Boolean parameterValues; + + /** + * Display the value in hex. + */ + @JsonProperty("hex") + public Boolean getHex() { return hex; } + @JsonProperty("hex") + public void setHex(Boolean value) { this.hex = value; } + + /** + * Includes all stack frames, including those the debug adapter might otherwise hide. + */ + @JsonProperty("includeAll") + public Boolean getIncludeAll() { return includeAll; } + @JsonProperty("includeAll") + public void setIncludeAll(Boolean value) { this.includeAll = value; } + + /** + * Displays the line number of the stack frame. + */ + @JsonProperty("line") + public Boolean getLine() { return line; } + @JsonProperty("line") + public void setLine(Boolean value) { this.line = value; } + + /** + * Displays the module of the stack frame. + */ + @JsonProperty("module") + public Boolean getModule() { return module; } + @JsonProperty("module") + public void setModule(Boolean value) { this.module = value; } + + /** + * Displays the names of parameters for the stack frame. + */ + @JsonProperty("parameterNames") + public Boolean getParameterNames() { return parameterNames; } + @JsonProperty("parameterNames") + public void setParameterNames(Boolean value) { this.parameterNames = value; } + + /** + * Displays parameters for the stack frame. + */ + @JsonProperty("parameters") + public Boolean getParameters() { return parameters; } + @JsonProperty("parameters") + public void setParameters(Boolean value) { this.parameters = value; } + + /** + * Displays the types of parameters for the stack frame. + */ + @JsonProperty("parameterTypes") + public Boolean getParameterTypes() { return parameterTypes; } + @JsonProperty("parameterTypes") + public void setParameterTypes(Boolean value) { this.parameterTypes = value; } + + /** + * Displays the values of parameters for the stack frame. + */ + @JsonProperty("parameterValues") + public Boolean getParameterValues() { return parameterValues; } + @JsonProperty("parameterValues") + public void setParameterValues(Boolean value) { this.parameterValues = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFramePresentationHint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFramePresentationHint.java new file mode 100644 index 0000000..8e6cf25 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFramePresentationHint.java @@ -0,0 +1,32 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * A hint for how to present this frame in the UI. + * A value of `label` can be used to indicate that the frame is an artificial frame that is + * used as a visual label or separator. A value of `subtle` can be used to change the + * appearance of a frame in a 'subtle' way. + */ +public enum StackFramePresentationHint { + LABEL, NORMAL, SUBTLE; + + @JsonValue + public String toValue() { + switch (this) { + case LABEL: return "label"; + case NORMAL: return "normal"; + case SUBTLE: return "subtle"; + } + return null; + } + + @JsonCreator + public static StackFramePresentationHint forValue(String value) throws IOException { + if (value.equals("label")) return LABEL; + if (value.equals("normal")) return NORMAL; + if (value.equals("subtle")) return SUBTLE; + throw new IOException("Cannot deserialize StackFramePresentationHint"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArguments.java deleted file mode 100644 index 8335ddf..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArguments.java +++ /dev/null @@ -1,188 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `stackTrace` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId", - "startFrame", - "levels", - "format" -}) -@Generated("jsonschema2pojo") -public class StackTraceArguments { - - /** - * Retrieve the stacktrace for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Retrieve the stacktrace for this thread.") - private Integer threadId; - /** - * The index of the first frame to return; if omitted frames start at 0. - * - */ - @JsonProperty("startFrame") - @JsonPropertyDescription("The index of the first frame to return; if omitted frames start at 0.") - private Integer startFrame; - /** - * The maximum number of frames to return. If levels is not specified or 0, all frames are returned. - * - */ - @JsonProperty("levels") - @JsonPropertyDescription("The maximum number of frames to return. If levels is not specified or 0, all frames are returned.") - private Integer levels; - @JsonProperty("format") - private Object format; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Retrieve the stacktrace for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Retrieve the stacktrace for this thread. - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - /** - * The index of the first frame to return; if omitted frames start at 0. - * - */ - @JsonProperty("startFrame") - public Integer getStartFrame() { - return startFrame; - } - - /** - * The index of the first frame to return; if omitted frames start at 0. - * - */ - @JsonProperty("startFrame") - public void setStartFrame(Integer startFrame) { - this.startFrame = startFrame; - } - - /** - * The maximum number of frames to return. If levels is not specified or 0, all frames are returned. - * - */ - @JsonProperty("levels") - public Integer getLevels() { - return levels; - } - - /** - * The maximum number of frames to return. If levels is not specified or 0, all frames are returned. - * - */ - @JsonProperty("levels") - public void setLevels(Integer levels) { - this.levels = levels; - } - - @JsonProperty("format") - public Object getFormat() { - return format; - } - - @JsonProperty("format") - public void setFormat(Object format) { - this.format = format; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(StackTraceArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("startFrame"); - sb.append('='); - sb.append(((this.startFrame == null)?"":this.startFrame)); - sb.append(','); - sb.append("levels"); - sb.append('='); - sb.append(((this.levels == null)?"":this.levels)); - sb.append(','); - sb.append("format"); - sb.append('='); - sb.append(((this.format == null)?"":this.format)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); - result = ((result* 31)+((this.startFrame == null)? 0 :this.startFrame.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.levels == null)? 0 :this.levels.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof StackTraceArguments) == false) { - return false; - } - StackTraceArguments rhs = ((StackTraceArguments) other); - return ((((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.startFrame == rhs.startFrame)||((this.startFrame!= null)&&this.startFrame.equals(rhs.startFrame))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.levels == rhs.levels)||((this.levels!= null)&&this.levels.equals(rhs.levels)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArgumentsClass.java new file mode 100644 index 0000000..c9f657f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceArgumentsClass.java @@ -0,0 +1,48 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stackTrace` request. + */ +public class StackTraceArgumentsClass { + private StackFrameFormat format; + private Long levels; + private Long startFrame; + private long threadID; + + /** + * Specifies details on how to format the stack frames. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + */ + @JsonProperty("format") + public StackFrameFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(StackFrameFormat value) { this.format = value; } + + /** + * The maximum number of frames to return. If levels is not specified or 0, all frames are + * returned. + */ + @JsonProperty("levels") + public Long getLevels() { return levels; } + @JsonProperty("levels") + public void setLevels(Long value) { this.levels = value; } + + /** + * The index of the first frame to return; if omitted frames start at 0. + */ + @JsonProperty("startFrame") + public Long getStartFrame() { return startFrame; } + @JsonProperty("startFrame") + public void setStartFrame(Long value) { this.startFrame = value; } + + /** + * Retrieve the stacktrace for this thread. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestArguments.java new file mode 100644 index 0000000..5a7f4ea --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestArguments.java @@ -0,0 +1,48 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stackTrace` request. + */ +public class StackTraceRequestArguments { + private StackFrameFormat format; + private Long levels; + private Long startFrame; + private long threadID; + + /** + * Specifies details on how to format the stack frames. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + */ + @JsonProperty("format") + public StackFrameFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(StackFrameFormat value) { this.format = value; } + + /** + * The maximum number of frames to return. If levels is not specified or 0, all frames are + * returned. + */ + @JsonProperty("levels") + public Long getLevels() { return levels; } + @JsonProperty("levels") + public void setLevels(Long value) { this.levels = value; } + + /** + * The index of the first frame to return; if omitted frames start at 0. + */ + @JsonProperty("startFrame") + public Long getStartFrame() { return startFrame; } + @JsonProperty("startFrame") + public void setStartFrame(Long value) { this.startFrame = value; } + + /** + * Retrieve the stacktrace for this thread. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestClass.java new file mode 100644 index 0000000..88cccb9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestClass.java @@ -0,0 +1,64 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request returns a stacktrace from the current execution state of a given thread. + * A client can request all stack frames by omitting the startFrame and levels arguments. + * For performance-conscious clients and if the corresponding capability + * `supportsDelayedStackTraceLoading` is true, stack frames can be retrieved in a piecemeal + * way with the `startFrame` and `levels` arguments. The response of the `stackTrace` + * request may contain a `totalFrames` property that hints at the total number of frames in + * the stack. If a client needs this total number upfront, it can issue a request for a + * single (first) frame and depending on the value of `totalFrames` decide how to proceed. + * In any case a client should be prepared to receive fewer frames than requested, which is + * an indication that the end of the stack has been reached. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class StackTraceRequestClass implements DAPRequest { + private long seq; + private String type = "request"; + private StackTraceRequestArguments arguments; + private String command = "stackTrace"; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public String getType() { return type; } + @JsonProperty("type") + public void setType(String value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public StackTraceRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(StackTraceRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestCommand.java new file mode 100644 index 0000000..c8b1907 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum StackTraceRequestCommand { + STACK_TRACE; + + @JsonValue + public String toValue() { + switch (this) { + case STACK_TRACE: return "stackTrace"; + } + return null; + } + + @JsonCreator + public static StackTraceRequestCommand forValue(String value) throws IOException { + if (value.equals("stackTrace")) return STACK_TRACE; + throw new IOException("Cannot deserialize StackTraceRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseBody.java new file mode 100644 index 0000000..4714320 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseBody.java @@ -0,0 +1,30 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class StackTraceResponseBody { + private StackFrame[] stackFrames; + private Long totalFrames; + + /** + * The frames of the stack frame. If the array has length zero, there are no stack frames + * available. + * This means that there is no location information available. + */ + @JsonProperty("stackFrames") + public StackFrame[] getStackFrames() { return stackFrames; } + @JsonProperty("stackFrames") + public void setStackFrames(StackFrame[] value) { this.stackFrames = value; } + + /** + * The total number of frames available in the stack. If omitted or if `totalFrames` is + * larger than the available frames, a client is expected to request frames until a request + * returns less frames than requested (which indicates the end of the stack). Returning + * monotonically increasing `totalFrames` values for subsequent requests can be used to + * enforce paging in the client. + */ + @JsonProperty("totalFrames") + public Long getTotalFrames() { return totalFrames; } + @JsonProperty("totalFrames") + public void setTotalFrames(Long value) { this.totalFrames = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java new file mode 100644 index 0000000..44af159 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `stackTrace` request. + */ +public class StackTraceResponseClass { + private long seq; + private AttachResponseType type; + private StackTraceResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public StackTraceResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(StackTraceResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArguments.java index 24543e9..b448a40 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArguments.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArguments.java @@ -1,190 +1,32 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.HashMap; -import java.util.LinkedHashMap; +import com.fasterxml.jackson.annotation.*; import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Arguments for `startDebugging` request. - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "configuration", - "request" -}) -@Generated("jsonschema2pojo") public class StartDebuggingRequestArguments { + private Map configuration; + private RequestEnum request; /** - * Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). - * (Required) - * - */ - @JsonProperty("configuration") - @JsonPropertyDescription("Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables').") - private Configuration configuration; - /** - * Indicates whether the new debug session should be started with a `launch` or `attach` request. - * (Required) - * - */ - @JsonProperty("request") - @JsonPropertyDescription("Indicates whether the new debug session should be started with a `launch` or `attach` request.") - private Request request; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). - * (Required) - * + * Arguments passed to the new debug session. The arguments must only contain properties + * understood by the `launch` or `attach` requests of the debug adapter and they must not + * contain any client-specific properties (e.g. `type`) or client-specific features (e.g. + * substitutable 'variables'). */ @JsonProperty("configuration") - public Configuration getConfiguration() { - return configuration; - } - - /** - * Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). - * (Required) - * - */ + public Map getConfiguration() { return configuration; } @JsonProperty("configuration") - public void setConfiguration(Configuration configuration) { - this.configuration = configuration; - } + public void setConfiguration(Map value) { this.configuration = value; } /** - * Indicates whether the new debug session should be started with a `launch` or `attach` request. - * (Required) - * + * Indicates whether the new debug session should be started with a `launch` or `attach` + * request. */ @JsonProperty("request") - public Request getRequest() { - return request; - } - - /** - * Indicates whether the new debug session should be started with a `launch` or `attach` request. - * (Required) - * - */ + public RequestEnum getRequest() { return request; } @JsonProperty("request") - public void setRequest(Request request) { - this.request = request; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(StartDebuggingRequestArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("configuration"); - sb.append('='); - sb.append(((this.configuration == null)?"":this.configuration)); - sb.append(','); - sb.append("request"); - sb.append('='); - sb.append(((this.request == null)?"":this.request)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.configuration == null)? 0 :this.configuration.hashCode())); - result = ((result* 31)+((this.request == null)? 0 :this.request.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof StartDebuggingRequestArguments) == false) { - return false; - } - StartDebuggingRequestArguments rhs = ((StartDebuggingRequestArguments) other); - return ((((this.configuration == rhs.configuration)||((this.configuration!= null)&&this.configuration.equals(rhs.configuration)))&&((this.request == rhs.request)||((this.request!= null)&&this.request.equals(rhs.request))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - - - /** - * Indicates whether the new debug session should be started with a `launch` or `attach` request. - * - */ - @Generated("jsonschema2pojo") - public enum Request { - - LAUNCH("launch"), - ATTACH("attach"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (Request c: values()) { - CONSTANTS.put(c.value, c); - } - } - - Request(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static Request fromValue(String value) { - Request constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - + public void setRequest(RequestEnum value) { this.request = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArgumentsClass.java new file mode 100644 index 0000000..decf2a5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestArgumentsClass.java @@ -0,0 +1,32 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; +import java.util.Map; + +/** + * Arguments for `startDebugging` request. + */ +public class StartDebuggingRequestArgumentsClass { + private Map configuration; + private RequestEnum request; + + /** + * Arguments passed to the new debug session. The arguments must only contain properties + * understood by the `launch` or `attach` requests of the debug adapter and they must not + * contain any client-specific properties (e.g. `type`) or client-specific features (e.g. + * substitutable 'variables'). + */ + @JsonProperty("configuration") + public Map getConfiguration() { return configuration; } + @JsonProperty("configuration") + public void setConfiguration(Map value) { this.configuration = value; } + + /** + * Indicates whether the new debug session should be started with a `launch` or `attach` + * request. + */ + @JsonProperty("request") + public RequestEnum getRequest() { return request; } + @JsonProperty("request") + public void setRequest(RequestEnum value) { this.request = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestClass.java new file mode 100644 index 0000000..20f4ce0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestClass.java @@ -0,0 +1,61 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * This request is sent from the debug adapter to the client to start a new debug session of + * the same type as the caller. + * This request should only be sent if the corresponding client capability + * `supportsStartDebuggingRequest` is true. + * A client implementation of `startDebugging` should start a new debug session (of the same + * type as the caller) in the same way that the caller's session was started. If the client + * supports hierarchical debug sessions, the newly created session can be treated as a child + * of the caller session. + */ +public class StartDebuggingRequestClass { + private long seq; + private AttachRequestType type; + private StartDebuggingRequestArguments arguments; + private StartDebuggingRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public StartDebuggingRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(StartDebuggingRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public StartDebuggingRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(StartDebuggingRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestCommand.java new file mode 100644 index 0000000..226ced3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum StartDebuggingRequestCommand { + START_DEBUGGING; + + @JsonValue + public String toValue() { + switch (this) { + case START_DEBUGGING: return "startDebugging"; + } + return null; + } + + @JsonCreator + public static StartDebuggingRequestCommand forValue(String value) throws IOException { + if (value.equals("startDebugging")) return START_DEBUGGING; + throw new IOException("Cannot deserialize StartDebuggingRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingResponseClass.java new file mode 100644 index 0000000..949f904 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartDebuggingResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `startDebugging` request. This is just an acknowledgement, so no body field + * is required. + */ +public class StartDebuggingResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartMethod.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartMethod.java new file mode 100644 index 0000000..e254c8b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StartMethod.java @@ -0,0 +1,29 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * Describes how the debug engine started debugging this process. + */ +public enum StartMethod { + ATTACH, ATTACH_FOR_SUSPENDED_LAUNCH, LAUNCH; + + @JsonValue + public String toValue() { + switch (this) { + case ATTACH: return "attach"; + case ATTACH_FOR_SUSPENDED_LAUNCH: return "attachForSuspendedLaunch"; + case LAUNCH: return "launch"; + } + return null; + } + + @JsonCreator + public static StartMethod forValue(String value) throws IOException { + if (value.equals("attach")) return ATTACH; + if (value.equals("attachForSuspendedLaunch")) return ATTACH_FOR_SUSPENDED_LAUNCH; + if (value.equals("launch")) return LAUNCH; + throw new IOException("Cannot deserialize StartMethod"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArguments.java deleted file mode 100644 index ee241ee..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArguments.java +++ /dev/null @@ -1,170 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `stepBack` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId", - "singleThread", - "granularity" -}) -@Generated("jsonschema2pojo") -public class StepBackArguments { - - /** - * Specifies the thread for which to resume execution for one step backwards (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Specifies the thread for which to resume execution for one step backwards (of the given granularity).") - private Integer threadId; - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - @JsonPropertyDescription("If this flag is true, all other suspended threads are not resumed.") - private Boolean singleThread; - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") - private NextArguments.SteppingGranularity granularity; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Specifies the thread for which to resume execution for one step backwards (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Specifies the thread for which to resume execution for one step backwards (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - public Boolean getSingleThread() { - return singleThread; - } - - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - public void setSingleThread(Boolean singleThread) { - this.singleThread = singleThread; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - public NextArguments.SteppingGranularity getGranularity() { - return granularity; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - public void setGranularity(NextArguments.SteppingGranularity granularity) { - this.granularity = granularity; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(StepBackArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("singleThread"); - sb.append('='); - sb.append(((this.singleThread == null)?"":this.singleThread)); - sb.append(','); - sb.append("granularity"); - sb.append('='); - sb.append(((this.granularity == null)?"":this.granularity)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); - result = ((result* 31)+((this.granularity == null)? 0 :this.granularity.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof StepBackArguments) == false) { - return false; - } - StepBackArguments rhs = ((StepBackArguments) other); - return (((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.granularity == rhs.granularity)||((this.granularity!= null)&&this.granularity.equals(rhs.granularity)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArgumentsClass.java new file mode 100644 index 0000000..543a2ce --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackArgumentsClass.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stepBack` request. + */ +public class StepBackArgumentsClass { + private SteppingGranularity granularity; + private Boolean singleThread; + private long threadID; + + /** + * Stepping granularity to step. If no granularity is specified, a granularity of + * `statement` is assumed. + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { return granularity; } + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity value) { this.granularity = value; } + + /** + * If this flag is true, all other suspended threads are not resumed. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the thread for which to resume execution for one step backwards (of the given + * granularity). + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestArguments.java new file mode 100644 index 0000000..1d5a6dc --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestArguments.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stepBack` request. + */ +public class StepBackRequestArguments { + private SteppingGranularity granularity; + private Boolean singleThread; + private long threadID; + + /** + * Stepping granularity to step. If no granularity is specified, a granularity of + * `statement` is assumed. + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { return granularity; } + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity value) { this.granularity = value; } + + /** + * If this flag is true, all other suspended threads are not resumed. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the thread for which to resume execution for one step backwards (of the given + * granularity). + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestClass.java new file mode 100644 index 0000000..71078e7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestClass.java @@ -0,0 +1,62 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request executes one backward step (in the given granularity) for the specified + * thread and allows all other threads to run backward freely by resuming them. + * If the debug adapter supports single thread execution (see capability + * `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true + * prevents other suspended threads from resuming. + * The debug adapter first sends the response and then a `stopped` event (with reason + * `step`) after the step has completed. + * Clients should only call this request if the corresponding capability `supportsStepBack` + * is true. + */ +public class StepBackRequestClass { + private long seq; + private AttachRequestType type; + private StepBackRequestArguments arguments; + private StepBackRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public StepBackRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(StepBackRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public StepBackRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(StepBackRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestCommand.java new file mode 100644 index 0000000..a883062 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum StepBackRequestCommand { + STEP_BACK; + + @JsonValue + public String toValue() { + switch (this) { + case STEP_BACK: return "stepBack"; + } + return null; + } + + @JsonCreator + public static StepBackRequestCommand forValue(String value) throws IOException { + if (value.equals("stepBack")) return STEP_BACK; + throw new IOException("Cannot deserialize StepBackRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackResponseClass.java new file mode 100644 index 0000000..019c741 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepBackResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `stepBack` request. This is just an acknowledgement, so no body field is + * required. + */ +public class StepBackResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArguments.java deleted file mode 100644 index 38a9e06..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArguments.java +++ /dev/null @@ -1,201 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `stepIn` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId", - "singleThread", - "targetId", - "granularity" -}) -@Generated("jsonschema2pojo") -public class StepInArguments { - - /** - * Specifies the thread for which to resume execution for one step-into (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Specifies the thread for which to resume execution for one step-into (of the given granularity).") - private Integer threadId; - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - @JsonPropertyDescription("If this flag is true, all other suspended threads are not resumed.") - private Boolean singleThread; - /** - * Id of the target to step into. - * - */ - @JsonProperty("targetId") - @JsonPropertyDescription("Id of the target to step into.") - private Integer targetId; - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") - private NextArguments.SteppingGranularity granularity; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Specifies the thread for which to resume execution for one step-into (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Specifies the thread for which to resume execution for one step-into (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - public Boolean getSingleThread() { - return singleThread; - } - - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - public void setSingleThread(Boolean singleThread) { - this.singleThread = singleThread; - } - - /** - * Id of the target to step into. - * - */ - @JsonProperty("targetId") - public Integer getTargetId() { - return targetId; - } - - /** - * Id of the target to step into. - * - */ - @JsonProperty("targetId") - public void setTargetId(Integer targetId) { - this.targetId = targetId; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - public NextArguments.SteppingGranularity getGranularity() { - return granularity; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - public void setGranularity(NextArguments.SteppingGranularity granularity) { - this.granularity = granularity; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(StepInArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("singleThread"); - sb.append('='); - sb.append(((this.singleThread == null)?"":this.singleThread)); - sb.append(','); - sb.append("targetId"); - sb.append('='); - sb.append(((this.targetId == null)?"":this.targetId)); - sb.append(','); - sb.append("granularity"); - sb.append('='); - sb.append(((this.granularity == null)?"":this.granularity)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.targetId == null)? 0 :this.targetId.hashCode())); - result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); - result = ((result* 31)+((this.granularity == null)? 0 :this.granularity.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof StepInArguments) == false) { - return false; - } - StepInArguments rhs = ((StepInArguments) other); - return ((((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.targetId == rhs.targetId)||((this.targetId!= null)&&this.targetId.equals(rhs.targetId))))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.granularity == rhs.granularity)||((this.granularity!= null)&&this.granularity.equals(rhs.granularity)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArgumentsClass.java new file mode 100644 index 0000000..671ebd5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInArgumentsClass.java @@ -0,0 +1,47 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stepIn` request. + */ +public class StepInArgumentsClass { + private SteppingGranularity granularity; + private Boolean singleThread; + private Long targetID; + private long threadID; + + /** + * Stepping granularity. If no granularity is specified, a granularity of `statement` is + * assumed. + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { return granularity; } + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity value) { this.granularity = value; } + + /** + * If this flag is true, all other suspended threads are not resumed. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Id of the target to step into. + */ + @JsonProperty("targetId") + public Long getTargetID() { return targetID; } + @JsonProperty("targetId") + public void setTargetID(Long value) { this.targetID = value; } + + /** + * Specifies the thread for which to resume execution for one step-into (of the given + * granularity). + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestArguments.java new file mode 100644 index 0000000..f08ede8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestArguments.java @@ -0,0 +1,47 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stepIn` request. + */ +public class StepInRequestArguments { + private SteppingGranularity granularity; + private Boolean singleThread; + private Long targetID; + private long threadID; + + /** + * Stepping granularity. If no granularity is specified, a granularity of `statement` is + * assumed. + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { return granularity; } + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity value) { this.granularity = value; } + + /** + * If this flag is true, all other suspended threads are not resumed. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Id of the target to step into. + */ + @JsonProperty("targetId") + public Long getTargetID() { return targetID; } + @JsonProperty("targetId") + public void setTargetID(Long value) { this.targetID = value; } + + /** + * Specifies the thread for which to resume execution for one step-into (of the given + * granularity). + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestClass.java new file mode 100644 index 0000000..a756999 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestClass.java @@ -0,0 +1,66 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request resumes the given thread to step into a function/method and allows all other + * threads to run freely by resuming them. + * If the debug adapter supports single thread execution (see capability + * `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true + * prevents other suspended threads from resuming. + * If the request cannot step into a target, `stepIn` behaves like the `next` request. + * The debug adapter first sends the response and then a `stopped` event (with reason + * `step`) after the step has completed. + * If there are multiple function/method calls (or other targets) on the source line, + * the argument `targetId` can be used to control into which target the `stepIn` should + * occur. + * The list of possible targets for a given source line can be retrieved via the + * `stepInTargets` request. + */ +public class StepInRequestClass { + private long seq; + private AttachRequestType type; + private StepInRequestArguments arguments; + private StepInRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public StepInRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(StepInRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public StepInRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(StepInRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestCommand.java new file mode 100644 index 0000000..9c396e0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum StepInRequestCommand { + STEP_IN; + + @JsonValue + public String toValue() { + switch (this) { + case STEP_IN: return "stepIn"; + } + return null; + } + + @JsonCreator + public static StepInRequestCommand forValue(String value) throws IOException { + if (value.equals("stepIn")) return STEP_IN; + throw new IOException("Cannot deserialize StepInRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInResponseClass.java new file mode 100644 index 0000000..7676e11 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `stepIn` request. This is just an acknowledgement, so no body field is + * required. + */ +public class StepInResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTarget.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTarget.java index 2be90c7..2417144 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTarget.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTarget.java @@ -1,266 +1,66 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** - * A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. - * + * A `StepInTarget` can be used in the `stepIn` request and determines into which single + * target the `stepIn` request should step. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "label", - "line", - "column", - "endLine", - "endColumn" -}) -@Generated("jsonschema2pojo") public class StepInTarget { - - /** - * Unique identifier for a step-in target. - * (Required) - * - */ - @JsonProperty("id") - @JsonPropertyDescription("Unique identifier for a step-in target.") - private Integer id; - /** - * The name of the step-in target (shown in the UI). - * (Required) - * - */ - @JsonProperty("label") - @JsonPropertyDescription("The name of the step-in target (shown in the UI).") + private Long column; + private Long endColumn; + private Long endLine; + private long id; private String label; + private Long line; + /** - * The line of the step-in target. - * - */ - @JsonProperty("line") - @JsonPropertyDescription("The line of the step-in target.") - private Integer line; - /** - * Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * Start position of the range covered by the step in target. It is measured in UTF-16 code + * units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */ @JsonProperty("column") - @JsonPropertyDescription("Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer column; - /** - * The end line of the range covered by the step-in target. - * - */ - @JsonProperty("endLine") - @JsonPropertyDescription("The end line of the range covered by the step-in target.") - private Integer endLine; + public Long getColumn() { return column; } + @JsonProperty("column") + public void setColumn(Long value) { this.column = value; } + /** - * End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * + * End position of the range covered by the step in target. It is measured in UTF-16 code + * units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */ @JsonProperty("endColumn") - @JsonPropertyDescription("End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.") - private Integer endColumn; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public Long getEndColumn() { return endColumn; } + @JsonProperty("endColumn") + public void setEndColumn(Long value) { this.endColumn = value; } /** - * Unique identifier for a step-in target. - * (Required) - * + * The end line of the range covered by the step-in target. */ - @JsonProperty("id") - public Integer getId() { - return id; - } + @JsonProperty("endLine") + public Long getEndLine() { return endLine; } + @JsonProperty("endLine") + public void setEndLine(Long value) { this.endLine = value; } /** * Unique identifier for a step-in target. - * (Required) - * */ @JsonProperty("id") - public void setId(Integer id) { - this.id = id; - } + public long getID() { return id; } + @JsonProperty("id") + public void setID(long value) { this.id = value; } /** * The name of the step-in target (shown in the UI). - * (Required) - * */ @JsonProperty("label") - public String getLabel() { - return label; - } - - /** - * The name of the step-in target (shown in the UI). - * (Required) - * - */ + public String getLabel() { return label; } @JsonProperty("label") - public void setLabel(String label) { - this.label = label; - } + public void setLabel(String value) { this.label = value; } /** * The line of the step-in target. - * */ @JsonProperty("line") - public Integer getLine() { - return line; - } - - /** - * The line of the step-in target. - * - */ + public Long getLine() { return line; } @JsonProperty("line") - public void setLine(Integer line) { - this.line = line; - } - - /** - * Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - public Integer getColumn() { - return column; - } - - /** - * Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("column") - public void setColumn(Integer column) { - this.column = column; - } - - /** - * The end line of the range covered by the step-in target. - * - */ - @JsonProperty("endLine") - public Integer getEndLine() { - return endLine; - } - - /** - * The end line of the range covered by the step-in target. - * - */ - @JsonProperty("endLine") - public void setEndLine(Integer endLine) { - this.endLine = endLine; - } - - /** - * End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("endColumn") - public Integer getEndColumn() { - return endColumn; - } - - /** - * End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. - * - */ - @JsonProperty("endColumn") - public void setEndColumn(Integer endColumn) { - this.endColumn = endColumn; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(StepInTarget.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("id"); - sb.append('='); - sb.append(((this.id == null)?"":this.id)); - sb.append(','); - sb.append("label"); - sb.append('='); - sb.append(((this.label == null)?"":this.label)); - sb.append(','); - sb.append("line"); - sb.append('='); - sb.append(((this.line == null)?"":this.line)); - sb.append(','); - sb.append("column"); - sb.append('='); - sb.append(((this.column == null)?"":this.column)); - sb.append(','); - sb.append("endLine"); - sb.append('='); - sb.append(((this.endLine == null)?"":this.endLine)); - sb.append(','); - sb.append("endColumn"); - sb.append('='); - sb.append(((this.endColumn == null)?"":this.endColumn)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.endLine == null)? 0 :this.endLine.hashCode())); - result = ((result* 31)+((this.endColumn == null)? 0 :this.endColumn.hashCode())); - result = ((result* 31)+((this.line == null)? 0 :this.line.hashCode())); - result = ((result* 31)+((this.column == null)? 0 :this.column.hashCode())); - result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); - result = ((result* 31)+((this.label == null)? 0 :this.label.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof StepInTarget) == false) { - return false; - } - StepInTarget rhs = ((StepInTarget) other); - return ((((((((this.endLine == rhs.endLine)||((this.endLine!= null)&&this.endLine.equals(rhs.endLine)))&&((this.endColumn == rhs.endColumn)||((this.endColumn!= null)&&this.endColumn.equals(rhs.endColumn))))&&((this.line == rhs.line)||((this.line!= null)&&this.line.equals(rhs.line))))&&((this.column == rhs.column)||((this.column!= null)&&this.column.equals(rhs.column))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.label == rhs.label)||((this.label!= null)&&this.label.equals(rhs.label))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + public void setLine(Long value) { this.line = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArguments.java deleted file mode 100644 index 9d7fa9b..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArguments.java +++ /dev/null @@ -1,108 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `stepInTargets` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "frameId" -}) -@Generated("jsonschema2pojo") -public class StepInTargetsArguments { - - /** - * The stack frame for which to retrieve the possible step-in targets. - * (Required) - * - */ - @JsonProperty("frameId") - @JsonPropertyDescription("The stack frame for which to retrieve the possible step-in targets.") - private Integer frameId; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The stack frame for which to retrieve the possible step-in targets. - * (Required) - * - */ - @JsonProperty("frameId") - public Integer getFrameId() { - return frameId; - } - - /** - * The stack frame for which to retrieve the possible step-in targets. - * (Required) - * - */ - @JsonProperty("frameId") - public void setFrameId(Integer frameId) { - this.frameId = frameId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(StepInTargetsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("frameId"); - sb.append('='); - sb.append(((this.frameId == null)?"":this.frameId)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.frameId == null)? 0 :this.frameId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof StepInTargetsArguments) == false) { - return false; - } - StepInTargetsArguments rhs = ((StepInTargetsArguments) other); - return (((this.frameId == rhs.frameId)||((this.frameId!= null)&&this.frameId.equals(rhs.frameId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArgumentsClass.java new file mode 100644 index 0000000..eb20d83 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsArgumentsClass.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stepInTargets` request. + */ +public class StepInTargetsArgumentsClass { + private long frameID; + + /** + * The stack frame for which to retrieve the possible step-in targets. + */ + @JsonProperty("frameId") + public long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(long value) { this.frameID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestArguments.java new file mode 100644 index 0000000..2b9ee48 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestArguments.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stepInTargets` request. + */ +public class StepInTargetsRequestArguments { + private long frameID; + + /** + * The stack frame for which to retrieve the possible step-in targets. + */ + @JsonProperty("frameId") + public long getFrameID() { return frameID; } + @JsonProperty("frameId") + public void setFrameID(long value) { this.frameID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestClass.java new file mode 100644 index 0000000..1e25017 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestClass.java @@ -0,0 +1,57 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * This request retrieves the possible step-in targets for the specified stack frame. + * These targets can be used in the `stepIn` request. + * Clients should only call this request if the corresponding capability + * `supportsStepInTargetsRequest` is true. + */ +public class StepInTargetsRequestClass { + private long seq; + private AttachRequestType type; + private StepInTargetsRequestArguments arguments; + private StepInTargetsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public StepInTargetsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(StepInTargetsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public StepInTargetsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(StepInTargetsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestCommand.java new file mode 100644 index 0000000..17eea86 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum StepInTargetsRequestCommand { + STEP_IN_TARGETS; + + @JsonValue + public String toValue() { + switch (this) { + case STEP_IN_TARGETS: return "stepInTargets"; + } + return null; + } + + @JsonCreator + public static StepInTargetsRequestCommand forValue(String value) throws IOException { + if (value.equals("stepInTargets")) return STEP_IN_TARGETS; + throw new IOException("Cannot deserialize StepInTargetsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsResponseBody.java new file mode 100644 index 0000000..b2ef1ff --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class StepInTargetsResponseBody { + private StepInTarget[] targets; + + /** + * The possible step-in targets of the specified source location. + */ + @JsonProperty("targets") + public StepInTarget[] getTargets() { return targets; } + @JsonProperty("targets") + public void setTargets(StepInTarget[] value) { this.targets = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsResponseClass.java new file mode 100644 index 0000000..4809b53 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepInTargetsResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `stepInTargets` request. + */ +public class StepInTargetsResponseClass { + private long seq; + private AttachResponseType type; + private StepInTargetsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public StepInTargetsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(StepInTargetsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArguments.java deleted file mode 100644 index b2d9277..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArguments.java +++ /dev/null @@ -1,170 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `stepOut` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadId", - "singleThread", - "granularity" -}) -@Generated("jsonschema2pojo") -public class StepOutArguments { - - /** - * Specifies the thread for which to resume execution for one step-out (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - @JsonPropertyDescription("Specifies the thread for which to resume execution for one step-out (of the given granularity).") - private Integer threadId; - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - @JsonPropertyDescription("If this flag is true, all other suspended threads are not resumed.") - private Boolean singleThread; - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - @JsonPropertyDescription("The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.") - private NextArguments.SteppingGranularity granularity; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Specifies the thread for which to resume execution for one step-out (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - public Integer getThreadId() { - return threadId; - } - - /** - * Specifies the thread for which to resume execution for one step-out (of the given granularity). - * (Required) - * - */ - @JsonProperty("threadId") - public void setThreadId(Integer threadId) { - this.threadId = threadId; - } - - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - public Boolean getSingleThread() { - return singleThread; - } - - /** - * If this flag is true, all other suspended threads are not resumed. - * - */ - @JsonProperty("singleThread") - public void setSingleThread(Boolean singleThread) { - this.singleThread = singleThread; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - public NextArguments.SteppingGranularity getGranularity() { - return granularity; - } - - /** - * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. - * - */ - @JsonProperty("granularity") - public void setGranularity(NextArguments.SteppingGranularity granularity) { - this.granularity = granularity; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(StepOutArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadId"); - sb.append('='); - sb.append(((this.threadId == null)?"":this.threadId)); - sb.append(','); - sb.append("singleThread"); - sb.append('='); - sb.append(((this.singleThread == null)?"":this.singleThread)); - sb.append(','); - sb.append("granularity"); - sb.append('='); - sb.append(((this.granularity == null)?"":this.granularity)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadId == null)? 0 :this.threadId.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.singleThread == null)? 0 :this.singleThread.hashCode())); - result = ((result* 31)+((this.granularity == null)? 0 :this.granularity.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof StepOutArguments) == false) { - return false; - } - StepOutArguments rhs = ((StepOutArguments) other); - return (((((this.threadId == rhs.threadId)||((this.threadId!= null)&&this.threadId.equals(rhs.threadId)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.singleThread == rhs.singleThread)||((this.singleThread!= null)&&this.singleThread.equals(rhs.singleThread))))&&((this.granularity == rhs.granularity)||((this.granularity!= null)&&this.granularity.equals(rhs.granularity)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArgumentsClass.java new file mode 100644 index 0000000..36cb836 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutArgumentsClass.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stepOut` request. + */ +public class StepOutArgumentsClass { + private SteppingGranularity granularity; + private Boolean singleThread; + private long threadID; + + /** + * Stepping granularity. If no granularity is specified, a granularity of `statement` is + * assumed. + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { return granularity; } + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity value) { this.granularity = value; } + + /** + * If this flag is true, all other suspended threads are not resumed. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the thread for which to resume execution for one step-out (of the given + * granularity). + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestArguments.java new file mode 100644 index 0000000..436ed3d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestArguments.java @@ -0,0 +1,38 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `stepOut` request. + */ +public class StepOutRequestArguments { + private SteppingGranularity granularity; + private Boolean singleThread; + private long threadID; + + /** + * Stepping granularity. If no granularity is specified, a granularity of `statement` is + * assumed. + */ + @JsonProperty("granularity") + public SteppingGranularity getGranularity() { return granularity; } + @JsonProperty("granularity") + public void setGranularity(SteppingGranularity value) { this.granularity = value; } + + /** + * If this flag is true, all other suspended threads are not resumed. + */ + @JsonProperty("singleThread") + public Boolean getSingleThread() { return singleThread; } + @JsonProperty("singleThread") + public void setSingleThread(Boolean value) { this.singleThread = value; } + + /** + * Specifies the thread for which to resume execution for one step-out (of the given + * granularity). + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestClass.java new file mode 100644 index 0000000..22f3def --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestClass.java @@ -0,0 +1,60 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request resumes the given thread to step out (return) from a function/method and + * allows all other threads to run freely by resuming them. + * If the debug adapter supports single thread execution (see capability + * `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true + * prevents other suspended threads from resuming. + * The debug adapter first sends the response and then a `stopped` event (with reason + * `step`) after the step has completed. + */ +public class StepOutRequestClass { + private long seq; + private AttachRequestType type; + private StepOutRequestArguments arguments; + private StepOutRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public StepOutRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(StepOutRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public StepOutRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(StepOutRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestCommand.java new file mode 100644 index 0000000..60f3058 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum StepOutRequestCommand { + STEP_OUT; + + @JsonValue + public String toValue() { + switch (this) { + case STEP_OUT: return "stepOut"; + } + return null; + } + + @JsonCreator + public static StepOutRequestCommand forValue(String value) throws IOException { + if (value.equals("stepOut")) return STEP_OUT; + throw new IOException("Cannot deserialize StepOutRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutResponseClass.java new file mode 100644 index 0000000..85d66c8 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StepOutResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `stepOut` request. This is just an acknowledgement, so no body field is + * required. + */ +public class StepOutResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SteppingGranularity.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SteppingGranularity.java new file mode 100644 index 0000000..794095f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SteppingGranularity.java @@ -0,0 +1,36 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * Stepping granularity. If no granularity is specified, a granularity of `statement` is + * assumed. + * + * The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and + * `stepBack`. + * + * Stepping granularity to step. If no granularity is specified, a granularity of + * `statement` is assumed. + */ +public enum SteppingGranularity { + INSTRUCTION, LINE, STATEMENT; + + @JsonValue + public String toValue() { + switch (this) { + case INSTRUCTION: return "instruction"; + case LINE: return "line"; + case STATEMENT: return "statement"; + } + return null; + } + + @JsonCreator + public static SteppingGranularity forValue(String value) throws IOException { + if (value.equals("instruction")) return INSTRUCTION; + if (value.equals("line")) return LINE; + if (value.equals("statement")) return STATEMENT; + throw new IOException("Cannot deserialize SteppingGranularity"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventBody.java new file mode 100644 index 0000000..69eb40e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventBody.java @@ -0,0 +1,83 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class StoppedEventBody { + private Boolean allThreadsStopped; + private String description; + private long[] hitBreakpointIDS; + private Boolean preserveFocusHint; + private String reason; + private String text; + private Long threadID; + + /** + * If `allThreadsStopped` is true, a debug adapter can announce that all threads have + * stopped. + * - The client should use this information to enable that all threads can be expanded to + * access their stacktraces. + * - If the attribute is missing or false, only the thread with the given `threadId` can be + * expanded. + */ + @JsonProperty("allThreadsStopped") + public Boolean getAllThreadsStopped() { return allThreadsStopped; } + @JsonProperty("allThreadsStopped") + public void setAllThreadsStopped(Boolean value) { this.allThreadsStopped = value; } + + /** + * The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI + * as is and can be translated. + */ + @JsonProperty("description") + public String getDescription() { return description; } + @JsonProperty("description") + public void setDescription(String value) { this.description = value; } + + /** + * Ids of the breakpoints that triggered the event. In most cases there is only a single + * breakpoint but here are some examples for multiple breakpoints: + * - Different types of breakpoints map to the same location. + * - Multiple source breakpoints get collapsed to the same instruction by the + * compiler/runtime. + * - Multiple function breakpoints with different function names map to the same location. + */ + @JsonProperty("hitBreakpointIds") + public long[] getHitBreakpointIDS() { return hitBreakpointIDS; } + @JsonProperty("hitBreakpointIds") + public void setHitBreakpointIDS(long[] value) { this.hitBreakpointIDS = value; } + + /** + * A value of true hints to the client that this event should not change the focus. + */ + @JsonProperty("preserveFocusHint") + public Boolean getPreserveFocusHint() { return preserveFocusHint; } + @JsonProperty("preserveFocusHint") + public void setPreserveFocusHint(Boolean value) { this.preserveFocusHint = value; } + + /** + * The reason for the event. + * For backward compatibility this string is shown in the UI if the `description` attribute + * is missing (but it must not be translated). + */ + @JsonProperty("reason") + public String getReason() { return reason; } + @JsonProperty("reason") + public void setReason(String value) { this.reason = value; } + + /** + * Additional information. E.g. if reason is `exception`, text contains the exception name. + * This string is shown in the UI. + */ + @JsonProperty("text") + public String getText() { return text; } + @JsonProperty("text") + public void setText(String value) { this.text = value; } + + /** + * The thread which was stopped. + */ + @JsonProperty("threadId") + public Long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(Long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java new file mode 100644 index 0000000..7d069a9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java @@ -0,0 +1,56 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that the execution of the debuggee has stopped due to some condition. + * This can be caused by a breakpoint previously set, a stepping request has completed, by + * executing a debugger statement etc. + */ +public class StoppedEventClass implements DAPEvent { + private long seq; + private BreakpointEventType type; + private StoppedEventBody body; + private StoppedEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public StoppedEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(StoppedEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public StoppedEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(StoppedEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventEvent.java new file mode 100644 index 0000000..ea1f7d1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum StoppedEventEvent { + STOPPED; + + @JsonValue + public String toValue() { + switch (this) { + case STOPPED: return "stopped"; + } + return null; + } + + @JsonCreator + public static StoppedEventEvent forValue(String value) throws IOException { + if (value.equals("stopped")) return STOPPED; + throw new IOException("Cannot deserialize StoppedEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArguments.java deleted file mode 100644 index fd0f804..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArguments.java +++ /dev/null @@ -1,105 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `terminate` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "restart" -}) -@Generated("jsonschema2pojo") -public class TerminateArguments { - - /** - * A value of true indicates that this `terminate` request is part of a restart sequence. - * - */ - @JsonProperty("restart") - @JsonPropertyDescription("A value of true indicates that this `terminate` request is part of a restart sequence.") - private Boolean restart; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * A value of true indicates that this `terminate` request is part of a restart sequence. - * - */ - @JsonProperty("restart") - public Boolean getRestart() { - return restart; - } - - /** - * A value of true indicates that this `terminate` request is part of a restart sequence. - * - */ - @JsonProperty("restart") - public void setRestart(Boolean restart) { - this.restart = restart; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(TerminateArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("restart"); - sb.append('='); - sb.append(((this.restart == null)?"":this.restart)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.restart == null)? 0 :this.restart.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof TerminateArguments) == false) { - return false; - } - TerminateArguments rhs = ((TerminateArguments) other); - return (((this.restart == rhs.restart)||((this.restart!= null)&&this.restart.equals(rhs.restart)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArgumentsClass.java new file mode 100644 index 0000000..136b788 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateArgumentsClass.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `terminate` request. + */ +public class TerminateArgumentsClass { + private Boolean restart; + + /** + * A value of true indicates that this `terminate` request is part of a restart sequence. + */ + @JsonProperty("restart") + public Boolean getRestart() { return restart; } + @JsonProperty("restart") + public void setRestart(Boolean value) { this.restart = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestArguments.java new file mode 100644 index 0000000..0210adf --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestArguments.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `terminate` request. + */ +public class TerminateRequestArguments { + private Boolean restart; + + /** + * A value of true indicates that this `terminate` request is part of a restart sequence. + */ + @JsonProperty("restart") + public Boolean getRestart() { return restart; } + @JsonProperty("restart") + public void setRestart(Boolean value) { this.restart = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestClass.java new file mode 100644 index 0000000..efcaa4a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestClass.java @@ -0,0 +1,64 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The `terminate` request is sent from the client to the debug adapter in order to shut + * down the debuggee gracefully. Clients should only call this request if the capability + * `supportsTerminateRequest` is true. + * Typically a debug adapter implements `terminate` by sending a software signal which the + * debuggee intercepts in order to clean things up properly before terminating itself. + * Please note that this request does not directly affect the state of the debug session: if + * the debuggee decides to veto the graceful shutdown for any reason by not terminating + * itself, then the debug session just continues. + * Clients can surface the `terminate` request as an explicit command or they can integrate + * it into a two stage Stop command that first sends `terminate` to request a graceful + * shutdown, and if that fails uses `disconnect` for a forceful shutdown. + */ +public class TerminateRequestClass { + private long seq; + private AttachRequestType type; + private TerminateRequestArguments arguments; + private TerminateRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public TerminateRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(TerminateRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public TerminateRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(TerminateRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestCommand.java new file mode 100644 index 0000000..49f83c9 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum TerminateRequestCommand { + TERMINATE; + + @JsonValue + public String toValue() { + switch (this) { + case TERMINATE: return "terminate"; + } + return null; + } + + @JsonCreator + public static TerminateRequestCommand forValue(String value) throws IOException { + if (value.equals("terminate")) return TERMINATE; + throw new IOException("Cannot deserialize TerminateRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateResponseClass.java new file mode 100644 index 0000000..5e3535e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `terminate` request. This is just an acknowledgement, so no body field is + * required. + */ +public class TerminateResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArguments.java deleted file mode 100644 index 58605b8..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArguments.java +++ /dev/null @@ -1,107 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `terminateThreads` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "threadIds" -}) -@Generated("jsonschema2pojo") -public class TerminateThreadsArguments { - - /** - * Ids of threads to be terminated. - * - */ - @JsonProperty("threadIds") - @JsonPropertyDescription("Ids of threads to be terminated.") - private List threadIds = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Ids of threads to be terminated. - * - */ - @JsonProperty("threadIds") - public List getThreadIds() { - return threadIds; - } - - /** - * Ids of threads to be terminated. - * - */ - @JsonProperty("threadIds") - public void setThreadIds(List threadIds) { - this.threadIds = threadIds; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(TerminateThreadsArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("threadIds"); - sb.append('='); - sb.append(((this.threadIds == null)?"":this.threadIds)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.threadIds == null)? 0 :this.threadIds.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof TerminateThreadsArguments) == false) { - return false; - } - TerminateThreadsArguments rhs = ((TerminateThreadsArguments) other); - return (((this.threadIds == rhs.threadIds)||((this.threadIds!= null)&&this.threadIds.equals(rhs.threadIds)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArgumentsClass.java new file mode 100644 index 0000000..2d8370c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsArgumentsClass.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `terminateThreads` request. + */ +public class TerminateThreadsArgumentsClass { + private long[] threadIDS; + + /** + * Ids of threads to be terminated. + */ + @JsonProperty("threadIds") + public long[] getThreadIDS() { return threadIDS; } + @JsonProperty("threadIds") + public void setThreadIDS(long[] value) { this.threadIDS = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestArguments.java new file mode 100644 index 0000000..c8f6375 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestArguments.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `terminateThreads` request. + */ +public class TerminateThreadsRequestArguments { + private long[] threadIDS; + + /** + * Ids of threads to be terminated. + */ + @JsonProperty("threadIds") + public long[] getThreadIDS() { return threadIDS; } + @JsonProperty("threadIds") + public void setThreadIDS(long[] value) { this.threadIDS = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestClass.java new file mode 100644 index 0000000..7efa65b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestClass.java @@ -0,0 +1,56 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request terminates the threads with the given ids. + * Clients should only call this request if the corresponding capability + * `supportsTerminateThreadsRequest` is true. + */ +public class TerminateThreadsRequestClass { + private long seq; + private AttachRequestType type; + private TerminateThreadsRequestArguments arguments; + private TerminateThreadsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public TerminateThreadsRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(TerminateThreadsRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public TerminateThreadsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(TerminateThreadsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestCommand.java new file mode 100644 index 0000000..77c06f3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum TerminateThreadsRequestCommand { + TERMINATE_THREADS; + + @JsonValue + public String toValue() { + switch (this) { + case TERMINATE_THREADS: return "terminateThreads"; + } + return null; + } + + @JsonCreator + public static TerminateThreadsRequestCommand forValue(String value) throws IOException { + if (value.equals("terminateThreads")) return TERMINATE_THREADS; + throw new IOException("Cannot deserialize TerminateThreadsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsResponseClass.java new file mode 100644 index 0000000..9a5461a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminateThreadsResponseClass.java @@ -0,0 +1,88 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `terminateThreads` request. This is just an acknowledgement, no body field is + * required. + */ +public class TerminateThreadsResponseClass { + private long seq; + private AttachResponseType type; + private Restart body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public Restart getBody() { return body; } + @JsonProperty("body") + public void setBody(Restart value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventBody.java new file mode 100644 index 0000000..d0b968e --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventBody.java @@ -0,0 +1,18 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class TerminatedEventBody { + private Restart restart; + + /** + * A debug adapter may set `restart` to true (or to an arbitrary object) to request that the + * client restarts the session. + * The value is not interpreted by the client and passed unmodified as an attribute + * `__restart` to the `launch` and `attach` requests. + */ + @JsonProperty("restart") + public Restart getRestart() { return restart; } + @JsonProperty("restart") + public void setRestart(Restart value) { this.restart = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java new file mode 100644 index 0000000..3c370d7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java @@ -0,0 +1,55 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that debugging of the debuggee has terminated. This does **not** mean + * that the debuggee itself has exited. + */ +public class TerminatedEventClass { + private long seq; + private BreakpointEventType type; + private TerminatedEventBody body; + private TerminatedEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public TerminatedEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(TerminatedEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public TerminatedEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(TerminatedEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventEvent.java new file mode 100644 index 0000000..418c062 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum TerminatedEventEvent { + TERMINATED; + + @JsonValue + public String toValue() { + switch (this) { + case TERMINATED: return "terminated"; + } + return null; + } + + @JsonCreator + public static TerminatedEventEvent forValue(String value) throws IOException { + if (value.equals("terminated")) return TERMINATED; + throw new IOException("Cannot deserialize TerminatedEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Thread.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Thread.java index 36d2a33..af3fbff 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Thread.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Thread.java @@ -1,142 +1,27 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * A Thread - * */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "name" -}) -@Generated("jsonschema2pojo") public class Thread { - - /** - * Unique identifier for the thread. - * (Required) - * - */ - @JsonProperty("id") - @JsonPropertyDescription("Unique identifier for the thread.") - private Integer id; - /** - * The name of the thread. - * (Required) - * - */ - @JsonProperty("name") - @JsonPropertyDescription("The name of the thread.") + private long id; private String name; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); /** * Unique identifier for the thread. - * (Required) - * */ @JsonProperty("id") - public Integer getId() { - return id; - } - - /** - * Unique identifier for the thread. - * (Required) - * - */ + public long getID() { return id; } @JsonProperty("id") - public void setId(Integer id) { - this.id = id; - } + public void setID(long value) { this.id = value; } /** * The name of the thread. - * (Required) - * */ @JsonProperty("name") - public String getName() { - return name; - } - - /** - * The name of the thread. - * (Required) - * - */ + public String getName() { return name; } @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Thread.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("id"); - sb.append('='); - sb.append(((this.id == null)?"":this.id)); - sb.append(','); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Thread) == false) { - return false; - } - Thread rhs = ((Thread) other); - return ((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + public void setName(String value) { this.name = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventBody.java new file mode 100644 index 0000000..8e37c36 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventBody.java @@ -0,0 +1,24 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ThreadEventBody { + private String reason; + private long threadID; + + /** + * The reason for the event. + */ + @JsonProperty("reason") + public String getReason() { return reason; } + @JsonProperty("reason") + public void setReason(String value) { this.reason = value; } + + /** + * The identifier of the thread. + */ + @JsonProperty("threadId") + public long getThreadID() { return threadID; } + @JsonProperty("threadId") + public void setThreadID(long value) { this.threadID = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventClass.java new file mode 100644 index 0000000..354bb10 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventClass.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A debug adapter initiated event. + * + * The event indicates that a thread has started or exited. + */ +public class ThreadEventClass { + private long seq; + private BreakpointEventType type; + private ThreadEventBody body; + private ThreadEventEvent event; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public BreakpointEventType getType() { return type; } + @JsonProperty("type") + public void setType(BreakpointEventType value) { this.type = value; } + + /** + * Event-specific information. + */ + @JsonProperty("body") + public ThreadEventBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ThreadEventBody value) { this.body = value; } + + /** + * Type of event. + */ + @JsonProperty("event") + public ThreadEventEvent getEvent() { return event; } + @JsonProperty("event") + public void setEvent(ThreadEventEvent value) { this.event = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventEvent.java new file mode 100644 index 0000000..1e27b9b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadEventEvent.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ThreadEventEvent { + THREAD; + + @JsonValue + public String toValue() { + switch (this) { + case THREAD: return "thread"; + } + return null; + } + + @JsonCreator + public static ThreadEventEvent forValue(String value) throws IOException { + if (value.equals("thread")) return THREAD; + throw new IOException("Cannot deserialize ThreadEventEvent"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java new file mode 100644 index 0000000..f907216 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java @@ -0,0 +1,54 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * The request retrieves a list of all threads. + */ +public class ThreadsRequestClass { + private long seq; + private AttachRequestType type; + private Restart arguments; + private ThreadsRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public Restart getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(Restart value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public ThreadsRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(ThreadsRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestCommand.java new file mode 100644 index 0000000..6a573b0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum ThreadsRequestCommand { + THREADS; + + @JsonValue + public String toValue() { + switch (this) { + case THREADS: return "threads"; + } + return null; + } + + @JsonCreator + public static ThreadsRequestCommand forValue(String value) throws IOException { + if (value.equals("threads")) return THREADS; + throw new IOException("Cannot deserialize ThreadsRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseBody.java new file mode 100644 index 0000000..7811cc3 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class ThreadsResponseBody { + private Thread[] threads; + + /** + * All threads. + */ + @JsonProperty("threads") + public Thread[] getThreads() { return threads; } + @JsonProperty("threads") + public void setThreads(Thread[] value) { this.threads = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java new file mode 100644 index 0000000..f22480b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `threads` request. + */ +public class ThreadsResponseClass { + private long seq; + private AttachResponseType type; + private ThreadsResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public ThreadsResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(ThreadsResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Type.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Type.java new file mode 100644 index 0000000..a4d44a0 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Type.java @@ -0,0 +1,31 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * Datatype of values in this column. Defaults to `string` if not specified. + */ +public enum Type { + BOOLEAN, NUMBER, STRING, UNIX_TIMESTAMP_UTC; + + @JsonValue + public String toValue() { + switch (this) { + case BOOLEAN: return "boolean"; + case NUMBER: return "number"; + case STRING: return "string"; + case UNIX_TIMESTAMP_UTC: return "unixTimestampUTC"; + } + return null; + } + + @JsonCreator + public static Type forValue(String value) throws IOException { + if (value.equals("boolean")) return BOOLEAN; + if (value.equals("number")) return NUMBER; + if (value.equals("string")) return STRING; + if (value.equals("unixTimestampUTC")) return UNIX_TIMESTAMP_UTC; + throw new IOException("Cannot deserialize Type"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ValueFormat.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ValueFormat.java index 489adb2..9787409 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ValueFormat.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ValueFormat.java @@ -1,105 +1,30 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** + * Specifies details on how to format the result. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + * * Provides formatting information for a value. - * + * + * Specifies how the resulting value should be formatted. + * + * Specifies details on how to format the response value. + * + * Specifies details on how to format the Variable values. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "hex" -}) -@Generated("jsonschema2pojo") public class ValueFormat { - - /** - * Display the value in hex. - * - */ - @JsonProperty("hex") - @JsonPropertyDescription("Display the value in hex.") private Boolean hex; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); /** * Display the value in hex. - * */ @JsonProperty("hex") - public Boolean getHex() { - return hex; - } - - /** - * Display the value in hex. - * - */ + public Boolean getHex() { return hex; } @JsonProperty("hex") - public void setHex(Boolean hex) { - this.hex = hex; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ValueFormat.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("hex"); - sb.append('='); - sb.append(((this.hex == null)?"":this.hex)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.hex == null)? 0 :this.hex.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof ValueFormat) == false) { - return false; - } - ValueFormat rhs = ((ValueFormat) other); - return (((this.hex == rhs.hex)||((this.hex!= null)&&this.hex.equals(rhs.hex)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); - } - + public void setHex(Boolean value) { this.hex = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java index 346eeb4..a27c21e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java @@ -1,394 +1,120 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** * A Variable is a name/value pair. * The `type` attribute is shown if space permits or when hovering over the variable's name. - * The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. - * If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. - * If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * + * The `kind` attribute is used to render additional properties of the variable, e.g. + * different icons can be used to indicate that a variable is public or private. + * If the value is structured (has children), a handle is provided to retrieve the children + * with the `variables` request. + * If the number of named or indexed children is large, the numbers should be returned via + * the `namedVariables` and `indexedVariables` attributes. + * The client can use this information to present the children in a paged UI and fetch them + * in chunks. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "name", - "value", - "type", - "presentationHint", - "evaluateName", - "variablesReference", - "namedVariables", - "indexedVariables", - "memoryReference" -}) -@Generated("jsonschema2pojo") public class Variable { - - /** - * The variable's name. - * (Required) - * - */ - @JsonProperty("name") - @JsonPropertyDescription("The variable's name.") + private String evaluateName; + private Long indexedVariables; + private String memoryReference; private String name; - /** - * The variable's value. - * This can be a multi-line text, e.g. for a function the body of a function. - * For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible. - * An empty string can be used if no value should be shown in the UI. - * (Required) - * - */ - @JsonProperty("value") - @JsonPropertyDescription("The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI.") - private String value; - /** - * The type of the variable's value. Typically shown in the UI when hovering over the value. - * This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. - * - */ - @JsonProperty("type") - @JsonPropertyDescription("The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true.") - private String type; - /** - * Properties of a variable that can be used to determine how to render the variable in the UI. - * - */ - @JsonProperty("presentationHint") - @JsonPropertyDescription("Properties of a variable that can be used to determine how to render the variable in the UI.") + private Long namedVariables; private VariablePresentationHint presentationHint; + private String type; + private String value; + private long variablesReference; + /** - * The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value. - * + * The evaluatable name of this variable which can be passed to the `evaluate` request to + * fetch the variable's value. */ @JsonProperty("evaluateName") - @JsonPropertyDescription("The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value.") - private String evaluateName; - /** - * If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - @JsonPropertyDescription("If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.") - private Integer variablesReference; - /** - * The number of named child variables. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("namedVariables") - @JsonPropertyDescription("The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.") - private Integer namedVariables; + public String getEvaluateName() { return evaluateName; } + @JsonProperty("evaluateName") + public void setEvaluateName(String value) { this.evaluateName = value; } + /** * The number of indexed child variables. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * + * The client can use this information to present the children in a paged UI and fetch them + * in chunks. */ @JsonProperty("indexedVariables") - @JsonPropertyDescription("The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.") - private Integer indexedVariables; + public Long getIndexedVariables() { return indexedVariables; } + @JsonProperty("indexedVariables") + public void setIndexedVariables(Long value) { this.indexedVariables = value; } + /** * A memory reference associated with this variable. - * For pointer type variables, this is generally a reference to the memory address contained in the pointer. + * For pointer type variables, this is generally a reference to the memory address contained + * in the pointer. * For executable data, this reference may later be used in a `disassemble` request. - * This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. - * + * This attribute may be returned by a debug adapter if corresponding capability + * `supportsMemoryReferences` is true. */ @JsonProperty("memoryReference") - @JsonPropertyDescription("A memory reference associated with this variable.\nFor pointer type variables, this is generally a reference to the memory address contained in the pointer.\nFor executable data, this reference may later be used in a `disassemble` request.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.") - private String memoryReference; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } /** * The variable's name. - * (Required) - * */ @JsonProperty("name") - public String getName() { - return name; - } - - /** - * The variable's name. - * (Required) - * - */ + public String getName() { return name; } @JsonProperty("name") - public void setName(String name) { - this.name = name; - } + public void setName(String value) { this.name = value; } /** - * The variable's value. - * This can be a multi-line text, e.g. for a function the body of a function. - * For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible. - * An empty string can be used if no value should be shown in the UI. - * (Required) - * + * The number of named child variables. + * The client can use this information to present the children in a paged UI and fetch them + * in chunks. */ - @JsonProperty("value") - public String getValue() { - return value; - } + @JsonProperty("namedVariables") + public Long getNamedVariables() { return namedVariables; } + @JsonProperty("namedVariables") + public void setNamedVariables(Long value) { this.namedVariables = value; } /** - * The variable's value. - * This can be a multi-line text, e.g. for a function the body of a function. - * For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible. - * An empty string can be used if no value should be shown in the UI. - * (Required) - * + * Properties of a variable that can be used to determine how to render the variable in the + * UI. */ - @JsonProperty("value") - public void setValue(String value) { - this.value = value; - } + @JsonProperty("presentationHint") + public VariablePresentationHint getPresentationHint() { return presentationHint; } + @JsonProperty("presentationHint") + public void setPresentationHint(VariablePresentationHint value) { this.presentationHint = value; } /** * The type of the variable's value. Typically shown in the UI when hovering over the value. - * This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. - * + * This attribute should only be returned by a debug adapter if the corresponding capability + * `supportsVariableType` is true. */ @JsonProperty("type") - public String getType() { - return type; - } - - /** - * The type of the variable's value. Typically shown in the UI when hovering over the value. - * This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. - * - */ + public String getType() { return type; } @JsonProperty("type") - public void setType(String type) { - this.type = type; - } - - /** - * Properties of a variable that can be used to determine how to render the variable in the UI. - * - */ - @JsonProperty("presentationHint") - public VariablePresentationHint getPresentationHint() { - return presentationHint; - } + public void setType(String value) { this.type = value; } /** - * Properties of a variable that can be used to determine how to render the variable in the UI. - * - */ - @JsonProperty("presentationHint") - public void setPresentationHint(VariablePresentationHint presentationHint) { - this.presentationHint = presentationHint; - } - - /** - * The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value. - * - */ - @JsonProperty("evaluateName") - public String getEvaluateName() { - return evaluateName; - } - - /** - * The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value. - * + * The variable's value. + * This can be a multi-line text, e.g. for a function the body of a function. + * For structured variables (which do not have a simple value), it is recommended to provide + * a one-line representation of the structured object. This helps to identify the structured + * object in the collapsed state when its children are not yet visible. + * An empty string can be used if no value should be shown in the UI. */ - @JsonProperty("evaluateName") - public void setEvaluateName(String evaluateName) { - this.evaluateName = evaluateName; - } + @JsonProperty("value") + public String getValue() { return value; } + @JsonProperty("value") + public void setValue(String value) { this.value = value; } /** - * If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * + * If `variablesReference` is > 0, the variable is structured and its children can be + * retrieved by passing `variablesReference` to the `variables` request as long as execution + * remains suspended. See 'Lifetime of Object References' in the Overview section for + * details. */ @JsonProperty("variablesReference") - public Integer getVariablesReference() { - return variablesReference; - } - - /** - * If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ + public long getVariablesReference() { return variablesReference; } @JsonProperty("variablesReference") - public void setVariablesReference(Integer variablesReference) { - this.variablesReference = variablesReference; - } - - /** - * The number of named child variables. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("namedVariables") - public Integer getNamedVariables() { - return namedVariables; - } - - /** - * The number of named child variables. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("namedVariables") - public void setNamedVariables(Integer namedVariables) { - this.namedVariables = namedVariables; - } - - /** - * The number of indexed child variables. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("indexedVariables") - public Integer getIndexedVariables() { - return indexedVariables; - } - - /** - * The number of indexed child variables. - * The client can use this information to present the children in a paged UI and fetch them in chunks. - * - */ - @JsonProperty("indexedVariables") - public void setIndexedVariables(Integer indexedVariables) { - this.indexedVariables = indexedVariables; - } - - /** - * A memory reference associated with this variable. - * For pointer type variables, this is generally a reference to the memory address contained in the pointer. - * For executable data, this reference may later be used in a `disassemble` request. - * This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. - * - */ - @JsonProperty("memoryReference") - public String getMemoryReference() { - return memoryReference; - } - - /** - * A memory reference associated with this variable. - * For pointer type variables, this is generally a reference to the memory address contained in the pointer. - * For executable data, this reference may later be used in a `disassemble` request. - * This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. - * - */ - @JsonProperty("memoryReference") - public void setMemoryReference(String memoryReference) { - this.memoryReference = memoryReference; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Variable.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null)?"":this.name)); - sb.append(','); - sb.append("value"); - sb.append('='); - sb.append(((this.value == null)?"":this.value)); - sb.append(','); - sb.append("type"); - sb.append('='); - sb.append(((this.type == null)?"":this.type)); - sb.append(','); - sb.append("presentationHint"); - sb.append('='); - sb.append(((this.presentationHint == null)?"":this.presentationHint)); - sb.append(','); - sb.append("evaluateName"); - sb.append('='); - sb.append(((this.evaluateName == null)?"":this.evaluateName)); - sb.append(','); - sb.append("variablesReference"); - sb.append('='); - sb.append(((this.variablesReference == null)?"":this.variablesReference)); - sb.append(','); - sb.append("namedVariables"); - sb.append('='); - sb.append(((this.namedVariables == null)?"":this.namedVariables)); - sb.append(','); - sb.append("indexedVariables"); - sb.append('='); - sb.append(((this.indexedVariables == null)?"":this.indexedVariables)); - sb.append(','); - sb.append("memoryReference"); - sb.append('='); - sb.append(((this.memoryReference == null)?"":this.memoryReference)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.indexedVariables == null)? 0 :this.indexedVariables.hashCode())); - result = ((result* 31)+((this.memoryReference == null)? 0 :this.memoryReference.hashCode())); - result = ((result* 31)+((this.presentationHint == null)? 0 :this.presentationHint.hashCode())); - result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); - result = ((result* 31)+((this.namedVariables == null)? 0 :this.namedVariables.hashCode())); - result = ((result* 31)+((this.evaluateName == null)? 0 :this.evaluateName.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); - result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); - result = ((result* 31)+((this.value == null)? 0 :this.value.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Variable) == false) { - return false; - } - Variable rhs = ((Variable) other); - return (((((((((((this.indexedVariables == rhs.indexedVariables)||((this.indexedVariables!= null)&&this.indexedVariables.equals(rhs.indexedVariables)))&&((this.memoryReference == rhs.memoryReference)||((this.memoryReference!= null)&&this.memoryReference.equals(rhs.memoryReference))))&&((this.presentationHint == rhs.presentationHint)||((this.presentationHint!= null)&&this.presentationHint.equals(rhs.presentationHint))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.namedVariables == rhs.namedVariables)||((this.namedVariables!= null)&&this.namedVariables.equals(rhs.namedVariables))))&&((this.evaluateName == rhs.evaluateName)||((this.evaluateName!= null)&&this.evaluateName.equals(rhs.evaluateName))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference))))&&((this.value == rhs.value)||((this.value!= null)&&this.value.equals(rhs.value)))); - } - + public void setVariablesReference(long value) { this.variablesReference = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java index 1f64e73..9c4a5f1 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java @@ -1,206 +1,60 @@ - package org.tzi.use.monitor.adapter.python.dap; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.*; /** - * Properties of a variable that can be used to determine how to render the variable in the UI. - * + * Properties of an evaluate result that can be used to determine how to render the result + * in the UI. + * + * Properties of a variable that can be used to determine how to render the variable in the + * UI. + * + * Properties of a value that can be used to determine how to render the result in the UI. */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "kind", - "attributes", - "visibility", - "lazy" -}) -@Generated("jsonschema2pojo") public class VariablePresentationHint { - - /** - * The kind of variable. Before introducing additional values, try to use the listed values. - * - */ - @JsonProperty("kind") - @JsonPropertyDescription("The kind of variable. Before introducing additional values, try to use the listed values.") + private String[] attributes; private String kind; - /** - * Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values. - * - */ - @JsonProperty("attributes") - @JsonPropertyDescription("Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.") - private List attributes = new ArrayList(); - /** - * Visibility of variable. Before introducing additional values, try to use the listed values. - * - */ - @JsonProperty("visibility") - @JsonPropertyDescription("Visibility of variable. Before introducing additional values, try to use the listed values.") - private String visibility; - /** - * If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation. - * This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function. - * Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request. - * - */ - @JsonProperty("lazy") - @JsonPropertyDescription("If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.") private Boolean lazy; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); + private String visibility; /** - * The kind of variable. Before introducing additional values, try to use the listed values. - * + * Set of attributes represented as an array of strings. Before introducing additional + * values, try to use the listed values. */ - @JsonProperty("kind") - public String getKind() { - return kind; - } + @JsonProperty("attributes") + public String[] getAttributes() { return attributes; } + @JsonProperty("attributes") + public void setAttributes(String[] value) { this.attributes = value; } /** * The kind of variable. Before introducing additional values, try to use the listed values. - * */ @JsonProperty("kind") - public void setKind(String kind) { - this.kind = kind; - } - - /** - * Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values. - * - */ - @JsonProperty("attributes") - public List getAttributes() { - return attributes; - } + public String getKind() { return kind; } + @JsonProperty("kind") + public void setKind(String value) { this.kind = value; } /** - * Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values. - * + * If true, clients can present the variable with a UI that supports a specific gesture to + * trigger its evaluation. + * This mechanism can be used for properties that require executing code when retrieving + * their value and where the code execution can be expensive and/or produce side-effects. A + * typical example are properties based on a getter function. + * Please note that in addition to the `lazy` flag, the variable's `variablesReference` is + * expected to refer to a variable that will provide the value through another `variable` + * request. */ - @JsonProperty("attributes") - public void setAttributes(List attributes) { - this.attributes = attributes; - } + @JsonProperty("lazy") + public Boolean getLazy() { return lazy; } + @JsonProperty("lazy") + public void setLazy(Boolean value) { this.lazy = value; } /** - * Visibility of variable. Before introducing additional values, try to use the listed values. - * + * Visibility of variable. Before introducing additional values, try to use the listed + * values. */ @JsonProperty("visibility") - public String getVisibility() { - return visibility; - } - - /** - * Visibility of variable. Before introducing additional values, try to use the listed values. - * - */ + public String getVisibility() { return visibility; } @JsonProperty("visibility") - public void setVisibility(String visibility) { - this.visibility = visibility; - } - - /** - * If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation. - * This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function. - * Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request. - * - */ - @JsonProperty("lazy") - public Boolean getLazy() { - return lazy; - } - - /** - * If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation. - * This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function. - * Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request. - * - */ - @JsonProperty("lazy") - public void setLazy(Boolean lazy) { - this.lazy = lazy; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(VariablePresentationHint.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("kind"); - sb.append('='); - sb.append(((this.kind == null)?"":this.kind)); - sb.append(','); - sb.append("attributes"); - sb.append('='); - sb.append(((this.attributes == null)?"":this.attributes)); - sb.append(','); - sb.append("visibility"); - sb.append('='); - sb.append(((this.visibility == null)?"":this.visibility)); - sb.append(','); - sb.append("lazy"); - sb.append('='); - sb.append(((this.lazy == null)?"":this.lazy)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.attributes == null)? 0 :this.attributes.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.visibility == null)? 0 :this.visibility.hashCode())); - result = ((result* 31)+((this.kind == null)? 0 :this.kind.hashCode())); - result = ((result* 31)+((this.lazy == null)? 0 :this.lazy.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof VariablePresentationHint) == false) { - return false; - } - VariablePresentationHint rhs = ((VariablePresentationHint) other); - return ((((((this.attributes == rhs.attributes)||((this.attributes!= null)&&this.attributes.equals(rhs.attributes)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.visibility == rhs.visibility)||((this.visibility!= null)&&this.visibility.equals(rhs.visibility))))&&((this.kind == rhs.kind)||((this.kind!= null)&&this.kind.equals(rhs.kind))))&&((this.lazy == rhs.lazy)||((this.lazy!= null)&&this.lazy.equals(rhs.lazy)))); - } - + public void setVisibility(String value) { this.visibility = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variables.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variables.java deleted file mode 100644 index 4ce51f9..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variables.java +++ /dev/null @@ -1,73 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * An object used as a dictionary for looking up the variables in the format string. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - -}) -@Generated("jsonschema2pojo") -public class Variables { - - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, String value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Variables.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Variables) == false) { - return false; - } - Variables rhs = ((Variables) other); - return ((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArguments.java deleted file mode 100644 index 96ca637..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArguments.java +++ /dev/null @@ -1,286 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; - - -/** - * Arguments for `variables` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "variablesReference", - "filter", - "start", - "count", - "format" -}) -@Generated("jsonschema2pojo") -public class VariablesArguments { - - /** - * The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - @JsonPropertyDescription("The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.") - private Integer variablesReference; - /** - * Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. - * - */ - @JsonProperty("filter") - @JsonPropertyDescription("Filter to limit the child variables to either named or indexed. If omitted, both types are fetched.") - private Filter filter; - /** - * The index of the first variable to return; if omitted children start at 0. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. - * - */ - @JsonProperty("start") - @JsonPropertyDescription("The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true.") - private Integer start; - /** - * The number of variables to return. If count is missing or 0, all variables are returned. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. - * - */ - @JsonProperty("count") - @JsonPropertyDescription("The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true.") - private Integer count; - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - @JsonPropertyDescription("Provides formatting information for a value.") - private ValueFormat format; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - public Integer getVariablesReference() { - return variablesReference; - } - - /** - * The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. - * (Required) - * - */ - @JsonProperty("variablesReference") - public void setVariablesReference(Integer variablesReference) { - this.variablesReference = variablesReference; - } - - /** - * Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. - * - */ - @JsonProperty("filter") - public Filter getFilter() { - return filter; - } - - /** - * Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. - * - */ - @JsonProperty("filter") - public void setFilter(Filter filter) { - this.filter = filter; - } - - /** - * The index of the first variable to return; if omitted children start at 0. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. - * - */ - @JsonProperty("start") - public Integer getStart() { - return start; - } - - /** - * The index of the first variable to return; if omitted children start at 0. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. - * - */ - @JsonProperty("start") - public void setStart(Integer start) { - this.start = start; - } - - /** - * The number of variables to return. If count is missing or 0, all variables are returned. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. - * - */ - @JsonProperty("count") - public Integer getCount() { - return count; - } - - /** - * The number of variables to return. If count is missing or 0, all variables are returned. - * The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. - * - */ - @JsonProperty("count") - public void setCount(Integer count) { - this.count = count; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - public ValueFormat getFormat() { - return format; - } - - /** - * Provides formatting information for a value. - * - */ - @JsonProperty("format") - public void setFormat(ValueFormat format) { - this.format = format; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(VariablesArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("variablesReference"); - sb.append('='); - sb.append(((this.variablesReference == null)?"":this.variablesReference)); - sb.append(','); - sb.append("filter"); - sb.append('='); - sb.append(((this.filter == null)?"":this.filter)); - sb.append(','); - sb.append("start"); - sb.append('='); - sb.append(((this.start == null)?"":this.start)); - sb.append(','); - sb.append("count"); - sb.append('='); - sb.append(((this.count == null)?"":this.count)); - sb.append(','); - sb.append("format"); - sb.append('='); - sb.append(((this.format == null)?"":this.format)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.filter == null)? 0 :this.filter.hashCode())); - result = ((result* 31)+((this.start == null)? 0 :this.start.hashCode())); - result = ((result* 31)+((this.count == null)? 0 :this.count.hashCode())); - result = ((result* 31)+((this.format == null)? 0 :this.format.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.variablesReference == null)? 0 :this.variablesReference.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof VariablesArguments) == false) { - return false; - } - VariablesArguments rhs = ((VariablesArguments) other); - return (((((((this.filter == rhs.filter)||((this.filter!= null)&&this.filter.equals(rhs.filter)))&&((this.start == rhs.start)||((this.start!= null)&&this.start.equals(rhs.start))))&&((this.count == rhs.count)||((this.count!= null)&&this.count.equals(rhs.count))))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.variablesReference == rhs.variablesReference)||((this.variablesReference!= null)&&this.variablesReference.equals(rhs.variablesReference)))); - } - - - /** - * Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. - * - */ - @Generated("jsonschema2pojo") - public enum Filter { - - INDEXED("indexed"), - NAMED("named"); - private final String value; - private final static Map CONSTANTS = new HashMap(); - - static { - for (Filter c: values()) { - CONSTANTS.put(c.value, c); - } - } - - Filter(String value) { - this.value = value; - } - - @Override - public String toString() { - return this.value; - } - - @JsonValue - public String value() { - return this.value; - } - - @JsonCreator - public static Filter fromValue(String value) { - Filter constant = CONSTANTS.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArgumentsClass.java new file mode 100644 index 0000000..2a3bb6a --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesArgumentsClass.java @@ -0,0 +1,63 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `variables` request. + */ +public class VariablesArgumentsClass { + private Long count; + private Filter filter; + private ValueFormat format; + private Long start; + private long variablesReference; + + /** + * The number of variables to return. If count is missing or 0, all variables are returned. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsVariablePaging` is true. + */ + @JsonProperty("count") + public Long getCount() { return count; } + @JsonProperty("count") + public void setCount(Long value) { this.count = value; } + + /** + * Filter to limit the child variables to either named or indexed. If omitted, both types + * are fetched. + */ + @JsonProperty("filter") + public Filter getFilter() { return filter; } + @JsonProperty("filter") + public void setFilter(Filter value) { this.filter = value; } + + /** + * Specifies details on how to format the Variable values. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + */ + @JsonProperty("format") + public ValueFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(ValueFormat value) { this.format = value; } + + /** + * The index of the first variable to return; if omitted children start at 0. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsVariablePaging` is true. + */ + @JsonProperty("start") + public Long getStart() { return start; } + @JsonProperty("start") + public void setStart(Long value) { this.start = value; } + + /** + * The variable for which to retrieve its children. The `variablesReference` must have been + * obtained in the current suspended state. See 'Lifetime of Object References' in the + * Overview section for details. + */ + @JsonProperty("variablesReference") + public long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestArguments.java new file mode 100644 index 0000000..a7319cb --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestArguments.java @@ -0,0 +1,63 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `variables` request. + */ +public class VariablesRequestArguments { + private Long count; + private Filter filter; + private ValueFormat format; + private Long start; + private long variablesReference; + + /** + * The number of variables to return. If count is missing or 0, all variables are returned. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsVariablePaging` is true. + */ + @JsonProperty("count") + public Long getCount() { return count; } + @JsonProperty("count") + public void setCount(Long value) { this.count = value; } + + /** + * Filter to limit the child variables to either named or indexed. If omitted, both types + * are fetched. + */ + @JsonProperty("filter") + public Filter getFilter() { return filter; } + @JsonProperty("filter") + public void setFilter(Filter value) { this.filter = value; } + + /** + * Specifies details on how to format the Variable values. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsValueFormattingOptions` is true. + */ + @JsonProperty("format") + public ValueFormat getFormat() { return format; } + @JsonProperty("format") + public void setFormat(ValueFormat value) { this.format = value; } + + /** + * The index of the first variable to return; if omitted children start at 0. + * The attribute is only honored by a debug adapter if the corresponding capability + * `supportsVariablePaging` is true. + */ + @JsonProperty("start") + public Long getStart() { return start; } + @JsonProperty("start") + public void setStart(Long value) { this.start = value; } + + /** + * The variable for which to retrieve its children. The `variablesReference` must have been + * obtained in the current suspended state. See 'Lifetime of Object References' in the + * Overview section for details. + */ + @JsonProperty("variablesReference") + public long getVariablesReference() { return variablesReference; } + @JsonProperty("variablesReference") + public void setVariablesReference(long value) { this.variablesReference = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java new file mode 100644 index 0000000..eb5e00b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java @@ -0,0 +1,55 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Retrieves all child variables for the given variable reference. + * A filter can be used to limit the fetched children to either named or indexed children. + */ +public class VariablesRequestClass { + private long seq; + private AttachRequestType type; + private VariablesRequestArguments arguments; + private VariablesRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public VariablesRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(VariablesRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public VariablesRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(VariablesRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestCommand.java new file mode 100644 index 0000000..17a68ca --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum VariablesRequestCommand { + VARIABLES; + + @JsonValue + public String toValue() { + switch (this) { + case VARIABLES: return "variables"; + } + return null; + } + + @JsonCreator + public static VariablesRequestCommand forValue(String value) throws IOException { + if (value.equals("variables")) return VARIABLES; + throw new IOException("Cannot deserialize VariablesRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseBody.java new file mode 100644 index 0000000..e90bfe5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseBody.java @@ -0,0 +1,15 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class VariablesResponseBody { + private Variable[] variables; + + /** + * All (or a range) of variables for the given variable reference. + */ + @JsonProperty("variables") + public Variable[] getVariables() { return variables; } + @JsonProperty("variables") + public void setVariables(Variable[] value) { this.variables = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java new file mode 100644 index 0000000..e9da243 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `variables` request. + */ +public class VariablesResponseClass { + private long seq; + private AttachResponseType type; + private VariablesResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public VariablesResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(VariablesResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WrapperRoot.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WrapperRoot.java new file mode 100644 index 0000000..0801276 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WrapperRoot.java @@ -0,0 +1,1133 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; +import java.util.Map; + +/** + * The Debug Adapter Protocol defines the protocol used between an editor or IDE and a + * debugger or runtime. + */ +public class WrapperRoot { + private AttachRequestClass attachRequest; + private AttachRequestArgumentsClass attachRequestArguments; + private AttachResponseClass attachResponse; + private Breakpoint breakpoint; + private BreakpointEventClass breakpointEvent; + private BreakpointLocation breakpointLocation; + private BreakpointLocationsArgumentsClass breakpointLocationsArguments; + private BreakpointLocationsRequestClass breakpointLocationsRequest; + private BreakpointLocationsResponseClass breakpointLocationsResponse; + private CancelArgumentsClass cancelArguments; + private CancelRequestClass cancelRequest; + private CancelResponseClass cancelResponse; + private CapabilitiesClass capabilities; + private CapabilitiesEventClass capabilitiesEvent; + private Checksum checksum; + private ChecksumAlgorithm checksumAlgorithm; + private ColumnDescriptor columnDescriptor; + private CompletionItem completionItem; + private CompletionItemType completionItemType; + private CompletionsArgumentsClass completionsArguments; + private CompletionsRequestClass completionsRequest; + private CompletionsResponseClass completionsResponse; + private Map configurationDoneArguments; + private ConfigurationDoneRequestClass configurationDoneRequest; + private ConfigurationDoneResponseClass configurationDoneResponse; + private ContinueArgumentsClass continueArguments; + private ContinuedEventClass continuedEvent; + private ContinueRequestClass continueRequest; + private ContinueResponseClass continueResponse; + private DataBreakpoint dataBreakpoint; + private DataBreakpointAccessType dataBreakpointAccessType; + private DataBreakpointInfoArgumentsClass dataBreakpointInfoArguments; + private DataBreakpointInfoRequestClass dataBreakpointInfoRequest; + private DataBreakpointInfoResponseClass dataBreakpointInfoResponse; + private DisassembleArgumentsClass disassembleArguments; + private DisassembledInstruction disassembledInstruction; + private DisassembleRequestClass disassembleRequest; + private DisassembleResponseClass disassembleResponse; + private DisconnectArgumentsClass disconnectArguments; + private DisconnectRequestClass disconnectRequest; + private DisconnectResponseClass disconnectResponse; + private ErrorResponseClass errorResponse; + private EvaluateArgumentsClass evaluateArguments; + private EvaluateRequestClass evaluateRequest; + private EvaluateResponseClass evaluateResponse; + private Event event; + private ExceptionBreakMode exceptionBreakMode; + private ExceptionBreakpointsFilter exceptionBreakpointsFilter; + private ExceptionDetails exceptionDetails; + private ExceptionFilterOptions exceptionFilterOptions; + private ExceptionInfoArgumentsClass exceptionInfoArguments; + private ExceptionInfoRequestClass exceptionInfoRequest; + private ExceptionInfoResponseClass exceptionInfoResponse; + private ExceptionOptions exceptionOptions; + private ExceptionPathSegment exceptionPathSegment; + private ExitedEventClass exitedEvent; + private FunctionBreakpoint functionBreakpoint; + private GotoArgumentsClass gotoArguments; + private GotoRequestClass gotoRequest; + private GotoResponseClass gotoResponse; + private GotoTarget gotoTarget; + private GotoTargetsArgumentsClass gotoTargetsArguments; + private GotoTargetsRequestClass gotoTargetsRequest; + private GotoTargetsResponseClass gotoTargetsResponse; + private InitializedEventClass initializedEvent; + private InitializeRequestClass initializeRequest; + private InitializeRequestArgumentsClass initializeRequestArguments; + private InitializeResponseClass initializeResponse; + private InstructionBreakpoint instructionBreakpoint; + private String invalidatedAreas; + private InvalidatedEventClass invalidatedEvent; + private LaunchRequestClass launchRequest; + private LaunchRequestArgumentsClass launchRequestArguments; + private LaunchResponseClass launchResponse; + private LoadedSourceEventClass loadedSourceEvent; + private Map loadedSourcesArguments; + private LoadedSourcesRequestClass loadedSourcesRequest; + private LoadedSourcesResponseClass loadedSourcesResponse; + private MemoryEventClass memoryEvent; + private Message message; + private Module module; + private ModuleEventClass moduleEvent; + private ModulesArgumentsClass modulesArguments; + private ModulesRequestClass modulesRequest; + private ModulesResponseClass modulesResponse; + private NextArgumentsClass nextArguments; + private NextRequestClass nextRequest; + private NextResponseClass nextResponse; + private OutputEventClass outputEvent; + private PauseArgumentsClass pauseArguments; + private PauseRequestClass pauseRequest; + private PauseResponseClass pauseResponse; + private ProcessEventClass processEvent; + private ProgressEndEventClass progressEndEvent; + private ProgressStartEventClass progressStartEvent; + private ProgressUpdateEventClass progressUpdateEvent; + private BaseProtocol protocolMessage; + private ReadMemoryArgumentsClass readMemoryArguments; + private ReadMemoryRequestClass readMemoryRequest; + private ReadMemoryResponseClass readMemoryResponse; + private Request request; + private Response response; + private RestartArgumentsClass restartArguments; + private RestartFrameArgumentsClass restartFrameArguments; + private RestartFrameRequestClass restartFrameRequest; + private RestartFrameResponseClass restartFrameResponse; + private RestartRequestClass restartRequest; + private RestartResponseClass restartResponse; + private ReverseContinueArgumentsClass reverseContinueArguments; + private ReverseContinueRequestClass reverseContinueRequest; + private ReverseContinueResponseClass reverseContinueResponse; + private RunInTerminalRequestClass runInTerminalRequest; + private RunInTerminalRequestArgumentsClass runInTerminalRequestArguments; + private RunInTerminalResponseClass runInTerminalResponse; + private Scope scope; + private ScopesArgumentsClass scopesArguments; + private ScopesRequestClass scopesRequest; + private ScopesResponseClass scopesResponse; + private SetBreakpointsArgumentsClass setBreakpointsArguments; + private SetBreakpointsRequestClass setBreakpointsRequest; + private SetBreakpointsResponseClass setBreakpointsResponse; + private SetDataBreakpointsArgumentsClass setDataBreakpointsArguments; + private SetDataBreakpointsRequestClass setDataBreakpointsRequest; + private SetDataBreakpointsResponseClass setDataBreakpointsResponse; + private SetExceptionBreakpointsArgumentsClass setExceptionBreakpointsArguments; + private SetExceptionBreakpointsRequestClass setExceptionBreakpointsRequest; + private SetExceptionBreakpointsResponseClass setExceptionBreakpointsResponse; + private SetExpressionArgumentsClass setExpressionArguments; + private SetExpressionRequestClass setExpressionRequest; + private SetExpressionResponseClass setExpressionResponse; + private SetFunctionBreakpointsArgumentsClass setFunctionBreakpointsArguments; + private SetFunctionBreakpointsRequestClass setFunctionBreakpointsRequest; + private SetFunctionBreakpointsResponseClass setFunctionBreakpointsResponse; + private SetInstructionBreakpointsArgumentsClass setInstructionBreakpointsArguments; + private SetInstructionBreakpointsRequestClass setInstructionBreakpointsRequest; + private SetInstructionBreakpointsResponseClass setInstructionBreakpointsResponse; + private SetVariableArgumentsClass setVariableArguments; + private SetVariableRequestClass setVariableRequest; + private SetVariableResponseClass setVariableResponse; + private Source source; + private SourceArgumentsClass sourceArguments; + private SourceBreakpoint sourceBreakpoint; + private SourceRequestClass sourceRequest; + private SourceResponseClass sourceResponse; + private StackFrame stackFrame; + private StackFrameFormat stackFrameFormat; + private StackTraceArgumentsClass stackTraceArguments; + private StackTraceRequestClass stackTraceRequest; + private StackTraceResponseClass stackTraceResponse; + private StartDebuggingRequestClass startDebuggingRequest; + private StartDebuggingRequestArgumentsClass startDebuggingRequestArguments; + private StartDebuggingResponseClass startDebuggingResponse; + private StepBackArgumentsClass stepBackArguments; + private StepBackRequestClass stepBackRequest; + private StepBackResponseClass stepBackResponse; + private StepInArgumentsClass stepInArguments; + private StepInRequestClass stepInRequest; + private StepInResponseClass stepInResponse; + private StepInTarget stepInTarget; + private StepInTargetsArgumentsClass stepInTargetsArguments; + private StepInTargetsRequestClass stepInTargetsRequest; + private StepInTargetsResponseClass stepInTargetsResponse; + private StepOutArgumentsClass stepOutArguments; + private StepOutRequestClass stepOutRequest; + private StepOutResponseClass stepOutResponse; + private SteppingGranularity steppingGranularity; + private StoppedEventClass stoppedEvent; + private TerminateArgumentsClass terminateArguments; + private TerminatedEventClass terminatedEvent; + private TerminateRequestClass terminateRequest; + private TerminateResponseClass terminateResponse; + private TerminateThreadsArgumentsClass terminateThreadsArguments; + private TerminateThreadsRequestClass terminateThreadsRequest; + private TerminateThreadsResponseClass terminateThreadsResponse; + private Thread thread; + private ThreadEventClass threadEvent; + private ThreadsRequestClass threadsRequest; + private ThreadsResponseClass threadsResponse; + private ValueFormat valueFormat; + private Variable variable; + private VariablePresentationHint variablePresentationHint; + private VariablesArgumentsClass variablesArguments; + private VariablesRequestClass variablesRequest; + private VariablesResponseClass variablesResponse; + private WriteMemoryArgumentsClass writeMemoryArguments; + private WriteMemoryRequestClass writeMemoryRequest; + private WriteMemoryResponseClass writeMemoryResponse; + + @JsonProperty("AttachRequest") + public AttachRequestClass getAttachRequest() { return attachRequest; } + @JsonProperty("AttachRequest") + public void setAttachRequest(AttachRequestClass value) { this.attachRequest = value; } + + @JsonProperty("AttachRequestArguments") + public AttachRequestArgumentsClass getAttachRequestArguments() { return attachRequestArguments; } + @JsonProperty("AttachRequestArguments") + public void setAttachRequestArguments(AttachRequestArgumentsClass value) { this.attachRequestArguments = value; } + + @JsonProperty("AttachResponse") + public AttachResponseClass getAttachResponse() { return attachResponse; } + @JsonProperty("AttachResponse") + public void setAttachResponse(AttachResponseClass value) { this.attachResponse = value; } + + @JsonProperty("Breakpoint") + public Breakpoint getBreakpoint() { return breakpoint; } + @JsonProperty("Breakpoint") + public void setBreakpoint(Breakpoint value) { this.breakpoint = value; } + + @JsonProperty("BreakpointEvent") + public BreakpointEventClass getBreakpointEvent() { return breakpointEvent; } + @JsonProperty("BreakpointEvent") + public void setBreakpointEvent(BreakpointEventClass value) { this.breakpointEvent = value; } + + @JsonProperty("BreakpointLocation") + public BreakpointLocation getBreakpointLocation() { return breakpointLocation; } + @JsonProperty("BreakpointLocation") + public void setBreakpointLocation(BreakpointLocation value) { this.breakpointLocation = value; } + + @JsonProperty("BreakpointLocationsArguments") + public BreakpointLocationsArgumentsClass getBreakpointLocationsArguments() { return breakpointLocationsArguments; } + @JsonProperty("BreakpointLocationsArguments") + public void setBreakpointLocationsArguments(BreakpointLocationsArgumentsClass value) { this.breakpointLocationsArguments = value; } + + @JsonProperty("BreakpointLocationsRequest") + public BreakpointLocationsRequestClass getBreakpointLocationsRequest() { return breakpointLocationsRequest; } + @JsonProperty("BreakpointLocationsRequest") + public void setBreakpointLocationsRequest(BreakpointLocationsRequestClass value) { this.breakpointLocationsRequest = value; } + + @JsonProperty("BreakpointLocationsResponse") + public BreakpointLocationsResponseClass getBreakpointLocationsResponse() { return breakpointLocationsResponse; } + @JsonProperty("BreakpointLocationsResponse") + public void setBreakpointLocationsResponse(BreakpointLocationsResponseClass value) { this.breakpointLocationsResponse = value; } + + @JsonProperty("CancelArguments") + public CancelArgumentsClass getCancelArguments() { return cancelArguments; } + @JsonProperty("CancelArguments") + public void setCancelArguments(CancelArgumentsClass value) { this.cancelArguments = value; } + + @JsonProperty("CancelRequest") + public CancelRequestClass getCancelRequest() { return cancelRequest; } + @JsonProperty("CancelRequest") + public void setCancelRequest(CancelRequestClass value) { this.cancelRequest = value; } + + @JsonProperty("CancelResponse") + public CancelResponseClass getCancelResponse() { return cancelResponse; } + @JsonProperty("CancelResponse") + public void setCancelResponse(CancelResponseClass value) { this.cancelResponse = value; } + + @JsonProperty("Capabilities") + public CapabilitiesClass getCapabilities() { return capabilities; } + @JsonProperty("Capabilities") + public void setCapabilities(CapabilitiesClass value) { this.capabilities = value; } + + @JsonProperty("CapabilitiesEvent") + public CapabilitiesEventClass getCapabilitiesEvent() { return capabilitiesEvent; } + @JsonProperty("CapabilitiesEvent") + public void setCapabilitiesEvent(CapabilitiesEventClass value) { this.capabilitiesEvent = value; } + + @JsonProperty("Checksum") + public Checksum getChecksum() { return checksum; } + @JsonProperty("Checksum") + public void setChecksum(Checksum value) { this.checksum = value; } + + @JsonProperty("ChecksumAlgorithm") + public ChecksumAlgorithm getChecksumAlgorithm() { return checksumAlgorithm; } + @JsonProperty("ChecksumAlgorithm") + public void setChecksumAlgorithm(ChecksumAlgorithm value) { this.checksumAlgorithm = value; } + + @JsonProperty("ColumnDescriptor") + public ColumnDescriptor getColumnDescriptor() { return columnDescriptor; } + @JsonProperty("ColumnDescriptor") + public void setColumnDescriptor(ColumnDescriptor value) { this.columnDescriptor = value; } + + @JsonProperty("CompletionItem") + public CompletionItem getCompletionItem() { return completionItem; } + @JsonProperty("CompletionItem") + public void setCompletionItem(CompletionItem value) { this.completionItem = value; } + + @JsonProperty("CompletionItemType") + public CompletionItemType getCompletionItemType() { return completionItemType; } + @JsonProperty("CompletionItemType") + public void setCompletionItemType(CompletionItemType value) { this.completionItemType = value; } + + @JsonProperty("CompletionsArguments") + public CompletionsArgumentsClass getCompletionsArguments() { return completionsArguments; } + @JsonProperty("CompletionsArguments") + public void setCompletionsArguments(CompletionsArgumentsClass value) { this.completionsArguments = value; } + + @JsonProperty("CompletionsRequest") + public CompletionsRequestClass getCompletionsRequest() { return completionsRequest; } + @JsonProperty("CompletionsRequest") + public void setCompletionsRequest(CompletionsRequestClass value) { this.completionsRequest = value; } + + @JsonProperty("CompletionsResponse") + public CompletionsResponseClass getCompletionsResponse() { return completionsResponse; } + @JsonProperty("CompletionsResponse") + public void setCompletionsResponse(CompletionsResponseClass value) { this.completionsResponse = value; } + + @JsonProperty("ConfigurationDoneArguments") + public Map getConfigurationDoneArguments() { return configurationDoneArguments; } + @JsonProperty("ConfigurationDoneArguments") + public void setConfigurationDoneArguments(Map value) { this.configurationDoneArguments = value; } + + @JsonProperty("ConfigurationDoneRequest") + public ConfigurationDoneRequestClass getConfigurationDoneRequest() { return configurationDoneRequest; } + @JsonProperty("ConfigurationDoneRequest") + public void setConfigurationDoneRequest(ConfigurationDoneRequestClass value) { this.configurationDoneRequest = value; } + + @JsonProperty("ConfigurationDoneResponse") + public ConfigurationDoneResponseClass getConfigurationDoneResponse() { return configurationDoneResponse; } + @JsonProperty("ConfigurationDoneResponse") + public void setConfigurationDoneResponse(ConfigurationDoneResponseClass value) { this.configurationDoneResponse = value; } + + @JsonProperty("ContinueArguments") + public ContinueArgumentsClass getContinueArguments() { return continueArguments; } + @JsonProperty("ContinueArguments") + public void setContinueArguments(ContinueArgumentsClass value) { this.continueArguments = value; } + + @JsonProperty("ContinuedEvent") + public ContinuedEventClass getContinuedEvent() { return continuedEvent; } + @JsonProperty("ContinuedEvent") + public void setContinuedEvent(ContinuedEventClass value) { this.continuedEvent = value; } + + @JsonProperty("ContinueRequest") + public ContinueRequestClass getContinueRequest() { return continueRequest; } + @JsonProperty("ContinueRequest") + public void setContinueRequest(ContinueRequestClass value) { this.continueRequest = value; } + + @JsonProperty("ContinueResponse") + public ContinueResponseClass getContinueResponse() { return continueResponse; } + @JsonProperty("ContinueResponse") + public void setContinueResponse(ContinueResponseClass value) { this.continueResponse = value; } + + @JsonProperty("DataBreakpoint") + public DataBreakpoint getDataBreakpoint() { return dataBreakpoint; } + @JsonProperty("DataBreakpoint") + public void setDataBreakpoint(DataBreakpoint value) { this.dataBreakpoint = value; } + + @JsonProperty("DataBreakpointAccessType") + public DataBreakpointAccessType getDataBreakpointAccessType() { return dataBreakpointAccessType; } + @JsonProperty("DataBreakpointAccessType") + public void setDataBreakpointAccessType(DataBreakpointAccessType value) { this.dataBreakpointAccessType = value; } + + @JsonProperty("DataBreakpointInfoArguments") + public DataBreakpointInfoArgumentsClass getDataBreakpointInfoArguments() { return dataBreakpointInfoArguments; } + @JsonProperty("DataBreakpointInfoArguments") + public void setDataBreakpointInfoArguments(DataBreakpointInfoArgumentsClass value) { this.dataBreakpointInfoArguments = value; } + + @JsonProperty("DataBreakpointInfoRequest") + public DataBreakpointInfoRequestClass getDataBreakpointInfoRequest() { return dataBreakpointInfoRequest; } + @JsonProperty("DataBreakpointInfoRequest") + public void setDataBreakpointInfoRequest(DataBreakpointInfoRequestClass value) { this.dataBreakpointInfoRequest = value; } + + @JsonProperty("DataBreakpointInfoResponse") + public DataBreakpointInfoResponseClass getDataBreakpointInfoResponse() { return dataBreakpointInfoResponse; } + @JsonProperty("DataBreakpointInfoResponse") + public void setDataBreakpointInfoResponse(DataBreakpointInfoResponseClass value) { this.dataBreakpointInfoResponse = value; } + + @JsonProperty("DisassembleArguments") + public DisassembleArgumentsClass getDisassembleArguments() { return disassembleArguments; } + @JsonProperty("DisassembleArguments") + public void setDisassembleArguments(DisassembleArgumentsClass value) { this.disassembleArguments = value; } + + @JsonProperty("DisassembledInstruction") + public DisassembledInstruction getDisassembledInstruction() { return disassembledInstruction; } + @JsonProperty("DisassembledInstruction") + public void setDisassembledInstruction(DisassembledInstruction value) { this.disassembledInstruction = value; } + + @JsonProperty("DisassembleRequest") + public DisassembleRequestClass getDisassembleRequest() { return disassembleRequest; } + @JsonProperty("DisassembleRequest") + public void setDisassembleRequest(DisassembleRequestClass value) { this.disassembleRequest = value; } + + @JsonProperty("DisassembleResponse") + public DisassembleResponseClass getDisassembleResponse() { return disassembleResponse; } + @JsonProperty("DisassembleResponse") + public void setDisassembleResponse(DisassembleResponseClass value) { this.disassembleResponse = value; } + + @JsonProperty("DisconnectArguments") + public DisconnectArgumentsClass getDisconnectArguments() { return disconnectArguments; } + @JsonProperty("DisconnectArguments") + public void setDisconnectArguments(DisconnectArgumentsClass value) { this.disconnectArguments = value; } + + @JsonProperty("DisconnectRequest") + public DisconnectRequestClass getDisconnectRequest() { return disconnectRequest; } + @JsonProperty("DisconnectRequest") + public void setDisconnectRequest(DisconnectRequestClass value) { this.disconnectRequest = value; } + + @JsonProperty("DisconnectResponse") + public DisconnectResponseClass getDisconnectResponse() { return disconnectResponse; } + @JsonProperty("DisconnectResponse") + public void setDisconnectResponse(DisconnectResponseClass value) { this.disconnectResponse = value; } + + @JsonProperty("ErrorResponse") + public ErrorResponseClass getErrorResponse() { return errorResponse; } + @JsonProperty("ErrorResponse") + public void setErrorResponse(ErrorResponseClass value) { this.errorResponse = value; } + + @JsonProperty("EvaluateArguments") + public EvaluateArgumentsClass getEvaluateArguments() { return evaluateArguments; } + @JsonProperty("EvaluateArguments") + public void setEvaluateArguments(EvaluateArgumentsClass value) { this.evaluateArguments = value; } + + @JsonProperty("EvaluateRequest") + public EvaluateRequestClass getEvaluateRequest() { return evaluateRequest; } + @JsonProperty("EvaluateRequest") + public void setEvaluateRequest(EvaluateRequestClass value) { this.evaluateRequest = value; } + + @JsonProperty("EvaluateResponse") + public EvaluateResponseClass getEvaluateResponse() { return evaluateResponse; } + @JsonProperty("EvaluateResponse") + public void setEvaluateResponse(EvaluateResponseClass value) { this.evaluateResponse = value; } + + @JsonProperty("Event") + public Event getEvent() { return event; } + @JsonProperty("Event") + public void setEvent(Event value) { this.event = value; } + + @JsonProperty("ExceptionBreakMode") + public ExceptionBreakMode getExceptionBreakMode() { return exceptionBreakMode; } + @JsonProperty("ExceptionBreakMode") + public void setExceptionBreakMode(ExceptionBreakMode value) { this.exceptionBreakMode = value; } + + @JsonProperty("ExceptionBreakpointsFilter") + public ExceptionBreakpointsFilter getExceptionBreakpointsFilter() { return exceptionBreakpointsFilter; } + @JsonProperty("ExceptionBreakpointsFilter") + public void setExceptionBreakpointsFilter(ExceptionBreakpointsFilter value) { this.exceptionBreakpointsFilter = value; } + + @JsonProperty("ExceptionDetails") + public ExceptionDetails getExceptionDetails() { return exceptionDetails; } + @JsonProperty("ExceptionDetails") + public void setExceptionDetails(ExceptionDetails value) { this.exceptionDetails = value; } + + @JsonProperty("ExceptionFilterOptions") + public ExceptionFilterOptions getExceptionFilterOptions() { return exceptionFilterOptions; } + @JsonProperty("ExceptionFilterOptions") + public void setExceptionFilterOptions(ExceptionFilterOptions value) { this.exceptionFilterOptions = value; } + + @JsonProperty("ExceptionInfoArguments") + public ExceptionInfoArgumentsClass getExceptionInfoArguments() { return exceptionInfoArguments; } + @JsonProperty("ExceptionInfoArguments") + public void setExceptionInfoArguments(ExceptionInfoArgumentsClass value) { this.exceptionInfoArguments = value; } + + @JsonProperty("ExceptionInfoRequest") + public ExceptionInfoRequestClass getExceptionInfoRequest() { return exceptionInfoRequest; } + @JsonProperty("ExceptionInfoRequest") + public void setExceptionInfoRequest(ExceptionInfoRequestClass value) { this.exceptionInfoRequest = value; } + + @JsonProperty("ExceptionInfoResponse") + public ExceptionInfoResponseClass getExceptionInfoResponse() { return exceptionInfoResponse; } + @JsonProperty("ExceptionInfoResponse") + public void setExceptionInfoResponse(ExceptionInfoResponseClass value) { this.exceptionInfoResponse = value; } + + @JsonProperty("ExceptionOptions") + public ExceptionOptions getExceptionOptions() { return exceptionOptions; } + @JsonProperty("ExceptionOptions") + public void setExceptionOptions(ExceptionOptions value) { this.exceptionOptions = value; } + + @JsonProperty("ExceptionPathSegment") + public ExceptionPathSegment getExceptionPathSegment() { return exceptionPathSegment; } + @JsonProperty("ExceptionPathSegment") + public void setExceptionPathSegment(ExceptionPathSegment value) { this.exceptionPathSegment = value; } + + @JsonProperty("ExitedEvent") + public ExitedEventClass getExitedEvent() { return exitedEvent; } + @JsonProperty("ExitedEvent") + public void setExitedEvent(ExitedEventClass value) { this.exitedEvent = value; } + + @JsonProperty("FunctionBreakpoint") + public FunctionBreakpoint getFunctionBreakpoint() { return functionBreakpoint; } + @JsonProperty("FunctionBreakpoint") + public void setFunctionBreakpoint(FunctionBreakpoint value) { this.functionBreakpoint = value; } + + @JsonProperty("GotoArguments") + public GotoArgumentsClass getGotoArguments() { return gotoArguments; } + @JsonProperty("GotoArguments") + public void setGotoArguments(GotoArgumentsClass value) { this.gotoArguments = value; } + + @JsonProperty("GotoRequest") + public GotoRequestClass getGotoRequest() { return gotoRequest; } + @JsonProperty("GotoRequest") + public void setGotoRequest(GotoRequestClass value) { this.gotoRequest = value; } + + @JsonProperty("GotoResponse") + public GotoResponseClass getGotoResponse() { return gotoResponse; } + @JsonProperty("GotoResponse") + public void setGotoResponse(GotoResponseClass value) { this.gotoResponse = value; } + + @JsonProperty("GotoTarget") + public GotoTarget getGotoTarget() { return gotoTarget; } + @JsonProperty("GotoTarget") + public void setGotoTarget(GotoTarget value) { this.gotoTarget = value; } + + @JsonProperty("GotoTargetsArguments") + public GotoTargetsArgumentsClass getGotoTargetsArguments() { return gotoTargetsArguments; } + @JsonProperty("GotoTargetsArguments") + public void setGotoTargetsArguments(GotoTargetsArgumentsClass value) { this.gotoTargetsArguments = value; } + + @JsonProperty("GotoTargetsRequest") + public GotoTargetsRequestClass getGotoTargetsRequest() { return gotoTargetsRequest; } + @JsonProperty("GotoTargetsRequest") + public void setGotoTargetsRequest(GotoTargetsRequestClass value) { this.gotoTargetsRequest = value; } + + @JsonProperty("GotoTargetsResponse") + public GotoTargetsResponseClass getGotoTargetsResponse() { return gotoTargetsResponse; } + @JsonProperty("GotoTargetsResponse") + public void setGotoTargetsResponse(GotoTargetsResponseClass value) { this.gotoTargetsResponse = value; } + + @JsonProperty("InitializedEvent") + public InitializedEventClass getInitializedEvent() { return initializedEvent; } + @JsonProperty("InitializedEvent") + public void setInitializedEvent(InitializedEventClass value) { this.initializedEvent = value; } + + @JsonProperty("InitializeRequest") + public InitializeRequestClass getInitializeRequest() { return initializeRequest; } + @JsonProperty("InitializeRequest") + public void setInitializeRequest(InitializeRequestClass value) { this.initializeRequest = value; } + + @JsonProperty("InitializeRequestArguments") + public InitializeRequestArgumentsClass getInitializeRequestArguments() { return initializeRequestArguments; } + @JsonProperty("InitializeRequestArguments") + public void setInitializeRequestArguments(InitializeRequestArgumentsClass value) { this.initializeRequestArguments = value; } + + @JsonProperty("InitializeResponse") + public InitializeResponseClass getInitializeResponse() { return initializeResponse; } + @JsonProperty("InitializeResponse") + public void setInitializeResponse(InitializeResponseClass value) { this.initializeResponse = value; } + + @JsonProperty("InstructionBreakpoint") + public InstructionBreakpoint getInstructionBreakpoint() { return instructionBreakpoint; } + @JsonProperty("InstructionBreakpoint") + public void setInstructionBreakpoint(InstructionBreakpoint value) { this.instructionBreakpoint = value; } + + @JsonProperty("InvalidatedAreas") + public String getInvalidatedAreas() { return invalidatedAreas; } + @JsonProperty("InvalidatedAreas") + public void setInvalidatedAreas(String value) { this.invalidatedAreas = value; } + + @JsonProperty("InvalidatedEvent") + public InvalidatedEventClass getInvalidatedEvent() { return invalidatedEvent; } + @JsonProperty("InvalidatedEvent") + public void setInvalidatedEvent(InvalidatedEventClass value) { this.invalidatedEvent = value; } + + @JsonProperty("LaunchRequest") + public LaunchRequestClass getLaunchRequest() { return launchRequest; } + @JsonProperty("LaunchRequest") + public void setLaunchRequest(LaunchRequestClass value) { this.launchRequest = value; } + + @JsonProperty("LaunchRequestArguments") + public LaunchRequestArgumentsClass getLaunchRequestArguments() { return launchRequestArguments; } + @JsonProperty("LaunchRequestArguments") + public void setLaunchRequestArguments(LaunchRequestArgumentsClass value) { this.launchRequestArguments = value; } + + @JsonProperty("LaunchResponse") + public LaunchResponseClass getLaunchResponse() { return launchResponse; } + @JsonProperty("LaunchResponse") + public void setLaunchResponse(LaunchResponseClass value) { this.launchResponse = value; } + + @JsonProperty("LoadedSourceEvent") + public LoadedSourceEventClass getLoadedSourceEvent() { return loadedSourceEvent; } + @JsonProperty("LoadedSourceEvent") + public void setLoadedSourceEvent(LoadedSourceEventClass value) { this.loadedSourceEvent = value; } + + @JsonProperty("LoadedSourcesArguments") + public Map getLoadedSourcesArguments() { return loadedSourcesArguments; } + @JsonProperty("LoadedSourcesArguments") + public void setLoadedSourcesArguments(Map value) { this.loadedSourcesArguments = value; } + + @JsonProperty("LoadedSourcesRequest") + public LoadedSourcesRequestClass getLoadedSourcesRequest() { return loadedSourcesRequest; } + @JsonProperty("LoadedSourcesRequest") + public void setLoadedSourcesRequest(LoadedSourcesRequestClass value) { this.loadedSourcesRequest = value; } + + @JsonProperty("LoadedSourcesResponse") + public LoadedSourcesResponseClass getLoadedSourcesResponse() { return loadedSourcesResponse; } + @JsonProperty("LoadedSourcesResponse") + public void setLoadedSourcesResponse(LoadedSourcesResponseClass value) { this.loadedSourcesResponse = value; } + + @JsonProperty("MemoryEvent") + public MemoryEventClass getMemoryEvent() { return memoryEvent; } + @JsonProperty("MemoryEvent") + public void setMemoryEvent(MemoryEventClass value) { this.memoryEvent = value; } + + @JsonProperty("Message") + public Message getMessage() { return message; } + @JsonProperty("Message") + public void setMessage(Message value) { this.message = value; } + + @JsonProperty("Module") + public Module getModule() { return module; } + @JsonProperty("Module") + public void setModule(Module value) { this.module = value; } + + @JsonProperty("ModuleEvent") + public ModuleEventClass getModuleEvent() { return moduleEvent; } + @JsonProperty("ModuleEvent") + public void setModuleEvent(ModuleEventClass value) { this.moduleEvent = value; } + + @JsonProperty("ModulesArguments") + public ModulesArgumentsClass getModulesArguments() { return modulesArguments; } + @JsonProperty("ModulesArguments") + public void setModulesArguments(ModulesArgumentsClass value) { this.modulesArguments = value; } + + @JsonProperty("ModulesRequest") + public ModulesRequestClass getModulesRequest() { return modulesRequest; } + @JsonProperty("ModulesRequest") + public void setModulesRequest(ModulesRequestClass value) { this.modulesRequest = value; } + + @JsonProperty("ModulesResponse") + public ModulesResponseClass getModulesResponse() { return modulesResponse; } + @JsonProperty("ModulesResponse") + public void setModulesResponse(ModulesResponseClass value) { this.modulesResponse = value; } + + @JsonProperty("NextArguments") + public NextArgumentsClass getNextArguments() { return nextArguments; } + @JsonProperty("NextArguments") + public void setNextArguments(NextArgumentsClass value) { this.nextArguments = value; } + + @JsonProperty("NextRequest") + public NextRequestClass getNextRequest() { return nextRequest; } + @JsonProperty("NextRequest") + public void setNextRequest(NextRequestClass value) { this.nextRequest = value; } + + @JsonProperty("NextResponse") + public NextResponseClass getNextResponse() { return nextResponse; } + @JsonProperty("NextResponse") + public void setNextResponse(NextResponseClass value) { this.nextResponse = value; } + + @JsonProperty("OutputEvent") + public OutputEventClass getOutputEvent() { return outputEvent; } + @JsonProperty("OutputEvent") + public void setOutputEvent(OutputEventClass value) { this.outputEvent = value; } + + @JsonProperty("PauseArguments") + public PauseArgumentsClass getPauseArguments() { return pauseArguments; } + @JsonProperty("PauseArguments") + public void setPauseArguments(PauseArgumentsClass value) { this.pauseArguments = value; } + + @JsonProperty("PauseRequest") + public PauseRequestClass getPauseRequest() { return pauseRequest; } + @JsonProperty("PauseRequest") + public void setPauseRequest(PauseRequestClass value) { this.pauseRequest = value; } + + @JsonProperty("PauseResponse") + public PauseResponseClass getPauseResponse() { return pauseResponse; } + @JsonProperty("PauseResponse") + public void setPauseResponse(PauseResponseClass value) { this.pauseResponse = value; } + + @JsonProperty("ProcessEvent") + public ProcessEventClass getProcessEvent() { return processEvent; } + @JsonProperty("ProcessEvent") + public void setProcessEvent(ProcessEventClass value) { this.processEvent = value; } + + @JsonProperty("ProgressEndEvent") + public ProgressEndEventClass getProgressEndEvent() { return progressEndEvent; } + @JsonProperty("ProgressEndEvent") + public void setProgressEndEvent(ProgressEndEventClass value) { this.progressEndEvent = value; } + + @JsonProperty("ProgressStartEvent") + public ProgressStartEventClass getProgressStartEvent() { return progressStartEvent; } + @JsonProperty("ProgressStartEvent") + public void setProgressStartEvent(ProgressStartEventClass value) { this.progressStartEvent = value; } + + @JsonProperty("ProgressUpdateEvent") + public ProgressUpdateEventClass getProgressUpdateEvent() { return progressUpdateEvent; } + @JsonProperty("ProgressUpdateEvent") + public void setProgressUpdateEvent(ProgressUpdateEventClass value) { this.progressUpdateEvent = value; } + + @JsonProperty("ProtocolMessage") + public BaseProtocol getProtocolMessage() { return protocolMessage; } + @JsonProperty("ProtocolMessage") + public void setProtocolMessage(BaseProtocol value) { this.protocolMessage = value; } + + @JsonProperty("ReadMemoryArguments") + public ReadMemoryArgumentsClass getReadMemoryArguments() { return readMemoryArguments; } + @JsonProperty("ReadMemoryArguments") + public void setReadMemoryArguments(ReadMemoryArgumentsClass value) { this.readMemoryArguments = value; } + + @JsonProperty("ReadMemoryRequest") + public ReadMemoryRequestClass getReadMemoryRequest() { return readMemoryRequest; } + @JsonProperty("ReadMemoryRequest") + public void setReadMemoryRequest(ReadMemoryRequestClass value) { this.readMemoryRequest = value; } + + @JsonProperty("ReadMemoryResponse") + public ReadMemoryResponseClass getReadMemoryResponse() { return readMemoryResponse; } + @JsonProperty("ReadMemoryResponse") + public void setReadMemoryResponse(ReadMemoryResponseClass value) { this.readMemoryResponse = value; } + + @JsonProperty("Request") + public Request getRequest() { return request; } + @JsonProperty("Request") + public void setRequest(Request value) { this.request = value; } + + @JsonProperty("Response") + public Response getResponse() { return response; } + @JsonProperty("Response") + public void setResponse(Response value) { this.response = value; } + + @JsonProperty("RestartArguments") + public RestartArgumentsClass getRestartArguments() { return restartArguments; } + @JsonProperty("RestartArguments") + public void setRestartArguments(RestartArgumentsClass value) { this.restartArguments = value; } + + @JsonProperty("RestartFrameArguments") + public RestartFrameArgumentsClass getRestartFrameArguments() { return restartFrameArguments; } + @JsonProperty("RestartFrameArguments") + public void setRestartFrameArguments(RestartFrameArgumentsClass value) { this.restartFrameArguments = value; } + + @JsonProperty("RestartFrameRequest") + public RestartFrameRequestClass getRestartFrameRequest() { return restartFrameRequest; } + @JsonProperty("RestartFrameRequest") + public void setRestartFrameRequest(RestartFrameRequestClass value) { this.restartFrameRequest = value; } + + @JsonProperty("RestartFrameResponse") + public RestartFrameResponseClass getRestartFrameResponse() { return restartFrameResponse; } + @JsonProperty("RestartFrameResponse") + public void setRestartFrameResponse(RestartFrameResponseClass value) { this.restartFrameResponse = value; } + + @JsonProperty("RestartRequest") + public RestartRequestClass getRestartRequest() { return restartRequest; } + @JsonProperty("RestartRequest") + public void setRestartRequest(RestartRequestClass value) { this.restartRequest = value; } + + @JsonProperty("RestartResponse") + public RestartResponseClass getRestartResponse() { return restartResponse; } + @JsonProperty("RestartResponse") + public void setRestartResponse(RestartResponseClass value) { this.restartResponse = value; } + + @JsonProperty("ReverseContinueArguments") + public ReverseContinueArgumentsClass getReverseContinueArguments() { return reverseContinueArguments; } + @JsonProperty("ReverseContinueArguments") + public void setReverseContinueArguments(ReverseContinueArgumentsClass value) { this.reverseContinueArguments = value; } + + @JsonProperty("ReverseContinueRequest") + public ReverseContinueRequestClass getReverseContinueRequest() { return reverseContinueRequest; } + @JsonProperty("ReverseContinueRequest") + public void setReverseContinueRequest(ReverseContinueRequestClass value) { this.reverseContinueRequest = value; } + + @JsonProperty("ReverseContinueResponse") + public ReverseContinueResponseClass getReverseContinueResponse() { return reverseContinueResponse; } + @JsonProperty("ReverseContinueResponse") + public void setReverseContinueResponse(ReverseContinueResponseClass value) { this.reverseContinueResponse = value; } + + @JsonProperty("RunInTerminalRequest") + public RunInTerminalRequestClass getRunInTerminalRequest() { return runInTerminalRequest; } + @JsonProperty("RunInTerminalRequest") + public void setRunInTerminalRequest(RunInTerminalRequestClass value) { this.runInTerminalRequest = value; } + + @JsonProperty("RunInTerminalRequestArguments") + public RunInTerminalRequestArgumentsClass getRunInTerminalRequestArguments() { return runInTerminalRequestArguments; } + @JsonProperty("RunInTerminalRequestArguments") + public void setRunInTerminalRequestArguments(RunInTerminalRequestArgumentsClass value) { this.runInTerminalRequestArguments = value; } + + @JsonProperty("RunInTerminalResponse") + public RunInTerminalResponseClass getRunInTerminalResponse() { return runInTerminalResponse; } + @JsonProperty("RunInTerminalResponse") + public void setRunInTerminalResponse(RunInTerminalResponseClass value) { this.runInTerminalResponse = value; } + + @JsonProperty("Scope") + public Scope getScope() { return scope; } + @JsonProperty("Scope") + public void setScope(Scope value) { this.scope = value; } + + @JsonProperty("ScopesArguments") + public ScopesArgumentsClass getScopesArguments() { return scopesArguments; } + @JsonProperty("ScopesArguments") + public void setScopesArguments(ScopesArgumentsClass value) { this.scopesArguments = value; } + + @JsonProperty("ScopesRequest") + public ScopesRequestClass getScopesRequest() { return scopesRequest; } + @JsonProperty("ScopesRequest") + public void setScopesRequest(ScopesRequestClass value) { this.scopesRequest = value; } + + @JsonProperty("ScopesResponse") + public ScopesResponseClass getScopesResponse() { return scopesResponse; } + @JsonProperty("ScopesResponse") + public void setScopesResponse(ScopesResponseClass value) { this.scopesResponse = value; } + + @JsonProperty("SetBreakpointsArguments") + public SetBreakpointsArgumentsClass getSetBreakpointsArguments() { return setBreakpointsArguments; } + @JsonProperty("SetBreakpointsArguments") + public void setSetBreakpointsArguments(SetBreakpointsArgumentsClass value) { this.setBreakpointsArguments = value; } + + @JsonProperty("SetBreakpointsRequest") + public SetBreakpointsRequestClass getSetBreakpointsRequest() { return setBreakpointsRequest; } + @JsonProperty("SetBreakpointsRequest") + public void setSetBreakpointsRequest(SetBreakpointsRequestClass value) { this.setBreakpointsRequest = value; } + + @JsonProperty("SetBreakpointsResponse") + public SetBreakpointsResponseClass getSetBreakpointsResponse() { return setBreakpointsResponse; } + @JsonProperty("SetBreakpointsResponse") + public void setSetBreakpointsResponse(SetBreakpointsResponseClass value) { this.setBreakpointsResponse = value; } + + @JsonProperty("SetDataBreakpointsArguments") + public SetDataBreakpointsArgumentsClass getSetDataBreakpointsArguments() { return setDataBreakpointsArguments; } + @JsonProperty("SetDataBreakpointsArguments") + public void setSetDataBreakpointsArguments(SetDataBreakpointsArgumentsClass value) { this.setDataBreakpointsArguments = value; } + + @JsonProperty("SetDataBreakpointsRequest") + public SetDataBreakpointsRequestClass getSetDataBreakpointsRequest() { return setDataBreakpointsRequest; } + @JsonProperty("SetDataBreakpointsRequest") + public void setSetDataBreakpointsRequest(SetDataBreakpointsRequestClass value) { this.setDataBreakpointsRequest = value; } + + @JsonProperty("SetDataBreakpointsResponse") + public SetDataBreakpointsResponseClass getSetDataBreakpointsResponse() { return setDataBreakpointsResponse; } + @JsonProperty("SetDataBreakpointsResponse") + public void setSetDataBreakpointsResponse(SetDataBreakpointsResponseClass value) { this.setDataBreakpointsResponse = value; } + + @JsonProperty("SetExceptionBreakpointsArguments") + public SetExceptionBreakpointsArgumentsClass getSetExceptionBreakpointsArguments() { return setExceptionBreakpointsArguments; } + @JsonProperty("SetExceptionBreakpointsArguments") + public void setSetExceptionBreakpointsArguments(SetExceptionBreakpointsArgumentsClass value) { this.setExceptionBreakpointsArguments = value; } + + @JsonProperty("SetExceptionBreakpointsRequest") + public SetExceptionBreakpointsRequestClass getSetExceptionBreakpointsRequest() { return setExceptionBreakpointsRequest; } + @JsonProperty("SetExceptionBreakpointsRequest") + public void setSetExceptionBreakpointsRequest(SetExceptionBreakpointsRequestClass value) { this.setExceptionBreakpointsRequest = value; } + + @JsonProperty("SetExceptionBreakpointsResponse") + public SetExceptionBreakpointsResponseClass getSetExceptionBreakpointsResponse() { return setExceptionBreakpointsResponse; } + @JsonProperty("SetExceptionBreakpointsResponse") + public void setSetExceptionBreakpointsResponse(SetExceptionBreakpointsResponseClass value) { this.setExceptionBreakpointsResponse = value; } + + @JsonProperty("SetExpressionArguments") + public SetExpressionArgumentsClass getSetExpressionArguments() { return setExpressionArguments; } + @JsonProperty("SetExpressionArguments") + public void setSetExpressionArguments(SetExpressionArgumentsClass value) { this.setExpressionArguments = value; } + + @JsonProperty("SetExpressionRequest") + public SetExpressionRequestClass getSetExpressionRequest() { return setExpressionRequest; } + @JsonProperty("SetExpressionRequest") + public void setSetExpressionRequest(SetExpressionRequestClass value) { this.setExpressionRequest = value; } + + @JsonProperty("SetExpressionResponse") + public SetExpressionResponseClass getSetExpressionResponse() { return setExpressionResponse; } + @JsonProperty("SetExpressionResponse") + public void setSetExpressionResponse(SetExpressionResponseClass value) { this.setExpressionResponse = value; } + + @JsonProperty("SetFunctionBreakpointsArguments") + public SetFunctionBreakpointsArgumentsClass getSetFunctionBreakpointsArguments() { return setFunctionBreakpointsArguments; } + @JsonProperty("SetFunctionBreakpointsArguments") + public void setSetFunctionBreakpointsArguments(SetFunctionBreakpointsArgumentsClass value) { this.setFunctionBreakpointsArguments = value; } + + @JsonProperty("SetFunctionBreakpointsRequest") + public SetFunctionBreakpointsRequestClass getSetFunctionBreakpointsRequest() { return setFunctionBreakpointsRequest; } + @JsonProperty("SetFunctionBreakpointsRequest") + public void setSetFunctionBreakpointsRequest(SetFunctionBreakpointsRequestClass value) { this.setFunctionBreakpointsRequest = value; } + + @JsonProperty("SetFunctionBreakpointsResponse") + public SetFunctionBreakpointsResponseClass getSetFunctionBreakpointsResponse() { return setFunctionBreakpointsResponse; } + @JsonProperty("SetFunctionBreakpointsResponse") + public void setSetFunctionBreakpointsResponse(SetFunctionBreakpointsResponseClass value) { this.setFunctionBreakpointsResponse = value; } + + @JsonProperty("SetInstructionBreakpointsArguments") + public SetInstructionBreakpointsArgumentsClass getSetInstructionBreakpointsArguments() { return setInstructionBreakpointsArguments; } + @JsonProperty("SetInstructionBreakpointsArguments") + public void setSetInstructionBreakpointsArguments(SetInstructionBreakpointsArgumentsClass value) { this.setInstructionBreakpointsArguments = value; } + + @JsonProperty("SetInstructionBreakpointsRequest") + public SetInstructionBreakpointsRequestClass getSetInstructionBreakpointsRequest() { return setInstructionBreakpointsRequest; } + @JsonProperty("SetInstructionBreakpointsRequest") + public void setSetInstructionBreakpointsRequest(SetInstructionBreakpointsRequestClass value) { this.setInstructionBreakpointsRequest = value; } + + @JsonProperty("SetInstructionBreakpointsResponse") + public SetInstructionBreakpointsResponseClass getSetInstructionBreakpointsResponse() { return setInstructionBreakpointsResponse; } + @JsonProperty("SetInstructionBreakpointsResponse") + public void setSetInstructionBreakpointsResponse(SetInstructionBreakpointsResponseClass value) { this.setInstructionBreakpointsResponse = value; } + + @JsonProperty("SetVariableArguments") + public SetVariableArgumentsClass getSetVariableArguments() { return setVariableArguments; } + @JsonProperty("SetVariableArguments") + public void setSetVariableArguments(SetVariableArgumentsClass value) { this.setVariableArguments = value; } + + @JsonProperty("SetVariableRequest") + public SetVariableRequestClass getSetVariableRequest() { return setVariableRequest; } + @JsonProperty("SetVariableRequest") + public void setSetVariableRequest(SetVariableRequestClass value) { this.setVariableRequest = value; } + + @JsonProperty("SetVariableResponse") + public SetVariableResponseClass getSetVariableResponse() { return setVariableResponse; } + @JsonProperty("SetVariableResponse") + public void setSetVariableResponse(SetVariableResponseClass value) { this.setVariableResponse = value; } + + @JsonProperty("Source") + public Source getSource() { return source; } + @JsonProperty("Source") + public void setSource(Source value) { this.source = value; } + + @JsonProperty("SourceArguments") + public SourceArgumentsClass getSourceArguments() { return sourceArguments; } + @JsonProperty("SourceArguments") + public void setSourceArguments(SourceArgumentsClass value) { this.sourceArguments = value; } + + @JsonProperty("SourceBreakpoint") + public SourceBreakpoint getSourceBreakpoint() { return sourceBreakpoint; } + @JsonProperty("SourceBreakpoint") + public void setSourceBreakpoint(SourceBreakpoint value) { this.sourceBreakpoint = value; } + + @JsonProperty("SourceRequest") + public SourceRequestClass getSourceRequest() { return sourceRequest; } + @JsonProperty("SourceRequest") + public void setSourceRequest(SourceRequestClass value) { this.sourceRequest = value; } + + @JsonProperty("SourceResponse") + public SourceResponseClass getSourceResponse() { return sourceResponse; } + @JsonProperty("SourceResponse") + public void setSourceResponse(SourceResponseClass value) { this.sourceResponse = value; } + + @JsonProperty("StackFrame") + public StackFrame getStackFrame() { return stackFrame; } + @JsonProperty("StackFrame") + public void setStackFrame(StackFrame value) { this.stackFrame = value; } + + @JsonProperty("StackFrameFormat") + public StackFrameFormat getStackFrameFormat() { return stackFrameFormat; } + @JsonProperty("StackFrameFormat") + public void setStackFrameFormat(StackFrameFormat value) { this.stackFrameFormat = value; } + + @JsonProperty("StackTraceArguments") + public StackTraceArgumentsClass getStackTraceArguments() { return stackTraceArguments; } + @JsonProperty("StackTraceArguments") + public void setStackTraceArguments(StackTraceArgumentsClass value) { this.stackTraceArguments = value; } + + @JsonProperty("StackTraceRequest") + public StackTraceRequestClass getStackTraceRequest() { return stackTraceRequest; } + @JsonProperty("StackTraceRequest") + public void setStackTraceRequest(StackTraceRequestClass value) { this.stackTraceRequest = value; } + + @JsonProperty("StackTraceResponse") + public StackTraceResponseClass getStackTraceResponse() { return stackTraceResponse; } + @JsonProperty("StackTraceResponse") + public void setStackTraceResponse(StackTraceResponseClass value) { this.stackTraceResponse = value; } + + @JsonProperty("StartDebuggingRequest") + public StartDebuggingRequestClass getStartDebuggingRequest() { return startDebuggingRequest; } + @JsonProperty("StartDebuggingRequest") + public void setStartDebuggingRequest(StartDebuggingRequestClass value) { this.startDebuggingRequest = value; } + + @JsonProperty("StartDebuggingRequestArguments") + public StartDebuggingRequestArgumentsClass getStartDebuggingRequestArguments() { return startDebuggingRequestArguments; } + @JsonProperty("StartDebuggingRequestArguments") + public void setStartDebuggingRequestArguments(StartDebuggingRequestArgumentsClass value) { this.startDebuggingRequestArguments = value; } + + @JsonProperty("StartDebuggingResponse") + public StartDebuggingResponseClass getStartDebuggingResponse() { return startDebuggingResponse; } + @JsonProperty("StartDebuggingResponse") + public void setStartDebuggingResponse(StartDebuggingResponseClass value) { this.startDebuggingResponse = value; } + + @JsonProperty("StepBackArguments") + public StepBackArgumentsClass getStepBackArguments() { return stepBackArguments; } + @JsonProperty("StepBackArguments") + public void setStepBackArguments(StepBackArgumentsClass value) { this.stepBackArguments = value; } + + @JsonProperty("StepBackRequest") + public StepBackRequestClass getStepBackRequest() { return stepBackRequest; } + @JsonProperty("StepBackRequest") + public void setStepBackRequest(StepBackRequestClass value) { this.stepBackRequest = value; } + + @JsonProperty("StepBackResponse") + public StepBackResponseClass getStepBackResponse() { return stepBackResponse; } + @JsonProperty("StepBackResponse") + public void setStepBackResponse(StepBackResponseClass value) { this.stepBackResponse = value; } + + @JsonProperty("StepInArguments") + public StepInArgumentsClass getStepInArguments() { return stepInArguments; } + @JsonProperty("StepInArguments") + public void setStepInArguments(StepInArgumentsClass value) { this.stepInArguments = value; } + + @JsonProperty("StepInRequest") + public StepInRequestClass getStepInRequest() { return stepInRequest; } + @JsonProperty("StepInRequest") + public void setStepInRequest(StepInRequestClass value) { this.stepInRequest = value; } + + @JsonProperty("StepInResponse") + public StepInResponseClass getStepInResponse() { return stepInResponse; } + @JsonProperty("StepInResponse") + public void setStepInResponse(StepInResponseClass value) { this.stepInResponse = value; } + + @JsonProperty("StepInTarget") + public StepInTarget getStepInTarget() { return stepInTarget; } + @JsonProperty("StepInTarget") + public void setStepInTarget(StepInTarget value) { this.stepInTarget = value; } + + @JsonProperty("StepInTargetsArguments") + public StepInTargetsArgumentsClass getStepInTargetsArguments() { return stepInTargetsArguments; } + @JsonProperty("StepInTargetsArguments") + public void setStepInTargetsArguments(StepInTargetsArgumentsClass value) { this.stepInTargetsArguments = value; } + + @JsonProperty("StepInTargetsRequest") + public StepInTargetsRequestClass getStepInTargetsRequest() { return stepInTargetsRequest; } + @JsonProperty("StepInTargetsRequest") + public void setStepInTargetsRequest(StepInTargetsRequestClass value) { this.stepInTargetsRequest = value; } + + @JsonProperty("StepInTargetsResponse") + public StepInTargetsResponseClass getStepInTargetsResponse() { return stepInTargetsResponse; } + @JsonProperty("StepInTargetsResponse") + public void setStepInTargetsResponse(StepInTargetsResponseClass value) { this.stepInTargetsResponse = value; } + + @JsonProperty("StepOutArguments") + public StepOutArgumentsClass getStepOutArguments() { return stepOutArguments; } + @JsonProperty("StepOutArguments") + public void setStepOutArguments(StepOutArgumentsClass value) { this.stepOutArguments = value; } + + @JsonProperty("StepOutRequest") + public StepOutRequestClass getStepOutRequest() { return stepOutRequest; } + @JsonProperty("StepOutRequest") + public void setStepOutRequest(StepOutRequestClass value) { this.stepOutRequest = value; } + + @JsonProperty("StepOutResponse") + public StepOutResponseClass getStepOutResponse() { return stepOutResponse; } + @JsonProperty("StepOutResponse") + public void setStepOutResponse(StepOutResponseClass value) { this.stepOutResponse = value; } + + @JsonProperty("SteppingGranularity") + public SteppingGranularity getSteppingGranularity() { return steppingGranularity; } + @JsonProperty("SteppingGranularity") + public void setSteppingGranularity(SteppingGranularity value) { this.steppingGranularity = value; } + + @JsonProperty("StoppedEvent") + public StoppedEventClass getStoppedEvent() { return stoppedEvent; } + @JsonProperty("StoppedEvent") + public void setStoppedEvent(StoppedEventClass value) { this.stoppedEvent = value; } + + @JsonProperty("TerminateArguments") + public TerminateArgumentsClass getTerminateArguments() { return terminateArguments; } + @JsonProperty("TerminateArguments") + public void setTerminateArguments(TerminateArgumentsClass value) { this.terminateArguments = value; } + + @JsonProperty("TerminatedEvent") + public TerminatedEventClass getTerminatedEvent() { return terminatedEvent; } + @JsonProperty("TerminatedEvent") + public void setTerminatedEvent(TerminatedEventClass value) { this.terminatedEvent = value; } + + @JsonProperty("TerminateRequest") + public TerminateRequestClass getTerminateRequest() { return terminateRequest; } + @JsonProperty("TerminateRequest") + public void setTerminateRequest(TerminateRequestClass value) { this.terminateRequest = value; } + + @JsonProperty("TerminateResponse") + public TerminateResponseClass getTerminateResponse() { return terminateResponse; } + @JsonProperty("TerminateResponse") + public void setTerminateResponse(TerminateResponseClass value) { this.terminateResponse = value; } + + @JsonProperty("TerminateThreadsArguments") + public TerminateThreadsArgumentsClass getTerminateThreadsArguments() { return terminateThreadsArguments; } + @JsonProperty("TerminateThreadsArguments") + public void setTerminateThreadsArguments(TerminateThreadsArgumentsClass value) { this.terminateThreadsArguments = value; } + + @JsonProperty("TerminateThreadsRequest") + public TerminateThreadsRequestClass getTerminateThreadsRequest() { return terminateThreadsRequest; } + @JsonProperty("TerminateThreadsRequest") + public void setTerminateThreadsRequest(TerminateThreadsRequestClass value) { this.terminateThreadsRequest = value; } + + @JsonProperty("TerminateThreadsResponse") + public TerminateThreadsResponseClass getTerminateThreadsResponse() { return terminateThreadsResponse; } + @JsonProperty("TerminateThreadsResponse") + public void setTerminateThreadsResponse(TerminateThreadsResponseClass value) { this.terminateThreadsResponse = value; } + + @JsonProperty("Thread") + public Thread getThread() { return thread; } + @JsonProperty("Thread") + public void setThread(Thread value) { this.thread = value; } + + @JsonProperty("ThreadEvent") + public ThreadEventClass getThreadEvent() { return threadEvent; } + @JsonProperty("ThreadEvent") + public void setThreadEvent(ThreadEventClass value) { this.threadEvent = value; } + + @JsonProperty("ThreadsRequest") + public ThreadsRequestClass getThreadsRequest() { return threadsRequest; } + @JsonProperty("ThreadsRequest") + public void setThreadsRequest(ThreadsRequestClass value) { this.threadsRequest = value; } + + @JsonProperty("ThreadsResponse") + public ThreadsResponseClass getThreadsResponse() { return threadsResponse; } + @JsonProperty("ThreadsResponse") + public void setThreadsResponse(ThreadsResponseClass value) { this.threadsResponse = value; } + + @JsonProperty("ValueFormat") + public ValueFormat getValueFormat() { return valueFormat; } + @JsonProperty("ValueFormat") + public void setValueFormat(ValueFormat value) { this.valueFormat = value; } + + @JsonProperty("Variable") + public Variable getVariable() { return variable; } + @JsonProperty("Variable") + public void setVariable(Variable value) { this.variable = value; } + + @JsonProperty("VariablePresentationHint") + public VariablePresentationHint getVariablePresentationHint() { return variablePresentationHint; } + @JsonProperty("VariablePresentationHint") + public void setVariablePresentationHint(VariablePresentationHint value) { this.variablePresentationHint = value; } + + @JsonProperty("VariablesArguments") + public VariablesArgumentsClass getVariablesArguments() { return variablesArguments; } + @JsonProperty("VariablesArguments") + public void setVariablesArguments(VariablesArgumentsClass value) { this.variablesArguments = value; } + + @JsonProperty("VariablesRequest") + public VariablesRequestClass getVariablesRequest() { return variablesRequest; } + @JsonProperty("VariablesRequest") + public void setVariablesRequest(VariablesRequestClass value) { this.variablesRequest = value; } + + @JsonProperty("VariablesResponse") + public VariablesResponseClass getVariablesResponse() { return variablesResponse; } + @JsonProperty("VariablesResponse") + public void setVariablesResponse(VariablesResponseClass value) { this.variablesResponse = value; } + + @JsonProperty("WriteMemoryArguments") + public WriteMemoryArgumentsClass getWriteMemoryArguments() { return writeMemoryArguments; } + @JsonProperty("WriteMemoryArguments") + public void setWriteMemoryArguments(WriteMemoryArgumentsClass value) { this.writeMemoryArguments = value; } + + @JsonProperty("WriteMemoryRequest") + public WriteMemoryRequestClass getWriteMemoryRequest() { return writeMemoryRequest; } + @JsonProperty("WriteMemoryRequest") + public void setWriteMemoryRequest(WriteMemoryRequestClass value) { this.writeMemoryRequest = value; } + + @JsonProperty("WriteMemoryResponse") + public WriteMemoryResponseClass getWriteMemoryResponse() { return writeMemoryResponse; } + @JsonProperty("WriteMemoryResponse") + public void setWriteMemoryResponse(WriteMemoryResponseClass value) { this.writeMemoryResponse = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArguments.java deleted file mode 100644 index e4e4d43..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArguments.java +++ /dev/null @@ -1,207 +0,0 @@ - -package org.tzi.use.monitor.adapter.python.dap; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyDescription; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arguments for `writeMemory` request. - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "memoryReference", - "offset", - "allowPartial", - "data" -}) -@Generated("jsonschema2pojo") -public class WriteMemoryArguments { - - /** - * Memory reference to the base location to which data should be written. - * (Required) - * - */ - @JsonProperty("memoryReference") - @JsonPropertyDescription("Memory reference to the base location to which data should be written.") - private String memoryReference; - /** - * Offset (in bytes) to be applied to the reference location before writing data. Can be negative. - * - */ - @JsonProperty("offset") - @JsonPropertyDescription("Offset (in bytes) to be applied to the reference location before writing data. Can be negative.") - private Integer offset; - /** - * Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties. - * If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not. - * - */ - @JsonProperty("allowPartial") - @JsonPropertyDescription("Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not.") - private Boolean allowPartial; - /** - * Bytes to write, encoded using base64. - * (Required) - * - */ - @JsonProperty("data") - @JsonPropertyDescription("Bytes to write, encoded using base64.") - private String data; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * Memory reference to the base location to which data should be written. - * (Required) - * - */ - @JsonProperty("memoryReference") - public String getMemoryReference() { - return memoryReference; - } - - /** - * Memory reference to the base location to which data should be written. - * (Required) - * - */ - @JsonProperty("memoryReference") - public void setMemoryReference(String memoryReference) { - this.memoryReference = memoryReference; - } - - /** - * Offset (in bytes) to be applied to the reference location before writing data. Can be negative. - * - */ - @JsonProperty("offset") - public Integer getOffset() { - return offset; - } - - /** - * Offset (in bytes) to be applied to the reference location before writing data. Can be negative. - * - */ - @JsonProperty("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties. - * If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not. - * - */ - @JsonProperty("allowPartial") - public Boolean getAllowPartial() { - return allowPartial; - } - - /** - * Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties. - * If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not. - * - */ - @JsonProperty("allowPartial") - public void setAllowPartial(Boolean allowPartial) { - this.allowPartial = allowPartial; - } - - /** - * Bytes to write, encoded using base64. - * (Required) - * - */ - @JsonProperty("data") - public String getData() { - return data; - } - - /** - * Bytes to write, encoded using base64. - * (Required) - * - */ - @JsonProperty("data") - public void setData(String data) { - this.data = data; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(WriteMemoryArguments.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); - sb.append("memoryReference"); - sb.append('='); - sb.append(((this.memoryReference == null)?"":this.memoryReference)); - sb.append(','); - sb.append("offset"); - sb.append('='); - sb.append(((this.offset == null)?"":this.offset)); - sb.append(','); - sb.append("allowPartial"); - sb.append('='); - sb.append(((this.allowPartial == null)?"":this.allowPartial)); - sb.append(','); - sb.append("data"); - sb.append('='); - sb.append(((this.data == null)?"":this.data)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length()- 1)) == ',') { - sb.setCharAt((sb.length()- 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); - } - - @Override - public int hashCode() { - int result = 1; - result = ((result* 31)+((this.memoryReference == null)? 0 :this.memoryReference.hashCode())); - result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); - result = ((result* 31)+((this.offset == null)? 0 :this.offset.hashCode())); - result = ((result* 31)+((this.allowPartial == null)? 0 :this.allowPartial.hashCode())); - result = ((result* 31)+((this.data == null)? 0 :this.data.hashCode())); - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof WriteMemoryArguments) == false) { - return false; - } - WriteMemoryArguments rhs = ((WriteMemoryArguments) other); - return ((((((this.memoryReference == rhs.memoryReference)||((this.memoryReference!= null)&&this.memoryReference.equals(rhs.memoryReference)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.offset == rhs.offset)||((this.offset!= null)&&this.offset.equals(rhs.offset))))&&((this.allowPartial == rhs.allowPartial)||((this.allowPartial!= null)&&this.allowPartial.equals(rhs.allowPartial))))&&((this.data == rhs.data)||((this.data!= null)&&this.data.equals(rhs.data)))); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArgumentsClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArgumentsClass.java new file mode 100644 index 0000000..8b5d23b --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryArgumentsClass.java @@ -0,0 +1,51 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `writeMemory` request. + */ +public class WriteMemoryArgumentsClass { + private Boolean allowPartial; + private String data; + private String memoryReference; + private Long offset; + + /** + * Property to control partial writes. If true, the debug adapter should attempt to write + * memory even if the entire memory region is not writable. In such a case the debug adapter + * should stop after hitting the first byte of memory that cannot be written and return the + * number of bytes written in the response via the `offset` and `bytesWritten` properties. + * If false or missing, a debug adapter should attempt to verify the region is writable + * before writing, and fail the response if it is not. + */ + @JsonProperty("allowPartial") + public Boolean getAllowPartial() { return allowPartial; } + @JsonProperty("allowPartial") + public void setAllowPartial(Boolean value) { this.allowPartial = value; } + + /** + * Bytes to write, encoded using base64. + */ + @JsonProperty("data") + public String getData() { return data; } + @JsonProperty("data") + public void setData(String value) { this.data = value; } + + /** + * Memory reference to the base location to which data should be written. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * Offset (in bytes) to be applied to the reference location before writing data. Can be + * negative. + */ + @JsonProperty("offset") + public Long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(Long value) { this.offset = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestArguments.java new file mode 100644 index 0000000..86a9205 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestArguments.java @@ -0,0 +1,51 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Arguments for `writeMemory` request. + */ +public class WriteMemoryRequestArguments { + private Boolean allowPartial; + private String data; + private String memoryReference; + private Long offset; + + /** + * Property to control partial writes. If true, the debug adapter should attempt to write + * memory even if the entire memory region is not writable. In such a case the debug adapter + * should stop after hitting the first byte of memory that cannot be written and return the + * number of bytes written in the response via the `offset` and `bytesWritten` properties. + * If false or missing, a debug adapter should attempt to verify the region is writable + * before writing, and fail the response if it is not. + */ + @JsonProperty("allowPartial") + public Boolean getAllowPartial() { return allowPartial; } + @JsonProperty("allowPartial") + public void setAllowPartial(Boolean value) { this.allowPartial = value; } + + /** + * Bytes to write, encoded using base64. + */ + @JsonProperty("data") + public String getData() { return data; } + @JsonProperty("data") + public void setData(String value) { this.data = value; } + + /** + * Memory reference to the base location to which data should be written. + */ + @JsonProperty("memoryReference") + public String getMemoryReference() { return memoryReference; } + @JsonProperty("memoryReference") + public void setMemoryReference(String value) { this.memoryReference = value; } + + /** + * Offset (in bytes) to be applied to the reference location before writing data. Can be + * negative. + */ + @JsonProperty("offset") + public Long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(Long value) { this.offset = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestClass.java new file mode 100644 index 0000000..50dbf42 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestClass.java @@ -0,0 +1,56 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * A client or debug adapter initiated request. + * + * Writes bytes to memory at the provided location. + * Clients should only call this request if the corresponding capability + * `supportsWriteMemoryRequest` is true. + */ +public class WriteMemoryRequestClass { + private long seq; + private AttachRequestType type; + private WriteMemoryRequestArguments arguments; + private WriteMemoryRequestCommand command; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachRequestType getType() { return type; } + @JsonProperty("type") + public void setType(AttachRequestType value) { this.type = value; } + + /** + * Object containing arguments for the command. + */ + @JsonProperty("arguments") + public WriteMemoryRequestArguments getArguments() { return arguments; } + @JsonProperty("arguments") + public void setArguments(WriteMemoryRequestArguments value) { this.arguments = value; } + + /** + * The command to execute. + */ + @JsonProperty("command") + public WriteMemoryRequestCommand getCommand() { return command; } + @JsonProperty("command") + public void setCommand(WriteMemoryRequestCommand value) { this.command = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestCommand.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestCommand.java new file mode 100644 index 0000000..b252a8f --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryRequestCommand.java @@ -0,0 +1,27 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import java.io.IOException; +import com.fasterxml.jackson.annotation.*; + +/** + * All dictionary values must be strings. + * + * Logical areas that can be invalidated by the `invalidated` event. + */ +public enum WriteMemoryRequestCommand { + WRITE_MEMORY; + + @JsonValue + public String toValue() { + switch (this) { + case WRITE_MEMORY: return "writeMemory"; + } + return null; + } + + @JsonCreator + public static WriteMemoryRequestCommand forValue(String value) throws IOException { + if (value.equals("writeMemory")) return WRITE_MEMORY; + throw new IOException("Cannot deserialize WriteMemoryRequestCommand"); + } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryResponseBody.java new file mode 100644 index 0000000..358f5e1 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryResponseBody.java @@ -0,0 +1,26 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +public class WriteMemoryResponseBody { + private Long bytesWritten; + private Long offset; + + /** + * Property that should be returned when `allowPartial` is true to indicate the number of + * bytes starting from address that were successfully written. + */ + @JsonProperty("bytesWritten") + public Long getBytesWritten() { return bytesWritten; } + @JsonProperty("bytesWritten") + public void setBytesWritten(Long value) { this.bytesWritten = value; } + + /** + * Property that should be returned when `allowPartial` is true to indicate the offset of + * the first byte of data successfully written. Can be negative. + */ + @JsonProperty("offset") + public Long getOffset() { return offset; } + @JsonProperty("offset") + public void setOffset(Long value) { this.offset = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryResponseClass.java new file mode 100644 index 0000000..b97d40d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/WriteMemoryResponseClass.java @@ -0,0 +1,87 @@ +package org.tzi.use.monitor.adapter.python.dap; + +import com.fasterxml.jackson.annotation.*; + +/** + * Base class of requests, responses, and events. + * + * Response for a request. + * + * Response to `writeMemory` request. + */ +public class WriteMemoryResponseClass { + private long seq; + private AttachResponseType type; + private WriteMemoryResponseBody body; + private String command; + private String message; + private long requestSeq; + private boolean success; + + /** + * Sequence number of the message (also known as message ID). The `seq` for the first + * message sent by a client or debug adapter is 1, and for each subsequent message is 1 + * greater than the previous message sent by that actor. `seq` can be used to order + * requests, responses, and events, and to associate requests with their corresponding + * responses. For protocol messages of type `request` the sequence number can be used to + * cancel the request. + */ + @JsonProperty("seq") + public long getSeq() { return seq; } + @JsonProperty("seq") + public void setSeq(long value) { this.seq = value; } + + /** + * Message type. + */ + @JsonProperty("type") + public AttachResponseType getType() { return type; } + @JsonProperty("type") + public void setType(AttachResponseType value) { this.type = value; } + + /** + * Contains request result if success is true and error details if success is false. + */ + @JsonProperty("body") + public WriteMemoryResponseBody getBody() { return body; } + @JsonProperty("body") + public void setBody(WriteMemoryResponseBody value) { this.body = value; } + + /** + * The command requested. + */ + @JsonProperty("command") + public String getCommand() { return command; } + @JsonProperty("command") + public void setCommand(String value) { this.command = value; } + + /** + * Contains the raw error in short form if `success` is false. + * This raw error might be interpreted by the client and is not shown in the UI. + * Some predefined values exist. + */ + @JsonProperty("message") + public String getMessage() { return message; } + @JsonProperty("message") + public void setMessage(String value) { this.message = value; } + + /** + * Sequence number of the corresponding request. + */ + @JsonProperty("request_seq") + public long getRequestSeq() { return requestSeq; } + @JsonProperty("request_seq") + public void setRequestSeq(long value) { this.requestSeq = value; } + + /** + * Outcome of the request. + * If true, the request was successful and the `body` attribute may contain the result of + * the request. + * If the value is false, the attribute `message` contains the error in short form and the + * `body` may contain additional information (see `ErrorResponse.body.error`). + */ + @JsonProperty("success") + public boolean getSuccess() { return success; } + @JsonProperty("success") + public void setSuccess(boolean value) { this.success = value; } +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachRequest.java deleted file mode 100644 index 883836f..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachRequest.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeName; - -import java.util.List; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonTypeName("attach") -public class AttachRequest extends Request { - - protected AttachRequestArguments arguments; - - public AttachRequest(Integer seq, AttachRequestArguments arguments) { - super(seq, "request", "attach"); - this.arguments = arguments; - } - - public AttachRequestArguments getArguments() { - return arguments; - } - - public void setArguments(AttachRequestArguments arguments) { - this.arguments = arguments; - } - - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class AttachRequestArguments { - private String localRoot; - private String clientOS; - private Boolean justMyCode; - private Boolean showReturnValue; - private String workspaceFolder; - @JsonProperty("__sessionId") - private String sessionId; - private Map connect; - private List> pathMappings; - private List debugOptions; - - public String getLocalRoot() { - return localRoot; - } - - public void setLocalRoot(String localRoot) { - this.localRoot = localRoot; - } - - public String getClientOS() { - return clientOS; - } - - public void setClientOS(String clientOS) { - this.clientOS = clientOS; - } - - public Boolean getJustMyCode() { - return justMyCode; - } - - public void setJustMyCode(Boolean justMyCode) { - this.justMyCode = justMyCode; - } - - public Boolean getShowReturnValue() { - return showReturnValue; - } - - public void setShowReturnValue(Boolean showReturnValue) { - this.showReturnValue = showReturnValue; - } - - public String getWorkspaceFolder() { - return workspaceFolder; - } - - public void setWorkspaceFolder(String workspaceFolder) { - this.workspaceFolder = workspaceFolder; - } - - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public Map getConnect() { - return connect; - } - - public void setConnect(Map connect) { - this.connect = connect; - } - - public List> getPathMappings() { - return pathMappings; - } - - public void setPathMappings(List> pathMappings) { - this.pathMappings = pathMappings; - } - - public List getDebugOptions() { - return debugOptions; - } - - public void setDebugOptions(List debugOptions) { - this.debugOptions = debugOptions; - } - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachResponse.java deleted file mode 100644 index 73ebd9f..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/AttachResponse.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonTypeName; - -@JsonTypeName("attach") -public class AttachResponse extends Response { - public AttachResponse() { - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/BreakpointEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/BreakpointEvent.java deleted file mode 100644 index a1bbb34..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/BreakpointEvent.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import org.tzi.use.monitor.adapter.python.dap.DAPEvent; - -public class BreakpointEvent implements DAPEvent { -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Capabilities.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Capabilities.java deleted file mode 100644 index 72c460b..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Capabilities.java +++ /dev/null @@ -1,381 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Capabilities { - - private Boolean supportsConfigurationDoneRequest; - private Boolean supportsFunctionBreakpoints; - private Boolean supportsConditionalBreakpoints; - private Boolean supportsHitConditionalBreakpoints; - private Boolean supportsEvaluateForHovers; - // private List exceptionBreakpointFilters; - private Boolean supportsStepBack; - private Boolean supportsSetVariable; - private Boolean supportsRestartFrame; - private Boolean supportsGotoTargetsRequest; - private Boolean supportsStepInTargetsRequest; - private Boolean supportsCompletionsRequest; - private List completionTriggerCharacters; - private Boolean supportsModulesRequest; - // private List additionalModuleColumns; -// private List supportedChecksumAlgorithms; - private Boolean supportsRestartRequest; - private Boolean supportsExceptionOptions; - private Boolean supportsValueFormattingOptions; - private Boolean supportsExceptionInfoRequest; - private Boolean supportTerminateDebuggee; - private Boolean supportSuspendDebuggee; - private Boolean supportsDelayedStackTraceLoading; - private Boolean supportsLoadedSourcesRequest; - private Boolean supportsLogPoints; - private Boolean supportsTerminateThreadsRequest; - private Boolean supportsSetExpression; - private Boolean supportsTerminateRequest; - private Boolean supportsDataBreakpoints; - private Boolean supportsReadMemoryRequest; - private Boolean supportsWriteMemoryRequest; - private Boolean supportsDisassembleRequest; - private Boolean supportsCancelRequest; - private Boolean supportsBreakpointLocationsRequest; - private Boolean supportsClipboardContext; - private Boolean supportsSteppingGranularity; - private Boolean supportsInstructionBreakpoints; - private Boolean supportsExceptionFilterOptions; - private Boolean supportsSingleThreadExecutionRequests; - - public Boolean getSupportsConfigurationDoneRequest() { - return supportsConfigurationDoneRequest; - } - - public void setSupportsConfigurationDoneRequest(Boolean supportsConfigurationDoneRequest) { - this.supportsConfigurationDoneRequest = supportsConfigurationDoneRequest; - } - - public Boolean getSupportsFunctionBreakpoints() { - return supportsFunctionBreakpoints; - } - - public void setSupportsFunctionBreakpoints(Boolean supportsFunctionBreakpoints) { - this.supportsFunctionBreakpoints = supportsFunctionBreakpoints; - } - - public Boolean getSupportsConditionalBreakpoints() { - return supportsConditionalBreakpoints; - } - - public void setSupportsConditionalBreakpoints(Boolean supportsConditionalBreakpoints) { - this.supportsConditionalBreakpoints = supportsConditionalBreakpoints; - } - - public Boolean getSupportsHitConditionalBreakpoints() { - return supportsHitConditionalBreakpoints; - } - - public void setSupportsHitConditionalBreakpoints(Boolean supportsHitConditionalBreakpoints) { - this.supportsHitConditionalBreakpoints = supportsHitConditionalBreakpoints; - } - - public Boolean getSupportsEvaluateForHovers() { - return supportsEvaluateForHovers; - } - - public void setSupportsEvaluateForHovers(Boolean supportsEvaluateForHovers) { - this.supportsEvaluateForHovers = supportsEvaluateForHovers; - } - - public Boolean getSupportsStepBack() { - return supportsStepBack; - } - - public void setSupportsStepBack(Boolean supportsStepBack) { - this.supportsStepBack = supportsStepBack; - } - - public Boolean getSupportsSetVariable() { - return supportsSetVariable; - } - - public void setSupportsSetVariable(Boolean supportsSetVariable) { - this.supportsSetVariable = supportsSetVariable; - } - - public Boolean getSupportsRestartFrame() { - return supportsRestartFrame; - } - - public void setSupportsRestartFrame(Boolean supportsRestartFrame) { - this.supportsRestartFrame = supportsRestartFrame; - } - - public Boolean getSupportsGotoTargetsRequest() { - return supportsGotoTargetsRequest; - } - - public void setSupportsGotoTargetsRequest(Boolean supportsGotoTargetsRequest) { - this.supportsGotoTargetsRequest = supportsGotoTargetsRequest; - } - - public Boolean getSupportsStepInTargetsRequest() { - return supportsStepInTargetsRequest; - } - - public void setSupportsStepInTargetsRequest(Boolean supportsStepInTargetsRequest) { - this.supportsStepInTargetsRequest = supportsStepInTargetsRequest; - } - - public Boolean getSupportsCompletionsRequest() { - return supportsCompletionsRequest; - } - - public void setSupportsCompletionsRequest(Boolean supportsCompletionsRequest) { - this.supportsCompletionsRequest = supportsCompletionsRequest; - } - - public List getCompletionTriggerCharacters() { - return completionTriggerCharacters; - } - - public void setCompletionTriggerCharacters(List completionTriggerCharacters) { - this.completionTriggerCharacters = completionTriggerCharacters; - } - - public Boolean getSupportsModulesRequest() { - return supportsModulesRequest; - } - - public void setSupportsModulesRequest(Boolean supportsModulesRequest) { - this.supportsModulesRequest = supportsModulesRequest; - } - - public Boolean getSupportsRestartRequest() { - return supportsRestartRequest; - } - - public void setSupportsRestartRequest(Boolean supportsRestartRequest) { - this.supportsRestartRequest = supportsRestartRequest; - } - - public Boolean getSupportsExceptionOptions() { - return supportsExceptionOptions; - } - - public void setSupportsExceptionOptions(Boolean supportsExceptionOptions) { - this.supportsExceptionOptions = supportsExceptionOptions; - } - - public Boolean getSupportsValueFormattingOptions() { - return supportsValueFormattingOptions; - } - - public void setSupportsValueFormattingOptions(Boolean supportsValueFormattingOptions) { - this.supportsValueFormattingOptions = supportsValueFormattingOptions; - } - - public Boolean getSupportsExceptionInfoRequest() { - return supportsExceptionInfoRequest; - } - - public void setSupportsExceptionInfoRequest(Boolean supportsExceptionInfoRequest) { - this.supportsExceptionInfoRequest = supportsExceptionInfoRequest; - } - - public Boolean getSupportTerminateDebuggee() { - return supportTerminateDebuggee; - } - - public void setSupportTerminateDebuggee(Boolean supportTerminateDebuggee) { - this.supportTerminateDebuggee = supportTerminateDebuggee; - } - - public Boolean getSupportSuspendDebuggee() { - return supportSuspendDebuggee; - } - - public void setSupportSuspendDebuggee(Boolean supportSuspendDebuggee) { - this.supportSuspendDebuggee = supportSuspendDebuggee; - } - - public Boolean getSupportsDelayedStackTraceLoading() { - return supportsDelayedStackTraceLoading; - } - - public void setSupportsDelayedStackTraceLoading(Boolean supportsDelayedStackTraceLoading) { - this.supportsDelayedStackTraceLoading = supportsDelayedStackTraceLoading; - } - - public Boolean getSupportsLoadedSourcesRequest() { - return supportsLoadedSourcesRequest; - } - - public void setSupportsLoadedSourcesRequest(Boolean supportsLoadedSourcesRequest) { - this.supportsLoadedSourcesRequest = supportsLoadedSourcesRequest; - } - - public Boolean getSupportsLogPoints() { - return supportsLogPoints; - } - - public void setSupportsLogPoints(Boolean supportsLogPoints) { - this.supportsLogPoints = supportsLogPoints; - } - - public Boolean getSupportsTerminateThreadsRequest() { - return supportsTerminateThreadsRequest; - } - - public void setSupportsTerminateThreadsRequest(Boolean supportsTerminateThreadsRequest) { - this.supportsTerminateThreadsRequest = supportsTerminateThreadsRequest; - } - - public Boolean getSupportsSetExpression() { - return supportsSetExpression; - } - - public void setSupportsSetExpression(Boolean supportsSetExpression) { - this.supportsSetExpression = supportsSetExpression; - } - - public Boolean getSupportsTerminateRequest() { - return supportsTerminateRequest; - } - - public void setSupportsTerminateRequest(Boolean supportsTerminateRequest) { - this.supportsTerminateRequest = supportsTerminateRequest; - } - - public Boolean getSupportsDataBreakpoints() { - return supportsDataBreakpoints; - } - - public void setSupportsDataBreakpoints(Boolean supportsDataBreakpoints) { - this.supportsDataBreakpoints = supportsDataBreakpoints; - } - - public Boolean getSupportsReadMemoryRequest() { - return supportsReadMemoryRequest; - } - - public void setSupportsReadMemoryRequest(Boolean supportsReadMemoryRequest) { - this.supportsReadMemoryRequest = supportsReadMemoryRequest; - } - - public Boolean getSupportsWriteMemoryRequest() { - return supportsWriteMemoryRequest; - } - - public void setSupportsWriteMemoryRequest(Boolean supportsWriteMemoryRequest) { - this.supportsWriteMemoryRequest = supportsWriteMemoryRequest; - } - - public Boolean getSupportsDisassembleRequest() { - return supportsDisassembleRequest; - } - - public void setSupportsDisassembleRequest(Boolean supportsDisassembleRequest) { - this.supportsDisassembleRequest = supportsDisassembleRequest; - } - - public Boolean getSupportsCancelRequest() { - return supportsCancelRequest; - } - - public void setSupportsCancelRequest(Boolean supportsCancelRequest) { - this.supportsCancelRequest = supportsCancelRequest; - } - - public Boolean getSupportsBreakpointLocationsRequest() { - return supportsBreakpointLocationsRequest; - } - - public void setSupportsBreakpointLocationsRequest(Boolean supportsBreakpointLocationsRequest) { - this.supportsBreakpointLocationsRequest = supportsBreakpointLocationsRequest; - } - - public Boolean getSupportsClipboardContext() { - return supportsClipboardContext; - } - - public void setSupportsClipboardContext(Boolean supportsClipboardContext) { - this.supportsClipboardContext = supportsClipboardContext; - } - - public Boolean getSupportsSteppingGranularity() { - return supportsSteppingGranularity; - } - - public void setSupportsSteppingGranularity(Boolean supportsSteppingGranularity) { - this.supportsSteppingGranularity = supportsSteppingGranularity; - } - - public Boolean getSupportsInstructionBreakpoints() { - return supportsInstructionBreakpoints; - } - - public void setSupportsInstructionBreakpoints(Boolean supportsInstructionBreakpoints) { - this.supportsInstructionBreakpoints = supportsInstructionBreakpoints; - } - - public Boolean getSupportsExceptionFilterOptions() { - return supportsExceptionFilterOptions; - } - - public void setSupportsExceptionFilterOptions(Boolean supportsExceptionFilterOptions) { - this.supportsExceptionFilterOptions = supportsExceptionFilterOptions; - } - - public Boolean getSupportsSingleThreadExecutionRequests() { - return supportsSingleThreadExecutionRequests; - } - - public void setSupportsSingleThreadExecutionRequests(Boolean supportsSingleThreadExecutionRequests) { - this.supportsSingleThreadExecutionRequests = supportsSingleThreadExecutionRequests; - } - - @Override - public String toString() { - return "Capabilities{" + - "supportsConfigurationDoneRequest=" + supportsConfigurationDoneRequest + - ", supportsFunctionBreakpoints=" + supportsFunctionBreakpoints + - ", supportsConditionalBreakpoints=" + supportsConditionalBreakpoints + - ", supportsHitConditionalBreakpoints=" + supportsHitConditionalBreakpoints + - ", supportsEvaluateForHovers=" + supportsEvaluateForHovers + - ", supportsStepBack=" + supportsStepBack + - ", supportsSetVariable=" + supportsSetVariable + - ", supportsRestartFrame=" + supportsRestartFrame + - ", supportsGotoTargetsRequest=" + supportsGotoTargetsRequest + - ", supportsStepInTargetsRequest=" + supportsStepInTargetsRequest + - ", supportsCompletionsRequest=" + supportsCompletionsRequest + - ", completionTriggerCharacters=" + completionTriggerCharacters + - ", supportsModulesRequest=" + supportsModulesRequest + - ", supportsRestartRequest=" + supportsRestartRequest + - ", supportsExceptionOptions=" + supportsExceptionOptions + - ", supportsValueFormattingOptions=" + supportsValueFormattingOptions + - ", supportsExceptionInfoRequest=" + supportsExceptionInfoRequest + - ", supportTerminateDebuggee=" + supportTerminateDebuggee + - ", supportSuspendDebuggee=" + supportSuspendDebuggee + - ", supportsDelayedStackTraceLoading=" + supportsDelayedStackTraceLoading + - ", supportsLoadedSourcesRequest=" + supportsLoadedSourcesRequest + - ", supportsLogPoints=" + supportsLogPoints + - ", supportsTerminateThreadsRequest=" + supportsTerminateThreadsRequest + - ", supportsSetExpression=" + supportsSetExpression + - ", supportsTerminateRequest=" + supportsTerminateRequest + - ", supportsDataBreakpoints=" + supportsDataBreakpoints + - ", supportsReadMemoryRequest=" + supportsReadMemoryRequest + - ", supportsWriteMemoryRequest=" + supportsWriteMemoryRequest + - ", supportsDisassembleRequest=" + supportsDisassembleRequest + - ", supportsCancelRequest=" + supportsCancelRequest + - ", supportsBreakpointLocationsRequest=" + supportsBreakpointLocationsRequest + - ", supportsClipboardContext=" + supportsClipboardContext + - ", supportsSteppingGranularity=" + supportsSteppingGranularity + - ", supportsInstructionBreakpoints=" + supportsInstructionBreakpoints + - ", supportsExceptionFilterOptions=" + supportsExceptionFilterOptions + - ", supportsSingleThreadExecutionRequests=" + supportsSingleThreadExecutionRequests + - '}'; - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/DAPMessage.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/DAPMessage.java deleted file mode 100644 index 7a365fc..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/DAPMessage.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type" -) -@JsonSubTypes({ - @JsonSubTypes.Type(value = Request.class, name = "request"), - @JsonSubTypes.Type(value = Response.class, name = "response"), - @JsonSubTypes.Type(value = Event.class, name = "event") -}) -public abstract class DAPMessage { - - protected Integer seq; - protected String type; - - public DAPMessage() {} - - protected DAPMessage(Integer seq, String type) { - this.seq = seq; - this.type = type; - } - - public Integer getSeq() { - return seq; - } - - - public String getType() { - return type; - } - - public void setSeq(Integer seq) { - this.seq = seq; - } - - public void setType(String type) { - this.type = type; - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateArguments.java deleted file mode 100644 index a764da5..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateArguments.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -public class EvaluateArguments { - private String expression; - private Integer frameId; - private String context; - - public String getExpression() { - return expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - public Integer getFrameId() { - return frameId; - } - - public void setFrameId(Integer frameId) { - this.frameId = frameId; - } - - public String getContext() { - return context; - } - - public void setContext(String context) { - this.context = context; - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateRequest.java deleted file mode 100644 index 1d4f8be..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/EvaluateRequest.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import org.tzi.use.monitor.adapter.python.dap.DAPRequest; - -public class EvaluateRequest implements DAPRequest { - @JsonUnwrapped - Request dapRequest; - @JsonUnwrapped - EvaluateArguments arguments; - - public Request getDapRequest() { - return dapRequest; - } - - public void setDapRequest(Request dapRequest) { - this.dapRequest = dapRequest; - } - - public EvaluateArguments getArguments() { - return arguments; - } - - public void setArguments(EvaluateArguments arguments) { - this.arguments = arguments; - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Event.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Event.java deleted file mode 100644 index c4c03bf..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Event.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.databind.JsonNode; -import org.tzi.use.monitor.adapter.python.dap.DAPEvent; - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "event" -) -@JsonSubTypes({ - @JsonSubTypes.Type(value = InitializedEvent.class, name = "initialized") -}) -public abstract class Event extends DAPMessage implements DAPEvent { - - public Event() {} - - public Event(String event) { - this.event = event; - } - - @JsonUnwrapped - private DAPMessage message; - - @JsonProperty("event") - private String event; - - @JsonProperty("body") - private JsonNode body; - - public DAPMessage getMessage() { - return message; - } - - public void setMessage(DAPMessage message) { - this.message = message; - } - - public String getEvent() { - return event; - } - - public void setEvent(String event) { - this.event = event; - } - - public JsonNode getBody() { - return body; - } - - public void setBody(JsonNode body) { - this.body = body; - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeRequest.java deleted file mode 100644 index 5a5a487..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeRequest.java +++ /dev/null @@ -1,207 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeName; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonTypeName("initialize") -public class InitializeRequest extends Request { - - protected InitializeRequestArguments arguments; - - public InitializeRequest(Integer seq, InitializeRequestArguments arguments) { - super(seq, "request", "initialize"); - this.arguments = arguments; - } - - public InitializeRequestArguments getArguments() { - return arguments; - } - - public void setArguments(InitializeRequestArguments arguments) { - this.arguments = arguments; - } - - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class InitializeRequestArguments { - - @JsonProperty("clientID") - private String clientID; - - @JsonProperty("clientName") - private String clientName; - - @JsonProperty("adapterID") - private String adapterID; - - @JsonProperty("locale") - private String locale; - - @JsonProperty("linesStartAt1") - private Boolean linesStartAt1; - - @JsonProperty("columnsStartAt1") - private Boolean columnsStartAt1; - - @JsonProperty("pathFormat") - private String pathFormat; - - @JsonProperty("supportsVariableType") - private Boolean supportsVariableType; - - @JsonProperty("supportsVariablePaging") - private Boolean supportsVariablePaging; - - @JsonProperty("supportsRunInTerminalRequest") - private Boolean supportsRunInTerminalRequest; - - @JsonProperty("supportsMemoryReferences") - private Boolean supportsMemoryReferences; - - @JsonProperty("supportsProgressReporting") - private Boolean supportsProgressReporting; - - @JsonProperty("supportsInvalidatedEvent") - private Boolean supportsInvalidatedEvent; - - @JsonProperty("supportsMemoryEvent") - private Boolean supportsMemoryEvent; - - @JsonProperty("supportsArgsCanBeInterpretedByShell") - private Boolean supportsArgsCanBeInterpretedByShell; - - @JsonProperty("supportsStartDebuggingRequest") - private Boolean supportsStartDebuggingRequest; - - public String getClientID() { - return clientID; - } - - public String getClientName() { - return clientName; - } - - public String getAdapterID() { - return adapterID; - } - - public String getLocale() { - return locale; - } - - public Boolean isLinesStartAt1() { - return linesStartAt1; - } - - public Boolean isColumnsStartAt1() { - return columnsStartAt1; - } - - public String getPathFormat() { - return pathFormat; - } - - public Boolean isSupportsVariableType() { - return supportsVariableType; - } - - public Boolean isSupportsVariablePaging() { - return supportsVariablePaging; - } - - public Boolean isSupportsRunInTerminalRequest() { - return supportsRunInTerminalRequest; - } - - public Boolean isSupportsMemoryReferences() { - return supportsMemoryReferences; - } - - public Boolean isSupportsProgressReporting() { - return supportsProgressReporting; - } - - public Boolean isSupportsInvalidatedEvent() { - return supportsInvalidatedEvent; - } - - public Boolean isSupportsMemoryEvent() { - return supportsMemoryEvent; - } - - public Boolean isSupportsArgsCanBeInterpretedByShell() { - return supportsArgsCanBeInterpretedByShell; - } - - public Boolean isSupportsStartDebuggingRequest() { - return supportsStartDebuggingRequest; - } - - public void setClientID(String clientID) { - this.clientID = clientID; - } - - public void setClientName(String clientName) { - this.clientName = clientName; - } - - public void setAdapterID(String adapterID) { - this.adapterID = adapterID; - } - - public void setLocale(String locale) { - this.locale = locale; - } - - public void setLinesStartAt1(Boolean linesStartAt1) { - this.linesStartAt1 = linesStartAt1; - } - - public void setColumnsStartAt1(Boolean columnsStartAt1) { - this.columnsStartAt1 = columnsStartAt1; - } - - public void setPathFormat(String pathFormat) { - this.pathFormat = pathFormat; - } - - public void setSupportsVariableType(Boolean supportsVariableType) { - this.supportsVariableType = supportsVariableType; - } - - public void setSupportsVariablePaging(Boolean supportsVariablePaging) { - this.supportsVariablePaging = supportsVariablePaging; - } - - public void setSupportsRunInTerminalRequest(Boolean supportsRunInTerminalRequest) { - this.supportsRunInTerminalRequest = supportsRunInTerminalRequest; - } - - public void setSupportsMemoryReferences(Boolean supportsMemoryReferences) { - this.supportsMemoryReferences = supportsMemoryReferences; - } - - public void setSupportsProgressReporting(Boolean supportsProgressReporting) { - this.supportsProgressReporting = supportsProgressReporting; - } - - public void setSupportsInvalidatedEvent(Boolean supportsInvalidatedEvent) { - this.supportsInvalidatedEvent = supportsInvalidatedEvent; - } - - public void setSupportsMemoryEvent(Boolean supportsMemoryEvent) { - this.supportsMemoryEvent = supportsMemoryEvent; - } - - public void setSupportsArgsCanBeInterpretedByShell(Boolean supportsArgsCanBeInterpretedByShell) { - this.supportsArgsCanBeInterpretedByShell = supportsArgsCanBeInterpretedByShell; - } - - public void setSupportsStartDebuggingRequest(Boolean supportsStartDebuggingRequest) { - this.supportsStartDebuggingRequest = supportsStartDebuggingRequest; - } - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeResponse.java deleted file mode 100644 index c675c9c..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializeResponse.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonTypeName; - -@JsonTypeName("initialize") -public class InitializeResponse extends Response { - - private Capabilities body; - - public InitializeResponse() {} - - public InitializeResponse(Integer seq, String type) { - super(seq, type); - } - - public Capabilities getBody() { - return body; - } - - public void setBody(Capabilities body) { - this.body = body; - } - - @Override - public String toString() { - return "InitializeResponse{" + - "body=" + body + - ", command='" + command + '\'' + - ", requestSeq=" + requestSeq + - ", success=" + success + - ", message='" + message + '\'' + - ", seq=" + seq + - ", type='" + type + '\'' + - '}'; - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializedEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializedEvent.java deleted file mode 100644 index cfdaff1..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/InitializedEvent.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonTypeName; - -@JsonTypeName("initialized") -public class InitializedEvent extends Event { - - InitializedEvent() { - super("initialized"); - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Request.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Request.java deleted file mode 100644 index 578475c..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Request.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.tzi.use.monitor.adapter.python.dap.DAPRequest; - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "command" -) -@JsonSubTypes({ - @JsonSubTypes.Type(value = InitializeRequest.class, name = "initialize") -}) -public abstract class Request extends DAPMessage implements DAPRequest { - - protected String command; - - protected Request(Integer seq, String type, String command) { - super(seq, type); - this.command = command; - } - - public String getCommand() { - return command; - } - - public void setCommand(String command) { - this.command = command; - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Response.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Response.java deleted file mode 100644 index 8a2b199..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Response.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.tzi.use.monitor.adapter.python.dap.DAPResponse; - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "command", - visible = true -) -@JsonSubTypes({ - @JsonSubTypes.Type(value = InitializeResponse.class, name = "initialize") -}) -public abstract class Response extends DAPMessage implements DAPResponse { - - protected String command; - - @JsonProperty("request_seq") - protected Integer requestSeq; - - protected Boolean success; - - protected String message; - - public Response() {} - - protected Response(Integer seq, String type) { - super(seq, type); - } - - @Override - public int getRequestSequence() { - return requestSeq; - } - - public String getCommand() { - return command; - } - - public void setCommand(String command) { - this.command = command; - } - - public Integer getRequestSeq() { - return requestSeq; - } - - public void setRequestSeq(Integer requestSeq) { - this.requestSeq = requestSeq; - } - - public Boolean getSuccess() { - return success; - } - - public void setSuccess(Boolean success) { - this.success = success; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Thread.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Thread.java deleted file mode 100644 index 6d78556..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/Thread.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -public class Thread { - private int id; - private String name; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/ThreadsResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/ThreadsResponse.java deleted file mode 100644 index 3f6f2c8..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/tmp/ThreadsResponse.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.tzi.use.monitor.adapter.python.tmp; - -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import org.tzi.use.monitor.adapter.python.dap.DAPResponse; - -import java.util.ArrayList; - -public class ThreadsResponse implements DAPResponse { - @JsonUnwrapped - private Response response; - - private ArrayList threads; - - public Response getResponse() { - return response; - } - - public void setResponse(Response response) { - this.response = response; - } - - public ArrayList getThreads() { - return threads; - } - - public void setThreads(ArrayList threads) { - this.threads = threads; - } - - @Override - public int getRequestSequence() { - return this.response.getRequestSeq(); - } -} diff --git a/adapter/Python/src/main/resources/protocol/debugProtocol.json b/adapter/Python/src/main/resources/protocol/debugProtocol.json index 17d1467..6682e10 100644 --- a/adapter/Python/src/main/resources/protocol/debugProtocol.json +++ b/adapter/Python/src/main/resources/protocol/debugProtocol.json @@ -5,566 +5,566 @@ "type": "object", "properties": { - "AttachRequest": { - "$ref": "#/definitions/AttachRequest" - }, - "AttachRequestArguments": { - "$ref": "#/definitions/AttachRequestArguments" - }, - "AttachResponse": { - "$ref": "#/definitions/AttachResponse" - }, - "Breakpoint": { - "$ref": "#/definitions/Breakpoint" + "ProtocolMessage": { + "$ref": "#/definitions/ProtocolMessage" }, - "BreakpointEvent": { - "$ref": "#/definitions/BreakpointEvent" + "Request": { + "$ref": "#/definitions/Request" }, - "BreakpointLocation": { - "$ref": "#/definitions/BreakpointLocation" + "Event": { + "$ref": "#/definitions/Event" }, - "BreakpointLocationsArguments": { - "$ref": "#/definitions/BreakpointLocationsArguments" + "Response": { + "$ref": "#/definitions/Response" }, - "BreakpointLocationsRequest": { - "$ref": "#/definitions/BreakpointLocationsRequest" + "ErrorResponse": { + "$ref": "#/definitions/ErrorResponse" }, - "BreakpointLocationsResponse": { - "$ref": "#/definitions/BreakpointLocationsResponse" + "CancelRequest": { + "$ref": "#/definitions/CancelRequest" }, "CancelArguments": { "$ref": "#/definitions/CancelArguments" }, - "CancelRequest": { - "$ref": "#/definitions/CancelRequest" - }, "CancelResponse": { "$ref": "#/definitions/CancelResponse" }, - "Capabilities": { - "$ref": "#/definitions/Capabilities" - }, - "CapabilitiesEvent": { - "$ref": "#/definitions/CapabilitiesEvent" - }, - "Checksum": { - "$ref": "#/definitions/Checksum" - }, - "ChecksumAlgorithm": { - "$ref": "#/definitions/ChecksumAlgorithm" - }, - "ColumnDescriptor": { - "$ref": "#/definitions/ColumnDescriptor" + "InitializedEvent": { + "$ref": "#/definitions/InitializedEvent" }, - "CompletionItem": { - "$ref": "#/definitions/CompletionItem" + "StoppedEvent": { + "$ref": "#/definitions/StoppedEvent" }, - "CompletionItemType": { - "$ref": "#/definitions/CompletionItemType" + "ContinuedEvent": { + "$ref": "#/definitions/ContinuedEvent" }, - "CompletionsArguments": { - "$ref": "#/definitions/CompletionsArguments" + "ExitedEvent": { + "$ref": "#/definitions/ExitedEvent" }, - "CompletionsRequest": { - "$ref": "#/definitions/CompletionsRequest" + "TerminatedEvent": { + "$ref": "#/definitions/TerminatedEvent" }, - "CompletionsResponse": { - "$ref": "#/definitions/CompletionsResponse" + "ThreadEvent": { + "$ref": "#/definitions/ThreadEvent" }, - "ConfigurationDoneArguments": { - "$ref": "#/definitions/ConfigurationDoneArguments" + "OutputEvent": { + "$ref": "#/definitions/OutputEvent" }, - "ConfigurationDoneRequest": { - "$ref": "#/definitions/ConfigurationDoneRequest" + "BreakpointEvent": { + "$ref": "#/definitions/BreakpointEvent" }, - "ConfigurationDoneResponse": { - "$ref": "#/definitions/ConfigurationDoneResponse" + "ModuleEvent": { + "$ref": "#/definitions/ModuleEvent" }, - "ContinueArguments": { - "$ref": "#/definitions/ContinueArguments" + "LoadedSourceEvent": { + "$ref": "#/definitions/LoadedSourceEvent" }, - "ContinueRequest": { - "$ref": "#/definitions/ContinueRequest" + "ProcessEvent": { + "$ref": "#/definitions/ProcessEvent" }, - "ContinueResponse": { - "$ref": "#/definitions/ContinueResponse" + "CapabilitiesEvent": { + "$ref": "#/definitions/CapabilitiesEvent" }, - "ContinuedEvent": { - "$ref": "#/definitions/ContinuedEvent" + "ProgressStartEvent": { + "$ref": "#/definitions/ProgressStartEvent" }, - "DataBreakpoint": { - "$ref": "#/definitions/DataBreakpoint" + "ProgressUpdateEvent": { + "$ref": "#/definitions/ProgressUpdateEvent" }, - "DataBreakpointAccessType": { - "$ref": "#/definitions/DataBreakpointAccessType" + "ProgressEndEvent": { + "$ref": "#/definitions/ProgressEndEvent" }, - "DataBreakpointInfoArguments": { - "$ref": "#/definitions/DataBreakpointInfoArguments" + "InvalidatedEvent": { + "$ref": "#/definitions/InvalidatedEvent" }, - "DataBreakpointInfoRequest": { - "$ref": "#/definitions/DataBreakpointInfoRequest" + "MemoryEvent": { + "$ref": "#/definitions/MemoryEvent" }, - "DataBreakpointInfoResponse": { - "$ref": "#/definitions/DataBreakpointInfoResponse" + "RunInTerminalRequest": { + "$ref": "#/definitions/RunInTerminalRequest" }, - "DisassembleArguments": { - "$ref": "#/definitions/DisassembleArguments" + "RunInTerminalRequestArguments": { + "$ref": "#/definitions/RunInTerminalRequestArguments" }, - "DisassembleRequest": { - "$ref": "#/definitions/DisassembleRequest" + "RunInTerminalResponse": { + "$ref": "#/definitions/RunInTerminalResponse" }, - "DisassembleResponse": { - "$ref": "#/definitions/DisassembleResponse" + "StartDebuggingRequest": { + "$ref": "#/definitions/StartDebuggingRequest" }, - "DisassembledInstruction": { - "$ref": "#/definitions/DisassembledInstruction" + "StartDebuggingRequestArguments": { + "$ref": "#/definitions/StartDebuggingRequestArguments" }, - "DisconnectArguments": { - "$ref": "#/definitions/DisconnectArguments" + "StartDebuggingResponse": { + "$ref": "#/definitions/StartDebuggingResponse" }, - "DisconnectRequest": { - "$ref": "#/definitions/DisconnectRequest" + "InitializeRequest": { + "$ref": "#/definitions/InitializeRequest" }, - "DisconnectResponse": { - "$ref": "#/definitions/DisconnectResponse" + "InitializeRequestArguments": { + "$ref": "#/definitions/InitializeRequestArguments" }, - "ErrorResponse": { - "$ref": "#/definitions/ErrorResponse" + "InitializeResponse": { + "$ref": "#/definitions/InitializeResponse" }, - "EvaluateArguments": { - "$ref": "#/definitions/EvaluateArguments" + "ConfigurationDoneRequest": { + "$ref": "#/definitions/ConfigurationDoneRequest" }, - "EvaluateRequest": { - "$ref": "#/definitions/EvaluateRequest" + "ConfigurationDoneArguments": { + "$ref": "#/definitions/ConfigurationDoneArguments" }, - "EvaluateResponse": { - "$ref": "#/definitions/EvaluateResponse" + "ConfigurationDoneResponse": { + "$ref": "#/definitions/ConfigurationDoneResponse" }, - "Event": { - "$ref": "#/definitions/Event" + "LaunchRequest": { + "$ref": "#/definitions/LaunchRequest" }, - "ExceptionBreakMode": { - "$ref": "#/definitions/ExceptionBreakMode" + "LaunchRequestArguments": { + "$ref": "#/definitions/LaunchRequestArguments" }, - "ExceptionBreakpointsFilter": { - "$ref": "#/definitions/ExceptionBreakpointsFilter" + "LaunchResponse": { + "$ref": "#/definitions/LaunchResponse" }, - "ExceptionDetails": { - "$ref": "#/definitions/ExceptionDetails" + "AttachRequest": { + "$ref": "#/definitions/AttachRequest" }, - "ExceptionFilterOptions": { - "$ref": "#/definitions/ExceptionFilterOptions" + "AttachRequestArguments": { + "$ref": "#/definitions/AttachRequestArguments" }, - "ExceptionInfoArguments": { - "$ref": "#/definitions/ExceptionInfoArguments" + "AttachResponse": { + "$ref": "#/definitions/AttachResponse" }, - "ExceptionInfoRequest": { - "$ref": "#/definitions/ExceptionInfoRequest" + "RestartRequest": { + "$ref": "#/definitions/RestartRequest" }, - "ExceptionInfoResponse": { - "$ref": "#/definitions/ExceptionInfoResponse" + "RestartArguments": { + "$ref": "#/definitions/RestartArguments" }, - "ExceptionOptions": { - "$ref": "#/definitions/ExceptionOptions" + "RestartResponse": { + "$ref": "#/definitions/RestartResponse" }, - "ExceptionPathSegment": { - "$ref": "#/definitions/ExceptionPathSegment" + "DisconnectRequest": { + "$ref": "#/definitions/DisconnectRequest" }, - "ExitedEvent": { - "$ref": "#/definitions/ExitedEvent" + "DisconnectArguments": { + "$ref": "#/definitions/DisconnectArguments" }, - "FunctionBreakpoint": { - "$ref": "#/definitions/FunctionBreakpoint" + "DisconnectResponse": { + "$ref": "#/definitions/DisconnectResponse" }, - "GotoArguments": { - "$ref": "#/definitions/GotoArguments" + "TerminateRequest": { + "$ref": "#/definitions/TerminateRequest" }, - "GotoRequest": { - "$ref": "#/definitions/GotoRequest" + "TerminateArguments": { + "$ref": "#/definitions/TerminateArguments" }, - "GotoResponse": { - "$ref": "#/definitions/GotoResponse" + "TerminateResponse": { + "$ref": "#/definitions/TerminateResponse" }, - "GotoTarget": { - "$ref": "#/definitions/GotoTarget" + "BreakpointLocationsRequest": { + "$ref": "#/definitions/BreakpointLocationsRequest" }, - "GotoTargetsArguments": { - "$ref": "#/definitions/GotoTargetsArguments" + "BreakpointLocationsArguments": { + "$ref": "#/definitions/BreakpointLocationsArguments" }, - "GotoTargetsRequest": { - "$ref": "#/definitions/GotoTargetsRequest" + "BreakpointLocationsResponse": { + "$ref": "#/definitions/BreakpointLocationsResponse" }, - "GotoTargetsResponse": { - "$ref": "#/definitions/GotoTargetsResponse" + "SetBreakpointsRequest": { + "$ref": "#/definitions/SetBreakpointsRequest" }, - "InitializeRequest": { - "$ref": "#/definitions/InitializeRequest" + "SetBreakpointsArguments": { + "$ref": "#/definitions/SetBreakpointsArguments" }, - "InitializeRequestArguments": { - "$ref": "#/definitions/InitializeRequestArguments" + "SetBreakpointsResponse": { + "$ref": "#/definitions/SetBreakpointsResponse" }, - "InitializeResponse": { - "$ref": "#/definitions/InitializeResponse" + "SetFunctionBreakpointsRequest": { + "$ref": "#/definitions/SetFunctionBreakpointsRequest" }, - "InitializedEvent": { - "$ref": "#/definitions/InitializedEvent" + "SetFunctionBreakpointsArguments": { + "$ref": "#/definitions/SetFunctionBreakpointsArguments" }, - "InstructionBreakpoint": { - "$ref": "#/definitions/InstructionBreakpoint" + "SetFunctionBreakpointsResponse": { + "$ref": "#/definitions/SetFunctionBreakpointsResponse" }, - "InvalidatedAreas": { - "$ref": "#/definitions/InvalidatedAreas" + "SetExceptionBreakpointsRequest": { + "$ref": "#/definitions/SetExceptionBreakpointsRequest" }, - "InvalidatedEvent": { - "$ref": "#/definitions/InvalidatedEvent" + "SetExceptionBreakpointsArguments": { + "$ref": "#/definitions/SetExceptionBreakpointsArguments" }, - "LaunchRequest": { - "$ref": "#/definitions/LaunchRequest" + "SetExceptionBreakpointsResponse": { + "$ref": "#/definitions/SetExceptionBreakpointsResponse" }, - "LaunchRequestArguments": { - "$ref": "#/definitions/LaunchRequestArguments" + "DataBreakpointInfoRequest": { + "$ref": "#/definitions/DataBreakpointInfoRequest" }, - "LaunchResponse": { - "$ref": "#/definitions/LaunchResponse" + "DataBreakpointInfoArguments": { + "$ref": "#/definitions/DataBreakpointInfoArguments" }, - "LoadedSourceEvent": { - "$ref": "#/definitions/LoadedSourceEvent" + "DataBreakpointInfoResponse": { + "$ref": "#/definitions/DataBreakpointInfoResponse" }, - "LoadedSourcesArguments": { - "$ref": "#/definitions/LoadedSourcesArguments" + "SetDataBreakpointsRequest": { + "$ref": "#/definitions/SetDataBreakpointsRequest" }, - "LoadedSourcesRequest": { - "$ref": "#/definitions/LoadedSourcesRequest" + "SetDataBreakpointsArguments": { + "$ref": "#/definitions/SetDataBreakpointsArguments" }, - "LoadedSourcesResponse": { - "$ref": "#/definitions/LoadedSourcesResponse" + "SetDataBreakpointsResponse": { + "$ref": "#/definitions/SetDataBreakpointsResponse" }, - "MemoryEvent": { - "$ref": "#/definitions/MemoryEvent" + "SetInstructionBreakpointsRequest": { + "$ref": "#/definitions/SetInstructionBreakpointsRequest" }, - "Message": { - "$ref": "#/definitions/Message" + "SetInstructionBreakpointsArguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" }, - "Module": { - "$ref": "#/definitions/Module" + "SetInstructionBreakpointsResponse": { + "$ref": "#/definitions/SetInstructionBreakpointsResponse" }, - "ModuleEvent": { - "$ref": "#/definitions/ModuleEvent" + "ContinueRequest": { + "$ref": "#/definitions/ContinueRequest" }, - "ModulesArguments": { - "$ref": "#/definitions/ModulesArguments" + "ContinueArguments": { + "$ref": "#/definitions/ContinueArguments" }, - "ModulesRequest": { - "$ref": "#/definitions/ModulesRequest" + "ContinueResponse": { + "$ref": "#/definitions/ContinueResponse" }, - "ModulesResponse": { - "$ref": "#/definitions/ModulesResponse" + "NextRequest": { + "$ref": "#/definitions/NextRequest" }, "NextArguments": { "$ref": "#/definitions/NextArguments" }, - "NextRequest": { - "$ref": "#/definitions/NextRequest" - }, "NextResponse": { "$ref": "#/definitions/NextResponse" }, - "OutputEvent": { - "$ref": "#/definitions/OutputEvent" - }, - "PauseArguments": { - "$ref": "#/definitions/PauseArguments" - }, - "PauseRequest": { - "$ref": "#/definitions/PauseRequest" + "StepInRequest": { + "$ref": "#/definitions/StepInRequest" }, - "PauseResponse": { - "$ref": "#/definitions/PauseResponse" + "StepInArguments": { + "$ref": "#/definitions/StepInArguments" }, - "ProcessEvent": { - "$ref": "#/definitions/ProcessEvent" + "StepInResponse": { + "$ref": "#/definitions/StepInResponse" }, - "ProgressEndEvent": { - "$ref": "#/definitions/ProgressEndEvent" + "StepOutRequest": { + "$ref": "#/definitions/StepOutRequest" }, - "ProgressStartEvent": { - "$ref": "#/definitions/ProgressStartEvent" + "StepOutArguments": { + "$ref": "#/definitions/StepOutArguments" }, - "ProgressUpdateEvent": { - "$ref": "#/definitions/ProgressUpdateEvent" + "StepOutResponse": { + "$ref": "#/definitions/StepOutResponse" }, - "ProtocolMessage": { - "$ref": "#/definitions/ProtocolMessage" + "StepBackRequest": { + "$ref": "#/definitions/StepBackRequest" }, - "ReadMemoryArguments": { - "$ref": "#/definitions/ReadMemoryArguments" + "StepBackArguments": { + "$ref": "#/definitions/StepBackArguments" }, - "ReadMemoryRequest": { - "$ref": "#/definitions/ReadMemoryRequest" + "StepBackResponse": { + "$ref": "#/definitions/StepBackResponse" }, - "ReadMemoryResponse": { - "$ref": "#/definitions/ReadMemoryResponse" + "ReverseContinueRequest": { + "$ref": "#/definitions/ReverseContinueRequest" }, - "Request": { - "$ref": "#/definitions/Request" + "ReverseContinueArguments": { + "$ref": "#/definitions/ReverseContinueArguments" }, - "Response": { - "$ref": "#/definitions/Response" + "ReverseContinueResponse": { + "$ref": "#/definitions/ReverseContinueResponse" }, - "RestartArguments": { - "$ref": "#/definitions/RestartArguments" + "RestartFrameRequest": { + "$ref": "#/definitions/RestartFrameRequest" }, "RestartFrameArguments": { "$ref": "#/definitions/RestartFrameArguments" }, - "RestartFrameRequest": { - "$ref": "#/definitions/RestartFrameRequest" - }, "RestartFrameResponse": { "$ref": "#/definitions/RestartFrameResponse" }, - "RestartRequest": { - "$ref": "#/definitions/RestartRequest" - }, - "RestartResponse": { - "$ref": "#/definitions/RestartResponse" + "GotoRequest": { + "$ref": "#/definitions/GotoRequest" }, - "ReverseContinueArguments": { - "$ref": "#/definitions/ReverseContinueArguments" + "GotoArguments": { + "$ref": "#/definitions/GotoArguments" }, - "ReverseContinueRequest": { - "$ref": "#/definitions/ReverseContinueRequest" + "GotoResponse": { + "$ref": "#/definitions/GotoResponse" }, - "ReverseContinueResponse": { - "$ref": "#/definitions/ReverseContinueResponse" + "PauseRequest": { + "$ref": "#/definitions/PauseRequest" }, - "RunInTerminalRequest": { - "$ref": "#/definitions/RunInTerminalRequest" + "PauseArguments": { + "$ref": "#/definitions/PauseArguments" }, - "RunInTerminalRequestArguments": { - "$ref": "#/definitions/RunInTerminalRequestArguments" + "PauseResponse": { + "$ref": "#/definitions/PauseResponse" }, - "RunInTerminalResponse": { - "$ref": "#/definitions/RunInTerminalResponse" + "StackTraceRequest": { + "$ref": "#/definitions/StackTraceRequest" }, - "Scope": { - "$ref": "#/definitions/Scope" + "StackTraceArguments": { + "$ref": "#/definitions/StackTraceArguments" }, - "ScopesArguments": { - "$ref": "#/definitions/ScopesArguments" + "StackTraceResponse": { + "$ref": "#/definitions/StackTraceResponse" }, "ScopesRequest": { "$ref": "#/definitions/ScopesRequest" }, + "ScopesArguments": { + "$ref": "#/definitions/ScopesArguments" + }, "ScopesResponse": { "$ref": "#/definitions/ScopesResponse" }, - "SetBreakpointsArguments": { - "$ref": "#/definitions/SetBreakpointsArguments" + "VariablesRequest": { + "$ref": "#/definitions/VariablesRequest" }, - "SetBreakpointsRequest": { - "$ref": "#/definitions/SetBreakpointsRequest" + "VariablesArguments": { + "$ref": "#/definitions/VariablesArguments" }, - "SetBreakpointsResponse": { - "$ref": "#/definitions/SetBreakpointsResponse" + "VariablesResponse": { + "$ref": "#/definitions/VariablesResponse" + }, + "SetVariableRequest": { + "$ref": "#/definitions/SetVariableRequest" + }, + "SetVariableArguments": { + "$ref": "#/definitions/SetVariableArguments" + }, + "SetVariableResponse": { + "$ref": "#/definitions/SetVariableResponse" + }, + "SourceRequest": { + "$ref": "#/definitions/SourceRequest" + }, + "SourceArguments": { + "$ref": "#/definitions/SourceArguments" + }, + "SourceResponse": { + "$ref": "#/definitions/SourceResponse" + }, + "ThreadsRequest": { + "$ref": "#/definitions/ThreadsRequest" + }, + "ThreadsResponse": { + "$ref": "#/definitions/ThreadsResponse" + }, + "TerminateThreadsRequest": { + "$ref": "#/definitions/TerminateThreadsRequest" + }, + "TerminateThreadsArguments": { + "$ref": "#/definitions/TerminateThreadsArguments" + }, + "TerminateThreadsResponse": { + "$ref": "#/definitions/TerminateThreadsResponse" + }, + "ModulesRequest": { + "$ref": "#/definitions/ModulesRequest" }, - "SetDataBreakpointsArguments": { - "$ref": "#/definitions/SetDataBreakpointsArguments" + "ModulesArguments": { + "$ref": "#/definitions/ModulesArguments" }, - "SetDataBreakpointsRequest": { - "$ref": "#/definitions/SetDataBreakpointsRequest" + "ModulesResponse": { + "$ref": "#/definitions/ModulesResponse" }, - "SetDataBreakpointsResponse": { - "$ref": "#/definitions/SetDataBreakpointsResponse" + "LoadedSourcesRequest": { + "$ref": "#/definitions/LoadedSourcesRequest" }, - "SetExceptionBreakpointsArguments": { - "$ref": "#/definitions/SetExceptionBreakpointsArguments" + "LoadedSourcesArguments": { + "$ref": "#/definitions/LoadedSourcesArguments" }, - "SetExceptionBreakpointsRequest": { - "$ref": "#/definitions/SetExceptionBreakpointsRequest" + "LoadedSourcesResponse": { + "$ref": "#/definitions/LoadedSourcesResponse" }, - "SetExceptionBreakpointsResponse": { - "$ref": "#/definitions/SetExceptionBreakpointsResponse" + "EvaluateRequest": { + "$ref": "#/definitions/EvaluateRequest" }, - "SetExpressionArguments": { - "$ref": "#/definitions/SetExpressionArguments" + "EvaluateArguments": { + "$ref": "#/definitions/EvaluateArguments" + }, + "EvaluateResponse": { + "$ref": "#/definitions/EvaluateResponse" }, "SetExpressionRequest": { "$ref": "#/definitions/SetExpressionRequest" }, + "SetExpressionArguments": { + "$ref": "#/definitions/SetExpressionArguments" + }, "SetExpressionResponse": { "$ref": "#/definitions/SetExpressionResponse" }, - "SetFunctionBreakpointsArguments": { - "$ref": "#/definitions/SetFunctionBreakpointsArguments" - }, - "SetFunctionBreakpointsRequest": { - "$ref": "#/definitions/SetFunctionBreakpointsRequest" - }, - "SetFunctionBreakpointsResponse": { - "$ref": "#/definitions/SetFunctionBreakpointsResponse" + "StepInTargetsRequest": { + "$ref": "#/definitions/StepInTargetsRequest" }, - "SetInstructionBreakpointsArguments": { - "$ref": "#/definitions/SetInstructionBreakpointsArguments" + "StepInTargetsArguments": { + "$ref": "#/definitions/StepInTargetsArguments" }, - "SetInstructionBreakpointsRequest": { - "$ref": "#/definitions/SetInstructionBreakpointsRequest" + "StepInTargetsResponse": { + "$ref": "#/definitions/StepInTargetsResponse" }, - "SetInstructionBreakpointsResponse": { - "$ref": "#/definitions/SetInstructionBreakpointsResponse" + "GotoTargetsRequest": { + "$ref": "#/definitions/GotoTargetsRequest" }, - "SetVariableArguments": { - "$ref": "#/definitions/SetVariableArguments" + "GotoTargetsArguments": { + "$ref": "#/definitions/GotoTargetsArguments" }, - "SetVariableRequest": { - "$ref": "#/definitions/SetVariableRequest" + "GotoTargetsResponse": { + "$ref": "#/definitions/GotoTargetsResponse" }, - "SetVariableResponse": { - "$ref": "#/definitions/SetVariableResponse" + "CompletionsRequest": { + "$ref": "#/definitions/CompletionsRequest" }, - "Source": { - "$ref": "#/definitions/Source" + "CompletionsArguments": { + "$ref": "#/definitions/CompletionsArguments" }, - "SourceArguments": { - "$ref": "#/definitions/SourceArguments" + "CompletionsResponse": { + "$ref": "#/definitions/CompletionsResponse" }, - "SourceBreakpoint": { - "$ref": "#/definitions/SourceBreakpoint" + "ExceptionInfoRequest": { + "$ref": "#/definitions/ExceptionInfoRequest" }, - "SourceRequest": { - "$ref": "#/definitions/SourceRequest" + "ExceptionInfoArguments": { + "$ref": "#/definitions/ExceptionInfoArguments" }, - "SourceResponse": { - "$ref": "#/definitions/SourceResponse" + "ExceptionInfoResponse": { + "$ref": "#/definitions/ExceptionInfoResponse" }, - "StackFrame": { - "$ref": "#/definitions/StackFrame" + "ReadMemoryRequest": { + "$ref": "#/definitions/ReadMemoryRequest" }, - "StackFrameFormat": { - "$ref": "#/definitions/StackFrameFormat" + "ReadMemoryArguments": { + "$ref": "#/definitions/ReadMemoryArguments" }, - "StackTraceArguments": { - "$ref": "#/definitions/StackTraceArguments" + "ReadMemoryResponse": { + "$ref": "#/definitions/ReadMemoryResponse" }, - "StackTraceRequest": { - "$ref": "#/definitions/StackTraceRequest" + "WriteMemoryRequest": { + "$ref": "#/definitions/WriteMemoryRequest" }, - "StackTraceResponse": { - "$ref": "#/definitions/StackTraceResponse" + "WriteMemoryArguments": { + "$ref": "#/definitions/WriteMemoryArguments" }, - "StartDebuggingRequest": { - "$ref": "#/definitions/StartDebuggingRequest" + "WriteMemoryResponse": { + "$ref": "#/definitions/WriteMemoryResponse" }, - "StartDebuggingRequestArguments": { - "$ref": "#/definitions/StartDebuggingRequestArguments" + "DisassembleRequest": { + "$ref": "#/definitions/DisassembleRequest" }, - "StartDebuggingResponse": { - "$ref": "#/definitions/StartDebuggingResponse" + "DisassembleArguments": { + "$ref": "#/definitions/DisassembleArguments" }, - "StepBackArguments": { - "$ref": "#/definitions/StepBackArguments" + "DisassembleResponse": { + "$ref": "#/definitions/DisassembleResponse" }, - "StepBackRequest": { - "$ref": "#/definitions/StepBackRequest" + "Capabilities": { + "$ref": "#/definitions/Capabilities" }, - "StepBackResponse": { - "$ref": "#/definitions/StepBackResponse" + "ExceptionBreakpointsFilter": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" }, - "StepInArguments": { - "$ref": "#/definitions/StepInArguments" + "Message": { + "$ref": "#/definitions/Message" }, - "StepInRequest": { - "$ref": "#/definitions/StepInRequest" + "Module": { + "$ref": "#/definitions/Module" }, - "StepInResponse": { - "$ref": "#/definitions/StepInResponse" + "ColumnDescriptor": { + "$ref": "#/definitions/ColumnDescriptor" }, - "StepInTarget": { - "$ref": "#/definitions/StepInTarget" + "Thread": { + "$ref": "#/definitions/Thread" }, - "StepInTargetsArguments": { - "$ref": "#/definitions/StepInTargetsArguments" + "Source": { + "$ref": "#/definitions/Source" }, - "StepInTargetsRequest": { - "$ref": "#/definitions/StepInTargetsRequest" + "StackFrame": { + "$ref": "#/definitions/StackFrame" }, - "StepInTargetsResponse": { - "$ref": "#/definitions/StepInTargetsResponse" + "Scope": { + "$ref": "#/definitions/Scope" }, - "StepOutArguments": { - "$ref": "#/definitions/StepOutArguments" + "Variable": { + "$ref": "#/definitions/Variable" }, - "StepOutRequest": { - "$ref": "#/definitions/StepOutRequest" + "VariablePresentationHint": { + "$ref": "#/definitions/VariablePresentationHint" }, - "StepOutResponse": { - "$ref": "#/definitions/StepOutResponse" + "BreakpointLocation": { + "$ref": "#/definitions/BreakpointLocation" }, - "SteppingGranularity": { - "$ref": "#/definitions/SteppingGranularity" + "SourceBreakpoint": { + "$ref": "#/definitions/SourceBreakpoint" }, - "StoppedEvent": { - "$ref": "#/definitions/StoppedEvent" + "FunctionBreakpoint": { + "$ref": "#/definitions/FunctionBreakpoint" }, - "TerminateArguments": { - "$ref": "#/definitions/TerminateArguments" + "DataBreakpointAccessType": { + "$ref": "#/definitions/DataBreakpointAccessType" }, - "TerminateRequest": { - "$ref": "#/definitions/TerminateRequest" + "DataBreakpoint": { + "$ref": "#/definitions/DataBreakpoint" }, - "TerminateResponse": { - "$ref": "#/definitions/TerminateResponse" + "InstructionBreakpoint": { + "$ref": "#/definitions/InstructionBreakpoint" }, - "TerminateThreadsArguments": { - "$ref": "#/definitions/TerminateThreadsArguments" + "Breakpoint": { + "$ref": "#/definitions/Breakpoint" }, - "TerminateThreadsRequest": { - "$ref": "#/definitions/TerminateThreadsRequest" + "SteppingGranularity": { + "$ref": "#/definitions/SteppingGranularity" }, - "TerminateThreadsResponse": { - "$ref": "#/definitions/TerminateThreadsResponse" + "StepInTarget": { + "$ref": "#/definitions/StepInTarget" }, - "TerminatedEvent": { - "$ref": "#/definitions/TerminatedEvent" + "GotoTarget": { + "$ref": "#/definitions/GotoTarget" }, - "Thread": { - "$ref": "#/definitions/Thread" + "CompletionItem": { + "$ref": "#/definitions/CompletionItem" }, - "ThreadEvent": { - "$ref": "#/definitions/ThreadEvent" + "CompletionItemType": { + "$ref": "#/definitions/CompletionItemType" }, - "ThreadsRequest": { - "$ref": "#/definitions/ThreadsRequest" + "ChecksumAlgorithm": { + "$ref": "#/definitions/ChecksumAlgorithm" }, - "ThreadsResponse": { - "$ref": "#/definitions/ThreadsResponse" + "Checksum": { + "$ref": "#/definitions/Checksum" }, "ValueFormat": { "$ref": "#/definitions/ValueFormat" }, - "Variable": { - "$ref": "#/definitions/Variable" + "StackFrameFormat": { + "$ref": "#/definitions/StackFrameFormat" }, - "VariablePresentationHint": { - "$ref": "#/definitions/VariablePresentationHint" + "ExceptionFilterOptions": { + "$ref": "#/definitions/ExceptionFilterOptions" }, - "VariablesArguments": { - "$ref": "#/definitions/VariablesArguments" + "ExceptionOptions": { + "$ref": "#/definitions/ExceptionOptions" }, - "VariablesRequest": { - "$ref": "#/definitions/VariablesRequest" + "ExceptionBreakMode": { + "$ref": "#/definitions/ExceptionBreakMode" }, - "VariablesResponse": { - "$ref": "#/definitions/VariablesResponse" + "ExceptionPathSegment": { + "$ref": "#/definitions/ExceptionPathSegment" }, - "WriteMemoryArguments": { - "$ref": "#/definitions/WriteMemoryArguments" + "ExceptionDetails": { + "$ref": "#/definitions/ExceptionDetails" }, - "WriteMemoryRequest": { - "$ref": "#/definitions/WriteMemoryRequest" + "DisassembledInstruction": { + "$ref": "#/definitions/DisassembledInstruction" }, - "WriteMemoryResponse": { - "$ref": "#/definitions/WriteMemoryResponse" + "InvalidatedAreas": { + "$ref": "#/definitions/InvalidatedAreas" } }, From 0be8af40c1f2c18a15a296110e0d93c6cda61f56 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 30 Jun 2025 17:10:11 +0200 Subject: [PATCH 03/57] refac multiple debugpy ops --- .../monitor/adapter/python/DebugpyClient.java | 140 +++++++----------- .../monitor/adapter/python/MessageMapper.java | 5 + .../monitor/adapter/python/PythonAdapter.java | 3 +- .../python/dap/ContinueRequestClass.java | 14 +- .../python/dap/ContinueResponseBody.java | 1 + .../python/dap/ContinueResponseClass.java | 9 +- .../python/dap/EvaluateRequestClass.java | 15 +- .../python/dap/EvaluateResponseClass.java | 9 +- .../use/monitor/adapter/python/dap/Event.java | 7 +- .../python/dap/PauseResponseClass.java | 9 +- .../python/dap/StackTraceResponseClass.java | 9 +- .../adapter/python/dap/StoppedEventBody.java | 1 + .../adapter/python/dap/StoppedEventClass.java | 13 +- .../python/dap/ThreadsRequestClass.java | 15 +- .../python/dap/ThreadsResponseClass.java | 9 +- 15 files changed, 125 insertions(+), 134 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index a766e6f..97d56bb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.tzi.use.monitor.adapter.python.dap.*; +import org.tzi.use.monitor.adapter.python.dap.Thread; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyFieldRaw; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyTypeRaw; import java.io.*; @@ -97,90 +99,69 @@ boolean attach(String host, int port) { } PyTypeRaw getVMType(String qualifiedClassName) { -// // Pause -// pause(); -// -// Request dapRequest = new Request(); -// var msg = new DAPMessage(); -// msg.setSeq(currReqSeq++); -// msg.setType("request"); -// dapRequest.setCommand("evaluate"); -// dapRequest.setProtocolMessage(msg); -// var evalExp = PyEvalExBuilder.getClassFieldTypesExp(qualifiedClassName); -// ObjectNode arguments = mapper.createObjectNode(); -// // arguments.put("context", "watch"); // Not required? -// arguments.put("expression", evalExp); -// // arguments.put("frameId", getCurrentFrameId(getThreadId("MainThread"))); // Not required? -// EvaluateRequest req = new EvaluateRequest(); -// dapRequest.setArguments(arguments); -// req.setDapRequest(dapRequest); -// DAPResponse evalResp = sendRequest(req); -// -// // New internal PyType -// var rawType = new PyTypeRaw(qualifiedClassName); -// var rawField1 = new PyFieldRaw("name", "string", null); -// var rawField2 = new PyFieldRaw("salary", "int", null); -// rawType.setFields(List.of(rawField1, rawField2)); -// -// // Resume -// return rawType; - return null; + // Pause + pause(); + + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setContext("watch"); + evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); + evalArgs.setExpression(PyEvalExBuilder.getClassFieldTypesExp(qualifiedClassName)); + var evalReq = new EvaluateRequestClass(); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + // New internal PyType + var rawType = new PyTypeRaw(qualifiedClassName); + var rawField1 = new PyFieldRaw("name", "string", null); + var rawField2 = new PyFieldRaw("salary", "int", null); + rawType.setFields(List.of(rawField1, rawField2)); + + // Resume + resume(); + return rawType; } - private DAPResponse pause() { + protected boolean pause() { stoppedEvent = new CompletableFuture<>(); var pauseArgs = new PauseRequestArguments(); - pauseArgs.setThreadID(2); + pauseArgs.setThreadID(getThreadId("MainThread")); var pauseReq = new PauseRequestClass(); pauseReq.setSeq(REQUEST_COUNTER++); + pauseReq.setArguments(pauseArgs); + var pauseResp = (PauseResponseClass) sendRequest(pauseReq); + try { + System.out.println("Waiting for stopped event..."); + stoppedEvent.get(); + System.out.println("Got stopped event. Continuing..."); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + return pauseResp.getSuccess(); + } -// stoppedEvent = new CompletableFuture<>(); -// var tid = getThreadId("MainThread"); -// Request pauseReq = new Request(); -// pauseReq.setCommand("pause"); -// var msg = new DAPMessage(); -// msg.setSeq(currReqSeq++); -// msg.setType("request"); -// ObjectNode arguments = mapper.createObjectNode(); -// arguments.put("threadId", tid); -// pauseReq.setArguments(arguments); -// pauseReq.setProtocolMessage(msg); -// var res = sendRequest(pauseReq); -// try { -// System.out.println("Waiting for stopped event..."); -// stoppedEvent.get(); -// } catch (InterruptedException | ExecutionException e) { -// throw new RuntimeException(e); -// } -// return res; - return null; + protected boolean resume() { + var continueArgs = new ContinueRequestArguments(); + continueArgs.setThreadID(getThreadId("MainThread")); + var continueReq = new ContinueRequestClass(); + continueReq.setSeq(REQUEST_COUNTER++); + continueReq.setArguments(continueArgs); + var continueResp = (ContinueResponseClass) sendRequest(continueReq); + return continueResp.getSuccess(); } private int getThreadId(String threadName) { -// System.out.println("Getting thread id: " + threadName); -// Request dapRequest = new Request(); -// var msg = new DAPMessage(); -// msg.setSeq(currReqSeq++); -// msg.setType("request"); -// dapRequest.setCommand("threads"); -// dapRequest.setProtocolMessage(msg); -// ThreadsResponse threadsResponse = (ThreadsResponse) sendRequest(dapRequest); -// JsonNode body = threadsResponse.getResponse().getBody(); -// JsonNode threadsNode = body.get("threads"); -// -// ObjectMapper mapper = new ObjectMapper(); -// List threads = mapper.convertValue( -// threadsNode, -// new TypeReference<>() {} -// ); -// for (Thread thread : threads) { -// if (thread.getName().equals(threadName)) { -// System.out.println("Found thread: " + thread.getName() + " with id: " + thread.getId()); -// return thread.getId(); -// } -// } - return -1; + System.out.println("Getting thread id: " + threadName); + var threadsReq = new ThreadsRequestClass(); + threadsReq.setSeq(REQUEST_COUNTER++); + var threadsResp = (ThreadsResponseClass) sendRequest(threadsReq); + for (Thread thread : threadsResp.getBody().getThreads()) { + if (thread.getName().equals(threadName)) { + System.out.println("Found thread: " + thread.getName() + " with id: " + thread.getID()); + return (int) thread.getID(); + } + } + return -1; } private int getCurrentFrameId(int threadId) { @@ -274,19 +255,12 @@ private void startReaderThread() { //} } if (msg instanceof DAPEvent) { + System.out.println("Event instance: " + msg); if (msg instanceof InitializedEventClass) { initEvent.complete((DAPEvent) msg); } - } - if (msg instanceof DAPEvent) { - System.out.println("Event instance: " + msg); - if (msg instanceof Event) { - if (((Event) msg).getEvent().equals("initialized")) { - initEvent.complete((DAPEvent) msg); - } - if (((Event) msg).getEvent().equals("stopped")) { - stoppedEvent.complete((DAPEvent) msg); - } + if (msg instanceof StoppedEventClass) { + stoppedEvent.complete((DAPEvent) msg); } if (msg instanceof BreakpointEventClass) { handleBreakpoint((BreakpointEventClass) msg); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java index b5749f0..5114710 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -28,6 +28,11 @@ private static DAPResponse parseResponse(JsonNode tree, String json) throws Json case "initialize" -> mapper.readValue(json, InitializeResponseClass.class); case "attach" -> mapper.readValue(json, AttachResponseClass.class); case "configurationDone" -> mapper.readValue(json, ConfigurationDoneResponseClass.class); + case "threads" -> mapper.readValue(json, ThreadsResponseClass.class); + case "evaluate" -> mapper.readValue(json, EvaluateResponseClass.class); + case "pause" -> mapper.readValue(json, PauseResponseClass.class); + case "stackTrace" -> mapper.readValue(json, StackTraceResponseClass.class); + case "continue" -> mapper.readValue(json, ContinueResponseClass.class); default -> null; }; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 1f1a42c..06ea489 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -93,12 +93,13 @@ public void attachToVM() throws MonitorException { @Override public void resume() { System.out.println("Resuming debugpy server..."); - + debugpyClient.resume(); } @Override public void suspend() { System.out.println("Suspending debugpy server..."); + debugpyClient.pause(); } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java index 44f7d79..c40af91 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java @@ -12,11 +12,11 @@ * `singleThread` argument to true resumes only the specified thread. If not all threads * were resumed, the `allThreadsContinued` attribute of the response should be set to false. */ -public class ContinueRequestClass { +public class ContinueRequestClass implements DAPRequest { private long seq; - private AttachRequestType type; + private String type = "request"; private ContinueRequestArguments arguments; - private ContinueRequestCommand command; + private String command = "continue"; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -35,9 +35,9 @@ public class ContinueRequestClass { * Message type. */ @JsonProperty("type") - public AttachRequestType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachRequestType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Object containing arguments for the command. @@ -51,7 +51,7 @@ public class ContinueRequestClass { * The command to execute. */ @JsonProperty("command") - public ContinueRequestCommand getCommand() { return command; } + public String getCommand() { return command; } @JsonProperty("command") - public void setCommand(ContinueRequestCommand value) { this.command = value; } + public void setCommand(String value) { this.command = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseBody.java index f0175f8..fcbeccb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseBody.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseBody.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.*; +@JsonInclude(JsonInclude.Include.NON_NULL) public class ContinueResponseBody { private Boolean allThreadsContinued; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java index 618f321..48bccf8 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java @@ -9,9 +9,10 @@ * * Response to `continue` request. */ -public class ContinueResponseClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ContinueResponseClass implements DAPResponse { private long seq; - private AttachResponseType type; + private String type; private ContinueResponseBody body; private String command; private String message; @@ -35,9 +36,9 @@ public class ContinueResponseClass { * Message type. */ @JsonProperty("type") - public AttachResponseType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachResponseType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Contains request result if success is true and error details if success is false. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java index e03d419..dba34eb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java @@ -10,11 +10,12 @@ * Evaluates the given expression in the context of the topmost stack frame. * The expression has access to any variables and arguments that are in scope. */ -public class EvaluateRequestClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class EvaluateRequestClass implements DAPRequest { private long seq; - private AttachRequestType type; + private String type = "request"; private EvaluateRequestArguments arguments; - private EvaluateRequestCommand command; + private String command = "evaluate"; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -33,9 +34,9 @@ public class EvaluateRequestClass { * Message type. */ @JsonProperty("type") - public AttachRequestType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachRequestType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Object containing arguments for the command. @@ -49,7 +50,7 @@ public class EvaluateRequestClass { * The command to execute. */ @JsonProperty("command") - public EvaluateRequestCommand getCommand() { return command; } + public String getCommand() { return command; } @JsonProperty("command") - public void setCommand(EvaluateRequestCommand value) { this.command = value; } + public void setCommand(String value) { this.command = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java index 122d252..dca9e05 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java @@ -9,9 +9,10 @@ * * Response to `evaluate` request. */ -public class EvaluateResponseClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class EvaluateResponseClass implements DAPResponse { private long seq; - private AttachResponseType type; + private String type; private EvaluateResponseBody body; private String command; private String message; @@ -35,9 +36,9 @@ public class EvaluateResponseClass { * Message type. */ @JsonProperty("type") - public AttachResponseType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachResponseType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Contains request result if success is true and error details if success is false. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Event.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Event.java index f498655..90a658f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Event.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Event.java @@ -7,9 +7,10 @@ * * A debug adapter initiated event. */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class Event { private long seq; - private BreakpointEventType type; + private String type; private Restart body; private String event; @@ -30,9 +31,9 @@ public class Event { * Message type. */ @JsonProperty("type") - public BreakpointEventType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(BreakpointEventType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Event-specific information. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java index 8a26d36..d6d7bb5 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java @@ -10,9 +10,10 @@ * Response to `pause` request. This is just an acknowledgement, so no body field is * required. */ -public class PauseResponseClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class PauseResponseClass implements DAPResponse { private long seq; - private AttachResponseType type; + private String type; private Restart body; private String command; private String message; @@ -36,9 +37,9 @@ public class PauseResponseClass { * Message type. */ @JsonProperty("type") - public AttachResponseType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachResponseType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Contains request result if success is true and error details if success is false. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java index 44af159..3d6bae9 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java @@ -9,9 +9,10 @@ * * Response to `stackTrace` request. */ -public class StackTraceResponseClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class StackTraceResponseClass implements DAPResponse { private long seq; - private AttachResponseType type; + private String type; private StackTraceResponseBody body; private String command; private String message; @@ -35,9 +36,9 @@ public class StackTraceResponseClass { * Message type. */ @JsonProperty("type") - public AttachResponseType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachResponseType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Contains request result if success is true and error details if success is false. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventBody.java index 69eb40e..bbf53dd 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventBody.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventBody.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.*; +@JsonInclude(JsonInclude.Include.NON_NULL) public class StoppedEventBody { private Boolean allThreadsStopped; private String description; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java index 7d069a9..f2e8720 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java @@ -11,11 +11,12 @@ * This can be caused by a breakpoint previously set, a stepping request has completed, by * executing a debugger statement etc. */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class StoppedEventClass implements DAPEvent { private long seq; - private BreakpointEventType type; + private String type; private StoppedEventBody body; - private StoppedEventEvent event; + private String event; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -34,9 +35,9 @@ public class StoppedEventClass implements DAPEvent { * Message type. */ @JsonProperty("type") - public BreakpointEventType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(BreakpointEventType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Event-specific information. @@ -50,7 +51,7 @@ public class StoppedEventClass implements DAPEvent { * Type of event. */ @JsonProperty("event") - public StoppedEventEvent getEvent() { return event; } + public String getEvent() { return event; } @JsonProperty("event") - public void setEvent(StoppedEventEvent value) { this.event = value; } + public void setEvent(String value) { this.event = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java index f907216..578208a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java @@ -9,11 +9,12 @@ * * The request retrieves a list of all threads. */ -public class ThreadsRequestClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ThreadsRequestClass implements DAPRequest { private long seq; - private AttachRequestType type; + private String type = "request"; private Restart arguments; - private ThreadsRequestCommand command; + private String command = "threads"; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -32,9 +33,9 @@ public class ThreadsRequestClass { * Message type. */ @JsonProperty("type") - public AttachRequestType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachRequestType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Object containing arguments for the command. @@ -48,7 +49,7 @@ public class ThreadsRequestClass { * The command to execute. */ @JsonProperty("command") - public ThreadsRequestCommand getCommand() { return command; } + public String getCommand() { return command; } @JsonProperty("command") - public void setCommand(ThreadsRequestCommand value) { this.command = value; } + public void setCommand(String value) { this.command = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java index f22480b..62b323e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java @@ -9,9 +9,10 @@ * * Response to `threads` request. */ -public class ThreadsResponseClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ThreadsResponseClass implements DAPResponse { private long seq; - private AttachResponseType type; + private String type; private ThreadsResponseBody body; private String command; private String message; @@ -35,9 +36,9 @@ public class ThreadsResponseClass { * Message type. */ @JsonProperty("type") - public AttachResponseType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachResponseType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Contains request result if success is true and error details if success is false. From f4d820103b68fa92cb9e3bf62badc9211bce26fd Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 1 Jul 2025 21:21:11 +0200 Subject: [PATCH 04/57] impl control flow ops and refac vm class mappings --- .../monitor/adapter/python/DebugpyClient.java | 57 +++++++++++++++---- .../monitor/adapter/python/MessageMapper.java | 2 + .../monitor/adapter/python/PythonAdapter.java | 8 ++- .../python/dap/DisconnectRequestClass.java | 15 ++--- .../python/dap/DisconnectResponseClass.java | 9 +-- .../python/dap/TerminatedEventClass.java | 15 ++--- 6 files changed, 74 insertions(+), 32 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 97d56bb..71c43a0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -9,10 +9,10 @@ import java.io.*; import java.net.Socket; -import java.util.List; -import java.util.Map; -import java.util.UUID; +import java.util.*; import java.util.concurrent.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * @author Sergio Jimenez @@ -99,7 +99,6 @@ boolean attach(String host, int port) { } PyTypeRaw getVMType(String qualifiedClassName) { - // Pause pause(); var evalArgs = new EvaluateRequestArguments(); @@ -110,17 +109,38 @@ PyTypeRaw getVMType(String qualifiedClassName) { evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - // New internal PyType - var rawType = new PyTypeRaw(qualifiedClassName); - var rawField1 = new PyFieldRaw("name", "string", null); - var rawField2 = new PyFieldRaw("salary", "int", null); - rawType.setFields(List.of(rawField1, rawField2)); + var classMappings = parsePythonTypeString(evalResp.getBody().getResult()); + PyTypeRaw rawType = new PyTypeRaw(qualifiedClassName); + List fields = new ArrayList<>(); + for (Map.Entry entry : classMappings.entrySet()) { + fields.add(new PyFieldRaw(entry.getKey(), entry.getValue(), null)); + } + rawType.setFields(fields); - // Resume resume(); return rawType; } + public Map parsePythonTypeString(String input) { + Map result = new HashMap<>(); + + String cleaned = input + .replace("'", "\"") + .replaceAll("", "\"$1\"") + .replaceAll("", "\"$1\""); + + Pattern pattern = Pattern.compile("\"(\\w+)\":\\s*\"(\\w+)\""); + Matcher matcher = pattern.matcher(cleaned); + + while (matcher.find()) { + String variable = matcher.group(1); + String type = matcher.group(2); + result.put(variable, type); + } + + return result; + } + protected boolean pause() { stoppedEvent = new CompletableFuture<>(); @@ -150,6 +170,18 @@ protected boolean resume() { return continueResp.getSuccess(); } + protected boolean stop() { + var stopArgs = new DisconnectRequestArguments(); + stopArgs.setRestart(false); + stopArgs.setSuspendDebuggee(true); + stopArgs.setTerminateDebuggee(false); + var stopReq = new DisconnectRequestClass(); + stopReq.setSeq(REQUEST_COUNTER++); + stopReq.setArguments(stopArgs); + var stopResp = (DisconnectResponseClass) sendRequest(stopReq); + return stopResp.getSuccess(); + } + private int getThreadId(String threadName) { System.out.println("Getting thread id: " + threadName); var threadsReq = new ThreadsRequestClass(); @@ -223,7 +255,7 @@ private void startReaderThread() { while (true) { String line; int contentLength = 0; - while (!(line = in.readLine()).isEmpty()) { + while ((line = in.readLine()) != null && !line.isEmpty()) { contentLength = Integer.parseInt(line.substring("Content-Length:".length()).trim()); } char[] body = new char[contentLength]; @@ -234,6 +266,9 @@ private void startReaderThread() { read += r; } String json = new String(body); + if (json.isEmpty()) { + continue; + } System.out.println("Received json response: " + json); DAPMessage msg = MessageMapper.parseMessage(json); System.out.println("Parsed json response to object..."); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java index 5114710..6cc094e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -33,6 +33,7 @@ private static DAPResponse parseResponse(JsonNode tree, String json) throws Json case "pause" -> mapper.readValue(json, PauseResponseClass.class); case "stackTrace" -> mapper.readValue(json, StackTraceResponseClass.class); case "continue" -> mapper.readValue(json, ContinueResponseClass.class); + case "disconnect" -> mapper.readValue(json, DisconnectResponseClass.class); default -> null; }; } @@ -43,6 +44,7 @@ private static DAPEvent parseEvent(JsonNode tree, String json) throws JsonProces case "initialized" -> mapper.readValue(json, InitializedEventClass.class); case "breakpoint" -> mapper.readValue(json, BreakpointEventClass.class); case "stopped" -> mapper.readValue(json, StoppedEventClass.class); + case "terminated" -> mapper.readValue(json, TerminatedEventClass.class); default -> null; }; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 06ea489..e9efd6c 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -94,18 +94,19 @@ public void attachToVM() throws MonitorException { public void resume() { System.out.println("Resuming debugpy server..."); debugpyClient.resume(); + System.out.println("Resumed debugpy server..."); } @Override public void suspend() { - System.out.println("Suspending debugpy server..."); + System.out.println("Suspended debugpy server..."); debugpyClient.pause(); } @Override public void stop() { - System.out.println("Stopping debugpy server..."); - + System.out.println("Stopped debugpy server..."); + debugpyClient.stop(); isConnected = false; } @@ -120,6 +121,7 @@ public VMType getVMType(String name) { } typeMapping.put(name, res); } + System.out.println("Got VMType '" + name + "'..."); return typeMapping.get(name); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java index ec4378f..543b245 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java @@ -16,11 +16,12 @@ * `terminateDebuggee` argument (which is only supported by a debug adapter if the * corresponding capability `supportTerminateDebuggee` is true). */ -public class DisconnectRequestClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class DisconnectRequestClass implements DAPRequest { private long seq; - private AttachRequestType type; + private String type = "request"; private DisconnectRequestArguments arguments; - private DisconnectRequestCommand command; + private String command = "disconnect"; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -39,9 +40,9 @@ public class DisconnectRequestClass { * Message type. */ @JsonProperty("type") - public AttachRequestType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachRequestType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Object containing arguments for the command. @@ -55,7 +56,7 @@ public class DisconnectRequestClass { * The command to execute. */ @JsonProperty("command") - public DisconnectRequestCommand getCommand() { return command; } + public String getCommand() { return command; } @JsonProperty("command") - public void setCommand(DisconnectRequestCommand value) { this.command = value; } + public void setCommand(String value) { this.command = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java index b3b1ad6..26f5edc 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java @@ -10,9 +10,10 @@ * Response to `disconnect` request. This is just an acknowledgement, so no body field is * required. */ -public class DisconnectResponseClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class DisconnectResponseClass implements DAPResponse { private long seq; - private AttachResponseType type; + private String type; private Restart body; private String command; private String message; @@ -36,9 +37,9 @@ public class DisconnectResponseClass { * Message type. */ @JsonProperty("type") - public AttachResponseType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachResponseType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Contains request result if success is true and error details if success is false. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java index 3c370d7..0c7f44e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java @@ -10,11 +10,12 @@ * The event indicates that debugging of the debuggee has terminated. This does **not** mean * that the debuggee itself has exited. */ -public class TerminatedEventClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class TerminatedEventClass implements DAPEvent { private long seq; - private BreakpointEventType type; + private String type; private TerminatedEventBody body; - private TerminatedEventEvent event; + private String event; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -33,9 +34,9 @@ public class TerminatedEventClass { * Message type. */ @JsonProperty("type") - public BreakpointEventType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(BreakpointEventType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Event-specific information. @@ -49,7 +50,7 @@ public class TerminatedEventClass { * Type of event. */ @JsonProperty("event") - public TerminatedEventEvent getEvent() { return event; } + public String getEvent() { return event; } @JsonProperty("event") - public void setEvent(TerminatedEventEvent value) { this.event = value; } + public void setEvent(String value) { this.event = value; } } From 8afa9a069a50939d5461f61cf4cfe3d8ce5c87fe Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Wed, 2 Jul 2025 00:57:28 +0200 Subject: [PATCH 05/57] fix get instance fields dynamically with id --- .../monitor/adapter/python/DebugpyClient.java | 41 ++++++++++++++++++- .../adapter/python/PyEvalExBuilder.java | 9 ++++ .../monitor/adapter/python/PythonAdapter.java | 18 +++----- .../plugins/monitor/vm/mm/python/PyField.java | 6 ++- .../monitor/vm/mm/python/PyObject.java | 14 +++++-- 5 files changed, 69 insertions(+), 19 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 71c43a0..c7b7633 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -4,8 +4,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.adapter.python.dap.Thread; -import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyFieldRaw; -import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyTypeRaw; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import java.io.*; import java.net.Socket; @@ -106,6 +105,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); evalArgs.setExpression(PyEvalExBuilder.getClassFieldTypesExp(qualifiedClassName)); var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); @@ -206,6 +206,43 @@ private int getCurrentFrameId(int threadId) { return (int) stackTraceResp.getBody().getStackFrames()[0].getID(); } + protected PyObjectRaw getInstance(PyType pyType) { + pause(); + + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setContext("watch"); + evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); + evalArgs.setExpression(PyEvalExBuilder.getInstanceExp(pyType.getName())); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + var res = evalResp.getBody().getResult(); + String json = res.replace('\'', '"'); + ObjectMapper mapper = new ObjectMapper(); + Map rawMap = null; + try { + rawMap = mapper.readValue(json, Map.class); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + Map result = new HashMap<>(); + for (Map.Entry entry : rawMap.entrySet()) { + result.put(entry.getKey(), entry.getValue().toString()); + } + + var pyObjectRaw = new PyObjectRaw(); + pyObjectRaw.setRawType(pyType.getRawType()); + for (PyFieldRaw rawField : pyObjectRaw.getRawType().getFields()) { + System.out.println("Setting value '" + result.get(rawField.getName()) + "' to field '" + rawField.getName()); + rawField.setValue(result.get(rawField.getName())); + } + + resume(); + return pyObjectRaw; + } + private void getStackStrace() { } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 0d3898f..30c8113 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -15,4 +15,13 @@ public static String getClassFieldTypesExp(String qualifiedClassName) { className ); } + + public static String getInstanceExp(String qualifiedClassName) { + int lastDot = qualifiedClassName.lastIndexOf('.'); + String simpleClassName = qualifiedClassName.substring(lastDot + 1); + return String.format( + "vars(next(obj for obj in __import__('gc').get_objects() if isinstance(obj, %s)))", + simpleClassName + ); + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index e9efd6c..6956cc4 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -2,7 +2,6 @@ import org.tzi.use.monitor.adapter.python.dap.BreakpointEventClass; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObject; -import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObjectRaw; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyType; import org.tzi.use.plugins.monitor.MonitorException; import org.tzi.use.plugins.monitor.vm.adapter.AbstractVMAdapter; @@ -26,20 +25,15 @@ public class PythonAdapter extends AbstractVMAdapter { private int port; private boolean isConnected; private DebugpyClient debugpyClient; - private Map typeMapping; + public Map typeMapping; private HashMap> breakpoints; public Set readInstances(PyType type) { - var pyObjectRaw = new PyObjectRaw(); // TODO construct from client call instead - pyObjectRaw.setRawType(type.getRawType()); - pyObjectRaw.getRawType().getFields().get(0).setValue("John Doe"); - pyObjectRaw.getRawType().getFields().get(1).setValue("60000"); // TODO Fix is not getting set... - Set vmObjects = new HashSet<>(); - for (PyObjectRaw ref : Set.of(pyObjectRaw)) { - PyObject pyObj = new PyObject(this, ref); - vmObjects.add(pyObj); - } - return vmObjects; + var className = type.getName(); + System.out.println("Reading instances of class: " + className); + var pyObjectRaw = debugpyClient.getInstance(typeMapping.get(className)); + PyObject pyObj = new PyObject(this, pyObjectRaw, typeMapping.get(className)); + return Set.of(pyObj); } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index 3c2cbf7..63a04f4 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -5,13 +5,17 @@ import org.tzi.use.uml.mm.MAssociationEnd; import org.tzi.use.uml.mm.MAttribute; +import java.util.UUID; + public class PyField extends PyBase implements VMField { + private final Object id; private final PyFieldRaw pyFieldRaw; public PyField(PythonAdapter adapter, PyFieldRaw pyFieldRaw) { super(adapter); this.pyFieldRaw = pyFieldRaw; + this.id = UUID.randomUUID(); } @Override @@ -41,7 +45,7 @@ public MAssociationEnd getUSEAssociationEnd() { @Override public Object getId() { - return null; + return id; } PyFieldRaw getPyFieldRaw() { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java index 41d5470..9777d4b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -9,21 +9,26 @@ import org.tzi.use.uml.ocl.value.Value; import org.tzi.use.uml.sys.MObject; +import java.util.UUID; + public class PyObject extends PyBase implements VMObject { private final PyObjectRaw rawObject; private final VMType type; + private final Object id; + private MObject useObject; - public PyObject(PythonAdapter adapter, PyObjectRaw rawObject) { + public PyObject(PythonAdapter adapter, PyObjectRaw rawObject, PyType type) { super(adapter); this.rawObject = rawObject; - this.type = adapter.getVMType(rawObject.getRawType().getName()); + this.type = type; + this.id = UUID.randomUUID(); } @Override public Object getId() { - return null; + return id; } @Override @@ -56,7 +61,8 @@ public Value getValue(VMField field) { System.out.println("getValue valstr:" + valStr); return switch (valTypeStr) { case "int" -> IntegerValue.valueOf(Integer.parseInt(valStr)); - default -> new StringValue(valStr); + case "str" -> new StringValue(valStr); + default -> null; }; } From 7b24e26de518c33fa0439b52d72b2f25e99f7c4d Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Wed, 2 Jul 2025 01:04:07 +0200 Subject: [PATCH 06/57] fix include monitor button icon resources --- monitor/pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/monitor/pom.xml b/monitor/pom.xml index 112f7c7..2fe1edc 100644 --- a/monitor/pom.xml +++ b/monitor/pom.xml @@ -48,6 +48,13 @@ useplugin.xml + + ${project.basedir}/src/main/resources + resources + + * + + From a84b3094da03d37b354b1a5fc6840159cbd90eae Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Thu, 3 Jul 2025 23:20:49 +0200 Subject: [PATCH 07/57] Add missing annotation --- .../use/monitor/adapter/python/dap/ContinueRequestArguments.java | 1 + 1 file changed, 1 insertion(+) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestArguments.java index 5da8af9..89279cc 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestArguments.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestArguments.java @@ -5,6 +5,7 @@ /** * Arguments for `continue` request. */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class ContinueRequestArguments { private Boolean singleThread; private long threadID; From b227d4169b3def0cf48d5a718e7a74c1573b3bd0 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Thu, 3 Jul 2025 23:21:36 +0200 Subject: [PATCH 08/57] Fix suspend/resume logic --- .../use/monitor/adapter/python/DebugpyClient.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index c7b7633..be597fb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -29,6 +29,7 @@ public class DebugpyClient { private CompletableFuture futureResp; private CompletableFuture initEvent; private CompletableFuture stoppedEvent; + private boolean running = false; DebugpyClient(String host, int port, BreakpointHandler breakpointHandler) throws IOException { this.socket = new Socket(host, port); @@ -94,6 +95,7 @@ boolean attach(String host, int port) { } catch (InterruptedException e) { throw new RuntimeException(e); } + running = true; return initResp.getSuccess(); } @@ -117,7 +119,6 @@ PyTypeRaw getVMType(String qualifiedClassName) { } rawType.setFields(fields); - resume(); return rawType; } @@ -142,6 +143,10 @@ public Map parsePythonTypeString(String input) { } protected boolean pause() { + if (!running) { + return true; + } + stoppedEvent = new CompletableFuture<>(); var pauseArgs = new PauseRequestArguments(); @@ -157,16 +162,21 @@ protected boolean pause() { } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } + running = false; return pauseResp.getSuccess(); } protected boolean resume() { + if (running) { + return true; + } var continueArgs = new ContinueRequestArguments(); continueArgs.setThreadID(getThreadId("MainThread")); var continueReq = new ContinueRequestClass(); continueReq.setSeq(REQUEST_COUNTER++); continueReq.setArguments(continueArgs); var continueResp = (ContinueResponseClass) sendRequest(continueReq); + running = true; return continueResp.getSuccess(); } @@ -239,7 +249,6 @@ protected PyObjectRaw getInstance(PyType pyType) { rawField.setValue(result.get(rawField.getName())); } - resume(); return pyObjectRaw; } From c0817e4c121a16cb5a194573a506cbfee74ab68c Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sat, 5 Jul 2025 22:53:14 +0200 Subject: [PATCH 09/57] Add vm method mapping, todo add logs --- .../monitor/adapter/python/DebugpyClient.java | 63 +++++++++++++++++++ .../adapter/python/PyEvalExBuilder.java | 15 +++++ .../monitor/vm/mm/python/PyMethod.java | 33 +++++++--- .../monitor/vm/mm/python/PyMethodRaw.java | 35 ++++------- .../plugins/monitor/vm/mm/python/PyType.java | 10 ++- 5 files changed, 123 insertions(+), 33 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index be597fb..dee7ccc 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -100,8 +100,20 @@ boolean attach(String host, int port) { } PyTypeRaw getVMType(String qualifiedClassName) { + // TODO: Handle remaining build-in types + var t = switch (qualifiedClassName) { + case "str" -> new PyTypeRaw("str"); + case "int" -> new PyTypeRaw("int"); + default -> null; + }; + + if (t != null) { + return t; + } + pause(); + // Set Fields var evalArgs = new EvaluateRequestArguments(); evalArgs.setContext("watch"); evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); @@ -119,9 +131,60 @@ PyTypeRaw getVMType(String qualifiedClassName) { } rawType.setFields(fields); + // Set Methods + evalArgs.setExpression(PyEvalExBuilder.getMethodsExpVar(qualifiedClassName)); + evalReq.setSeq(REQUEST_COUNTER++); + evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + Map> mSigs = parseMethodSignatures(evalResp.getBody().getResult()); + List methods = new LinkedList<>(); + for (String mName : mSigs.keySet()) { + PyMethodRaw mRaw = new PyMethodRaw(); + mRaw.setName(mName); + List argTypeNames = new LinkedList<>(); + for (Map.Entry mArg : mSigs.get(mName).entrySet()) { + argTypeNames.add(mArg.getValue()); + } + mRaw.setArgumentTypeNames(argTypeNames); + methods.add(mRaw); + } + rawType.setMethods(methods); return rawType; } + public static Map> parseMethodSignatures(String evalResp) { + Map> result = new HashMap<>(); + Pattern signaturePattern = Pattern.compile("^(\\w+)\\((.*?)\\)\\s*->\\s*.*$"); + evalResp = evalResp.strip().replaceAll("^'+|'+$", ""); // Remove outer quotes + String[] lines = evalResp.split("\\\\n"); // split on literal `\n` + + for (String line : lines) { + Matcher matcher = signaturePattern.matcher(line.strip()); + if (matcher.matches()) { + String methodName = matcher.group(1); + String params = matcher.group(2); + Map paramMap = new LinkedHashMap<>(); + if (!params.isEmpty()) { + for (String param : params.split(",")) { + param = param.strip(); + if (param.equals("self")) continue; + String[] parts = param.split(":"); + if (parts.length == 2) { + String paramName = parts[0].strip(); + String paramType = parts[1].strip(); + paramMap.put(paramName, paramType); + } else { + // TODO: Unknown handling + System.out.printf("Unknown type for argument '%s'\n", parts[0].strip()); + } + } + } + result.put(methodName, paramMap); + } + } + return result; + } + public Map parsePythonTypeString(String input) { Map result = new HashMap<>(); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 30c8113..68f3cf5 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -24,4 +24,19 @@ public static String getInstanceExp(String qualifiedClassName) { simpleClassName ); } + + public static String getMethodsExpVar(String qualifiedClassName) { + int lastDot = qualifiedClassName.lastIndexOf('.'); + String moduleName = qualifiedClassName.substring(0, lastDot); + String simpleClassName = qualifiedClassName.substring(lastDot + 1); + return String.format( + "\"\\n\".join([\n" + + " f\"{name}({', '.join([str(p) for p in __import__('inspect').signature(m).parameters.values()])}) -> {__import__('inspect').signature(m).return_annotation.__name__ if isinstance(__import__('inspect').signature(m).return_annotation, type) else str(__import__('inspect').signature(m).return_annotation)}\"\n" + + " for name, m in __import__('inspect').getmembers(__import__('sys').modules['%s'].%s, __import__('inspect').isfunction)\n" + + "])", + moduleName, + simpleClassName + ); + } + } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java index 8a83823..ef9885d 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java @@ -1,39 +1,44 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; -import com.sun.jdi.Method; -import org.tzi.use.plugins.monitor.vm.adapter.VMAccessException; -import org.tzi.use.plugins.monitor.vm.adapter.jvm.JVMAdapter; +import org.tzi.use.monitor.adapter.python.PythonAdapter; import org.tzi.use.plugins.monitor.vm.mm.VMMethod; import org.tzi.use.plugins.monitor.vm.mm.VMType; -import org.tzi.use.plugins.monitor.vm.mm.jvm.JVMBase; import org.tzi.use.uml.mm.MOperation; +import java.util.ArrayList; import java.util.List; +import java.util.UUID; -public class PyMethod extends JVMBase implements VMMethod { +public class PyMethod extends PyBase implements VMMethod { private final PyMethodRaw method; private MOperation useOperation; + private UUID id; - public PyMethod(JVMAdapter adapter, PyMethodRaw method) { + public PyMethod(PythonAdapter adapter, PyMethodRaw method) { super(adapter); this.method = method; + this.id = UUID.randomUUID(); } @Override public Object getId() { - return null; + return id; } @Override public String getName() { - return ""; + return method.getName(); } @Override - public List getArgumentTypes() throws VMAccessException { - return List.of(); + public List getArgumentTypes() { + List types = new ArrayList<>(method.getArgumentTypeNames().size()); + for (String typeName : method.getArgumentTypeNames()) { + types.add(adapter.getVMType(typeName)); + } + return types; } @Override @@ -46,4 +51,12 @@ public void setUSEOperation(MOperation useOperation) { this.useOperation = useOperation; } + @Override + public String toString() { + return "PyMethod{" + + "method=" + method + + ", useOperation=" + useOperation + + ", id=" + id + + '}'; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java index 5ae9db5..12acb76 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java @@ -1,11 +1,11 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; +import java.util.List; + public class PyMethodRaw { private String name; - private String returnType; - private String lineNoStart; - private String lineNoEnd; + private List argumentTypeNames; public String getName() { return name; @@ -15,28 +15,19 @@ public void setName(String name) { this.name = name; } - public String getReturnType() { - return returnType; - } - - public void setReturnType(String returnType) { - this.returnType = returnType; - } - - public String getLineNoStart() { - return lineNoStart; - } - - public void setLineNoStart(String lineNoStart) { - this.lineNoStart = lineNoStart; + public List getArgumentTypeNames() { + return argumentTypeNames; } - public String getLineNoEnd() { - return lineNoEnd; + public void setArgumentTypeNames(List argumentTypeNames) { + this.argumentTypeNames = argumentTypeNames; } - public void setLineNoEnd(String lineNoEnd) { - this.lineNoEnd = lineNoEnd; + @Override + public String toString() { + return "PyMethodRaw{" + + "name='" + name + '\'' + + ", argumentTypeNames=" + argumentTypeNames + + '}'; } - } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index a698733..477314e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -7,6 +7,7 @@ import org.tzi.use.plugins.monitor.vm.mm.VMType; import org.tzi.use.uml.mm.MClass; +import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -51,7 +52,14 @@ public Set getInstances() { @Override public List getMethodsByName(String methodName) { - return List.of(); + List pyMethodsRaw = rawType.getMethods().stream() + .filter(m -> m.getName().equals(methodName)) + .toList(); + List pyMethods = new LinkedList<>(); + for (PyMethodRaw rawMethod : pyMethodsRaw) { + pyMethods.add(new PyMethod(getAdapter(), rawMethod)); + } + return pyMethods; } @Override From c79335f73419e02d6915b4e6285e9b95f52f9d72 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 7 Jul 2025 18:07:08 +0200 Subject: [PATCH 10/57] Add set breakpoint functionality --- .../monitor/adapter/python/DebugpyClient.java | 42 +++++++++++++++++++ .../monitor/adapter/python/MessageMapper.java | 1 + .../adapter/python/PyEvalExBuilder.java | 23 +++++++++- .../monitor/adapter/python/PythonAdapter.java | 16 +++---- .../python/dap/BreakpointEventClass.java | 13 +++--- .../dap/SetBreakpointsRequestArguments.java | 1 + .../dap/SetBreakpointsRequestClass.java | 15 +++---- .../dap/SetBreakpointsResponseClass.java | 9 ++-- .../monitor/vm/mm/python/PyMethod.java | 4 ++ .../monitor/vm/mm/python/PyMethodRaw.java | 31 ++++++++++++++ 10 files changed, 130 insertions(+), 25 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index dee7ccc..589098d 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.adapter.python.dap.Thread; @@ -140,12 +141,33 @@ PyTypeRaw getVMType(String qualifiedClassName) { List methods = new LinkedList<>(); for (String mName : mSigs.keySet()) { PyMethodRaw mRaw = new PyMethodRaw(); + // Set name mRaw.setName(mName); + // Set arg type names List argTypeNames = new LinkedList<>(); for (Map.Entry mArg : mSigs.get(mName).entrySet()) { argTypeNames.add(mArg.getValue()); } mRaw.setArgumentTypeNames(argTypeNames); + // Set line nos and filename + evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(qualifiedClassName, mName)); + evalReq.setSeq(REQUEST_COUNTER++); + evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + String json = evalResp.getBody().getResult().replace("'", "\""); + ObjectMapper mapper = new ObjectMapper(); + JsonNode root; + try { + root = mapper.readTree(json); + } catch (JsonProcessingException e) { + return null; + } + mRaw.setFile(root.get("file").asText()); + mRaw.setStartLineNo(root.get("start").asInt()); + mRaw.setEndLineNo(root.get("end").asInt() - 1); + + // TODO: Set return type + methods.add(mRaw); } rawType.setMethods(methods); @@ -205,6 +227,23 @@ public Map parsePythonTypeString(String input) { return result; } + protected boolean setBreakpoint(PyMethod pyMethod) { + var source = new Source(); + source.setPath(pyMethod.getMethod().getFile()); + var bpArgs = new SetBreakpointsRequestArguments(); + bpArgs.setSource(source); + var bpSrcStart = new SourceBreakpoint(); + bpSrcStart.setLine(pyMethod.getMethod().getStartLineNo()); + var bpSrcEnd = new SourceBreakpoint(); + bpSrcEnd.setLine(pyMethod.getMethod().getEndLineNo()); + bpArgs.setBreakpoints(new SourceBreakpoint[]{bpSrcStart, bpSrcEnd}); + var bpReq = new SetBreakpointsRequestClass(); + bpReq.setSeq(REQUEST_COUNTER++); + bpReq.setArguments(bpArgs); + var bpResp = (SetBreakpointsResponseClass) sendRequest(bpReq); + return bpResp.getSuccess(); + } + protected boolean pause() { if (!running) { return true; @@ -292,6 +331,9 @@ protected PyObjectRaw getInstance(PyType pyType) { var evalResp = (EvaluateResponseClass) sendRequest(evalReq); var res = evalResp.getBody().getResult(); + if (res.equals("None")) { + return null; + } String json = res.replace('\'', '"'); ObjectMapper mapper = new ObjectMapper(); Map rawMap = null; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java index 6cc094e..5aed067 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -34,6 +34,7 @@ private static DAPResponse parseResponse(JsonNode tree, String json) throws Json case "stackTrace" -> mapper.readValue(json, StackTraceResponseClass.class); case "continue" -> mapper.readValue(json, ContinueResponseClass.class); case "disconnect" -> mapper.readValue(json, DisconnectResponseClass.class); + case "setBreakpoints" -> mapper.readValue(json, SetBreakpointsResponseClass.class); default -> null; }; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 68f3cf5..858c228 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -20,7 +20,8 @@ public static String getInstanceExp(String qualifiedClassName) { int lastDot = qualifiedClassName.lastIndexOf('.'); String simpleClassName = qualifiedClassName.substring(lastDot + 1); return String.format( - "vars(next(obj for obj in __import__('gc').get_objects() if isinstance(obj, %s)))", + "vars(next((obj for obj in __import__('gc').get_objects() if isinstance(obj, %s)), None)) if next((obj for obj in __import__('gc').get_objects() if isinstance(obj, %s)), None) else None", + simpleClassName, simpleClassName ); } @@ -39,4 +40,24 @@ public static String getMethodsExpVar(String qualifiedClassName) { ); } + public static String getMethodBreakpointInfo(String qualifiedClassName, String methodName) { + int lastDot = qualifiedClassName.lastIndexOf('.'); + String moduleName = qualifiedClassName.substring(0, lastDot); + String simpleClassName = qualifiedClassName.substring(lastDot + 1); + return String.format("{\"file\": __import__('inspect').getsourcefile(getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s')), \"start\": getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s').__code__.co_firstlineno, \"end\": getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s').__code__.co_firstlineno + len(__import__('inspect').getsourcelines(getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s'))[0]) - 1}\n", + moduleName, + simpleClassName, + methodName, + moduleName, + simpleClassName, + methodName, + moduleName, + simpleClassName, + methodName, + moduleName, + simpleClassName, + methodName + ); + } + } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 6956cc4..6055007 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python; import org.tzi.use.monitor.adapter.python.dap.BreakpointEventClass; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyMethod; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObject; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyType; import org.tzi.use.plugins.monitor.MonitorException; @@ -11,7 +12,6 @@ import org.tzi.use.uml.ocl.value.Value; import java.util.*; -import java.util.logging.Level; /** * @author Sergio Jimenez @@ -32,6 +32,9 @@ public Set readInstances(PyType type) { var className = type.getName(); System.out.println("Reading instances of class: " + className); var pyObjectRaw = debugpyClient.getInstance(typeMapping.get(className)); + if (pyObjectRaw == null) { + return Set.of(); + } PyObject pyObj = new PyObject(this, pyObjectRaw, typeMapping.get(className)); return Set.of(pyObj); } @@ -136,7 +139,9 @@ public boolean isVMTypeLoaded(String javaClassName) { @Override public void registerOperationCallInterest(VMMethod m) { - + if (!m.getName().equals("__init__")) { + debugpyClient.setBreakpoint((PyMethod) m); + } } @Override @@ -156,11 +161,8 @@ public Value getMethodResultValue(Object adapterExitInformation) { @Override public void registerConstructorCallInterest(VMType vmType) { - PyType type = (PyType) vmType; - for (VMMethod m : type.getMethodsByName("__init__")) { - controller.newLogMessage(this, Level.FINE, "Registering constructor " + m.toString()); - // set breakpoints via debugpy for constructor - } + VMMethod constructor = vmType.getMethodsByName("__init__").getFirst(); + debugpyClient.setBreakpoint((PyMethod) constructor); } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java index 63e6ceb..f94a1c5 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java @@ -9,11 +9,12 @@ * * The event indicates that some information about a breakpoint has changed. */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class BreakpointEventClass implements DAPEvent { private long seq; - private BreakpointEventType type; + private String type; private BreakpointEventBody body; - private BreakpointEventEvent event; + private String event; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -32,9 +33,9 @@ public class BreakpointEventClass implements DAPEvent { * Message type. */ @JsonProperty("type") - public BreakpointEventType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(BreakpointEventType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Event-specific information. @@ -48,7 +49,7 @@ public class BreakpointEventClass implements DAPEvent { * Type of event. */ @JsonProperty("event") - public BreakpointEventEvent getEvent() { return event; } + public String getEvent() { return event; } @JsonProperty("event") - public void setEvent(BreakpointEventEvent value) { this.event = value; } + public void setEvent(String value) { this.event = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestArguments.java index 91f1c35..06f59fc 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestArguments.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestArguments.java @@ -5,6 +5,7 @@ /** * Arguments for `setBreakpoints` request. */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class SetBreakpointsRequestArguments { private SourceBreakpoint[] breakpoints; private long[] lines; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java index 6cb13a6..5ae6f1b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java @@ -12,11 +12,12 @@ * To clear all breakpoint for a source, specify an empty array. * When a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated. */ -public class SetBreakpointsRequestClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SetBreakpointsRequestClass implements DAPRequest { private long seq; - private AttachRequestType type; + private String type = "request"; private SetBreakpointsRequestArguments arguments; - private SetBreakpointsRequestCommand command; + private String command = "setBreakpoints"; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -35,9 +36,9 @@ public class SetBreakpointsRequestClass { * Message type. */ @JsonProperty("type") - public AttachRequestType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachRequestType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Object containing arguments for the command. @@ -51,7 +52,7 @@ public class SetBreakpointsRequestClass { * The command to execute. */ @JsonProperty("command") - public SetBreakpointsRequestCommand getCommand() { return command; } + public String getCommand() { return command; } @JsonProperty("command") - public void setCommand(SetBreakpointsRequestCommand value) { this.command = value; } + public void setCommand(String value) { this.command = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java index 7ff351e..e48271d 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java @@ -13,9 +13,10 @@ * The breakpoints returned are in the same order as the elements of the `breakpoints` * (or the deprecated `lines`) array in the arguments. */ -public class SetBreakpointsResponseClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SetBreakpointsResponseClass implements DAPResponse { private long seq; - private AttachResponseType type; + private String type; private SetBreakpointsResponseBody body; private String command; private String message; @@ -39,9 +40,9 @@ public class SetBreakpointsResponseClass { * Message type. */ @JsonProperty("type") - public AttachResponseType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachResponseType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Contains request result if success is true and error details if success is false. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java index ef9885d..f6d7b98 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java @@ -51,6 +51,10 @@ public void setUSEOperation(MOperation useOperation) { this.useOperation = useOperation; } + public PyMethodRaw getMethod() { + return method; + } + @Override public String toString() { return "PyMethod{" + diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java index 12acb76..fa6d6b6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java @@ -6,6 +6,9 @@ public class PyMethodRaw { private String name; private List argumentTypeNames; + private int startLineNo; + private int endLineNo; + private String file; public String getName() { return name; @@ -23,11 +26,39 @@ public void setArgumentTypeNames(List argumentTypeNames) { this.argumentTypeNames = argumentTypeNames; } + public int getStartLineNo() { + return startLineNo; + } + + public void setStartLineNo(int startLineNo) { + this.startLineNo = startLineNo; + } + + public int getEndLineNo() { + return endLineNo; + } + + public void setEndLineNo(int endLineNo) { + this.endLineNo = endLineNo; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + @Override public String toString() { return "PyMethodRaw{" + "name='" + name + '\'' + ", argumentTypeNames=" + argumentTypeNames + + ", startLineNo=" + startLineNo + + ", endLineNo=" + endLineNo + + ", file='" + file + '\'' + '}'; } + } From b1a903a455ee7fa8acbb1bd70fc1efdbb842ce22 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 8 Jul 2025 15:55:15 +0200 Subject: [PATCH 11/57] rm class-level type annotations in favor of constructor type hints --- .../org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 858c228..a6a6828 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -10,7 +10,7 @@ public static String getClassFieldTypesExp(String qualifiedClassName) { String moduleName = qualifiedClassName.substring(0, lastDot); String className = qualifiedClassName.substring(lastDot + 1); return String.format( - "getattr(__import__('sys').modules['%s'], '%s').__annotations__", + "getattr(__import__('sys').modules['%s'], '%s').__init__.__annotations__", moduleName, className ); @@ -26,6 +26,7 @@ public static String getInstanceExp(String qualifiedClassName) { ); } + // TODO: migrate to python 3.11 getMembersStatic instead public static String getMethodsExpVar(String qualifiedClassName) { int lastDot = qualifiedClassName.lastIndexOf('.'); String moduleName = qualifiedClassName.substring(0, lastDot); From 1349e0f7d84d0e4713261e6c50adcf376086c158 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 8 Jul 2025 23:19:26 +0200 Subject: [PATCH 12/57] add all return lines to py method raw --- .../monitor/adapter/python/DebugpyClient.java | 6 +++- .../adapter/python/PyEvalExBuilder.java | 33 ++++++++++++------- .../monitor/vm/mm/python/PyMethodRaw.java | 10 ++++++ 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 589098d..b59a843 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -165,7 +165,11 @@ PyTypeRaw getVMType(String qualifiedClassName) { mRaw.setFile(root.get("file").asText()); mRaw.setStartLineNo(root.get("start").asInt()); mRaw.setEndLineNo(root.get("end").asInt() - 1); - + List returnLines = new ArrayList<>(); + for (JsonNode r : root.get("returns")) { + returnLines.add(r.asInt()); + } + mRaw.setReturnLines(returnLines); // TODO: Set return type methods.add(mRaw); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index a6a6828..0f2f51c 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -45,20 +45,31 @@ public static String getMethodBreakpointInfo(String qualifiedClassName, String m int lastDot = qualifiedClassName.lastIndexOf('.'); String moduleName = qualifiedClassName.substring(0, lastDot); String simpleClassName = qualifiedClassName.substring(lastDot + 1); - return String.format("{\"file\": __import__('inspect').getsourcefile(getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s')), \"start\": getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s').__code__.co_firstlineno, \"end\": getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s').__code__.co_firstlineno + len(__import__('inspect').getsourcelines(getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s'))[0]) - 1}\n", - moduleName, - simpleClassName, - methodName, - moduleName, - simpleClassName, - methodName, - moduleName, - simpleClassName, - methodName, + return String.format( + """ + ( + lambda fn: { + "file": __import__('inspect').getsourcefile(fn), + "start": fn.__code__.co_firstlineno, + "end": fn.__code__.co_firstlineno + len(__import__('inspect').getsourcelines(fn)[0]) - 1, + "returns": [ + node.lineno + fn.__code__.co_firstlineno - 1 + for node in __import__('ast').walk( + __import__('ast').parse( + __import__('textwrap').dedent( + "".join(__import__('inspect').getsourcelines(fn)[0]) + ) + ) + ) + if isinstance(node, __import__('ast').Return) + ] + } + )(getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s')) + """, moduleName, simpleClassName, methodName - ); + ); } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java index fa6d6b6..eba2bca 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java @@ -9,6 +9,7 @@ public class PyMethodRaw { private int startLineNo; private int endLineNo; private String file; + private List returnLines; public String getName() { return name; @@ -50,6 +51,14 @@ public void setFile(String file) { this.file = file; } + public List getReturnLines() { + return returnLines; + } + + public void setReturnLines(List returnLines) { + this.returnLines = returnLines; + } + @Override public String toString() { return "PyMethodRaw{" + @@ -58,6 +67,7 @@ public String toString() { ", startLineNo=" + startLineNo + ", endLineNo=" + endLineNo + ", file='" + file + '\'' + + ", returnLines=" + returnLines + '}'; } From b0f8fc7c6335eb033229617eb5f363e78259ecca Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Wed, 9 Jul 2025 00:14:18 +0200 Subject: [PATCH 13/57] fix json value string wrapping for object mapping and add bool support --- .../monitor/adapter/python/DebugpyClient.java | 23 ++++++++++++++++--- .../monitor/vm/mm/python/PyObject.java | 2 ++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index b59a843..738410b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -105,6 +105,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { var t = switch (qualifiedClassName) { case "str" -> new PyTypeRaw("str"); case "int" -> new PyTypeRaw("int"); + case "bool" -> new PyTypeRaw("bool"); default -> null; }; @@ -334,15 +335,15 @@ protected PyObjectRaw getInstance(PyType pyType) { evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + // TODO: Use variables reference instead... var res = evalResp.getBody().getResult(); if (res.equals("None")) { return null; } String json = res.replace('\'', '"'); - ObjectMapper mapper = new ObjectMapper(); - Map rawMap = null; + Map rawMap; try { - rawMap = mapper.readValue(json, Map.class); + rawMap = mapper.readValue(stringifyJsonEntries(json), Map.class); } catch (JsonProcessingException e) { throw new RuntimeException(e); } @@ -361,6 +362,22 @@ protected PyObjectRaw getInstance(PyType pyType) { return pyObjectRaw; } + private String stringifyJsonEntries(String json) { + Pattern p = Pattern.compile("(:\\s*)([^\"{},\\s][^,}]*)"); + Matcher m = p.matcher(json); + StringBuilder sb = new StringBuilder(); + while (m.find()) { + String value = m.group(2).trim(); + if (!(value.startsWith("\"") && value.endsWith("\""))) { + m.appendReplacement(sb, m.group(1) + "\"" + value + "\""); + } else { + m.appendReplacement(sb, m.group()); + } + } + m.appendTail(sb); + return sb.toString(); + } + private void getStackStrace() { } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java index 9777d4b..1037453 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -4,6 +4,7 @@ import org.tzi.use.plugins.monitor.vm.mm.VMField; import org.tzi.use.plugins.monitor.vm.mm.VMObject; import org.tzi.use.plugins.monitor.vm.mm.VMType; +import org.tzi.use.uml.ocl.value.BooleanValue; import org.tzi.use.uml.ocl.value.IntegerValue; import org.tzi.use.uml.ocl.value.StringValue; import org.tzi.use.uml.ocl.value.Value; @@ -62,6 +63,7 @@ public Value getValue(VMField field) { return switch (valTypeStr) { case "int" -> IntegerValue.valueOf(Integer.parseInt(valStr)); case "str" -> new StringValue(valStr); + case "bool" -> BooleanValue.get(Boolean.parseBoolean(valStr)); default -> null; }; } From ee314219779cd1c4db0ba8fc59866f5a6341a112 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Wed, 9 Jul 2025 18:01:28 +0200 Subject: [PATCH 14/57] update pattern compilation static final --- .../use/monitor/adapter/python/DebugpyClient.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 738410b..aa2cf21 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -19,6 +19,9 @@ */ public class DebugpyClient { private static final String WORKSPACE = "/Users/srgj/git/uni/ba/dpy-server"; + private static final Pattern SIGNATURE_PATTERN = Pattern.compile("^(\\w+)\\((.*?)\\)\\s*->\\s*.*$"); + private static final Pattern TYPE_CLASS_PATTERN = Pattern.compile("\"(\\w+)\":\\s*\"(\\w+)\""); + private static final Pattern JSON_STRINGIFY_PATTERN = Pattern.compile("(:\\s*)([^\"{},\\s][^,}]*)"); private static int REQUEST_COUNTER = 1; @@ -181,12 +184,11 @@ PyTypeRaw getVMType(String qualifiedClassName) { public static Map> parseMethodSignatures(String evalResp) { Map> result = new HashMap<>(); - Pattern signaturePattern = Pattern.compile("^(\\w+)\\((.*?)\\)\\s*->\\s*.*$"); evalResp = evalResp.strip().replaceAll("^'+|'+$", ""); // Remove outer quotes String[] lines = evalResp.split("\\\\n"); // split on literal `\n` for (String line : lines) { - Matcher matcher = signaturePattern.matcher(line.strip()); + Matcher matcher = SIGNATURE_PATTERN.matcher(line.strip()); if (matcher.matches()) { String methodName = matcher.group(1); String params = matcher.group(2); @@ -220,8 +222,7 @@ public Map parsePythonTypeString(String input) { .replaceAll("", "\"$1\"") .replaceAll("", "\"$1\""); - Pattern pattern = Pattern.compile("\"(\\w+)\":\\s*\"(\\w+)\""); - Matcher matcher = pattern.matcher(cleaned); + Matcher matcher = TYPE_CLASS_PATTERN.matcher(cleaned); while (matcher.find()) { String variable = matcher.group(1); @@ -363,8 +364,7 @@ protected PyObjectRaw getInstance(PyType pyType) { } private String stringifyJsonEntries(String json) { - Pattern p = Pattern.compile("(:\\s*)([^\"{},\\s][^,}]*)"); - Matcher m = p.matcher(json); + Matcher m = JSON_STRINGIFY_PATTERN.matcher(json); StringBuilder sb = new StringBuilder(); while (m.find()) { String value = m.group(2).trim(); From 1e23032f5fb75b9f226242f7ba17aea529a88871 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 14 Jul 2025 14:31:33 +0200 Subject: [PATCH 15/57] Refactor set breakpoint and add breakpoint state --- .../{Breakpoint.java => BreakpointType.java} | 5 ++- .../monitor/adapter/python/DebugpyClient.java | 16 ++++--- .../monitor/adapter/python/PythonAdapter.java | 43 +++++++++++++++++-- 3 files changed, 52 insertions(+), 12 deletions(-) rename adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/{Breakpoint.java => BreakpointType.java} (51%) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Breakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java similarity index 51% rename from adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Breakpoint.java rename to adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java index 3147669..cd73be0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Breakpoint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java @@ -1,7 +1,10 @@ package org.tzi.use.monitor.adapter.python; -public enum Breakpoint { +public enum BreakpointType { METHOD_CALL, + METHOD_RETURN, METHOD_EXIT, + CONSTRUCTOR_CALL, + CONSTRUCTOR_EXIT, MODIFICATION } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index aa2cf21..8ff69cd 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -233,16 +233,18 @@ public Map parsePythonTypeString(String input) { return result; } - protected boolean setBreakpoint(PyMethod pyMethod) { + protected boolean setBreakpoint(String file, List lines) { var source = new Source(); - source.setPath(pyMethod.getMethod().getFile()); + source.setPath(file); var bpArgs = new SetBreakpointsRequestArguments(); bpArgs.setSource(source); - var bpSrcStart = new SourceBreakpoint(); - bpSrcStart.setLine(pyMethod.getMethod().getStartLineNo()); - var bpSrcEnd = new SourceBreakpoint(); - bpSrcEnd.setLine(pyMethod.getMethod().getEndLineNo()); - bpArgs.setBreakpoints(new SourceBreakpoint[]{bpSrcStart, bpSrcEnd}); + SourceBreakpoint[] sourceBreakpoints = new SourceBreakpoint[lines.size()]; + for (int i = 0; i < sourceBreakpoints.length; i++) { + var srcBp = new SourceBreakpoint(); + srcBp.setLine(lines.get(i)); + sourceBreakpoints[i] = srcBp; + } + bpArgs.setBreakpoints(sourceBreakpoints); var bpReq = new SetBreakpointsRequestClass(); bpReq.setSeq(REQUEST_COUNTER++); bpReq.setArguments(bpArgs); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 6055007..b5ced45 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -26,7 +26,7 @@ public class PythonAdapter extends AbstractVMAdapter { private boolean isConnected; private DebugpyClient debugpyClient; public Map typeMapping; - private HashMap> breakpoints; + private Map> breakpoints; public Set readInstances(PyType type) { var className = type.getName(); @@ -140,8 +140,28 @@ public boolean isVMTypeLoaded(String javaClassName) { @Override public void registerOperationCallInterest(VMMethod m) { if (!m.getName().equals("__init__")) { - debugpyClient.setBreakpoint((PyMethod) m); + PyMethod pyMethod = (PyMethod) m; + if (!breakpoints.containsKey(pyMethod.getMethod().getFile())) { + Map lineBreakpointTypes = new HashMap<>(); + lineBreakpointTypes.put(pyMethod.getMethod().getStartLineNo(), BreakpointType.METHOD_CALL); + for (Integer rLine : pyMethod.getMethod().getReturnLines()) { + lineBreakpointTypes.put(rLine, BreakpointType.METHOD_EXIT); + } + breakpoints.put(pyMethod.getMethod().getFile(), lineBreakpointTypes); + } else { + Map lineBreakpointTypes = breakpoints.get(pyMethod.getMethod().getFile()); + lineBreakpointTypes.put(pyMethod.getMethod().getStartLineNo(), BreakpointType.METHOD_CALL); + for (Integer rLine : pyMethod.getMethod().getReturnLines()) { + lineBreakpointTypes.put(rLine, BreakpointType.METHOD_EXIT); + } + } + String file = pyMethod.getMethod().getFile(); + List setBreakpoints = new ArrayList<>(); + setBreakpoints.add(pyMethod.getMethod().getStartLineNo()); + setBreakpoints.addAll(pyMethod.getMethod().getReturnLines()); + debugpyClient.setBreakpoint(file, setBreakpoints); } + System.out.println("BREAKPOINT_MAP: " + breakpoints); } @Override @@ -161,8 +181,23 @@ public Value getMethodResultValue(Object adapterExitInformation) { @Override public void registerConstructorCallInterest(VMType vmType) { - VMMethod constructor = vmType.getMethodsByName("__init__").getFirst(); - debugpyClient.setBreakpoint((PyMethod) constructor); + PyMethod constructor = (PyMethod) vmType.getMethodsByName("__init__").getFirst(); + if (!breakpoints.containsKey(constructor.getMethod().getFile())) { + Map breakpointTypeMap = new HashMap<>(); + breakpointTypeMap.put(constructor.getMethod().getStartLineNo(), BreakpointType.CONSTRUCTOR_CALL); + breakpointTypeMap.put(constructor.getMethod().getEndLineNo(), BreakpointType.CONSTRUCTOR_EXIT); + breakpoints.put(constructor.getMethod().getFile(), breakpointTypeMap); + } else { + Map currBps = breakpoints.get(constructor.getMethod().getFile()); + currBps.put(constructor.getMethod().getStartLineNo(), BreakpointType.CONSTRUCTOR_CALL); + currBps.put(constructor.getMethod().getEndLineNo(), BreakpointType.CONSTRUCTOR_EXIT); + } + String file = constructor.getMethod().getFile(); + List toSet = new ArrayList<>(); + toSet.add(constructor.getMethod().getStartLineNo()); + toSet.add(constructor.getMethod().getEndLineNo()); + debugpyClient.setBreakpoint(file, toSet); + System.out.println("BREAKPOINT_MAP: " + breakpoints); } @Override From fafbdd9c9c99b8efbbfea0e690711104975ab0c3 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 14 Jul 2025 18:28:07 +0200 Subject: [PATCH 16/57] refac breakpoint handling --- .../adapter/python/BreakpointHandler.java | 4 +- .../monitor/adapter/python/DebugpyClient.java | 44 ++++++++++++------ .../monitor/adapter/python/MessageMapper.java | 1 - .../monitor/adapter/python/PythonAdapter.java | 45 ++++++++++++++++--- 4 files changed, 72 insertions(+), 22 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java index ce1baa9..420d692 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java @@ -1,7 +1,7 @@ package org.tzi.use.monitor.adapter.python; -import org.tzi.use.monitor.adapter.python.dap.BreakpointEventClass; +import org.tzi.use.monitor.adapter.python.dap.StoppedEventClass; public interface BreakpointHandler { - void handleBreakpoint(BreakpointEventClass event); + void handleBreakpoint(StoppedEventClass event); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 8ff69cd..9ac8d08 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -9,6 +9,7 @@ import java.io.*; import java.net.Socket; +import java.nio.file.Paths; import java.util.*; import java.util.concurrent.*; import java.util.regex.Matcher; @@ -18,7 +19,7 @@ * @author Sergio Jimenez */ public class DebugpyClient { - private static final String WORKSPACE = "/Users/srgj/git/uni/ba/dpy-server"; + private static final String WORKSPACE = "/Users/serj/git/uni/dpy-server"; private static final Pattern SIGNATURE_PATTERN = Pattern.compile("^(\\w+)\\((.*?)\\)\\s*->\\s*.*$"); private static final Pattern TYPE_CLASS_PATTERN = Pattern.compile("\"(\\w+)\":\\s*\"(\\w+)\""); private static final Pattern JSON_STRINGIFY_PATTERN = Pattern.compile("(:\\s*)([^\"{},\\s][^,}]*)"); @@ -28,18 +29,17 @@ public class DebugpyClient { private final Socket socket; private final BufferedReader in; private final BufferedWriter out; - private final BreakpointHandler breakpointHandler; private final ObjectMapper mapper = new ObjectMapper(); private CompletableFuture futureResp; private CompletableFuture initEvent; private CompletableFuture stoppedEvent; private boolean running = false; + protected final BlockingQueue eventQueue = new LinkedBlockingQueue<>(); - DebugpyClient(String host, int port, BreakpointHandler breakpointHandler) throws IOException { + DebugpyClient(String host, int port) throws IOException { this.socket = new Socket(host, port); this.in = new BufferedReader(new InputStreamReader(socket.getInputStream())); this.out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); - this.breakpointHandler = breakpointHandler; startReaderThread(); } @@ -166,7 +166,9 @@ PyTypeRaw getVMType(String qualifiedClassName) { } catch (JsonProcessingException e) { return null; } - mRaw.setFile(root.get("file").asText()); + String fileRaw = root.get("file").asText(); + String normalizedFile = Paths.get(fileRaw).normalize().toString(); + mRaw.setFile(normalizedFile); mRaw.setStartLineNo(root.get("start").asInt()); mRaw.setEndLineNo(root.get("end").asInt() - 1); List returnLines = new ArrayList<>(); @@ -302,7 +304,7 @@ protected boolean stop() { return stopResp.getSuccess(); } - private int getThreadId(String threadName) { + protected int getThreadId(String threadName) { System.out.println("Getting thread id: " + threadName); var threadsReq = new ThreadsRequestClass(); threadsReq.setSeq(REQUEST_COUNTER++); @@ -326,6 +328,23 @@ private int getCurrentFrameId(int threadId) { return (int) stackTraceResp.getBody().getStackFrames()[0].getID(); } + protected StackFrame getCurrentFrame(int threadId) { + var stackTraceArgs = new StackTraceRequestArguments(); + stackTraceArgs.setThreadID(threadId); + var stackTraceReq = new StackTraceRequestClass(); + stackTraceReq.setSeq(REQUEST_COUNTER++); + stackTraceReq.setArguments(stackTraceArgs); + var stackTraceResp = (StackTraceResponseClass) sendRequest(stackTraceReq); + return stackTraceResp.getBody().getStackFrames()[0]; + } + + protected Thread[] getThreads() { + var threadsReq = new ThreadsRequestClass(); + threadsReq.setSeq(REQUEST_COUNTER++); + var threadsResp = (ThreadsResponseClass) sendRequest(threadsReq); + return threadsResp.getBody().getThreads(); + } + protected PyObjectRaw getInstance(PyType pyType) { pause(); @@ -469,10 +488,11 @@ private void startReaderThread() { initEvent.complete((DAPEvent) msg); } if (msg instanceof StoppedEventClass) { - stoppedEvent.complete((DAPEvent) msg); - } - if (msg instanceof BreakpointEventClass) { - handleBreakpoint((BreakpointEventClass) msg); + if (((StoppedEventClass) msg).getBody().getReason().equals("breakpoint")) { + eventQueue.add((DAPEvent) msg); + } else { + stoppedEvent.complete((DAPEvent) msg); + } } } } @@ -484,8 +504,4 @@ private void startReaderThread() { readerThread.start(); } - private void handleBreakpoint(BreakpointEventClass event) { - breakpointHandler.handleBreakpoint(event); - } - } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java index 5aed067..19328a9 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -43,7 +43,6 @@ private static DAPEvent parseEvent(JsonNode tree, String json) throws JsonProces String event = tree.get("event").asText(); return switch (event) { case "initialized" -> mapper.readValue(json, InitializedEventClass.class); - case "breakpoint" -> mapper.readValue(json, BreakpointEventClass.class); case "stopped" -> mapper.readValue(json, StoppedEventClass.class); case "terminated" -> mapper.readValue(json, TerminatedEventClass.class); default -> null; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index b5ced45..f2f9a8a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -1,6 +1,6 @@ package org.tzi.use.monitor.adapter.python; -import org.tzi.use.monitor.adapter.python.dap.BreakpointEventClass; +import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyMethod; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObject; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyType; @@ -11,6 +11,7 @@ import org.tzi.use.plugins.monitor.vm.mm.*; import org.tzi.use.uml.ocl.value.Value; +import java.lang.Thread; import java.util.*; /** @@ -27,6 +28,7 @@ public class PythonAdapter extends AbstractVMAdapter { private DebugpyClient debugpyClient; public Map typeMapping; private Map> breakpoints; + private Thread breakpointWatcher; public Set readInstances(PyType type) { var className = type.getName(); @@ -72,7 +74,7 @@ public void attachToVM() throws MonitorException { breakpoints = new HashMap<>(); try { - debugpyClient = new DebugpyClient(host, port, new Handler()); + debugpyClient = new DebugpyClient(host, port); } catch (Exception e) { throw new MonitorException("Failed to create socket!", e); } @@ -81,6 +83,8 @@ public void attachToVM() throws MonitorException { if (debugpyClient.attach(host, port)) { isConnected = true; + breakpointWatcher = new Thread(new BreakpointWatcher(), "PythonAdapter breakpoint watcher"); + breakpointWatcher.start(); System.out.println("Connected to debugpy server!"); } else { System.out.println("Failed to attach to debugpy server!"); @@ -205,14 +209,45 @@ public void registerFieldModificationInterest(VMField f) { } - private class Handler implements BreakpointHandler { + private class BreakpointWatcher implements Runnable { @Override - public void handleBreakpoint(BreakpointEventClass event) { - // TODO + public void run() { + while (isConnected) { + try { + StoppedEventClass event = (StoppedEventClass) debugpyClient.eventQueue.take(); + if (!isConnected) { + return; + } + + // Get file and live at current frame + var currFrame = debugpyClient.getCurrentFrame(Math.toIntExact(event.getBody().getThreadID())); + System.out.println("Current Frame: " + currFrame); + + // Breakpoint Type Lookup + BreakpointType bpt = breakpoints.get(currFrame.getSource().getPath()).get((int) currFrame.getLine()); + System.out.println("BreakpointType: " + bpt.name()); + + + // get VMMethod from controller storage. Condition: Make sure it is stored on creation! + + // Create PyMethodCall + + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } } } + private void handleConstructorCall(StackFrame stackFrame) { + + } + + private void handleMethodCall(StackFrame stackFrame) { + + } + @Override public String toString() { return "PythonAdapter"; From 1930d07bcbc650c1c12af703c0fe67460dffdb3c Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Fri, 18 Jul 2025 20:37:21 +0200 Subject: [PATCH 17/57] refac breakpoint handling and fix vm object id --- .../adapter/python/BreakpointType.java | 1 - .../monitor/adapter/python/DebugpyClient.java | 68 +++++++++++++++++- .../adapter/python/PyEvalExBuilder.java | 32 +++++++++ .../monitor/adapter/python/PythonAdapter.java | 71 ++++++++++++++++--- .../monitor/adapter/python/dap/Source.java | 16 +++++ .../adapter/python/dap/StackFrame.java | 17 +++++ .../plugins/monitor/vm/mm/python/PyField.java | 13 +++- .../monitor/vm/mm/python/PyFieldRaw.java | 9 +++ .../monitor/vm/mm/python/PyMethodCall.java | 41 +++++++++++ .../monitor/vm/mm/python/PyObject.java | 7 +- .../monitor/vm/mm/python/PyObjectRaw.java | 9 +++ .../plugins/monitor/vm/mm/python/PyType.java | 7 ++ .../monitor/vm/mm/python/PyTypeRaw.java | 28 ++++++++ 13 files changed, 298 insertions(+), 21 deletions(-) create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java index cd73be0..d6b78aa 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java @@ -2,7 +2,6 @@ public enum BreakpointType { METHOD_CALL, - METHOD_RETURN, METHOD_EXIT, CONSTRUCTOR_CALL, CONSTRUCTOR_EXIT, diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 9ac8d08..92355d0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -9,6 +9,7 @@ import java.io.*; import java.net.Socket; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; import java.util.concurrent.*; @@ -33,7 +34,7 @@ public class DebugpyClient { private CompletableFuture futureResp; private CompletableFuture initEvent; private CompletableFuture stoppedEvent; - private boolean running = false; + protected boolean running = false; protected final BlockingQueue eventQueue = new LinkedBlockingQueue<>(); DebugpyClient(String host, int port) throws IOException { @@ -113,6 +114,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { }; if (t != null) { + t.setPrimitive(true); return t; } @@ -170,7 +172,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { String normalizedFile = Paths.get(fileRaw).normalize().toString(); mRaw.setFile(normalizedFile); mRaw.setStartLineNo(root.get("start").asInt()); - mRaw.setEndLineNo(root.get("end").asInt() - 1); + mRaw.setEndLineNo(root.get("end").asInt()); List returnLines = new ArrayList<>(); for (JsonNode r : root.get("returns")) { returnLines.add(r.asInt()); @@ -181,9 +183,51 @@ PyTypeRaw getVMType(String qualifiedClassName) { methods.add(mRaw); } rawType.setMethods(methods); + + // Set File + evalArgs.setExpression(PyEvalExBuilder.getFileForClass(qualifiedClassName)); + evalReq.setSeq(REQUEST_COUNTER++); + evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + String file = evalResp.getBody().getResult(); + String normalizedPath = Path.of(file).normalize().toString().replace("'", ""); + System.out.println("SETTING FILE TO: " + normalizedPath); + rawType.setFile(normalizedPath); + return rawType; } + protected Map getRuntimeInstanceVars(long frameId) { + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setExpression("self.__dict__"); + evalArgs.setContext("watch"); + evalArgs.setFrameID(frameId); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + String result = evalResp.getBody().getResult(); + System.out.println("INSTANCE_VARS: " + result); + String jsonCompatible = result.replace('\'', '"'); + Map map = null; + try { + map = mapper.readValue(jsonCompatible, Map.class); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + + // Optionally stringify values: + Map finalMap = new HashMap<>(); + for (Map.Entry entry : map.entrySet()) { + finalMap.put(entry.getKey(), String.valueOf(entry.getValue())); + } + + System.out.println("final Map: " + finalMap); + + return finalMap; + } + public static Map> parseMethodSignatures(String evalResp) { Map> result = new HashMap<>(); evalResp = evalResp.strip().replaceAll("^'+|'+$", ""); // Remove outer quotes @@ -374,7 +418,12 @@ protected PyObjectRaw getInstance(PyType pyType) { result.put(entry.getKey(), entry.getValue().toString()); } - var pyObjectRaw = new PyObjectRaw(); + // Set instance ID + evalArgs.setExpression(PyEvalExBuilder.getInstanceId(pyType.getName())); + evalReq.setSeq(REQUEST_COUNTER++); + evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + PyObjectRaw pyObjectRaw = new PyObjectRaw(Long.parseLong(evalResp.getBody().getResult())); pyObjectRaw.setRawType(pyType.getRawType()); for (PyFieldRaw rawField : pyObjectRaw.getRawType().getFields()) { System.out.println("Setting value '" + result.get(rawField.getName()) + "' to field '" + rawField.getName()); @@ -403,6 +452,18 @@ private void getStackStrace() { } + protected Long getSelfId(long frameId) { + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setFrameID(frameId); + evalArgs.setContext("watch"); + evalArgs.setExpression(PyEvalExBuilder.getSelfIdAtCurrentFrame()); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + return Long.parseLong(evalResp.getBody().getResult()); + } + private DAPResponse sendRequest(DAPRequest dapRequest) { sendAsyncRequest(dapRequest); return waitForAsyncResponse(); @@ -489,6 +550,7 @@ private void startReaderThread() { } if (msg instanceof StoppedEventClass) { if (((StoppedEventClass) msg).getBody().getReason().equals("breakpoint")) { + running = false; eventQueue.add((DAPEvent) msg); } else { stoppedEvent.complete((DAPEvent) msg); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 0f2f51c..be9f4de 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -16,6 +16,20 @@ public static String getClassFieldTypesExp(String qualifiedClassName) { ); } + public static String getFileForClass(String qualifiedClassName) { + int lastDot = qualifiedClassName.lastIndexOf('.'); + if (lastDot == -1) { + throw new IllegalArgumentException("Qualified class name must contain at least one dot."); + } + String moduleName = qualifiedClassName.substring(0, lastDot); + String className = qualifiedClassName.substring(lastDot + 1); + return String.format( + "getattr(__import__('sys').modules.get(getattr(__import__('sys').modules['%s'], '%s').__module__), '__file__', None)", + moduleName, + className + ); + } + public static String getInstanceExp(String qualifiedClassName) { int lastDot = qualifiedClassName.lastIndexOf('.'); String simpleClassName = qualifiedClassName.substring(lastDot + 1); @@ -26,6 +40,24 @@ public static String getInstanceExp(String qualifiedClassName) { ); } + public static String getSelfIdAtCurrentFrame() { + return "id(self)"; + } + + public static String getInstanceId(String qualifiedClassName) { + int lastDot = qualifiedClassName.lastIndexOf('.'); + if (lastDot == -1) { + throw new IllegalArgumentException("Qualified class name must contain at least one dot."); + } + String moduleName = qualifiedClassName.substring(0, lastDot); + String className = qualifiedClassName.substring(lastDot + 1); + return String.format( + "next((id(obj) for obj in __import__('gc').get_objects() if isinstance(obj, getattr(__import__('%s'), '%s'))), None)\n", + moduleName, + className + ); + } + // TODO: migrate to python 3.11 getMembersStatic instead public static String getMethodsExpVar(String qualifiedClassName) { int lastDot = qualifiedClassName.lastIndexOf('.'); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index f2f9a8a..1772288 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -1,9 +1,7 @@ package org.tzi.use.monitor.adapter.python; import org.tzi.use.monitor.adapter.python.dap.*; -import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyMethod; -import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyObject; -import org.tzi.use.monitor.plugins.monitor.vm.mm.python.PyType; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import org.tzi.use.plugins.monitor.MonitorException; import org.tzi.use.plugins.monitor.vm.adapter.AbstractVMAdapter; import org.tzi.use.plugins.monitor.vm.adapter.InvalidAdapterConfiguration; @@ -13,6 +11,7 @@ import java.lang.Thread; import java.util.*; +import java.util.logging.Level; /** * @author Sergio Jimenez @@ -21,6 +20,7 @@ public class PythonAdapter extends AbstractVMAdapter { private static final int SETTING_HOST_IDX = 0; private static final int SETTING_PORT_IDX = 1; + private static final int SETTING_WORKSPACE_IDX = 2; private String host; private int port; @@ -29,14 +29,16 @@ public class PythonAdapter extends AbstractVMAdapter { public Map typeMapping; private Map> breakpoints; private Thread breakpointWatcher; + private Map fileToClassNameMap; public Set readInstances(PyType type) { var className = type.getName(); System.out.println("Reading instances of class: " + className); - var pyObjectRaw = debugpyClient.getInstance(typeMapping.get(className)); + PyObjectRaw pyObjectRaw = debugpyClient.getInstance(typeMapping.get(className)); if (pyObjectRaw == null) { return Set.of(); } + System.out.println("GotInstance OBJECT_ID: " + pyObjectRaw.getId()); PyObject pyObj = new PyObject(this, pyObjectRaw, typeMapping.get(className)); return Set.of(pyObj); } @@ -64,6 +66,7 @@ protected void createSettings(List settings) { System.out.println("Creating Python adapter settings..."); settings.add(SETTING_HOST_IDX, new VMAdapterSetting("Host", "localhost")); settings.add(SETTING_PORT_IDX, new VMAdapterSetting("Port", "5678")); + settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("Workspace", "/Users/serj/git/uni/dpy-server")); } @Override @@ -72,6 +75,7 @@ public void attachToVM() throws MonitorException { typeMapping = new HashMap<>(); breakpoints = new HashMap<>(); + fileToClassNameMap = new HashMap<>(); try { debugpyClient = new DebugpyClient(host, port); @@ -120,6 +124,10 @@ public VMType getVMType(String name) { if (rawType != null) { res = new PyType(this, rawType); } + if (res != null && !res.getRawType().isPrimitive()) { + fileToClassNameMap.put(res.getRawType().getFile(), name); + System.out.println("fileToClassNameMap: " + fileToClassNameMap); + } typeMapping.put(name, res); } System.out.println("Got VMType '" + name + "'..."); @@ -220,18 +228,28 @@ public void run() { return; } - // Get file and live at current frame + // Get file and line at current frame var currFrame = debugpyClient.getCurrentFrame(Math.toIntExact(event.getBody().getThreadID())); System.out.println("Current Frame: " + currFrame); + String file = currFrame.getSource().getPath(); + // Breakpoint Type Lookup - BreakpointType bpt = breakpoints.get(currFrame.getSource().getPath()).get((int) currFrame.getLine()); + BreakpointType bpt = breakpoints.get(file).get((int) currFrame.getLine()); System.out.println("BreakpointType: " + bpt.name()); - // get VMMethod from controller storage. Condition: Make sure it is stored on creation! + var qualifiedClassName = fileToClassNameMap.get(file); - // Create PyMethodCall + if (bpt == BreakpointType.CONSTRUCTOR_EXIT) { + handleConstructorCall(currFrame, qualifiedClassName); + } else if (bpt == BreakpointType.METHOD_CALL) { + handleMethodCall(currFrame, qualifiedClassName); + } else if (bpt == BreakpointType.METHOD_EXIT) { + handleMethodExit(currFrame, qualifiedClassName, event); + } else if (bpt == BreakpointType.MODIFICATION) { + handleAttributeModification(currFrame, qualifiedClassName); + } } catch (InterruptedException e) { throw new RuntimeException(e); @@ -240,11 +258,44 @@ public void run() { } } - private void handleConstructorCall(StackFrame stackFrame) { + private void handleConstructorCall(StackFrame currentFrame, String fullyQualifiedClassName) { + controller.newLogMessage(this, Level.FINE, "onConstructorCall: " + fullyQualifiedClassName + "." + currentFrame.getName()); + + PyType pyType = typeMapping.get(fullyQualifiedClassName); + + PyObjectRaw pyObjectRaw = new PyObjectRaw(debugpyClient.getSelfId(currentFrame.getID())); + pyObjectRaw.setRawType(pyType.getRawType()); + PyObject pyObject = new PyObject(this, pyObjectRaw, pyType); + + System.out.println("OnConstructor OBJECT_ID: " + pyObjectRaw.getId()); + controller.onNewVMObject(pyObject); + + // Match monitor running state + debugpyClient.resume(); + } + + private void handleMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) { + controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); + + PyType pyType = typeMapping.get(fullyQualifiedClassName); + PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()); + PyMethodCall pyMethodCall = new PyMethodCall(this, pyMethod); + + controller.onMethodCall(pyMethodCall); + } + private void handleMethodExit(StackFrame stackFrame, String qualifiedClassName, StoppedEventClass stoppedEvent) { + PyType pyType = typeMapping.get(qualifiedClassName); + PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()); + // TODO construct method call with runtime values + controller.onMethodExit(pyMethod, pyMethod.getId()); } - private void handleMethodCall(StackFrame stackFrame) { + private void handleAttributeModification(StackFrame stackFrame, String qualifiedClassName) { + controller.newLogMessage(this, Level.FINE, "onAttributeModification: " + qualifiedClassName + "." + stackFrame.getName()); + // update class instance variables from __dict__ + // get object id from current frame + // get field name from method name } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java index 8a36542..6b94fbc 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java @@ -2,6 +2,8 @@ import com.fasterxml.jackson.annotation.*; +import java.util.Arrays; + /** * The source where the breakpoint is located. * @@ -116,4 +118,18 @@ public class Source { public Source[] getSources() { return sources; } @JsonProperty("sources") public void setSources(Source[] value) { this.sources = value; } + + @Override + public String toString() { + return "Source{" + + "adapterData=" + adapterData + + ", checksums=" + Arrays.toString(checksums) + + ", name='" + name + '\'' + + ", origin='" + origin + '\'' + + ", path='" + path + '\'' + + ", presentationHint=" + presentationHint + + ", sourceReference=" + sourceReference + + ", sources=" + Arrays.toString(sources) + + '}'; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java index 6e67a0f..48da4c6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackFrame.java @@ -118,4 +118,21 @@ public class StackFrame { public Source getSource() { return source; } @JsonProperty("source") public void setSource(Source value) { this.source = value; } + + @Override + public String toString() { + return "StackFrame{" + + "canRestart=" + canRestart + + ", column=" + column + + ", endColumn=" + endColumn + + ", endLine=" + endLine + + ", id=" + id + + ", instructionPointerReference='" + instructionPointerReference + '\'' + + ", line=" + line + + ", moduleID=" + moduleID + + ", name='" + name + '\'' + + ", presentationHint=" + presentationHint + + ", source=" + source + + '}'; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index 63a04f4..3a40400 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -12,6 +12,8 @@ public class PyField extends PyBase implements VMField { private final Object id; private final PyFieldRaw pyFieldRaw; + private MAttribute useAttribute; + public PyField(PythonAdapter adapter, PyFieldRaw pyFieldRaw) { super(adapter); this.pyFieldRaw = pyFieldRaw; @@ -25,12 +27,12 @@ public String getName() { @Override public void setUSEAttribute(MAttribute attr) { - + this.useAttribute = attr; } @Override public MAttribute getUSEAttribute() { - return null; + return useAttribute; } @Override @@ -52,4 +54,11 @@ PyFieldRaw getPyFieldRaw() { return pyFieldRaw; } + @Override + public String toString() { + return "PyField{" + + "id=" + id + + ", pyFieldRaw=" + pyFieldRaw + + '}'; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java index cbf5f9e..3836761 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java @@ -34,4 +34,13 @@ public void setType(String type) { public void setValue(String value) { this.value = value; } + + @Override + public String toString() { + return "PyFieldRaw{" + + "name='" + name + '\'' + + ", type='" + type + '\'' + + ", value='" + value + '\'' + + '}'; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java new file mode 100644 index 0000000..9b536f7 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java @@ -0,0 +1,41 @@ +package org.tzi.use.monitor.plugins.monitor.vm.mm.python; + +import org.tzi.use.monitor.adapter.python.PythonAdapter; +import org.tzi.use.plugins.monitor.vm.adapter.VMAccessException; +import org.tzi.use.plugins.monitor.vm.mm.VMMethod; +import org.tzi.use.plugins.monitor.vm.mm.VMMethodCall; +import org.tzi.use.plugins.monitor.vm.mm.VMObject; +import org.tzi.use.uml.ocl.value.Value; + +import java.util.List; + +public class PyMethodCall extends PyBase implements VMMethodCall { + + private final PyMethod pyMethod; + + public PyMethodCall(PythonAdapter adapter, PyMethod pyMethod) { + super(adapter); + this.pyMethod = pyMethod; + } + + @Override + public List getArgumentValues() throws VMAccessException { + return List.of(); + } + + @Override + public VMMethod getMethod() { + return pyMethod; + } + + @Override + public VMObject getThisObject() throws VMAccessException { + return null; + } + + @Override + public int getNumArguments() throws VMAccessException { + return this.pyMethod.getArgumentTypes().size(); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java index 1037453..a0d42ee 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -10,13 +10,10 @@ import org.tzi.use.uml.ocl.value.Value; import org.tzi.use.uml.sys.MObject; -import java.util.UUID; - public class PyObject extends PyBase implements VMObject { private final PyObjectRaw rawObject; private final VMType type; - private final Object id; private MObject useObject; @@ -24,12 +21,11 @@ public PyObject(PythonAdapter adapter, PyObjectRaw rawObject, PyType type) { super(adapter); this.rawObject = rawObject; this.type = type; - this.id = UUID.randomUUID(); } @Override public Object getId() { - return id; + return rawObject.getId(); } @Override @@ -54,6 +50,7 @@ public void setUSEObject(MObject obj) { @Override public Value getValue(VMField field) { + // TODO dont get from internal value, but new debugpy call System.out.println("getValue for:" + field.getName()); PyField f = (PyField) field; String valTypeStr = f.getPyFieldRaw().getType(); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java index ab094a5..07c1217 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java @@ -1,8 +1,13 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; public class PyObjectRaw { + private final Long id; private PyTypeRaw rawType; + public PyObjectRaw(Long id) { + this.id = id; + } + public PyTypeRaw getRawType() { return rawType; } @@ -10,4 +15,8 @@ public PyTypeRaw getRawType() { public void setRawType(PyTypeRaw rawType) { this.rawType = rawType; } + + public Long getId() { + return id; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index 477314e..cefcc88 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -81,4 +81,11 @@ public VMField getFieldByName(String javaFieldName) { return f != null ? new PyField(adapter, f) : null; } + @Override + public String toString() { + return "PyType{" + + "rawType=" + rawType + + ", useClass=" + useClass + + '}'; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java index 925f668..43a1542 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java @@ -6,6 +6,8 @@ public class PyTypeRaw { private String name; private List fields; private List methods; + private boolean isPrimitive; + private String file; public PyTypeRaw(String name) { this.name = name; @@ -35,4 +37,30 @@ public void setMethods(List methods) { this.methods = methods; } + public boolean isPrimitive() { + return isPrimitive; + } + + public void setPrimitive(boolean primitive) { + isPrimitive = primitive; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + @Override + public String toString() { + return "PyTypeRaw{" + + "name='" + name + '\'' + + ", fields=" + fields + + ", methods=" + methods + + ", isPrimitive=" + isPrimitive + + ", file='" + file + '\'' + + '}'; + } } From 193fdbbc5458910fc672f1c01624127a15708602 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 22 Jul 2025 23:20:43 +0200 Subject: [PATCH 18/57] Fix method id and up-to-date ref from controller --- .../adapter/python/BreakpointType.java | 1 - .../monitor/adapter/python/DebugpyClient.java | 4 ++++ .../adapter/python/PyEvalExBuilder.java | 2 +- .../monitor/adapter/python/PythonAdapter.java | 22 ++++++++----------- .../monitor/adapter/python/dap/Source.java | 2 ++ .../adapter/python/dap/SourceBreakpoint.java | 2 ++ .../monitor/vm/mm/python/PyMethod.java | 8 ++----- .../monitor/vm/mm/python/PyMethodRaw.java | 9 ++++++++ 8 files changed, 29 insertions(+), 21 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java index d6b78aa..aa3add9 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointType.java @@ -4,6 +4,5 @@ public enum BreakpointType { METHOD_CALL, METHOD_EXIT, CONSTRUCTOR_CALL, - CONSTRUCTOR_EXIT, MODIFICATION } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 92355d0..ba92f07 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -149,6 +149,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { PyMethodRaw mRaw = new PyMethodRaw(); // Set name mRaw.setName(mName); + mRaw.setClassName(qualifiedClassName); // Set arg type names List argTypeNames = new LinkedList<>(); for (Map.Entry mArg : mSigs.get(mName).entrySet()) { @@ -281,6 +282,7 @@ public Map parsePythonTypeString(String input) { protected boolean setBreakpoint(String file, List lines) { var source = new Source(); + source.setName(file.substring(file.lastIndexOf("/") + 1)); source.setPath(file); var bpArgs = new SetBreakpointsRequestArguments(); bpArgs.setSource(source); @@ -291,6 +293,8 @@ protected boolean setBreakpoint(String file, List lines) { sourceBreakpoints[i] = srcBp; } bpArgs.setBreakpoints(sourceBreakpoints); + bpArgs.setLines(lines.stream().mapToLong(Integer::longValue).toArray()); + bpArgs.setSourceModified(false); var bpReq = new SetBreakpointsRequestClass(); bpReq.setSeq(REQUEST_COUNTER++); bpReq.setArguments(bpArgs); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index be9f4de..0e95281 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -82,7 +82,7 @@ public static String getMethodBreakpointInfo(String qualifiedClassName, String m ( lambda fn: { "file": __import__('inspect').getsourcefile(fn), - "start": fn.__code__.co_firstlineno, + "start": fn.__code__.co_firstlineno + 1, "end": fn.__code__.co_firstlineno + len(__import__('inspect').getsourcelines(fn)[0]) - 1, "returns": [ node.lineno + fn.__code__.co_firstlineno - 1 diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 1772288..6e70828 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -104,13 +104,13 @@ public void resume() { @Override public void suspend() { - System.out.println("Suspended debugpy server..."); + System.out.println("Suspending debugpy server..."); debugpyClient.pause(); } @Override public void stop() { - System.out.println("Stopped debugpy server..."); + System.out.println("Stopping debugpy server..."); debugpyClient.stop(); isConnected = false; } @@ -197,17 +197,14 @@ public void registerConstructorCallInterest(VMType vmType) { if (!breakpoints.containsKey(constructor.getMethod().getFile())) { Map breakpointTypeMap = new HashMap<>(); breakpointTypeMap.put(constructor.getMethod().getStartLineNo(), BreakpointType.CONSTRUCTOR_CALL); - breakpointTypeMap.put(constructor.getMethod().getEndLineNo(), BreakpointType.CONSTRUCTOR_EXIT); breakpoints.put(constructor.getMethod().getFile(), breakpointTypeMap); } else { Map currBps = breakpoints.get(constructor.getMethod().getFile()); currBps.put(constructor.getMethod().getStartLineNo(), BreakpointType.CONSTRUCTOR_CALL); - currBps.put(constructor.getMethod().getEndLineNo(), BreakpointType.CONSTRUCTOR_EXIT); } String file = constructor.getMethod().getFile(); List toSet = new ArrayList<>(); toSet.add(constructor.getMethod().getStartLineNo()); - toSet.add(constructor.getMethod().getEndLineNo()); debugpyClient.setBreakpoint(file, toSet); System.out.println("BREAKPOINT_MAP: " + breakpoints); } @@ -241,7 +238,7 @@ public void run() { var qualifiedClassName = fileToClassNameMap.get(file); - if (bpt == BreakpointType.CONSTRUCTOR_EXIT) { + if (bpt == BreakpointType.CONSTRUCTOR_CALL) { handleConstructorCall(currFrame, qualifiedClassName); } else if (bpt == BreakpointType.METHOD_CALL) { handleMethodCall(currFrame, qualifiedClassName); @@ -251,6 +248,8 @@ public void run() { handleAttributeModification(currFrame, qualifiedClassName); } + // Match monitor running state + debugpyClient.resume(); } catch (InterruptedException e) { throw new RuntimeException(e); } @@ -269,24 +268,22 @@ private void handleConstructorCall(StackFrame currentFrame, String fullyQualifie System.out.println("OnConstructor OBJECT_ID: " + pyObjectRaw.getId()); controller.onNewVMObject(pyObject); - - // Match monitor running state - debugpyClient.resume(); } private void handleMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) { controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); PyType pyType = typeMapping.get(fullyQualifiedClassName); - PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()); - PyMethodCall pyMethodCall = new PyMethodCall(this, pyMethod); + PyMethod internalPyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()).getFirst(); + PyMethod upToDatePyMethod = (PyMethod) controller.getVMMethod(internalPyMethod.getId()); + PyMethodCall pyMethodCall = new PyMethodCall(this, upToDatePyMethod); controller.onMethodCall(pyMethodCall); } private void handleMethodExit(StackFrame stackFrame, String qualifiedClassName, StoppedEventClass stoppedEvent) { PyType pyType = typeMapping.get(qualifiedClassName); - PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()); + PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()).getFirst(); // TODO construct method call with runtime values controller.onMethodExit(pyMethod, pyMethod.getId()); } @@ -296,7 +293,6 @@ private void handleAttributeModification(StackFrame stackFrame, String qualified // update class instance variables from __dict__ // get object id from current frame // get field name from method name - } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java index 6b94fbc..5a20007 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Source.java @@ -32,6 +32,8 @@ * * The source of the frame. */ + +@JsonInclude(JsonInclude.Include.NON_NULL) public class Source { private Restart adapterData; private Checksum[] checksums; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java index 3496dae..ebdbb9f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SourceBreakpoint.java @@ -5,6 +5,8 @@ /** * Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. */ + +@JsonInclude(JsonInclude.Include.NON_NULL) public class SourceBreakpoint { private Long column; private String condition; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java index f6d7b98..c17e3d4 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java @@ -7,24 +7,20 @@ import java.util.ArrayList; import java.util.List; -import java.util.UUID; public class PyMethod extends PyBase implements VMMethod { private final PyMethodRaw method; - private MOperation useOperation; - private UUID id; public PyMethod(PythonAdapter adapter, PyMethodRaw method) { super(adapter); this.method = method; - this.id = UUID.randomUUID(); } @Override public Object getId() { - return id; + return method.getClassName() + ":" + method.getName(); } @Override @@ -60,7 +56,7 @@ public String toString() { return "PyMethod{" + "method=" + method + ", useOperation=" + useOperation + - ", id=" + id + + ", id=" + getId() + '}'; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java index eba2bca..7bea936 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java @@ -10,6 +10,15 @@ public class PyMethodRaw { private int endLineNo; private String file; private List returnLines; + private String className; + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } public String getName() { return name; From 2bfc3aad70cbf1bc3715879d95845a009b2ada5b Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 22 Jul 2025 23:45:55 +0200 Subject: [PATCH 19/57] Fix setBreakpoints cumulative --- .../monitor/adapter/python/DebugpyClient.java | 5 +- .../monitor/adapter/python/PythonAdapter.java | 50 +++++++++---------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index ba92f07..9d519d2 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -280,16 +280,17 @@ public Map parsePythonTypeString(String input) { return result; } - protected boolean setBreakpoint(String file, List lines) { + protected boolean setBreakpoints(String file, Set lines) { var source = new Source(); source.setName(file.substring(file.lastIndexOf("/") + 1)); source.setPath(file); var bpArgs = new SetBreakpointsRequestArguments(); bpArgs.setSource(source); SourceBreakpoint[] sourceBreakpoints = new SourceBreakpoint[lines.size()]; + Iterator linesIter = lines.iterator(); for (int i = 0; i < sourceBreakpoints.length; i++) { var srcBp = new SourceBreakpoint(); - srcBp.setLine(lines.get(i)); + srcBp.setLine(linesIter.next()); sourceBreakpoints[i] = srcBp; } bpArgs.setBreakpoints(sourceBreakpoints); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 6e70828..e2b868f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -152,26 +152,25 @@ public boolean isVMTypeLoaded(String javaClassName) { @Override public void registerOperationCallInterest(VMMethod m) { if (!m.getName().equals("__init__")) { - PyMethod pyMethod = (PyMethod) m; - if (!breakpoints.containsKey(pyMethod.getMethod().getFile())) { - Map lineBreakpointTypes = new HashMap<>(); - lineBreakpointTypes.put(pyMethod.getMethod().getStartLineNo(), BreakpointType.METHOD_CALL); - for (Integer rLine : pyMethod.getMethod().getReturnLines()) { - lineBreakpointTypes.put(rLine, BreakpointType.METHOD_EXIT); + PyMethodRaw method = ((PyMethod) m).getMethod(); + String file = method.getFile(); + int startLine = method.getStartLineNo(); + List returnLines = method.getReturnLines(); + if (!breakpoints.containsKey(file)) { + Map breakpointTypes = new HashMap<>(); + breakpointTypes.put(startLine, BreakpointType.METHOD_CALL); + for (Integer returnLine : returnLines) { + breakpointTypes.put(returnLine, BreakpointType.METHOD_EXIT); } - breakpoints.put(pyMethod.getMethod().getFile(), lineBreakpointTypes); + breakpoints.put(file, breakpointTypes); } else { - Map lineBreakpointTypes = breakpoints.get(pyMethod.getMethod().getFile()); - lineBreakpointTypes.put(pyMethod.getMethod().getStartLineNo(), BreakpointType.METHOD_CALL); - for (Integer rLine : pyMethod.getMethod().getReturnLines()) { - lineBreakpointTypes.put(rLine, BreakpointType.METHOD_EXIT); + Map lineBreakpointTypes = breakpoints.get(file); + lineBreakpointTypes.put(startLine, BreakpointType.METHOD_CALL); + for (Integer returnLine : returnLines) { + lineBreakpointTypes.put(returnLine, BreakpointType.METHOD_EXIT); } } - String file = pyMethod.getMethod().getFile(); - List setBreakpoints = new ArrayList<>(); - setBreakpoints.add(pyMethod.getMethod().getStartLineNo()); - setBreakpoints.addAll(pyMethod.getMethod().getReturnLines()); - debugpyClient.setBreakpoint(file, setBreakpoints); + debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); } System.out.println("BREAKPOINT_MAP: " + breakpoints); } @@ -193,19 +192,18 @@ public Value getMethodResultValue(Object adapterExitInformation) { @Override public void registerConstructorCallInterest(VMType vmType) { - PyMethod constructor = (PyMethod) vmType.getMethodsByName("__init__").getFirst(); - if (!breakpoints.containsKey(constructor.getMethod().getFile())) { + PyMethodRaw method = ((PyMethod) vmType.getMethodsByName("__init__").getFirst()).getMethod(); + String file = method.getFile(); + int startLine = method.getStartLineNo(); + if (!breakpoints.containsKey(file)) { Map breakpointTypeMap = new HashMap<>(); - breakpointTypeMap.put(constructor.getMethod().getStartLineNo(), BreakpointType.CONSTRUCTOR_CALL); - breakpoints.put(constructor.getMethod().getFile(), breakpointTypeMap); + breakpointTypeMap.put(startLine, BreakpointType.CONSTRUCTOR_CALL); + breakpoints.put(file, breakpointTypeMap); } else { - Map currBps = breakpoints.get(constructor.getMethod().getFile()); - currBps.put(constructor.getMethod().getStartLineNo(), BreakpointType.CONSTRUCTOR_CALL); + Map currBps = breakpoints.get(file); + currBps.put(startLine, BreakpointType.CONSTRUCTOR_CALL); } - String file = constructor.getMethod().getFile(); - List toSet = new ArrayList<>(); - toSet.add(constructor.getMethod().getStartLineNo()); - debugpyClient.setBreakpoint(file, toSet); + debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); System.out.println("BREAKPOINT_MAP: " + breakpoints); } From e0615ae292e61a9b5900b4f1cc4d7bcf5fb8387d Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Wed, 23 Jul 2025 23:32:51 +0200 Subject: [PATCH 20/57] Fix field id, add DAP and USE values, add Sequence support --- .../monitor/adapter/python/DebugpyClient.java | 76 +++++++++++-------- .../monitor/adapter/python/MessageMapper.java | 1 + .../adapter/python/PyEvalExBuilder.java | 7 ++ .../monitor/adapter/python/PythonAdapter.java | 52 ++++++++++++- .../adapter/python/custom/DAPValue.java | 45 +++++++++++ .../python/dap/EvaluateResponseBody.java | 1 + .../python/dap/VariablePresentationHint.java | 1 + .../python/dap/VariablesRequestArguments.java | 1 + .../python/dap/VariablesRequestClass.java | 15 ++-- .../python/dap/VariablesResponseClass.java | 9 ++- .../plugins/monitor/vm/mm/python/PyField.java | 14 ++-- .../monitor/vm/mm/python/PyObject.java | 19 +---- .../plugins/monitor/vm/mm/python/PyType.java | 3 +- 13 files changed, 174 insertions(+), 70 deletions(-) create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/custom/DAPValue.java diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 9d519d2..9f7f05d 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import org.tzi.use.monitor.adapter.python.custom.DAPValue; import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.adapter.python.dap.Thread; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; @@ -110,6 +111,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { case "str" -> new PyTypeRaw("str"); case "int" -> new PyTypeRaw("int"); case "bool" -> new PyTypeRaw("bool"); + case "List[int]" -> new PyTypeRaw("List[int]"); default -> null; }; @@ -130,6 +132,9 @@ PyTypeRaw getVMType(String qualifiedClassName) { evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + // TODO use variables call instead + var classMappings = parsePythonTypeString(evalResp.getBody().getResult()); PyTypeRaw rawType = new PyTypeRaw(qualifiedClassName); List fields = new ArrayList<>(); @@ -198,6 +203,18 @@ PyTypeRaw getVMType(String qualifiedClassName) { return rawType; } + protected DAPValue getDAPValue(Long objectId, String fName) { + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setExpression(PyEvalExBuilder.getDAPValue(objectId, fName)); + evalArgs.setFrameID(getCurrentFrame(getThreadId("MainThread")).getID()); + evalArgs.setContext("watch"); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); + } + protected Map getRuntimeInstanceVars(long frameId) { var evalArgs = new EvaluateRequestArguments(); evalArgs.setExpression("self.__dict__"); @@ -264,17 +281,19 @@ public static Map> parseMethodSignatures(String eval public Map parsePythonTypeString(String input) { Map result = new HashMap<>(); - String cleaned = input - .replace("'", "\"") - .replaceAll("", "\"$1\"") - .replaceAll("", "\"$1\""); - - Matcher matcher = TYPE_CLASS_PATTERN.matcher(cleaned); + Pattern pattern = Pattern.compile( + "'(.*?)'\\s*:\\s*(|typing\\.[\\w\\[\\], ]+|\".*?\"|'.*?'|\\w+)" + ); + Matcher matcher = pattern.matcher(input); while (matcher.find()) { - String variable = matcher.group(1); - String type = matcher.group(2); - result.put(variable, type); + String key = matcher.group(1); + String fullValue = matcher.group(2); + + String innerType = matcher.group(3); + String value = (innerType != null) ? innerType : fullValue; + + result.put(key, value); } return result; @@ -400,44 +419,37 @@ protected PyObjectRaw getInstance(PyType pyType) { var evalArgs = new EvaluateRequestArguments(); evalArgs.setContext("watch"); evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); - evalArgs.setExpression(PyEvalExBuilder.getInstanceExp(pyType.getName())); + evalArgs.setExpression(PyEvalExBuilder.getInstanceId(pyType.getName())); var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - // TODO: Use variables reference instead... - var res = evalResp.getBody().getResult(); - if (res.equals("None")) { + if (evalResp.getBody().getResult().equals("None")) { return null; } - String json = res.replace('\'', '"'); - Map rawMap; - try { - rawMap = mapper.readValue(stringifyJsonEntries(json), Map.class); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - Map result = new HashMap<>(); - for (Map.Entry entry : rawMap.entrySet()) { - result.put(entry.getKey(), entry.getValue().toString()); - } - - // Set instance ID - evalArgs.setExpression(PyEvalExBuilder.getInstanceId(pyType.getName())); - evalReq.setSeq(REQUEST_COUNTER++); - evalResp = (EvaluateResponseClass) sendRequest(evalReq); PyObjectRaw pyObjectRaw = new PyObjectRaw(Long.parseLong(evalResp.getBody().getResult())); pyObjectRaw.setRawType(pyType.getRawType()); for (PyFieldRaw rawField : pyObjectRaw.getRawType().getFields()) { - System.out.println("Setting value '" + result.get(rawField.getName()) + "' to field '" + rawField.getName()); - rawField.setValue(result.get(rawField.getName())); + // TODO check variables reference + DAPValue dapValue = getDAPValue(pyObjectRaw.getId(), rawField.getName()); + System.out.println("Setting value '" + dapValue.getResult() + "' to field '" + rawField.getName()); + rawField.setValue(dapValue.getResult()); } - return pyObjectRaw; } + public Variable[] getDAPChildren(long variablesReference) { + var varArgs = new VariablesRequestArguments(); + varArgs.setVariablesReference(variablesReference); + var varReq = new VariablesRequestClass(); + varReq.setSeq(REQUEST_COUNTER++); + varReq.setArguments(varArgs); + var varResp = (VariablesResponseClass) sendRequest(varReq); + return varResp.getBody().getVariables(); + } + private String stringifyJsonEntries(String json) { Matcher m = JSON_STRINGIFY_PATTERN.matcher(json); StringBuilder sb = new StringBuilder(); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java index 19328a9..ba47dd2 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -35,6 +35,7 @@ private static DAPResponse parseResponse(JsonNode tree, String json) throws Json case "continue" -> mapper.readValue(json, ContinueResponseClass.class); case "disconnect" -> mapper.readValue(json, DisconnectResponseClass.class); case "setBreakpoints" -> mapper.readValue(json, SetBreakpointsResponseClass.class); + case "variables" -> mapper.readValue(json, VariablesResponseClass.class); default -> null; }; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 0e95281..2dfde10 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -104,4 +104,11 @@ public static String getMethodBreakpointInfo(String qualifiedClassName, String m ); } + public static String getDAPValue(Long objectId, String fieldName) { + return String.format("(next(o for o in __import__('gc').get_objects() if id(o) == %s)).%s", + objectId, + fieldName + ); + } + } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index e2b868f..6f557cf 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -1,5 +1,6 @@ package org.tzi.use.monitor.adapter.python; +import org.tzi.use.monitor.adapter.python.custom.DAPValue; import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import org.tzi.use.plugins.monitor.MonitorException; @@ -7,7 +8,8 @@ import org.tzi.use.plugins.monitor.vm.adapter.InvalidAdapterConfiguration; import org.tzi.use.plugins.monitor.vm.adapter.VMAdapterSetting; import org.tzi.use.plugins.monitor.vm.mm.*; -import org.tzi.use.uml.ocl.value.Value; +import org.tzi.use.uml.ocl.type.TypeFactory; +import org.tzi.use.uml.ocl.value.*; import java.lang.Thread; import java.util.*; @@ -130,10 +132,56 @@ public VMType getVMType(String name) { } typeMapping.put(name, res); } - System.out.println("Got VMType '" + name + "'..."); + System.out.println("Got VMType '" + name + "'..." + res); return typeMapping.get(name); } + public DAPValue getDAPValue(Long objId, String fName) { + return debugpyClient.getDAPValue(objId, fName); + } + + + public Value getUSEValue(DAPValue dapValue) { + if (dapValue == null) { + return UndefinedValue.instance; + } + + System.out.println("Getting DAPValue for type: " + dapValue.getType()); + + return switch (dapValue.getType()) { + case "int" -> IntegerValue.valueOf(Integer.parseInt(dapValue.getResult())); + case "bool" -> BooleanValue.get(Boolean.parseBoolean(dapValue.getResult())); + case "str" -> new StringValue(dapValue.getResult()); + case "list"-> { + List allChildren = fetchChildren(dapValue.getVariablesReference()); + // Filter only numeric-named entries (actual list indices) + List items = allChildren.stream() + .filter(child -> child.getName().matches("\\d+")) // only "0", "1", etc. + .sorted(Comparator.comparingInt(child -> Integer.parseInt(child.getName()))) // ensure correct order + .toList(); + + Value[] sequence = new Value[items.size()]; + for (int i = 0; i < items.size(); i++) { + sequence[i] = getUSEValue(items.get(i)); + } + yield new SequenceValue(TypeFactory.mkVoidType(), sequence); + } + default -> UndefinedValue.instance; + }; + } + + private List fetchChildren(long variablesReference) { + List res = new ArrayList<>(); + Variable[] vars = debugpyClient.getDAPChildren(variablesReference); + for (Variable var : vars) { + var dapVal = new DAPValue(var.getValue(), var.getType(), var.getVariablesReference()); + dapVal.setName(var.getName()); + res.add(dapVal); + } + return res; + } + + @Override public void registerClassPrepareEvent(String javaClassName) { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/custom/DAPValue.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/custom/DAPValue.java new file mode 100644 index 0000000..df2a65c --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/custom/DAPValue.java @@ -0,0 +1,45 @@ +package org.tzi.use.monitor.adapter.python.custom; + +public final class DAPValue { + private final String result; + private final String type; + private final long variablesReference; + private String name; + + public DAPValue(String result, String type, long variablesReference) { + this.result = result; + this.type = type; + this.variablesReference = variablesReference; + } + + public String getResult() { + return result; + } + + public String getType() { + return type; + } + + public long getVariablesReference() { + return variablesReference; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public String toString() { + return "DAPValue{" + + "result='" + result + '\'' + + ", type='" + type + '\'' + + ", variablesReference=" + variablesReference + + ", name='" + name + '\'' + + '}'; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseBody.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseBody.java index d61d662..36428b2 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseBody.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseBody.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.*; +@JsonInclude(JsonInclude.Include.NON_NULL) public class EvaluateResponseBody { private Long indexedVariables; private String memoryReference; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java index 9c4a5f1..0d1a975 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java @@ -11,6 +11,7 @@ * * Properties of a value that can be used to determine how to render the result in the UI. */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class VariablePresentationHint { private String[] attributes; private String kind; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestArguments.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestArguments.java index a7319cb..31fa7bc 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestArguments.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestArguments.java @@ -5,6 +5,7 @@ /** * Arguments for `variables` request. */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class VariablesRequestArguments { private Long count; private Filter filter; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java index eb5e00b..7ca6b63 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java @@ -10,11 +10,12 @@ * Retrieves all child variables for the given variable reference. * A filter can be used to limit the fetched children to either named or indexed children. */ -public class VariablesRequestClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class VariablesRequestClass implements DAPRequest { private long seq; - private AttachRequestType type; + private String type = "request"; private VariablesRequestArguments arguments; - private VariablesRequestCommand command; + private String command = "variables"; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -33,9 +34,9 @@ public class VariablesRequestClass { * Message type. */ @JsonProperty("type") - public AttachRequestType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachRequestType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Object containing arguments for the command. @@ -49,7 +50,7 @@ public class VariablesRequestClass { * The command to execute. */ @JsonProperty("command") - public VariablesRequestCommand getCommand() { return command; } + public String getCommand() { return command; } @JsonProperty("command") - public void setCommand(VariablesRequestCommand value) { this.command = value; } + public void setCommand(String value) { this.command = value; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java index e9da243..3122d10 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java @@ -9,9 +9,10 @@ * * Response to `variables` request. */ -public class VariablesResponseClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class VariablesResponseClass implements DAPResponse { private long seq; - private AttachResponseType type; + private String type; private VariablesResponseBody body; private String command; private String message; @@ -35,9 +36,9 @@ public class VariablesResponseClass { * Message type. */ @JsonProperty("type") - public AttachResponseType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(AttachResponseType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Contains request result if success is true and error details if success is false. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index 3a40400..58f1b49 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -5,19 +5,17 @@ import org.tzi.use.uml.mm.MAssociationEnd; import org.tzi.use.uml.mm.MAttribute; -import java.util.UUID; - public class PyField extends PyBase implements VMField { - private final Object id; private final PyFieldRaw pyFieldRaw; + private final String className; private MAttribute useAttribute; - public PyField(PythonAdapter adapter, PyFieldRaw pyFieldRaw) { + public PyField(PythonAdapter adapter, PyFieldRaw pyFieldRaw, String className) { super(adapter); this.pyFieldRaw = pyFieldRaw; - this.id = UUID.randomUUID(); + this.className = className; } @Override @@ -47,17 +45,17 @@ public MAssociationEnd getUSEAssociationEnd() { @Override public Object getId() { - return id; + return className + ":" + getName(); } - PyFieldRaw getPyFieldRaw() { + public PyFieldRaw getPyFieldRaw() { return pyFieldRaw; } @Override public String toString() { return "PyField{" + - "id=" + id + + "id=" + getId() + ", pyFieldRaw=" + pyFieldRaw + '}'; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java index a0d42ee..2fb1c7d 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -1,12 +1,10 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; import org.tzi.use.monitor.adapter.python.PythonAdapter; +import org.tzi.use.monitor.adapter.python.custom.DAPValue; import org.tzi.use.plugins.monitor.vm.mm.VMField; import org.tzi.use.plugins.monitor.vm.mm.VMObject; import org.tzi.use.plugins.monitor.vm.mm.VMType; -import org.tzi.use.uml.ocl.value.BooleanValue; -import org.tzi.use.uml.ocl.value.IntegerValue; -import org.tzi.use.uml.ocl.value.StringValue; import org.tzi.use.uml.ocl.value.Value; import org.tzi.use.uml.sys.MObject; @@ -50,19 +48,8 @@ public void setUSEObject(MObject obj) { @Override public Value getValue(VMField field) { - // TODO dont get from internal value, but new debugpy call - System.out.println("getValue for:" + field.getName()); - PyField f = (PyField) field; - String valTypeStr = f.getPyFieldRaw().getType(); - System.out.println("getValue valTypeStr:" + valTypeStr); - String valStr = f.getPyFieldRaw().getValue(); - System.out.println("getValue valstr:" + valStr); - return switch (valTypeStr) { - case "int" -> IntegerValue.valueOf(Integer.parseInt(valStr)); - case "str" -> new StringValue(valStr); - case "bool" -> BooleanValue.get(Boolean.parseBoolean(valStr)); - default -> null; - }; + DAPValue dapValue = adapter.getDAPValue((Long) getId(), field.getName()); + return adapter.getUSEValue(dapValue); } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index cefcc88..c8d5cb0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -74,11 +74,12 @@ public void setUSEClass(MClass cls) { @Override public VMField getFieldByName(String javaFieldName) { + System.out.println("Getting field by name: " + javaFieldName); PyFieldRaw f = rawType.getFields().stream() .filter(fi -> fi.getName().equals(javaFieldName)) .findFirst() .orElse(null); - return f != null ? new PyField(adapter, f) : null; + return f != null ? new PyField(adapter, f, getName()) : null; } @Override From 5a7ebf1de492065819a90404c86de97a55db0e2b Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Thu, 24 Jul 2025 00:51:26 +0200 Subject: [PATCH 21/57] Add tuple support --- .../monitor/adapter/python/DebugpyClient.java | 3 +- .../monitor/adapter/python/PythonAdapter.java | 33 +++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 9f7f05d..b0b2827 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -111,7 +111,8 @@ PyTypeRaw getVMType(String qualifiedClassName) { case "str" -> new PyTypeRaw("str"); case "int" -> new PyTypeRaw("int"); case "bool" -> new PyTypeRaw("bool"); - case "List[int]" -> new PyTypeRaw("List[int]"); + case "List" -> new PyTypeRaw("List"); + case "Tuple" -> new PyTypeRaw("Tuple"); default -> null; }; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 6f557cf..60504a7 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -8,6 +8,8 @@ import org.tzi.use.plugins.monitor.vm.adapter.InvalidAdapterConfiguration; import org.tzi.use.plugins.monitor.vm.adapter.VMAdapterSetting; import org.tzi.use.plugins.monitor.vm.mm.*; +import org.tzi.use.uml.ocl.type.TupleType; +import org.tzi.use.uml.ocl.type.Type; import org.tzi.use.uml.ocl.type.TypeFactory; import org.tzi.use.uml.ocl.value.*; @@ -154,10 +156,10 @@ public Value getUSEValue(DAPValue dapValue) { case "str" -> new StringValue(dapValue.getResult()); case "list"-> { List allChildren = fetchChildren(dapValue.getVariablesReference()); - // Filter only numeric-named entries (actual list indices) + List items = allChildren.stream() - .filter(child -> child.getName().matches("\\d+")) // only "0", "1", etc. - .sorted(Comparator.comparingInt(child -> Integer.parseInt(child.getName()))) // ensure correct order + .filter(child -> child.getName().matches("\\d+")) + .sorted(Comparator.comparingInt(child -> Integer.parseInt(child.getName()))) .toList(); Value[] sequence = new Value[items.size()]; @@ -166,6 +168,31 @@ public Value getUSEValue(DAPValue dapValue) { } yield new SequenceValue(TypeFactory.mkVoidType(), sequence); } + case "tuple" -> { + List allChildren = fetchChildren(dapValue.getVariablesReference()); + + List items = allChildren.stream() + .filter(child -> child.getName().matches("\\d+")) + .sorted(Comparator.comparingInt(child -> Integer.parseInt(child.getName()))) + .toList(); + + TupleType.Part[] typeParts = new TupleType.Part[items.size()]; + List valueParts = new ArrayList<>(); + + for (int i = 0; i < items.size(); i++) { + DAPValue item = items.get(i); + String name = "item" + i; + + Value value = getUSEValue(item); + Type type = value.type(); + + typeParts[i] = new TupleType.Part(i, name, type); + valueParts.add(new TupleValue.Part(i, name, value)); + } + + TupleType tupleType = TypeFactory.mkTuple(typeParts); + yield new TupleValue(tupleType, valueParts); + } default -> UndefinedValue.instance; }; } From 5798968382ed58d5ac89488ba3abeecf80cbb30b Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sun, 27 Jul 2025 16:21:49 +0200 Subject: [PATCH 22/57] Add method call this object ref --- .../org/tzi/use/monitor/adapter/python/PythonAdapter.java | 6 +++++- .../monitor/plugins/monitor/vm/mm/python/PyMethodCall.java | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 60504a7..3a4549b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -349,7 +349,11 @@ private void handleMethodCall(StackFrame stackFrame, String fullyQualifiedClassN PyType pyType = typeMapping.get(fullyQualifiedClassName); PyMethod internalPyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()).getFirst(); PyMethod upToDatePyMethod = (PyMethod) controller.getVMMethod(internalPyMethod.getId()); - PyMethodCall pyMethodCall = new PyMethodCall(this, upToDatePyMethod); + + Long pyObjId = debugpyClient.getSelfId(stackFrame.getID()); + PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); + + PyMethodCall pyMethodCall = new PyMethodCall(this, upToDatePyMethod, pyObject); controller.onMethodCall(pyMethodCall); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java index 9b536f7..eca5048 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java @@ -12,10 +12,12 @@ public class PyMethodCall extends PyBase implements VMMethodCall { private final PyMethod pyMethod; + private final PyObject pyObject; - public PyMethodCall(PythonAdapter adapter, PyMethod pyMethod) { + public PyMethodCall(PythonAdapter adapter, PyMethod pyMethod, PyObject pyObject) { super(adapter); this.pyMethod = pyMethod; + this.pyObject = pyObject; } @Override @@ -30,7 +32,7 @@ public VMMethod getMethod() { @Override public VMObject getThisObject() throws VMAccessException { - return null; + return pyObject; } @Override From 47537ca030575ecb2ff92e93c2517b103414b77a Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sun, 27 Jul 2025 17:12:46 +0200 Subject: [PATCH 23/57] Add method call runtime arg vals --- .../monitor/adapter/python/DebugpyClient.java | 17 ++++++++++++++++- .../monitor/adapter/python/PythonAdapter.java | 8 +++++++- .../monitor/vm/mm/python/PyMethodCall.java | 17 ++++++++++++++--- .../monitor/vm/mm/python/PyMethodRaw.java | 11 +++++++++++ 4 files changed, 48 insertions(+), 5 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index b0b2827..464d7ba 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -158,10 +158,13 @@ PyTypeRaw getVMType(String qualifiedClassName) { mRaw.setClassName(qualifiedClassName); // Set arg type names List argTypeNames = new LinkedList<>(); + List argNames = new ArrayList<>(); for (Map.Entry mArg : mSigs.get(mName).entrySet()) { - argTypeNames.add(mArg.getValue()); + argNames.add(mArg.getKey()); + argTypeNames.add(mArg.getValue()); } mRaw.setArgumentTypeNames(argTypeNames); + mRaw.setArgumentNames(argNames); // Set line nos and filename evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(qualifiedClassName, mName)); evalReq.setSeq(REQUEST_COUNTER++); @@ -482,6 +485,18 @@ protected Long getSelfId(long frameId) { return Long.parseLong(evalResp.getBody().getResult()); } + protected DAPValue getMethodArgDAPValue(long frameId, String argName){ + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setFrameID(frameId); + evalArgs.setContext("watch"); + evalArgs.setExpression(argName); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); + } + private DAPResponse sendRequest(DAPRequest dapRequest) { sendAsyncRequest(dapRequest); return waitForAsyncResponse(); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 3a4549b..ed38a83 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -353,7 +353,13 @@ private void handleMethodCall(StackFrame stackFrame, String fullyQualifiedClassN Long pyObjId = debugpyClient.getSelfId(stackFrame.getID()); PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); - PyMethodCall pyMethodCall = new PyMethodCall(this, upToDatePyMethod, pyObject); + List argValues = new ArrayList<>(); + for (String argName : upToDatePyMethod.getMethod().getArgumentNames()) { + DAPValue argDAPValue = debugpyClient.getMethodArgDAPValue(stackFrame.getID(), argName); + argValues.add(getUSEValue(argDAPValue)); + } + + PyMethodCall pyMethodCall = new PyMethodCall(this, upToDatePyMethod, pyObject, argValues); controller.onMethodCall(pyMethodCall); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java index eca5048..5d1993f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java @@ -13,16 +13,18 @@ public class PyMethodCall extends PyBase implements VMMethodCall { private final PyMethod pyMethod; private final PyObject pyObject; + private final List argVals; - public PyMethodCall(PythonAdapter adapter, PyMethod pyMethod, PyObject pyObject) { + public PyMethodCall(PythonAdapter adapter, PyMethod pyMethod, PyObject pyObject, List argVals) { super(adapter); this.pyMethod = pyMethod; this.pyObject = pyObject; + this.argVals = argVals; } @Override public List getArgumentValues() throws VMAccessException { - return List.of(); + return argVals; } @Override @@ -37,7 +39,16 @@ public VMObject getThisObject() throws VMAccessException { @Override public int getNumArguments() throws VMAccessException { - return this.pyMethod.getArgumentTypes().size(); + return pyMethod.getArgumentTypes().size(); + } + + @Override + public String toString() { + return "PyMethodCall{" + + "pyMethod=" + pyMethod + + ", pyObject=" + pyObject + + ", argVals=" + argVals + + '}'; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java index 7bea936..6a5aedf 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java @@ -6,6 +6,7 @@ public class PyMethodRaw { private String name; private List argumentTypeNames; + private List argumentNames; private int startLineNo; private int endLineNo; private String file; @@ -36,6 +37,14 @@ public void setArgumentTypeNames(List argumentTypeNames) { this.argumentTypeNames = argumentTypeNames; } + public List getArgumentNames() { + return argumentNames; + } + + public void setArgumentNames(List argumentNames) { + this.argumentNames = argumentNames; + } + public int getStartLineNo() { return startLineNo; } @@ -73,10 +82,12 @@ public String toString() { return "PyMethodRaw{" + "name='" + name + '\'' + ", argumentTypeNames=" + argumentTypeNames + + ", argumentNames=" + argumentNames + ", startLineNo=" + startLineNo + ", endLineNo=" + endLineNo + ", file='" + file + '\'' + ", returnLines=" + returnLines + + ", className='" + className + '\'' + '}'; } From 381d0ce8088b13dfff916edcd310af447ba80e1e Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sun, 27 Jul 2025 17:50:18 +0200 Subject: [PATCH 24/57] refac fetch py method by id --- .../org/tzi/use/monitor/adapter/python/PythonAdapter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index ed38a83..745e216 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -347,19 +347,19 @@ private void handleMethodCall(StackFrame stackFrame, String fullyQualifiedClassN controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); PyType pyType = typeMapping.get(fullyQualifiedClassName); - PyMethod internalPyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()).getFirst(); - PyMethod upToDatePyMethod = (PyMethod) controller.getVMMethod(internalPyMethod.getId()); + String methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); Long pyObjId = debugpyClient.getSelfId(stackFrame.getID()); PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); List argValues = new ArrayList<>(); - for (String argName : upToDatePyMethod.getMethod().getArgumentNames()) { + for (String argName : pyMethod.getMethod().getArgumentNames()) { DAPValue argDAPValue = debugpyClient.getMethodArgDAPValue(stackFrame.getID(), argName); argValues.add(getUSEValue(argDAPValue)); } - PyMethodCall pyMethodCall = new PyMethodCall(this, upToDatePyMethod, pyObject, argValues); + PyMethodCall pyMethodCall = new PyMethodCall(this, pyMethod, pyObject, argValues); controller.onMethodCall(pyMethodCall); } From 4e81b8da0b019b168d03d5a819641220ead905d7 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sun, 27 Jul 2025 18:32:30 +0200 Subject: [PATCH 25/57] add float support --- .../java/org/tzi/use/monitor/adapter/python/DebugpyClient.java | 1 + .../java/org/tzi/use/monitor/adapter/python/PythonAdapter.java | 1 + 2 files changed, 2 insertions(+) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 464d7ba..1fa1a8b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -110,6 +110,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { var t = switch (qualifiedClassName) { case "str" -> new PyTypeRaw("str"); case "int" -> new PyTypeRaw("int"); + case "float" -> new PyTypeRaw("float"); case "bool" -> new PyTypeRaw("bool"); case "List" -> new PyTypeRaw("List"); case "Tuple" -> new PyTypeRaw("Tuple"); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 745e216..97122da 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -152,6 +152,7 @@ public Value getUSEValue(DAPValue dapValue) { return switch (dapValue.getType()) { case "int" -> IntegerValue.valueOf(Integer.parseInt(dapValue.getResult())); + case "float" -> new RealValue(Double.parseDouble(dapValue.getResult())); case "bool" -> BooleanValue.get(Boolean.parseBoolean(dapValue.getResult())); case "str" -> new StringValue(dapValue.getResult()); case "list"-> { From d2934699768f3074fa86bddc50609d7a8fd10315 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 5 Aug 2025 03:38:43 +0200 Subject: [PATCH 26/57] Add object ref use value and association support --- .../monitor/adapter/python/DebugpyClient.java | 1 + .../monitor/adapter/python/PythonAdapter.java | 29 ++++++++++++++++++- .../monitor/adapter/python/dap/Variable.java | 15 ++++++++++ .../python/dap/VariablePresentationHint.java | 13 +++++++++ .../plugins/monitor/vm/mm/python/PyField.java | 5 ++-- .../plugins/monitor/vm/mm/python/PyType.java | 3 +- 6 files changed, 62 insertions(+), 4 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 1fa1a8b..65e3eae 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -114,6 +114,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { case "bool" -> new PyTypeRaw("bool"); case "List" -> new PyTypeRaw("List"); case "Tuple" -> new PyTypeRaw("Tuple"); + case "Any" -> new PyTypeRaw("Any"); default -> null; }; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 97122da..f628880 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -16,6 +16,8 @@ import java.lang.Thread; import java.util.*; import java.util.logging.Level; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * @author Sergio Jimenez @@ -26,6 +28,8 @@ public class PythonAdapter extends AbstractVMAdapter { private static final int SETTING_PORT_IDX = 1; private static final int SETTING_WORKSPACE_IDX = 2; + private static final Pattern MEMORY_ADDR_PATTERN = Pattern.compile("0x[0-9a-fA-F]+"); + private String host; private int port; private boolean isConnected; @@ -194,10 +198,33 @@ public Value getUSEValue(DAPValue dapValue) { TupleType tupleType = TypeFactory.mkTuple(typeParts); yield new TupleValue(tupleType, valueParts); } - default -> UndefinedValue.instance; + default -> { + // Object + if (dapValue.getResult().contains("object")) { + long objId = extractHexAndConvertToDecimal(dapValue.getResult()); + if (controller.existsVMObject(objId)) { + System.out.println("Found obj for USE value with id: " + objId); + VMObject obj = controller.getVMObject(objId); + yield new ObjectValue(obj.getUSEObject().cls(), obj.getUSEObject()); + } + } + // Unknown + System.out.println("Unknown case for dapValue type: " + dapValue.getType()); + yield UndefinedValue.instance; + } }; } + private long extractHexAndConvertToDecimal(String input) { + Matcher matcher = MEMORY_ADDR_PATTERN.matcher(input); + if (matcher.find()) { + String hexString = matcher.group(); + return Long.parseLong(hexString.substring(2), 16); + } + return 0; + } + + private List fetchChildren(long variablesReference) { List res = new ArrayList<>(); Variable[] vars = debugpyClient.getDAPChildren(variablesReference); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java index a27c21e..a26abea 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/Variable.java @@ -117,4 +117,19 @@ public class Variable { public long getVariablesReference() { return variablesReference; } @JsonProperty("variablesReference") public void setVariablesReference(long value) { this.variablesReference = value; } + + @Override + public String toString() { + return "Variable{" + + "evaluateName='" + evaluateName + '\'' + + ", indexedVariables=" + indexedVariables + + ", memoryReference='" + memoryReference + '\'' + + ", name='" + name + '\'' + + ", namedVariables=" + namedVariables + + ", presentationHint=" + presentationHint + + ", type='" + type + '\'' + + ", value='" + value + '\'' + + ", variablesReference=" + variablesReference + + '}'; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java index 0d1a975..393ff85 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablePresentationHint.java @@ -2,6 +2,8 @@ import com.fasterxml.jackson.annotation.*; +import java.util.Arrays; + /** * Properties of an evaluate result that can be used to determine how to render the result * in the UI. @@ -58,4 +60,15 @@ public class VariablePresentationHint { public String getVisibility() { return visibility; } @JsonProperty("visibility") public void setVisibility(String value) { this.visibility = value; } + + @Override + public String toString() { + return "VariablePresentationHint{" + + "attributes=" + Arrays.toString(attributes) + + ", kind='" + kind + '\'' + + ", lazy=" + lazy + + ", visibility='" + visibility + '\'' + + '}'; + } } + diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index 58f1b49..c9d5022 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -11,6 +11,7 @@ public class PyField extends PyBase implements VMField { private final String className; private MAttribute useAttribute; + private MAssociationEnd useAssociationEnd; public PyField(PythonAdapter adapter, PyFieldRaw pyFieldRaw, String className) { super(adapter); @@ -35,12 +36,12 @@ public MAttribute getUSEAttribute() { @Override public void setUSEAssociationEnd(MAssociationEnd end) { - + useAssociationEnd = end; } @Override public MAssociationEnd getUSEAssociationEnd() { - return null; + return useAssociationEnd; } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index c8d5cb0..ef52ab4 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -74,11 +74,12 @@ public void setUSEClass(MClass cls) { @Override public VMField getFieldByName(String javaFieldName) { - System.out.println("Getting field by name: " + javaFieldName); + System.out.println("Getting field by name: " + javaFieldName + " for type: " + getName()); PyFieldRaw f = rawType.getFields().stream() .filter(fi -> fi.getName().equals(javaFieldName)) .findFirst() .orElse(null); + System.out.println("Got field by name: " + javaFieldName + " = " + f); return f != null ? new PyField(adapter, f, getName()) : null; } From 31b2c09635dcefd0ea2f4d146f99704bb5de6874 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 5 Aug 2025 17:31:05 +0200 Subject: [PATCH 27/57] Add set support --- .../monitor/adapter/python/DebugpyClient.java | 1 + .../monitor/adapter/python/PythonAdapter.java | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 65e3eae..d9c2975 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -114,6 +114,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { case "bool" -> new PyTypeRaw("bool"); case "List" -> new PyTypeRaw("List"); case "Tuple" -> new PyTypeRaw("Tuple"); + case "Set" -> new PyTypeRaw("Set"); case "Any" -> new PyTypeRaw("Any"); default -> null; }; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index f628880..c4ac9d0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -198,6 +198,24 @@ public Value getUSEValue(DAPValue dapValue) { TupleType tupleType = TypeFactory.mkTuple(typeParts); yield new TupleValue(tupleType, valueParts); } + + case "set" -> { + List allChildren = fetchChildren(dapValue.getVariablesReference()); + + var items = allChildren.stream() + .filter(child -> child.getName().matches("\\d+")) + .toList(); + + List useValues = new ArrayList<>(); + + for (DAPValue item : items) { + Value v = getUSEValue(item); + useValues.add(v); + } + + yield new SetValue(TypeFactory.mkVoidType(), useValues); + } + default -> { // Object if (dapValue.getResult().contains("object")) { From 037dbab22d991d5997fd44d1c0394f2a4fc778ba Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 5 Aug 2025 23:39:07 +0200 Subject: [PATCH 28/57] add dict support wip --- .../monitor/adapter/python/DebugpyClient.java | 1 + .../monitor/adapter/python/PythonAdapter.java | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index d9c2975..25207ec 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -115,6 +115,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { case "List" -> new PyTypeRaw("List"); case "Tuple" -> new PyTypeRaw("Tuple"); case "Set" -> new PyTypeRaw("Set"); + case "Dict" -> new PyTypeRaw("Dict"); case "Any" -> new PyTypeRaw("Any"); default -> null; }; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index c4ac9d0..6754a19 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -198,7 +198,48 @@ public Value getUSEValue(DAPValue dapValue) { TupleType tupleType = TypeFactory.mkTuple(typeParts); yield new TupleValue(tupleType, valueParts); } + // TODO FIXME: custom debugpy call for type resolution of keys and values separately needed + case "dict" -> { + List dictEntries = fetchChildren(dapValue.getVariablesReference()); + TupleType.Part[] p = new TupleType.Part[] { + new TupleType.Part(0, "key", TypeFactory.mkVoidType()), + new TupleType.Part(1, "value", TypeFactory.mkVoidType()) + }; + TupleType tupleType = TypeFactory.mkTuple(p); + + List tupleValues = new ArrayList<>(); + + for (DAPValue entry : dictEntries) { + if (entry.getVariablesReference() == 0) continue; // skip non-expandable entries + + List keyValueChildren = fetchChildren(entry.getVariablesReference()); + + DAPValue keyDap = keyValueChildren.stream() + .filter(child -> "key".equals(child.getName())) + .findFirst() + .orElse(null); + + DAPValue valueDap = keyValueChildren.stream() + .filter(child -> "value".equals(child.getName())) + .findFirst() + .orElse(null); + + if (keyDap != null && valueDap != null) { + Value useKey = getUSEValue(keyDap); + Value useValue = getUSEValue(valueDap); + + List parts = List.of( + new TupleValue.Part(0, "key", useKey), + new TupleValue.Part(1, "value", useValue) + ); + + tupleValues.add(new TupleValue(tupleType, parts)); + } + } + + yield new SetValue(TypeFactory.mkVoidType(), tupleValues); + } case "set" -> { List allChildren = fetchChildren(dapValue.getVariablesReference()); From 29c71d760e4dc78be5b81f001dfa47e3bbd76f3e Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Wed, 6 Aug 2025 01:42:01 +0200 Subject: [PATCH 29/57] add attr mod support --- .../monitor/adapter/python/PythonAdapter.java | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 6754a19..750b18e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -139,6 +139,7 @@ public VMType getVMType(String name) { typeMapping.put(name, res); } System.out.println("Got VMType '" + name + "'..." + res); + controller.storeVMType(name, typeMapping.get(name)); return typeMapping.get(name); } @@ -371,7 +372,29 @@ public void registerConstructorCallInterest(VMType vmType) { @Override public void registerFieldModificationInterest(VMField f) { + String[] fId = ((String) f.getId()).split(":"); + VMType vmType = controller.getVMType(fId[0]); + List methods= vmType.getMethodsByName("set_" + fId[1]); + + if (methods.isEmpty()) { + controller.newLogMessage(this, Level.WARNING, "Setter for field " + f.getId() + " not found! Will not set field modification breakpoint."); + return; + } + + PyMethodRaw mr = ((PyMethod) methods.get(0)).getMethod(); + String file = mr.getFile(); + int startLine = mr.getStartLineNo(); + if (!breakpoints.containsKey(file)) { + Map breakpointTypeMap = new HashMap<>(); + breakpointTypeMap.put(startLine, BreakpointType.MODIFICATION); + breakpoints.put(file, breakpointTypeMap); + } else { + Map currBps = breakpoints.get(file); + currBps.put(startLine, BreakpointType.MODIFICATION); + } + debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); + System.out.println("BREAKPOINT_MAP: " + breakpoints); } private class BreakpointWatcher implements Runnable { @@ -460,9 +483,23 @@ private void handleMethodExit(StackFrame stackFrame, String qualifiedClassName, private void handleAttributeModification(StackFrame stackFrame, String qualifiedClassName) { controller.newLogMessage(this, Level.FINE, "onAttributeModification: " + qualifiedClassName + "." + stackFrame.getName()); - // update class instance variables from __dict__ - // get object id from current frame - // get field name from method name + + Long pyObjId = debugpyClient.getSelfId(stackFrame.getID()); + PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); + + PyField pyField = (PyField) pyObject.getType().getFieldByName(stackFrame.getName().replace("set_", "")); + + String methodId = (String) pyObject.getType().getMethodsByName(stackFrame.getName()).getFirst().getId(); + PyMethod m = (PyMethod) controller.getVMMethod(methodId); + + // TODO FIX assert only one arg + List argValues = new ArrayList<>(); + for (String argName : m.getMethod().getArgumentNames()) { + DAPValue argDAPValue = debugpyClient.getMethodArgDAPValue(stackFrame.getID(), argName); + argValues.add(getUSEValue(argDAPValue)); + } + + controller.onUpdateAttribute(pyObjId, pyField.getId(), argValues.get(0)); } @Override From fdb694ccbfdd1a38f36fe0869bb22f61b7d793d9 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sun, 10 Aug 2025 18:30:29 +0200 Subject: [PATCH 30/57] Add SUM dir setting --- .../monitor/adapter/python/DebugpyClient.java | 16 +++++++++----- .../monitor/adapter/python/PythonAdapter.java | 22 ++++++++++++++++--- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 25207ec..4e006aa 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -21,7 +21,6 @@ * @author Sergio Jimenez */ public class DebugpyClient { - private static final String WORKSPACE = "/Users/serj/git/uni/dpy-server"; private static final Pattern SIGNATURE_PATTERN = Pattern.compile("^(\\w+)\\((.*?)\\)\\s*->\\s*.*$"); private static final Pattern TYPE_CLASS_PATTERN = Pattern.compile("\"(\\w+)\":\\s*\"(\\w+)\""); private static final Pattern JSON_STRINGIFY_PATTERN = Pattern.compile("(:\\s*)([^\"{},\\s][^,}]*)"); @@ -37,15 +36,21 @@ public class DebugpyClient { private CompletableFuture stoppedEvent; protected boolean running = false; protected final BlockingQueue eventQueue = new LinkedBlockingQueue<>(); + private final String workspace; + private final String host; + private final int port; - DebugpyClient(String host, int port) throws IOException { + DebugpyClient(String host, int port, String workspace) throws IOException { this.socket = new Socket(host, port); this.in = new BufferedReader(new InputStreamReader(socket.getInputStream())); this.out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); + this.workspace = workspace; + this.host = host; + this.port = port; startReaderThread(); } - boolean attach(String host, int port) { + boolean attach() { initEvent = new CompletableFuture<>(); // Initialize @@ -62,12 +67,13 @@ boolean attach(String host, int port) { // Attach var attachArgs = new AttachRequestArgumentsClass(); attachArgs.setConnect(Map.of("host", host, "port", port)); - attachArgs.setPathMappings(List.of(Map.of("localRoot", WORKSPACE, "remoteRoot", "."))); + attachArgs.setPathMappings(List.of(Map.of("localRoot", workspace, "remoteRoot", "."))); + // FIXME: Dynamic OS resolution with debugpy expected values attachArgs.setClientOs("unix"); attachArgs.setDebugOptions(List.of("RedirectOutput", "ShowReturnValue")); attachArgs.setShowReturnValue(true); attachArgs.setJustMyCode(true); - attachArgs.setWorkspaceFolder(WORKSPACE); + attachArgs.setWorkspaceFolder(workspace); attachArgs.setSessionId(UUID.randomUUID().toString()); var attachReq = new AttachRequestClass(); attachReq.setArguments(attachArgs); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 750b18e..809da45 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -14,6 +14,8 @@ import org.tzi.use.uml.ocl.value.*; import java.lang.Thread; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.*; import java.util.logging.Level; import java.util.regex.Matcher; @@ -32,6 +34,7 @@ public class PythonAdapter extends AbstractVMAdapter { private String host; private int port; + private String workspace; private boolean isConnected; private DebugpyClient debugpyClient; public Map typeMapping; @@ -67,6 +70,19 @@ protected void validateSettings() throws InvalidAdapterConfiguration { } catch (NumberFormatException e) { throw new InvalidAdapterConfiguration("Port must be a number!"); } + + String settingWorkspace = settings.get(SETTING_WORKSPACE_IDX).value; + try { + Path workspacePath = Path.of(settingWorkspace); + boolean isValidDir = Files.isDirectory(workspacePath); + if (isValidDir) { + workspace = workspacePath.toString(); + } else { + throw new IllegalArgumentException(); + } + } catch (Exception e) { + throw new InvalidAdapterConfiguration("Invalid directory!"); + } } @Override @@ -74,7 +90,7 @@ protected void createSettings(List settings) { System.out.println("Creating Python adapter settings..."); settings.add(SETTING_HOST_IDX, new VMAdapterSetting("Host", "localhost")); settings.add(SETTING_PORT_IDX, new VMAdapterSetting("Port", "5678")); - settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("Workspace", "/Users/serj/git/uni/dpy-server")); + settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("SUM root dir", "")); } @Override @@ -86,14 +102,14 @@ public void attachToVM() throws MonitorException { fileToClassNameMap = new HashMap<>(); try { - debugpyClient = new DebugpyClient(host, port); + debugpyClient = new DebugpyClient(host, port, workspace); } catch (Exception e) { throw new MonitorException("Failed to create socket!", e); } System.out.println("Debugpy socket created!"); - if (debugpyClient.attach(host, port)) { + if (debugpyClient.attach()) { isConnected = true; breakpointWatcher = new Thread(new BreakpointWatcher(), "PythonAdapter breakpoint watcher"); breakpointWatcher.start(); From 4e31b66e87dc798cb9266f46b8f302c4fe552ba1 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sun, 10 Aug 2025 23:47:07 +0200 Subject: [PATCH 31/57] rm method overloading logic --- .../monitor/plugins/monitor/vm/mm/python/PyType.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index ef52ab4..b80de5a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -7,8 +7,8 @@ import org.tzi.use.plugins.monitor.vm.mm.VMType; import org.tzi.use.uml.mm.MClass; -import java.util.LinkedList; import java.util.List; +import java.util.Optional; import java.util.Set; public class PyType extends PyBase implements VMType { @@ -52,14 +52,10 @@ public Set getInstances() { @Override public List getMethodsByName(String methodName) { - List pyMethodsRaw = rawType.getMethods().stream() + Optional methodOpt = rawType.getMethods().stream() .filter(m -> m.getName().equals(methodName)) - .toList(); - List pyMethods = new LinkedList<>(); - for (PyMethodRaw rawMethod : pyMethodsRaw) { - pyMethods.add(new PyMethod(getAdapter(), rawMethod)); - } - return pyMethods; + .findAny(); + return methodOpt.>map(pyMethodRaw -> List.of(new PyMethod(getAdapter(), pyMethodRaw))).orElseGet(List::of); } @Override From 3012344d6b3a84070606e05aeea68de6ecd9ba53 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 11 Aug 2025 01:01:52 +0200 Subject: [PATCH 32/57] support multiple instances and rm unused field value --- .../monitor/adapter/python/DebugpyClient.java | 28 ++++++++++--------- .../adapter/python/PyEvalExBuilder.java | 4 +-- .../monitor/adapter/python/PythonAdapter.java | 13 ++++----- .../monitor/vm/mm/python/PyFieldRaw.java | 14 ++-------- 4 files changed, 24 insertions(+), 35 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 4e006aa..70797a0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -150,7 +150,7 @@ PyTypeRaw getVMType(String qualifiedClassName) { PyTypeRaw rawType = new PyTypeRaw(qualifiedClassName); List fields = new ArrayList<>(); for (Map.Entry entry : classMappings.entrySet()) { - fields.add(new PyFieldRaw(entry.getKey(), entry.getValue(), null)); + fields.add(new PyFieldRaw(entry.getKey(), entry.getValue())); } rawType.setFields(fields); @@ -427,31 +427,33 @@ protected Thread[] getThreads() { return threadsResp.getBody().getThreads(); } - protected PyObjectRaw getInstance(PyType pyType) { + protected Set getInstances(PyType pyType) { pause(); var evalArgs = new EvaluateRequestArguments(); evalArgs.setContext("watch"); evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); - evalArgs.setExpression(PyEvalExBuilder.getInstanceId(pyType.getName())); + evalArgs.setExpression(PyEvalExBuilder.getInstanceIds(pyType.getName())); var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - if (evalResp.getBody().getResult().equals("None")) { - return null; + Set rawObjs = new HashSet<>(); + + String result = evalResp.getBody().getResult(); + if (result.equals("[]")) { + return rawObjs; } - PyObjectRaw pyObjectRaw = new PyObjectRaw(Long.parseLong(evalResp.getBody().getResult())); - pyObjectRaw.setRawType(pyType.getRawType()); - for (PyFieldRaw rawField : pyObjectRaw.getRawType().getFields()) { - // TODO check variables reference - DAPValue dapValue = getDAPValue(pyObjectRaw.getId(), rawField.getName()); - System.out.println("Setting value '" + dapValue.getResult() + "' to field '" + rawField.getName()); - rawField.setValue(dapValue.getResult()); + String[] objIds = result.substring(1, result.length() - 1).split(","); + for (String id : objIds) { + PyObjectRaw rawObj = new PyObjectRaw(Long.parseLong(id.trim())); + rawObj.setRawType(pyType.getRawType()); + rawObjs.add(rawObj); } - return pyObjectRaw; + + return rawObjs; } public Variable[] getDAPChildren(long variablesReference) { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 2dfde10..13a0ea9 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -44,7 +44,7 @@ public static String getSelfIdAtCurrentFrame() { return "id(self)"; } - public static String getInstanceId(String qualifiedClassName) { + public static String getInstanceIds(String qualifiedClassName) { int lastDot = qualifiedClassName.lastIndexOf('.'); if (lastDot == -1) { throw new IllegalArgumentException("Qualified class name must contain at least one dot."); @@ -52,7 +52,7 @@ public static String getInstanceId(String qualifiedClassName) { String moduleName = qualifiedClassName.substring(0, lastDot); String className = qualifiedClassName.substring(lastDot + 1); return String.format( - "next((id(obj) for obj in __import__('gc').get_objects() if isinstance(obj, getattr(__import__('%s'), '%s'))), None)\n", + "[id(obj) for obj in __import__('gc').get_objects() if isinstance(obj, getattr(__import__('%s'), '%s'))]\n", moduleName, className ); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 809da45..8964b47 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -43,15 +43,12 @@ public class PythonAdapter extends AbstractVMAdapter { private Map fileToClassNameMap; public Set readInstances(PyType type) { - var className = type.getName(); - System.out.println("Reading instances of class: " + className); - PyObjectRaw pyObjectRaw = debugpyClient.getInstance(typeMapping.get(className)); - if (pyObjectRaw == null) { - return Set.of(); + PyType pyType = typeMapping.get(type.getName()); + Set instances = new HashSet<>(); + for (PyObjectRaw rawObj : debugpyClient.getInstances(pyType)) { + instances.add(new PyObject(this, rawObj, pyType)); } - System.out.println("GotInstance OBJECT_ID: " + pyObjectRaw.getId()); - PyObject pyObj = new PyObject(this, pyObjectRaw, typeMapping.get(className)); - return Set.of(pyObj); + return instances; } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java index 3836761..0fdd530 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java @@ -3,12 +3,10 @@ public class PyFieldRaw { private String name; private String type; - private String value; - public PyFieldRaw(String name, String type, String value) { + public PyFieldRaw(String name, String type) { this.name = name; this.type = type; - this.value = value; } public String getName() { @@ -19,10 +17,6 @@ public String getType() { return type; } - public String getValue() { - return value; - } - public void setName(String name) { this.name = name; } @@ -31,16 +25,12 @@ public void setType(String type) { this.type = type; } - public void setValue(String value) { - this.value = value; - } - @Override public String toString() { return "PyFieldRaw{" + "name='" + name + '\'' + ", type='" + type + '\'' + - ", value='" + value + '\'' + '}'; } + } From 78e9bdf55218e47e1f8b8c08c579348fe01759b9 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 12 Aug 2025 13:55:13 +0200 Subject: [PATCH 33/57] rm hint constraint --- .../monitor/adapter/python/DebugpyClient.java | 214 ++++++------------ .../adapter/python/PyEvalExBuilder.java | 39 +--- .../monitor/adapter/python/PythonAdapter.java | 32 +-- .../monitor/vm/mm/python/PyMethod.java | 2 +- .../monitor/vm/mm/python/PyMethodRaw.java | 3 +- .../monitor/vm/mm/python/PyObject.java | 9 + .../monitor/vm/mm/python/PyObjectRaw.java | 8 + .../monitor/vm/mm/python/PyTypeRaw.java | 5 +- 8 files changed, 118 insertions(+), 194 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 70797a0..0393760 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -112,97 +112,79 @@ boolean attach() { } PyTypeRaw getVMType(String qualifiedClassName) { - // TODO: Handle remaining build-in types - var t = switch (qualifiedClassName) { - case "str" -> new PyTypeRaw("str"); - case "int" -> new PyTypeRaw("int"); - case "float" -> new PyTypeRaw("float"); - case "bool" -> new PyTypeRaw("bool"); - case "List" -> new PyTypeRaw("List"); - case "Tuple" -> new PyTypeRaw("Tuple"); - case "Set" -> new PyTypeRaw("Set"); - case "Dict" -> new PyTypeRaw("Dict"); - case "Any" -> new PyTypeRaw("Any"); - default -> null; - }; - - if (t != null) { - t.setPrimitive(true); - return t; + if (!qualifiedClassName.contains(".") || qualifiedClassName.equals("Mock")) { + return new PyTypeRaw("Mock"); } pause(); - // Set Fields + PyTypeRaw rawType = new PyTypeRaw(qualifiedClassName); + + // Set Methods var evalArgs = new EvaluateRequestArguments(); evalArgs.setContext("watch"); evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); - evalArgs.setExpression(PyEvalExBuilder.getClassFieldTypesExp(qualifiedClassName)); + evalArgs.setExpression(PyEvalExBuilder.getMethodSignaturesExp(qualifiedClassName)); var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + String result = evalResp.getBody().getResult(); - // TODO use variables call instead + if (!result.equals("''")) { + List methods = new LinkedList<>(); - var classMappings = parsePythonTypeString(evalResp.getBody().getResult()); - PyTypeRaw rawType = new PyTypeRaw(qualifiedClassName); - List fields = new ArrayList<>(); - for (Map.Entry entry : classMappings.entrySet()) { - fields.add(new PyFieldRaw(entry.getKey(), entry.getValue())); - } - rawType.setFields(fields); + String escapedResult = result.substring(1, result.length() - 1); - // Set Methods - evalArgs.setExpression(PyEvalExBuilder.getMethodsExpVar(qualifiedClassName)); - evalReq.setSeq(REQUEST_COUNTER++); - evalResp = (EvaluateResponseClass) sendRequest(evalReq); + String[] methodSigs = escapedResult.split(";"); - Map> mSigs = parseMethodSignatures(evalResp.getBody().getResult()); - List methods = new LinkedList<>(); - for (String mName : mSigs.keySet()) { - PyMethodRaw mRaw = new PyMethodRaw(); - // Set name - mRaw.setName(mName); - mRaw.setClassName(qualifiedClassName); - // Set arg type names - List argTypeNames = new LinkedList<>(); - List argNames = new ArrayList<>(); - for (Map.Entry mArg : mSigs.get(mName).entrySet()) { - argNames.add(mArg.getKey()); - argTypeNames.add(mArg.getValue()); - } - mRaw.setArgumentTypeNames(argTypeNames); - mRaw.setArgumentNames(argNames); - // Set line nos and filename - evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(qualifiedClassName, mName)); - evalReq.setSeq(REQUEST_COUNTER++); - evalResp = (EvaluateResponseClass) sendRequest(evalReq); - - String json = evalResp.getBody().getResult().replace("'", "\""); - ObjectMapper mapper = new ObjectMapper(); - JsonNode root; - try { - root = mapper.readTree(json); - } catch (JsonProcessingException e) { - return null; - } - String fileRaw = root.get("file").asText(); - String normalizedFile = Paths.get(fileRaw).normalize().toString(); - mRaw.setFile(normalizedFile); - mRaw.setStartLineNo(root.get("start").asInt()); - mRaw.setEndLineNo(root.get("end").asInt()); - List returnLines = new ArrayList<>(); - for (JsonNode r : root.get("returns")) { - returnLines.add(r.asInt()); - } - mRaw.setReturnLines(returnLines); - // TODO: Set return type + for (String methodSig : methodSigs) { + PyMethodRaw mRaw = new PyMethodRaw(); + + String[] sigParts = methodSig.split(":"); + + mRaw.setName(sigParts[0]); - methods.add(mRaw); + mRaw.setClassName(qualifiedClassName); + + List argNames = new ArrayList<>(); + for (String argName : sigParts[1].split(",")) { + if (argName.equals("self")) { + continue; + } + argNames.add(argName); + } + mRaw.setArgumentNames(argNames); + + // Set line nos and filename + evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(qualifiedClassName, mRaw.getName())); + evalReq.setSeq(REQUEST_COUNTER++); + evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + String json = evalResp.getBody().getResult().replace("'", "\""); + ObjectMapper mapper = new ObjectMapper(); + JsonNode root; + try { + root = mapper.readTree(json); + } catch (JsonProcessingException e) { + return null; + } + String fileRaw = root.get("file").asText(); + String normalizedFile = Paths.get(fileRaw).normalize().toString(); + mRaw.setFile(normalizedFile); + mRaw.setStartLineNo(root.get("start").asInt()); + mRaw.setEndLineNo(root.get("end").asInt()); + List returnLines = new ArrayList<>(); + for (JsonNode r : root.get("returns")) { + returnLines.add(r.asInt()); + } + mRaw.setReturnLines(returnLines); + + methods.add(mRaw); + } + rawType.setMethods(methods); } - rawType.setMethods(methods); // Set File evalArgs.setExpression(PyEvalExBuilder.getFileForClass(qualifiedClassName)); @@ -229,88 +211,30 @@ protected DAPValue getDAPValue(Long objectId, String fName) { return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); } - protected Map getRuntimeInstanceVars(long frameId) { + protected List getInstanceVariables(long currFrameId) { + List rawFields = new ArrayList<>(); + var evalArgs = new EvaluateRequestArguments(); - evalArgs.setExpression("self.__dict__"); + evalArgs.setExpression(PyEvalExBuilder.getSelfVarsWithType()); + evalArgs.setFrameID(currFrameId); evalArgs.setContext("watch"); - evalArgs.setFrameID(frameId); var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); String result = evalResp.getBody().getResult(); - System.out.println("INSTANCE_VARS: " + result); - String jsonCompatible = result.replace('\'', '"'); - Map map = null; - try { - map = mapper.readValue(jsonCompatible, Map.class); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - - // Optionally stringify values: - Map finalMap = new HashMap<>(); - for (Map.Entry entry : map.entrySet()) { - finalMap.put(entry.getKey(), String.valueOf(entry.getValue())); - } - - System.out.println("final Map: " + finalMap); - - return finalMap; - } - - public static Map> parseMethodSignatures(String evalResp) { - Map> result = new HashMap<>(); - evalResp = evalResp.strip().replaceAll("^'+|'+$", ""); // Remove outer quotes - String[] lines = evalResp.split("\\\\n"); // split on literal `\n` - - for (String line : lines) { - Matcher matcher = SIGNATURE_PATTERN.matcher(line.strip()); - if (matcher.matches()) { - String methodName = matcher.group(1); - String params = matcher.group(2); - Map paramMap = new LinkedHashMap<>(); - if (!params.isEmpty()) { - for (String param : params.split(",")) { - param = param.strip(); - if (param.equals("self")) continue; - String[] parts = param.split(":"); - if (parts.length == 2) { - String paramName = parts[0].strip(); - String paramType = parts[1].strip(); - paramMap.put(paramName, paramType); - } else { - // TODO: Unknown handling - System.out.printf("Unknown type for argument '%s'\n", parts[0].strip()); - } - } - } - result.put(methodName, paramMap); + if (!result.equals("''")) { + String vars = result.substring(1, result.length() - 1); + String[] fields = vars.split(","); + for (String field : fields) { + String[] fieldParts = field.split(":"); + String fieldName = fieldParts[0]; + String fieldType = fieldParts[1]; + rawFields.add(new PyFieldRaw(fieldName, fieldType)); } } - return result; - } - - public Map parsePythonTypeString(String input) { - Map result = new HashMap<>(); - - Pattern pattern = Pattern.compile( - "'(.*?)'\\s*:\\s*(|typing\\.[\\w\\[\\], ]+|\".*?\"|'.*?'|\\w+)" - ); - Matcher matcher = pattern.matcher(input); - - while (matcher.find()) { - String key = matcher.group(1); - String fullValue = matcher.group(2); - - String innerType = matcher.group(3); - String value = (innerType != null) ? innerType : fullValue; - - result.put(key, value); - } - - return result; + return rawFields; } protected boolean setBreakpoints(String file, Set lines) { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 13a0ea9..610b59b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -2,18 +2,8 @@ public class PyEvalExBuilder { - public static String getClassFieldTypesExp(String qualifiedClassName) { - int lastDot = qualifiedClassName.lastIndexOf('.'); - if (lastDot == -1) { - throw new IllegalArgumentException("Qualified class name must contain at least one dot."); - } - String moduleName = qualifiedClassName.substring(0, lastDot); - String className = qualifiedClassName.substring(lastDot + 1); - return String.format( - "getattr(__import__('sys').modules['%s'], '%s').__init__.__annotations__", - moduleName, - className - ); + public static String getSelfVarsWithType() { + return "\",\".join([f\"{k}:{type(v).__name__}\" for k, v in vars(self).items()])\n"; } public static String getFileForClass(String qualifiedClassName) { @@ -30,16 +20,6 @@ public static String getFileForClass(String qualifiedClassName) { ); } - public static String getInstanceExp(String qualifiedClassName) { - int lastDot = qualifiedClassName.lastIndexOf('.'); - String simpleClassName = qualifiedClassName.substring(lastDot + 1); - return String.format( - "vars(next((obj for obj in __import__('gc').get_objects() if isinstance(obj, %s)), None)) if next((obj for obj in __import__('gc').get_objects() if isinstance(obj, %s)), None) else None", - simpleClassName, - simpleClassName - ); - } - public static String getSelfIdAtCurrentFrame() { return "id(self)"; } @@ -58,18 +38,17 @@ public static String getInstanceIds(String qualifiedClassName) { ); } - // TODO: migrate to python 3.11 getMembersStatic instead - public static String getMethodsExpVar(String qualifiedClassName) { + public static String getMethodSignaturesExp(String qualifiedClassName) { int lastDot = qualifiedClassName.lastIndexOf('.'); String moduleName = qualifiedClassName.substring(0, lastDot); String simpleClassName = qualifiedClassName.substring(lastDot + 1); return String.format( - "\"\\n\".join([\n" + - " f\"{name}({', '.join([str(p) for p in __import__('inspect').signature(m).parameters.values()])}) -> {__import__('inspect').signature(m).return_annotation.__name__ if isinstance(__import__('inspect').signature(m).return_annotation, type) else str(__import__('inspect').signature(m).return_annotation)}\"\n" + - " for name, m in __import__('inspect').getmembers(__import__('sys').modules['%s'].%s, __import__('inspect').isfunction)\n" + - "])", - moduleName, - simpleClassName + """ + ";".join([ + f"{name}:{','.join([p.name for p in __import__('inspect').signature(m).parameters.values()])}" + for name, m in __import__('inspect').getmembers(__import__('sys').modules['%s'].%s, __import__('inspect').isfunction) + ]) + """, moduleName, simpleClassName ); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 8964b47..20181fb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -87,7 +87,7 @@ protected void createSettings(List settings) { System.out.println("Creating Python adapter settings..."); settings.add(SETTING_HOST_IDX, new VMAdapterSetting("Host", "localhost")); settings.add(SETTING_PORT_IDX, new VMAdapterSetting("Port", "5678")); - settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("SUM root dir", "")); + settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("SUM root dir", "/home/serj/git/uni/dpy-server")); } @Override @@ -139,21 +139,21 @@ public void stop() { @Override public VMType getVMType(String name) { System.out.println("Getting VMType '" + name + "'..."); + PyTypeRaw rawType = debugpyClient.getVMType(name); PyType res = null; - if (!typeMapping.containsKey(name)) { - var rawType = debugpyClient.getVMType(name); - if (rawType != null) { + if (rawType != null) { + if (!typeMapping.containsKey(name)) { res = new PyType(this, rawType); - } - if (res != null && !res.getRawType().isPrimitive()) { - fileToClassNameMap.put(res.getRawType().getFile(), name); + fileToClassNameMap.put(rawType.getFile(), name); + typeMapping.put(name, res); + controller.storeVMType(name, res); System.out.println("fileToClassNameMap: " + fileToClassNameMap); + } else { + res = typeMapping.get(name); } - typeMapping.put(name, res); } - System.out.println("Got VMType '" + name + "'..." + res); - controller.storeVMType(name, typeMapping.get(name)); - return typeMapping.get(name); + System.out.println("Got VMType '" + typeMapping.get(name) + "' for " + name); + return res; } public DAPValue getDAPValue(Long objId, String fName) { @@ -370,14 +370,14 @@ public Value getMethodResultValue(Object adapterExitInformation) { public void registerConstructorCallInterest(VMType vmType) { PyMethodRaw method = ((PyMethod) vmType.getMethodsByName("__init__").getFirst()).getMethod(); String file = method.getFile(); - int startLine = method.getStartLineNo(); + int endLineNo = method.getEndLineNo(); if (!breakpoints.containsKey(file)) { Map breakpointTypeMap = new HashMap<>(); - breakpointTypeMap.put(startLine, BreakpointType.CONSTRUCTOR_CALL); + breakpointTypeMap.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); breakpoints.put(file, breakpointTypeMap); } else { Map currBps = breakpoints.get(file); - currBps.put(startLine, BreakpointType.CONSTRUCTOR_CALL); + currBps.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); } debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); System.out.println("BREAKPOINT_MAP: " + breakpoints); @@ -462,7 +462,9 @@ private void handleConstructorCall(StackFrame currentFrame, String fullyQualifie pyObjectRaw.setRawType(pyType.getRawType()); PyObject pyObject = new PyObject(this, pyObjectRaw, pyType); - System.out.println("OnConstructor OBJECT_ID: " + pyObjectRaw.getId()); + List instanceVars = debugpyClient.getInstanceVariables(currentFrame.getID()); + pyType.getRawType().setFields(instanceVars); + controller.onNewVMObject(pyObject); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java index c17e3d4..e000e12 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java @@ -30,7 +30,7 @@ public String getName() { @Override public List getArgumentTypes() { - List types = new ArrayList<>(method.getArgumentTypeNames().size()); + List types = new ArrayList<>(); for (String typeName : method.getArgumentTypeNames()) { types.add(adapter.getVMType(typeName)); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java index 6a5aedf..9da3113 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java @@ -1,11 +1,12 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; +import java.util.ArrayList; import java.util.List; public class PyMethodRaw { private String name; - private List argumentTypeNames; + private List argumentTypeNames = new ArrayList<>(); private List argumentNames; private int startLineNo; private int endLineNo; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java index 2fb1c7d..74706ea 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -52,4 +52,13 @@ public Value getValue(VMField field) { return adapter.getUSEValue(dapValue); } + @Override + public String toString() { + return "PyObject{" + + "rawObject=" + rawObject + + ", type=" + type + + ", useObject=" + useObject + + '}'; + } + } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java index 07c1217..5f19510 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java @@ -19,4 +19,12 @@ public void setRawType(PyTypeRaw rawType) { public Long getId() { return id; } + + @Override + public String toString() { + return "PyObjectRaw{" + + "id=" + id + + ", rawType=" + rawType + + '}'; + } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java index 43a1542..d1f3e32 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java @@ -1,11 +1,12 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; +import java.util.ArrayList; import java.util.List; public class PyTypeRaw { private String name; - private List fields; - private List methods; + private List fields = new ArrayList<>(); + private List methods = new ArrayList<>(); private boolean isPrimitive; private String file; From 34fefb2143b90a1978386c0fb569260c544ba0fc Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 12 Aug 2025 14:49:51 +0200 Subject: [PATCH 34/57] register field mod workaround after type hint removal --- .../monitor/adapter/python/DebugpyClient.java | 5 ++++- .../monitor/adapter/python/PythonAdapter.java | 18 +++++++----------- .../plugins/monitor/vm/mm/python/PyField.java | 7 +++++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 0393760..fa62d6a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -112,7 +112,7 @@ boolean attach() { } PyTypeRaw getVMType(String qualifiedClassName) { - if (!qualifiedClassName.contains(".") || qualifiedClassName.equals("Mock")) { + if (!qualifiedClassName.contains(".")) { return new PyTypeRaw("Mock"); } @@ -149,13 +149,16 @@ PyTypeRaw getVMType(String qualifiedClassName) { mRaw.setClassName(qualifiedClassName); List argNames = new ArrayList<>(); + List argTypes = new ArrayList<>(); for (String argName : sigParts[1].split(",")) { if (argName.equals("self")) { continue; } argNames.add(argName); + argTypes.add("Mock"); } mRaw.setArgumentNames(argNames); + mRaw.setArgumentTypeNames(argTypes); // Set line nos and filename evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(qualifiedClassName, mRaw.getName())); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 20181fb..078c220 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -349,6 +349,9 @@ public void registerOperationCallInterest(VMMethod m) { debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); } System.out.println("BREAKPOINT_MAP: " + breakpoints); + if (m.getName().startsWith("set_")) { + registerFieldModificationInterest((PyMethod) m); + } } @Override @@ -385,17 +388,10 @@ public void registerConstructorCallInterest(VMType vmType) { @Override public void registerFieldModificationInterest(VMField f) { - String[] fId = ((String) f.getId()).split(":"); - VMType vmType = controller.getVMType(fId[0]); - - List methods= vmType.getMethodsByName("set_" + fId[1]); - - if (methods.isEmpty()) { - controller.newLogMessage(this, Level.WARNING, "Setter for field " + f.getId() + " not found! Will not set field modification breakpoint."); - return; - } + } - PyMethodRaw mr = ((PyMethod) methods.get(0)).getMethod(); + private void registerFieldModificationInterest(PyMethod m) { + PyMethodRaw mr = m.getMethod(); String file = mr.getFile(); int startLine = mr.getStartLineNo(); if (!breakpoints.containsKey(file)) { @@ -407,9 +403,9 @@ public void registerFieldModificationInterest(VMField f) { currBps.put(startLine, BreakpointType.MODIFICATION); } debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); - System.out.println("BREAKPOINT_MAP: " + breakpoints); } + private class BreakpointWatcher implements Runnable { @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index c9d5022..dc73e23 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -56,8 +56,11 @@ public PyFieldRaw getPyFieldRaw() { @Override public String toString() { return "PyField{" + - "id=" + getId() + - ", pyFieldRaw=" + pyFieldRaw + + "pyFieldRaw=" + pyFieldRaw + + ", className='" + className + '\'' + + ", useAttribute=" + useAttribute + + ", useAssociationEnd=" + useAssociationEnd + '}'; } + } From eb84a2ec4ef7e1f93935b5573102fb0b8cdcbb94 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 12 Aug 2025 21:04:22 +0200 Subject: [PATCH 35/57] rm raw python type variants and base type --- .../monitor/adapter/python/DebugpyClient.java | 70 +++++++------- .../monitor/adapter/python/PythonAdapter.java | 53 ++++------- .../plugins/monitor/vm/mm/python/PyBase.java | 17 ---- .../plugins/monitor/vm/mm/python/PyField.java | 36 ++++--- .../monitor/vm/mm/python/PyFieldRaw.java | 36 ------- .../monitor/vm/mm/python/PyMethod.java | 88 ++++++++++++++--- .../monitor/vm/mm/python/PyMethodCall.java | 5 +- .../monitor/vm/mm/python/PyMethodRaw.java | 95 ------------------- .../monitor/vm/mm/python/PyObject.java | 15 +-- .../monitor/vm/mm/python/PyObjectRaw.java | 30 ------ .../plugins/monitor/vm/mm/python/PyType.java | 64 +++++++++---- .../monitor/vm/mm/python/PyTypeRaw.java | 67 ------------- 12 files changed, 212 insertions(+), 364 deletions(-) delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyBase.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index fa62d6a..fb9774e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -7,6 +7,7 @@ import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.adapter.python.dap.Thread; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; +import org.tzi.use.plugins.monitor.vm.mm.VMObject; import java.io.*; import java.net.Socket; @@ -39,14 +40,16 @@ public class DebugpyClient { private final String workspace; private final String host; private final int port; + private final PythonAdapter adapter; - DebugpyClient(String host, int port, String workspace) throws IOException { + DebugpyClient(String host, int port, String workspace, PythonAdapter adapter) throws IOException { this.socket = new Socket(host, port); this.in = new BufferedReader(new InputStreamReader(socket.getInputStream())); this.out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); this.workspace = workspace; this.host = host; this.port = port; + this.adapter = adapter; startReaderThread(); } @@ -111,14 +114,14 @@ boolean attach() { return initResp.getSuccess(); } - PyTypeRaw getVMType(String qualifiedClassName) { + PyType getVMType(String qualifiedClassName) { if (!qualifiedClassName.contains(".")) { - return new PyTypeRaw("Mock"); + return new PyType(adapter, "Mock"); } pause(); - PyTypeRaw rawType = new PyTypeRaw(qualifiedClassName); + PyType pyType = new PyType(adapter, qualifiedClassName); // Set Methods var evalArgs = new EvaluateRequestArguments(); @@ -133,20 +136,15 @@ PyTypeRaw getVMType(String qualifiedClassName) { String result = evalResp.getBody().getResult(); if (!result.equals("''")) { - List methods = new LinkedList<>(); + List methods = new LinkedList<>(); String escapedResult = result.substring(1, result.length() - 1); String[] methodSigs = escapedResult.split(";"); for (String methodSig : methodSigs) { - PyMethodRaw mRaw = new PyMethodRaw(); - String[] sigParts = methodSig.split(":"); - - mRaw.setName(sigParts[0]); - - mRaw.setClassName(qualifiedClassName); + PyMethod pyMethod = new PyMethod(adapter, sigParts[0], qualifiedClassName); List argNames = new ArrayList<>(); List argTypes = new ArrayList<>(); @@ -157,11 +155,11 @@ PyTypeRaw getVMType(String qualifiedClassName) { argNames.add(argName); argTypes.add("Mock"); } - mRaw.setArgumentNames(argNames); - mRaw.setArgumentTypeNames(argTypes); + pyMethod.setArgumentNames(argNames); + pyMethod.setArgumentTypes(argTypes); // Set line nos and filename - evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(qualifiedClassName, mRaw.getName())); + evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(qualifiedClassName, pyMethod.getName())); evalReq.setSeq(REQUEST_COUNTER++); evalResp = (EvaluateResponseClass) sendRequest(evalReq); @@ -175,18 +173,18 @@ PyTypeRaw getVMType(String qualifiedClassName) { } String fileRaw = root.get("file").asText(); String normalizedFile = Paths.get(fileRaw).normalize().toString(); - mRaw.setFile(normalizedFile); - mRaw.setStartLineNo(root.get("start").asInt()); - mRaw.setEndLineNo(root.get("end").asInt()); + pyMethod.setFile(normalizedFile); + pyMethod.setStartLineNo(root.get("start").asInt()); + pyMethod.setEndLineNo(root.get("end").asInt()); List returnLines = new ArrayList<>(); for (JsonNode r : root.get("returns")) { returnLines.add(r.asInt()); } - mRaw.setReturnLines(returnLines); + pyMethod.setReturnLines(returnLines); - methods.add(mRaw); + methods.add(pyMethod); } - rawType.setMethods(methods); + pyType.setMethods(methods); } // Set File @@ -197,9 +195,9 @@ PyTypeRaw getVMType(String qualifiedClassName) { String file = evalResp.getBody().getResult(); String normalizedPath = Path.of(file).normalize().toString().replace("'", ""); System.out.println("SETTING FILE TO: " + normalizedPath); - rawType.setFile(normalizedPath); + pyType.setFile(normalizedPath); - return rawType; + return pyType; } protected DAPValue getDAPValue(Long objectId, String fName) { @@ -214,8 +212,8 @@ protected DAPValue getDAPValue(Long objectId, String fName) { return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); } - protected List getInstanceVariables(long currFrameId) { - List rawFields = new ArrayList<>(); + protected List getInstanceVariables(long currFrameId, String className) { + List rawFields = new ArrayList<>(); var evalArgs = new EvaluateRequestArguments(); evalArgs.setExpression(PyEvalExBuilder.getSelfVarsWithType()); @@ -234,7 +232,9 @@ protected List getInstanceVariables(long currFrameId) { String[] fieldParts = field.split(":"); String fieldName = fieldParts[0]; String fieldType = fieldParts[1]; - rawFields.add(new PyFieldRaw(fieldName, fieldType)); + PyField pyField = new PyField(adapter, fieldName, className); + pyField.setType(fieldType); + rawFields.add(pyField); } } return rawFields; @@ -354,7 +354,7 @@ protected Thread[] getThreads() { return threadsResp.getBody().getThreads(); } - protected Set getInstances(PyType pyType) { + protected Set getInstances(PyType pyType) { pause(); var evalArgs = new EvaluateRequestArguments(); @@ -366,21 +366,17 @@ protected Set getInstances(PyType pyType) { evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - Set rawObjs = new HashSet<>(); - String result = evalResp.getBody().getResult(); + + Set objs = new HashSet<>(); if (result.equals("[]")) { - return rawObjs; + return objs; } - - String[] objIds = result.substring(1, result.length() - 1).split(","); - for (String id : objIds) { - PyObjectRaw rawObj = new PyObjectRaw(Long.parseLong(id.trim())); - rawObj.setRawType(pyType.getRawType()); - rawObjs.add(rawObj); + String[] ids = result.substring(1, result.length() - 1).split(","); + for (String id : ids) { + objs.add(new PyObject(adapter, Long.parseLong(id.trim()), pyType)); } - - return rawObjs; + return objs; } public Variable[] getDAPChildren(long variablesReference) { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 078c220..c459798 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -44,11 +44,7 @@ public class PythonAdapter extends AbstractVMAdapter { public Set readInstances(PyType type) { PyType pyType = typeMapping.get(type.getName()); - Set instances = new HashSet<>(); - for (PyObjectRaw rawObj : debugpyClient.getInstances(pyType)) { - instances.add(new PyObject(this, rawObj, pyType)); - } - return instances; + return debugpyClient.getInstances(pyType); } @Override @@ -99,7 +95,7 @@ public void attachToVM() throws MonitorException { fileToClassNameMap = new HashMap<>(); try { - debugpyClient = new DebugpyClient(host, port, workspace); + debugpyClient = new DebugpyClient(host, port, workspace, this); } catch (Exception e) { throw new MonitorException("Failed to create socket!", e); } @@ -139,21 +135,15 @@ public void stop() { @Override public VMType getVMType(String name) { System.out.println("Getting VMType '" + name + "'..."); - PyTypeRaw rawType = debugpyClient.getVMType(name); - PyType res = null; - if (rawType != null) { - if (!typeMapping.containsKey(name)) { - res = new PyType(this, rawType); - fileToClassNameMap.put(rawType.getFile(), name); - typeMapping.put(name, res); - controller.storeVMType(name, res); - System.out.println("fileToClassNameMap: " + fileToClassNameMap); - } else { - res = typeMapping.get(name); - } + if (typeMapping.containsKey(name)) { + return typeMapping.get(name); } - System.out.println("Got VMType '" + typeMapping.get(name) + "' for " + name); - return res; + PyType pyType = debugpyClient.getVMType(name); + fileToClassNameMap.put(pyType.getFile(), name); + typeMapping.put(name, pyType); + controller.storeVMType(name, pyType); + System.out.println("fileToClassNameMap: " + fileToClassNameMap); + return pyType; } public DAPValue getDAPValue(Long objId, String fName) { @@ -328,7 +318,7 @@ public boolean isVMTypeLoaded(String javaClassName) { @Override public void registerOperationCallInterest(VMMethod m) { if (!m.getName().equals("__init__")) { - PyMethodRaw method = ((PyMethod) m).getMethod(); + PyMethod method = (PyMethod) m; String file = method.getFile(); int startLine = method.getStartLineNo(); List returnLines = method.getReturnLines(); @@ -371,7 +361,7 @@ public Value getMethodResultValue(Object adapterExitInformation) { @Override public void registerConstructorCallInterest(VMType vmType) { - PyMethodRaw method = ((PyMethod) vmType.getMethodsByName("__init__").getFirst()).getMethod(); + PyMethod method = ((PyMethod) vmType.getMethodsByName("__init__").getFirst()); String file = method.getFile(); int endLineNo = method.getEndLineNo(); if (!breakpoints.containsKey(file)) { @@ -391,9 +381,8 @@ public void registerFieldModificationInterest(VMField f) { } private void registerFieldModificationInterest(PyMethod m) { - PyMethodRaw mr = m.getMethod(); - String file = mr.getFile(); - int startLine = mr.getStartLineNo(); + String file = m.getFile(); + int startLine = m.getStartLineNo(); if (!breakpoints.containsKey(file)) { Map breakpointTypeMap = new HashMap<>(); breakpointTypeMap.put(startLine, BreakpointType.MODIFICATION); @@ -454,12 +443,12 @@ private void handleConstructorCall(StackFrame currentFrame, String fullyQualifie PyType pyType = typeMapping.get(fullyQualifiedClassName); - PyObjectRaw pyObjectRaw = new PyObjectRaw(debugpyClient.getSelfId(currentFrame.getID())); - pyObjectRaw.setRawType(pyType.getRawType()); - PyObject pyObject = new PyObject(this, pyObjectRaw, pyType); + List instanceVars = debugpyClient.getInstanceVariables(currentFrame.getID(), fullyQualifiedClassName); + pyType.setFields(instanceVars); - List instanceVars = debugpyClient.getInstanceVariables(currentFrame.getID()); - pyType.getRawType().setFields(instanceVars); + PyObject pyObject = new PyObject(this, + debugpyClient.getSelfId(currentFrame.getID()), + pyType); controller.onNewVMObject(pyObject); } @@ -475,7 +464,7 @@ private void handleMethodCall(StackFrame stackFrame, String fullyQualifiedClassN PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); List argValues = new ArrayList<>(); - for (String argName : pyMethod.getMethod().getArgumentNames()) { + for (String argName : pyMethod.getArgumentNames()) { DAPValue argDAPValue = debugpyClient.getMethodArgDAPValue(stackFrame.getID(), argName); argValues.add(getUSEValue(argDAPValue)); } @@ -505,7 +494,7 @@ private void handleAttributeModification(StackFrame stackFrame, String qualified // TODO FIX assert only one arg List argValues = new ArrayList<>(); - for (String argName : m.getMethod().getArgumentNames()) { + for (String argName : m.getArgumentNames()) { DAPValue argDAPValue = debugpyClient.getMethodArgDAPValue(stackFrame.getID(), argName); argValues.add(getUSEValue(argDAPValue)); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyBase.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyBase.java deleted file mode 100644 index 5998f24..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyBase.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.tzi.use.monitor.plugins.monitor.vm.mm.python; - -import org.tzi.use.monitor.adapter.python.PythonAdapter; - -public abstract class PyBase { - - protected PythonAdapter adapter; - - public PyBase(PythonAdapter adapter) { - this.adapter = adapter; - } - - protected PythonAdapter getAdapter() { - return this.adapter; - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index dc73e23..bafdc6a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -5,28 +5,32 @@ import org.tzi.use.uml.mm.MAssociationEnd; import org.tzi.use.uml.mm.MAttribute; -public class PyField extends PyBase implements VMField { +public class PyField implements VMField { - private final PyFieldRaw pyFieldRaw; + private final String id; private final String className; + private final String fieldName; + private final PythonAdapter adapter; + private String type; private MAttribute useAttribute; private MAssociationEnd useAssociationEnd; - public PyField(PythonAdapter adapter, PyFieldRaw pyFieldRaw, String className) { - super(adapter); - this.pyFieldRaw = pyFieldRaw; + public PyField(PythonAdapter adapter, String fieldName, String className) { + this.adapter = adapter; + this.fieldName = fieldName; this.className = className; + this.id = String.format("%s:%s", fieldName, className); } @Override public String getName() { - return pyFieldRaw.getName(); + return fieldName; } @Override public void setUSEAttribute(MAttribute attr) { - this.useAttribute = attr; + useAttribute = attr; } @Override @@ -46,18 +50,28 @@ public MAssociationEnd getUSEAssociationEnd() { @Override public Object getId() { - return className + ":" + getName(); + return id; } - public PyFieldRaw getPyFieldRaw() { - return pyFieldRaw; + public String getClassName() { + return className; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; } @Override public String toString() { return "PyField{" + - "pyFieldRaw=" + pyFieldRaw + + "id='" + id + '\'' + ", className='" + className + '\'' + + ", fieldName='" + fieldName + '\'' + + ", type='" + type + '\'' + ", useAttribute=" + useAttribute + ", useAssociationEnd=" + useAssociationEnd + '}'; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java deleted file mode 100644 index 0fdd530..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyFieldRaw.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.tzi.use.monitor.plugins.monitor.vm.mm.python; - -public class PyFieldRaw { - private String name; - private String type; - - public PyFieldRaw(String name, String type) { - this.name = name; - this.type = type; - } - - public String getName() { - return name; - } - - public String getType() { - return type; - } - - public void setName(String name) { - this.name = name; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public String toString() { - return "PyFieldRaw{" + - "name='" + name + '\'' + - ", type='" + type + '\'' + - '}'; - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java index e000e12..cb4e598 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java @@ -8,30 +8,42 @@ import java.util.ArrayList; import java.util.List; -public class PyMethod extends PyBase implements VMMethod { +public class PyMethod implements VMMethod { - private final PyMethodRaw method; + private final String id; + private final String name; + private final String className; + private final PythonAdapter adapter; + + private List argumentNames; + private List argumentTypes; + private String file; + private int startLineNo; + private int endLineNo; + private List returnLines; private MOperation useOperation; - public PyMethod(PythonAdapter adapter, PyMethodRaw method) { - super(adapter); - this.method = method; + public PyMethod(PythonAdapter adapter, String methodName, String className) { + this.adapter = adapter; + this.id = String.format("%s:%s", className, methodName); + this.name = methodName; + this.className = className; } @Override public Object getId() { - return method.getClassName() + ":" + method.getName(); + return id; } @Override public String getName() { - return method.getName(); + return name; } @Override public List getArgumentTypes() { List types = new ArrayList<>(); - for (String typeName : method.getArgumentTypeNames()) { + for (String typeName : argumentTypes) { types.add(adapter.getVMType(typeName)); } return types; @@ -47,16 +59,68 @@ public void setUSEOperation(MOperation useOperation) { this.useOperation = useOperation; } - public PyMethodRaw getMethod() { - return method; + public String getClassName() { + return className; + } + + public List getArgumentNames() { + return argumentNames; + } + + public void setArgumentNames(List argumentNames) { + this.argumentNames = argumentNames; + } + + public void setArgumentTypes(List argumentTypes) { + this.argumentTypes = argumentTypes; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + public int getStartLineNo() { + return startLineNo; + } + + public void setStartLineNo(int startLineNo) { + this.startLineNo = startLineNo; + } + + public int getEndLineNo() { + return endLineNo; + } + + public void setEndLineNo(int endLineNo) { + this.endLineNo = endLineNo; + } + + public List getReturnLines() { + return returnLines; + } + + public void setReturnLines(List returnLines) { + this.returnLines = returnLines; } @Override public String toString() { return "PyMethod{" + - "method=" + method + + "id='" + id + '\'' + + ", name='" + name + '\'' + + ", className='" + className + '\'' + + ", argumentNames=" + argumentNames + + ", argumentTypes=" + argumentTypes + + ", file='" + file + '\'' + + ", startLineNo=" + startLineNo + + ", endLineNo=" + endLineNo + + ", returnLines=" + returnLines + ", useOperation=" + useOperation + - ", id=" + getId() + '}'; } + } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java index 5d1993f..6fdb865 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java @@ -9,14 +9,15 @@ import java.util.List; -public class PyMethodCall extends PyBase implements VMMethodCall { +public class PyMethodCall implements VMMethodCall { private final PyMethod pyMethod; private final PyObject pyObject; private final List argVals; + private final PythonAdapter adapter; public PyMethodCall(PythonAdapter adapter, PyMethod pyMethod, PyObject pyObject, List argVals) { - super(adapter); + this.adapter = adapter; this.pyMethod = pyMethod; this.pyObject = pyObject; this.argVals = argVals; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java deleted file mode 100644 index 9da3113..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodRaw.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.tzi.use.monitor.plugins.monitor.vm.mm.python; - -import java.util.ArrayList; -import java.util.List; - -public class PyMethodRaw { - - private String name; - private List argumentTypeNames = new ArrayList<>(); - private List argumentNames; - private int startLineNo; - private int endLineNo; - private String file; - private List returnLines; - private String className; - - public String getClassName() { - return className; - } - - public void setClassName(String className) { - this.className = className; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getArgumentTypeNames() { - return argumentTypeNames; - } - - public void setArgumentTypeNames(List argumentTypeNames) { - this.argumentTypeNames = argumentTypeNames; - } - - public List getArgumentNames() { - return argumentNames; - } - - public void setArgumentNames(List argumentNames) { - this.argumentNames = argumentNames; - } - - public int getStartLineNo() { - return startLineNo; - } - - public void setStartLineNo(int startLineNo) { - this.startLineNo = startLineNo; - } - - public int getEndLineNo() { - return endLineNo; - } - - public void setEndLineNo(int endLineNo) { - this.endLineNo = endLineNo; - } - - public String getFile() { - return file; - } - - public void setFile(String file) { - this.file = file; - } - - public List getReturnLines() { - return returnLines; - } - - public void setReturnLines(List returnLines) { - this.returnLines = returnLines; - } - - @Override - public String toString() { - return "PyMethodRaw{" + - "name='" + name + '\'' + - ", argumentTypeNames=" + argumentTypeNames + - ", argumentNames=" + argumentNames + - ", startLineNo=" + startLineNo + - ", endLineNo=" + endLineNo + - ", file='" + file + '\'' + - ", returnLines=" + returnLines + - ", className='" + className + '\'' + - '}'; - } - -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java index 74706ea..5b09fbf 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -8,22 +8,23 @@ import org.tzi.use.uml.ocl.value.Value; import org.tzi.use.uml.sys.MObject; -public class PyObject extends PyBase implements VMObject { +public class PyObject implements VMObject { - private final PyObjectRaw rawObject; + private final long id; private final VMType type; + private final PythonAdapter adapter; private MObject useObject; - public PyObject(PythonAdapter adapter, PyObjectRaw rawObject, PyType type) { - super(adapter); - this.rawObject = rawObject; + public PyObject(PythonAdapter adapter, long id, PyType type) { + this.adapter = adapter; this.type = type; + this.id = id; } @Override public Object getId() { - return rawObject.getId(); + return id; } @Override @@ -55,7 +56,7 @@ public Value getValue(VMField field) { @Override public String toString() { return "PyObject{" + - "rawObject=" + rawObject + + "id=" + id + ", type=" + type + ", useObject=" + useObject + '}'; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java deleted file mode 100644 index 5f19510..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObjectRaw.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.tzi.use.monitor.plugins.monitor.vm.mm.python; - -public class PyObjectRaw { - private final Long id; - private PyTypeRaw rawType; - - public PyObjectRaw(Long id) { - this.id = id; - } - - public PyTypeRaw getRawType() { - return rawType; - } - - public void setRawType(PyTypeRaw rawType) { - this.rawType = rawType; - } - - public Long getId() { - return id; - } - - @Override - public String toString() { - return "PyObjectRaw{" + - "id=" + id + - ", rawType=" + rawType + - '}'; - } -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index b80de5a..39b9981 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -7,27 +7,26 @@ import org.tzi.use.plugins.monitor.vm.mm.VMType; import org.tzi.use.uml.mm.MClass; -import java.util.List; -import java.util.Optional; -import java.util.Set; +import java.util.*; -public class PyType extends PyBase implements VMType { +public class PyType implements VMType { - private final PyTypeRaw rawType; - private MClass useClass; + private final String typeName; + private final PythonAdapter adapter; - public PyType(PythonAdapter adapter, PyTypeRaw rawType) { - super(adapter); - this.rawType = rawType; - } + private List fields = new ArrayList<>(); + private List methods; + private String file; + private MClass useClass; - public PyTypeRaw getRawType() { - return rawType; + public PyType(PythonAdapter adapter, String typeName) { + this.adapter = adapter; + this.typeName = typeName; } @Override public String getName() { - return rawType.getName(); + return typeName; } @Override @@ -52,10 +51,11 @@ public Set getInstances() { @Override public List getMethodsByName(String methodName) { - Optional methodOpt = rawType.getMethods().stream() + Optional methodOpt = methods.stream() .filter(m -> m.getName().equals(methodName)) + .map(m -> (VMMethod) m) .findAny(); - return methodOpt.>map(pyMethodRaw -> List.of(new PyMethod(getAdapter(), pyMethodRaw))).orElseGet(List::of); + return methodOpt.map(Collections::singletonList).orElseGet(List::of); } @Override @@ -71,19 +71,47 @@ public void setUSEClass(MClass cls) { @Override public VMField getFieldByName(String javaFieldName) { System.out.println("Getting field by name: " + javaFieldName + " for type: " + getName()); - PyFieldRaw f = rawType.getFields().stream() + PyField f = fields.stream() .filter(fi -> fi.getName().equals(javaFieldName)) .findFirst() .orElse(null); System.out.println("Got field by name: " + javaFieldName + " = " + f); - return f != null ? new PyField(adapter, f, getName()) : null; + return f; + } + + public List getMethods() { + return methods; + } + + public void setMethods(List methods) { + this.methods = methods; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; } @Override public String toString() { return "PyType{" + - "rawType=" + rawType + + "typeName='" + typeName + '\'' + + ", fields=" + fields + + ", methods=" + methods + + ", file='" + file + '\'' + ", useClass=" + useClass + '}'; } + } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java deleted file mode 100644 index d1f3e32..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyTypeRaw.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.tzi.use.monitor.plugins.monitor.vm.mm.python; - -import java.util.ArrayList; -import java.util.List; - -public class PyTypeRaw { - private String name; - private List fields = new ArrayList<>(); - private List methods = new ArrayList<>(); - private boolean isPrimitive; - private String file; - - public PyTypeRaw(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getFields() { - return fields; - } - - public void setFields(List fields) { - this.fields = fields; - } - - public List getMethods() { - return methods; - } - - public void setMethods(List methods) { - this.methods = methods; - } - - public boolean isPrimitive() { - return isPrimitive; - } - - public void setPrimitive(boolean primitive) { - isPrimitive = primitive; - } - - public String getFile() { - return file; - } - - public void setFile(String file) { - this.file = file; - } - - @Override - public String toString() { - return "PyTypeRaw{" + - "name='" + name + '\'' + - ", fields=" + fields + - ", methods=" + methods + - ", isPrimitive=" + isPrimitive + - ", file='" + file + '\'' + - '}'; - } -} From 5a8dc4b2c48b61451d821d7074e483334fb2d45d Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 19 Aug 2025 03:00:00 +0200 Subject: [PATCH 36/57] Refactor adapter and debugpy client --- .../monitor/adapter/python/DebugpyClient.java | 376 +++++++++++++++-- .../monitor/adapter/python/PythonAdapter.java | 382 +----------------- .../monitor/vm/mm/python/PyObject.java | 4 +- 3 files changed, 361 insertions(+), 401 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index fb9774e..952959d 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -7,7 +7,14 @@ import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.adapter.python.dap.Thread; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; +import org.tzi.use.plugins.monitor.Monitor; +import org.tzi.use.plugins.monitor.vm.mm.VMMethod; import org.tzi.use.plugins.monitor.vm.mm.VMObject; +import org.tzi.use.plugins.monitor.vm.mm.VMType; +import org.tzi.use.uml.ocl.type.TupleType; +import org.tzi.use.uml.ocl.type.Type; +import org.tzi.use.uml.ocl.type.TypeFactory; +import org.tzi.use.uml.ocl.value.*; import java.io.*; import java.net.Socket; @@ -15,6 +22,7 @@ import java.nio.file.Paths; import java.util.*; import java.util.concurrent.*; +import java.util.logging.Level; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -22,9 +30,7 @@ * @author Sergio Jimenez */ public class DebugpyClient { - private static final Pattern SIGNATURE_PATTERN = Pattern.compile("^(\\w+)\\((.*?)\\)\\s*->\\s*.*$"); - private static final Pattern TYPE_CLASS_PATTERN = Pattern.compile("\"(\\w+)\":\\s*\"(\\w+)\""); - private static final Pattern JSON_STRINGIFY_PATTERN = Pattern.compile("(:\\s*)([^\"{},\\s][^,}]*)"); + private static final Pattern MEMORY_ADDR_PATTERN = Pattern.compile("0x[0-9a-fA-F]+"); private static int REQUEST_COUNTER = 1; @@ -41,14 +47,27 @@ public class DebugpyClient { private final String host; private final int port; private final PythonAdapter adapter; - - DebugpyClient(String host, int port, String workspace, PythonAdapter adapter) throws IOException { + private boolean isConnected; + private Map> breakpoints; + private java.lang.Thread breakpointWatcher; + public Map typeMapping; + private Map fileToClassNameMap; + private Monitor.Controller controller; + + DebugpyClient(String host, int port, String workspace, + PythonAdapter adapter, Monitor.Controller controller) throws IOException { this.socket = new Socket(host, port); this.in = new BufferedReader(new InputStreamReader(socket.getInputStream())); this.out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); this.workspace = workspace; this.host = host; this.port = port; + this.controller = controller; + + typeMapping = new HashMap<>(); + breakpoints = new HashMap<>(); + fileToClassNameMap = new HashMap<>(); + this.adapter = adapter; startReaderThread(); } @@ -111,10 +130,17 @@ boolean attach() { throw new RuntimeException(e); } running = true; + breakpointWatcher = new java.lang.Thread(new EventHandler(), "EventManager"); + breakpointWatcher.start(); + isConnected = true; return initResp.getSuccess(); } PyType getVMType(String qualifiedClassName) { + if (typeMapping.containsKey(qualifiedClassName)) { + return typeMapping.get(qualifiedClassName); + } + if (!qualifiedClassName.contains(".")) { return new PyType(adapter, "Mock"); } @@ -197,6 +223,9 @@ PyType getVMType(String qualifiedClassName) { System.out.println("SETTING FILE TO: " + normalizedPath); pyType.setFile(normalizedPath); + fileToClassNameMap.put(pyType.getFile(), qualifiedClassName); + typeMapping.put(qualifiedClassName, pyType); + controller.storeVMType(qualifiedClassName, pyType); return pyType; } @@ -310,6 +339,7 @@ protected boolean stop() { stopReq.setSeq(REQUEST_COUNTER++); stopReq.setArguments(stopArgs); var stopResp = (DisconnectResponseClass) sendRequest(stopReq); + isConnected = false; return stopResp.getSuccess(); } @@ -355,6 +385,7 @@ protected Thread[] getThreads() { } protected Set getInstances(PyType pyType) { + pyType = typeMapping.get(pyType.getName()); pause(); var evalArgs = new EvaluateRequestArguments(); @@ -389,25 +420,6 @@ public Variable[] getDAPChildren(long variablesReference) { return varResp.getBody().getVariables(); } - private String stringifyJsonEntries(String json) { - Matcher m = JSON_STRINGIFY_PATTERN.matcher(json); - StringBuilder sb = new StringBuilder(); - while (m.find()) { - String value = m.group(2).trim(); - if (!(value.startsWith("\"") && value.endsWith("\""))) { - m.appendReplacement(sb, m.group(1) + "\"" + value + "\""); - } else { - m.appendReplacement(sb, m.group()); - } - } - m.appendTail(sb); - return sb.toString(); - } - - private void getStackStrace() { - - } - protected Long getSelfId(long frameId) { var evalArgs = new EvaluateRequestArguments(); evalArgs.setFrameID(frameId); @@ -511,17 +523,16 @@ private void startReaderThread() { // System.out.println("Ignored async message: " + json); //} } - if (msg instanceof DAPEvent) { - System.out.println("Event instance: " + msg); - if (msg instanceof InitializedEventClass) { - initEvent.complete((DAPEvent) msg); + if (msg instanceof DAPEvent dapEvent) { + if (dapEvent instanceof InitializedEventClass initializedEvent) { + initEvent.complete(initializedEvent); } - if (msg instanceof StoppedEventClass) { - if (((StoppedEventClass) msg).getBody().getReason().equals("breakpoint")) { + if (msg instanceof StoppedEventClass stopEvent) { + if (stopEvent.getBody().getReason().equals("breakpoint")) { running = false; - eventQueue.add((DAPEvent) msg); + eventQueue.add(stopEvent); } else { - stoppedEvent.complete((DAPEvent) msg); + stoppedEvent.complete(stopEvent); } } } @@ -534,4 +545,305 @@ private void startReaderThread() { readerThread.start(); } + public Value getUSEValue(DAPValue dapValue) { + if (dapValue == null) { + return UndefinedValue.instance; + } + + System.out.println("Getting DAPValue for type: " + dapValue.getType()); + + return switch (dapValue.getType()) { + case "int" -> IntegerValue.valueOf(Integer.parseInt(dapValue.getResult())); + case "float" -> new RealValue(Double.parseDouble(dapValue.getResult())); + case "bool" -> BooleanValue.get(Boolean.parseBoolean(dapValue.getResult())); + case "str" -> new StringValue(dapValue.getResult()); + case "list"-> { + List allChildren = fetchChildren(dapValue.getVariablesReference()); + + List items = allChildren.stream() + .filter(child -> child.getName().matches("\\d+")) + .sorted(Comparator.comparingInt(child -> Integer.parseInt(child.getName()))) + .toList(); + + Value[] sequence = new Value[items.size()]; + for (int i = 0; i < items.size(); i++) { + sequence[i] = getUSEValue(items.get(i)); + } + yield new SequenceValue(TypeFactory.mkVoidType(), sequence); + } + case "tuple" -> { + List allChildren = fetchChildren(dapValue.getVariablesReference()); + + List items = allChildren.stream() + .filter(child -> child.getName().matches("\\d+")) + .sorted(Comparator.comparingInt(child -> Integer.parseInt(child.getName()))) + .toList(); + + TupleType.Part[] typeParts = new TupleType.Part[items.size()]; + List valueParts = new ArrayList<>(); + + for (int i = 0; i < items.size(); i++) { + DAPValue item = items.get(i); + String name = "item" + i; + + Value value = getUSEValue(item); + Type type = value.type(); + + typeParts[i] = new TupleType.Part(i, name, type); + valueParts.add(new TupleValue.Part(i, name, value)); + } + + TupleType tupleType = TypeFactory.mkTuple(typeParts); + yield new TupleValue(tupleType, valueParts); + } + // TODO FIXME: custom debugpy call for type resolution of keys and values separately needed + case "dict" -> { + List dictEntries = fetchChildren(dapValue.getVariablesReference()); + + TupleType.Part[] p = new TupleType.Part[] { + new TupleType.Part(0, "key", TypeFactory.mkVoidType()), + new TupleType.Part(1, "value", TypeFactory.mkVoidType()) + }; + TupleType tupleType = TypeFactory.mkTuple(p); + + List tupleValues = new ArrayList<>(); + + for (DAPValue entry : dictEntries) { + if (entry.getVariablesReference() == 0) continue; // skip non-expandable entries + + List keyValueChildren = fetchChildren(entry.getVariablesReference()); + + DAPValue keyDap = keyValueChildren.stream() + .filter(child -> "key".equals(child.getName())) + .findFirst() + .orElse(null); + + DAPValue valueDap = keyValueChildren.stream() + .filter(child -> "value".equals(child.getName())) + .findFirst() + .orElse(null); + + if (keyDap != null && valueDap != null) { + Value useKey = getUSEValue(keyDap); + Value useValue = getUSEValue(valueDap); + + List parts = List.of( + new TupleValue.Part(0, "key", useKey), + new TupleValue.Part(1, "value", useValue) + ); + + tupleValues.add(new TupleValue(tupleType, parts)); + } + } + + yield new SetValue(TypeFactory.mkVoidType(), tupleValues); + } + case "set" -> { + List allChildren = fetchChildren(dapValue.getVariablesReference()); + + var items = allChildren.stream() + .filter(child -> child.getName().matches("\\d+")) + .toList(); + + List useValues = new ArrayList<>(); + + for (DAPValue item : items) { + Value v = getUSEValue(item); + useValues.add(v); + } + + yield new SetValue(TypeFactory.mkVoidType(), useValues); + } + + default -> { + // Object + if (dapValue.getResult().contains("object")) { + long objId = extractHexAndConvertToDecimal(dapValue.getResult()); + if (controller.existsVMObject(objId)) { + System.out.println("Found obj for USE value with id: " + objId); + VMObject obj = controller.getVMObject(objId); + yield new ObjectValue(obj.getUSEObject().cls(), obj.getUSEObject()); + } + } + // Unknown + System.out.println("Unknown case for dapValue type: " + dapValue.getType()); + yield UndefinedValue.instance; + } + }; + } + + private long extractHexAndConvertToDecimal(String input) { + Matcher matcher = MEMORY_ADDR_PATTERN.matcher(input); + if (matcher.find()) { + String hexString = matcher.group(); + return Long.parseLong(hexString.substring(2), 16); + } + return 0; + } + + private List fetchChildren(long variablesReference) { + List res = new ArrayList<>(); + Variable[] vars = getDAPChildren(variablesReference); + for (Variable var : vars) { + var dapVal = new DAPValue(var.getValue(), var.getType(), var.getVariablesReference()); + dapVal.setName(var.getName()); + res.add(dapVal); + } + return res; + } + + public void registerOperationCallInterest(VMMethod m) { + if (!m.getName().equals("__init__")) { + PyMethod method = (PyMethod) m; + String file = method.getFile(); + int startLine = method.getStartLineNo(); + List returnLines = method.getReturnLines(); + if (!breakpoints.containsKey(file)) { + Map breakpointTypes = new HashMap<>(); + breakpointTypes.put(startLine, BreakpointType.METHOD_CALL); + for (Integer returnLine : returnLines) { + breakpointTypes.put(returnLine, BreakpointType.METHOD_EXIT); + } + breakpoints.put(file, breakpointTypes); + } else { + Map lineBreakpointTypes = breakpoints.get(file); + lineBreakpointTypes.put(startLine, BreakpointType.METHOD_CALL); + for (Integer returnLine : returnLines) { + lineBreakpointTypes.put(returnLine, BreakpointType.METHOD_EXIT); + } + } + setBreakpoints(file, breakpoints.get(file).keySet()); + } + if (m.getName().startsWith("set_")) { + registerFieldModificationInterest((PyMethod) m); + } + } + + public void registerConstructorCallInterest(VMType vmType) { + PyMethod method = ((PyMethod) vmType.getMethodsByName("__init__").getFirst()); + String file = method.getFile(); + int endLineNo = method.getEndLineNo(); + if (!breakpoints.containsKey(file)) { + Map breakpointTypeMap = new HashMap<>(); + breakpointTypeMap.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); + breakpoints.put(file, breakpointTypeMap); + } else { + Map currBps = breakpoints.get(file); + currBps.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); + } + setBreakpoints(file, breakpoints.get(file).keySet()); + } + + private void registerFieldModificationInterest(PyMethod m) { + String file = m.getFile(); + int startLine = m.getStartLineNo(); + if (!breakpoints.containsKey(file)) { + Map breakpointTypeMap = new HashMap<>(); + breakpointTypeMap.put(startLine, BreakpointType.MODIFICATION); + breakpoints.put(file, breakpointTypeMap); + } else { + Map currBps = breakpoints.get(file); + currBps.put(startLine, BreakpointType.MODIFICATION); + } + setBreakpoints(file, breakpoints.get(file).keySet()); + } + + private class EventHandler implements Runnable { + @Override + public void run() { + while (isConnected) { + try { + DAPEvent event = eventQueue.take(); + if (!isConnected) { + return; + } + switch (event) { + case StoppedEventClass stopEvent -> { + StackFrame currFrame = getCurrentFrame(Math.toIntExact(stopEvent.getBody().getThreadID())); + String file = currFrame.getSource().getPath(); + String qualifiedClassName = fileToClassNameMap.get(file); + + BreakpointType breakpointType = breakpoints.get(file).get((int) currFrame.getLine()); + switch (breakpointType) { + case CONSTRUCTOR_CALL -> onConstructorCall(currFrame, qualifiedClassName); + case METHOD_CALL -> onMethodCall(currFrame, qualifiedClassName); + case METHOD_EXIT -> onMethodExit(currFrame, qualifiedClassName); + case MODIFICATION -> onAttrMod(currFrame, qualifiedClassName); + } + // Match monitor running state + resume(); + } + default -> controller.newLogMessage(this, Level.WARNING, "Unknown event!"); + } + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + } + } + + private void onConstructorCall(StackFrame currentFrame, String fullyQualifiedClassName) { + controller.newLogMessage(this, Level.FINE, "onConstructorCall: " + fullyQualifiedClassName + "." + currentFrame.getName()); + + PyType pyType = typeMapping.get(fullyQualifiedClassName); + + List instanceVars = getInstanceVariables(currentFrame.getID(), fullyQualifiedClassName); + pyType.setFields(instanceVars); + + PyObject pyObject = new PyObject(adapter, + getSelfId(currentFrame.getID()), + pyType); + + controller.onNewVMObject(pyObject); + } + + private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) { + controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); + + PyType pyType = typeMapping.get(fullyQualifiedClassName); + String methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); + + Long pyObjId = getSelfId(stackFrame.getID()); + PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); + + List argValues = new ArrayList<>(); + for (String argName : pyMethod.getArgumentNames()) { + DAPValue argDAPValue = getMethodArgDAPValue(stackFrame.getID(), argName); + argValues.add(getUSEValue(argDAPValue)); + } + + PyMethodCall pyMethodCall = new PyMethodCall(adapter, pyMethod, pyObject, argValues); + + controller.onMethodCall(pyMethodCall); + } + + private void onMethodExit(StackFrame stackFrame, String qualifiedClassName) { + PyType pyType = typeMapping.get(qualifiedClassName); + PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()).getFirst(); + // TODO construct method call with runtime values + controller.onMethodExit(pyMethod, pyMethod.getId()); + } + + private void onAttrMod(StackFrame stackFrame, String qualifiedClassName) { + controller.newLogMessage(this, Level.FINE, "onAttributeModification: " + qualifiedClassName + "." + stackFrame.getName()); + + Long pyObjId = getSelfId(stackFrame.getID()); + PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); + + PyField pyField = (PyField) pyObject.getType().getFieldByName(stackFrame.getName().replace("set_", "")); + + String methodId = (String) pyObject.getType().getMethodsByName(stackFrame.getName()).getFirst().getId(); + PyMethod m = (PyMethod) controller.getVMMethod(methodId); + + // TODO FIX assert only one arg + List argValues = new ArrayList<>(); + for (String argName : m.getArgumentNames()) { + DAPValue argDAPValue = getMethodArgDAPValue(stackFrame.getID(), argName); + argValues.add(getUSEValue(argDAPValue)); + } + + controller.onUpdateAttribute(pyObjId, pyField.getId(), argValues.get(0)); + } + } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index c459798..8d90b7b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -8,18 +8,12 @@ import org.tzi.use.plugins.monitor.vm.adapter.InvalidAdapterConfiguration; import org.tzi.use.plugins.monitor.vm.adapter.VMAdapterSetting; import org.tzi.use.plugins.monitor.vm.mm.*; -import org.tzi.use.uml.ocl.type.TupleType; -import org.tzi.use.uml.ocl.type.Type; -import org.tzi.use.uml.ocl.type.TypeFactory; import org.tzi.use.uml.ocl.value.*; -import java.lang.Thread; import java.nio.file.Files; import java.nio.file.Path; import java.util.*; import java.util.logging.Level; -import java.util.regex.Matcher; -import java.util.regex.Pattern; /** * @author Sergio Jimenez @@ -30,26 +24,22 @@ public class PythonAdapter extends AbstractVMAdapter { private static final int SETTING_PORT_IDX = 1; private static final int SETTING_WORKSPACE_IDX = 2; - private static final Pattern MEMORY_ADDR_PATTERN = Pattern.compile("0x[0-9a-fA-F]+"); - private String host; private int port; private String workspace; - private boolean isConnected; private DebugpyClient debugpyClient; - public Map typeMapping; - private Map> breakpoints; - private Thread breakpointWatcher; - private Map fileToClassNameMap; - public Set readInstances(PyType type) { - PyType pyType = typeMapping.get(type.getName()); + public Set readInstances(PyType pyType) { return debugpyClient.getInstances(pyType); } + public Value getUSEValue(long objId, String fName) { + DAPValue dapValue = debugpyClient.getDAPValue(objId, fName); + return debugpyClient.getUSEValue(dapValue); + } + @Override protected void validateSettings() throws InvalidAdapterConfiguration { - System.out.println("Validating PythonAdapter settings..."); List settings = getSettings(); String settingHostVal = settings.get(SETTING_HOST_IDX).value; @@ -80,7 +70,6 @@ protected void validateSettings() throws InvalidAdapterConfiguration { @Override protected void createSettings(List settings) { - System.out.println("Creating Python adapter settings..."); settings.add(SETTING_HOST_IDX, new VMAdapterSetting("Host", "localhost")); settings.add(SETTING_PORT_IDX, new VMAdapterSetting("Port", "5678")); settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("SUM root dir", "/home/serj/git/uni/dpy-server")); @@ -88,218 +77,37 @@ protected void createSettings(List settings) { @Override public void attachToVM() throws MonitorException { - System.out.println("Connecting to debugpy server..."); - - typeMapping = new HashMap<>(); - breakpoints = new HashMap<>(); - fileToClassNameMap = new HashMap<>(); - + String errMsg = "Failed to attach to debugpy server!"; try { - debugpyClient = new DebugpyClient(host, port, workspace, this); + debugpyClient = new DebugpyClient(host, port, workspace, this, controller); + if (!debugpyClient.attach()) { + controller.newLogMessage(this, Level.SEVERE, errMsg); + } } catch (Exception e) { - throw new MonitorException("Failed to create socket!", e); - } - - System.out.println("Debugpy socket created!"); - - if (debugpyClient.attach()) { - isConnected = true; - breakpointWatcher = new Thread(new BreakpointWatcher(), "PythonAdapter breakpoint watcher"); - breakpointWatcher.start(); - System.out.println("Connected to debugpy server!"); - } else { - System.out.println("Failed to attach to debugpy server!"); + throw new MonitorException(errMsg, e); } } @Override public void resume() { - System.out.println("Resuming debugpy server..."); debugpyClient.resume(); - System.out.println("Resumed debugpy server..."); } @Override public void suspend() { - System.out.println("Suspending debugpy server..."); debugpyClient.pause(); } @Override public void stop() { - System.out.println("Stopping debugpy server..."); debugpyClient.stop(); - isConnected = false; } @Override - public VMType getVMType(String name) { - System.out.println("Getting VMType '" + name + "'..."); - if (typeMapping.containsKey(name)) { - return typeMapping.get(name); - } - PyType pyType = debugpyClient.getVMType(name); - fileToClassNameMap.put(pyType.getFile(), name); - typeMapping.put(name, pyType); - controller.storeVMType(name, pyType); - System.out.println("fileToClassNameMap: " + fileToClassNameMap); - return pyType; - } - - public DAPValue getDAPValue(Long objId, String fName) { - return debugpyClient.getDAPValue(objId, fName); - } - - - public Value getUSEValue(DAPValue dapValue) { - if (dapValue == null) { - return UndefinedValue.instance; - } - - System.out.println("Getting DAPValue for type: " + dapValue.getType()); - - return switch (dapValue.getType()) { - case "int" -> IntegerValue.valueOf(Integer.parseInt(dapValue.getResult())); - case "float" -> new RealValue(Double.parseDouble(dapValue.getResult())); - case "bool" -> BooleanValue.get(Boolean.parseBoolean(dapValue.getResult())); - case "str" -> new StringValue(dapValue.getResult()); - case "list"-> { - List allChildren = fetchChildren(dapValue.getVariablesReference()); - - List items = allChildren.stream() - .filter(child -> child.getName().matches("\\d+")) - .sorted(Comparator.comparingInt(child -> Integer.parseInt(child.getName()))) - .toList(); - - Value[] sequence = new Value[items.size()]; - for (int i = 0; i < items.size(); i++) { - sequence[i] = getUSEValue(items.get(i)); - } - yield new SequenceValue(TypeFactory.mkVoidType(), sequence); - } - case "tuple" -> { - List allChildren = fetchChildren(dapValue.getVariablesReference()); - - List items = allChildren.stream() - .filter(child -> child.getName().matches("\\d+")) - .sorted(Comparator.comparingInt(child -> Integer.parseInt(child.getName()))) - .toList(); - - TupleType.Part[] typeParts = new TupleType.Part[items.size()]; - List valueParts = new ArrayList<>(); - - for (int i = 0; i < items.size(); i++) { - DAPValue item = items.get(i); - String name = "item" + i; - - Value value = getUSEValue(item); - Type type = value.type(); - - typeParts[i] = new TupleType.Part(i, name, type); - valueParts.add(new TupleValue.Part(i, name, value)); - } - - TupleType tupleType = TypeFactory.mkTuple(typeParts); - yield new TupleValue(tupleType, valueParts); - } - // TODO FIXME: custom debugpy call for type resolution of keys and values separately needed - case "dict" -> { - List dictEntries = fetchChildren(dapValue.getVariablesReference()); - - TupleType.Part[] p = new TupleType.Part[] { - new TupleType.Part(0, "key", TypeFactory.mkVoidType()), - new TupleType.Part(1, "value", TypeFactory.mkVoidType()) - }; - TupleType tupleType = TypeFactory.mkTuple(p); - - List tupleValues = new ArrayList<>(); - - for (DAPValue entry : dictEntries) { - if (entry.getVariablesReference() == 0) continue; // skip non-expandable entries - - List keyValueChildren = fetchChildren(entry.getVariablesReference()); - - DAPValue keyDap = keyValueChildren.stream() - .filter(child -> "key".equals(child.getName())) - .findFirst() - .orElse(null); - - DAPValue valueDap = keyValueChildren.stream() - .filter(child -> "value".equals(child.getName())) - .findFirst() - .orElse(null); - - if (keyDap != null && valueDap != null) { - Value useKey = getUSEValue(keyDap); - Value useValue = getUSEValue(valueDap); - - List parts = List.of( - new TupleValue.Part(0, "key", useKey), - new TupleValue.Part(1, "value", useValue) - ); - - tupleValues.add(new TupleValue(tupleType, parts)); - } - } - - yield new SetValue(TypeFactory.mkVoidType(), tupleValues); - } - case "set" -> { - List allChildren = fetchChildren(dapValue.getVariablesReference()); - - var items = allChildren.stream() - .filter(child -> child.getName().matches("\\d+")) - .toList(); - - List useValues = new ArrayList<>(); - - for (DAPValue item : items) { - Value v = getUSEValue(item); - useValues.add(v); - } - - yield new SetValue(TypeFactory.mkVoidType(), useValues); - } - - default -> { - // Object - if (dapValue.getResult().contains("object")) { - long objId = extractHexAndConvertToDecimal(dapValue.getResult()); - if (controller.existsVMObject(objId)) { - System.out.println("Found obj for USE value with id: " + objId); - VMObject obj = controller.getVMObject(objId); - yield new ObjectValue(obj.getUSEObject().cls(), obj.getUSEObject()); - } - } - // Unknown - System.out.println("Unknown case for dapValue type: " + dapValue.getType()); - yield UndefinedValue.instance; - } - }; - } - - private long extractHexAndConvertToDecimal(String input) { - Matcher matcher = MEMORY_ADDR_PATTERN.matcher(input); - if (matcher.find()) { - String hexString = matcher.group(); - return Long.parseLong(hexString.substring(2), 16); - } - return 0; - } - - - private List fetchChildren(long variablesReference) { - List res = new ArrayList<>(); - Variable[] vars = debugpyClient.getDAPChildren(variablesReference); - for (Variable var : vars) { - var dapVal = new DAPValue(var.getValue(), var.getType(), var.getVariablesReference()); - dapVal.setName(var.getName()); - res.add(dapVal); - } - return res; + public VMType getVMType(String qualifiedClassName) { + return debugpyClient.getVMType(qualifiedClassName); } - @Override public void registerClassPrepareEvent(String javaClassName) { @@ -317,31 +125,7 @@ public boolean isVMTypeLoaded(String javaClassName) { @Override public void registerOperationCallInterest(VMMethod m) { - if (!m.getName().equals("__init__")) { - PyMethod method = (PyMethod) m; - String file = method.getFile(); - int startLine = method.getStartLineNo(); - List returnLines = method.getReturnLines(); - if (!breakpoints.containsKey(file)) { - Map breakpointTypes = new HashMap<>(); - breakpointTypes.put(startLine, BreakpointType.METHOD_CALL); - for (Integer returnLine : returnLines) { - breakpointTypes.put(returnLine, BreakpointType.METHOD_EXIT); - } - breakpoints.put(file, breakpointTypes); - } else { - Map lineBreakpointTypes = breakpoints.get(file); - lineBreakpointTypes.put(startLine, BreakpointType.METHOD_CALL); - for (Integer returnLine : returnLines) { - lineBreakpointTypes.put(returnLine, BreakpointType.METHOD_EXIT); - } - } - debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); - } - System.out.println("BREAKPOINT_MAP: " + breakpoints); - if (m.getName().startsWith("set_")) { - registerFieldModificationInterest((PyMethod) m); - } + debugpyClient.registerOperationCallInterest(m); } @Override @@ -361,147 +145,13 @@ public Value getMethodResultValue(Object adapterExitInformation) { @Override public void registerConstructorCallInterest(VMType vmType) { - PyMethod method = ((PyMethod) vmType.getMethodsByName("__init__").getFirst()); - String file = method.getFile(); - int endLineNo = method.getEndLineNo(); - if (!breakpoints.containsKey(file)) { - Map breakpointTypeMap = new HashMap<>(); - breakpointTypeMap.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); - breakpoints.put(file, breakpointTypeMap); - } else { - Map currBps = breakpoints.get(file); - currBps.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); - } - debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); - System.out.println("BREAKPOINT_MAP: " + breakpoints); + debugpyClient.registerConstructorCallInterest(vmType); } @Override public void registerFieldModificationInterest(VMField f) { } - private void registerFieldModificationInterest(PyMethod m) { - String file = m.getFile(); - int startLine = m.getStartLineNo(); - if (!breakpoints.containsKey(file)) { - Map breakpointTypeMap = new HashMap<>(); - breakpointTypeMap.put(startLine, BreakpointType.MODIFICATION); - breakpoints.put(file, breakpointTypeMap); - } else { - Map currBps = breakpoints.get(file); - currBps.put(startLine, BreakpointType.MODIFICATION); - } - debugpyClient.setBreakpoints(file, breakpoints.get(file).keySet()); - } - - - private class BreakpointWatcher implements Runnable { - - @Override - public void run() { - while (isConnected) { - try { - StoppedEventClass event = (StoppedEventClass) debugpyClient.eventQueue.take(); - if (!isConnected) { - return; - } - - // Get file and line at current frame - var currFrame = debugpyClient.getCurrentFrame(Math.toIntExact(event.getBody().getThreadID())); - System.out.println("Current Frame: " + currFrame); - - String file = currFrame.getSource().getPath(); - - // Breakpoint Type Lookup - BreakpointType bpt = breakpoints.get(file).get((int) currFrame.getLine()); - System.out.println("BreakpointType: " + bpt.name()); - - - var qualifiedClassName = fileToClassNameMap.get(file); - - if (bpt == BreakpointType.CONSTRUCTOR_CALL) { - handleConstructorCall(currFrame, qualifiedClassName); - } else if (bpt == BreakpointType.METHOD_CALL) { - handleMethodCall(currFrame, qualifiedClassName); - } else if (bpt == BreakpointType.METHOD_EXIT) { - handleMethodExit(currFrame, qualifiedClassName, event); - } else if (bpt == BreakpointType.MODIFICATION) { - handleAttributeModification(currFrame, qualifiedClassName); - } - - // Match monitor running state - debugpyClient.resume(); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - } - } - - private void handleConstructorCall(StackFrame currentFrame, String fullyQualifiedClassName) { - controller.newLogMessage(this, Level.FINE, "onConstructorCall: " + fullyQualifiedClassName + "." + currentFrame.getName()); - - PyType pyType = typeMapping.get(fullyQualifiedClassName); - - List instanceVars = debugpyClient.getInstanceVariables(currentFrame.getID(), fullyQualifiedClassName); - pyType.setFields(instanceVars); - - PyObject pyObject = new PyObject(this, - debugpyClient.getSelfId(currentFrame.getID()), - pyType); - - controller.onNewVMObject(pyObject); - } - - private void handleMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) { - controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); - - PyType pyType = typeMapping.get(fullyQualifiedClassName); - String methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); - PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); - - Long pyObjId = debugpyClient.getSelfId(stackFrame.getID()); - PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); - - List argValues = new ArrayList<>(); - for (String argName : pyMethod.getArgumentNames()) { - DAPValue argDAPValue = debugpyClient.getMethodArgDAPValue(stackFrame.getID(), argName); - argValues.add(getUSEValue(argDAPValue)); - } - - PyMethodCall pyMethodCall = new PyMethodCall(this, pyMethod, pyObject, argValues); - - controller.onMethodCall(pyMethodCall); - } - - private void handleMethodExit(StackFrame stackFrame, String qualifiedClassName, StoppedEventClass stoppedEvent) { - PyType pyType = typeMapping.get(qualifiedClassName); - PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()).getFirst(); - // TODO construct method call with runtime values - controller.onMethodExit(pyMethod, pyMethod.getId()); - } - - private void handleAttributeModification(StackFrame stackFrame, String qualifiedClassName) { - controller.newLogMessage(this, Level.FINE, "onAttributeModification: " + qualifiedClassName + "." + stackFrame.getName()); - - Long pyObjId = debugpyClient.getSelfId(stackFrame.getID()); - PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); - - PyField pyField = (PyField) pyObject.getType().getFieldByName(stackFrame.getName().replace("set_", "")); - - String methodId = (String) pyObject.getType().getMethodsByName(stackFrame.getName()).getFirst().getId(); - PyMethod m = (PyMethod) controller.getVMMethod(methodId); - - // TODO FIX assert only one arg - List argValues = new ArrayList<>(); - for (String argName : m.getArgumentNames()) { - DAPValue argDAPValue = debugpyClient.getMethodArgDAPValue(stackFrame.getID(), argName); - argValues.add(getUSEValue(argDAPValue)); - } - - controller.onUpdateAttribute(pyObjId, pyField.getId(), argValues.get(0)); - } - @Override public String toString() { return "PythonAdapter"; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java index 5b09fbf..26b3a34 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -1,7 +1,6 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; import org.tzi.use.monitor.adapter.python.PythonAdapter; -import org.tzi.use.monitor.adapter.python.custom.DAPValue; import org.tzi.use.plugins.monitor.vm.mm.VMField; import org.tzi.use.plugins.monitor.vm.mm.VMObject; import org.tzi.use.plugins.monitor.vm.mm.VMType; @@ -49,8 +48,7 @@ public void setUSEObject(MObject obj) { @Override public Value getValue(VMField field) { - DAPValue dapValue = adapter.getDAPValue((Long) getId(), field.getName()); - return adapter.getUSEValue(dapValue); + return adapter.getUSEValue(id, field.getName()); } @Override From 263bca533d40676cf7ce00779f8e2d670ab08a0b Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 19 Aug 2025 03:24:46 +0200 Subject: [PATCH 37/57] Fix redundant internal type mapping --- .../monitor/adapter/python/DebugpyClient.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 952959d..7a35b0a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -50,7 +50,6 @@ public class DebugpyClient { private boolean isConnected; private Map> breakpoints; private java.lang.Thread breakpointWatcher; - public Map typeMapping; private Map fileToClassNameMap; private Monitor.Controller controller; @@ -64,7 +63,6 @@ public class DebugpyClient { this.port = port; this.controller = controller; - typeMapping = new HashMap<>(); breakpoints = new HashMap<>(); fileToClassNameMap = new HashMap<>(); @@ -137,10 +135,6 @@ boolean attach() { } PyType getVMType(String qualifiedClassName) { - if (typeMapping.containsKey(qualifiedClassName)) { - return typeMapping.get(qualifiedClassName); - } - if (!qualifiedClassName.contains(".")) { return new PyType(adapter, "Mock"); } @@ -209,6 +203,7 @@ PyType getVMType(String qualifiedClassName) { pyMethod.setReturnLines(returnLines); methods.add(pyMethod); + controller.storeVMMethod(pyMethod.getId(), pyMethod); } pyType.setMethods(methods); } @@ -224,7 +219,6 @@ PyType getVMType(String qualifiedClassName) { pyType.setFile(normalizedPath); fileToClassNameMap.put(pyType.getFile(), qualifiedClassName); - typeMapping.put(qualifiedClassName, pyType); controller.storeVMType(qualifiedClassName, pyType); return pyType; } @@ -385,7 +379,7 @@ protected Thread[] getThreads() { } protected Set getInstances(PyType pyType) { - pyType = typeMapping.get(pyType.getName()); + controller.storeVMType(pyType.getName(), pyType); pause(); var evalArgs = new EvaluateRequestArguments(); @@ -785,7 +779,7 @@ public void run() { private void onConstructorCall(StackFrame currentFrame, String fullyQualifiedClassName) { controller.newLogMessage(this, Level.FINE, "onConstructorCall: " + fullyQualifiedClassName + "." + currentFrame.getName()); - PyType pyType = typeMapping.get(fullyQualifiedClassName); + PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); List instanceVars = getInstanceVariables(currentFrame.getID(), fullyQualifiedClassName); pyType.setFields(instanceVars); @@ -800,7 +794,7 @@ private void onConstructorCall(StackFrame currentFrame, String fullyQualifiedCla private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) { controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); - PyType pyType = typeMapping.get(fullyQualifiedClassName); + PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); String methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); @@ -819,7 +813,7 @@ private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) } private void onMethodExit(StackFrame stackFrame, String qualifiedClassName) { - PyType pyType = typeMapping.get(qualifiedClassName); + PyType pyType = (PyType) controller.getVMType(qualifiedClassName); PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()).getFirst(); // TODO construct method call with runtime values controller.onMethodExit(pyMethod, pyMethod.getId()); From dc0f98544badea82448d5ef10a19c71622664b1c Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 19 Aug 2025 15:21:21 +0200 Subject: [PATCH 38/57] Support setting fields for objs on missed constructor call --- .../monitor/adapter/python/DebugpyClient.java | 41 +++++++++++++++---- .../adapter/python/PyEvalExBuilder.java | 4 ++ 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 7a35b0a..47a54a0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -235,9 +235,20 @@ protected DAPValue getDAPValue(Long objectId, String fName) { return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); } - protected List getInstanceVariables(long currFrameId, String className) { - List rawFields = new ArrayList<>(); + protected List getInstanceVariables(long objId, long currFrameId, String className) { + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setExpression(PyEvalExBuilder.getVarsByObjId(objId)); + evalArgs.setFrameID(currFrameId); + evalArgs.setContext("watch"); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + EvaluateResponseClass evalResp = (EvaluateResponseClass) sendRequest(evalReq); + + return getFieldsFromVarsResp(evalResp, className); + } + protected List getInstanceVariables(long currFrameId, String className) { var evalArgs = new EvaluateRequestArguments(); evalArgs.setExpression(PyEvalExBuilder.getSelfVarsWithType()); evalArgs.setFrameID(currFrameId); @@ -245,9 +256,14 @@ protected List getInstanceVariables(long currFrameId, String className) var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + EvaluateResponseClass evalResp = (EvaluateResponseClass) sendRequest(evalReq); - String result = evalResp.getBody().getResult(); + return getFieldsFromVarsResp(evalResp, className); + } + + private List getFieldsFromVarsResp(EvaluateResponseClass varsResponse, String className) { + List pyFields = new ArrayList<>(); + String result = varsResponse.getBody().getResult(); if (!result.equals("''")) { String vars = result.substring(1, result.length() - 1); String[] fields = vars.split(","); @@ -257,10 +273,10 @@ protected List getInstanceVariables(long currFrameId, String className) String fieldType = fieldParts[1]; PyField pyField = new PyField(adapter, fieldName, className); pyField.setType(fieldType); - rawFields.add(pyField); + pyFields.add(pyField); } } - return rawFields; + return pyFields; } protected boolean setBreakpoints(String file, Set lines) { @@ -382,9 +398,11 @@ protected Set getInstances(PyType pyType) { controller.storeVMType(pyType.getName(), pyType); pause(); + long frameId = getCurrentFrameId(getThreadId("MainThread")); + var evalArgs = new EvaluateRequestArguments(); evalArgs.setContext("watch"); - evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); + evalArgs.setFrameID(frameId); evalArgs.setExpression(PyEvalExBuilder.getInstanceIds(pyType.getName())); var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); @@ -399,7 +417,14 @@ protected Set getInstances(PyType pyType) { } String[] ids = result.substring(1, result.length() - 1).split(","); for (String id : ids) { - objs.add(new PyObject(adapter, Long.parseLong(id.trim()), pyType)); + long objId = Long.parseLong(id.trim()); + boolean missedConstructorCallForObj = !controller.existsVMObject(objId); + if (missedConstructorCallForObj) { + List instanceVars = getInstanceVariables(objId, frameId, pyType.getName()); + pyType.setFields(instanceVars); + } + PyObject pyObject = new PyObject(adapter, objId, pyType); + objs.add(pyObject); } return objs; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 610b59b..9a8843c 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -6,6 +6,10 @@ public static String getSelfVarsWithType() { return "\",\".join([f\"{k}:{type(v).__name__}\" for k, v in vars(self).items()])\n"; } + public static String getVarsByObjId(long objId) { + return String.format("\",\".join([f\"{k}:{type(v).__name__}\" for o in __import__('gc').get_objects() if id(o)==%s for k,v in vars(o).items()])\n", objId); + } + public static String getFileForClass(String qualifiedClassName) { int lastDot = qualifiedClassName.lastIndexOf('.'); if (lastDot == -1) { From e651ac11956c469af102af8078b5e46ded0ab3d6 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 25 Aug 2025 19:33:09 +0200 Subject: [PATCH 39/57] Support default main module --- .../monitor/adapter/python/DebugpyClient.java | 11 +++- .../adapter/python/PyEvalExBuilder.java | 52 +++++++++---------- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 47a54a0..f85af9b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -135,7 +135,7 @@ boolean attach() { } PyType getVMType(String qualifiedClassName) { - if (!qualifiedClassName.contains(".")) { + if (qualifiedClassName.equals("Mock")) { return new PyType(adapter, "Mock"); } @@ -153,6 +153,11 @@ PyType getVMType(String qualifiedClassName) { evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + if (!evalResp.getSuccess()) { + controller.newLogMessage(this, Level.WARNING, String.format("Could not find type '%s' in VM...", qualifiedClassName)); + return pyType; + } + String result = evalResp.getBody().getResult(); if (!result.equals("''")) { @@ -417,6 +422,10 @@ protected Set getInstances(PyType pyType) { } String[] ids = result.substring(1, result.length() - 1).split(","); for (String id : ids) { + // TODO: Fix debugpy list truncation + if (id.trim().equals("...")) { + continue; + } long objId = Long.parseLong(id.trim()); boolean missedConstructorCallForObj = !controller.existsVMObject(objId); if (missedConstructorCallForObj) { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 9a8843c..c6c6180 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -1,6 +1,9 @@ package org.tzi.use.monitor.adapter.python; public class PyEvalExBuilder { + + private static final int MODULE_NAME_IDX = 0; + private static final int SIMPLE_CLASS_NAME_IDX = 1; public static String getSelfVarsWithType() { return "\",\".join([f\"{k}:{type(v).__name__}\" for k, v in vars(self).items()])\n"; @@ -11,16 +14,11 @@ public static String getVarsByObjId(long objId) { } public static String getFileForClass(String qualifiedClassName) { - int lastDot = qualifiedClassName.lastIndexOf('.'); - if (lastDot == -1) { - throw new IllegalArgumentException("Qualified class name must contain at least one dot."); - } - String moduleName = qualifiedClassName.substring(0, lastDot); - String className = qualifiedClassName.substring(lastDot + 1); + String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( "getattr(__import__('sys').modules.get(getattr(__import__('sys').modules['%s'], '%s').__module__), '__file__', None)", - moduleName, - className + classNameParts[MODULE_NAME_IDX], + classNameParts[SIMPLE_CLASS_NAME_IDX] ); } @@ -29,37 +27,28 @@ public static String getSelfIdAtCurrentFrame() { } public static String getInstanceIds(String qualifiedClassName) { - int lastDot = qualifiedClassName.lastIndexOf('.'); - if (lastDot == -1) { - throw new IllegalArgumentException("Qualified class name must contain at least one dot."); - } - String moduleName = qualifiedClassName.substring(0, lastDot); - String className = qualifiedClassName.substring(lastDot + 1); + String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( "[id(obj) for obj in __import__('gc').get_objects() if isinstance(obj, getattr(__import__('%s'), '%s'))]\n", - moduleName, - className + classNameParts[MODULE_NAME_IDX], + classNameParts[SIMPLE_CLASS_NAME_IDX] ); } public static String getMethodSignaturesExp(String qualifiedClassName) { - int lastDot = qualifiedClassName.lastIndexOf('.'); - String moduleName = qualifiedClassName.substring(0, lastDot); - String simpleClassName = qualifiedClassName.substring(lastDot + 1); + String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( """ ";".join([ f"{name}:{','.join([p.name for p in __import__('inspect').signature(m).parameters.values()])}" for name, m in __import__('inspect').getmembers(__import__('sys').modules['%s'].%s, __import__('inspect').isfunction) ]) - """, moduleName, simpleClassName - ); + """, classNameParts[MODULE_NAME_IDX], classNameParts[SIMPLE_CLASS_NAME_IDX] + ); } public static String getMethodBreakpointInfo(String qualifiedClassName, String methodName) { - int lastDot = qualifiedClassName.lastIndexOf('.'); - String moduleName = qualifiedClassName.substring(0, lastDot); - String simpleClassName = qualifiedClassName.substring(lastDot + 1); + String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( """ ( @@ -81,8 +70,8 @@ public static String getMethodBreakpointInfo(String qualifiedClassName, String m } )(getattr(getattr(__import__('sys').modules['%s'], '%s'), '%s')) """, - moduleName, - simpleClassName, + classNameParts[MODULE_NAME_IDX], + classNameParts[SIMPLE_CLASS_NAME_IDX], methodName ); } @@ -93,5 +82,16 @@ public static String getDAPValue(Long objectId, String fieldName) { fieldName ); } + + private static String[] getClassNameParts(String qualifiedClassName) { + int lastDotIdx = qualifiedClassName.lastIndexOf('.'); + if (lastDotIdx == -1) { + return new String[]{"__main__", qualifiedClassName}; + } + return new String[] { + qualifiedClassName.substring(0, lastDotIdx), + qualifiedClassName.substring(lastDotIdx + 1) + }; + } } From 3a2debdfd7324c05b96ad7d91b67eb6835afec7e Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Thu, 28 Aug 2025 23:11:50 +0200 Subject: [PATCH 40/57] Fix field resolution and mod registry --- .../monitor/adapter/python/DebugpyClient.java | 30 ++++++++++++++----- .../monitor/adapter/python/PythonAdapter.java | 2 +- .../plugins/monitor/vm/mm/python/PyField.java | 23 +++++++++++++- 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index f85af9b..007dba6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -213,6 +213,9 @@ PyType getVMType(String qualifiedClassName) { pyType.setMethods(methods); } + // Set Fields + setFields(pyType); + // Set File evalArgs.setExpression(PyEvalExBuilder.getFileForClass(qualifiedClassName)); evalReq.setSeq(REQUEST_COUNTER++); @@ -228,6 +231,20 @@ PyType getVMType(String qualifiedClassName) { return pyType; } + private void setFields(PyType pyType) { + List pyFields = new ArrayList<>(); + for (PyMethod pyMethod : pyType.getMethods()) { + if (pyMethod.getName().startsWith("set_")) { + String fieldName = pyMethod.getName().substring(4); + PyField pyField = new PyField(adapter, fieldName, pyMethod.getClassName()); + pyField.setModBreakpointLineNo(pyMethod.getStartLineNo()); + pyField.setFile(pyMethod.getFile()); + pyFields.add(pyField); + } + } + pyType.setFields(pyFields); + } + protected DAPValue getDAPValue(Long objectId, String fName) { var evalArgs = new EvaluateRequestArguments(); evalArgs.setExpression(PyEvalExBuilder.getDAPValue(objectId, fName)); @@ -742,9 +759,6 @@ public void registerOperationCallInterest(VMMethod m) { } setBreakpoints(file, breakpoints.get(file).keySet()); } - if (m.getName().startsWith("set_")) { - registerFieldModificationInterest((PyMethod) m); - } } public void registerConstructorCallInterest(VMType vmType) { @@ -762,16 +776,16 @@ public void registerConstructorCallInterest(VMType vmType) { setBreakpoints(file, breakpoints.get(file).keySet()); } - private void registerFieldModificationInterest(PyMethod m) { - String file = m.getFile(); - int startLine = m.getStartLineNo(); + public void registerFieldModificationInterest(PyField pyField) { + String file = pyField.getFile(); + Integer modBreakpointLineNo = pyField.getModBreakpointLineNo(); if (!breakpoints.containsKey(file)) { Map breakpointTypeMap = new HashMap<>(); - breakpointTypeMap.put(startLine, BreakpointType.MODIFICATION); + breakpointTypeMap.put(modBreakpointLineNo, BreakpointType.MODIFICATION); breakpoints.put(file, breakpointTypeMap); } else { Map currBps = breakpoints.get(file); - currBps.put(startLine, BreakpointType.MODIFICATION); + currBps.put(modBreakpointLineNo, BreakpointType.MODIFICATION); } setBreakpoints(file, breakpoints.get(file).keySet()); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 8d90b7b..344a8f7 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -1,7 +1,6 @@ package org.tzi.use.monitor.adapter.python; import org.tzi.use.monitor.adapter.python.custom.DAPValue; -import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import org.tzi.use.plugins.monitor.MonitorException; import org.tzi.use.plugins.monitor.vm.adapter.AbstractVMAdapter; @@ -150,6 +149,7 @@ public void registerConstructorCallInterest(VMType vmType) { @Override public void registerFieldModificationInterest(VMField f) { + debugpyClient.registerFieldModificationInterest((PyField) f); } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index bafdc6a..3cea9f6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -15,12 +15,14 @@ public class PyField implements VMField { private String type; private MAttribute useAttribute; private MAssociationEnd useAssociationEnd; + private Integer modBreakpointLineNo; + private String file; public PyField(PythonAdapter adapter, String fieldName, String className) { this.adapter = adapter; this.fieldName = fieldName; this.className = className; - this.id = String.format("%s:%s", fieldName, className); + this.id = String.format("%s:%s", className, fieldName); } @Override @@ -65,15 +67,34 @@ public void setType(String type) { this.type = type; } + public Integer getModBreakpointLineNo() { + return modBreakpointLineNo; + } + + public void setModBreakpointLineNo(int modBreakpointLineNo) { + this.modBreakpointLineNo = modBreakpointLineNo; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + @Override public String toString() { return "PyField{" + "id='" + id + '\'' + ", className='" + className + '\'' + ", fieldName='" + fieldName + '\'' + + ", adapter=" + adapter + ", type='" + type + '\'' + ", useAttribute=" + useAttribute + ", useAssociationEnd=" + useAssociationEnd + + ", modBreakpointLineNo=" + modBreakpointLineNo + + ", file='" + file + '\'' + '}'; } From 097c666803042a83adbffc5725cdfe568aabd0c5 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Fri, 29 Aug 2025 22:48:10 +0200 Subject: [PATCH 41/57] Refac event handling --- .../monitor/adapter/python/DebugpyClient.java | 85 ++++++++++--------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 007dba6..d49abbe 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -30,6 +30,7 @@ * @author Sergio Jimenez */ public class DebugpyClient { + private static final Pattern MEMORY_ADDR_PATTERN = Pattern.compile("0x[0-9a-fA-F]+"); private static int REQUEST_COUNTER = 1; @@ -39,10 +40,10 @@ public class DebugpyClient { private final BufferedWriter out; private final ObjectMapper mapper = new ObjectMapper(); private CompletableFuture futureResp; - private CompletableFuture initEvent; - private CompletableFuture stoppedEvent; + private CompletableFuture initEventFuture; + private CompletableFuture pauseEventFuture; + private CompletableFuture breakpointEventFuture; protected boolean running = false; - protected final BlockingQueue eventQueue = new LinkedBlockingQueue<>(); private final String workspace; private final String host; private final int port; @@ -71,7 +72,7 @@ public class DebugpyClient { } boolean attach() { - initEvent = new CompletableFuture<>(); + initEventFuture = new CompletableFuture<>(); // Initialize var initArgs = new InitializeRequestArguments(); @@ -100,13 +101,10 @@ boolean attach() { attachReq.setSeq(REQUEST_COUNTER++); sendAsyncRequest(attachReq); - // TODO wait for init event try { - System.out.println("Waiting for init event..."); - initEvent.get(); - System.out.println("Got init event..."); + initEventFuture.get(); } catch (InterruptedException | ExecutionException e) { - return false; + throw new RuntimeException(e); } System.out.println("Sending configuration done..."); @@ -128,7 +126,7 @@ boolean attach() { throw new RuntimeException(e); } running = true; - breakpointWatcher = new java.lang.Thread(new EventHandler(), "EventManager"); + breakpointWatcher = new java.lang.Thread(new BreakpointHandler(), "BreakpointHandler"); breakpointWatcher.start(); isConnected = true; return initResp.getSuccess(); @@ -329,7 +327,7 @@ protected boolean pause() { return true; } - stoppedEvent = new CompletableFuture<>(); + pauseEventFuture = new CompletableFuture<>(); var pauseArgs = new PauseRequestArguments(); pauseArgs.setThreadID(getThreadId("MainThread")); @@ -337,15 +335,20 @@ protected boolean pause() { pauseReq.setSeq(REQUEST_COUNTER++); pauseReq.setArguments(pauseArgs); var pauseResp = (PauseResponseClass) sendRequest(pauseReq); + + if (!pauseResp.getSuccess()) { + controller.newLogMessage(this, Level.SEVERE, "Failed to pause debugpy!"); + return false; + } + try { - System.out.println("Waiting for stopped event..."); - stoppedEvent.get(); - System.out.println("Got stopped event. Continuing..."); + pauseEventFuture.get(); } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } + running = false; - return pauseResp.getSuccess(); + return true; } protected boolean resume() { @@ -570,14 +573,16 @@ private void startReaderThread() { } if (msg instanceof DAPEvent dapEvent) { if (dapEvent instanceof InitializedEventClass initializedEvent) { - initEvent.complete(initializedEvent); + initEventFuture.complete(initializedEvent); } - if (msg instanceof StoppedEventClass stopEvent) { - if (stopEvent.getBody().getReason().equals("breakpoint")) { - running = false; - eventQueue.add(stopEvent); - } else { - stoppedEvent.complete(stopEvent); + if (dapEvent instanceof StoppedEventClass stoppedEvent) { + running = false; + String reason = stoppedEvent.getBody().getReason(); + if (reason.equals("pause")) { + pauseEventFuture.complete(stoppedEvent); + } + if (reason.equals("breakpoint")) { + breakpointEventFuture.complete(stoppedEvent); } } } @@ -790,34 +795,30 @@ public void registerFieldModificationInterest(PyField pyField) { setBreakpoints(file, breakpoints.get(file).keySet()); } - private class EventHandler implements Runnable { + private class BreakpointHandler implements Runnable { @Override public void run() { while (isConnected) { try { - DAPEvent event = eventQueue.take(); + breakpointEventFuture = new CompletableFuture<>(); + StoppedEventClass breakpointEvent = breakpointEventFuture.get(); if (!isConnected) { return; } - switch (event) { - case StoppedEventClass stopEvent -> { - StackFrame currFrame = getCurrentFrame(Math.toIntExact(stopEvent.getBody().getThreadID())); - String file = currFrame.getSource().getPath(); - String qualifiedClassName = fileToClassNameMap.get(file); - - BreakpointType breakpointType = breakpoints.get(file).get((int) currFrame.getLine()); - switch (breakpointType) { - case CONSTRUCTOR_CALL -> onConstructorCall(currFrame, qualifiedClassName); - case METHOD_CALL -> onMethodCall(currFrame, qualifiedClassName); - case METHOD_EXIT -> onMethodExit(currFrame, qualifiedClassName); - case MODIFICATION -> onAttrMod(currFrame, qualifiedClassName); - } - // Match monitor running state - resume(); - } - default -> controller.newLogMessage(this, Level.WARNING, "Unknown event!"); + StackFrame currFrame = getCurrentFrame(Math.toIntExact(breakpointEvent.getBody().getThreadID())); + String file = currFrame.getSource().getPath(); + String qualifiedClassName = fileToClassNameMap.get(file); + + BreakpointType breakpointType = breakpoints.get(file).get((int) currFrame.getLine()); + switch (breakpointType) { + case CONSTRUCTOR_CALL -> onConstructorCall(currFrame, qualifiedClassName); + case METHOD_CALL -> onMethodCall(currFrame, qualifiedClassName); + case METHOD_EXIT -> onMethodExit(currFrame, qualifiedClassName); + case MODIFICATION -> onAttrMod(currFrame, qualifiedClassName); } - } catch (InterruptedException e) { + + resume(); // Match monitor running state + } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } } From 04cbe4db3691d3799774252f4ca0f36fbcc90408 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Fri, 29 Aug 2025 23:13:58 +0200 Subject: [PATCH 42/57] Remove unused interface --- .../tzi/use/monitor/adapter/python/BreakpointHandler.java | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java deleted file mode 100644 index 420d692..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.tzi.use.monitor.adapter.python; - -import org.tzi.use.monitor.adapter.python.dap.StoppedEventClass; - -public interface BreakpointHandler { - void handleBreakpoint(StoppedEventClass event); -} From a8f0b9f9a54f298780a81f48c657b56ca14b520d Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sat, 30 Aug 2025 16:39:43 +0200 Subject: [PATCH 43/57] Support multiple classes in file for class name resolution --- .../monitor/adapter/python/DebugpyClient.java | 109 +++++++++++------- .../monitor/adapter/python/PythonAdapter.java | 4 +- 2 files changed, 72 insertions(+), 41 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index d49abbe..727ee7a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -8,9 +8,7 @@ import org.tzi.use.monitor.adapter.python.dap.Thread; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import org.tzi.use.plugins.monitor.Monitor; -import org.tzi.use.plugins.monitor.vm.mm.VMMethod; import org.tzi.use.plugins.monitor.vm.mm.VMObject; -import org.tzi.use.plugins.monitor.vm.mm.VMType; import org.tzi.use.uml.ocl.type.TupleType; import org.tzi.use.uml.ocl.type.Type; import org.tzi.use.uml.ocl.type.TypeFactory; @@ -49,9 +47,9 @@ public class DebugpyClient { private final int port; private final PythonAdapter adapter; private boolean isConnected; - private Map> breakpoints; + private Map> fileToBreakpointTypeMap; + private Map> fileToClassNameMap; private java.lang.Thread breakpointWatcher; - private Map fileToClassNameMap; private Monitor.Controller controller; DebugpyClient(String host, int port, String workspace, @@ -64,7 +62,7 @@ public class DebugpyClient { this.port = port; this.controller = controller; - breakpoints = new HashMap<>(); + fileToBreakpointTypeMap = new HashMap<>(); fileToClassNameMap = new HashMap<>(); this.adapter = adapter; @@ -224,7 +222,6 @@ PyType getVMType(String qualifiedClassName) { System.out.println("SETTING FILE TO: " + normalizedPath); pyType.setFile(normalizedPath); - fileToClassNameMap.put(pyType.getFile(), qualifiedClassName); controller.storeVMType(qualifiedClassName, pyType); return pyType; } @@ -742,57 +739,90 @@ private List fetchChildren(long variablesReference) { return res; } - public void registerOperationCallInterest(VMMethod m) { - if (!m.getName().equals("__init__")) { - PyMethod method = (PyMethod) m; - String file = method.getFile(); - int startLine = method.getStartLineNo(); - List returnLines = method.getReturnLines(); - if (!breakpoints.containsKey(file)) { - Map breakpointTypes = new HashMap<>(); - breakpointTypes.put(startLine, BreakpointType.METHOD_CALL); + public void registerOperationCallInterest(PyMethod pyMethod) { + if (!pyMethod.getName().equals("__init__")) { + String file = pyMethod.getFile(); + int startLine = pyMethod.getStartLineNo(); + String className = pyMethod.getClassName(); + List returnLines = pyMethod.getReturnLines(); + + if (!fileToBreakpointTypeMap.containsKey(file)) { + Map lineNoToBreakpointType = new HashMap<>(); + Map lineNoToClassName = new HashMap<>(); + + lineNoToBreakpointType.put(startLine, BreakpointType.METHOD_CALL); + lineNoToClassName.put(startLine, className); + for (Integer returnLine : returnLines) { - breakpointTypes.put(returnLine, BreakpointType.METHOD_EXIT); + lineNoToBreakpointType.put(returnLine, BreakpointType.METHOD_EXIT); + lineNoToClassName.put(returnLine, className); } - breakpoints.put(file, breakpointTypes); + + fileToBreakpointTypeMap.put(file, lineNoToBreakpointType); + fileToClassNameMap.put(file, lineNoToClassName); } else { - Map lineBreakpointTypes = breakpoints.get(file); - lineBreakpointTypes.put(startLine, BreakpointType.METHOD_CALL); + Map lineNoToBreakpointType = fileToBreakpointTypeMap.get(file); + Map lineNoToClassName = fileToClassNameMap.get(file); + + lineNoToBreakpointType.put(startLine, BreakpointType.METHOD_CALL); + lineNoToClassName.put(startLine, className); + for (Integer returnLine : returnLines) { - lineBreakpointTypes.put(returnLine, BreakpointType.METHOD_EXIT); + lineNoToBreakpointType.put(returnLine, BreakpointType.METHOD_EXIT); + lineNoToClassName.put(returnLine, className); } } - setBreakpoints(file, breakpoints.get(file).keySet()); + setBreakpoints(file, fileToBreakpointTypeMap.get(file).keySet()); } } - public void registerConstructorCallInterest(VMType vmType) { - PyMethod method = ((PyMethod) vmType.getMethodsByName("__init__").getFirst()); + public void registerConstructorCallInterest(PyType pyType) { + PyMethod method = ((PyMethod) pyType.getMethodsByName("__init__").getFirst()); String file = method.getFile(); int endLineNo = method.getEndLineNo(); - if (!breakpoints.containsKey(file)) { - Map breakpointTypeMap = new HashMap<>(); - breakpointTypeMap.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); - breakpoints.put(file, breakpointTypeMap); + String className = method.getClassName(); + + if (!fileToBreakpointTypeMap.containsKey(file)) { + Map lineNoToBreakpointType = new HashMap<>(); + Map lineNoToClassName = new HashMap<>(); + + lineNoToBreakpointType.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); + lineNoToClassName.put(endLineNo, className); + + fileToBreakpointTypeMap.put(file, lineNoToBreakpointType); + fileToClassNameMap.put(file, lineNoToClassName); } else { - Map currBps = breakpoints.get(file); - currBps.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); + Map lineNoToBreakpointType = fileToBreakpointTypeMap.get(file); + Map lineNoToClassName = fileToClassNameMap.get(file); + + lineNoToBreakpointType.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); + lineNoToClassName.put(endLineNo, className); } - setBreakpoints(file, breakpoints.get(file).keySet()); + setBreakpoints(file, fileToBreakpointTypeMap.get(file).keySet()); } public void registerFieldModificationInterest(PyField pyField) { String file = pyField.getFile(); Integer modBreakpointLineNo = pyField.getModBreakpointLineNo(); - if (!breakpoints.containsKey(file)) { - Map breakpointTypeMap = new HashMap<>(); - breakpointTypeMap.put(modBreakpointLineNo, BreakpointType.MODIFICATION); - breakpoints.put(file, breakpointTypeMap); + String className = pyField.getClassName(); + + if (!fileToBreakpointTypeMap.containsKey(file)) { + Map lineNoToBreakpointType = new HashMap<>(); + Map lineNoToClassName = new HashMap<>(); + + lineNoToBreakpointType.put(modBreakpointLineNo, BreakpointType.MODIFICATION); + lineNoToClassName.put(modBreakpointLineNo, className); + + fileToBreakpointTypeMap.put(file, lineNoToBreakpointType); + fileToClassNameMap.put(file, lineNoToClassName); } else { - Map currBps = breakpoints.get(file); - currBps.put(modBreakpointLineNo, BreakpointType.MODIFICATION); + Map lineNoToBreakpointType = fileToBreakpointTypeMap.get(file); + Map lineNoToClassName = fileToClassNameMap.get(file); + + lineNoToBreakpointType.put(modBreakpointLineNo, BreakpointType.MODIFICATION); + lineNoToClassName.put(modBreakpointLineNo, className); } - setBreakpoints(file, breakpoints.get(file).keySet()); + setBreakpoints(file, fileToBreakpointTypeMap.get(file).keySet()); } private class BreakpointHandler implements Runnable { @@ -806,10 +836,11 @@ public void run() { return; } StackFrame currFrame = getCurrentFrame(Math.toIntExact(breakpointEvent.getBody().getThreadID())); + int currLineNo = (int) currFrame.getLine(); String file = currFrame.getSource().getPath(); - String qualifiedClassName = fileToClassNameMap.get(file); + String qualifiedClassName = fileToClassNameMap.get(file).get(currLineNo); - BreakpointType breakpointType = breakpoints.get(file).get((int) currFrame.getLine()); + BreakpointType breakpointType = fileToBreakpointTypeMap.get(file).get(currLineNo); switch (breakpointType) { case CONSTRUCTOR_CALL -> onConstructorCall(currFrame, qualifiedClassName); case METHOD_CALL -> onMethodCall(currFrame, qualifiedClassName); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 344a8f7..bba79e0 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -124,7 +124,7 @@ public boolean isVMTypeLoaded(String javaClassName) { @Override public void registerOperationCallInterest(VMMethod m) { - debugpyClient.registerOperationCallInterest(m); + debugpyClient.registerOperationCallInterest((PyMethod) m); } @Override @@ -144,7 +144,7 @@ public Value getMethodResultValue(Object adapterExitInformation) { @Override public void registerConstructorCallInterest(VMType vmType) { - debugpyClient.registerConstructorCallInterest(vmType); + debugpyClient.registerConstructorCallInterest((PyType) vmType); } @Override From e044f5d69c8ba39b29edbbb8af0ecb987ddb2037 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sat, 30 Aug 2025 17:22:50 +0200 Subject: [PATCH 44/57] Refac internal breakpoint mappings update and breakpoint setting --- .../monitor/adapter/python/DebugpyClient.java | 70 ++++++------------- 1 file changed, 20 insertions(+), 50 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 727ee7a..fdfb519 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -296,7 +296,8 @@ private List getFieldsFromVarsResp(EvaluateResponseClass varsResponse, return pyFields; } - protected boolean setBreakpoints(String file, Set lines) { + protected boolean setBreakpoints(String file) { + Set lines = fileToBreakpointTypeMap.get(file).keySet(); var source = new Source(); source.setName(file.substring(file.lastIndexOf("/") + 1)); source.setPath(file); @@ -746,33 +747,9 @@ public void registerOperationCallInterest(PyMethod pyMethod) { String className = pyMethod.getClassName(); List returnLines = pyMethod.getReturnLines(); - if (!fileToBreakpointTypeMap.containsKey(file)) { - Map lineNoToBreakpointType = new HashMap<>(); - Map lineNoToClassName = new HashMap<>(); - - lineNoToBreakpointType.put(startLine, BreakpointType.METHOD_CALL); - lineNoToClassName.put(startLine, className); - - for (Integer returnLine : returnLines) { - lineNoToBreakpointType.put(returnLine, BreakpointType.METHOD_EXIT); - lineNoToClassName.put(returnLine, className); - } - - fileToBreakpointTypeMap.put(file, lineNoToBreakpointType); - fileToClassNameMap.put(file, lineNoToClassName); - } else { - Map lineNoToBreakpointType = fileToBreakpointTypeMap.get(file); - Map lineNoToClassName = fileToClassNameMap.get(file); - - lineNoToBreakpointType.put(startLine, BreakpointType.METHOD_CALL); - lineNoToClassName.put(startLine, className); - - for (Integer returnLine : returnLines) { - lineNoToBreakpointType.put(returnLine, BreakpointType.METHOD_EXIT); - lineNoToClassName.put(returnLine, className); - } - } - setBreakpoints(file, fileToBreakpointTypeMap.get(file).keySet()); + updateInternalBreakpointMappings(file, className, List.of(startLine), BreakpointType.METHOD_CALL); + updateInternalBreakpointMappings(file, className, returnLines, BreakpointType.METHOD_EXIT); + setBreakpoints(file); } } @@ -782,23 +759,8 @@ public void registerConstructorCallInterest(PyType pyType) { int endLineNo = method.getEndLineNo(); String className = method.getClassName(); - if (!fileToBreakpointTypeMap.containsKey(file)) { - Map lineNoToBreakpointType = new HashMap<>(); - Map lineNoToClassName = new HashMap<>(); - - lineNoToBreakpointType.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); - lineNoToClassName.put(endLineNo, className); - - fileToBreakpointTypeMap.put(file, lineNoToBreakpointType); - fileToClassNameMap.put(file, lineNoToClassName); - } else { - Map lineNoToBreakpointType = fileToBreakpointTypeMap.get(file); - Map lineNoToClassName = fileToClassNameMap.get(file); - - lineNoToBreakpointType.put(endLineNo, BreakpointType.CONSTRUCTOR_CALL); - lineNoToClassName.put(endLineNo, className); - } - setBreakpoints(file, fileToBreakpointTypeMap.get(file).keySet()); + updateInternalBreakpointMappings(file, className, List.of(endLineNo), BreakpointType.CONSTRUCTOR_CALL); + setBreakpoints(file); } public void registerFieldModificationInterest(PyField pyField) { @@ -806,12 +768,19 @@ public void registerFieldModificationInterest(PyField pyField) { Integer modBreakpointLineNo = pyField.getModBreakpointLineNo(); String className = pyField.getClassName(); + updateInternalBreakpointMappings(file, className, List.of(modBreakpointLineNo), BreakpointType.MODIFICATION); + setBreakpoints(file); + } + + private void updateInternalBreakpointMappings(String file, String className, List lineNos, BreakpointType breakpointType) { if (!fileToBreakpointTypeMap.containsKey(file)) { Map lineNoToBreakpointType = new HashMap<>(); Map lineNoToClassName = new HashMap<>(); - lineNoToBreakpointType.put(modBreakpointLineNo, BreakpointType.MODIFICATION); - lineNoToClassName.put(modBreakpointLineNo, className); + for (Integer lineNo : lineNos) { + lineNoToBreakpointType.put(lineNo, breakpointType); + lineNoToClassName.put(lineNo, className); + } fileToBreakpointTypeMap.put(file, lineNoToBreakpointType); fileToClassNameMap.put(file, lineNoToClassName); @@ -819,10 +788,11 @@ public void registerFieldModificationInterest(PyField pyField) { Map lineNoToBreakpointType = fileToBreakpointTypeMap.get(file); Map lineNoToClassName = fileToClassNameMap.get(file); - lineNoToBreakpointType.put(modBreakpointLineNo, BreakpointType.MODIFICATION); - lineNoToClassName.put(modBreakpointLineNo, className); + for (Integer lineNo : lineNos) { + lineNoToBreakpointType.put(lineNo, breakpointType); + lineNoToClassName.put(lineNo, className); + } } - setBreakpoints(file, fileToBreakpointTypeMap.get(file).keySet()); } private class BreakpointHandler implements Runnable { From eda85d8c1c391f91f9d1ffce390fccf4cffb6243 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 21 Oct 2025 01:27:43 +0200 Subject: [PATCH 45/57] Fix and refac lazy init of type members of interest --- .../monitor/adapter/python/DebugpyClient.java | 255 +++++++----------- .../adapter/python/PyEvalExBuilder.java | 23 +- .../monitor/adapter/python/PythonAdapter.java | 86 ++++-- .../plugins/monitor/vm/mm/python/PyField.java | 39 +-- .../monitor/vm/mm/python/PyMethod.java | 13 +- .../plugins/monitor/vm/mm/python/PyType.java | 51 +--- .../org/tzi/use/plugins/monitor/Monitor.java | 14 +- 7 files changed, 192 insertions(+), 289 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index fdfb519..3419c4e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -8,6 +8,8 @@ import org.tzi.use.monitor.adapter.python.dap.Thread; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import org.tzi.use.plugins.monitor.Monitor; +import org.tzi.use.plugins.monitor.vm.mm.VMField; +import org.tzi.use.plugins.monitor.vm.mm.VMMethod; import org.tzi.use.plugins.monitor.vm.mm.VMObject; import org.tzi.use.uml.ocl.type.TupleType; import org.tzi.use.uml.ocl.type.Type; @@ -130,114 +132,115 @@ boolean attach() { return initResp.getSuccess(); } - PyType getVMType(String qualifiedClassName) { - if (qualifiedClassName.equals("Mock")) { + PyType getVMType(String fqcn) { + if (controller.existsVMType(fqcn)) { + controller.getVMType(fqcn); + } + + if (fqcn.equals("Mock")) { return new PyType(adapter, "Mock"); } + // TODO: Comment why pause here is needed pause(); - PyType pyType = new PyType(adapter, qualifiedClassName); + PyType pyType = new PyType(adapter, fqcn); - // Set Methods + // Set File var evalArgs = new EvaluateRequestArguments(); evalArgs.setContext("watch"); evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); - evalArgs.setExpression(PyEvalExBuilder.getMethodSignaturesExp(qualifiedClassName)); + evalArgs.setExpression(PyEvalExBuilder.getFileForClass(fqcn)); var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - if (!evalResp.getSuccess()) { - controller.newLogMessage(this, Level.WARNING, String.format("Could not find type '%s' in VM...", qualifiedClassName)); - return pyType; - } - - String result = evalResp.getBody().getResult(); + String file = evalResp.getBody().getResult(); + String normalizedPath = Path.of(file).normalize().toString().replace("'", ""); + pyType.setFile(normalizedPath); - if (!result.equals("''")) { - List methods = new LinkedList<>(); + controller.storeVMType(fqcn, pyType); + return pyType; + } - String escapedResult = result.substring(1, result.length() - 1); + protected VMMethod getVMMethod(String fqcn, String methodName) { + String methodId = String.format("%s:%s", fqcn, methodName); + if (controller.existsVMMethod(methodId)) { + return controller.getVMMethod(methodId); + } - String[] methodSigs = escapedResult.split(";"); + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setContext("watch"); + evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); + evalArgs.setExpression(PyEvalExBuilder.getMethodSig(fqcn, methodName)); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - for (String methodSig : methodSigs) { - String[] sigParts = methodSig.split(":"); - PyMethod pyMethod = new PyMethod(adapter, sigParts[0], qualifiedClassName); + var resultBody = evalResp.getBody(); - List argNames = new ArrayList<>(); - List argTypes = new ArrayList<>(); - for (String argName : sigParts[1].split(",")) { - if (argName.equals("self")) { - continue; - } - argNames.add(argName); - argTypes.add("Mock"); - } - pyMethod.setArgumentNames(argNames); - pyMethod.setArgumentTypes(argTypes); + if (!evalResp.getSuccess() || resultBody.getResult().equals("''")) { + return null; + } - // Set line nos and filename - evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(qualifiedClassName, pyMethod.getName())); - evalReq.setSeq(REQUEST_COUNTER++); - evalResp = (EvaluateResponseClass) sendRequest(evalReq); + PyMethod pyMethod = new PyMethod(adapter, methodName,fqcn); - String json = evalResp.getBody().getResult().replace("'", "\""); - ObjectMapper mapper = new ObjectMapper(); - JsonNode root; - try { - root = mapper.readTree(json); - } catch (JsonProcessingException e) { - return null; - } - String fileRaw = root.get("file").asText(); - String normalizedFile = Paths.get(fileRaw).normalize().toString(); - pyMethod.setFile(normalizedFile); - pyMethod.setStartLineNo(root.get("start").asInt()); - pyMethod.setEndLineNo(root.get("end").asInt()); - List returnLines = new ArrayList<>(); - for (JsonNode r : root.get("returns")) { - returnLines.add(r.asInt()); - } - pyMethod.setReturnLines(returnLines); + String escapedResult = resultBody.getResult().substring(1, resultBody.getResult().length() - 1); - methods.add(pyMethod); - controller.storeVMMethod(pyMethod.getId(), pyMethod); + List argNames = new ArrayList<>(); + List argTypes = new ArrayList<>(); + for (String argName : escapedResult.split(",")) { + if (argName.equals("self")) { + continue; } - pyType.setMethods(methods); + argNames.add(argName); + argTypes.add("Mock"); } + pyMethod.setArgumentNames(argNames); + pyMethod.setArgumentTypes(argTypes); - // Set Fields - setFields(pyType); - - // Set File - evalArgs.setExpression(PyEvalExBuilder.getFileForClass(qualifiedClassName)); + // Set line nos and filename + evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(fqcn, methodName)); evalReq.setSeq(REQUEST_COUNTER++); evalResp = (EvaluateResponseClass) sendRequest(evalReq); - String file = evalResp.getBody().getResult(); - String normalizedPath = Path.of(file).normalize().toString().replace("'", ""); - System.out.println("SETTING FILE TO: " + normalizedPath); - pyType.setFile(normalizedPath); + String json = evalResp.getBody().getResult().replace("'", "\""); + ObjectMapper mapper = new ObjectMapper(); + JsonNode root; + try { + root = mapper.readTree(json); + } catch (JsonProcessingException e) { + return null; + } + String fileRaw = root.get("file").asText(); + String normalizedFile = Paths.get(fileRaw).normalize().toString(); + pyMethod.setFile(normalizedFile); + pyMethod.setStartLineNo(root.get("start").asInt()); + pyMethod.setEndLineNo(root.get("end").asInt()); + List returnLines = new ArrayList<>(); + for (JsonNode r : root.get("returns")) { + returnLines.add(r.asInt()); + } + pyMethod.setReturnLines(returnLines); - controller.storeVMType(qualifiedClassName, pyType); - return pyType; + controller.storeVMMethod(pyMethod.getId(), pyMethod); + return pyMethod; } - private void setFields(PyType pyType) { - List pyFields = new ArrayList<>(); - for (PyMethod pyMethod : pyType.getMethods()) { - if (pyMethod.getName().startsWith("set_")) { - String fieldName = pyMethod.getName().substring(4); - PyField pyField = new PyField(adapter, fieldName, pyMethod.getClassName()); - pyField.setModBreakpointLineNo(pyMethod.getStartLineNo()); - pyField.setFile(pyMethod.getFile()); - pyFields.add(pyField); - } + protected VMField getVMField(String fqcn, String fieldName) { + String fId = String.format("%s:%s", fqcn, fieldName); + if (controller.existsVMField(fId)) { + return controller.getVMField(fId); } - pyType.setFields(pyFields); + PyField pyField = null; + PyMethod initMethod = (PyMethod) getVMMethod(fqcn, "__init__"); + if (initMethod != null && initMethod.getArgumentNames().stream().anyMatch(argName -> argName.equals(fieldName))) { + pyField = new PyField(adapter, fieldName, fqcn); + controller.storeVMField(pyField.getId(), pyField); + } + return pyField; } protected DAPValue getDAPValue(Long objectId, String fName) { @@ -252,50 +255,6 @@ protected DAPValue getDAPValue(Long objectId, String fName) { return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); } - protected List getInstanceVariables(long objId, long currFrameId, String className) { - var evalArgs = new EvaluateRequestArguments(); - evalArgs.setExpression(PyEvalExBuilder.getVarsByObjId(objId)); - evalArgs.setFrameID(currFrameId); - evalArgs.setContext("watch"); - var evalReq = new EvaluateRequestClass(); - evalReq.setSeq(REQUEST_COUNTER++); - evalReq.setArguments(evalArgs); - EvaluateResponseClass evalResp = (EvaluateResponseClass) sendRequest(evalReq); - - return getFieldsFromVarsResp(evalResp, className); - } - - protected List getInstanceVariables(long currFrameId, String className) { - var evalArgs = new EvaluateRequestArguments(); - evalArgs.setExpression(PyEvalExBuilder.getSelfVarsWithType()); - evalArgs.setFrameID(currFrameId); - evalArgs.setContext("watch"); - var evalReq = new EvaluateRequestClass(); - evalReq.setSeq(REQUEST_COUNTER++); - evalReq.setArguments(evalArgs); - EvaluateResponseClass evalResp = (EvaluateResponseClass) sendRequest(evalReq); - - return getFieldsFromVarsResp(evalResp, className); - } - - private List getFieldsFromVarsResp(EvaluateResponseClass varsResponse, String className) { - List pyFields = new ArrayList<>(); - String result = varsResponse.getBody().getResult(); - if (!result.equals("''")) { - String vars = result.substring(1, result.length() - 1); - String[] fields = vars.split(","); - for (String field : fields) { - String[] fieldParts = field.split(":"); - String fieldName = fieldParts[0]; - String fieldType = fieldParts[1]; - PyField pyField = new PyField(adapter, fieldName, className); - pyField.setType(fieldType); - pyFields.add(pyField); - } - } - return pyFields; - } - protected boolean setBreakpoints(String file) { Set lines = fileToBreakpointTypeMap.get(file).keySet(); var source = new Source(); @@ -445,11 +404,6 @@ protected Set getInstances(PyType pyType) { continue; } long objId = Long.parseLong(id.trim()); - boolean missedConstructorCallForObj = !controller.existsVMObject(objId); - if (missedConstructorCallForObj) { - List instanceVars = getInstanceVariables(objId, frameId, pyType.getName()); - pyType.setFields(instanceVars); - } PyObject pyObject = new PyObject(adapter, objId, pyType); objs.add(pyObject); } @@ -740,7 +694,17 @@ private List fetchChildren(long variablesReference) { return res; } - public void registerOperationCallInterest(PyMethod pyMethod) { + public boolean registerConstructorCallInterest(PyType pyType) { + PyMethod method = ((PyMethod) pyType.getMethodsByName("__init__").getFirst()); + String file = method.getFile(); + int endLineNo = method.getEndLineNo(); + String className = method.getClassName(); + + updateInternalBreakpointMappings(file, className, List.of(endLineNo), BreakpointType.CONSTRUCTOR_CALL); + return setBreakpoints(file); + } + + public boolean registerOperationCallInterest(PyMethod pyMethod) { if (!pyMethod.getName().equals("__init__")) { String file = pyMethod.getFile(); int startLine = pyMethod.getStartLineNo(); @@ -749,27 +713,22 @@ public void registerOperationCallInterest(PyMethod pyMethod) { updateInternalBreakpointMappings(file, className, List.of(startLine), BreakpointType.METHOD_CALL); updateInternalBreakpointMappings(file, className, returnLines, BreakpointType.METHOD_EXIT); - setBreakpoints(file); + return setBreakpoints(file); } + return true; } - public void registerConstructorCallInterest(PyType pyType) { - PyMethod method = ((PyMethod) pyType.getMethodsByName("__init__").getFirst()); - String file = method.getFile(); - int endLineNo = method.getEndLineNo(); - String className = method.getClassName(); - - updateInternalBreakpointMappings(file, className, List.of(endLineNo), BreakpointType.CONSTRUCTOR_CALL); - setBreakpoints(file); - } - - public void registerFieldModificationInterest(PyField pyField) { - String file = pyField.getFile(); - Integer modBreakpointLineNo = pyField.getModBreakpointLineNo(); - String className = pyField.getClassName(); - - updateInternalBreakpointMappings(file, className, List.of(modBreakpointLineNo), BreakpointType.MODIFICATION); - setBreakpoints(file); + public boolean registerFieldModificationInterest(PyField pyField) { + String fqcn = pyField.getClassName(); + String fName = pyField.getName(); + String setterName = String.format("set_%s", fName); + PyMethod pyMethod = (PyMethod) getVMMethod(fqcn, setterName); + if (pyMethod == null) { + return false; + } + String file = pyMethod.getFile(); + updateInternalBreakpointMappings(file, fqcn, List.of(pyMethod.getStartLineNo()), BreakpointType.MODIFICATION); + return setBreakpoints(file); } private void updateInternalBreakpointMappings(String file, String className, List lineNos, BreakpointType breakpointType) { @@ -830,13 +789,7 @@ private void onConstructorCall(StackFrame currentFrame, String fullyQualifiedCla controller.newLogMessage(this, Level.FINE, "onConstructorCall: " + fullyQualifiedClassName + "." + currentFrame.getName()); PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); - - List instanceVars = getInstanceVariables(currentFrame.getID(), fullyQualifiedClassName); - pyType.setFields(instanceVars); - - PyObject pyObject = new PyObject(adapter, - getSelfId(currentFrame.getID()), - pyType); + PyObject pyObject = new PyObject(adapter, getSelfId(currentFrame.getID()), pyType); controller.onNewVMObject(pyObject); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index c6c6180..0394111 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -5,14 +5,6 @@ public class PyEvalExBuilder { private static final int MODULE_NAME_IDX = 0; private static final int SIMPLE_CLASS_NAME_IDX = 1; - public static String getSelfVarsWithType() { - return "\",\".join([f\"{k}:{type(v).__name__}\" for k, v in vars(self).items()])\n"; - } - - public static String getVarsByObjId(long objId) { - return String.format("\",\".join([f\"{k}:{type(v).__name__}\" for o in __import__('gc').get_objects() if id(o)==%s for k,v in vars(o).items()])\n", objId); - } - public static String getFileForClass(String qualifiedClassName) { String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( @@ -35,16 +27,13 @@ public static String getInstanceIds(String qualifiedClassName) { ); } - public static String getMethodSignaturesExp(String qualifiedClassName) { - String[] classNameParts = getClassNameParts(qualifiedClassName); + public static String getMethodSig(String fqcn, String methodName) { + String[] classNameParts = getClassNameParts(fqcn); return String.format( - """ - ";".join([ - f"{name}:{','.join([p.name for p in __import__('inspect').signature(m).parameters.values()])}" - for name, m in __import__('inspect').getmembers(__import__('sys').modules['%s'].%s, __import__('inspect').isfunction) - ]) - """, classNameParts[MODULE_NAME_IDX], classNameParts[SIMPLE_CLASS_NAME_IDX] - ); + """ + ','.join([p.name for p in __import__('inspect').signature(getattr(__import__('sys').modules['%s'], '%s').%s).parameters.values()]) + """, classNameParts[MODULE_NAME_IDX], classNameParts[SIMPLE_CLASS_NAME_IDX], methodName + ); } public static String getMethodBreakpointInfo(String qualifiedClassName, String methodName) { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index bba79e0..285597a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -28,15 +28,6 @@ public class PythonAdapter extends AbstractVMAdapter { private String workspace; private DebugpyClient debugpyClient; - public Set readInstances(PyType pyType) { - return debugpyClient.getInstances(pyType); - } - - public Value getUSEValue(long objId, String fName) { - DAPValue dapValue = debugpyClient.getDAPValue(objId, fName); - return debugpyClient.getUSEValue(dapValue); - } - @Override protected void validateSettings() throws InvalidAdapterConfiguration { List settings = getSettings(); @@ -71,7 +62,7 @@ protected void validateSettings() throws InvalidAdapterConfiguration { protected void createSettings(List settings) { settings.add(SETTING_HOST_IDX, new VMAdapterSetting("Host", "localhost")); settings.add(SETTING_PORT_IDX, new VMAdapterSetting("Port", "5678")); - settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("SUM root dir", "/home/serj/git/uni/dpy-server")); + settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("SUM root dir", "/Users/serj/git/uni/dpy-server")); } @Override @@ -102,54 +93,91 @@ public void stop() { debugpyClient.stop(); } - @Override - public VMType getVMType(String qualifiedClassName) { - return debugpyClient.getVMType(qualifiedClassName); + public Set readInstances(PyType pyType) { + return debugpyClient.getInstances(pyType); } - @Override - public void registerClassPrepareEvent(String javaClassName) { - + public Value getUSEValue(long objId, String fName) { + DAPValue dapValue = debugpyClient.getDAPValue(objId, fName); + return debugpyClient.getUSEValue(dapValue); } @Override - public void unregisterClassPrepareInterest(Object adapterEventInformation) { + public VMType getVMType(String fqcn) { + controller.newLogMessage(this, Level.FINE, String.format("Getting runtime type '%s'...", fqcn)); + VMType vmType = debugpyClient.getVMType(fqcn); + if (vmType == null) { + controller.newLogMessage(this, Level.WARNING, String.format("Could not find runtime type '%s'!", fqcn)); + } + return vmType; + } + + public VMMethod getVMMethod(String fqcn, String methodName) { + controller.newLogMessage(this, Level.FINE, String.format("Getting runtime method '%s' for type '%s'...", methodName, fqcn)); + VMMethod vmMethod = debugpyClient.getVMMethod(fqcn, methodName); + if (vmMethod == null) { + controller.newLogMessage(this, Level.WARNING, String.format("Could not find runtime method '%s' for type '%s'!", methodName, fqcn)); + } + return vmMethod; + } + public VMField getVMField(String fqcn, String fieldName) { + controller.newLogMessage(this, Level.FINE, String.format("Getting runtime field '%s' for type '%s'...", fieldName, fqcn)); + VMField vmField = debugpyClient.getVMField(fqcn, fieldName); + if (vmField == null) { + controller.newLogMessage(this, Level.WARNING, String.format("Could not get runtime field '%s' for type '%s'!", fieldName, fqcn)); + } + return vmField; } @Override - public boolean isVMTypeLoaded(String javaClassName) { - return getVMType(javaClassName) != null; + public void registerConstructorCallInterest(VMType vmType) { + controller.newLogMessage(this, Level.FINE, String.format("Registering constructor call interest for type '%s'...", vmType)); + if (!debugpyClient.registerConstructorCallInterest((PyType) vmType)) { + controller.newLogMessage(this, Level.WARNING, String.format("Could not register constructor call interestest for type '%s'!", vmType)); + } } @Override - public void registerOperationCallInterest(VMMethod m) { - debugpyClient.registerOperationCallInterest((PyMethod) m); + public void registerOperationCallInterest(VMMethod vmMethod) { + controller.newLogMessage(this, Level.FINE, String.format("Registering operation call interest for '%s'...", vmMethod)); + if (!debugpyClient.registerOperationCallInterest((PyMethod) vmMethod)) { + controller.newLogMessage(this, Level.WARNING, String.format("Could not register operation call interestest for '%s'!", vmMethod)); + } } @Override - public void registerMethodExit(VMMethodCall call) { + public void registerFieldModificationInterest(VMField vmField) { + controller.newLogMessage(this, Level.FINE, String.format("Registering field modification interest for '%s'...", vmField)); + if (!debugpyClient.registerFieldModificationInterest((PyField) vmField)) { + controller.newLogMessage(this, Level.WARNING, String.format("Could not register field modification interestest for '%s'!", vmField)); + } + } + @Override + public boolean isVMTypeLoaded(String javaClassName) { + return getVMType(javaClassName) != null; } @Override - public void unregisterOperationeExit(Object adapterExitInformation) { + public void registerClassPrepareEvent(String javaClassName) { + } + @Override + public void unregisterClassPrepareInterest(Object adapterEventInformation) { } @Override - public Value getMethodResultValue(Object adapterExitInformation) { - return null; + public void registerMethodExit(VMMethodCall call) { } @Override - public void registerConstructorCallInterest(VMType vmType) { - debugpyClient.registerConstructorCallInterest((PyType) vmType); + public void unregisterOperationeExit(Object adapterExitInformation) { } @Override - public void registerFieldModificationInterest(VMField f) { - debugpyClient.registerFieldModificationInterest((PyField) f); + public Value getMethodResultValue(Object adapterExitInformation) { + return null; } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index 3cea9f6..14356fb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -12,11 +12,8 @@ public class PyField implements VMField { private final String fieldName; private final PythonAdapter adapter; - private String type; private MAttribute useAttribute; private MAssociationEnd useAssociationEnd; - private Integer modBreakpointLineNo; - private String file; public PyField(PythonAdapter adapter, String fieldName, String className) { this.adapter = adapter; @@ -59,43 +56,9 @@ public String getClassName() { return className; } - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Integer getModBreakpointLineNo() { - return modBreakpointLineNo; - } - - public void setModBreakpointLineNo(int modBreakpointLineNo) { - this.modBreakpointLineNo = modBreakpointLineNo; - } - - public String getFile() { - return file; - } - - public void setFile(String file) { - this.file = file; - } - @Override public String toString() { - return "PyField{" + - "id='" + id + '\'' + - ", className='" + className + '\'' + - ", fieldName='" + fieldName + '\'' + - ", adapter=" + adapter + - ", type='" + type + '\'' + - ", useAttribute=" + useAttribute + - ", useAssociationEnd=" + useAssociationEnd + - ", modBreakpointLineNo=" + modBreakpointLineNo + - ", file='" + file + '\'' + - '}'; + return id; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java index cb4e598..3e3e5da 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethod.java @@ -109,18 +109,7 @@ public void setReturnLines(List returnLines) { @Override public String toString() { - return "PyMethod{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", className='" + className + '\'' + - ", argumentNames=" + argumentNames + - ", argumentTypes=" + argumentTypes + - ", file='" + file + '\'' + - ", startLineNo=" + startLineNo + - ", endLineNo=" + endLineNo + - ", returnLines=" + returnLines + - ", useOperation=" + useOperation + - '}'; + return id; } } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index 39b9981..e8204eb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -14,8 +14,6 @@ public class PyType implements VMType { private final String typeName; private final PythonAdapter adapter; - private List fields = new ArrayList<>(); - private List methods; private String file; private MClass useClass; @@ -51,11 +49,15 @@ public Set getInstances() { @Override public List getMethodsByName(String methodName) { - Optional methodOpt = methods.stream() - .filter(m -> m.getName().equals(methodName)) - .map(m -> (VMMethod) m) - .findAny(); - return methodOpt.map(Collections::singletonList).orElseGet(List::of); + VMMethod vmMethod = adapter.getVMMethod(typeName, methodName); + return (vmMethod != null) + ? Collections.singletonList(vmMethod) + : Collections.emptyList(); + } + + @Override + public VMField getFieldByName(String fieldName) { + return adapter.getVMField(typeName, fieldName); } @Override @@ -68,25 +70,6 @@ public void setUSEClass(MClass cls) { this.useClass = cls; } - @Override - public VMField getFieldByName(String javaFieldName) { - System.out.println("Getting field by name: " + javaFieldName + " for type: " + getName()); - PyField f = fields.stream() - .filter(fi -> fi.getName().equals(javaFieldName)) - .findFirst() - .orElse(null); - System.out.println("Got field by name: " + javaFieldName + " = " + f); - return f; - } - - public List getMethods() { - return methods; - } - - public void setMethods(List methods) { - this.methods = methods; - } - public String getFile() { return file; } @@ -95,23 +78,9 @@ public void setFile(String file) { this.file = file; } - public List getFields() { - return fields; - } - - public void setFields(List fields) { - this.fields = fields; - } - @Override public String toString() { - return "PyType{" + - "typeName='" + typeName + '\'' + - ", fields=" + fields + - ", methods=" + methods + - ", file='" + file + '\'' + - ", useClass=" + useClass + - '}'; + return typeName; } } diff --git a/monitor/src/main/java/org/tzi/use/plugins/monitor/Monitor.java b/monitor/src/main/java/org/tzi/use/plugins/monitor/Monitor.java index c4db7a8..4ddd7d5 100644 --- a/monitor/src/main/java/org/tzi/use/plugins/monitor/Monitor.java +++ b/monitor/src/main/java/org/tzi/use/plugins/monitor/Monitor.java @@ -1472,7 +1472,19 @@ public boolean existsVMMethod(Object key) { public void storeVMMethod(Object key, VMMethod type) { adapterMethodMapping.put(key, type); } - + + public VMField getVMField(Object key) { + return adapterFieldMapping.get(key); + } + + public boolean existsVMField(Object key) { + return adapterFieldMapping.containsKey(key); + } + + public void storeVMField(Object key, VMField field) { + adapterFieldMapping.put(key, field); + } + /** * Needs to be called if a method is called * which the monitor registered for. From 53818a4e863a71afb21c82399d4ff211a56e8bb0 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 21 Oct 2025 23:25:40 +0200 Subject: [PATCH 46/57] Add module level op support as global --- .../monitor/adapter/python/DebugpyClient.java | 48 ++++++++++++++----- .../adapter/python/PyEvalExBuilder.java | 37 +++++++++++++- .../monitor/adapter/python/PythonAdapter.java | 16 +++++-- .../plugins/monitor/vm/mm/python/PyType.java | 10 +++- 4 files changed, 91 insertions(+), 20 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 3419c4e..5c9d69d 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -137,14 +137,18 @@ PyType getVMType(String fqcn) { controller.getVMType(fqcn); } + if (fqcn.equals("Global")) { + return new PyType(adapter, fqcn, false); + } + if (fqcn.equals("Mock")) { - return new PyType(adapter, "Mock"); + return new PyType(adapter, fqcn, true); } // TODO: Comment why pause here is needed pause(); - PyType pyType = new PyType(adapter, fqcn); + PyType pyType = new PyType(adapter, fqcn, true); // Set File var evalArgs = new EvaluateRequestArguments(); @@ -164,7 +168,7 @@ PyType getVMType(String fqcn) { return pyType; } - protected VMMethod getVMMethod(String fqcn, String methodName) { + protected VMMethod getVMMethod(String fqcn, String methodName, boolean isModule) { String methodId = String.format("%s:%s", fqcn, methodName); if (controller.existsVMMethod(methodId)) { return controller.getVMMethod(methodId); @@ -173,7 +177,7 @@ protected VMMethod getVMMethod(String fqcn, String methodName) { var evalArgs = new EvaluateRequestArguments(); evalArgs.setContext("watch"); evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); - evalArgs.setExpression(PyEvalExBuilder.getMethodSig(fqcn, methodName)); + evalArgs.setExpression(PyEvalExBuilder.getMethodSig(fqcn, methodName, isModule)); var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); @@ -185,7 +189,7 @@ protected VMMethod getVMMethod(String fqcn, String methodName) { return null; } - PyMethod pyMethod = new PyMethod(adapter, methodName,fqcn); + PyMethod pyMethod = new PyMethod(adapter, isModule ? fqcn + "." + methodName : methodName, fqcn); String escapedResult = resultBody.getResult().substring(1, resultBody.getResult().length() - 1); @@ -202,7 +206,7 @@ protected VMMethod getVMMethod(String fqcn, String methodName) { pyMethod.setArgumentTypes(argTypes); // Set line nos and filename - evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(fqcn, methodName)); + evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(fqcn, methodName, isModule)); evalReq.setSeq(REQUEST_COUNTER++); evalResp = (EvaluateResponseClass) sendRequest(evalReq); @@ -235,7 +239,7 @@ protected VMField getVMField(String fqcn, String fieldName) { return controller.getVMField(fId); } PyField pyField = null; - PyMethod initMethod = (PyMethod) getVMMethod(fqcn, "__init__"); + PyMethod initMethod = (PyMethod) getVMMethod(fqcn, "__init__", false); if (initMethod != null && initMethod.getArgumentNames().stream().anyMatch(argName -> argName.equals(fieldName))) { pyField = new PyField(adapter, fieldName, fqcn); controller.storeVMField(pyField.getId(), pyField); @@ -378,6 +382,11 @@ protected Thread[] getThreads() { protected Set getInstances(PyType pyType) { controller.storeVMType(pyType.getName(), pyType); + + if (pyType.isModule()) { + return Set.of(new PyObject(adapter, 1L, pyType)); + } + pause(); long frameId = getCurrentFrameId(getThreadId("MainThread")); @@ -695,6 +704,9 @@ private List fetchChildren(long variablesReference) { } public boolean registerConstructorCallInterest(PyType pyType) { + if (pyType.isModule()) { + return true; + } PyMethod method = ((PyMethod) pyType.getMethodsByName("__init__").getFirst()); String file = method.getFile(); int endLineNo = method.getEndLineNo(); @@ -709,7 +721,7 @@ public boolean registerOperationCallInterest(PyMethod pyMethod) { String file = pyMethod.getFile(); int startLine = pyMethod.getStartLineNo(); String className = pyMethod.getClassName(); - List returnLines = pyMethod.getReturnLines(); + List returnLines = pyMethod.getReturnLines().isEmpty() ? List.of(pyMethod.getEndLineNo()) : pyMethod.getReturnLines(); updateInternalBreakpointMappings(file, className, List.of(startLine), BreakpointType.METHOD_CALL); updateInternalBreakpointMappings(file, className, returnLines, BreakpointType.METHOD_EXIT); @@ -722,7 +734,7 @@ public boolean registerFieldModificationInterest(PyField pyField) { String fqcn = pyField.getClassName(); String fName = pyField.getName(); String setterName = String.format("set_%s", fName); - PyMethod pyMethod = (PyMethod) getVMMethod(fqcn, setterName); + PyMethod pyMethod = (PyMethod) getVMMethod(fqcn, setterName, false); if (pyMethod == null) { return false; } @@ -798,10 +810,15 @@ private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); - String methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + String methodId; + if (pyType == null) { + methodId = String.format("%s:%s.%s", fullyQualifiedClassName, fullyQualifiedClassName, stackFrame.getName()); + } else { + methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + } PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); - Long pyObjId = getSelfId(stackFrame.getID()); + Long pyObjId = pyType == null ? 1L : getSelfId(stackFrame.getID()); PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); List argValues = new ArrayList<>(); @@ -817,8 +834,13 @@ private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) private void onMethodExit(StackFrame stackFrame, String qualifiedClassName) { PyType pyType = (PyType) controller.getVMType(qualifiedClassName); - PyMethod pyMethod = (PyMethod) pyType.getMethodsByName(stackFrame.getName()).getFirst(); - // TODO construct method call with runtime values + String methodId; + if (pyType == null) { + methodId = String.format("%s:%s.%s", qualifiedClassName, qualifiedClassName, stackFrame.getName()); + } else { + methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + } + PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); controller.onMethodExit(pyMethod, pyMethod.getId()); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 0394111..09abac2 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -27,7 +27,14 @@ public static String getInstanceIds(String qualifiedClassName) { ); } - public static String getMethodSig(String fqcn, String methodName) { + public static String getMethodSig(String fqcn, String methodName, boolean isModule) { + if (isModule) { + return String.format( + """ + ','.join([p.name for p in __import__('inspect').signature(getattr(__import__('sys').modules['%s'], '%s')).parameters.values()]) + """, fqcn, methodName + ); + } String[] classNameParts = getClassNameParts(fqcn); return String.format( """ @@ -36,7 +43,33 @@ public static String getMethodSig(String fqcn, String methodName) { ); } - public static String getMethodBreakpointInfo(String qualifiedClassName, String methodName) { + public static String getMethodBreakpointInfo(String qualifiedClassName, String methodName, boolean isModule) { + if (isModule) { + return String.format( + """ + ( + lambda fn: { + "file": __import__('inspect').getsourcefile(fn), + "start": fn.__code__.co_firstlineno + 1, + "end": fn.__code__.co_firstlineno + len(__import__('inspect').getsourcelines(fn)[0]) - 1, + "returns": [ + node.lineno + fn.__code__.co_firstlineno - 1 + for node in __import__('ast').walk( + __import__('ast').parse( + __import__('textwrap').dedent( + "".join(__import__('inspect').getsourcelines(fn)[0]) + ) + ) + ) + if isinstance(node, __import__('ast').Return) + ] + } + )(getattr(__import__('sys').modules['%s'], '%s')) + """, + qualifiedClassName, + methodName + ); + } String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( """ diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 285597a..2afc158 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -112,11 +112,21 @@ public VMType getVMType(String fqcn) { return vmType; } - public VMMethod getVMMethod(String fqcn, String methodName) { + public VMMethod getVMMethod(String fqcn, String methodName, boolean isModule) { controller.newLogMessage(this, Level.FINE, String.format("Getting runtime method '%s' for type '%s'...", methodName, fqcn)); - VMMethod vmMethod = debugpyClient.getVMMethod(fqcn, methodName); + String classOrModuleName = fqcn; + String mName = methodName; + if (isModule) { + if (methodName.equals("__init__")) { + return null; + } + int lastDot = methodName.lastIndexOf('.'); + classOrModuleName = methodName.substring(0, lastDot); + mName = methodName.substring(lastDot + 1); + } + VMMethod vmMethod = debugpyClient.getVMMethod(classOrModuleName, mName, isModule); if (vmMethod == null) { - controller.newLogMessage(this, Level.WARNING, String.format("Could not find runtime method '%s' for type '%s'!", methodName, fqcn)); + controller.newLogMessage(this, Level.WARNING, String.format("Could not find runtime method '%s' for type '%s'!", mName, classOrModuleName)); } return vmMethod; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index e8204eb..6d0aa6b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -13,13 +13,15 @@ public class PyType implements VMType { private final String typeName; private final PythonAdapter adapter; + private final boolean isClass; private String file; private MClass useClass; - public PyType(PythonAdapter adapter, String typeName) { + public PyType(PythonAdapter adapter, String typeName, boolean isClass) { this.adapter = adapter; this.typeName = typeName; + this.isClass = isClass; } @Override @@ -42,6 +44,10 @@ public boolean isClassType() { return true; } + public boolean isModule() { + return !isClass; + } + @Override public Set getInstances() { return adapter.readInstances(this); @@ -49,7 +55,7 @@ public Set getInstances() { @Override public List getMethodsByName(String methodName) { - VMMethod vmMethod = adapter.getVMMethod(typeName, methodName); + VMMethod vmMethod = adapter.getVMMethod(typeName, methodName, !isClass); return (vmMethod != null) ? Collections.singletonList(vmMethod) : Collections.emptyList(); From e768053435b2020646d400c57e3f7a85c77aabae Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Thu, 23 Oct 2025 01:06:40 +0200 Subject: [PATCH 47/57] Separate concerns --- .../adapter/python/BreakpointHandler.java | 140 +++++ .../monitor/adapter/python/DebugpyClient.java | 531 ++---------------- .../use/monitor/adapter/python/Messenger.java | 365 ++++++++++++ .../monitor/adapter/python/PythonAdapter.java | 2 + 4 files changed, 568 insertions(+), 470 deletions(-) create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java new file mode 100644 index 0000000..0727156 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java @@ -0,0 +1,140 @@ +package org.tzi.use.monitor.adapter.python; + +import org.tzi.use.monitor.adapter.python.custom.DAPValue; +import org.tzi.use.monitor.adapter.python.dap.StackFrame; +import org.tzi.use.monitor.adapter.python.dap.StoppedEventClass; +import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; +import org.tzi.use.plugins.monitor.Monitor; +import org.tzi.use.uml.ocl.value.Value; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.logging.Level; + +/** + * This class is responsible for handling breakpoint events for + * constructor calls and method calls and exits, and informing + * the monitor of such events. + */ +public class BreakpointHandler implements Runnable { + + private final Monitor.Controller controller; + private final PythonAdapter adapter; + private final Messenger messenger; + private final DebugpyClient debugpyClient; + + public BreakpointHandler(DebugpyClient debugpyClient, PythonAdapter adapter, + Monitor.Controller controller, Messenger messenger) { + this.debugpyClient = debugpyClient; + this.adapter = adapter; + this.controller = controller; + this.messenger = messenger; + } + + @Override + public void run() { + while (debugpyClient.isConnected) { + try { + messenger.breakpointEventFuture = new CompletableFuture<>(); + StoppedEventClass breakpointEvent = messenger.breakpointEventFuture.get(); + if (!debugpyClient.isConnected) { + return; + } + Optional currFrameOpt = messenger.getCurrentFrame(Math.toIntExact(breakpointEvent.getBody().getThreadID())); + if (currFrameOpt.isEmpty()) { + throw new IllegalStateException(); + } + StackFrame currFrame = currFrameOpt.get(); + int currLineNo = (int) currFrame.getLine(); + String file = currFrame.getSource().getPath(); + String qualifiedClassName = debugpyClient.fileToClassNameMap.get(file).get(currLineNo); + + BreakpointType breakpointType = debugpyClient.fileToBreakpointTypeMap.get(file).get(currLineNo); + switch (breakpointType) { + case CONSTRUCTOR_CALL -> onConstructorCall(currFrame, qualifiedClassName); + case METHOD_CALL -> onMethodCall(currFrame, qualifiedClassName); + case METHOD_EXIT -> onMethodExit(currFrame, qualifiedClassName); + case MODIFICATION -> onAttrMod(currFrame, qualifiedClassName); + } + + debugpyClient.resume(); // Match monitor running state + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + } + } + + + + private void onConstructorCall(StackFrame currentFrame, String fullyQualifiedClassName) { + controller.newLogMessage(this, Level.FINE, "onConstructorCall: " + fullyQualifiedClassName + "." + currentFrame.getName()); + + PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); + PyObject pyObject = new PyObject(adapter, messenger.getSelfId(currentFrame.getID()), pyType); + + controller.onNewVMObject(pyObject); + } + + private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) { + controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); + + PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); + String methodId; + if (pyType == null) { + methodId = String.format("%s:%s.%s", fullyQualifiedClassName, fullyQualifiedClassName, stackFrame.getName()); + } else { + methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + } + PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); + + Long pyObjId = pyType == null ? 1L : messenger.getSelfId(stackFrame.getID()); + PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); + + List argValues = new ArrayList<>(); + for (String argName : pyMethod.getArgumentNames()) { + DAPValue argDAPValue = messenger.getMethodArgDAPValue(stackFrame.getID(), argName); + argValues.add(debugpyClient.getUSEValue(argDAPValue)); + } + + PyMethodCall pyMethodCall = new PyMethodCall(adapter, pyMethod, pyObject, argValues); + + controller.onMethodCall(pyMethodCall); + } + + private void onMethodExit(StackFrame stackFrame, String qualifiedClassName) { + PyType pyType = (PyType) controller.getVMType(qualifiedClassName); + String methodId; + if (pyType == null) { + methodId = String.format("%s:%s.%s", qualifiedClassName, qualifiedClassName, stackFrame.getName()); + } else { + methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + } + PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); + controller.onMethodExit(pyMethod, pyMethod.getId()); + } + + private void onAttrMod(StackFrame stackFrame, String qualifiedClassName) { + controller.newLogMessage(this, Level.FINE, "onAttributeModification: " + qualifiedClassName + "." + stackFrame.getName()); + + Long pyObjId = messenger.getSelfId(stackFrame.getID()); + PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); + + PyField pyField = (PyField) pyObject.getType().getFieldByName(stackFrame.getName().replace("set_", "")); + + String methodId = (String) pyObject.getType().getMethodsByName(stackFrame.getName()).getFirst().getId(); + PyMethod m = (PyMethod) controller.getVMMethod(methodId); + + // TODO FIX assert only one arg + List argValues = new ArrayList<>(); + for (String argName : m.getArgumentNames()) { + DAPValue argDAPValue = messenger.getMethodArgDAPValue(stackFrame.getID(), argName); + argValues.add(debugpyClient.getUSEValue(argDAPValue)); + } + + controller.onUpdateAttribute(pyObjId, pyField.getId(), argValues.get(0)); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 5c9d69d..f5d7f27 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -5,7 +5,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.tzi.use.monitor.adapter.python.custom.DAPValue; import org.tzi.use.monitor.adapter.python.dap.*; -import org.tzi.use.monitor.adapter.python.dap.Thread; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import org.tzi.use.plugins.monitor.Monitor; import org.tzi.use.plugins.monitor.vm.mm.VMField; @@ -21,7 +20,6 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; -import java.util.concurrent.*; import java.util.logging.Level; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -33,101 +31,35 @@ public class DebugpyClient { private static final Pattern MEMORY_ADDR_PATTERN = Pattern.compile("0x[0-9a-fA-F]+"); - private static int REQUEST_COUNTER = 1; - - private final Socket socket; - private final BufferedReader in; - private final BufferedWriter out; - private final ObjectMapper mapper = new ObjectMapper(); - private CompletableFuture futureResp; - private CompletableFuture initEventFuture; - private CompletableFuture pauseEventFuture; - private CompletableFuture breakpointEventFuture; - protected boolean running = false; + public boolean running = false; private final String workspace; private final String host; private final int port; private final PythonAdapter adapter; - private boolean isConnected; - private Map> fileToBreakpointTypeMap; - private Map> fileToClassNameMap; - private java.lang.Thread breakpointWatcher; - private Monitor.Controller controller; + public boolean isConnected; + public final Map> fileToBreakpointTypeMap = new HashMap<>(); + public final Map> fileToClassNameMap = new HashMap<>(); + private java.lang.Thread breakpointHandler; + private final Monitor.Controller controller; + private final Messenger messenger; DebugpyClient(String host, int port, String workspace, PythonAdapter adapter, Monitor.Controller controller) throws IOException { - this.socket = new Socket(host, port); - this.in = new BufferedReader(new InputStreamReader(socket.getInputStream())); - this.out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); this.workspace = workspace; this.host = host; this.port = port; this.controller = controller; - - fileToBreakpointTypeMap = new HashMap<>(); - fileToClassNameMap = new HashMap<>(); - + this.messenger = new Messenger(new Socket(host, port), this); this.adapter = adapter; - startReaderThread(); } boolean attach() { - initEventFuture = new CompletableFuture<>(); - - // Initialize - var initArgs = new InitializeRequestArguments(); - initArgs.setAdapterID("USE"); - initArgs.setLinesStartAt1(true); - initArgs.setColumnsStartAt1(true); - initArgs.setPathFormat("path"); - var initReq = new InitializeRequestClass(); - initReq.setSeq(REQUEST_COUNTER++); - initReq.setArguments(initArgs); - var initResp = (InitializeResponseClass) sendRequest(initReq); - - // Attach - var attachArgs = new AttachRequestArgumentsClass(); - attachArgs.setConnect(Map.of("host", host, "port", port)); - attachArgs.setPathMappings(List.of(Map.of("localRoot", workspace, "remoteRoot", "."))); - // FIXME: Dynamic OS resolution with debugpy expected values - attachArgs.setClientOs("unix"); - attachArgs.setDebugOptions(List.of("RedirectOutput", "ShowReturnValue")); - attachArgs.setShowReturnValue(true); - attachArgs.setJustMyCode(true); - attachArgs.setWorkspaceFolder(workspace); - attachArgs.setSessionId(UUID.randomUUID().toString()); - var attachReq = new AttachRequestClass(); - attachReq.setArguments(attachArgs); - attachReq.setSeq(REQUEST_COUNTER++); - sendAsyncRequest(attachReq); - - try { - initEventFuture.get(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - - System.out.println("Sending configuration done..."); - //Configuration Done - - var confDoneReq = new ConfigurationDoneRequestClass(); - confDoneReq.setSeq(REQUEST_COUNTER++); - // TODO Fix should not be async request - //Response confDoneResp = (Response) sendRequest(confDoneReq); - sendAsyncRequest(confDoneReq); - - // Wait for attach async response - // TODO FIX! responseQueue instead of single slot - //Response attachResponse = (Response) waitForAsyncResponse(); - //return initResp.getSuccess() && attachResponse.getSuccess() && confDoneResp.getSuccess(); - try { - java.lang.Thread.sleep(1000); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + var initResp = messenger.initialize(); + messenger.attach(host, port, workspace); + messenger.configurationDone(); running = true; - breakpointWatcher = new java.lang.Thread(new BreakpointHandler(), "BreakpointHandler"); - breakpointWatcher.start(); + breakpointHandler = new java.lang.Thread(new BreakpointHandler(this, adapter, controller, messenger), "BreakpointHandler"); + breakpointHandler.start(); isConnected = true; return initResp.getSuccess(); } @@ -136,32 +68,22 @@ PyType getVMType(String fqcn) { if (controller.existsVMType(fqcn)) { controller.getVMType(fqcn); } - if (fqcn.equals("Global")) { return new PyType(adapter, fqcn, false); } - if (fqcn.equals("Mock")) { return new PyType(adapter, fqcn, true); } - // TODO: Comment why pause here is needed - pause(); + pause(); // Match monitor state - PyType pyType = new PyType(adapter, fqcn, true); + Optional fileOpt = messenger.evaluate(PyEvalExBuilder.getFileForClass(fqcn)); + if (fileOpt.isEmpty()) { + return null; + } - // Set File - var evalArgs = new EvaluateRequestArguments(); - evalArgs.setContext("watch"); - evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); - evalArgs.setExpression(PyEvalExBuilder.getFileForClass(fqcn)); - var evalReq = new EvaluateRequestClass(); - evalReq.setSeq(REQUEST_COUNTER++); - evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - - String file = evalResp.getBody().getResult(); - String normalizedPath = Path.of(file).normalize().toString().replace("'", ""); + PyType pyType = new PyType(adapter, fqcn, true); + String normalizedPath = Path.of(fileOpt.get()).normalize().toString().replace("'", ""); pyType.setFile(normalizedPath); controller.storeVMType(fqcn, pyType); @@ -174,24 +96,20 @@ protected VMMethod getVMMethod(String fqcn, String methodName, boolean isModule) return controller.getVMMethod(methodId); } - var evalArgs = new EvaluateRequestArguments(); - evalArgs.setContext("watch"); - evalArgs.setFrameID((long) getCurrentFrameId(getThreadId("MainThread"))); - evalArgs.setExpression(PyEvalExBuilder.getMethodSig(fqcn, methodName, isModule)); - var evalReq = new EvaluateRequestClass(); - evalReq.setSeq(REQUEST_COUNTER++); - evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + Optional methodArgumentsOpt = messenger.evaluate(PyEvalExBuilder.getMethodSig(fqcn, methodName, isModule)); + if (methodArgumentsOpt.isEmpty()) { + return null; + } - var resultBody = evalResp.getBody(); + String methodArguments = methodArgumentsOpt.get(); - if (!evalResp.getSuccess() || resultBody.getResult().equals("''")) { + if (methodArguments.equals("''")) { return null; } PyMethod pyMethod = new PyMethod(adapter, isModule ? fqcn + "." + methodName : methodName, fqcn); - String escapedResult = resultBody.getResult().substring(1, resultBody.getResult().length() - 1); + String escapedResult = methodArguments.substring(1, methodArguments.length() - 1); List argNames = new ArrayList<>(); List argTypes = new ArrayList<>(); @@ -206,11 +124,12 @@ protected VMMethod getVMMethod(String fqcn, String methodName, boolean isModule) pyMethod.setArgumentTypes(argTypes); // Set line nos and filename - evalArgs.setExpression(PyEvalExBuilder.getMethodBreakpointInfo(fqcn, methodName, isModule)); - evalReq.setSeq(REQUEST_COUNTER++); - evalResp = (EvaluateResponseClass) sendRequest(evalReq); + Optional breakpointInfoOpt = messenger.evaluate(PyEvalExBuilder.getMethodBreakpointInfo(fqcn, methodName, isModule)); + if (breakpointInfoOpt.isEmpty()) { + return null; + } - String json = evalResp.getBody().getResult().replace("'", "\""); + String json = breakpointInfoOpt.get().replace("'", "\""); ObjectMapper mapper = new ObjectMapper(); JsonNode root; try { @@ -248,66 +167,27 @@ protected VMField getVMField(String fqcn, String fieldName) { } protected DAPValue getDAPValue(Long objectId, String fName) { - var evalArgs = new EvaluateRequestArguments(); - evalArgs.setExpression(PyEvalExBuilder.getDAPValue(objectId, fName)); - evalArgs.setFrameID(getCurrentFrame(getThreadId("MainThread")).getID()); - evalArgs.setContext("watch"); - var evalReq = new EvaluateRequestClass(); - evalReq.setSeq(REQUEST_COUNTER++); - evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); + EvaluateResponseClass evalResp = messenger.evaluateRaw(PyEvalExBuilder.getDAPValue(objectId, fName)); + if (!evalResp.getSuccess()) { + return null; + } + EvaluateResponseBody body = evalResp.getBody(); + return new DAPValue(body.getResult(), body.getType(), body.getVariablesReference()); } protected boolean setBreakpoints(String file) { Set lines = fileToBreakpointTypeMap.get(file).keySet(); - var source = new Source(); - source.setName(file.substring(file.lastIndexOf("/") + 1)); - source.setPath(file); - var bpArgs = new SetBreakpointsRequestArguments(); - bpArgs.setSource(source); - SourceBreakpoint[] sourceBreakpoints = new SourceBreakpoint[lines.size()]; - Iterator linesIter = lines.iterator(); - for (int i = 0; i < sourceBreakpoints.length; i++) { - var srcBp = new SourceBreakpoint(); - srcBp.setLine(linesIter.next()); - sourceBreakpoints[i] = srcBp; - } - bpArgs.setBreakpoints(sourceBreakpoints); - bpArgs.setLines(lines.stream().mapToLong(Integer::longValue).toArray()); - bpArgs.setSourceModified(false); - var bpReq = new SetBreakpointsRequestClass(); - bpReq.setSeq(REQUEST_COUNTER++); - bpReq.setArguments(bpArgs); - var bpResp = (SetBreakpointsResponseClass) sendRequest(bpReq); - return bpResp.getSuccess(); + return messenger.setBreakpoints(file, lines); } protected boolean pause() { if (!running) { return true; } - - pauseEventFuture = new CompletableFuture<>(); - - var pauseArgs = new PauseRequestArguments(); - pauseArgs.setThreadID(getThreadId("MainThread")); - var pauseReq = new PauseRequestClass(); - pauseReq.setSeq(REQUEST_COUNTER++); - pauseReq.setArguments(pauseArgs); - var pauseResp = (PauseResponseClass) sendRequest(pauseReq); - - if (!pauseResp.getSuccess()) { + if (!messenger.pause()) { controller.newLogMessage(this, Level.SEVERE, "Failed to pause debugpy!"); return false; } - - try { - pauseEventFuture.get(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - running = false; return true; } @@ -316,68 +196,22 @@ protected boolean resume() { if (running) { return true; } - var continueArgs = new ContinueRequestArguments(); - continueArgs.setThreadID(getThreadId("MainThread")); - var continueReq = new ContinueRequestClass(); - continueReq.setSeq(REQUEST_COUNTER++); - continueReq.setArguments(continueArgs); - var continueResp = (ContinueResponseClass) sendRequest(continueReq); + boolean res = messenger.resume(); + if (!res) { + controller.newLogMessage(this, Level.SEVERE, "Failed to resume debugpy!"); + return false; + } running = true; - return continueResp.getSuccess(); - } - - protected boolean stop() { - var stopArgs = new DisconnectRequestArguments(); - stopArgs.setRestart(false); - stopArgs.setSuspendDebuggee(true); - stopArgs.setTerminateDebuggee(false); - var stopReq = new DisconnectRequestClass(); - stopReq.setSeq(REQUEST_COUNTER++); - stopReq.setArguments(stopArgs); - var stopResp = (DisconnectResponseClass) sendRequest(stopReq); - isConnected = false; - return stopResp.getSuccess(); + return true; } - protected int getThreadId(String threadName) { - System.out.println("Getting thread id: " + threadName); - var threadsReq = new ThreadsRequestClass(); - threadsReq.setSeq(REQUEST_COUNTER++); - var threadsResp = (ThreadsResponseClass) sendRequest(threadsReq); - for (Thread thread : threadsResp.getBody().getThreads()) { - if (thread.getName().equals(threadName)) { - System.out.println("Found thread: " + thread.getName() + " with id: " + thread.getID()); - return (int) thread.getID(); - } + protected void stop() { + boolean res = messenger.stop(); + if (!res) { + controller.newLogMessage(this, Level.SEVERE, "Failed to stop debugpy!"); + } else { + isConnected = false; } - return -1; - } - - private int getCurrentFrameId(int threadId) { - var stackTraceArgs = new StackTraceRequestArguments(); - stackTraceArgs.setThreadID(threadId); - var stackTraceReq = new StackTraceRequestClass(); - stackTraceReq.setSeq(REQUEST_COUNTER++); - stackTraceReq.setArguments(stackTraceArgs); - var stackTraceResp = (StackTraceResponseClass) sendRequest(stackTraceReq); - return (int) stackTraceResp.getBody().getStackFrames()[0].getID(); - } - - protected StackFrame getCurrentFrame(int threadId) { - var stackTraceArgs = new StackTraceRequestArguments(); - stackTraceArgs.setThreadID(threadId); - var stackTraceReq = new StackTraceRequestClass(); - stackTraceReq.setSeq(REQUEST_COUNTER++); - stackTraceReq.setArguments(stackTraceArgs); - var stackTraceResp = (StackTraceResponseClass) sendRequest(stackTraceReq); - return stackTraceResp.getBody().getStackFrames()[0]; - } - - protected Thread[] getThreads() { - var threadsReq = new ThreadsRequestClass(); - threadsReq.setSeq(REQUEST_COUNTER++); - var threadsResp = (ThreadsResponseClass) sendRequest(threadsReq); - return threadsResp.getBody().getThreads(); } protected Set getInstances(PyType pyType) { @@ -389,24 +223,17 @@ protected Set getInstances(PyType pyType) { pause(); - long frameId = getCurrentFrameId(getThreadId("MainThread")); - - var evalArgs = new EvaluateRequestArguments(); - evalArgs.setContext("watch"); - evalArgs.setFrameID(frameId); - evalArgs.setExpression(PyEvalExBuilder.getInstanceIds(pyType.getName())); - var evalReq = new EvaluateRequestClass(); - evalReq.setSeq(REQUEST_COUNTER++); - evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - - String result = evalResp.getBody().getResult(); - + Optional instanceIdsOpt = messenger.evaluate(PyEvalExBuilder.getInstanceIds(pyType.getName())); + if (instanceIdsOpt.isEmpty()) { + controller.newLogMessage(this, Level.SEVERE, String.format("Could not query instances for type '%s'", pyType.getName())); + return Set.of(); + } + String instanceIds = instanceIdsOpt.get(); Set objs = new HashSet<>(); - if (result.equals("[]")) { + if (instanceIds.equals("[]")) { return objs; } - String[] ids = result.substring(1, result.length() - 1).split(","); + String[] ids = instanceIds.substring(1, instanceIds.length() - 1).split(","); for (String id : ids) { // TODO: Fix debugpy list truncation if (id.trim().equals("...")) { @@ -419,143 +246,6 @@ protected Set getInstances(PyType pyType) { return objs; } - public Variable[] getDAPChildren(long variablesReference) { - var varArgs = new VariablesRequestArguments(); - varArgs.setVariablesReference(variablesReference); - var varReq = new VariablesRequestClass(); - varReq.setSeq(REQUEST_COUNTER++); - varReq.setArguments(varArgs); - var varResp = (VariablesResponseClass) sendRequest(varReq); - return varResp.getBody().getVariables(); - } - - protected Long getSelfId(long frameId) { - var evalArgs = new EvaluateRequestArguments(); - evalArgs.setFrameID(frameId); - evalArgs.setContext("watch"); - evalArgs.setExpression(PyEvalExBuilder.getSelfIdAtCurrentFrame()); - var evalReq = new EvaluateRequestClass(); - evalReq.setSeq(REQUEST_COUNTER++); - evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - return Long.parseLong(evalResp.getBody().getResult()); - } - - protected DAPValue getMethodArgDAPValue(long frameId, String argName){ - var evalArgs = new EvaluateRequestArguments(); - evalArgs.setFrameID(frameId); - evalArgs.setContext("watch"); - evalArgs.setExpression(argName); - var evalReq = new EvaluateRequestClass(); - evalReq.setSeq(REQUEST_COUNTER++); - evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); - return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); - } - - private DAPResponse sendRequest(DAPRequest dapRequest) { - sendAsyncRequest(dapRequest); - return waitForAsyncResponse(); - } - - private DAPResponse waitForAsyncResponse() { - DAPResponse res; - try { - System.out.println("Waiting for response..."); - res = futureResp.get(); - System.out.println("Finished waiting for response..."); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - return res; - } - - private void sendAsyncRequest(DAPRequest DAPRequest) { - futureResp = new CompletableFuture<>(); - - String json; - try { - json = mapper.writeValueAsString(DAPRequest); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - - String header = "Content-Length: " + json.length() + "\r\n\r\n"; - - try { - System.out.println("Sending request: " + header + json); - out.write(header + json); - out.flush(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - private void startReaderThread() { - var readerThread = new java.lang.Thread(() -> { - System.out.println("Reader thread started..."); - try { - while (true) { - String line; - int contentLength = 0; - while ((line = in.readLine()) != null && !line.isEmpty()) { - contentLength = Integer.parseInt(line.substring("Content-Length:".length()).trim()); - } - char[] body = new char[contentLength]; - int read = 0; - while (read < contentLength) { - int r = in.read(body, read, contentLength - read); - if (r == -1) throw new IOException("Unexpected end of stream"); - read += r; - } - String json = new String(body); - if (json.isEmpty()) { - continue; - } - System.out.println("Received json response: " + json); - DAPMessage msg = MessageMapper.parseMessage(json); - System.out.println("Parsed json response to object..."); - if (msg == null) { - System.out.println("Skipping unknown message type..."); - continue; - } - if (msg instanceof DAPResponse) { - System.out.println("Response instance: " + msg); - // TODO FIX workaround - // int reqSeq = ((DAPResponse) msg).getRequestSequence(); - //if (reqSeq == currReqSeq - 1) { - System.out.println("Matched response: " + json); - if (futureResp.complete((DAPResponse) msg)) { - System.out.println("Response completed!"); - } - //} else { - // System.out.println("Ignored async message: " + json); - //} - } - if (msg instanceof DAPEvent dapEvent) { - if (dapEvent instanceof InitializedEventClass initializedEvent) { - initEventFuture.complete(initializedEvent); - } - if (dapEvent instanceof StoppedEventClass stoppedEvent) { - running = false; - String reason = stoppedEvent.getBody().getReason(); - if (reason.equals("pause")) { - pauseEventFuture.complete(stoppedEvent); - } - if (reason.equals("breakpoint")) { - breakpointEventFuture.complete(stoppedEvent); - } - } - } - } - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - readerThread.setDaemon(true); - readerThread.start(); - } - public Value getUSEValue(DAPValue dapValue) { if (dapValue == null) { return UndefinedValue.instance; @@ -694,7 +384,7 @@ private long extractHexAndConvertToDecimal(String input) { private List fetchChildren(long variablesReference) { List res = new ArrayList<>(); - Variable[] vars = getDAPChildren(variablesReference); + Variable[] vars = messenger.getDAPChildren(variablesReference); for (Variable var : vars) { var dapVal = new DAPValue(var.getValue(), var.getType(), var.getVariablesReference()); dapVal.setName(var.getName()); @@ -766,103 +456,4 @@ private void updateInternalBreakpointMappings(String file, String className, Lis } } - private class BreakpointHandler implements Runnable { - @Override - public void run() { - while (isConnected) { - try { - breakpointEventFuture = new CompletableFuture<>(); - StoppedEventClass breakpointEvent = breakpointEventFuture.get(); - if (!isConnected) { - return; - } - StackFrame currFrame = getCurrentFrame(Math.toIntExact(breakpointEvent.getBody().getThreadID())); - int currLineNo = (int) currFrame.getLine(); - String file = currFrame.getSource().getPath(); - String qualifiedClassName = fileToClassNameMap.get(file).get(currLineNo); - - BreakpointType breakpointType = fileToBreakpointTypeMap.get(file).get(currLineNo); - switch (breakpointType) { - case CONSTRUCTOR_CALL -> onConstructorCall(currFrame, qualifiedClassName); - case METHOD_CALL -> onMethodCall(currFrame, qualifiedClassName); - case METHOD_EXIT -> onMethodExit(currFrame, qualifiedClassName); - case MODIFICATION -> onAttrMod(currFrame, qualifiedClassName); - } - - resume(); // Match monitor running state - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - } - } - } - - private void onConstructorCall(StackFrame currentFrame, String fullyQualifiedClassName) { - controller.newLogMessage(this, Level.FINE, "onConstructorCall: " + fullyQualifiedClassName + "." + currentFrame.getName()); - - PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); - PyObject pyObject = new PyObject(adapter, getSelfId(currentFrame.getID()), pyType); - - controller.onNewVMObject(pyObject); - } - - private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) { - controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); - - PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); - String methodId; - if (pyType == null) { - methodId = String.format("%s:%s.%s", fullyQualifiedClassName, fullyQualifiedClassName, stackFrame.getName()); - } else { - methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); - } - PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); - - Long pyObjId = pyType == null ? 1L : getSelfId(stackFrame.getID()); - PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); - - List argValues = new ArrayList<>(); - for (String argName : pyMethod.getArgumentNames()) { - DAPValue argDAPValue = getMethodArgDAPValue(stackFrame.getID(), argName); - argValues.add(getUSEValue(argDAPValue)); - } - - PyMethodCall pyMethodCall = new PyMethodCall(adapter, pyMethod, pyObject, argValues); - - controller.onMethodCall(pyMethodCall); - } - - private void onMethodExit(StackFrame stackFrame, String qualifiedClassName) { - PyType pyType = (PyType) controller.getVMType(qualifiedClassName); - String methodId; - if (pyType == null) { - methodId = String.format("%s:%s.%s", qualifiedClassName, qualifiedClassName, stackFrame.getName()); - } else { - methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); - } - PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); - controller.onMethodExit(pyMethod, pyMethod.getId()); - } - - private void onAttrMod(StackFrame stackFrame, String qualifiedClassName) { - controller.newLogMessage(this, Level.FINE, "onAttributeModification: " + qualifiedClassName + "." + stackFrame.getName()); - - Long pyObjId = getSelfId(stackFrame.getID()); - PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); - - PyField pyField = (PyField) pyObject.getType().getFieldByName(stackFrame.getName().replace("set_", "")); - - String methodId = (String) pyObject.getType().getMethodsByName(stackFrame.getName()).getFirst().getId(); - PyMethod m = (PyMethod) controller.getVMMethod(methodId); - - // TODO FIX assert only one arg - List argValues = new ArrayList<>(); - for (String argName : m.getArgumentNames()) { - DAPValue argDAPValue = getMethodArgDAPValue(stackFrame.getID(), argName); - argValues.add(getUSEValue(argDAPValue)); - } - - controller.onUpdateAttribute(pyObjId, pyField.getId(), argValues.get(0)); - } - } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java new file mode 100644 index 0000000..8f4d521 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java @@ -0,0 +1,365 @@ +package org.tzi.use.monitor.adapter.python; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.tzi.use.monitor.adapter.python.custom.DAPValue; +import org.tzi.use.monitor.adapter.python.dap.*; +import org.tzi.use.monitor.adapter.python.dap.Thread; + +import java.io.*; +import java.net.Socket; +import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +/** + * This class is responsible for sending and receiving messages to and from + * the debugpy socket. + */ +public class Messenger { + + public static int REQUEST_COUNTER = 1; + + private final ObjectMapper mapper = new ObjectMapper(); + + private final Socket socket; + private final BufferedReader in; + private final BufferedWriter out; + + private final DebugpyClient client; + + private CompletableFuture futureResp; + private CompletableFuture initEventFuture; + private CompletableFuture pauseEventFuture; + public CompletableFuture breakpointEventFuture; + + public Messenger(Socket socket, DebugpyClient client) throws IOException { + this.socket = socket; + this.in = new BufferedReader(new InputStreamReader(socket.getInputStream())); + this.out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); + startReaderThread(); + this.client = client; + } + + public InitializeResponseClass initialize() { + initEventFuture = new CompletableFuture<>(); + var initArgs = new InitializeRequestArguments(); + initArgs.setAdapterID("USE"); + initArgs.setLinesStartAt1(true); + initArgs.setColumnsStartAt1(true); + initArgs.setPathFormat("path"); + var initReq = new InitializeRequestClass(); + initReq.setSeq(REQUEST_COUNTER++); + initReq.setArguments(initArgs); + return (InitializeResponseClass) sendRequest(initReq); + } + + public void attach(String host, int port, String workspace) { + var attachArgs = new AttachRequestArgumentsClass(); + attachArgs.setConnect(Map.of("host", host, "port", port)); + attachArgs.setPathMappings(List.of(Map.of("localRoot", workspace, "remoteRoot", "."))); + // FIXME: Dynamic OS resolution with debugpy expected values + attachArgs.setClientOs("unix"); + attachArgs.setDebugOptions(List.of("RedirectOutput", "ShowReturnValue")); + attachArgs.setShowReturnValue(true); + attachArgs.setJustMyCode(true); + attachArgs.setWorkspaceFolder(workspace); + attachArgs.setSessionId(UUID.randomUUID().toString()); + var attachReq = new AttachRequestClass(); + attachReq.setArguments(attachArgs); + attachReq.setSeq(REQUEST_COUNTER++); + sendAsyncRequest(attachReq); + + try { + initEventFuture.get(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + } + + public void configurationDone() { + var confDoneReq = new ConfigurationDoneRequestClass(); + confDoneReq.setSeq(REQUEST_COUNTER++); + // TODO Fix should not be async request + //Response confDoneResp = (Response) sendRequest(confDoneReq); + sendAsyncRequest(confDoneReq); + + // Wait for attach async response + // TODO FIX! responseQueue instead of single slot + //Response attachResponse = (Response) waitForAsyncResponse(); + //return initResp.getSuccess() && attachResponse.getSuccess() && confDoneResp.getSuccess(); + try { + java.lang.Thread.sleep(1000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + + } + + public boolean pause() { + pauseEventFuture = new CompletableFuture<>(); + + var pauseArgs = new PauseRequestArguments(); + var threadIdOpt = getThreadId(); + if (threadIdOpt.isEmpty()) { + return false; + } + pauseArgs.setThreadID(threadIdOpt.get()); + var pauseReq = new PauseRequestClass(); + pauseReq.setSeq(REQUEST_COUNTER++); + pauseReq.setArguments(pauseArgs); + var pauseResp = (PauseResponseClass) sendRequest(pauseReq); + + if (!pauseResp.getSuccess()) { + return false; + } + + try { + pauseEventFuture.get(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + return true; + } + + public boolean resume() { + var continueArgs = new ContinueRequestArguments(); + continueArgs.setThreadID(getThreadId().get()); + var continueReq = new ContinueRequestClass(); + continueReq.setSeq(REQUEST_COUNTER++); + continueReq.setArguments(continueArgs); + return ((ContinueResponseClass) sendRequest(continueReq)).getSuccess(); + } + + + protected Long getSelfId(long frameId) { + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setFrameID(frameId); + evalArgs.setContext("watch"); + evalArgs.setExpression(PyEvalExBuilder.getSelfIdAtCurrentFrame()); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + return Long.parseLong(evalResp.getBody().getResult()); + } + + + + public Variable[] getDAPChildren(long variablesReference) { + var varArgs = new VariablesRequestArguments(); + varArgs.setVariablesReference(variablesReference); + var varReq = new VariablesRequestClass(); + varReq.setSeq(REQUEST_COUNTER++); + varReq.setArguments(varArgs); + var varResp = (VariablesResponseClass) sendRequest(varReq); + return varResp.getBody().getVariables(); + } + + + public boolean stop() { + var stopArgs = new DisconnectRequestArguments(); + stopArgs.setRestart(false); + stopArgs.setSuspendDebuggee(true); + stopArgs.setTerminateDebuggee(false); + var stopReq = new DisconnectRequestClass(); + stopReq.setSeq(REQUEST_COUNTER++); + stopReq.setArguments(stopArgs); + return ((DisconnectResponseClass) sendRequest(stopReq)).getSuccess(); + } + + public boolean setBreakpoints(String file, Set lines) { + var source = new Source(); + source.setName(file.substring(file.lastIndexOf("/") + 1)); + source.setPath(file); + var bpArgs = new SetBreakpointsRequestArguments(); + bpArgs.setSource(source); + SourceBreakpoint[] sourceBreakpoints = new SourceBreakpoint[lines.size()]; + Iterator linesIter = lines.iterator(); + for (int i = 0; i < sourceBreakpoints.length; i++) { + var srcBp = new SourceBreakpoint(); + srcBp.setLine(linesIter.next()); + sourceBreakpoints[i] = srcBp; + } + bpArgs.setBreakpoints(sourceBreakpoints); + bpArgs.setLines(lines.stream().mapToLong(Integer::longValue).toArray()); + bpArgs.setSourceModified(false); + var bpReq = new SetBreakpointsRequestClass(); + bpReq.setSeq(REQUEST_COUNTER++); + bpReq.setArguments(bpArgs); + var bpResp = (SetBreakpointsResponseClass) sendRequest(bpReq); + return bpResp.getSuccess(); + } + + public Optional evaluate(String expression) { + EvaluateResponseClass raw = evaluateRaw(expression); + if (raw == null) { + return Optional.empty(); + } + return raw.getSuccess() + ? Optional.of(raw.getBody().getResult()) + : Optional.empty(); + } + + protected DAPValue getMethodArgDAPValue(long frameId, String argName){ + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setFrameID(frameId); + evalArgs.setContext("watch"); + evalArgs.setExpression(argName); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); + } + + public EvaluateResponseClass evaluateRaw(String expression) { + Optional threadIdOpt = getThreadId(); + if (threadIdOpt.isEmpty()) { + return null; + } + Optional currStackFrameOpt = getCurrentFrame(threadIdOpt.get()); + if (currStackFrameOpt.isEmpty()) { + return null; + } + var evalArgs = new EvaluateRequestArguments(); + evalArgs.setContext("watch"); + evalArgs.setFrameID(currStackFrameOpt.get().getID()); + evalArgs.setExpression(expression); + var evalReq = new EvaluateRequestClass(); + evalReq.setSeq(REQUEST_COUNTER++); + evalReq.setArguments(evalArgs); + return (EvaluateResponseClass) sendRequest(evalReq); + } + + public Optional getThreadId() { + var threadsReq = new ThreadsRequestClass(); + threadsReq.setSeq(REQUEST_COUNTER++); + var threadsResp = (ThreadsResponseClass) sendRequest(threadsReq); + if (threadsResp.getSuccess()) { + for (Thread thread : threadsResp.getBody().getThreads()) { + if (thread.getName().equals("MainThread")) { + return Optional.of(thread.getID()); + } + } + } + return Optional.empty(); + } + + public Optional getCurrentFrame(long threadId) { + var stackTraceArgs = new StackTraceRequestArguments(); + stackTraceArgs.setThreadID(threadId); + var stackTraceReq = new StackTraceRequestClass(); + stackTraceReq.setSeq(REQUEST_COUNTER++); + stackTraceReq.setArguments(stackTraceArgs); + var stackTraceResp = (StackTraceResponseClass) sendRequest(stackTraceReq); + + return stackTraceResp.getSuccess() + ? Optional.of(stackTraceResp.getBody().getStackFrames()[0]) + : Optional.empty(); + } + + private DAPResponse sendRequest(DAPRequest dapRequest) { + sendAsyncRequest(dapRequest); + return waitForAsyncResponse(); + } + + private DAPResponse waitForAsyncResponse() { + DAPResponse res; + try { + System.out.println("Waiting for response..."); + res = futureResp.get(); + System.out.println("Finished waiting for response..."); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + return res; + } + + private void sendAsyncRequest(DAPRequest DAPRequest) { + futureResp = new CompletableFuture<>(); + + String json; + try { + json = mapper.writeValueAsString(DAPRequest); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + + String header = "Content-Length: " + json.length() + "\r\n\r\n"; + + try { + System.out.println("Sending request: " + header + json); + out.write(header + json); + out.flush(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private void startReaderThread() { + var readerThread = new java.lang.Thread(() -> { + System.out.println("Reader thread started..."); + try { + while (true) { + String line; + int contentLength = 0; + while ((line = in.readLine()) != null && !line.isEmpty()) { + contentLength = Integer.parseInt(line.substring("Content-Length:".length()).trim()); + } + char[] body = new char[contentLength]; + int read = 0; + while (read < contentLength) { + int r = in.read(body, read, contentLength - read); + if (r == -1) throw new IOException("Unexpected end of stream"); + read += r; + } + String json = new String(body); + if (json.isEmpty()) { + continue; + } + System.out.println("Received json response: " + json); + DAPMessage msg = MessageMapper.parseMessage(json); + System.out.println("Parsed json response to object..."); + if (msg == null) { + System.out.println("Skipping unknown message type..."); + continue; + } + if (msg instanceof DAPResponse) { + System.out.println("Response instance: " + msg); + // TODO FIX workaround + // int reqSeq = ((DAPResponse) msg).getRequestSequence(); + //if (reqSeq == currReqSeq - 1) { + System.out.println("Matched response: " + json); + if (futureResp.complete((DAPResponse) msg)) { + System.out.println("Response completed!"); + } + //} else { + // System.out.println("Ignored async message: " + json); + //} + } + if (msg instanceof DAPEvent dapEvent) { + if (dapEvent instanceof InitializedEventClass initializedEvent) { + initEventFuture.complete(initializedEvent); + } + if (dapEvent instanceof StoppedEventClass stoppedEvent) { + client.running = false; + String reason = stoppedEvent.getBody().getReason(); + if (reason.equals("pause")) { + pauseEventFuture.complete(stoppedEvent); + } + if (reason.equals("breakpoint")) { + breakpointEventFuture.complete(stoppedEvent); + } + } + } + } + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + readerThread.setDaemon(true); + readerThread.start(); + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 2afc158..98c36a4 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -28,6 +28,7 @@ public class PythonAdapter extends AbstractVMAdapter { private String workspace; private DebugpyClient debugpyClient; + // FIXME: More robust validation @Override protected void validateSettings() throws InvalidAdapterConfiguration { List settings = getSettings(); @@ -46,6 +47,7 @@ protected void validateSettings() throws InvalidAdapterConfiguration { String settingWorkspace = settings.get(SETTING_WORKSPACE_IDX).value; try { + // FIXME: SUM should not be assumed to be in the localhost. Path workspacePath = Path.of(settingWorkspace); boolean isValidDir = Files.isDirectory(workspacePath); if (isValidDir) { From 213416e79433aadc7c6be2c0736dfd3ac132ef35 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 28 Oct 2025 14:48:33 +0100 Subject: [PATCH 48/57] Fix relative file path --- .../org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 09abac2..e3e5668 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -49,7 +49,7 @@ public static String getMethodBreakpointInfo(String qualifiedClassName, String m """ ( lambda fn: { - "file": __import__('inspect').getsourcefile(fn), + "file": __import__('os').path.abspath(__import__('inspect').getsourcefile(fn)), "start": fn.__code__.co_firstlineno + 1, "end": fn.__code__.co_firstlineno + len(__import__('inspect').getsourcelines(fn)[0]) - 1, "returns": [ @@ -75,7 +75,7 @@ public static String getMethodBreakpointInfo(String qualifiedClassName, String m """ ( lambda fn: { - "file": __import__('inspect').getsourcefile(fn), + "file": __import__('os').path.abspath(__import__('inspect').getsourcefile(fn)), "start": fn.__code__.co_firstlineno + 1, "end": fn.__code__.co_firstlineno + len(__import__('inspect').getsourcelines(fn)[0]) - 1, "returns": [ From dd6ced313260cec0bcff8c37c535eadc3e74f0c1 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 28 Oct 2025 14:49:37 +0100 Subject: [PATCH 49/57] Rm constructor argument vmField restriction --- .../org/tzi/use/monitor/adapter/python/DebugpyClient.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index f5d7f27..b13c745 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -157,12 +157,8 @@ protected VMField getVMField(String fqcn, String fieldName) { if (controller.existsVMField(fId)) { return controller.getVMField(fId); } - PyField pyField = null; - PyMethod initMethod = (PyMethod) getVMMethod(fqcn, "__init__", false); - if (initMethod != null && initMethod.getArgumentNames().stream().anyMatch(argName -> argName.equals(fieldName))) { - pyField = new PyField(adapter, fieldName, fqcn); - controller.storeVMField(pyField.getId(), pyField); - } + PyField pyField = new PyField(adapter, fieldName, fqcn); + controller.storeVMField(pyField.getId(), pyField); return pyField; } From e97a4300e5a75a9e926b343ce33b121483c5d9a2 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Tue, 28 Oct 2025 14:50:11 +0100 Subject: [PATCH 50/57] Fix constructor breakpoint placement --- .../java/org/tzi/use/monitor/adapter/python/DebugpyClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index b13c745..60f50ab 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -395,7 +395,7 @@ public boolean registerConstructorCallInterest(PyType pyType) { } PyMethod method = ((PyMethod) pyType.getMethodsByName("__init__").getFirst()); String file = method.getFile(); - int endLineNo = method.getEndLineNo(); + int endLineNo = method.getStartLineNo(); String className = method.getClassName(); updateInternalBreakpointMappings(file, className, List.of(endLineNo), BreakpointType.CONSTRUCTOR_CALL); From deeee88b6a0197691d831dbea1064a9cd8c31eef Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Wed, 5 Nov 2025 22:49:23 +0100 Subject: [PATCH 51/57] Add continued event --- .../monitor/adapter/python/DebugpyClient.java | 1 + .../monitor/adapter/python/MessageMapper.java | 1 + .../use/monitor/adapter/python/Messenger.java | 27 +++++++++++++++---- .../python/dap/ContinuedEventClass.java | 15 ++++++----- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 60f50ab..ee2d800 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -25,6 +25,7 @@ import java.util.regex.Pattern; /** + * * @author Sergio Jimenez */ public class DebugpyClient { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java index ba47dd2..b967252 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -46,6 +46,7 @@ private static DAPEvent parseEvent(JsonNode tree, String json) throws JsonProces case "initialized" -> mapper.readValue(json, InitializedEventClass.class); case "stopped" -> mapper.readValue(json, StoppedEventClass.class); case "terminated" -> mapper.readValue(json, TerminatedEventClass.class); + case "continued" -> mapper.readValue(json, ContinuedEventClass.class); default -> null; }; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java index 8f4d521..2d2dc13 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java @@ -28,10 +28,11 @@ public class Messenger { private final DebugpyClient client; - private CompletableFuture futureResp; - private CompletableFuture initEventFuture; - private CompletableFuture pauseEventFuture; - public CompletableFuture breakpointEventFuture; + private CompletableFuture futureResp = new CompletableFuture<>(); + private CompletableFuture initEventFuture = new CompletableFuture<>(); + private CompletableFuture pauseEventFuture = new CompletableFuture<>(); + private CompletableFuture continuedEventFuture = new CompletableFuture<>(); + public CompletableFuture breakpointEventFuture = new CompletableFuture<>(); public Messenger(Socket socket, DebugpyClient client) throws IOException { this.socket = socket; @@ -123,12 +124,24 @@ public boolean pause() { } public boolean resume() { + continuedEventFuture = new CompletableFuture<>(); + var continueArgs = new ContinueRequestArguments(); continueArgs.setThreadID(getThreadId().get()); var continueReq = new ContinueRequestClass(); continueReq.setSeq(REQUEST_COUNTER++); continueReq.setArguments(continueArgs); - return ((ContinueResponseClass) sendRequest(continueReq)).getSuccess(); + if (!((ContinueResponseClass) sendRequest(continueReq)).getSuccess()) { + return false; + } + + try { + continuedEventFuture.get(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + + return true; } @@ -342,6 +355,10 @@ private void startReaderThread() { if (dapEvent instanceof InitializedEventClass initializedEvent) { initEventFuture.complete(initializedEvent); } + if (dapEvent instanceof ContinuedEventClass continuedEventClass) { + client.running = true; + continuedEventFuture.complete(continuedEventClass); + } if (dapEvent instanceof StoppedEventClass stoppedEvent) { client.running = false; String reason = stoppedEvent.getBody().getReason(); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java index 4ab770d..7c15aec 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java @@ -13,11 +13,12 @@ * It is only necessary to send a `continued` event if there was no previous request that * implied this. */ -public class ContinuedEventClass { +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ContinuedEventClass implements DAPEvent { private long seq; - private BreakpointEventType type; + private String type; private ContinuedEventBody body; - private ContinuedEventEvent event; + private String event; /** * Sequence number of the message (also known as message ID). The `seq` for the first @@ -36,9 +37,9 @@ public class ContinuedEventClass { * Message type. */ @JsonProperty("type") - public BreakpointEventType getType() { return type; } + public String getType() { return type; } @JsonProperty("type") - public void setType(BreakpointEventType value) { this.type = value; } + public void setType(String value) { this.type = value; } /** * Event-specific information. @@ -52,7 +53,7 @@ public class ContinuedEventClass { * Type of event. */ @JsonProperty("event") - public ContinuedEventEvent getEvent() { return event; } + public String getEvent() { return event; } @JsonProperty("event") - public void setEvent(ContinuedEventEvent value) { this.event = value; } + public void setEvent(String value) { this.event = value; } } From 873179baf329b89c761547dfaadb0d3cc94d395d Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 17 Nov 2025 02:44:10 +0100 Subject: [PATCH 52/57] Remove unused code --- .../monitor/adapter/python/BreakpointHandler.java | 2 +- .../use/monitor/adapter/python/DebugpyClient.java | 4 +--- .../plugins/monitor/vm/mm/python/PyField.java | 5 +---- .../plugins/monitor/vm/mm/python/PyMethodCall.java | 13 +------------ .../plugins/monitor/vm/mm/python/PyType.java | 9 --------- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java index 0727156..57980d6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java @@ -99,7 +99,7 @@ private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) argValues.add(debugpyClient.getUSEValue(argDAPValue)); } - PyMethodCall pyMethodCall = new PyMethodCall(adapter, pyMethod, pyObject, argValues); + PyMethodCall pyMethodCall = new PyMethodCall(pyMethod, pyObject, argValues); controller.onMethodCall(pyMethodCall); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index ee2d800..93426df 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -84,8 +84,6 @@ PyType getVMType(String fqcn) { } PyType pyType = new PyType(adapter, fqcn, true); - String normalizedPath = Path.of(fileOpt.get()).normalize().toString().replace("'", ""); - pyType.setFile(normalizedPath); controller.storeVMType(fqcn, pyType); return pyType; @@ -158,7 +156,7 @@ protected VMField getVMField(String fqcn, String fieldName) { if (controller.existsVMField(fId)) { return controller.getVMField(fId); } - PyField pyField = new PyField(adapter, fieldName, fqcn); + PyField pyField = new PyField(fieldName, fqcn); controller.storeVMField(pyField.getId(), pyField); return pyField; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java index 14356fb..f1eb560 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyField.java @@ -1,6 +1,5 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; -import org.tzi.use.monitor.adapter.python.PythonAdapter; import org.tzi.use.plugins.monitor.vm.mm.VMField; import org.tzi.use.uml.mm.MAssociationEnd; import org.tzi.use.uml.mm.MAttribute; @@ -10,13 +9,11 @@ public class PyField implements VMField { private final String id; private final String className; private final String fieldName; - private final PythonAdapter adapter; private MAttribute useAttribute; private MAssociationEnd useAssociationEnd; - public PyField(PythonAdapter adapter, String fieldName, String className) { - this.adapter = adapter; + public PyField(String fieldName, String className) { this.fieldName = fieldName; this.className = className; this.id = String.format("%s:%s", className, fieldName); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java index 6fdb865..232e57f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java @@ -14,10 +14,8 @@ public class PyMethodCall implements VMMethodCall { private final PyMethod pyMethod; private final PyObject pyObject; private final List argVals; - private final PythonAdapter adapter; - public PyMethodCall(PythonAdapter adapter, PyMethod pyMethod, PyObject pyObject, List argVals) { - this.adapter = adapter; + public PyMethodCall(PyMethod pyMethod, PyObject pyObject, List argVals) { this.pyMethod = pyMethod; this.pyObject = pyObject; this.argVals = argVals; @@ -43,13 +41,4 @@ public int getNumArguments() throws VMAccessException { return pyMethod.getArgumentTypes().size(); } - @Override - public String toString() { - return "PyMethodCall{" + - "pyMethod=" + pyMethod + - ", pyObject=" + pyObject + - ", argVals=" + argVals + - '}'; - } - } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java index 6d0aa6b..7e97a6f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyType.java @@ -15,7 +15,6 @@ public class PyType implements VMType { private final PythonAdapter adapter; private final boolean isClass; - private String file; private MClass useClass; public PyType(PythonAdapter adapter, String typeName, boolean isClass) { @@ -76,14 +75,6 @@ public void setUSEClass(MClass cls) { this.useClass = cls; } - public String getFile() { - return file; - } - - public void setFile(String file) { - this.file = file; - } - @Override public String toString() { return typeName; From b70ad750f38109e6c64fdb7a0aa74ac8172350cd Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 17 Nov 2025 02:52:53 +0100 Subject: [PATCH 53/57] Update check for class existence --- .../org/tzi/use/monitor/adapter/python/DebugpyClient.java | 3 +-- .../org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 93426df..af34ffe 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -17,7 +17,6 @@ import java.io.*; import java.net.Socket; -import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; import java.util.logging.Level; @@ -78,7 +77,7 @@ PyType getVMType(String fqcn) { pause(); // Match monitor state - Optional fileOpt = messenger.evaluate(PyEvalExBuilder.getFileForClass(fqcn)); + Optional fileOpt = messenger.evaluate(PyEvalExBuilder.getClass(fqcn)); if (fileOpt.isEmpty()) { return null; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index e3e5668..65469dc 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -5,10 +5,10 @@ public class PyEvalExBuilder { private static final int MODULE_NAME_IDX = 0; private static final int SIMPLE_CLASS_NAME_IDX = 1; - public static String getFileForClass(String qualifiedClassName) { + public static String getClass(String qualifiedClassName) { String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( - "getattr(__import__('sys').modules.get(getattr(__import__('sys').modules['%s'], '%s').__module__), '__file__', None)", + "getattr(__import__('sys').modules['%s'], '%s')", classNameParts[MODULE_NAME_IDX], classNameParts[SIMPLE_CLASS_NAME_IDX] ); From 7a91e6d1356fb51888562130e87f59d4bfeda9d7 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 17 Nov 2025 05:16:12 +0100 Subject: [PATCH 54/57] Update PyMethod construction --- .../monitor/adapter/python/DebugpyClient.java | 30 +++++++------------ .../adapter/python/PyEvalExBuilder.java | 20 ++----------- 2 files changed, 13 insertions(+), 37 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index af34ffe..5ba9e20 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -30,6 +30,7 @@ public class DebugpyClient { private static final Pattern MEMORY_ADDR_PATTERN = Pattern.compile("0x[0-9a-fA-F]+"); + private static final ObjectMapper mapper = new ObjectMapper(); public boolean running = false; private final String workspace; @@ -94,24 +95,26 @@ protected VMMethod getVMMethod(String fqcn, String methodName, boolean isModule) return controller.getVMMethod(methodId); } - Optional methodArgumentsOpt = messenger.evaluate(PyEvalExBuilder.getMethodSig(fqcn, methodName, isModule)); - if (methodArgumentsOpt.isEmpty()) { + Optional methodInfoOpt = messenger.evaluate(PyEvalExBuilder.getMethodInfo(fqcn, methodName, isModule)); + if (methodInfoOpt.isEmpty()) { return null; } - String methodArguments = methodArgumentsOpt.get(); - - if (methodArguments.equals("''")) { + String json = methodInfoOpt.get().replace("'", "\""); + JsonNode root; + try { + root = mapper.readTree(json); + } catch (JsonProcessingException e) { return null; } PyMethod pyMethod = new PyMethod(adapter, isModule ? fqcn + "." + methodName : methodName, fqcn); - String escapedResult = methodArguments.substring(1, methodArguments.length() - 1); + String methodArguments = root.get("args").asText(); List argNames = new ArrayList<>(); List argTypes = new ArrayList<>(); - for (String argName : escapedResult.split(",")) { + for (String argName : methodArguments.split(",")) { if (argName.equals("self")) { continue; } @@ -122,19 +125,6 @@ protected VMMethod getVMMethod(String fqcn, String methodName, boolean isModule) pyMethod.setArgumentTypes(argTypes); // Set line nos and filename - Optional breakpointInfoOpt = messenger.evaluate(PyEvalExBuilder.getMethodBreakpointInfo(fqcn, methodName, isModule)); - if (breakpointInfoOpt.isEmpty()) { - return null; - } - - String json = breakpointInfoOpt.get().replace("'", "\""); - ObjectMapper mapper = new ObjectMapper(); - JsonNode root; - try { - root = mapper.readTree(json); - } catch (JsonProcessingException e) { - return null; - } String fileRaw = root.get("file").asText(); String normalizedFile = Paths.get(fileRaw).normalize().toString(); pyMethod.setFile(normalizedFile); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index 65469dc..cabad7b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -27,28 +27,13 @@ public static String getInstanceIds(String qualifiedClassName) { ); } - public static String getMethodSig(String fqcn, String methodName, boolean isModule) { - if (isModule) { - return String.format( - """ - ','.join([p.name for p in __import__('inspect').signature(getattr(__import__('sys').modules['%s'], '%s')).parameters.values()]) - """, fqcn, methodName - ); - } - String[] classNameParts = getClassNameParts(fqcn); - return String.format( - """ - ','.join([p.name for p in __import__('inspect').signature(getattr(__import__('sys').modules['%s'], '%s').%s).parameters.values()]) - """, classNameParts[MODULE_NAME_IDX], classNameParts[SIMPLE_CLASS_NAME_IDX], methodName - ); - } - - public static String getMethodBreakpointInfo(String qualifiedClassName, String methodName, boolean isModule) { + public static String getMethodInfo(String qualifiedClassName, String methodName, boolean isModule) { if (isModule) { return String.format( """ ( lambda fn: { + "args": ','.join([p.name for p in __import__('inspect').signature(fn).parameters.values()]), "file": __import__('os').path.abspath(__import__('inspect').getsourcefile(fn)), "start": fn.__code__.co_firstlineno + 1, "end": fn.__code__.co_firstlineno + len(__import__('inspect').getsourcelines(fn)[0]) - 1, @@ -75,6 +60,7 @@ public static String getMethodBreakpointInfo(String qualifiedClassName, String m """ ( lambda fn: { + "args": ','.join([p.name for p in __import__('inspect').signature(fn).parameters.values()]), "file": __import__('os').path.abspath(__import__('inspect').getsourcefile(fn)), "start": fn.__code__.co_firstlineno + 1, "end": fn.__code__.co_firstlineno + len(__import__('inspect').getsourcelines(fn)[0]) - 1, From e2514a505ebfad8e88e1ad9f86d59b2c2b81afcf Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 17 Nov 2025 20:23:39 +0100 Subject: [PATCH 55/57] Add max instance functionality --- .../adapter/python/BreakpointHandler.java | 4 +++- .../monitor/adapter/python/DebugpyClient.java | 23 ++++++++----------- .../adapter/python/PyEvalExBuilder.java | 7 +++--- .../monitor/adapter/python/PythonAdapter.java | 13 +++++++++-- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java index 57980d6..b77b6b7 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java @@ -90,7 +90,9 @@ private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) } PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); - Long pyObjId = pyType == null ? 1L : messenger.getSelfId(stackFrame.getID()); + Long pyObjId = (pyType == null) + ? DebugpyClient.GLOBAL_MODULE_ID + : messenger.getSelfId(stackFrame.getID()); PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); List argValues = new ArrayList<>(); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index 5ba9e20..cf9c2df 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -31,6 +31,7 @@ public class DebugpyClient { private static final Pattern MEMORY_ADDR_PATTERN = Pattern.compile("0x[0-9a-fA-F]+"); private static final ObjectMapper mapper = new ObjectMapper(); + static final long GLOBAL_MODULE_ID = 1L; public boolean running = false; private final String workspace; @@ -198,31 +199,27 @@ protected void stop() { } } - protected Set getInstances(PyType pyType) { - controller.storeVMType(pyType.getName(), pyType); - + protected Set getInstances(PyType pyType, int maxInstances) { + controller.storeVMType(pyType.getName(), pyType); // Stores PyType with mapped MClass if (pyType.isModule()) { - return Set.of(new PyObject(adapter, 1L, pyType)); + VMObject obj = controller.existsVMObject(GLOBAL_MODULE_ID) + ? controller.getVMObject(GLOBAL_MODULE_ID) + : new PyObject(adapter, GLOBAL_MODULE_ID, pyType); + return Set.of(obj); } - pause(); - - Optional instanceIdsOpt = messenger.evaluate(PyEvalExBuilder.getInstanceIds(pyType.getName())); + Optional instanceIdsOpt = messenger.evaluate(PyEvalExBuilder.getInstanceIds(pyType.getName(), maxInstances)); if (instanceIdsOpt.isEmpty()) { controller.newLogMessage(this, Level.SEVERE, String.format("Could not query instances for type '%s'", pyType.getName())); return Set.of(); } String instanceIds = instanceIdsOpt.get(); Set objs = new HashSet<>(); - if (instanceIds.equals("[]")) { + if (instanceIds.equals("'[]'")) { return objs; } - String[] ids = instanceIds.substring(1, instanceIds.length() - 1).split(","); + String[] ids = instanceIds.substring(2, instanceIds.length() - 2).split(","); for (String id : ids) { - // TODO: Fix debugpy list truncation - if (id.trim().equals("...")) { - continue; - } long objId = Long.parseLong(id.trim()); PyObject pyObject = new PyObject(adapter, objId, pyType); objs.add(pyObject); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index cabad7b..e133871 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -18,12 +18,13 @@ public static String getSelfIdAtCurrentFrame() { return "id(self)"; } - public static String getInstanceIds(String qualifiedClassName) { + public static String getInstanceIds(String qualifiedClassName, int maxInstances) { String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( - "[id(obj) for obj in __import__('gc').get_objects() if isinstance(obj, getattr(__import__('%s'), '%s'))]\n", + "repr([id(obj) for obj in __import__('gc').get_objects() if isinstance(obj, getattr(__import__('%s'), '%s'))][:%d])\n", classNameParts[MODULE_NAME_IDX], - classNameParts[SIMPLE_CLASS_NAME_IDX] + classNameParts[SIMPLE_CLASS_NAME_IDX], + maxInstances ); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 98c36a4..2b3aba1 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -22,10 +22,12 @@ public class PythonAdapter extends AbstractVMAdapter { private static final int SETTING_HOST_IDX = 0; private static final int SETTING_PORT_IDX = 1; private static final int SETTING_WORKSPACE_IDX = 2; + private static final int SETTING_MAX_INSTANCES_IDX = 3; private String host; private int port; private String workspace; + private int maxInstances; private DebugpyClient debugpyClient; // FIXME: More robust validation @@ -58,13 +60,20 @@ protected void validateSettings() throws InvalidAdapterConfiguration { } catch (Exception e) { throw new InvalidAdapterConfiguration("Invalid directory!"); } + + try { + maxInstances = Integer.parseInt(settings.get(SETTING_MAX_INSTANCES_IDX).value); + } catch (NumberFormatException e) { + throw new InvalidAdapterConfiguration("Max. Instances must be an integer!"); + } } @Override protected void createSettings(List settings) { settings.add(SETTING_HOST_IDX, new VMAdapterSetting("Host", "localhost")); settings.add(SETTING_PORT_IDX, new VMAdapterSetting("Port", "5678")); - settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("SUM root dir", "/Users/serj/git/uni/dpy-server")); + settings.add(SETTING_WORKSPACE_IDX, new VMAdapterSetting("SUM Directory Path", "")); + settings.add(SETTING_MAX_INSTANCES_IDX, new VMAdapterSetting("Max. Instances", "50")); } @Override @@ -96,7 +105,7 @@ public void stop() { } public Set readInstances(PyType pyType) { - return debugpyClient.getInstances(pyType); + return debugpyClient.getInstances(pyType, maxInstances); } public Value getUSEValue(long objId, String fName) { From 3a0f77beef336924edc64652fe2a9d3699a61ca8 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Mon, 17 Nov 2025 23:02:02 +0100 Subject: [PATCH 56/57] Update robust request response matching --- .../use/monitor/adapter/python/Messenger.java | 65 +++++++++---------- .../adapter/python/dap/DAPRequest.java | 1 + .../adapter/python/dap/DAPResponse.java | 1 + 3 files changed, 32 insertions(+), 35 deletions(-) diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java index 2d2dc13..2dd6430 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java @@ -10,6 +10,7 @@ import java.net.Socket; import java.util.*; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; /** @@ -25,10 +26,9 @@ public class Messenger { private final Socket socket; private final BufferedReader in; private final BufferedWriter out; - private final DebugpyClient client; - private CompletableFuture futureResp = new CompletableFuture<>(); + private final ConcurrentHashMap> pendingRequests = new ConcurrentHashMap<>(); private CompletableFuture initEventFuture = new CompletableFuture<>(); private CompletableFuture pauseEventFuture = new CompletableFuture<>(); private CompletableFuture continuedEventFuture = new CompletableFuture<>(); @@ -52,7 +52,7 @@ public InitializeResponseClass initialize() { var initReq = new InitializeRequestClass(); initReq.setSeq(REQUEST_COUNTER++); initReq.setArguments(initArgs); - return (InitializeResponseClass) sendRequest(initReq); + return (InitializeResponseClass) sendRequestSync(initReq); } public void attach(String host, int port, String workspace) { @@ -69,7 +69,7 @@ public void attach(String host, int port, String workspace) { var attachReq = new AttachRequestClass(); attachReq.setArguments(attachArgs); attachReq.setSeq(REQUEST_COUNTER++); - sendAsyncRequest(attachReq); + sendRequestAsync(attachReq); try { initEventFuture.get(); @@ -83,7 +83,7 @@ public void configurationDone() { confDoneReq.setSeq(REQUEST_COUNTER++); // TODO Fix should not be async request //Response confDoneResp = (Response) sendRequest(confDoneReq); - sendAsyncRequest(confDoneReq); + sendRequestAsync(confDoneReq); // Wait for attach async response // TODO FIX! responseQueue instead of single slot @@ -94,7 +94,6 @@ public void configurationDone() { } catch (InterruptedException e) { throw new RuntimeException(e); } - } public boolean pause() { @@ -109,7 +108,7 @@ public boolean pause() { var pauseReq = new PauseRequestClass(); pauseReq.setSeq(REQUEST_COUNTER++); pauseReq.setArguments(pauseArgs); - var pauseResp = (PauseResponseClass) sendRequest(pauseReq); + var pauseResp = (PauseResponseClass) sendRequestSync(pauseReq); if (!pauseResp.getSuccess()) { return false; @@ -131,7 +130,7 @@ public boolean resume() { var continueReq = new ContinueRequestClass(); continueReq.setSeq(REQUEST_COUNTER++); continueReq.setArguments(continueArgs); - if (!((ContinueResponseClass) sendRequest(continueReq)).getSuccess()) { + if (!((ContinueResponseClass) sendRequestSync(continueReq)).getSuccess()) { return false; } @@ -153,7 +152,7 @@ protected Long getSelfId(long frameId) { var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + var evalResp = (EvaluateResponseClass) sendRequestSync(evalReq); return Long.parseLong(evalResp.getBody().getResult()); } @@ -165,7 +164,7 @@ public Variable[] getDAPChildren(long variablesReference) { var varReq = new VariablesRequestClass(); varReq.setSeq(REQUEST_COUNTER++); varReq.setArguments(varArgs); - var varResp = (VariablesResponseClass) sendRequest(varReq); + var varResp = (VariablesResponseClass) sendRequestSync(varReq); return varResp.getBody().getVariables(); } @@ -178,7 +177,7 @@ public boolean stop() { var stopReq = new DisconnectRequestClass(); stopReq.setSeq(REQUEST_COUNTER++); stopReq.setArguments(stopArgs); - return ((DisconnectResponseClass) sendRequest(stopReq)).getSuccess(); + return ((DisconnectResponseClass) sendRequestSync(stopReq)).getSuccess(); } public boolean setBreakpoints(String file, Set lines) { @@ -200,7 +199,7 @@ public boolean setBreakpoints(String file, Set lines) { var bpReq = new SetBreakpointsRequestClass(); bpReq.setSeq(REQUEST_COUNTER++); bpReq.setArguments(bpArgs); - var bpResp = (SetBreakpointsResponseClass) sendRequest(bpReq); + var bpResp = (SetBreakpointsResponseClass) sendRequestSync(bpReq); return bpResp.getSuccess(); } @@ -222,7 +221,7 @@ protected DAPValue getMethodArgDAPValue(long frameId, String argName){ var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); - var evalResp = (EvaluateResponseClass) sendRequest(evalReq); + var evalResp = (EvaluateResponseClass) sendRequestSync(evalReq); return new DAPValue(evalResp.getBody().getResult(), evalResp.getBody().getType(), evalResp.getBody().getVariablesReference()); } @@ -242,13 +241,13 @@ public EvaluateResponseClass evaluateRaw(String expression) { var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); evalReq.setArguments(evalArgs); - return (EvaluateResponseClass) sendRequest(evalReq); + return (EvaluateResponseClass) sendRequestSync(evalReq); } public Optional getThreadId() { var threadsReq = new ThreadsRequestClass(); threadsReq.setSeq(REQUEST_COUNTER++); - var threadsResp = (ThreadsResponseClass) sendRequest(threadsReq); + var threadsResp = (ThreadsResponseClass) sendRequestSync(threadsReq); if (threadsResp.getSuccess()) { for (Thread thread : threadsResp.getBody().getThreads()) { if (thread.getName().equals("MainThread")) { @@ -265,19 +264,19 @@ public Optional getCurrentFrame(long threadId) { var stackTraceReq = new StackTraceRequestClass(); stackTraceReq.setSeq(REQUEST_COUNTER++); stackTraceReq.setArguments(stackTraceArgs); - var stackTraceResp = (StackTraceResponseClass) sendRequest(stackTraceReq); + var stackTraceResp = (StackTraceResponseClass) sendRequestSync(stackTraceReq); return stackTraceResp.getSuccess() ? Optional.of(stackTraceResp.getBody().getStackFrames()[0]) : Optional.empty(); } - private DAPResponse sendRequest(DAPRequest dapRequest) { - sendAsyncRequest(dapRequest); - return waitForAsyncResponse(); + private DAPResponse sendRequestSync(DAPRequest dapRequest) { + CompletableFuture futureResp = sendRequestAsync(dapRequest); + return waitForAsyncResponse(futureResp); } - private DAPResponse waitForAsyncResponse() { + private DAPResponse waitForAsyncResponse(CompletableFuture futureResp) { DAPResponse res; try { System.out.println("Waiting for response..."); @@ -289,18 +288,19 @@ private DAPResponse waitForAsyncResponse() { return res; } - private void sendAsyncRequest(DAPRequest DAPRequest) { - futureResp = new CompletableFuture<>(); + private CompletableFuture sendRequestAsync(DAPRequest request) { + long reqSeq = request.getSeq(); + CompletableFuture future = + pendingRequests.computeIfAbsent(reqSeq, ignored -> new CompletableFuture<>()); String json; try { - json = mapper.writeValueAsString(DAPRequest); + json = mapper.writeValueAsString(request); } catch (JsonProcessingException e) { throw new RuntimeException(e); } String header = "Content-Length: " + json.length() + "\r\n\r\n"; - try { System.out.println("Sending request: " + header + json); out.write(header + json); @@ -308,6 +308,7 @@ private void sendAsyncRequest(DAPRequest DAPRequest) { } catch (IOException e) { throw new RuntimeException(e); } + return future; } private void startReaderThread() { @@ -338,18 +339,12 @@ private void startReaderThread() { System.out.println("Skipping unknown message type..."); continue; } - if (msg instanceof DAPResponse) { - System.out.println("Response instance: " + msg); - // TODO FIX workaround - // int reqSeq = ((DAPResponse) msg).getRequestSequence(); - //if (reqSeq == currReqSeq - 1) { - System.out.println("Matched response: " + json); - if (futureResp.complete((DAPResponse) msg)) { - System.out.println("Response completed!"); + if (msg instanceof DAPResponse dapResp) { + long reqSeq = dapResp.getRequestSeq(); + CompletableFuture future = pendingRequests.remove(reqSeq); + if (future != null) { + future.complete(dapResp); } - //} else { - // System.out.println("Ignored async message: " + json); - //} } if (msg instanceof DAPEvent dapEvent) { if (dapEvent instanceof InitializedEventClass initializedEvent) { diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java index b93c350..2a0261b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java @@ -1,4 +1,5 @@ package org.tzi.use.monitor.adapter.python.dap; public interface DAPRequest extends DAPMessage { + long getSeq(); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java index b1f7424..d68e0e7 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java @@ -1,4 +1,5 @@ package org.tzi.use.monitor.adapter.python.dap; public interface DAPResponse extends DAPMessage { + long getRequestSeq(); } From e52689b97f0a87591e6e4e55ce546c78ac11500c Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Thu, 4 Dec 2025 12:40:52 +0100 Subject: [PATCH 57/57] Clean up --- adapter/Python/README.md | 33 +- adapter/Python/properties_gen.sh | 18 - adapter/Python/references.json | 565 -- adapter/Python/requirements.txt | 1 + .../adapter/python/BreakpointHandler.java | 113 +- .../monitor/adapter/python/DebugpyClient.java | 49 +- .../monitor/adapter/python/MessageMapper.java | 34 +- .../use/monitor/adapter/python/Messenger.java | 109 +- .../adapter/python/PyEvalExBuilder.java | 2 +- .../monitor/adapter/python/PythonAdapter.java | 33 +- .../python/dap/AttachRequestClass.java | 1 + .../python/dap/AttachResponseClass.java | 1 + .../python/dap/BreakpointEventClass.java | 1 + .../dap/ConfigurationDoneRequestClass.java | 2 + .../dap/ConfigurationDoneResponseClass.java | 1 + .../python/dap/ContinueRequestClass.java | 1 + .../python/dap/ContinueResponseClass.java | 1 + .../python/dap/ContinuedEventClass.java | 1 + .../monitor/adapter/python/dap/DAPEvent.java | 4 - .../adapter/python/dap/DAPMessage.java | 4 - .../python/dap/DisconnectRequestClass.java | 1 + .../python/dap/DisconnectResponseClass.java | 1 + .../python/dap/EvaluateRequestClass.java | 1 + .../python/dap/EvaluateResponseClass.java | 1 + .../python/dap/InitializeRequestClass.java | 1 + .../python/dap/InitializeResponseClass.java | 1 + .../python/dap/InitializedEventClass.java | 1 + .../adapter/python/dap/PauseRequestClass.java | 1 + .../python/dap/PauseResponseClass.java | 1 + .../dap/SetBreakpointsRequestClass.java | 1 + .../dap/SetBreakpointsResponseClass.java | 1 + .../python/dap/StackTraceRequestClass.java | 1 + .../python/dap/StackTraceResponseClass.java | 1 + .../adapter/python/dap/StoppedEventClass.java | 1 + .../python/dap/TerminatedEventClass.java | 1 + .../python/dap/ThreadsRequestClass.java | 1 + .../python/dap/ThreadsResponseClass.java | 1 + .../python/dap/VariablesRequestClass.java | 1 + .../python/dap/VariablesResponseClass.java | 1 + .../adapter/python/dap/custom/DAPEvent.java | 4 + .../adapter/python/dap/custom/DAPMessage.java | 4 + .../python/dap/{ => custom}/DAPRequest.java | 2 +- .../python/dap/{ => custom}/DAPResponse.java | 2 +- .../adapter/python/dap/custom/DAPUnknown.java | 30 + .../python/{ => dap}/custom/DAPValue.java | 2 +- .../monitor/vm/mm/python/PyMethodCall.java | 1 - .../monitor/vm/mm/python/PyObject.java | 6 +- .../resources/protocol/debugProtocol.json | 4753 ----------------- 48 files changed, 320 insertions(+), 5477 deletions(-) delete mode 100755 adapter/Python/properties_gen.sh delete mode 100644 adapter/Python/references.json create mode 100644 adapter/Python/requirements.txt delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java delete mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPMessage.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPEvent.java create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPMessage.java rename adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/{ => custom}/DAPRequest.java (56%) rename adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/{ => custom}/DAPResponse.java (58%) create mode 100644 adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPUnknown.java rename adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/{ => dap}/custom/DAPValue.java (94%) delete mode 100644 adapter/Python/src/main/resources/protocol/debugProtocol.json diff --git a/adapter/Python/README.md b/adapter/Python/README.md index 545d564..25986f7 100644 --- a/adapter/Python/README.md +++ b/adapter/Python/README.md @@ -1,3 +1,32 @@ -# Python Adapter +# USE Monitor Python Adapter -> `jsonschema2pojo` does not resolve definitions unless they are referenced in a schema's properties. +USE monitor plugin that adds support for the monitoring of Python programs. + +## Adapter Settings +- Host: Hostname of the machine, where the debuggee program is located. +- Port: Port on which the Debugpy server running the Python program is listening to. +- Workspace: Absolute path to the root directory of the Python program to monitor. +- Max. Instances: Maximum number of instances that USE should map and display. + +## How to use the plugin +1. In the USE project under `use/use-core/target` create the following folder structure: +`mkdir -p lib/plugins/monitor_adapter` +2. Run `mvn clean package` +3. Copy the `MonitorAdapter_Python-1.0-SNAPSHOT.jar` to `lib/plugins/monitor_adapter` +4. Copy the `monitor-1.0-SNAPSHOT.jar` to `lib/plugins` +5. Copy the `monitor/lib/lablib-checkboxtree-3.2.jar` to `lib` +6. Add an IntelliJ run configuration with the main class `org.tzi.use.main.Main`, VM option `--add-exports=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED` and class path `use-gui` +7. Modify the classpath with the `lib` folder addition + +## How to start the Debugpy server + +``` +#!/usr/bin/env bash + +mkdir -p logs + +debugpy \ + --listen 5678 \ + --log-to ./logs/ \ + ./.py +``` diff --git a/adapter/Python/properties_gen.sh b/adapter/Python/properties_gen.sh deleted file mode 100755 index 2e35669..0000000 --- a/adapter/Python/properties_gen.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -INPUT_SCHEMA="$1" - -OUTPUT_FILE="references.json" - -if [ ! -f "$INPUT_SCHEMA" ]; then - echo "Error: File '$INPUT_SCHEMA' not found." - exit 1 -fi - -jq ' - .definitions - | to_entries - | map({ key: .key, value: { "$ref": "#/definitions/\(.key)" } }) - | from_entries - | { properties: . } -' "$INPUT_SCHEMA" > "$OUTPUT_FILE" diff --git a/adapter/Python/references.json b/adapter/Python/references.json deleted file mode 100644 index 83e91c2..0000000 --- a/adapter/Python/references.json +++ /dev/null @@ -1,565 +0,0 @@ -{ - "properties": { - "ProtocolMessage": { - "$ref": "#/definitions/ProtocolMessage" - }, - "Request": { - "$ref": "#/definitions/Request" - }, - "Event": { - "$ref": "#/definitions/Event" - }, - "Response": { - "$ref": "#/definitions/Response" - }, - "ErrorResponse": { - "$ref": "#/definitions/ErrorResponse" - }, - "CancelRequest": { - "$ref": "#/definitions/CancelRequest" - }, - "CancelArguments": { - "$ref": "#/definitions/CancelArguments" - }, - "CancelResponse": { - "$ref": "#/definitions/CancelResponse" - }, - "InitializedEvent": { - "$ref": "#/definitions/InitializedEvent" - }, - "StoppedEvent": { - "$ref": "#/definitions/StoppedEvent" - }, - "ContinuedEvent": { - "$ref": "#/definitions/ContinuedEvent" - }, - "ExitedEvent": { - "$ref": "#/definitions/ExitedEvent" - }, - "TerminatedEvent": { - "$ref": "#/definitions/TerminatedEvent" - }, - "ThreadEvent": { - "$ref": "#/definitions/ThreadEvent" - }, - "OutputEvent": { - "$ref": "#/definitions/OutputEvent" - }, - "BreakpointEvent": { - "$ref": "#/definitions/BreakpointEvent" - }, - "ModuleEvent": { - "$ref": "#/definitions/ModuleEvent" - }, - "LoadedSourceEvent": { - "$ref": "#/definitions/LoadedSourceEvent" - }, - "ProcessEvent": { - "$ref": "#/definitions/ProcessEvent" - }, - "CapabilitiesEvent": { - "$ref": "#/definitions/CapabilitiesEvent" - }, - "ProgressStartEvent": { - "$ref": "#/definitions/ProgressStartEvent" - }, - "ProgressUpdateEvent": { - "$ref": "#/definitions/ProgressUpdateEvent" - }, - "ProgressEndEvent": { - "$ref": "#/definitions/ProgressEndEvent" - }, - "InvalidatedEvent": { - "$ref": "#/definitions/InvalidatedEvent" - }, - "MemoryEvent": { - "$ref": "#/definitions/MemoryEvent" - }, - "RunInTerminalRequest": { - "$ref": "#/definitions/RunInTerminalRequest" - }, - "RunInTerminalRequestArguments": { - "$ref": "#/definitions/RunInTerminalRequestArguments" - }, - "RunInTerminalResponse": { - "$ref": "#/definitions/RunInTerminalResponse" - }, - "StartDebuggingRequest": { - "$ref": "#/definitions/StartDebuggingRequest" - }, - "StartDebuggingRequestArguments": { - "$ref": "#/definitions/StartDebuggingRequestArguments" - }, - "StartDebuggingResponse": { - "$ref": "#/definitions/StartDebuggingResponse" - }, - "InitializeRequest": { - "$ref": "#/definitions/InitializeRequest" - }, - "InitializeRequestArguments": { - "$ref": "#/definitions/InitializeRequestArguments" - }, - "InitializeResponse": { - "$ref": "#/definitions/InitializeResponse" - }, - "ConfigurationDoneRequest": { - "$ref": "#/definitions/ConfigurationDoneRequest" - }, - "ConfigurationDoneArguments": { - "$ref": "#/definitions/ConfigurationDoneArguments" - }, - "ConfigurationDoneResponse": { - "$ref": "#/definitions/ConfigurationDoneResponse" - }, - "LaunchRequest": { - "$ref": "#/definitions/LaunchRequest" - }, - "LaunchRequestArguments": { - "$ref": "#/definitions/LaunchRequestArguments" - }, - "LaunchResponse": { - "$ref": "#/definitions/LaunchResponse" - }, - "AttachRequest": { - "$ref": "#/definitions/AttachRequest" - }, - "AttachRequestArguments": { - "$ref": "#/definitions/AttachRequestArguments" - }, - "AttachResponse": { - "$ref": "#/definitions/AttachResponse" - }, - "RestartRequest": { - "$ref": "#/definitions/RestartRequest" - }, - "RestartArguments": { - "$ref": "#/definitions/RestartArguments" - }, - "RestartResponse": { - "$ref": "#/definitions/RestartResponse" - }, - "DisconnectRequest": { - "$ref": "#/definitions/DisconnectRequest" - }, - "DisconnectArguments": { - "$ref": "#/definitions/DisconnectArguments" - }, - "DisconnectResponse": { - "$ref": "#/definitions/DisconnectResponse" - }, - "TerminateRequest": { - "$ref": "#/definitions/TerminateRequest" - }, - "TerminateArguments": { - "$ref": "#/definitions/TerminateArguments" - }, - "TerminateResponse": { - "$ref": "#/definitions/TerminateResponse" - }, - "BreakpointLocationsRequest": { - "$ref": "#/definitions/BreakpointLocationsRequest" - }, - "BreakpointLocationsArguments": { - "$ref": "#/definitions/BreakpointLocationsArguments" - }, - "BreakpointLocationsResponse": { - "$ref": "#/definitions/BreakpointLocationsResponse" - }, - "SetBreakpointsRequest": { - "$ref": "#/definitions/SetBreakpointsRequest" - }, - "SetBreakpointsArguments": { - "$ref": "#/definitions/SetBreakpointsArguments" - }, - "SetBreakpointsResponse": { - "$ref": "#/definitions/SetBreakpointsResponse" - }, - "SetFunctionBreakpointsRequest": { - "$ref": "#/definitions/SetFunctionBreakpointsRequest" - }, - "SetFunctionBreakpointsArguments": { - "$ref": "#/definitions/SetFunctionBreakpointsArguments" - }, - "SetFunctionBreakpointsResponse": { - "$ref": "#/definitions/SetFunctionBreakpointsResponse" - }, - "SetExceptionBreakpointsRequest": { - "$ref": "#/definitions/SetExceptionBreakpointsRequest" - }, - "SetExceptionBreakpointsArguments": { - "$ref": "#/definitions/SetExceptionBreakpointsArguments" - }, - "SetExceptionBreakpointsResponse": { - "$ref": "#/definitions/SetExceptionBreakpointsResponse" - }, - "DataBreakpointInfoRequest": { - "$ref": "#/definitions/DataBreakpointInfoRequest" - }, - "DataBreakpointInfoArguments": { - "$ref": "#/definitions/DataBreakpointInfoArguments" - }, - "DataBreakpointInfoResponse": { - "$ref": "#/definitions/DataBreakpointInfoResponse" - }, - "SetDataBreakpointsRequest": { - "$ref": "#/definitions/SetDataBreakpointsRequest" - }, - "SetDataBreakpointsArguments": { - "$ref": "#/definitions/SetDataBreakpointsArguments" - }, - "SetDataBreakpointsResponse": { - "$ref": "#/definitions/SetDataBreakpointsResponse" - }, - "SetInstructionBreakpointsRequest": { - "$ref": "#/definitions/SetInstructionBreakpointsRequest" - }, - "SetInstructionBreakpointsArguments": { - "$ref": "#/definitions/SetInstructionBreakpointsArguments" - }, - "SetInstructionBreakpointsResponse": { - "$ref": "#/definitions/SetInstructionBreakpointsResponse" - }, - "ContinueRequest": { - "$ref": "#/definitions/ContinueRequest" - }, - "ContinueArguments": { - "$ref": "#/definitions/ContinueArguments" - }, - "ContinueResponse": { - "$ref": "#/definitions/ContinueResponse" - }, - "NextRequest": { - "$ref": "#/definitions/NextRequest" - }, - "NextArguments": { - "$ref": "#/definitions/NextArguments" - }, - "NextResponse": { - "$ref": "#/definitions/NextResponse" - }, - "StepInRequest": { - "$ref": "#/definitions/StepInRequest" - }, - "StepInArguments": { - "$ref": "#/definitions/StepInArguments" - }, - "StepInResponse": { - "$ref": "#/definitions/StepInResponse" - }, - "StepOutRequest": { - "$ref": "#/definitions/StepOutRequest" - }, - "StepOutArguments": { - "$ref": "#/definitions/StepOutArguments" - }, - "StepOutResponse": { - "$ref": "#/definitions/StepOutResponse" - }, - "StepBackRequest": { - "$ref": "#/definitions/StepBackRequest" - }, - "StepBackArguments": { - "$ref": "#/definitions/StepBackArguments" - }, - "StepBackResponse": { - "$ref": "#/definitions/StepBackResponse" - }, - "ReverseContinueRequest": { - "$ref": "#/definitions/ReverseContinueRequest" - }, - "ReverseContinueArguments": { - "$ref": "#/definitions/ReverseContinueArguments" - }, - "ReverseContinueResponse": { - "$ref": "#/definitions/ReverseContinueResponse" - }, - "RestartFrameRequest": { - "$ref": "#/definitions/RestartFrameRequest" - }, - "RestartFrameArguments": { - "$ref": "#/definitions/RestartFrameArguments" - }, - "RestartFrameResponse": { - "$ref": "#/definitions/RestartFrameResponse" - }, - "GotoRequest": { - "$ref": "#/definitions/GotoRequest" - }, - "GotoArguments": { - "$ref": "#/definitions/GotoArguments" - }, - "GotoResponse": { - "$ref": "#/definitions/GotoResponse" - }, - "PauseRequest": { - "$ref": "#/definitions/PauseRequest" - }, - "PauseArguments": { - "$ref": "#/definitions/PauseArguments" - }, - "PauseResponse": { - "$ref": "#/definitions/PauseResponse" - }, - "StackTraceRequest": { - "$ref": "#/definitions/StackTraceRequest" - }, - "StackTraceArguments": { - "$ref": "#/definitions/StackTraceArguments" - }, - "StackTraceResponse": { - "$ref": "#/definitions/StackTraceResponse" - }, - "ScopesRequest": { - "$ref": "#/definitions/ScopesRequest" - }, - "ScopesArguments": { - "$ref": "#/definitions/ScopesArguments" - }, - "ScopesResponse": { - "$ref": "#/definitions/ScopesResponse" - }, - "VariablesRequest": { - "$ref": "#/definitions/VariablesRequest" - }, - "VariablesArguments": { - "$ref": "#/definitions/VariablesArguments" - }, - "VariablesResponse": { - "$ref": "#/definitions/VariablesResponse" - }, - "SetVariableRequest": { - "$ref": "#/definitions/SetVariableRequest" - }, - "SetVariableArguments": { - "$ref": "#/definitions/SetVariableArguments" - }, - "SetVariableResponse": { - "$ref": "#/definitions/SetVariableResponse" - }, - "SourceRequest": { - "$ref": "#/definitions/SourceRequest" - }, - "SourceArguments": { - "$ref": "#/definitions/SourceArguments" - }, - "SourceResponse": { - "$ref": "#/definitions/SourceResponse" - }, - "ThreadsRequest": { - "$ref": "#/definitions/ThreadsRequest" - }, - "ThreadsResponse": { - "$ref": "#/definitions/ThreadsResponse" - }, - "TerminateThreadsRequest": { - "$ref": "#/definitions/TerminateThreadsRequest" - }, - "TerminateThreadsArguments": { - "$ref": "#/definitions/TerminateThreadsArguments" - }, - "TerminateThreadsResponse": { - "$ref": "#/definitions/TerminateThreadsResponse" - }, - "ModulesRequest": { - "$ref": "#/definitions/ModulesRequest" - }, - "ModulesArguments": { - "$ref": "#/definitions/ModulesArguments" - }, - "ModulesResponse": { - "$ref": "#/definitions/ModulesResponse" - }, - "LoadedSourcesRequest": { - "$ref": "#/definitions/LoadedSourcesRequest" - }, - "LoadedSourcesArguments": { - "$ref": "#/definitions/LoadedSourcesArguments" - }, - "LoadedSourcesResponse": { - "$ref": "#/definitions/LoadedSourcesResponse" - }, - "EvaluateRequest": { - "$ref": "#/definitions/EvaluateRequest" - }, - "EvaluateArguments": { - "$ref": "#/definitions/EvaluateArguments" - }, - "EvaluateResponse": { - "$ref": "#/definitions/EvaluateResponse" - }, - "SetExpressionRequest": { - "$ref": "#/definitions/SetExpressionRequest" - }, - "SetExpressionArguments": { - "$ref": "#/definitions/SetExpressionArguments" - }, - "SetExpressionResponse": { - "$ref": "#/definitions/SetExpressionResponse" - }, - "StepInTargetsRequest": { - "$ref": "#/definitions/StepInTargetsRequest" - }, - "StepInTargetsArguments": { - "$ref": "#/definitions/StepInTargetsArguments" - }, - "StepInTargetsResponse": { - "$ref": "#/definitions/StepInTargetsResponse" - }, - "GotoTargetsRequest": { - "$ref": "#/definitions/GotoTargetsRequest" - }, - "GotoTargetsArguments": { - "$ref": "#/definitions/GotoTargetsArguments" - }, - "GotoTargetsResponse": { - "$ref": "#/definitions/GotoTargetsResponse" - }, - "CompletionsRequest": { - "$ref": "#/definitions/CompletionsRequest" - }, - "CompletionsArguments": { - "$ref": "#/definitions/CompletionsArguments" - }, - "CompletionsResponse": { - "$ref": "#/definitions/CompletionsResponse" - }, - "ExceptionInfoRequest": { - "$ref": "#/definitions/ExceptionInfoRequest" - }, - "ExceptionInfoArguments": { - "$ref": "#/definitions/ExceptionInfoArguments" - }, - "ExceptionInfoResponse": { - "$ref": "#/definitions/ExceptionInfoResponse" - }, - "ReadMemoryRequest": { - "$ref": "#/definitions/ReadMemoryRequest" - }, - "ReadMemoryArguments": { - "$ref": "#/definitions/ReadMemoryArguments" - }, - "ReadMemoryResponse": { - "$ref": "#/definitions/ReadMemoryResponse" - }, - "WriteMemoryRequest": { - "$ref": "#/definitions/WriteMemoryRequest" - }, - "WriteMemoryArguments": { - "$ref": "#/definitions/WriteMemoryArguments" - }, - "WriteMemoryResponse": { - "$ref": "#/definitions/WriteMemoryResponse" - }, - "DisassembleRequest": { - "$ref": "#/definitions/DisassembleRequest" - }, - "DisassembleArguments": { - "$ref": "#/definitions/DisassembleArguments" - }, - "DisassembleResponse": { - "$ref": "#/definitions/DisassembleResponse" - }, - "Capabilities": { - "$ref": "#/definitions/Capabilities" - }, - "ExceptionBreakpointsFilter": { - "$ref": "#/definitions/ExceptionBreakpointsFilter" - }, - "Message": { - "$ref": "#/definitions/Message" - }, - "Module": { - "$ref": "#/definitions/Module" - }, - "ColumnDescriptor": { - "$ref": "#/definitions/ColumnDescriptor" - }, - "Thread": { - "$ref": "#/definitions/Thread" - }, - "Source": { - "$ref": "#/definitions/Source" - }, - "StackFrame": { - "$ref": "#/definitions/StackFrame" - }, - "Scope": { - "$ref": "#/definitions/Scope" - }, - "Variable": { - "$ref": "#/definitions/Variable" - }, - "VariablePresentationHint": { - "$ref": "#/definitions/VariablePresentationHint" - }, - "BreakpointLocation": { - "$ref": "#/definitions/BreakpointLocation" - }, - "SourceBreakpoint": { - "$ref": "#/definitions/SourceBreakpoint" - }, - "FunctionBreakpoint": { - "$ref": "#/definitions/FunctionBreakpoint" - }, - "DataBreakpointAccessType": { - "$ref": "#/definitions/DataBreakpointAccessType" - }, - "DataBreakpoint": { - "$ref": "#/definitions/DataBreakpoint" - }, - "InstructionBreakpoint": { - "$ref": "#/definitions/InstructionBreakpoint" - }, - "Breakpoint": { - "$ref": "#/definitions/Breakpoint" - }, - "SteppingGranularity": { - "$ref": "#/definitions/SteppingGranularity" - }, - "StepInTarget": { - "$ref": "#/definitions/StepInTarget" - }, - "GotoTarget": { - "$ref": "#/definitions/GotoTarget" - }, - "CompletionItem": { - "$ref": "#/definitions/CompletionItem" - }, - "CompletionItemType": { - "$ref": "#/definitions/CompletionItemType" - }, - "ChecksumAlgorithm": { - "$ref": "#/definitions/ChecksumAlgorithm" - }, - "Checksum": { - "$ref": "#/definitions/Checksum" - }, - "ValueFormat": { - "$ref": "#/definitions/ValueFormat" - }, - "StackFrameFormat": { - "$ref": "#/definitions/StackFrameFormat" - }, - "ExceptionFilterOptions": { - "$ref": "#/definitions/ExceptionFilterOptions" - }, - "ExceptionOptions": { - "$ref": "#/definitions/ExceptionOptions" - }, - "ExceptionBreakMode": { - "$ref": "#/definitions/ExceptionBreakMode" - }, - "ExceptionPathSegment": { - "$ref": "#/definitions/ExceptionPathSegment" - }, - "ExceptionDetails": { - "$ref": "#/definitions/ExceptionDetails" - }, - "DisassembledInstruction": { - "$ref": "#/definitions/DisassembledInstruction" - }, - "InvalidatedAreas": { - "$ref": "#/definitions/InvalidatedAreas" - } - } -} diff --git a/adapter/Python/requirements.txt b/adapter/Python/requirements.txt new file mode 100644 index 0000000..09d32b5 --- /dev/null +++ b/adapter/Python/requirements.txt @@ -0,0 +1 @@ +debugpy==1.18.17 diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java index b77b6b7..3cd69d6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/BreakpointHandler.java @@ -1,6 +1,6 @@ package org.tzi.use.monitor.adapter.python; -import org.tzi.use.monitor.adapter.python.custom.DAPValue; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPValue; import org.tzi.use.monitor.adapter.python.dap.StackFrame; import org.tzi.use.monitor.adapter.python.dap.StoppedEventClass; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.util.List; -import java.util.Optional; +import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.logging.Level; @@ -43,16 +43,27 @@ public void run() { if (!debugpyClient.isConnected) { return; } - Optional currFrameOpt = messenger.getCurrentFrame(Math.toIntExact(breakpointEvent.getBody().getThreadID())); - if (currFrameOpt.isEmpty()) { - throw new IllegalStateException(); - } - StackFrame currFrame = currFrameOpt.get(); + StackFrame currFrame = messenger.getCurrentFrame(Math.toIntExact(breakpointEvent.getBody().getThreadID())); int currLineNo = (int) currFrame.getLine(); String file = currFrame.getSource().getPath(); - String qualifiedClassName = debugpyClient.fileToClassNameMap.get(file).get(currLineNo); - BreakpointType breakpointType = debugpyClient.fileToBreakpointTypeMap.get(file).get(currLineNo); + Map lineToClass = debugpyClient.fileToClassNameMap.get(file); + if (lineToClass == null || !lineToClass.containsKey(currLineNo)) { + controller.newLogMessage(this, Level.WARNING, "No mapped class for " + file + ":" + currLineNo); + debugpyClient.resume(); + continue; + } + + Map lineToBP = debugpyClient.fileToBreakpointTypeMap.get(file); + if (lineToBP == null || !lineToBP.containsKey(currLineNo)) { + controller.newLogMessage(this, Level.WARNING, "No breakpoint type for " + file + ":" + currLineNo); + debugpyClient.resume(); + continue; + } + + String qualifiedClassName = lineToClass.get(currLineNo); + BreakpointType breakpointType = lineToBP.get(currLineNo); + switch (breakpointType) { case CONSTRUCTOR_CALL -> onConstructorCall(currFrame, qualifiedClassName); case METHOD_CALL -> onMethodCall(currFrame, qualifiedClassName); @@ -61,14 +72,15 @@ public void run() { } debugpyClient.resume(); // Match monitor running state - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + return; + } catch (ExecutionException e) { + controller.newLogMessage(this, Level.SEVERE, "Failed to process breakpoint event: " + e.getMessage()); } } } - - private void onConstructorCall(StackFrame currentFrame, String fullyQualifiedClassName) { controller.newLogMessage(this, Level.FINE, "onConstructorCall: " + fullyQualifiedClassName + "." + currentFrame.getName()); @@ -82,15 +94,28 @@ private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) controller.newLogMessage(this, Level.FINE, String.format("onMethodCall: %s.%s", fullyQualifiedClassName, stackFrame.getName())); PyType pyType = (PyType) controller.getVMType(fullyQualifiedClassName); + String methodId; - if (pyType == null) { + boolean isModuleMethod = pyType == null; + if (isModuleMethod) { methodId = String.format("%s:%s.%s", fullyQualifiedClassName, fullyQualifiedClassName, stackFrame.getName()); } else { - methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + var methods = pyType.getMethodsByName(stackFrame.getName()); + if (methods.isEmpty()) { + controller.newLogMessage(this, Level.WARNING, + "No VM method found for " + fullyQualifiedClassName + "." + stackFrame.getName()); + return; + } + methodId = (String) methods.getFirst().getId(); } + PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); + if (pyMethod == null) { + controller.newLogMessage(this, Level.WARNING, "VM method lookup returned null for id: " + methodId); + return; + } - Long pyObjId = (pyType == null) + Long pyObjId = isModuleMethod ? DebugpyClient.GLOBAL_MODULE_ID : messenger.getSelfId(stackFrame.getID()); PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); @@ -108,12 +133,22 @@ private void onMethodCall(StackFrame stackFrame, String fullyQualifiedClassName) private void onMethodExit(StackFrame stackFrame, String qualifiedClassName) { PyType pyType = (PyType) controller.getVMType(qualifiedClassName); + + boolean isModuleMethod = pyType == null; + String methodId; - if (pyType == null) { + if (isModuleMethod) { methodId = String.format("%s:%s.%s", qualifiedClassName, qualifiedClassName, stackFrame.getName()); } else { - methodId = (String) pyType.getMethodsByName(stackFrame.getName()).getFirst().getId(); + var methods = pyType.getMethodsByName(stackFrame.getName()); + if (methods.isEmpty()) { + controller.newLogMessage(this, Level.WARNING, "No VM method found for exit of " + + qualifiedClassName + "." + stackFrame.getName()); + return; + } + methodId = (String) methods.getFirst().getId(); } + PyMethod pyMethod = (PyMethod) controller.getVMMethod(methodId); controller.onMethodExit(pyMethod, pyMethod.getId()); } @@ -121,22 +156,44 @@ private void onMethodExit(StackFrame stackFrame, String qualifiedClassName) { private void onAttrMod(StackFrame stackFrame, String qualifiedClassName) { controller.newLogMessage(this, Level.FINE, "onAttributeModification: " + qualifiedClassName + "." + stackFrame.getName()); + boolean isSetter = stackFrame.getName().startsWith("set"); + if (!isSetter) { + controller.newLogMessage(this, Level.WARNING, "Wrongly stopped at non-setter method for attribute modification!"); + return; + } + + String attrName = stackFrame.getName().substring(4); + Long pyObjId = messenger.getSelfId(stackFrame.getID()); PyObject pyObject = (PyObject) controller.getVMObject(pyObjId); - PyField pyField = (PyField) pyObject.getType().getFieldByName(stackFrame.getName().replace("set_", "")); + PyField pyField = (PyField) pyObject.getType().getFieldByName(attrName); + if (pyField == null) { + controller.newLogMessage(this, Level.WARNING, + "Cannot determine target attribute for setter: " + stackFrame.getName()); + return; + } + + var methods = pyObject.getType().getMethodsByName(stackFrame.getName()); + if (methods.isEmpty()) { + controller.newLogMessage(this, Level.WARNING, "No VM method found for attribute modification on " + + qualifiedClassName + "." + stackFrame.getName()); + return; + } + String methodId = (String) methods.getFirst().getId(); - String methodId = (String) pyObject.getType().getMethodsByName(stackFrame.getName()).getFirst().getId(); PyMethod m = (PyMethod) controller.getVMMethod(methodId); - // TODO FIX assert only one arg - List argValues = new ArrayList<>(); - for (String argName : m.getArgumentNames()) { - DAPValue argDAPValue = messenger.getMethodArgDAPValue(stackFrame.getID(), argName); - argValues.add(debugpyClient.getUSEValue(argDAPValue)); + if (m != null) { + if (m.getArgumentNames().size() == 1) { + DAPValue argDAPValue = messenger.getMethodArgDAPValue(stackFrame.getID(), m.getArgumentNames().getFirst()); + Value useValue = debugpyClient.getUSEValue(argDAPValue); + controller.onUpdateAttribute(pyObjId, pyField.getId(), useValue); + } else { + controller.newLogMessage(this, Level.WARNING, + String.format("Could not resolve new value for attribute %s! Expected 1 setter method argument. Found: %d", + pyField.getName(), m.getArgumentNames().size())); + } } - - controller.onUpdateAttribute(pyObjId, pyField.getId(), argValues.get(0)); } - } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java index cf9c2df..9c32075 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/DebugpyClient.java @@ -3,13 +3,14 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import org.tzi.use.monitor.adapter.python.custom.DAPValue; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPValue; import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import org.tzi.use.plugins.monitor.Monitor; import org.tzi.use.plugins.monitor.vm.mm.VMField; import org.tzi.use.plugins.monitor.vm.mm.VMMethod; import org.tzi.use.plugins.monitor.vm.mm.VMObject; +import org.tzi.use.plugins.monitor.vm.mm.VMType; import org.tzi.use.uml.ocl.type.TupleType; import org.tzi.use.uml.ocl.type.Type; import org.tzi.use.uml.ocl.type.TypeFactory; @@ -24,6 +25,9 @@ import java.util.regex.Pattern; /** + * The DebugpyClient encapsulates the core logic on which the PythonAdapter relies + * to provide the monitor with runtime information, bridging the gap between + * runtime and static representation of VM models. * * @author Sergio Jimenez */ @@ -66,9 +70,9 @@ boolean attach() { return initResp.getSuccess(); } - PyType getVMType(String fqcn) { + VMType getVMType(String fqcn) { if (controller.existsVMType(fqcn)) { - controller.getVMType(fqcn); + return controller.getVMType(fqcn); } if (fqcn.equals("Global")) { return new PyType(adapter, fqcn, false); @@ -79,8 +83,10 @@ PyType getVMType(String fqcn) { pause(); // Match monitor state - Optional fileOpt = messenger.evaluate(PyEvalExBuilder.getClass(fqcn)); - if (fileOpt.isEmpty()) { + try { + String ignore = messenger.evaluate(PyEvalExBuilder.getClass(fqcn)); + } catch (Exception e) { + System.err.printf("Error evaluating VM type '%s'. Cause: %s%n", fqcn, e.getMessage()); return null; } @@ -96,12 +102,15 @@ protected VMMethod getVMMethod(String fqcn, String methodName, boolean isModule) return controller.getVMMethod(methodId); } - Optional methodInfoOpt = messenger.evaluate(PyEvalExBuilder.getMethodInfo(fqcn, methodName, isModule)); - if (methodInfoOpt.isEmpty()) { + String methodInfo; + try { + methodInfo = messenger.evaluate(PyEvalExBuilder.getMethodInfo(fqcn, methodName, isModule)); + } catch (Exception e) { + System.err.printf("Error evaluating VM method '%s'. Cause: %s%n", methodName, e.getMessage()); return null; } - String json = methodInfoOpt.get().replace("'", "\""); + String json = methodInfo.replace("'", "\""); JsonNode root; try { root = mapper.readTree(json); @@ -207,15 +216,19 @@ protected Set getInstances(PyType pyType, int maxInstances) { : new PyObject(adapter, GLOBAL_MODULE_ID, pyType); return Set.of(obj); } + pause(); - Optional instanceIdsOpt = messenger.evaluate(PyEvalExBuilder.getInstanceIds(pyType.getName(), maxInstances)); - if (instanceIdsOpt.isEmpty()) { - controller.newLogMessage(this, Level.SEVERE, String.format("Could not query instances for type '%s'", pyType.getName())); + + String instanceIds; + try { + instanceIds = messenger.evaluate(PyEvalExBuilder.getInstanceIds(pyType.getName(), maxInstances)); + } catch (Exception e) { + System.err.printf("Could not query instances for type '%s'. Cause: %s%n", pyType.getName(), e.getMessage()); return Set.of(); } - String instanceIds = instanceIdsOpt.get(); + Set objs = new HashSet<>(); - if (instanceIds.equals("'[]'")) { + if (instanceIds == null || instanceIds.length() < 4 || !instanceIds.startsWith("'[") || !instanceIds.endsWith("]'")) { return objs; } String[] ids = instanceIds.substring(2, instanceIds.length() - 2).split(","); @@ -232,8 +245,6 @@ public Value getUSEValue(DAPValue dapValue) { return UndefinedValue.instance; } - System.out.println("Getting DAPValue for type: " + dapValue.getType()); - return switch (dapValue.getType()) { case "int" -> IntegerValue.valueOf(Integer.parseInt(dapValue.getResult())); case "float" -> new RealValue(Double.parseDouble(dapValue.getResult())); @@ -342,13 +353,11 @@ public Value getUSEValue(DAPValue dapValue) { if (dapValue.getResult().contains("object")) { long objId = extractHexAndConvertToDecimal(dapValue.getResult()); if (controller.existsVMObject(objId)) { - System.out.println("Found obj for USE value with id: " + objId); VMObject obj = controller.getVMObject(objId); yield new ObjectValue(obj.getUSEObject().cls(), obj.getUSEObject()); } } // Unknown - System.out.println("Unknown case for dapValue type: " + dapValue.getType()); yield UndefinedValue.instance; } }; @@ -360,7 +369,7 @@ private long extractHexAndConvertToDecimal(String input) { String hexString = matcher.group(); return Long.parseLong(hexString.substring(2), 16); } - return 0; + return 0L; } private List fetchChildren(long variablesReference) { @@ -380,10 +389,10 @@ public boolean registerConstructorCallInterest(PyType pyType) { } PyMethod method = ((PyMethod) pyType.getMethodsByName("__init__").getFirst()); String file = method.getFile(); - int endLineNo = method.getStartLineNo(); + int startLineNo = method.getStartLineNo(); String className = method.getClassName(); - updateInternalBreakpointMappings(file, className, List.of(endLineNo), BreakpointType.CONSTRUCTOR_CALL); + updateInternalBreakpointMappings(file, className, List.of(startLineNo), BreakpointType.CONSTRUCTOR_CALL); return setBreakpoints(file); } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java index b967252..ed5163a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/MessageMapper.java @@ -3,6 +3,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPEvent; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPMessage; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPUnknown; import org.tzi.use.monitor.adapter.python.dap.*; /** @@ -14,16 +18,28 @@ public class MessageMapper { public static DAPMessage parseMessage(String json) throws Exception { JsonNode tree = mapper.readTree(json); - String type = tree.get("type").asText(); + if (tree == null || !tree.has("type")) { + return new DAPUnknown(json, "Missing or invalid 'type' field"); + } + String type = tree.get("type").asText(null); + if (type == null) { + return new DAPUnknown(json, "Null 'type' field"); + } return switch (type) { case "response" -> parseResponse(tree, json); case "event" -> parseEvent(tree, json); - default -> null; + default -> new DAPUnknown(json, "Unsupported type: " + type); }; } private static DAPResponse parseResponse(JsonNode tree, String json) throws JsonProcessingException { - String command = tree.get("command").asText(); + if (!tree.has("command")) { + return new DAPUnknown(json, "Missing 'command' in response"); + } + String command = tree.get("command").asText(null); + if (command == null) { + return new DAPUnknown(json, "Null 'command' field"); + } return switch (command) { case "initialize" -> mapper.readValue(json, InitializeResponseClass.class); case "attach" -> mapper.readValue(json, AttachResponseClass.class); @@ -36,18 +52,24 @@ private static DAPResponse parseResponse(JsonNode tree, String json) throws Json case "disconnect" -> mapper.readValue(json, DisconnectResponseClass.class); case "setBreakpoints" -> mapper.readValue(json, SetBreakpointsResponseClass.class); case "variables" -> mapper.readValue(json, VariablesResponseClass.class); - default -> null; + default -> new DAPUnknown(json, "Unknown response command: " + command); }; } private static DAPEvent parseEvent(JsonNode tree, String json) throws JsonProcessingException { - String event = tree.get("event").asText(); + if (!tree.has("event")) { + return new DAPUnknown(json, "Missing 'event' field in event"); + } + String event = tree.get("event").asText(null); + if (event == null) { + return new DAPUnknown(json, "Null 'event' field"); + } return switch (event) { case "initialized" -> mapper.readValue(json, InitializedEventClass.class); case "stopped" -> mapper.readValue(json, StoppedEventClass.class); case "terminated" -> mapper.readValue(json, TerminatedEventClass.class); case "continued" -> mapper.readValue(json, ContinuedEventClass.class); - default -> null; + default -> new DAPUnknown(json, "Unknown event type: " + event); }; } diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java index 2dd6430..487bda2 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/Messenger.java @@ -2,12 +2,13 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.tzi.use.monitor.adapter.python.custom.DAPValue; import org.tzi.use.monitor.adapter.python.dap.*; import org.tzi.use.monitor.adapter.python.dap.Thread; +import org.tzi.use.monitor.adapter.python.dap.custom.*; import java.io.*; import java.net.Socket; +import java.nio.charset.StandardCharsets; import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; @@ -19,7 +20,7 @@ */ public class Messenger { - public static int REQUEST_COUNTER = 1; + private static int REQUEST_COUNTER = 1; private final ObjectMapper mapper = new ObjectMapper(); @@ -59,8 +60,7 @@ public void attach(String host, int port, String workspace) { var attachArgs = new AttachRequestArgumentsClass(); attachArgs.setConnect(Map.of("host", host, "port", port)); attachArgs.setPathMappings(List.of(Map.of("localRoot", workspace, "remoteRoot", "."))); - // FIXME: Dynamic OS resolution with debugpy expected values - attachArgs.setClientOs("unix"); + attachArgs.setClientOs(resolveClientOS()); attachArgs.setDebugOptions(List.of("RedirectOutput", "ShowReturnValue")); attachArgs.setShowReturnValue(true); attachArgs.setJustMyCode(true); @@ -74,10 +74,17 @@ public void attach(String host, int port, String workspace) { try { initEventFuture.get(); } catch (InterruptedException | ExecutionException e) { + if (e instanceof InterruptedException) java.lang.Thread.currentThread().interrupt(); throw new RuntimeException(e); } } + private String resolveClientOS() { + return System.getProperty("os.name").toLowerCase().contains("win") + ? "WINDOWS" + : "UNIX"; + } + public void configurationDone() { var confDoneReq = new ConfigurationDoneRequestClass(); confDoneReq.setSeq(REQUEST_COUNTER++); @@ -92,7 +99,7 @@ public void configurationDone() { try { java.lang.Thread.sleep(1000); } catch (InterruptedException e) { - throw new RuntimeException(e); + java.lang.Thread.currentThread().interrupt(); } } @@ -100,11 +107,8 @@ public boolean pause() { pauseEventFuture = new CompletableFuture<>(); var pauseArgs = new PauseRequestArguments(); - var threadIdOpt = getThreadId(); - if (threadIdOpt.isEmpty()) { - return false; - } - pauseArgs.setThreadID(threadIdOpt.get()); + var threadId = getThreadId(); + pauseArgs.setThreadID(threadId); var pauseReq = new PauseRequestClass(); pauseReq.setSeq(REQUEST_COUNTER++); pauseReq.setArguments(pauseArgs); @@ -117,6 +121,7 @@ public boolean pause() { try { pauseEventFuture.get(); } catch (InterruptedException | ExecutionException e) { + if (e instanceof InterruptedException) java.lang.Thread.currentThread().interrupt(); throw new RuntimeException(e); } return true; @@ -126,7 +131,7 @@ public boolean resume() { continuedEventFuture = new CompletableFuture<>(); var continueArgs = new ContinueRequestArguments(); - continueArgs.setThreadID(getThreadId().get()); + continueArgs.setThreadID(getThreadId()); var continueReq = new ContinueRequestClass(); continueReq.setSeq(REQUEST_COUNTER++); continueReq.setArguments(continueArgs); @@ -137,9 +142,9 @@ public boolean resume() { try { continuedEventFuture.get(); } catch (InterruptedException | ExecutionException e) { + if (e instanceof InterruptedException) java.lang.Thread.currentThread().interrupt(); throw new RuntimeException(e); } - return true; } @@ -157,7 +162,6 @@ protected Long getSelfId(long frameId) { } - public Variable[] getDAPChildren(long variablesReference) { var varArgs = new VariablesRequestArguments(); varArgs.setVariablesReference(variablesReference); @@ -203,17 +207,15 @@ public boolean setBreakpoints(String file, Set lines) { return bpResp.getSuccess(); } - public Optional evaluate(String expression) { + public String evaluate(String expression) throws Exception { EvaluateResponseClass raw = evaluateRaw(expression); - if (raw == null) { - return Optional.empty(); + if (raw.getSuccess()) { + return raw.getBody().getResult(); } - return raw.getSuccess() - ? Optional.of(raw.getBody().getResult()) - : Optional.empty(); + throw new Exception("Failed to evaluate expression: " + expression); } - protected DAPValue getMethodArgDAPValue(long frameId, String argName){ + protected DAPValue getMethodArgDAPValue(long frameId, String argName) { var evalArgs = new EvaluateRequestArguments(); evalArgs.setFrameID(frameId); evalArgs.setContext("watch"); @@ -226,17 +228,10 @@ protected DAPValue getMethodArgDAPValue(long frameId, String argName){ } public EvaluateResponseClass evaluateRaw(String expression) { - Optional threadIdOpt = getThreadId(); - if (threadIdOpt.isEmpty()) { - return null; - } - Optional currStackFrameOpt = getCurrentFrame(threadIdOpt.get()); - if (currStackFrameOpt.isEmpty()) { - return null; - } + StackFrame currStackFrame = getCurrentFrame(getThreadId()); var evalArgs = new EvaluateRequestArguments(); evalArgs.setContext("watch"); - evalArgs.setFrameID(currStackFrameOpt.get().getID()); + evalArgs.setFrameID(currStackFrame.getID()); evalArgs.setExpression(expression); var evalReq = new EvaluateRequestClass(); evalReq.setSeq(REQUEST_COUNTER++); @@ -244,21 +239,21 @@ public EvaluateResponseClass evaluateRaw(String expression) { return (EvaluateResponseClass) sendRequestSync(evalReq); } - public Optional getThreadId() { + public Long getThreadId() { var threadsReq = new ThreadsRequestClass(); threadsReq.setSeq(REQUEST_COUNTER++); var threadsResp = (ThreadsResponseClass) sendRequestSync(threadsReq); if (threadsResp.getSuccess()) { for (Thread thread : threadsResp.getBody().getThreads()) { if (thread.getName().equals("MainThread")) { - return Optional.of(thread.getID()); + return thread.getID(); } } } - return Optional.empty(); + throw new IllegalMonitorStateException("Could not get thread id from threads request!"); } - public Optional getCurrentFrame(long threadId) { + public StackFrame getCurrentFrame(long threadId) { var stackTraceArgs = new StackTraceRequestArguments(); stackTraceArgs.setThreadID(threadId); var stackTraceReq = new StackTraceRequestClass(); @@ -266,9 +261,10 @@ public Optional getCurrentFrame(long threadId) { stackTraceReq.setArguments(stackTraceArgs); var stackTraceResp = (StackTraceResponseClass) sendRequestSync(stackTraceReq); - return stackTraceResp.getSuccess() - ? Optional.of(stackTraceResp.getBody().getStackFrames()[0]) - : Optional.empty(); + if (stackTraceResp.getSuccess()) { + return stackTraceResp.getBody().getStackFrames()[0]; + } + throw new IllegalMonitorStateException(String.format("Could not get current stack frame for threadId: %d!", threadId)); } private DAPResponse sendRequestSync(DAPRequest dapRequest) { @@ -279,10 +275,9 @@ private DAPResponse sendRequestSync(DAPRequest dapRequest) { private DAPResponse waitForAsyncResponse(CompletableFuture futureResp) { DAPResponse res; try { - System.out.println("Waiting for response..."); res = futureResp.get(); - System.out.println("Finished waiting for response..."); } catch (InterruptedException | ExecutionException e) { + if (e instanceof InterruptedException) java.lang.Thread.currentThread().interrupt(); throw new RuntimeException(e); } return res; @@ -300,10 +295,12 @@ private CompletableFuture sendRequestAsync(DAPRequest request) { throw new RuntimeException(e); } - String header = "Content-Length: " + json.length() + "\r\n\r\n"; + byte[] bytes = json.getBytes(StandardCharsets.UTF_8); + String header = "Content-Length: " + bytes.length + "\r\n\r\n"; try { - System.out.println("Sending request: " + header + json); - out.write(header + json); + out.write(header); + out.flush(); + out.write(json); out.flush(); } catch (IOException e) { throw new RuntimeException(e); @@ -313,30 +310,37 @@ private CompletableFuture sendRequestAsync(DAPRequest request) { private void startReaderThread() { var readerThread = new java.lang.Thread(() -> { - System.out.println("Reader thread started..."); try { while (true) { String line; int contentLength = 0; while ((line = in.readLine()) != null && !line.isEmpty()) { - contentLength = Integer.parseInt(line.substring("Content-Length:".length()).trim()); + if (line.startsWith("Content-Length:")) { + String val = line.substring("Content-Length:".length()).trim(); + try { + contentLength = Integer.parseInt(val); + } catch (NumberFormatException ignored) { + } + } } + + if (contentLength <= 0) { + continue; + } + char[] body = new char[contentLength]; int read = 0; while (read < contentLength) { int r = in.read(body, read, contentLength - read); - if (r == -1) throw new IOException("Unexpected end of stream"); + if (r == -1) return; read += r; } String json = new String(body); - if (json.isEmpty()) { + if (json.isBlank()) { continue; } - System.out.println("Received json response: " + json); DAPMessage msg = MessageMapper.parseMessage(json); - System.out.println("Parsed json response to object..."); if (msg == null) { - System.out.println("Skipping unknown message type..."); continue; } if (msg instanceof DAPResponse dapResp) { @@ -365,9 +369,16 @@ private void startReaderThread() { } } } + if (msg instanceof DAPUnknown dapUnknown) { + System.err.println(dapUnknown); + } } + } catch (InterruptedIOException e) { + java.lang.Thread.currentThread().interrupt(); + } catch (IOException e) { + return; } catch (Exception e) { - throw new RuntimeException(e); + e.printStackTrace(); } }); readerThread.setDaemon(true); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java index e133871..94aea22 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PyEvalExBuilder.java @@ -21,7 +21,7 @@ public static String getSelfIdAtCurrentFrame() { public static String getInstanceIds(String qualifiedClassName, int maxInstances) { String[] classNameParts = getClassNameParts(qualifiedClassName); return String.format( - "repr([id(obj) for obj in __import__('gc').get_objects() if isinstance(obj, getattr(__import__('%s'), '%s'))][:%d])\n", + "repr([id(obj) for obj in __import__('gc').get_objects() if isinstance(obj, getattr(__import__('%s'), '%s'))][:%d])", classNameParts[MODULE_NAME_IDX], classNameParts[SIMPLE_CLASS_NAME_IDX], maxInstances diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java index 2b3aba1..2182b34 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/PythonAdapter.java @@ -1,6 +1,6 @@ package org.tzi.use.monitor.adapter.python; -import org.tzi.use.monitor.adapter.python.custom.DAPValue; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPValue; import org.tzi.use.monitor.plugins.monitor.vm.mm.python.*; import org.tzi.use.plugins.monitor.MonitorException; import org.tzi.use.plugins.monitor.vm.adapter.AbstractVMAdapter; @@ -9,12 +9,13 @@ import org.tzi.use.plugins.monitor.vm.mm.*; import org.tzi.use.uml.ocl.value.*; -import java.nio.file.Files; -import java.nio.file.Path; import java.util.*; import java.util.logging.Level; /** + * The PythonAdapter is an implementation of the VMAdapter abstraction + * to support the monitoring of Python programs. + * * @author Sergio Jimenez */ public class PythonAdapter extends AbstractVMAdapter { @@ -34,6 +35,9 @@ public class PythonAdapter extends AbstractVMAdapter { @Override protected void validateSettings() throws InvalidAdapterConfiguration { List settings = getSettings(); + if (settings.size() < 4) { + throw new InvalidAdapterConfiguration("Adapter settings incomplete!"); + } String settingHostVal = settings.get(SETTING_HOST_IDX).value; if (settingHostVal == null || settingHostVal.isBlank()) { @@ -48,18 +52,10 @@ protected void validateSettings() throws InvalidAdapterConfiguration { } String settingWorkspace = settings.get(SETTING_WORKSPACE_IDX).value; - try { - // FIXME: SUM should not be assumed to be in the localhost. - Path workspacePath = Path.of(settingWorkspace); - boolean isValidDir = Files.isDirectory(workspacePath); - if (isValidDir) { - workspace = workspacePath.toString(); - } else { - throw new IllegalArgumentException(); - } - } catch (Exception e) { - throw new InvalidAdapterConfiguration("Invalid directory!"); + if (settingWorkspace == null || settingWorkspace.isBlank()) { + throw new InvalidAdapterConfiguration("Workspace directory is missing!"); } + workspace = settingWorkspace; try { maxInstances = Integer.parseInt(settings.get(SETTING_MAX_INSTANCES_IDX).value); @@ -83,6 +79,7 @@ public void attachToVM() throws MonitorException { debugpyClient = new DebugpyClient(host, port, workspace, this, controller); if (!debugpyClient.attach()) { controller.newLogMessage(this, Level.SEVERE, errMsg); + throw new MonitorException(errMsg); } } catch (Exception e) { throw new MonitorException(errMsg, e); @@ -155,7 +152,7 @@ public VMField getVMField(String fqcn, String fieldName) { public void registerConstructorCallInterest(VMType vmType) { controller.newLogMessage(this, Level.FINE, String.format("Registering constructor call interest for type '%s'...", vmType)); if (!debugpyClient.registerConstructorCallInterest((PyType) vmType)) { - controller.newLogMessage(this, Level.WARNING, String.format("Could not register constructor call interestest for type '%s'!", vmType)); + controller.newLogMessage(this, Level.WARNING, String.format("Could not register constructor call interest for type '%s'!", vmType)); } } @@ -163,7 +160,7 @@ public void registerConstructorCallInterest(VMType vmType) { public void registerOperationCallInterest(VMMethod vmMethod) { controller.newLogMessage(this, Level.FINE, String.format("Registering operation call interest for '%s'...", vmMethod)); if (!debugpyClient.registerOperationCallInterest((PyMethod) vmMethod)) { - controller.newLogMessage(this, Level.WARNING, String.format("Could not register operation call interestest for '%s'!", vmMethod)); + controller.newLogMessage(this, Level.WARNING, String.format("Could not register operation call interest for '%s'!", vmMethod)); } } @@ -171,13 +168,13 @@ public void registerOperationCallInterest(VMMethod vmMethod) { public void registerFieldModificationInterest(VMField vmField) { controller.newLogMessage(this, Level.FINE, String.format("Registering field modification interest for '%s'...", vmField)); if (!debugpyClient.registerFieldModificationInterest((PyField) vmField)) { - controller.newLogMessage(this, Level.WARNING, String.format("Could not register field modification interestest for '%s'!", vmField)); + controller.newLogMessage(this, Level.WARNING, String.format("Could not register field modification interest for '%s'!", vmField)); } } @Override public boolean isVMTypeLoaded(String javaClassName) { - return getVMType(javaClassName) != null; + return controller.existsVMType(javaClassName); } @Override diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestClass.java index 38f847e..bf8b254 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseClass.java index e0fd6f8..89a38c5 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/AttachResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java index f94a1c5..81148a2 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/BreakpointEventClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPEvent; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestClass.java index caf80b4..005bafe 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneRequestClass.java @@ -1,6 +1,8 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; + import java.util.Map; /** diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneResponseClass.java index e3c587a..ce41eab 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ConfigurationDoneResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java index c40af91..7b3e1dc 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java index 48bccf8..7c9e85b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinueResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java index 7c15aec..af9d501 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ContinuedEventClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPEvent; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java deleted file mode 100644 index 9d2cd9b..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPEvent.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.tzi.use.monitor.adapter.python.dap; - -public interface DAPEvent extends DAPMessage { -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPMessage.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPMessage.java deleted file mode 100644 index 0a46ed5..0000000 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPMessage.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.tzi.use.monitor.adapter.python.dap; - -public interface DAPMessage { -} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java index 543b245..bfed32e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java index 26f5edc..e6f5fc6 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DisconnectResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java index dba34eb..8d27c85 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java index dca9e05..1ee9f0b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/EvaluateResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestClass.java index d0641f5..16af676 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeResponseClass.java index da32408..e0ad255 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializeResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventClass.java index 8368826..2c38e1a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/InitializedEventClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPEvent; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestClass.java index a75aab4..b4a9e67 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java index d6d7bb5..3b98f29 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/PauseResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java index 5ae6f1b..cee664e 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java index e48271d..980cd3a 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/SetBreakpointsResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestClass.java index 88cccb9..18ff54b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java index 3d6bae9..9058633 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StackTraceResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java index f2e8720..df5940f 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/StoppedEventClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPEvent; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java index 0c7f44e..3a232b3 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/TerminatedEventClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPEvent; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java index 578208a..0840b5b 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java index 62b323e..252abcb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/ThreadsResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java index 7ca6b63..76b00ff 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesRequestClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPRequest; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java index 3122d10..d5bdd04 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/VariablesResponseClass.java @@ -1,6 +1,7 @@ package org.tzi.use.monitor.adapter.python.dap; import com.fasterxml.jackson.annotation.*; +import org.tzi.use.monitor.adapter.python.dap.custom.DAPResponse; /** * Base class of requests, responses, and events. diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPEvent.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPEvent.java new file mode 100644 index 0000000..c29bdba --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPEvent.java @@ -0,0 +1,4 @@ +package org.tzi.use.monitor.adapter.python.dap.custom; + +public interface DAPEvent extends DAPMessage { +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPMessage.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPMessage.java new file mode 100644 index 0000000..9935ce5 --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPMessage.java @@ -0,0 +1,4 @@ +package org.tzi.use.monitor.adapter.python.dap.custom; + +public interface DAPMessage { +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPRequest.java similarity index 56% rename from adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java rename to adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPRequest.java index 2a0261b..80e16d8 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPRequest.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPRequest.java @@ -1,4 +1,4 @@ -package org.tzi.use.monitor.adapter.python.dap; +package org.tzi.use.monitor.adapter.python.dap.custom; public interface DAPRequest extends DAPMessage { long getSeq(); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPResponse.java similarity index 58% rename from adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java rename to adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPResponse.java index d68e0e7..e334446 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/DAPResponse.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPResponse.java @@ -1,4 +1,4 @@ -package org.tzi.use.monitor.adapter.python.dap; +package org.tzi.use.monitor.adapter.python.dap.custom; public interface DAPResponse extends DAPMessage { long getRequestSeq(); diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPUnknown.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPUnknown.java new file mode 100644 index 0000000..d3c429d --- /dev/null +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPUnknown.java @@ -0,0 +1,30 @@ +package org.tzi.use.monitor.adapter.python.dap.custom; + +public class DAPUnknown implements DAPMessage, DAPEvent, DAPResponse { + private final String rawJson; + private final String reason; + + public DAPUnknown(String rawJson, String reason) { + this.rawJson = rawJson; + this.reason = reason; + } + + public String getRawJson() { + return rawJson; + } + + public String getReason() { + return reason; + } + + @Override + public String toString() { + return "DAPUnknown{reason='%s', rawJson='%s'}".formatted(reason, rawJson); + } + + @Override + public long getRequestSeq() { + return 0; + } + +} diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/custom/DAPValue.java b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPValue.java similarity index 94% rename from adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/custom/DAPValue.java rename to adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPValue.java index df2a65c..21228ca 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/custom/DAPValue.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/adapter/python/dap/custom/DAPValue.java @@ -1,4 +1,4 @@ -package org.tzi.use.monitor.adapter.python.custom; +package org.tzi.use.monitor.adapter.python.dap.custom; public final class DAPValue { private final String result; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java index 232e57f..7a016eb 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyMethodCall.java @@ -1,6 +1,5 @@ package org.tzi.use.monitor.plugins.monitor.vm.mm.python; -import org.tzi.use.monitor.adapter.python.PythonAdapter; import org.tzi.use.plugins.monitor.vm.adapter.VMAccessException; import org.tzi.use.plugins.monitor.vm.mm.VMMethod; import org.tzi.use.plugins.monitor.vm.mm.VMMethodCall; diff --git a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java index 26b3a34..e086342 100644 --- a/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java +++ b/adapter/Python/src/main/java/org/tzi/use/monitor/plugins/monitor/vm/mm/python/PyObject.java @@ -53,11 +53,7 @@ public Value getValue(VMField field) { @Override public String toString() { - return "PyObject{" + - "id=" + id + - ", type=" + type + - ", useObject=" + useObject + - '}'; + return String.format("%s:%d", type, type.toString(), id); } } diff --git a/adapter/Python/src/main/resources/protocol/debugProtocol.json b/adapter/Python/src/main/resources/protocol/debugProtocol.json deleted file mode 100644 index 6682e10..0000000 --- a/adapter/Python/src/main/resources/protocol/debugProtocol.json +++ /dev/null @@ -1,4753 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Debug Adapter Protocol", - "description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.", - "type": "object", - - "properties": { - "ProtocolMessage": { - "$ref": "#/definitions/ProtocolMessage" - }, - "Request": { - "$ref": "#/definitions/Request" - }, - "Event": { - "$ref": "#/definitions/Event" - }, - "Response": { - "$ref": "#/definitions/Response" - }, - "ErrorResponse": { - "$ref": "#/definitions/ErrorResponse" - }, - "CancelRequest": { - "$ref": "#/definitions/CancelRequest" - }, - "CancelArguments": { - "$ref": "#/definitions/CancelArguments" - }, - "CancelResponse": { - "$ref": "#/definitions/CancelResponse" - }, - "InitializedEvent": { - "$ref": "#/definitions/InitializedEvent" - }, - "StoppedEvent": { - "$ref": "#/definitions/StoppedEvent" - }, - "ContinuedEvent": { - "$ref": "#/definitions/ContinuedEvent" - }, - "ExitedEvent": { - "$ref": "#/definitions/ExitedEvent" - }, - "TerminatedEvent": { - "$ref": "#/definitions/TerminatedEvent" - }, - "ThreadEvent": { - "$ref": "#/definitions/ThreadEvent" - }, - "OutputEvent": { - "$ref": "#/definitions/OutputEvent" - }, - "BreakpointEvent": { - "$ref": "#/definitions/BreakpointEvent" - }, - "ModuleEvent": { - "$ref": "#/definitions/ModuleEvent" - }, - "LoadedSourceEvent": { - "$ref": "#/definitions/LoadedSourceEvent" - }, - "ProcessEvent": { - "$ref": "#/definitions/ProcessEvent" - }, - "CapabilitiesEvent": { - "$ref": "#/definitions/CapabilitiesEvent" - }, - "ProgressStartEvent": { - "$ref": "#/definitions/ProgressStartEvent" - }, - "ProgressUpdateEvent": { - "$ref": "#/definitions/ProgressUpdateEvent" - }, - "ProgressEndEvent": { - "$ref": "#/definitions/ProgressEndEvent" - }, - "InvalidatedEvent": { - "$ref": "#/definitions/InvalidatedEvent" - }, - "MemoryEvent": { - "$ref": "#/definitions/MemoryEvent" - }, - "RunInTerminalRequest": { - "$ref": "#/definitions/RunInTerminalRequest" - }, - "RunInTerminalRequestArguments": { - "$ref": "#/definitions/RunInTerminalRequestArguments" - }, - "RunInTerminalResponse": { - "$ref": "#/definitions/RunInTerminalResponse" - }, - "StartDebuggingRequest": { - "$ref": "#/definitions/StartDebuggingRequest" - }, - "StartDebuggingRequestArguments": { - "$ref": "#/definitions/StartDebuggingRequestArguments" - }, - "StartDebuggingResponse": { - "$ref": "#/definitions/StartDebuggingResponse" - }, - "InitializeRequest": { - "$ref": "#/definitions/InitializeRequest" - }, - "InitializeRequestArguments": { - "$ref": "#/definitions/InitializeRequestArguments" - }, - "InitializeResponse": { - "$ref": "#/definitions/InitializeResponse" - }, - "ConfigurationDoneRequest": { - "$ref": "#/definitions/ConfigurationDoneRequest" - }, - "ConfigurationDoneArguments": { - "$ref": "#/definitions/ConfigurationDoneArguments" - }, - "ConfigurationDoneResponse": { - "$ref": "#/definitions/ConfigurationDoneResponse" - }, - "LaunchRequest": { - "$ref": "#/definitions/LaunchRequest" - }, - "LaunchRequestArguments": { - "$ref": "#/definitions/LaunchRequestArguments" - }, - "LaunchResponse": { - "$ref": "#/definitions/LaunchResponse" - }, - "AttachRequest": { - "$ref": "#/definitions/AttachRequest" - }, - "AttachRequestArguments": { - "$ref": "#/definitions/AttachRequestArguments" - }, - "AttachResponse": { - "$ref": "#/definitions/AttachResponse" - }, - "RestartRequest": { - "$ref": "#/definitions/RestartRequest" - }, - "RestartArguments": { - "$ref": "#/definitions/RestartArguments" - }, - "RestartResponse": { - "$ref": "#/definitions/RestartResponse" - }, - "DisconnectRequest": { - "$ref": "#/definitions/DisconnectRequest" - }, - "DisconnectArguments": { - "$ref": "#/definitions/DisconnectArguments" - }, - "DisconnectResponse": { - "$ref": "#/definitions/DisconnectResponse" - }, - "TerminateRequest": { - "$ref": "#/definitions/TerminateRequest" - }, - "TerminateArguments": { - "$ref": "#/definitions/TerminateArguments" - }, - "TerminateResponse": { - "$ref": "#/definitions/TerminateResponse" - }, - "BreakpointLocationsRequest": { - "$ref": "#/definitions/BreakpointLocationsRequest" - }, - "BreakpointLocationsArguments": { - "$ref": "#/definitions/BreakpointLocationsArguments" - }, - "BreakpointLocationsResponse": { - "$ref": "#/definitions/BreakpointLocationsResponse" - }, - "SetBreakpointsRequest": { - "$ref": "#/definitions/SetBreakpointsRequest" - }, - "SetBreakpointsArguments": { - "$ref": "#/definitions/SetBreakpointsArguments" - }, - "SetBreakpointsResponse": { - "$ref": "#/definitions/SetBreakpointsResponse" - }, - "SetFunctionBreakpointsRequest": { - "$ref": "#/definitions/SetFunctionBreakpointsRequest" - }, - "SetFunctionBreakpointsArguments": { - "$ref": "#/definitions/SetFunctionBreakpointsArguments" - }, - "SetFunctionBreakpointsResponse": { - "$ref": "#/definitions/SetFunctionBreakpointsResponse" - }, - "SetExceptionBreakpointsRequest": { - "$ref": "#/definitions/SetExceptionBreakpointsRequest" - }, - "SetExceptionBreakpointsArguments": { - "$ref": "#/definitions/SetExceptionBreakpointsArguments" - }, - "SetExceptionBreakpointsResponse": { - "$ref": "#/definitions/SetExceptionBreakpointsResponse" - }, - "DataBreakpointInfoRequest": { - "$ref": "#/definitions/DataBreakpointInfoRequest" - }, - "DataBreakpointInfoArguments": { - "$ref": "#/definitions/DataBreakpointInfoArguments" - }, - "DataBreakpointInfoResponse": { - "$ref": "#/definitions/DataBreakpointInfoResponse" - }, - "SetDataBreakpointsRequest": { - "$ref": "#/definitions/SetDataBreakpointsRequest" - }, - "SetDataBreakpointsArguments": { - "$ref": "#/definitions/SetDataBreakpointsArguments" - }, - "SetDataBreakpointsResponse": { - "$ref": "#/definitions/SetDataBreakpointsResponse" - }, - "SetInstructionBreakpointsRequest": { - "$ref": "#/definitions/SetInstructionBreakpointsRequest" - }, - "SetInstructionBreakpointsArguments": { - "$ref": "#/definitions/SetInstructionBreakpointsArguments" - }, - "SetInstructionBreakpointsResponse": { - "$ref": "#/definitions/SetInstructionBreakpointsResponse" - }, - "ContinueRequest": { - "$ref": "#/definitions/ContinueRequest" - }, - "ContinueArguments": { - "$ref": "#/definitions/ContinueArguments" - }, - "ContinueResponse": { - "$ref": "#/definitions/ContinueResponse" - }, - "NextRequest": { - "$ref": "#/definitions/NextRequest" - }, - "NextArguments": { - "$ref": "#/definitions/NextArguments" - }, - "NextResponse": { - "$ref": "#/definitions/NextResponse" - }, - "StepInRequest": { - "$ref": "#/definitions/StepInRequest" - }, - "StepInArguments": { - "$ref": "#/definitions/StepInArguments" - }, - "StepInResponse": { - "$ref": "#/definitions/StepInResponse" - }, - "StepOutRequest": { - "$ref": "#/definitions/StepOutRequest" - }, - "StepOutArguments": { - "$ref": "#/definitions/StepOutArguments" - }, - "StepOutResponse": { - "$ref": "#/definitions/StepOutResponse" - }, - "StepBackRequest": { - "$ref": "#/definitions/StepBackRequest" - }, - "StepBackArguments": { - "$ref": "#/definitions/StepBackArguments" - }, - "StepBackResponse": { - "$ref": "#/definitions/StepBackResponse" - }, - "ReverseContinueRequest": { - "$ref": "#/definitions/ReverseContinueRequest" - }, - "ReverseContinueArguments": { - "$ref": "#/definitions/ReverseContinueArguments" - }, - "ReverseContinueResponse": { - "$ref": "#/definitions/ReverseContinueResponse" - }, - "RestartFrameRequest": { - "$ref": "#/definitions/RestartFrameRequest" - }, - "RestartFrameArguments": { - "$ref": "#/definitions/RestartFrameArguments" - }, - "RestartFrameResponse": { - "$ref": "#/definitions/RestartFrameResponse" - }, - "GotoRequest": { - "$ref": "#/definitions/GotoRequest" - }, - "GotoArguments": { - "$ref": "#/definitions/GotoArguments" - }, - "GotoResponse": { - "$ref": "#/definitions/GotoResponse" - }, - "PauseRequest": { - "$ref": "#/definitions/PauseRequest" - }, - "PauseArguments": { - "$ref": "#/definitions/PauseArguments" - }, - "PauseResponse": { - "$ref": "#/definitions/PauseResponse" - }, - "StackTraceRequest": { - "$ref": "#/definitions/StackTraceRequest" - }, - "StackTraceArguments": { - "$ref": "#/definitions/StackTraceArguments" - }, - "StackTraceResponse": { - "$ref": "#/definitions/StackTraceResponse" - }, - "ScopesRequest": { - "$ref": "#/definitions/ScopesRequest" - }, - "ScopesArguments": { - "$ref": "#/definitions/ScopesArguments" - }, - "ScopesResponse": { - "$ref": "#/definitions/ScopesResponse" - }, - "VariablesRequest": { - "$ref": "#/definitions/VariablesRequest" - }, - "VariablesArguments": { - "$ref": "#/definitions/VariablesArguments" - }, - "VariablesResponse": { - "$ref": "#/definitions/VariablesResponse" - }, - "SetVariableRequest": { - "$ref": "#/definitions/SetVariableRequest" - }, - "SetVariableArguments": { - "$ref": "#/definitions/SetVariableArguments" - }, - "SetVariableResponse": { - "$ref": "#/definitions/SetVariableResponse" - }, - "SourceRequest": { - "$ref": "#/definitions/SourceRequest" - }, - "SourceArguments": { - "$ref": "#/definitions/SourceArguments" - }, - "SourceResponse": { - "$ref": "#/definitions/SourceResponse" - }, - "ThreadsRequest": { - "$ref": "#/definitions/ThreadsRequest" - }, - "ThreadsResponse": { - "$ref": "#/definitions/ThreadsResponse" - }, - "TerminateThreadsRequest": { - "$ref": "#/definitions/TerminateThreadsRequest" - }, - "TerminateThreadsArguments": { - "$ref": "#/definitions/TerminateThreadsArguments" - }, - "TerminateThreadsResponse": { - "$ref": "#/definitions/TerminateThreadsResponse" - }, - "ModulesRequest": { - "$ref": "#/definitions/ModulesRequest" - }, - "ModulesArguments": { - "$ref": "#/definitions/ModulesArguments" - }, - "ModulesResponse": { - "$ref": "#/definitions/ModulesResponse" - }, - "LoadedSourcesRequest": { - "$ref": "#/definitions/LoadedSourcesRequest" - }, - "LoadedSourcesArguments": { - "$ref": "#/definitions/LoadedSourcesArguments" - }, - "LoadedSourcesResponse": { - "$ref": "#/definitions/LoadedSourcesResponse" - }, - "EvaluateRequest": { - "$ref": "#/definitions/EvaluateRequest" - }, - "EvaluateArguments": { - "$ref": "#/definitions/EvaluateArguments" - }, - "EvaluateResponse": { - "$ref": "#/definitions/EvaluateResponse" - }, - "SetExpressionRequest": { - "$ref": "#/definitions/SetExpressionRequest" - }, - "SetExpressionArguments": { - "$ref": "#/definitions/SetExpressionArguments" - }, - "SetExpressionResponse": { - "$ref": "#/definitions/SetExpressionResponse" - }, - "StepInTargetsRequest": { - "$ref": "#/definitions/StepInTargetsRequest" - }, - "StepInTargetsArguments": { - "$ref": "#/definitions/StepInTargetsArguments" - }, - "StepInTargetsResponse": { - "$ref": "#/definitions/StepInTargetsResponse" - }, - "GotoTargetsRequest": { - "$ref": "#/definitions/GotoTargetsRequest" - }, - "GotoTargetsArguments": { - "$ref": "#/definitions/GotoTargetsArguments" - }, - "GotoTargetsResponse": { - "$ref": "#/definitions/GotoTargetsResponse" - }, - "CompletionsRequest": { - "$ref": "#/definitions/CompletionsRequest" - }, - "CompletionsArguments": { - "$ref": "#/definitions/CompletionsArguments" - }, - "CompletionsResponse": { - "$ref": "#/definitions/CompletionsResponse" - }, - "ExceptionInfoRequest": { - "$ref": "#/definitions/ExceptionInfoRequest" - }, - "ExceptionInfoArguments": { - "$ref": "#/definitions/ExceptionInfoArguments" - }, - "ExceptionInfoResponse": { - "$ref": "#/definitions/ExceptionInfoResponse" - }, - "ReadMemoryRequest": { - "$ref": "#/definitions/ReadMemoryRequest" - }, - "ReadMemoryArguments": { - "$ref": "#/definitions/ReadMemoryArguments" - }, - "ReadMemoryResponse": { - "$ref": "#/definitions/ReadMemoryResponse" - }, - "WriteMemoryRequest": { - "$ref": "#/definitions/WriteMemoryRequest" - }, - "WriteMemoryArguments": { - "$ref": "#/definitions/WriteMemoryArguments" - }, - "WriteMemoryResponse": { - "$ref": "#/definitions/WriteMemoryResponse" - }, - "DisassembleRequest": { - "$ref": "#/definitions/DisassembleRequest" - }, - "DisassembleArguments": { - "$ref": "#/definitions/DisassembleArguments" - }, - "DisassembleResponse": { - "$ref": "#/definitions/DisassembleResponse" - }, - "Capabilities": { - "$ref": "#/definitions/Capabilities" - }, - "ExceptionBreakpointsFilter": { - "$ref": "#/definitions/ExceptionBreakpointsFilter" - }, - "Message": { - "$ref": "#/definitions/Message" - }, - "Module": { - "$ref": "#/definitions/Module" - }, - "ColumnDescriptor": { - "$ref": "#/definitions/ColumnDescriptor" - }, - "Thread": { - "$ref": "#/definitions/Thread" - }, - "Source": { - "$ref": "#/definitions/Source" - }, - "StackFrame": { - "$ref": "#/definitions/StackFrame" - }, - "Scope": { - "$ref": "#/definitions/Scope" - }, - "Variable": { - "$ref": "#/definitions/Variable" - }, - "VariablePresentationHint": { - "$ref": "#/definitions/VariablePresentationHint" - }, - "BreakpointLocation": { - "$ref": "#/definitions/BreakpointLocation" - }, - "SourceBreakpoint": { - "$ref": "#/definitions/SourceBreakpoint" - }, - "FunctionBreakpoint": { - "$ref": "#/definitions/FunctionBreakpoint" - }, - "DataBreakpointAccessType": { - "$ref": "#/definitions/DataBreakpointAccessType" - }, - "DataBreakpoint": { - "$ref": "#/definitions/DataBreakpoint" - }, - "InstructionBreakpoint": { - "$ref": "#/definitions/InstructionBreakpoint" - }, - "Breakpoint": { - "$ref": "#/definitions/Breakpoint" - }, - "SteppingGranularity": { - "$ref": "#/definitions/SteppingGranularity" - }, - "StepInTarget": { - "$ref": "#/definitions/StepInTarget" - }, - "GotoTarget": { - "$ref": "#/definitions/GotoTarget" - }, - "CompletionItem": { - "$ref": "#/definitions/CompletionItem" - }, - "CompletionItemType": { - "$ref": "#/definitions/CompletionItemType" - }, - "ChecksumAlgorithm": { - "$ref": "#/definitions/ChecksumAlgorithm" - }, - "Checksum": { - "$ref": "#/definitions/Checksum" - }, - "ValueFormat": { - "$ref": "#/definitions/ValueFormat" - }, - "StackFrameFormat": { - "$ref": "#/definitions/StackFrameFormat" - }, - "ExceptionFilterOptions": { - "$ref": "#/definitions/ExceptionFilterOptions" - }, - "ExceptionOptions": { - "$ref": "#/definitions/ExceptionOptions" - }, - "ExceptionBreakMode": { - "$ref": "#/definitions/ExceptionBreakMode" - }, - "ExceptionPathSegment": { - "$ref": "#/definitions/ExceptionPathSegment" - }, - "ExceptionDetails": { - "$ref": "#/definitions/ExceptionDetails" - }, - "DisassembledInstruction": { - "$ref": "#/definitions/DisassembledInstruction" - }, - "InvalidatedAreas": { - "$ref": "#/definitions/InvalidatedAreas" - } - }, - - "definitions": { - - "ProtocolMessage": { - "type": "object", - "title": "Base Protocol", - "description": "Base class of requests, responses, and events.", - "properties": { - "seq": { - "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." - }, - "type": { - "type": "string", - "description": "Message type.", - "_enum": [ "request", "response", "event" ] - } - }, - "required": [ "seq", "type" ] - }, - - "Request": { - "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { - "type": "object", - "description": "A client or debug adapter initiated request.", - "properties": { - "type": { - "type": "string", - "enum": [ "request" ] - }, - "command": { - "type": "string", - "description": "The command to execute." - }, - "arguments": { - "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], - "description": "Object containing arguments for the command." - } - }, - "required": [ "type", "command" ] - }] - }, - - "Event": { - "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { - "type": "object", - "description": "A debug adapter initiated event.", - "properties": { - "type": { - "type": "string", - "enum": [ "event" ] - }, - "event": { - "type": "string", - "description": "Type of event." - }, - "body": { - "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], - "description": "Event-specific information." - } - }, - "required": [ "type", "event" ] - }] - }, - - "Response": { - "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { - "type": "object", - "description": "Response for a request.", - "properties": { - "type": { - "type": "string", - "enum": [ "response" ] - }, - "request_seq": { - "type": "integer", - "description": "Sequence number of the corresponding request." - }, - "success": { - "type": "boolean", - "description": "Outcome of the request.\nIf true, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." - }, - "command": { - "type": "string", - "description": "The command requested." - }, - "message": { - "type": "string", - "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": [ "cancelled", "notStopped" ], - "enumDescriptions": [ - "the request was cancelled.", - "the request may be retried once the adapter is in a 'stopped' state." - ] - }, - "body": { - "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], - "description": "Contains request result if success is true and error details if success is false." - } - }, - "required": [ "type", "request_seq", "success", "command" ] - }] - }, - - "ErrorResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "On error (whenever `success` is false), the body can provide more details.", - "properties": { - "body": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Message", - "description": "A structured error message." - } - } - } - }, - "required": [ "body" ] - }] - }, - - "CancelRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The `cancel` request is used by the client in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence.\nClients should only call this request if the corresponding capability `supportsCancelRequest` is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honoring this request but there are no guarantees.\nThe `cancel` request may return an error if it could not cancel an operation but a client should refrain from presenting this error to end users.\nThe request that got cancelled still needs to send a response back. This can either be a normal result (`success` attribute true) or an error response (`success` attribute false and the `message` set to `cancelled`).\nReturning partial results from a cancelled request is possible but please note that a client has no generic way for detecting that a response is partial or not.\nThe progress that got cancelled still needs to send a `progressEnd` event back.\n A client should not assume that progress just got cancelled after sending the `cancel` request.", - "properties": { - "command": { - "type": "string", - "enum": [ "cancel" ] - }, - "arguments": { - "$ref": "#/definitions/CancelArguments" - } - }, - "required": [ "command" ] - }] - }, - "CancelArguments": { - "type": "object", - "description": "Arguments for `cancel` request.", - "properties": { - "requestId": { - "type": "integer", - "description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." - }, - "progressId": { - "type": "string", - "description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." - } - } - }, - "CancelResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `cancel` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "InitializedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "title": "Events", - "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends `initialized` event (after the `initialize` request has returned)\n- client sends zero or more `setBreakpoints` requests\n- client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)\n- client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)\n- client sends other future configuration requests\n- client sends one `configurationDone` request to indicate the end of the configuration.", - "properties": { - "event": { - "type": "string", - "enum": [ "initialized" ] - } - }, - "required": [ "event" ] - }] - }, - - "StoppedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.", - "properties": { - "event": { - "type": "string", - "enum": [ "stopped" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).", - "_enum": [ "step", "breakpoint", "exception", "pause", "entry", "goto", "function breakpoint", "data breakpoint", "instruction breakpoint" ] - }, - "description": { - "type": "string", - "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated." - }, - "threadId": { - "type": "integer", - "description": "The thread which was stopped." - }, - "preserveFocusHint": { - "type": "boolean", - "description": "A value of true hints to the client that this event should not change the focus." - }, - "text": { - "type": "string", - "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI." - }, - "allThreadsStopped": { - "type": "boolean", - "description": "If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded." - }, - "hitBreakpointIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." - } - }, - "required": [ "reason" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ContinuedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. `launch` or `continue`.\nIt is only necessary to send a `continued` event if there was no previous request that implied this.", - "properties": { - "event": { - "type": "string", - "enum": [ "continued" ] - }, - "body": { - "type": "object", - "properties": { - "threadId": { - "type": "integer", - "description": "The thread which was continued." - }, - "allThreadsContinued": { - "type": "boolean", - "description": "If `allThreadsContinued` is true, a debug adapter can announce that all threads have continued." - } - }, - "required": [ "threadId" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ExitedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that the debuggee has exited and returns its exit code.", - "properties": { - "event": { - "type": "string", - "enum": [ "exited" ] - }, - "body": { - "type": "object", - "properties": { - "exitCode": { - "type": "integer", - "description": "The exit code returned from the debuggee." - } - }, - "required": [ "exitCode" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "TerminatedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.", - "properties": { - "event": { - "type": "string", - "enum": [ "terminated" ] - }, - "body": { - "type": "object", - "properties": { - "restart": { - "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests." - } - } - } - }, - "required": [ "event" ] - }] - }, - - "ThreadEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that a thread has started or exited.", - "properties": { - "event": { - "type": "string", - "enum": [ "thread" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "_enum": [ "started", "exited" ] - }, - "threadId": { - "type": "integer", - "description": "The identifier of the thread." - } - }, - "required": ["reason", "threadId"] - } - }, - "required": [ "event", "body" ] - }] - }, - - "OutputEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that the target has produced some output.", - "properties": { - "event": { - "type": "string", - "enum": [ "output" ] - }, - "body": { - "type": "object", - "properties": { - "category": { - "type": "string", - "description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.", - "_enum": [ "console", "important", "stdout", "stderr", "telemetry" ], - "enumDescriptions": [ - "Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).", - "A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.", - "Show the output as normal program output from the debuggee.", - "Show the output as error program output from the debuggee.", - "Send the output to telemetry instead of showing it to the user." - ] - }, - "output": { - "type": "string", - "description": "The output to report." - }, - "group": { - "type": "string", - "description": "Support for keeping an output log organized by grouping related messages.", - "enum": [ "start", "startCollapsed", "end" ], - "enumDescriptions": [ - "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.", - "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.", - "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group." - ] - }, - "variablesReference": { - "type": "integer", - "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The source location where the output was produced." - }, - "line": { - "type": "integer", - "description": "The source location's line where the output was produced." - }, - "column": { - "type": "integer", - "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - }, - "data": { - "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], - "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format." - } - }, - "required": ["output"] - } - }, - "required": [ "event", "body" ] - }] - }, - - "BreakpointEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that some information about a breakpoint has changed.", - "properties": { - "event": { - "type": "string", - "enum": [ "breakpoint" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "_enum": [ "changed", "new", "removed" ] - }, - "breakpoint": { - "$ref": "#/definitions/Breakpoint", - "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values." - } - }, - "required": [ "reason", "breakpoint" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ModuleEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that some information about a module has changed.", - "properties": { - "event": { - "type": "string", - "enum": [ "module" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "enum": [ "new", "changed", "removed" ] - }, - "module": { - "$ref": "#/definitions/Module", - "description": "The new, changed, or removed module. In case of `removed` only the module id is used." - } - }, - "required": [ "reason", "module" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "LoadedSourceEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.", - "properties": { - "event": { - "type": "string", - "enum": [ "loadedSource" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "enum": [ "new", "changed", "removed" ] - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The new, changed, or removed source." - } - }, - "required": [ "reason", "source" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ProcessEvent": { - "allOf": [ - { "$ref": "#/definitions/Event" }, - { - "type": "object", - "description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.", - "properties": { - "event": { - "type": "string", - "enum": [ "process" ] - }, - "body": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." - }, - "systemProcessId": { - "type": "integer", - "description": "The system process id of the debugged process. This property is missing for non-system processes." - }, - "isLocalProcess": { - "type": "boolean", - "description": "If true, the process is running on the same computer as the debug adapter." - }, - "startMethod": { - "type": "string", - "enum": [ "launch", "attach", "attachForSuspendedLaunch" ], - "description": "Describes how the debug engine started debugging this process.", - "enumDescriptions": [ - "Process was launched under the debugger.", - "Debugger attached to an existing process.", - "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." - ] - }, - "pointerSize": { - "type": "integer", - "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." - } - }, - "required": [ "name" ] - } - }, - "required": [ "event", "body" ] - } - ] - }, - - "CapabilitiesEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.", - "properties": { - "event": { - "type": "string", - "enum": [ "capabilities" ] - }, - "body": { - "type": "object", - "properties": { - "capabilities": { - "$ref": "#/definitions/Capabilities", - "description": "The set of updated capabilities." - } - }, - "required": [ "capabilities" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ProgressStartEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", - "properties": { - "event": { - "type": "string", - "enum": [ "progressStart" ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." - }, - "title": { - "type": "string", - "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation." - }, - "requestId": { - "type": "integer", - "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." - }, - "cancellable": { - "type": "boolean", - "description": "If true, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." - }, - "message": { - "type": "string", - "description": "More detailed progress message." - }, - "percentage": { - "type": "number", - "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." - } - }, - "required": [ "progressId", "title" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ProgressUpdateEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event signals that the progress reporting needs to be updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", - "properties": { - "event": { - "type": "string", - "enum": [ "progressUpdate" ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "The ID that was introduced in the initial `progressStart` event." - }, - "message": { - "type": "string", - "description": "More detailed progress message. If omitted, the previous message (if any) is used." - }, - "percentage": { - "type": "number", - "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." - } - }, - "required": [ "progressId" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ProgressEndEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event signals the end of the progress reporting with a final message.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", - "properties": { - "event": { - "type": "string", - "enum": [ "progressEnd" ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "The ID that was introduced in the initial `ProgressStartEvent`." - }, - "message": { - "type": "string", - "description": "More detailed progress message. If omitted, the previous message (if any) is used." - } - }, - "required": [ "progressId" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "InvalidatedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.", - "properties": { - "event": { - "type": "string", - "enum": [ "invalidated" ] - }, - "body": { - "type": "object", - "properties": { - "areas": { - "type": "array", - "description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.", - "items": { - "$ref": "#/definitions/InvalidatedAreas" - } - }, - "threadId": { - "type": "integer", - "description": "If specified, the client only needs to refetch data related to this thread." - }, - "stackFrameId": { - "type": "integer", - "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored)." - } - } - } - }, - "required": [ "event", "body" ] - }] - }, - - "MemoryEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.\nClients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap.\nDebug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.", - "properties": { - "event": { - "type": "string", - "enum": [ "memory" ] - }, - "body": { - "type": "object", - "properties": { - "memoryReference": { - "type": "string", - "description": "Memory reference of a memory range that has been updated." - }, - "offset": { - "type": "integer", - "description": "Starting offset in bytes where memory has been updated. Can be negative." - }, - "count": { - "type": "integer", - "description": "Number of bytes updated." - } - }, - "required": [ "memoryReference", "offset", "count" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "RunInTerminalRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "title": "Reverse Requests", - "description": "This request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true.\nClient implementations of `runInTerminal` are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell.\nSome users may wish to take advantage of shell processing in the argument strings. For clients which implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.", - "properties": { - "command": { - "type": "string", - "enum": [ "runInTerminal" ] - }, - "arguments": { - "$ref": "#/definitions/RunInTerminalRequestArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "RunInTerminalRequestArguments": { - "type": "object", - "description": "Arguments for `runInTerminal` request.", - "properties": { - "kind": { - "type": "string", - "enum": [ "integrated", "external" ], - "description": "What kind of terminal to launch. Defaults to `integrated` if not specified." - }, - "title": { - "type": "string", - "description": "Title of the terminal." - }, - "cwd": { - "type": "string", - "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of arguments. The first argument is the command to run." - }, - "env": { - "type": "object", - "description": "Environment key-value pairs that are added to or removed from the default environment.", - "additionalProperties": { - "type": [ "string", "null" ], - "description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment." - } - }, - "argsCanBeInterpretedByShell": { - "type": "boolean", - "description": "This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells." - } - }, - "required": [ "args", "cwd" ] - }, - "RunInTerminalResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `runInTerminal` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "processId": { - "type": "integer", - "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." - }, - "shellProcessId": { - "type": "integer", - "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." - } - } - } - }, - "required": [ "body" ] - }] - }, - "StartDebuggingRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.\nThis request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true.\nA client implementation of `startDebugging` should start a new debug session (of the same type as the caller) in the same way that the caller's session was started. If the client supports hierarchical debug sessions, the newly created session can be treated as a child of the caller session.", - "properties": { - "command": { - "type": "string", - "enum": [ - "startDebugging" - ] - }, - "arguments": { - "$ref": "#/definitions/StartDebuggingRequestArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "StartDebuggingRequestArguments": { - "type": "object", - "description": "Arguments for `startDebugging` request.", - "properties": { - "configuration": { - "type": "object", - "additionalProperties": true, - "description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables')." - }, - "request": { - "type": "string", - "enum": [ - "launch", - "attach" - ], - "description": "Indicates whether the new debug session should be started with a `launch` or `attach` request." - } - }, - "required": [ - "configuration", - "request" - ] - }, - "StartDebuggingResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to `startDebugging` request. This is just an acknowledgement, so no body field is required." - } - ] - }, - - "InitializeRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "title": "Requests", - "description": "The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response.\nThe `initialize` request may only be sent once.", - "properties": { - "command": { - "type": "string", - "enum": [ "initialize" ] - }, - "arguments": { - "$ref": "#/definitions/InitializeRequestArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "InitializeRequestArguments": { - "type": "object", - "description": "Arguments for `initialize` request.", - "properties": { - "clientID": { - "type": "string", - "description": "The ID of the client using this adapter." - }, - "clientName": { - "type": "string", - "description": "The human-readable name of the client using this adapter." - }, - "adapterID": { - "type": "string", - "description": "The ID of the debug adapter." - }, - "locale": { - "type": "string", - "description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH." - }, - "linesStartAt1": { - "type": "boolean", - "description": "If true all line numbers are 1-based (default)." - }, - "columnsStartAt1": { - "type": "boolean", - "description": "If true all column numbers are 1-based (default)." - }, - "pathFormat": { - "type": "string", - "_enum": [ "path", "uri" ], - "description": "Determines in what format paths are specified. The default is `path`, which is the native format." - }, - "supportsVariableType": { - "type": "boolean", - "description": "Client supports the `type` attribute for variables." - }, - "supportsVariablePaging": { - "type": "boolean", - "description": "Client supports the paging of variables." - }, - "supportsRunInTerminalRequest": { - "type": "boolean", - "description": "Client supports the `runInTerminal` request." - }, - "supportsMemoryReferences": { - "type": "boolean", - "description": "Client supports memory references." - }, - "supportsProgressReporting": { - "type": "boolean", - "description": "Client supports progress reporting." - }, - "supportsInvalidatedEvent": { - "type": "boolean", - "description": "Client supports the `invalidated` event." - }, - "supportsMemoryEvent": { - "type": "boolean", - "description": "Client supports the `memory` event." - }, - "supportsArgsCanBeInterpretedByShell": { - "type": "boolean", - "description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request." - }, - "supportsStartDebuggingRequest": { - "type": "boolean", - "description": "Client supports the `startDebugging` request." - } - }, - "required": [ "adapterID" ] - }, - "InitializeResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `initialize` request.", - "properties": { - "body": { - "$ref": "#/definitions/Capabilities", - "description": "The capabilities of this debug adapter." - } - } - }] - }, - - "ConfigurationDoneRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "This request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the `initialized` event).\nClients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "configurationDone" ] - }, - "arguments": { - "$ref": "#/definitions/ConfigurationDoneArguments" - } - }, - "required": [ "command" ] - }] - }, - "ConfigurationDoneArguments": { - "type": "object", - "description": "Arguments for `configurationDone` request." - }, - "ConfigurationDoneResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `configurationDone` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "LaunchRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.", - "properties": { - "command": { - "type": "string", - "enum": [ "launch" ] - }, - "arguments": { - "$ref": "#/definitions/LaunchRequestArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "LaunchRequestArguments": { - "type": "object", - "description": "Arguments for `launch` request. Additional attributes are implementation specific.", - "properties": { - "noDebug": { - "type": "boolean", - "description": "If true, the launch request should launch the program without enabling debugging." - }, - "__restart": { - "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." - } - } - }, - "LaunchResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `launch` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "AttachRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", - "properties": { - "command": { - "type": "string", - "enum": [ "attach" ] - }, - "arguments": { - "$ref": "#/definitions/AttachRequestArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "AttachRequestArguments": { - "type": "object", - "description": "Arguments for `attach` request. Additional attributes are implementation specific.", - "properties": { - "__restart": { - "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." - } - } - }, - "AttachResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `attach` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "RestartRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Restarts a debug session. Clients should only call this request if the corresponding capability `supportsRestartRequest` is true.\nIf the capability is missing or has the value false, a typical client emulates `restart` by terminating the debug adapter first and then launching it anew.", - "properties": { - "command": { - "type": "string", - "enum": [ "restart" ] - }, - "arguments": { - "$ref": "#/definitions/RestartArguments" - } - }, - "required": [ "command" ] - }] - }, - "RestartArguments": { - "type": "object", - "description": "Arguments for `restart` request.", - "properties": { - "arguments": { - "oneOf": [ - { "$ref": "#/definitions/LaunchRequestArguments" }, - { "$ref": "#/definitions/AttachRequestArguments" } - ], - "description": "The latest version of the `launch` or `attach` configuration." - } - } - }, - "RestartResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `restart` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "DisconnectRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).\nIn addition, the debug adapter must terminate the debuggee if it was started with the `launch` request. If an `attach` request was used to connect to the debuggee, then the debug adapter must not terminate the debuggee.\nThis implicit behavior of when to terminate the debuggee can be overridden with the `terminateDebuggee` argument (which is only supported by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true).", - "properties": { - "command": { - "type": "string", - "enum": [ "disconnect" ] - }, - "arguments": { - "$ref": "#/definitions/DisconnectArguments" - } - }, - "required": [ "command" ] - }] - }, - "DisconnectArguments": { - "type": "object", - "description": "Arguments for `disconnect` request.", - "properties": { - "restart": { - "type": "boolean", - "description": "A value of true indicates that this `disconnect` request is part of a restart sequence." - }, - "terminateDebuggee": { - "type": "boolean", - "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true." - }, - "suspendDebuggee": { - "type": "boolean", - "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true." - } - } - }, - "DisconnectResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `disconnect` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "TerminateRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The `terminate` request is sent from the client to the debug adapter in order to shut down the debuggee gracefully. Clients should only call this request if the capability `supportsTerminateRequest` is true.\nTypically a debug adapter implements `terminate` by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself.\nPlease note that this request does not directly affect the state of the debug session: if the debuggee decides to veto the graceful shutdown for any reason by not terminating itself, then the debug session just continues.\nClients can surface the `terminate` request as an explicit command or they can integrate it into a two stage Stop command that first sends `terminate` to request a graceful shutdown, and if that fails uses `disconnect` for a forceful shutdown.", - "properties": { - "command": { - "type": "string", - "enum": [ "terminate" ] - }, - "arguments": { - "$ref": "#/definitions/TerminateArguments" - } - }, - "required": [ "command" ] - }] - }, - "TerminateArguments": { - "type": "object", - "description": "Arguments for `terminate` request.", - "properties": { - "restart": { - "type": "boolean", - "description": "A value of true indicates that this `terminate` request is part of a restart sequence." - } - } - }, - "TerminateResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `terminate` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "BreakpointLocationsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The `breakpointLocations` request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the corresponding capability `supportsBreakpointLocationsRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "breakpointLocations" ] - }, - "arguments": { - "$ref": "#/definitions/BreakpointLocationsArguments" - } - }, - "required": [ "command" ] - }] - - }, - "BreakpointLocationsArguments": { - "type": "object", - "description": "Arguments for `breakpointLocations` request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified." - }, - "line": { - "type": "integer", - "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." - }, - "column": { - "type": "integer", - "description": "Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed." - }, - "endLine": { - "type": "integer", - "description": "End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." - }, - "endColumn": { - "type": "integer", - "description": "End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed." - } - }, - "required": [ "source", "line" ] - }, - "BreakpointLocationsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `breakpointLocations` request.\nContains possible locations for source breakpoints.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/BreakpointLocation" - }, - "description": "Sorted set of possible breakpoint locations." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetBreakpointsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.\nTo clear all breakpoint for a source, specify an empty array.\nWhen a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated.", - "properties": { - "command": { - "type": "string", - "enum": [ "setBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetBreakpointsArguments": { - "type": "object", - "description": "Arguments for `setBreakpoints` request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified." - }, - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/SourceBreakpoint" - }, - "description": "The code locations of the breakpoints." - }, - "lines": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Deprecated: The code locations of the breakpoints." - }, - "sourceModified": { - "type": "boolean", - "description": "A value of true indicates that the underlying source has been modified which results in new breakpoint locations." - } - }, - "required": [ "source" ] - }, - "SetBreakpointsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `setBreakpoints` request.\nReturned is information about each breakpoint created by this request.\nThis includes the actual code location and whether the breakpoint could be verified.\nThe breakpoints returned are in the same order as the elements of the `breakpoints`\n(or the deprecated `lines`) array in the arguments.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetFunctionBreakpointsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsFunctionBreakpoints` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "setFunctionBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetFunctionBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetFunctionBreakpointsArguments": { - "type": "object", - "description": "Arguments for `setFunctionBreakpoints` request.", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/FunctionBreakpoint" - }, - "description": "The function names of the breakpoints." - } - }, - "required": [ "breakpoints" ] - }, - "SetFunctionBreakpointsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `setFunctionBreakpoints` request.\nReturned is information about each breakpoint created by this request.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetExceptionBreakpointsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request configures the debugger's response to thrown exceptions.\nIf an exception is configured to break, a `stopped` event is fired (with reason `exception`).\nClients should only call this request if the corresponding capability `exceptionBreakpointFilters` returns one or more filters.", - "properties": { - "command": { - "type": "string", - "enum": [ "setExceptionBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetExceptionBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetExceptionBreakpointsArguments": { - "type": "object", - "description": "Arguments for `setExceptionBreakpoints` request.", - "properties": { - "filters": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive." - }, - "filterOptions": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionFilterOptions" - }, - "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive." - }, - "exceptionOptions": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionOptions" - }, - "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true." - } - }, - "required": [ "filters" ] - }, - "SetExceptionBreakpointsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `setExceptionBreakpoints` request.\nThe response contains an array of `Breakpoint` objects with information about each exception breakpoint or filter. The `Breakpoint` objects are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays given as arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.\nThe `verified` property of a `Breakpoint` object signals whether the exception breakpoint or filter could be successfully created and whether the condition is valid. In case of an error the `message` property explains the problem. The `id` property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.\nFor backward compatibility both the `breakpoints` array and the enclosing `body` are optional. If these elements are missing a client is not able to show problems for individual exception breakpoints or filters.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information." - } - } - } - } - }] - }, - - "DataBreakpointInfoRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "dataBreakpointInfo" ] - }, - "arguments": { - "$ref": "#/definitions/DataBreakpointInfoArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "DataBreakpointInfoArguments": { - "type": "object", - "description": "Arguments for `dataBreakpointInfo` request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." - }, - "name": { - "type": "string", - "description": "The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression." - }, - "frameId": { - "type": "integer", - "description": "When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect." - } - }, - "required": [ "name" ] - }, - "DataBreakpointInfoResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `dataBreakpointInfo` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "dataId": { - "type": [ "string", "null" ], - "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`." - }, - "description": { - "type": "string", - "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." - }, - "accessTypes": { - "type": "array", - "items": { - "$ref": "#/definitions/DataBreakpointAccessType" - }, - "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information." - }, - "canPersist": { - "type": "boolean", - "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions." - } - }, - "required": [ "dataId", "description" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetDataBreakpointsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "setDataBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetDataBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetDataBreakpointsArguments": { - "type": "object", - "description": "Arguments for `setDataBreakpoints` request.", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/DataBreakpoint" - }, - "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." - } - }, - "required": [ "breakpoints" ] - }, - "SetDataBreakpointsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `setDataBreakpoints` request.\nReturned is information about each breakpoint created by this request.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetInstructionBreakpointsRequest": { - "allOf": [ - { "$ref": "#/definitions/Request" }, - { - "type": "object", - "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a `stopped` event (with reason `instruction breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsInstructionBreakpoints` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "setInstructionBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetInstructionBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetInstructionBreakpointsArguments": { - "type": "object", - "description": "Arguments for `setInstructionBreakpoints` request", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/InstructionBreakpoint" - }, - "description": "The instruction references of the breakpoints" - } - }, - "required": ["breakpoints"] - }, - "SetInstructionBreakpointsResponse": { - "allOf": [ - { "$ref": "#/definitions/Response" }, - { - "type": "object", - "description": "Response to `setInstructionBreakpoints` request", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "ContinueRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request resumes execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.", - "properties": { - "command": { - "type": "string", - "enum": [ "continue" ] - }, - "arguments": { - "$ref": "#/definitions/ContinueArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ContinueArguments": { - "type": "object", - "description": "Arguments for `continue` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed." - }, - "singleThread": { - "type": "boolean", - "description": "If this flag is true, execution is resumed only for the thread with given `threadId`." - } - }, - "required": [ "threadId" ] - }, - "ContinueResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `continue` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "allThreadsContinued": { - "type": "boolean", - "description": "The value true (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed." - } - } - } - }, - "required": [ "body" ] - }] - }, - - "NextRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.", - "properties": { - "command": { - "type": "string", - "enum": [ "next" ] - }, - "arguments": { - "$ref": "#/definitions/NextArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "NextArguments": { - "type": "object", - "description": "Arguments for `next` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Specifies the thread for which to resume execution for one step (of the given granularity)." - }, - "singleThread": { - "type": "boolean", - "description": "If this flag is true, all other suspended threads are not resumed." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." - } - }, - "required": [ "threadId" ] - }, - "NextResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `next` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "StepInRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nIf the request cannot step into a target, `stepIn` behaves like the `next` request.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.\nIf there are multiple function/method calls (or other targets) on the source line,\nthe argument `targetId` can be used to control into which target the `stepIn` should occur.\nThe list of possible targets for a given source line can be retrieved via the `stepInTargets` request.", - "properties": { - "command": { - "type": "string", - "enum": [ "stepIn" ] - }, - "arguments": { - "$ref": "#/definitions/StepInArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StepInArguments": { - "type": "object", - "description": "Arguments for `stepIn` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Specifies the thread for which to resume execution for one step-into (of the given granularity)." - }, - "singleThread": { - "type": "boolean", - "description": "If this flag is true, all other suspended threads are not resumed." - }, - "targetId": { - "type": "integer", - "description": "Id of the target to step into." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." - } - }, - "required": [ "threadId" ] - }, - "StepInResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `stepIn` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "StepOutRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.", - "properties": { - "command": { - "type": "string", - "enum": [ "stepOut" ] - }, - "arguments": { - "$ref": "#/definitions/StepOutArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StepOutArguments": { - "type": "object", - "description": "Arguments for `stepOut` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Specifies the thread for which to resume execution for one step-out (of the given granularity)." - }, - "singleThread": { - "type": "boolean", - "description": "If this flag is true, all other suspended threads are not resumed." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." - } - }, - "required": [ "threadId" ] - }, - "StepOutResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `stepOut` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "StepBackRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request executes one backward step (in the given granularity) for the specified thread and allows all other threads to run backward freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.\nClients should only call this request if the corresponding capability `supportsStepBack` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "stepBack" ] - }, - "arguments": { - "$ref": "#/definitions/StepBackArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StepBackArguments": { - "type": "object", - "description": "Arguments for `stepBack` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Specifies the thread for which to resume execution for one step backwards (of the given granularity)." - }, - "singleThread": { - "type": "boolean", - "description": "If this flag is true, all other suspended threads are not resumed." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed." - } - }, - "required": [ "threadId" ] - }, - "StepBackResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `stepBack` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "ReverseContinueRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request resumes backward execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.\nClients should only call this request if the corresponding capability `supportsStepBack` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "reverseContinue" ] - }, - "arguments": { - "$ref": "#/definitions/ReverseContinueArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ReverseContinueArguments": { - "type": "object", - "description": "Arguments for `reverseContinue` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed." - }, - "singleThread": { - "type": "boolean", - "description": "If this flag is true, backward execution is resumed only for the thread with given `threadId`." - } - - }, - "required": [ "threadId" ] - }, - "ReverseContinueResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `reverseContinue` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "RestartFrameRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request restarts execution of the specified stack frame.\nThe debug adapter first sends the response and then a `stopped` event (with reason `restart`) after the restart has completed.\nClients should only call this request if the corresponding capability `supportsRestartFrame` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "restartFrame" ] - }, - "arguments": { - "$ref": "#/definitions/RestartFrameArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "RestartFrameArguments": { - "type": "object", - "description": "Arguments for `restartFrame` request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." - } - }, - "required": [ "frameId" ] - }, - "RestartFrameResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `restartFrame` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "GotoRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to execute code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a `stopped` event with reason `goto`.\nClients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true (because only then goto targets exist that can be passed as arguments).", - "properties": { - "command": { - "type": "string", - "enum": [ "goto" ] - }, - "arguments": { - "$ref": "#/definitions/GotoArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "GotoArguments": { - "type": "object", - "description": "Arguments for `goto` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Set the goto target for this thread." - }, - "targetId": { - "type": "integer", - "description": "The location where the debuggee will continue to run." - } - }, - "required": [ "threadId", "targetId" ] - }, - "GotoResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `goto` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "PauseRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request suspends the debuggee.\nThe debug adapter first sends the response and then a `stopped` event (with reason `pause`) after the thread has been paused successfully.", - "properties": { - "command": { - "type": "string", - "enum": [ "pause" ] - }, - "arguments": { - "$ref": "#/definitions/PauseArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "PauseArguments": { - "type": "object", - "description": "Arguments for `pause` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Pause execution for this thread." - } - }, - "required": [ "threadId" ] - }, - "PauseResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `pause` request. This is just an acknowledgement, so no body field is required." - }] - }, - - "StackTraceRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance-conscious clients and if the corresponding capability `supportsDelayedStackTraceLoading` is true, stack frames can be retrieved in a piecemeal way with the `startFrame` and `levels` arguments. The response of the `stackTrace` request may contain a `totalFrames` property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of `totalFrames` decide how to proceed. In any case a client should be prepared to receive fewer frames than requested, which is an indication that the end of the stack has been reached.", - "properties": { - "command": { - "type": "string", - "enum": [ "stackTrace" ] - }, - "arguments": { - "$ref": "#/definitions/StackTraceArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StackTraceArguments": { - "type": "object", - "description": "Arguments for `stackTrace` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Retrieve the stacktrace for this thread." - }, - "startFrame": { - "type": "integer", - "description": "The index of the first frame to return; if omitted frames start at 0." - }, - "levels": { - "type": "integer", - "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." - }, - "format": { - "$ref": "#/definitions/StackFrameFormat", - "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." - } - }, - "required": [ "threadId" ] - }, - "StackTraceResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `stackTrace` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "stackFrames": { - "type": "array", - "items": { - "$ref": "#/definitions/StackFrame" - }, - "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available." - }, - "totalFrames": { - "type": "integer", - "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client." - } - }, - "required": [ "stackFrames" ] - } - }, - "required": [ "body" ] - }] - }, - - "ScopesRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request returns the variable scopes for a given stack frame ID.", - "properties": { - "command": { - "type": "string", - "enum": [ "scopes" ] - }, - "arguments": { - "$ref": "#/definitions/ScopesArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ScopesArguments": { - "type": "object", - "description": "Arguments for `scopes` request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." - } - }, - "required": [ "frameId" ] - }, - "ScopesResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `scopes` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "scopes": { - "type": "array", - "items": { - "$ref": "#/definitions/Scope" - }, - "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available." - } - }, - "required": [ "scopes" ] - } - }, - "required": [ "body" ] - }] - }, - - "VariablesRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Retrieves all child variables for the given variable reference.\nA filter can be used to limit the fetched children to either named or indexed children.", - "properties": { - "command": { - "type": "string", - "enum": [ "variables" ] - }, - "arguments": { - "$ref": "#/definitions/VariablesArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "VariablesArguments": { - "type": "object", - "description": "Arguments for `variables` request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." - }, - "filter": { - "type": "string", - "enum": [ "indexed", "named" ], - "description": "Filter to limit the child variables to either named or indexed. If omitted, both types are fetched." - }, - "start": { - "type": "integer", - "description": "The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true." - }, - "count": { - "type": "integer", - "description": "The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." - } - }, - "required": [ "variablesReference" ] - }, - "VariablesResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `variables` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "variables": { - "type": "array", - "items": { - "$ref": "#/definitions/Variable" - }, - "description": "All (or a range) of variables for the given variable reference." - } - }, - "required": [ "variables" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetVariableRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the corresponding capability `supportsSetVariable` is true.\nIf a debug adapter implements both `setVariable` and `setExpression`, a client will only use `setExpression` if the variable has an `evaluateName` property.", - "properties": { - "command": { - "type": "string", - "enum": [ "setVariable" ] - }, - "arguments": { - "$ref": "#/definitions/SetVariableArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetVariableArguments": { - "type": "object", - "description": "Arguments for `setVariable` request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." - }, - "name": { - "type": "string", - "description": "The name of the variable in the container." - }, - "value": { - "type": "string", - "description": "The value of the variable." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the response value." - } - }, - "required": [ "variablesReference", "name", "value" ] - }, - "SetVariableResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `setVariable` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The new value of the variable." - }, - "type": { - "type": "string", - "description": "The type of the new value. Typically shown in the UI when hovering over the value." - }, - "variablesReference": { - "type": "integer", - "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "memoryReference": { - "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." - } - }, - "required": [ "value" ] - } - }, - "required": [ "body" ] - }] - }, - - "SourceRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request retrieves the source code for a given source reference.", - "properties": { - "command": { - "type": "string", - "enum": [ "source" ] - }, - "arguments": { - "$ref": "#/definitions/SourceArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SourceArguments": { - "type": "object", - "description": "Arguments for `source` request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified." - }, - "sourceReference": { - "type": "integer", - "description": "The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute." - } - }, - "required": [ "sourceReference" ] - }, - "SourceResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `source` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "Content of the source reference." - }, - "mimeType": { - "type": "string", - "description": "Content type (MIME type) of the source." - } - }, - "required": [ "content" ] - } - }, - "required": [ "body" ] - }] - }, - - "ThreadsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request retrieves a list of all threads.", - "properties": { - "command": { - "type": "string", - "enum": [ "threads" ] - } - }, - "required": [ "command" ] - }] - }, - "ThreadsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `threads` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "threads": { - "type": "array", - "items": { - "$ref": "#/definitions/Thread" - }, - "description": "All threads." - } - }, - "required": [ "threads" ] - } - }, - "required": [ "body" ] - }] - }, - - "TerminateThreadsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request terminates the threads with the given ids.\nClients should only call this request if the corresponding capability `supportsTerminateThreadsRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "terminateThreads" ] - }, - "arguments": { - "$ref": "#/definitions/TerminateThreadsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "TerminateThreadsArguments": { - "type": "object", - "description": "Arguments for `terminateThreads` request.", - "properties": { - "threadIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Ids of threads to be terminated." - } - } - }, - "TerminateThreadsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `terminateThreads` request. This is just an acknowledgement, no body field is required." - }] - }, - - "ModulesRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the corresponding capability `supportsModulesRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "modules" ] - }, - "arguments": { - "$ref": "#/definitions/ModulesArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ModulesArguments": { - "type": "object", - "description": "Arguments for `modules` request.", - "properties": { - "startModule": { - "type": "integer", - "description": "The index of the first module to return; if omitted modules start at 0." - }, - "moduleCount": { - "type": "integer", - "description": "The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned." - } - } - }, - "ModulesResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `modules` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "modules": { - "type": "array", - "items": { - "$ref": "#/definitions/Module" - }, - "description": "All modules or range of modules." - }, - "totalModules": { - "type": "integer", - "description": "The total number of modules available." - } - }, - "required": [ "modules" ] - } - }, - "required": [ "body" ] - }] - }, - - "LoadedSourcesRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the corresponding capability `supportsLoadedSourcesRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "loadedSources" ] - }, - "arguments": { - "$ref": "#/definitions/LoadedSourcesArguments" - } - }, - "required": [ "command" ] - }] - }, - "LoadedSourcesArguments": { - "type": "object", - "description": "Arguments for `loadedSources` request." - }, - "LoadedSourcesResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `loadedSources` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "sources": { - "type": "array", - "items": { - "$ref": "#/definitions/Source" - }, - "description": "Set of loaded sources." - } - }, - "required": [ "sources" ] - } - }, - "required": [ "body" ] - }] - }, - - "EvaluateRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Evaluates the given expression in the context of the topmost stack frame.\nThe expression has access to any variables and arguments that are in scope.", - "properties": { - "command": { - "type": "string", - "enum": [ "evaluate" ] - }, - "arguments": { - "$ref": "#/definitions/EvaluateArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "EvaluateArguments": { - "type": "object", - "description": "Arguments for `evaluate` request.", - "properties": { - "expression": { - "type": "string", - "description": "The expression to evaluate." - }, - "frameId": { - "type": "integer", - "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." - }, - "context": { - "type": "string", - "_enum": [ "watch", "repl", "hover", "clipboard", "variables" ], - "enumDescriptions": [ - "evaluate is called from a watch view context.", - "evaluate is called from a REPL context.", - "evaluate is called to generate the debug hover contents.\nThis value should only be used if the corresponding capability `supportsEvaluateForHovers` is true.", - "evaluate is called to generate clipboard contents.\nThis value should only be used if the corresponding capability `supportsClipboardContext` is true.", - "evaluate is called from a variables view context." - ], - "description": "The context in which the evaluate request is used." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the result.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." - } - }, - "required": [ "expression" ] - }, - "EvaluateResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `evaluate` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "result": { - "type": "string", - "description": "The result of the evaluate request." - }, - "type": { - "type": "string", - "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI." - }, - "variablesReference": { - "type": "integer", - "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "memoryReference": { - "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." - } - }, - "required": [ "result", "variablesReference" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetExpressionRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the corresponding capability `supportsSetExpression` is true.\nIf a debug adapter implements both `setExpression` and `setVariable`, a client uses `setExpression` if the variable has an `evaluateName` property.", - "properties": { - "command": { - "type": "string", - "enum": [ "setExpression" ] - }, - "arguments": { - "$ref": "#/definitions/SetExpressionArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetExpressionArguments": { - "type": "object", - "description": "Arguments for `setExpression` request.", - "properties": { - "expression": { - "type": "string", - "description": "The l-value expression to assign to." - }, - "value": { - "type": "string", - "description": "The value expression to assign to the l-value expression." - }, - "frameId": { - "type": "integer", - "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies how the resulting value should be formatted." - } - }, - "required": [ "expression", "value" ] - }, - "SetExpressionResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `setExpression` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The new value of the expression." - }, - "type": { - "type": "string", - "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a value that can be used to determine how to render the result in the UI." - }, - "variablesReference": { - "type": "integer", - "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "memoryReference": { - "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." - } - }, - "required": [ "value" ] - } - }, - "required": [ "body" ] - }] - }, - - "StepInTargetsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "This request retrieves the possible step-in targets for the specified stack frame.\nThese targets can be used in the `stepIn` request.\nClients should only call this request if the corresponding capability `supportsStepInTargetsRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "stepInTargets" ] - }, - "arguments": { - "$ref": "#/definitions/StepInTargetsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StepInTargetsArguments": { - "type": "object", - "description": "Arguments for `stepInTargets` request.", - "properties": { - "frameId": { - "type": "integer", - "description": "The stack frame for which to retrieve the possible step-in targets." - } - }, - "required": [ "frameId" ] - }, - "StepInTargetsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `stepInTargets` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/StepInTarget" - }, - "description": "The possible step-in targets of the specified source location." - } - }, - "required": [ "targets" ] - } - }, - "required": [ "body" ] - }] - }, - - "GotoTargetsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the `goto` request.\nClients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "gotoTargets" ] - }, - "arguments": { - "$ref": "#/definitions/GotoTargetsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "GotoTargetsArguments": { - "type": "object", - "description": "Arguments for `gotoTargets` request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location for which the goto targets are determined." - }, - "line": { - "type": "integer", - "description": "The line location for which the goto targets are determined." - }, - "column": { - "type": "integer", - "description": "The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - } - }, - "required": [ "source", "line" ] - }, - "GotoTargetsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `gotoTargets` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/GotoTarget" - }, - "description": "The possible goto targets of the specified location." - } - }, - "required": [ "targets" ] - } - }, - "required": [ "body" ] - }] - }, - - "CompletionsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the corresponding capability `supportsCompletionsRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "completions" ] - }, - "arguments": { - "$ref": "#/definitions/CompletionsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "CompletionsArguments": { - "type": "object", - "description": "Arguments for `completions` request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." - }, - "text": { - "type": "string", - "description": "One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion." - }, - "column": { - "type": "integer", - "description": "The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - }, - "line": { - "type": "integer", - "description": "A line for which to determine the completion proposals. If missing the first line of the text is assumed." - } - }, - "required": [ "text", "column" ] - }, - "CompletionsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `completions` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/CompletionItem" - }, - "description": "The possible completions for ." - } - }, - "required": [ "targets" ] - } - }, - "required": [ "body" ] - }] - }, - - "ExceptionInfoRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the corresponding capability `supportsExceptionInfoRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "exceptionInfo" ] - }, - "arguments": { - "$ref": "#/definitions/ExceptionInfoArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ExceptionInfoArguments": { - "type": "object", - "description": "Arguments for `exceptionInfo` request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Thread for which exception information should be retrieved." - } - }, - "required": [ "threadId" ] - }, - "ExceptionInfoResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `exceptionInfo` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "exceptionId": { - "type": "string", - "description": "ID of the exception that was thrown." - }, - "description": { - "type": "string", - "description": "Descriptive text for the exception." - }, - "breakMode": { - "$ref": "#/definitions/ExceptionBreakMode", - "description": "Mode that caused the exception notification to be raised." - }, - "details": { - "$ref": "#/definitions/ExceptionDetails", - "description": "Detailed information about the exception." - } - }, - "required": [ "exceptionId", "breakMode" ] - } - }, - "required": [ "body" ] - }] - }, - - "ReadMemoryRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the corresponding capability `supportsReadMemoryRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "readMemory" ] - }, - "arguments": { - "$ref": "#/definitions/ReadMemoryArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ReadMemoryArguments": { - "type": "object", - "description": "Arguments for `readMemory` request.", - "properties": { - "memoryReference": { - "type": "string", - "description": "Memory reference to the base location from which data should be read." - }, - "offset": { - "type": "integer", - "description": "Offset (in bytes) to be applied to the reference location before reading data. Can be negative." - }, - "count": { - "type": "integer", - "description": "Number of bytes to read at the specified location and offset." - } - }, - "required": [ "memoryReference", "count" ] - }, - "ReadMemoryResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `readMemory` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "address": { - "type": "string", - "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise." - }, - "unreadableBytes": { - "type": "integer", - "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds." - }, - "data": { - "type": "string", - "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory." - } - }, - "required": [ "address" ] - } - } - }] - }, - - "WriteMemoryRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Writes bytes to memory at the provided location.\nClients should only call this request if the corresponding capability `supportsWriteMemoryRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "writeMemory" ] - }, - "arguments": { - "$ref": "#/definitions/WriteMemoryArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "WriteMemoryArguments": { - "type": "object", - "description": "Arguments for `writeMemory` request.", - "properties": { - "memoryReference": { - "type": "string", - "description": "Memory reference to the base location to which data should be written." - }, - "offset": { - "type": "integer", - "description": "Offset (in bytes) to be applied to the reference location before writing data. Can be negative." - }, - "allowPartial": { - "type": "boolean", - "description": "Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not." - }, - "data": { - "type": "string", - "description": "Bytes to write, encoded using base64." - } - }, - "required": [ "memoryReference", "data" ] - }, - "WriteMemoryResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `writeMemory` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "offset": { - "type": "integer", - "description": "Property that should be returned when `allowPartial` is true to indicate the offset of the first byte of data successfully written. Can be negative." - }, - "bytesWritten": { - "type": "integer", - "description": "Property that should be returned when `allowPartial` is true to indicate the number of bytes starting from address that were successfully written." - } - } - } - } - }] - }, - - "DisassembleRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Disassembles code stored at the provided location.\nClients should only call this request if the corresponding capability `supportsDisassembleRequest` is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "disassemble" ] - }, - "arguments": { - "$ref": "#/definitions/DisassembleArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "DisassembleArguments": { - "type": "object", - "description": "Arguments for `disassemble` request.", - "properties": { - "memoryReference": { - "type": "string", - "description": "Memory reference to the base location containing the instructions to disassemble." - }, - "offset": { - "type": "integer", - "description": "Offset (in bytes) to be applied to the reference location before disassembling. Can be negative." - }, - "instructionOffset": { - "type": "integer", - "description": "Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." - }, - "instructionCount": { - "type": "integer", - "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." - }, - "resolveSymbols": { - "type": "boolean", - "description": "If true, the adapter should attempt to resolve memory addresses and other values to symbolic names." - } - }, - "required": [ "memoryReference", "instructionCount" ] - }, - "DisassembleResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to `disassemble` request.", - "properties": { - "body": { - "type": "object", - "properties": { - "instructions": { - "type": "array", - "items": { - "$ref": "#/definitions/DisassembledInstruction" - }, - "description": "The list of disassembled instructions." - } - }, - "required": [ "instructions" ] - } - } - }] - }, - - "Capabilities": { - "type": "object", - "title": "Types", - "description": "Information about the capabilities of a debug adapter.", - "properties": { - "supportsConfigurationDoneRequest": { - "type": "boolean", - "description": "The debug adapter supports the `configurationDone` request." - }, - "supportsFunctionBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports function breakpoints." - }, - "supportsConditionalBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports conditional breakpoints." - }, - "supportsHitConditionalBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." - }, - "supportsEvaluateForHovers": { - "type": "boolean", - "description": "The debug adapter supports a (side effect free) `evaluate` request for data hovers." - }, - "exceptionBreakpointFilters": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionBreakpointsFilter" - }, - "description": "Available exception filter options for the `setExceptionBreakpoints` request." - }, - "supportsStepBack": { - "type": "boolean", - "description": "The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests." - }, - "supportsSetVariable": { - "type": "boolean", - "description": "The debug adapter supports setting a variable to a value." - }, - "supportsRestartFrame": { - "type": "boolean", - "description": "The debug adapter supports restarting a frame." - }, - "supportsGotoTargetsRequest": { - "type": "boolean", - "description": "The debug adapter supports the `gotoTargets` request." - }, - "supportsStepInTargetsRequest": { - "type": "boolean", - "description": "The debug adapter supports the `stepInTargets` request." - }, - "supportsCompletionsRequest": { - "type": "boolean", - "description": "The debug adapter supports the `completions` request." - }, - "completionTriggerCharacters": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character." - }, - "supportsModulesRequest": { - "type": "boolean", - "description": "The debug adapter supports the `modules` request." - }, - "additionalModuleColumns": { - "type": "array", - "items": { - "$ref": "#/definitions/ColumnDescriptor" - }, - "description": "The set of additional module information exposed by the debug adapter." - }, - "supportedChecksumAlgorithms": { - "type": "array", - "items": { - "$ref": "#/definitions/ChecksumAlgorithm" - }, - "description": "Checksum algorithms supported by the debug adapter." - }, - "supportsRestartRequest": { - "type": "boolean", - "description": "The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request." - }, - "supportsExceptionOptions": { - "type": "boolean", - "description": "The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request." - }, - "supportsValueFormattingOptions": { - "type": "boolean", - "description": "The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests." - }, - "supportsExceptionInfoRequest": { - "type": "boolean", - "description": "The debug adapter supports the `exceptionInfo` request." - }, - "supportTerminateDebuggee": { - "type": "boolean", - "description": "The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request." - }, - "supportSuspendDebuggee": { - "type": "boolean", - "description": "The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request." - }, - "supportsDelayedStackTraceLoading": { - "type": "boolean", - "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported." - }, - "supportsLoadedSourcesRequest": { - "type": "boolean", - "description": "The debug adapter supports the `loadedSources` request." - }, - "supportsLogPoints": { - "type": "boolean", - "description": "The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`." - }, - "supportsTerminateThreadsRequest": { - "type": "boolean", - "description": "The debug adapter supports the `terminateThreads` request." - }, - "supportsSetExpression": { - "type": "boolean", - "description": "The debug adapter supports the `setExpression` request." - }, - "supportsTerminateRequest": { - "type": "boolean", - "description": "The debug adapter supports the `terminate` request." - }, - "supportsDataBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports data breakpoints." - }, - "supportsReadMemoryRequest": { - "type": "boolean", - "description": "The debug adapter supports the `readMemory` request." - }, - "supportsWriteMemoryRequest": { - "type": "boolean", - "description": "The debug adapter supports the `writeMemory` request." - }, - "supportsDisassembleRequest": { - "type": "boolean", - "description": "The debug adapter supports the `disassemble` request." - }, - "supportsCancelRequest": { - "type": "boolean", - "description": "The debug adapter supports the `cancel` request." - }, - "supportsBreakpointLocationsRequest": { - "type": "boolean", - "description": "The debug adapter supports the `breakpointLocations` request." - }, - "supportsClipboardContext": { - "type": "boolean", - "description": "The debug adapter supports the `clipboard` context value in the `evaluate` request." - }, - "supportsSteppingGranularity": { - "type": "boolean", - "description": "The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests." - }, - "supportsInstructionBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports adding breakpoints based on instruction references." - }, - "supportsExceptionFilterOptions": { - "type": "boolean", - "description": "The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request." - }, - "supportsSingleThreadExecutionRequests": { - "type": "boolean", - "description": "The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`)." - } - } - }, - - "ExceptionBreakpointsFilter": { - "type": "object", - "description": "An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with.", - "properties": { - "filter": { - "type": "string", - "description": "The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request." - }, - "label": { - "type": "string", - "description": "The name of the filter option. This is shown in the UI." - }, - "description": { - "type": "string", - "description": "A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated." - }, - "default": { - "type": "boolean", - "description": "Initial value of the filter option. If not specified a value false is assumed." - }, - "supportsCondition": { - "type": "boolean", - "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." - }, - "conditionDescription": { - "type": "string", - "description": "A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated." - } - }, - "required": [ "filter", "label" ] - }, - - "Message": { - "type": "object", - "description": "A structured message object. Used to return errors from requests.", - "properties": { - "id": { - "type": "integer", - "description": "Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily." - }, - "format": { - "type": "string", - "description": "A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." - }, - "variables": { - "type": "object", - "description": "An object used as a dictionary for looking up the variables in the format string.", - "additionalProperties": { - "type": "string", - "description": "All dictionary values must be strings." - } - }, - "sendTelemetry": { - "type": "boolean", - "description": "If true send to telemetry." - }, - "showUser": { - "type": "boolean", - "description": "If true show user." - }, - "url": { - "type": "string", - "description": "A url where additional information about this message can be found." - }, - "urlLabel": { - "type": "string", - "description": "A label that is presented to the user as the UI for opening the url." - } - }, - "required": [ "id", "format" ] - }, - - "Module": { - "type": "object", - "description": "A Module object represents a row in the modules view.\nThe `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting.\nThe `name` attribute is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.", - "properties": { - "id": { - "type": ["integer", "string"], - "description": "Unique identifier for the module." - }, - "name": { - "type": "string", - "description": "A name of the module." - }, - "path": { - "type": "string", - "description": "Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." - }, - "isOptimized": { - "type": "boolean", - "description": "True if the module is optimized." - }, - "isUserCode": { - "type": "boolean", - "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." - }, - "version": { - "type": "string", - "description": "Version of Module." - }, - "symbolStatus": { - "type": "string", - "description": "User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)" - }, - "symbolFilePath": { - "type": "string", - "description": "Logical full path to the symbol file. The exact definition is implementation defined." - }, - "dateTimeStamp": { - "type": "string", - "description": "Module created or modified, encoded as a RFC 3339 timestamp." - }, - "addressRange": { - "type": "string", - "description": "Address range covered by this module." - } - }, - "required": [ "id", "name" ] - }, - - "ColumnDescriptor": { - "type": "object", - "description": "A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", - "properties": { - "attributeName": { - "type": "string", - "description": "Name of the attribute rendered in this column." - }, - "label": { - "type": "string", - "description": "Header UI label of column." - }, - "format": { - "type": "string", - "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." - }, - "type": { - "type": "string", - "enum": [ "string", "number", "boolean", "unixTimestampUTC" ], - "description": "Datatype of values in this column. Defaults to `string` if not specified." - }, - "width": { - "type": "integer", - "description": "Width of this column in characters (hint only)." - } - }, - "required": [ "attributeName", "label"] - }, - - "Thread": { - "type": "object", - "description": "A Thread", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for the thread." - }, - "name": { - "type": "string", - "description": "The name of the thread." - } - }, - "required": [ "id", "name" ] - }, - - "Source": { - "type": "object", - "description": "A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.", - "properties": { - "name": { - "type": "string", - "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." - }, - "path": { - "type": "string", - "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0)." - }, - "sourceReference": { - "type": "integer", - "description": "If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "presentationHint": { - "type": "string", - "description": "A hint for how to present the source in the UI.\nA value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.", - "enum": [ "normal", "emphasize", "deemphasize" ] - }, - "origin": { - "type": "string", - "description": "The origin of this source. For example, 'internal module', 'inlined content from source map', etc." - }, - "sources": { - "type": "array", - "items": { - "$ref": "#/definitions/Source" - }, - "description": "A list of sources that are related to this source. These may be the source that generated this source." - }, - "adapterData": { - "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." - }, - "checksums": { - "type": "array", - "items": { - "$ref": "#/definitions/Checksum" - }, - "description": "The checksums associated with this file." - } - } - }, - - "StackFrame": { - "type": "object", - "description": "A Stackframe contains the source location.", - "properties": { - "id": { - "type": "integer", - "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame." - }, - "name": { - "type": "string", - "description": "The name of the stack frame, typically a method name." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The source of the frame." - }, - "line": { - "type": "integer", - "description": "The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client." - }, - "column": { - "type": "integer", - "description": "Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client." - }, - "endLine": { - "type": "integer", - "description": "The end line of the range covered by the stack frame." - }, - "endColumn": { - "type": "integer", - "description": "End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - }, - "canRestart": { - "type": "boolean", - "description": "Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent." - }, - "instructionPointerReference": { - "type": "string", - "description": "A memory reference for the current instruction pointer in this frame." - }, - "moduleId": { - "type": ["integer", "string"], - "description": "The module associated with this frame, if any." - }, - "presentationHint": { - "type": "string", - "enum": [ "normal", "label", "subtle" ], - "description": "A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way." - } - }, - "required": [ "id", "name", "line", "column" ] - }, - - "Scope": { - "type": "object", - "description": "A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source.", - "properties": { - "name": { - "type": "string", - "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." - }, - "presentationHint": { - "type": "string", - "description": "A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", - "_enum": [ "arguments", "locals", "registers" ], - "enumDescriptions": [ - "Scope contains method arguments.", - "Scope contains local variables.", - "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request." - ] - }, - "variablesReference": { - "type": "integer", - "description": "The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." - }, - "expensive": { - "type": "boolean", - "description": "If true, the number of variables in this scope is large or expensive to retrieve." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The source for this scope." - }, - "line": { - "type": "integer", - "description": "The start line of the range covered by this scope." - }, - "column": { - "type": "integer", - "description": "Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - }, - "endLine": { - "type": "integer", - "description": "The end line of the range covered by this scope." - }, - "endColumn": { - "type": "integer", - "description": "End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - } - }, - "required": [ "name", "variablesReference", "expensive" ] - }, - - "Variable": { - "type": "object", - "description": "A Variable is a name/value pair.\nThe `type` attribute is shown if space permits or when hovering over the variable's name.\nThe `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.\nIf the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.", - "properties": { - "name": { - "type": "string", - "description": "The variable's name." - }, - "value": { - "type": "string", - "description": "The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI." - }, - "type": { - "type": "string", - "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a variable that can be used to determine how to render the variable in the UI." - }, - "evaluateName": { - "type": "string", - "description": "The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value." - }, - "variablesReference": { - "type": "integer", - "description": "If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." - }, - "memoryReference": { - "type": "string", - "description": "A memory reference associated with this variable.\nFor pointer type variables, this is generally a reference to the memory address contained in the pointer.\nFor executable data, this reference may later be used in a `disassemble` request.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." - } - }, - "required": [ "name", "value", "variablesReference" ] - }, - - "VariablePresentationHint": { - "type": "object", - "description": "Properties of a variable that can be used to determine how to render the variable in the UI.", - "properties": { - "kind": { - "description": "The kind of variable. Before introducing additional values, try to use the listed values.", - "type": "string", - "_enum": [ "property", "method", "class", "data", "event", "baseClass", "innerClass", "interface", "mostDerivedClass", "virtual", "dataBreakpoint" ], - "enumDescriptions": [ - "Indicates that the object is a property.", - "Indicates that the object is a method.", - "Indicates that the object is a class.", - "Indicates that the object is data.", - "Indicates that the object is an event.", - "Indicates that the object is a base class.", - "Indicates that the object is an inner class.", - "Indicates that the object is an interface.", - "Indicates that the object is the most derived class.", - "Indicates that the object is virtual, that means it is a synthetic object introduced by the adapter for rendering purposes, e.g. an index range for large arrays.", - "Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead." - ] - }, - "attributes": { - "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", - "type": "array", - "items": { - "type": "string", - "_enum": [ "static", "constant", "readOnly", "rawString", "hasObjectId", "canHaveObjectId", "hasSideEffects", "hasDataBreakpoint" ], - "enumDescriptions": [ - "Indicates that the object is static.", - "Indicates that the object is a constant.", - "Indicates that the object is read only.", - "Indicates that the object is a raw string.", - "Indicates that the object can have an Object ID created for it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", - "Indicates that the object has an Object ID associated with it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", - "Indicates that the evaluation had side effects.", - "Indicates that the object has its value tracked by a data breakpoint." - ] - } - }, - "visibility": { - "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", - "type": "string", - "_enum": [ "public", "private", "protected", "internal", "final" ] - }, - "lazy": { - "description": "If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.", - "type": "boolean" - } - } - }, - - "BreakpointLocation": { - "type": "object", - "description": "Properties of a breakpoint location returned from the `breakpointLocations` request.", - "properties": { - "line": { - "type": "integer", - "description": "Start line of breakpoint location." - }, - "column": { - "type": "integer", - "description": "The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - }, - "endLine": { - "type": "integer", - "description": "The end line of breakpoint location if the location covers a range." - }, - "endColumn": { - "type": "integer", - "description": "The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - } - }, - "required": [ "line" ] - }, - - "SourceBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.", - "properties": { - "line": { - "type": "integer", - "description": "The source line of the breakpoint or logpoint." - }, - "column": { - "type": "integer", - "description": "Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - }, - "condition": { - "type": "string", - "description": "The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." - }, - "hitCondition": { - "type": "string", - "description": "The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met." - }, - "logMessage": { - "type": "string", - "description": "If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met." - } - }, - "required": [ "line" ] - }, - - "FunctionBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint passed to the `setFunctionBreakpoints` request.", - "properties": { - "name": { - "type": "string", - "description": "The name of the function." - }, - "condition": { - "type": "string", - "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." - }, - "hitCondition": { - "type": "string", - "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true." - } - }, - "required": [ "name" ] - }, - - "DataBreakpointAccessType": { - "type": "string", - "description": "This enumeration defines all possible access types for data breakpoints.", - "enum": [ "read", "write", "readWrite" ] - }, - - "DataBreakpoint": { - "type": "object", - "description": "Properties of a data breakpoint passed to the `setDataBreakpoints` request.", - "properties": { - "dataId": { - "type": "string", - "description": "An id representing the data. This id is returned from the `dataBreakpointInfo` request." - }, - "accessType": { - "$ref": "#/definitions/DataBreakpointAccessType", - "description": "The access type of the data." - }, - "condition": { - "type": "string", - "description": "An expression for conditional breakpoints." - }, - "hitCondition": { - "type": "string", - "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed." - } - }, - "required": [ "dataId" ] - }, - - "InstructionBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint passed to the `setInstructionBreakpoints` request", - "properties": { - "instructionReference": { - "type": "string", - "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`." - }, - "offset": { - "type": "integer", - "description": "The offset from the instruction reference in bytes.\nThis can be negative." - }, - "condition": { - "type": "string", - "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." - }, - "hitCondition": { - "type": "string", - "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true." - } - }, - "required": [ "instructionReference" ] - }, - - "Breakpoint": { - "type": "object", - "description": "Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.", - "properties": { - "id": { - "type": "integer", - "description": "The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." - }, - "verified": { - "type": "boolean", - "description": "If true, the breakpoint could be set (but not necessarily at the desired location)." - }, - "message": { - "type": "string", - "description": "A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The source where the breakpoint is located." - }, - "line": { - "type": "integer", - "description": "The start line of the actual range covered by the breakpoint." - }, - "column": { - "type": "integer", - "description": "Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - }, - "endLine": { - "type": "integer", - "description": "The end line of the actual range covered by the breakpoint." - }, - "endColumn": { - "type": "integer", - "description": "End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line." - }, - "instructionReference": { - "type": "string", - "description": "A memory reference to where the breakpoint is set." - }, - "offset": { - "type": "integer", - "description": "The offset from the instruction reference.\nThis can be negative." - }, - "reason": { - "type": "string", - "description": "A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:\n\n- `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.\n - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.", - "enum": [ "pending", "failed" ] - } - }, - "required": [ "verified" ] - }, - - "SteppingGranularity": { - "type": "string", - "description": "The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.", - "enum": [ "statement", "line", "instruction" ], - "enumDescriptions": [ - "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", - "The step should allow the program to run until the current source line has executed.", - "The step should allow one instruction to execute (e.g. one x86 instruction)." - ] - }, - - "StepInTarget": { - "type": "object", - "description": "A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for a step-in target." - }, - "label": { - "type": "string", - "description": "The name of the step-in target (shown in the UI)." - }, - "line": { - "type": "integer", - "description": "The line of the step-in target." - }, - "column": { - "type": "integer", - "description": "Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - }, - "endLine": { - "type": "integer", - "description": "The end line of the range covered by the step-in target." - }, - "endColumn": { - "type": "integer", - "description": "End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." - } - }, - "required": [ "id", "label" ] - }, - - "GotoTarget": { - "type": "object", - "description": "A `GotoTarget` describes a code location that can be used as a target in the `goto` request.\nThe possible goto targets can be determined via the `gotoTargets` request.", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for a goto target. This is used in the `goto` request." - }, - "label": { - "type": "string", - "description": "The name of the goto target (shown in the UI)." - }, - "line": { - "type": "integer", - "description": "The line of the goto target." - }, - "column": { - "type": "integer", - "description": "The column of the goto target." - }, - "endLine": { - "type": "integer", - "description": "The end line of the range covered by the goto target." - }, - "endColumn": { - "type": "integer", - "description": "The end column of the range covered by the goto target." - }, - "instructionPointerReference": { - "type": "string", - "description": "A memory reference for the instruction pointer value represented by this target." - } - }, - "required": [ "id", "label", "line" ] - }, - - "CompletionItem": { - "type": "object", - "description": "`CompletionItems` are the suggestions returned from the `completions` request.", - "properties": { - "label": { - "type": "string", - "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." - }, - "text": { - "type": "string", - "description": "If text is returned and not an empty string, then it is inserted instead of the label." - }, - "sortText": { - "type": "string", - "description": "A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead." - }, - "detail": { - "type": "string", - "description": "A human-readable string with additional information about this item, like type or symbol information." - }, - "type": { - "$ref": "#/definitions/CompletionItemType", - "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon." - }, - "start": { - "type": "integer", - "description": "Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request." - }, - "length": { - "type": "integer", - "description": "Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted." - }, - "selectionStart": { - "type": "integer", - "description": "Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text." - }, - "selectionLength": { - "type": "integer", - "description": "Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0." - } - }, - "required": [ "label" ] - }, - - "CompletionItemType": { - "type": "string", - "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.", - "enum": [ "method", "function", "constructor", "field", "variable", "class", "interface", "module", "property", "unit", "value", "enum", "keyword", "snippet", "text", "color", "file", "reference", "customcolor" ] - }, - - "ChecksumAlgorithm": { - "type": "string", - "description": "Names of checksum algorithms that may be supported by a debug adapter.", - "enum": [ "MD5", "SHA1", "SHA256", "timestamp" ] - }, - - "Checksum": { - "type": "object", - "description": "The checksum of an item calculated by the specified algorithm.", - "properties": { - "algorithm": { - "$ref": "#/definitions/ChecksumAlgorithm", - "description": "The algorithm used to calculate this checksum." - }, - "checksum": { - "type": "string", - "description": "Value of the checksum, encoded as a hexadecimal value." - } - }, - "required": [ "algorithm", "checksum" ] - }, - - "ValueFormat": { - "type": "object", - "description": "Provides formatting information for a value.", - "properties": { - "hex": { - "type": "boolean", - "description": "Display the value in hex." - } - } - }, - - "StackFrameFormat": { - "allOf": [ { "$ref": "#/definitions/ValueFormat" }, { - "type": "object", - "description": "Provides formatting information for a stack frame.", - "properties": { - "parameters": { - "type": "boolean", - "description": "Displays parameters for the stack frame." - }, - "parameterTypes": { - "type": "boolean", - "description": "Displays the types of parameters for the stack frame." - }, - "parameterNames": { - "type": "boolean", - "description": "Displays the names of parameters for the stack frame." - }, - "parameterValues": { - "type": "boolean", - "description": "Displays the values of parameters for the stack frame." - }, - "line": { - "type": "boolean", - "description": "Displays the line number of the stack frame." - }, - "module": { - "type": "boolean", - "description": "Displays the module of the stack frame." - }, - "includeAll": { - "type": "boolean", - "description": "Includes all stack frames, including those the debug adapter might otherwise hide." - } - } - }] - }, - - "ExceptionFilterOptions": { - "type": "object", - "description": "An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.", - "properties": { - "filterId": { - "type": "string", - "description": "ID of an exception filter returned by the `exceptionBreakpointFilters` capability." - }, - "condition": { - "type": "string", - "description": "An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is true." - } - }, - "required": [ "filterId" ] - }, - - "ExceptionOptions": { - "type": "object", - "description": "An `ExceptionOptions` assigns configuration options to a set of exceptions.", - "properties": { - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionPathSegment" - }, - "description": "A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." - }, - "breakMode": { - "$ref": "#/definitions/ExceptionBreakMode", - "description": "Condition when a thrown exception should result in a break." - } - }, - "required": [ "breakMode" ] - }, - - "ExceptionBreakMode": { - "type": "string", - "description": "This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.", - "enum": [ "never", "always", "unhandled", "userUnhandled" ] - }, - - "ExceptionPathSegment": { - "type": "object", - "description": "An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true.", - "properties": { - "negate": { - "type": "boolean", - "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." - }, - "names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Depending on the value of `negate` the names that should match or not match." - } - }, - "required": [ "names" ] - }, - - "ExceptionDetails": { - "type": "object", - "description": "Detailed information about an exception that has occurred.", - "properties": { - "message": { - "type": "string", - "description": "Message contained in the exception." - }, - "typeName": { - "type": "string", - "description": "Short type name of the exception object." - }, - "fullTypeName": { - "type": "string", - "description": "Fully-qualified type name of the exception object." - }, - "evaluateName": { - "type": "string", - "description": "An expression that can be evaluated in the current scope to obtain the exception object." - }, - "stackTrace": { - "type": "string", - "description": "Stack trace at the time the exception was thrown." - }, - "innerException": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionDetails" - }, - "description": "Details of the exception contained by this exception, if any." - } - } - }, - - "DisassembledInstruction": { - "type": "object", - "description": "Represents a single disassembled instruction.", - "properties": { - "address": { - "type": "string", - "description": "The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise." - }, - "instructionBytes": { - "type": "string", - "description": "Raw bytes representing the instruction and its operands, in an implementation-defined format." - }, - "instruction": { - "type": "string", - "description": "Text representing the instruction and its operands, in an implementation-defined format." - }, - "symbol": { - "type": "string", - "description": "Name of the symbol that corresponds with the location of this instruction, if any." - }, - "location": { - "$ref": "#/definitions/Source", - "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." - }, - "line": { - "type": "integer", - "description": "The line within the source location that corresponds to this instruction, if any." - }, - "column": { - "type": "integer", - "description": "The column within the line that corresponds to this instruction, if any." - }, - "endLine": { - "type": "integer", - "description": "The end line of the range that corresponds to this instruction, if any." - }, - "endColumn": { - "type": "integer", - "description": "The end column of the range that corresponds to this instruction, if any." - }, - "presentationHint": { - "type": "string", - "description": "A hint for how to present the instruction in the UI.\n\nA value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'", - "enum": [ "normal", "invalid" ] - } - }, - "required": [ "address", "instruction" ] - }, - - "InvalidatedAreas": { - "type": "string", - "description": "Logical areas that can be invalidated by the `invalidated` event.", - "_enum": [ "all", "stacks", "threads", "variables" ], - "enumDescriptions": [ - "All previously fetched data has become invalid and needs to be refetched.", - "Previously fetched stack related data has become invalid and needs to be refetched.", - "Previously fetched thread related data has become invalid and needs to be refetched.", - "Previously fetched variable data has become invalid and needs to be refetched." - ] - } - - } -}