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

This methods returns the value as IValue, is there any means to get the actual object from the IValue? I am currently stuck since I am not able to get want I need from the IValue. I guess I could get the ObjectReference and I need to get the corresponding object for the object reference. Does JDT Debug provide any means to get the actual runtime Object such as Image from the IValue?
 
Thanks
Mangai

 
On 3/27/07, Darin Wright <Darin_Wright@xxxxxxxxxx> wrote:
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


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


Back to the top