From: Jan S. <st...@us...> - 2002-02-26 00:49:17
|
Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/data In directory usw-pr-cvs1:/tmp/cvs-serv8238 Modified Files: Session.java Log Message: Refactoring of Create snapshot action. Index: Session.java =================================================================== RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/data/Session.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** Session.java 14 Oct 2001 22:18:16 -0000 1.1.1.1 --- Session.java 26 Feb 2002 00:49:14 -0000 1.2 *************** *** 2,7 **** * Sun Public License Notice * ! * The contents of this file are subject to the Sun Public License Version ! * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * --- 2,7 ---- * Sun Public License Notice * ! * The contents of this file are subject to the Sun Public License Version ! * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * *************** *** 21,24 **** --- 21,29 ---- package net.sourceforge.javaprofiler.module.data; + import java.text.MessageFormat; + + import org.openide.util.NbBundle; + + import net.sourceforge.javaprofiler.jpi.Snapshot; import net.sourceforge.javaprofiler.jpi.VirtualMachine; *************** *** 35,38 **** --- 40,45 ---- /** Mirror of the virtual machine. */ private VirtualMachine vm; + /** No. of snapshots created from this session. */ + private int snapshots=0; /** *************** *** 74,82 **** return vm; } ! } /* * $Log$ * Revision 1.1.1.1 2001/10/14 22:18:16 stolis * The very first version of profiler module. --- 81,104 ---- return vm; } ! ! /** ! * Creates snapshot from this session. ! */ ! public void createSnapshot() { ! Snapshot snapshot=getVM().createSnapshot(); ! String name=MessageFormat.format( ! NbBundle.getBundle(Session.class).getString("LBL_snapshot"), ! new Object[] {new Integer(++snapshots), getName()}); ! snapshot.setName(name); ! ProfilerData.getData().addSnapshot(new net.sourceforge.javaprofiler.module.data.Snapshot(snapshot)); ! } ! } /* * $Log$ + * Revision 1.2 2002/02/26 00:49:14 stolis + * Refactoring of Create snapshot action. + * * Revision 1.1.1.1 2001/10/14 22:18:16 stolis * The very first version of profiler module. |