GeezerVison is showing github.com — Return the changed classes as response of redefine classes command (#… · mfussenegger/java-debug@d91322d
File tree
Expand file treeCollapse file tree
Open diff view settings
com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/HotCodeReplaceHandler.java +6-2Lines changed: 6 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | /******************************************************************************* |
2 | | -* Copyright (c) 2017 Microsoft Corporation and others. |
| 2 | +* Copyright (c) 2017-2019 Microsoft Corporation and others. |
3 | 3 | * All rights reserved. This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License v1.0 |
5 | 5 | * which accompanies this distribution, and is available at |
|
25 | 25 | import com.microsoft.java.debug.core.protocol.Requests; |
26 | 26 | import com.microsoft.java.debug.core.protocol.Requests.Arguments; |
27 | 27 | import com.microsoft.java.debug.core.protocol.Requests.Command; |
| 28 | +import com.microsoft.java.debug.core.protocol.Responses; |
28 | 29 |
|
29 | 30 | public class HotCodeReplaceHandler implements IDebugRequestHandler { |
30 | 31 | @Override |
@@ -58,7 +59,10 @@ public CompletableFuture<Response> handle(Command command, Arguments arguments, |
58 | 59 |
|
59 | 60 | IHotCodeReplaceProvider provider = context.getProvider(IHotCodeReplaceProvider.class); |
60 | 61 |
|
61 | | - return provider.redefineClasses().thenApply(classNames -> response); |
| 62 | + return provider.redefineClasses().thenApply(classNames -> { |
| 63 | + response.body = new Responses.RedefineClassesResponse(classNames.toArray(new String[0])); |
| 64 | + return response; |
| 65 | + }); |
62 | 66 | } |
63 | 67 |
|
64 | 68 | } |
Collapse file
Copy file name to clipboardExpand all lines: com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/protocol/Responses.java +12-1Lines changed: 12 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | /******************************************************************************* |
2 | | -* Copyright (c) 2017 Microsoft Corporation and others. |
| 2 | +* Copyright (c) 2017-2019 Microsoft Corporation and others. |
3 | 3 | * All rights reserved. This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License v1.0 |
5 | 5 | * which accompanies this distribution, and is available at |
@@ -245,4 +245,15 @@ public ExceptionInfoResponse(String exceptionId, String description, ExceptionBr |
245 | 245 | this.details = details; |
246 | 246 | } |
247 | 247 | } |
| 248 | + |
| 249 | + public static class RedefineClassesResponse extends ResponseBody { |
| 250 | + public String[] changedClasses = new String[0]; |
| 251 | + |
| 252 | + /** |
| 253 | + * Constructor. |
| 254 | + */ |
| 255 | + public RedefineClassesResponse(String[] changedClasses) { |
| 256 | + this.changedClasses = changedClasses; |
| 257 | + } |
| 258 | + } |
248 | 259 | } |