entlicher commented on a change in pull request #3119:
URL: https://github.com/apache/netbeans/pull/3119#discussion_r695969586
##########
File path:
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/NbProtocolServer.java
##########
@@ -349,6 +352,32 @@ public NbProtocolServer(DebugAdapterContext context) {
return future;
}
+ @Override
+ @NbBundle.Messages({"MSG_FrameRestartUnsupported=Restart of frames is not
supported.",
+ "# {0} - frame pop error message",
+ "MSG_FrameRestartFailed=Unable to restart frame: {0}"})
+ public CompletableFuture<Void> restartFrame(RestartFrameArguments args) {
+ CompletableFuture<Void> future = new CompletableFuture<>();
+ NbFrame stackFrame = (NbFrame)
context.getThreadsProvider().getThreadObjects().getObject(args.getFrameId());
+ String popError = null;
+ if (stackFrame != null) {
+ try {
+ stackFrame.getDVFrame().popOff();
+ ActionsManager am =
DebuggerManager.getDebuggerManager().getCurrentEngine().getActionsManager();
+ am.doAction("stepInto");
+ future.complete(null);
+ } catch (UnsupportedOperationException ex) {
+ popError = Bundle.MSG_FrameRestartUnsupported();
+ } catch (DebuggingView.PopException ex) {
+ popError =
Bundle.MSG_FrameRestartFailed(ex.getLocalizedMessage());
Review comment:
Right. I'm used to always use `getLocalizedMessage()` in the UI, even
though it's rarely overridden.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists