MCPcopy Create free account
hub / github.com/antlr/codebuff / updateAttributes

Method updateAttributes

output/java8/1.4.15/STViz.java:396–431  ·  view source on GitHub ↗
(final InstanceScope scope, final STViewFrame m)

Source from the content-addressed store, hash-verified

394 }
395
396 protected void updateAttributes(final InstanceScope scope, final STViewFrame m) {
397 //System.out.println("updateAttributes: "+Interpreter.getEnclosingInstanceStackString(scope) );
398 m.attributes.setModel(new JTreeScopeStackModel(scope));
399 m.attributes.setRootVisible(false);
400 m.attributes.setShowsRootHandles(true);
401 //System.out.println("add events="+ st.addAttrEvents);
402// ST st = scope.st;
403// final DefaultListModel attrModel = new DefaultListModel();
404// final Map<String,Object> attrs = st.getAttributes();
405// if ( attrs!=null ) {
406// for (String a : attrs.keySet()) {
407// if ( st.debugState!=null && st.debugState.addAttrEvents!=null ) {
408// List<AddAttributeEvent> events = st.debugState.addAttrEvents.get(a);
409// StringBuilder locations = new StringBuilder();
410// int i = 0;
411// if ( events!=null ) {
412// for (AddAttributeEvent ae : events) {
413// if ( i>0 ) locations.append(", ");
414// locations.append(ae.getFileName()+":"+ae.getLine());
415// i++;
416// }
417// }
418// if ( locations.length()>0 ) {
419// attrModel.addElement(a+" = "+attrs.get(a)+" @ "+locations.toString());
420// }
421// else {
422// attrModel.addElement(a+" = "+attrs.get(a));
423// }
424// }
425// else {
426// attrModel.addElement(a+" = "+attrs.get(a));
427// }
428// }
429// }
430// m.attributes.setModel(attrModel);
431 }
432
433 protected void updateStack(InstanceScope scope, STViewFrame m) {
434 List<ST> stack = Interpreter.getEnclosingInstanceStack(scope, true);

Callers 2

openMethod · 0.95
updateCurrentSTMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected