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: 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
Previous Topic:Other Java Forum/Mailing-list
Next Topic:Simple compilation fails in Eclipse Oxygen.3a
Goto Forum:
  


Current Time: Thu Apr 25 06:33:11 GMT 2024

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

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

Back to the top