From: Jan S. <st...@us...> - 2002-01-27 23:12:20
|
Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes In directory usw-pr-cvs1:/tmp/cvs-serv6633 Modified Files: SessionsNode.java Log Message: Children updated to keep track of snapshots, too. Index: SessionsNode.java =================================================================== RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes/SessionsNode.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** SessionsNode.java 2001/10/14 22:18:09 1.1.1.1 --- SessionsNode.java 2002/01/27 23:12:18 1.2 *************** *** 31,34 **** --- 31,35 ---- import net.sourceforge.javaprofiler.module.data.ProfilerData; import net.sourceforge.javaprofiler.module.data.Session; + import net.sourceforge.javaprofiler.module.data.Snapshot; /** *************** *** 69,78 **** public static class SessionsChildren extends Children.Keys { ! protected Node[] createNodes(Object key) { ! return new Node[]{new SessionNode((Session)key)}; } public void update() { ! setKeys(ProfilerData.getData().sessions()); } --- 70,88 ---- public static class SessionsChildren extends Children.Keys { ! protected Node[] createNodes(Object key) { ! if (key instanceof Session) { ! // key is Session ! return new Node[]{new SessionNode((Session)key)}; ! } else { ! // key is Snapshot ! return new Node[]{new SnapshotNode((Snapshot)key)}; ! } } public void update() { ! ProfilerData data=ProfilerData.getData(); ! Collection keySet=data.sessions(); ! keySet.addAll(data.snapshots()); ! setKeys(keySet); } *************** *** 83,86 **** --- 93,99 ---- /* * $Log$ + * Revision 1.2 2002/01/27 23:12:18 stolis + * Children updated to keep track of snapshots, too. + * * Revision 1.1.1.1 2001/10/14 22:18:09 stolis * The very first version of profiler module. |