public void refresh() { Frame current = StackFactory.createFrame(myTask); // Work backwards through the frames // trying to find the one the value came from while(current != null) { if(current.getFrameIdentifier().equals(frameIdentifier)) break; current = current.getOuter(); } // If we couldn't find a matching frame, our variable is no longer available if(current == null) { myVar = null; return; } // We found the correct frame, now refresh the variable DebugInfo info = new DebugInfo(current); info.refresh(current); try { myVar = info.print(varLabel); } catch (NameNotFoundException e) { e.printStackTrace(); myVar = null; } catch (ParseException e) { e.printStackTrace(); myVar = null; } }