Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Reading value programmertically from IJavaVariable instance
Reading value programmertically from IJavaVariable instance [message #1786972] Wed, 16 May 2018 16:54
Gayan Perera is currently offline Gayan PereraFriend
Messages: 7
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
Previous Topic:Other Java Forum/Mailing-list
Next Topic:Simple compilation fails in Eclipse Oxygen.3a
Goto Forum:
  


Current Time: Sat Nov 17 06:23:30 GMT 2018

Powered by FUDForum. Page generated in 0.01856 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top