[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Project.java,1.46,1.47
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-03-21 17:01:21
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3477/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Cleaned structure of File Menu Code Fixed a large number of bugs in File menu Code (there are still bugs left) Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Project.java 20 Mar 2006 15:12:58 -0000 1.46 --- Project.java 21 Mar 2006 12:24:09 -0000 1.47 *************** *** 660,667 **** /** * Save to file * @param file The file to save to */ ! public void save(File file) { ! } --- 660,704 ---- /** * Save to file + * @exception Exception Thrown if an exception occurs * @param file The file to save to */ ! public void saveAs(File file) throws Exception { ! PersistenceManager.save(file); ! makeClean(); ! setSavePath(file.getCanonicalPath()); ! setDefaultPath(file.getParent()); ! } ! ! /** ! * Save to current save-path ! * @exception Exception Thrown if an exception occurs ! */ ! public void save() throws Exception { ! PersistenceManager.save(new File(getSavePath())); ! makeClean(); ! } ! ! /** ! * Load a file ! * @param file The file to load ! * @exception Exception Thrown if an exception occurs ! */ ! public void load(File file) throws Exception { ! Selection.primary().clear(); ! clear(); ! PersistenceManager.load(file); ! makeClean(); ! setSavePath(file.getCanonicalPath()); ! setDefaultPath(file.getParent()); ! } ! ! /** ! * Close the project ! */ ! public void close() { ! Selection.primary().clear(); ! clear(); ! makeClean(); ! setSavePath(null); } |