From c0acfb3aea704d4dd7b944e9b46e44d6da55bec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kroi=C3=9F=2C=20Florian?= Date: Tue, 21 Jan 2025 09:54:44 +0100 Subject: [PATCH] feat: Use DSPValue::getValueString for detail computation --- org.eclipse.lsp4e.debug/META-INF/MANIFEST.MF | 2 +- .../debug/presentation/DSPDebugModelPresentation.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/org.eclipse.lsp4e.debug/META-INF/MANIFEST.MF b/org.eclipse.lsp4e.debug/META-INF/MANIFEST.MF index e5290e50d..8e2224f71 100644 --- a/org.eclipse.lsp4e.debug/META-INF/MANIFEST.MF +++ b/org.eclipse.lsp4e.debug/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Debug Adapter client for Eclipse IDE (Incubation) Bundle-SymbolicName: org.eclipse.lsp4e.debug;singleton:=true Bundle-Vendor: Eclipse LSP4E -Bundle-Version: 0.15.14.qualifier +Bundle-Version: 0.15.15.qualifier Bundle-Activator: org.eclipse.lsp4e.debug.DSPPlugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, diff --git a/org.eclipse.lsp4e.debug/src/org/eclipse/lsp4e/debug/presentation/DSPDebugModelPresentation.java b/org.eclipse.lsp4e.debug/src/org/eclipse/lsp4e/debug/presentation/DSPDebugModelPresentation.java index 40efdf586..f937e89fe 100644 --- a/org.eclipse.lsp4e.debug/src/org/eclipse/lsp4e/debug/presentation/DSPDebugModelPresentation.java +++ b/org.eclipse.lsp4e.debug/src/org/eclipse/lsp4e/debug/presentation/DSPDebugModelPresentation.java @@ -18,6 +18,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; +import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IDisconnect; import org.eclipse.debug.core.model.ILineBreakpoint; import org.eclipse.debug.core.model.ITerminate; @@ -30,6 +31,7 @@ import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.viewers.IFontProvider; import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.lsp4e.debug.DSPPlugin; import org.eclipse.lsp4e.debug.debugmodel.DSPDebugElement; import org.eclipse.lsp4e.debug.debugmodel.DSPThread; import org.eclipse.osgi.util.NLS; @@ -187,8 +189,12 @@ public void setAttribute(String attribute, @Nullable Object value) { @Override public void computeDetail(IValue value, IValueDetailListener listener) { - // TODO Auto-generated method stub - + try { + listener.detailComputed(value, value.getValueString()); + } catch (DebugException e) { + // Should not happen, because DSPValue does not throw this exception + DSPPlugin.logError("Failed to compute detail value", e); + } } public static Display getDisplay() {