Reading value programmertically from IJavaVariable instance [message #1786972] |
Wed, 16 May 2018 16:54 |
Gayan Perera Messages: 9 Registered: July 2009 |
Junior Member |
|
|
Hi I'm implementing a plugin which can Dump a debug variable value as a JSON file. Up to now i was able to add a action into right click menu of the debug variable view. But i'm stuck at reading the actual value from IJavaVariable instance in the selection.
@Override
public void run(IAction action) {
if(!selection.isEmpty() && selection instanceof TreeSelection) {
TreeSelection varSel = ((TreeSelection) selection);
Object obj = varSel.getFirstElement();
if(obj instanceof IJavaVariable) {
}
}
}
It will be really helpfull if someone can point me in the right direction how i can read the exact value from IJavaVariable so that i can create a JSON object out of it and dump to json file.
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.02440 seconds