Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 528095

Summary: API/extension point to resolve a selection/a line to IVariable(s)
Product: [Eclipse Project] Platform Reporter: Mickael Istria <mistria>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: akurtakov, daniel_megert, gautier.desaintmartinlacaze, gregory.amerson
Version: 4.7   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=521960
Whiteboard:

Description Mickael Istria CLA 2017-12-04 09:56:47 EST
With bug 521958, the Debug framework has introduced a generic/universal text hover class to enable debug on a Text Editor, and registered it on the Generic Editor. However, the implementation relies on the availability of an adapter from ITextSelection to IVariable which happens to be hard to implement properly because of some missing context, such as a reference to the editor which is receiving the hover event.
Some workarounds have been successfully tried and discussed in bug 521960 and bug  521959, but those happened to not be good enough.
To properly implement this hover, the Platform.Debug framework should let extenders provide a way to resolve a hover request (just a selection/textViewer couple for instance - or whatever minimal set of text-related info required for resolution) to an IVariable, and use this API primarily in place of the adapter (which could still be used as failback). An org.eclipse.debug.ui.textToVariableResolvers extension point should do the trick.
Comment 1 Mickael Istria CLA 2022-02-08 07:25:24 EST
I don't think this is a requirement for further progress. The adapter seems sufficient so far.