|Eclipse Plugin - Debugger - Automatically select the top stackframe [message #643977]
||Wed, 08 December 2010 21:19
Registered: December 2010
I posted this in the "Newcomers" section, but was redirected here.
I'm writing a debugger as an eclipse plugin (using eclipse 3.6.1, windows XP and 7). Everything seems to work except for one thing: when a breakpoint is hit, or after a step, the top stack frame is not selected automatically (and thus, the associated source line is not highlighted). And, if I select it manually, after each step/continue, I have to select it again.
When the stack frame is manually selected, the correct source line is highlighted.
When a breakpoint is hit, I fire a DebugEvent with kind = DebugEvent.SUSPEND, detail = DebugEvent.BREAKPOINT. The source of the debug event is set to the thread in which the breakpoint is set.
After looking on the internet, I found these 2 links that did'nt help:
- http://dev.eclipse.org/mhonarc/lists/platform-debug-dev/msg0 1111.html
I have a source locator, a debug model presentation, and a text editor and they seem to work correctly since clicking on the stack frame highlights the correct source line.
- http://dev.eclipse.org/mhonarc/lists/platform-debug-dev/msg0 1249.html
After stepping in the eclipse source code, I arrive in ThreadEventHandler#fireDeltaUpdatingSelectedFrame which sets the IModelDelta.SELECT flag in the delta.
I've tried looking around a little more but I am not familiar enough with eclipse and its source. The farthest I could go was from TreeModelContentProvider#handleSelect to TreeModelViewer#internalExpand(Object, bool). The Object is the correct TreePath and the boolean is set to false.
In internal expand, the parent is asked to create the child widget (createChildren(pw)) but then, internalFindChild(pw,element) returns null. The parent widget does have a child but the child's data member is set to null.
Any idea ? What am I doing wrong ?
Thanks in advance.
Powered by FUDForum
. Page generated in 0.37635 seconds