Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-debug-dev] How to get thread reference of the current thread from VariablesView

You can obtain the "active debug context", which corresponds to the 
selection in the debug view. From this selection you can navigate to the 
thread.

@see DebugUITools.getDebugContext() - it returns an object. If the 
variables view is populated, then the selection should be an 
IJavaStackFrame (for Java variables). You can get the IJavaThread from the 
frame.

Darin Wright




"Mangai Kumar" <msethura@xxxxxxx> 
Sent by: jdt-debug-dev-bounces@xxxxxxxxxxx
03/26/2007 11:14 PM
Please respond to
"Eclipse JDT Debug developers list." <jdt-debug-dev@xxxxxxxxxxx>


To
jdt-debug-dev@xxxxxxxxxxx
cc

Subject
[jdt-debug-dev] How to get thread reference of the current thread from 
VariablesView






I am curently working on extending the eclipse JDT debugger to support 
debugging capabilities for Graphics objects, such that Graphics 
represented by the object is displayed when they are selected in the 
Graphics Expressions View (extends VariablesView similar to Expression 
View). I have extended the VariablesView to provide support for displaying 
graphics for graphics object. I have hindered with a problem wherein I am 
trying to invoke methods on IValue (in my case IJDIObjectValue), using 
sendMessage() method. I have all information other than the current thread 
reference. I wanted to know if there is any means to get access to the 
current thread reference from the VariablesView in JDT Debugger. I 
understand that at the VariablesView level there is only information about 
the DebugElement which does not have the ThreadReference which is passed 
to the Debug listener. I know that this can be accomplished by creating a 
new debug listener and providing the associated information at runtime, 
but since I would like to re-use most of the already existing Eclipse 
funtionality I would like to know if I can access the current thread 
somehow. When I try to get the Current Thread for the IJDIObjectValue 
using getUnderlyingObject().owningThr
ead() it returns null. 
Any inputs or suggestions are welcome.

Mangai_______________________________________________
jdt-debug-dev mailing list
jdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-debug-dev




Back to the top