[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Sun Apr 18 00:33:05 UTC 2010


gordonp
Sat Apr 17 20:33:05 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv28070/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobySaveDialog.java 
Log Message:
Stripped seahawk preocessing instructions from saved XML as they can confuse on reload.  Workflow export is default save option now.
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobySaveDialog.java,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java	2010/03/29 19:53:16	1.8
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java	2010/04/18 00:33:05	1.9
@@ -92,11 +92,11 @@
 		    fileChooser.setName(FILE_CHOOSER_SAVE_TITLE);
 		    fileChooser.setFileHidingEnabled(false);
 		    fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
-		    fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(HTML_EXT, HTML_DESC));
 		    if(document.hasXMLSource()){
 			fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(T2FLOW_EXT, T2FLOW_DESC));
 			fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(XML_EXT, XML_DESC));
 		    }
+		    fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(HTML_EXT, HTML_DESC));
 		    fileChooser.setAcceptAllFileFilterUsed(false);
 		    if(lastDirOpened != null){
 			fileChooser.setCurrentDirectory(lastDirOpened);
@@ -318,7 +318,9 @@
 		    try {
 			OutputStream ostream = new FileOutputStream(f);
 			String xml = document.getXMLSource();
-			ostream.write(xml.getBytes());
+			// Before saving, strip out the Seahawk processing instructions, which will 
+			// confuse Seahawk if we reload the XML doc later.
+			ostream.write(xml.replaceAll("<\\?"+DataUtils.PI_TARGET+".*?\\?>","").getBytes());
 			ostream.flush();
 			ostream.close();
 		    } catch (Exception ex) {




More information about the MOBY-guts mailing list