git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9156d2d
)
On 'save' menu entry check to see if fileformat is a valid output format and open...
author
jprocter
<Jim Procter>
Fri, 22 Feb 2008 16:29:56 +0000
(16:29 +0000)
committer
jprocter
<Jim Procter>
Fri, 22 Feb 2008 16:29:56 +0000
(16:29 +0000)
src/jalview/gui/AlignFrame.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/AlignFrame.java
b/src/jalview/gui/AlignFrame.java
index
b6e0f70
..
72691cc
100755
(executable)
--- a/
src/jalview/gui/AlignFrame.java
+++ b/
src/jalview/gui/AlignFrame.java
@@
-688,7
+688,7
@@
public class AlignFrame
public void save_actionPerformed(ActionEvent e)
{
if(fileName==null
public void save_actionPerformed(ActionEvent e)
{
if(fileName==null
- || currentFileFormat==null
+ || (currentFileFormat==null || jalview.io.AppletFormatAdapter.isValidFormat(currentFileFormat, true))
|| fileName.startsWith("http")
)
{
|| fileName.startsWith("http")
)
{
@@
-770,8
+770,18
@@
public class AlignFrame
}
else
}
else
- {
-
+ {
+ if (!jalview.io.AppletFormatAdapter.isValidFormat(format, true))
+ {
+ // JBPNote need to have a raise_gui flag here
+ JOptionPane.showInternalMessageDialog(
+ this, "Cannot save file " + fileName + " using format "+format,
+ "Alignment output format not supported",
+ JOptionPane.WARNING_MESSAGE);
+ saveAs_actionPerformed(null);
+ return false;
+ }
+
String[] omitHidden = null;
if (viewport.hasHiddenColumns)
String[] omitHidden = null;
if (viewport.hasHiddenColumns)
@@
-788,7
+798,6
@@
public class AlignFrame
}
}
FormatAdapter f = new FormatAdapter();
}
}
FormatAdapter f = new FormatAdapter();
-
String output = f.formatSequences(
format,
(Alignment) viewport.alignment, // class cast exceptions will occur in the distant future
String output = f.formatSequences(
format,
(Alignment) viewport.alignment, // class cast exceptions will occur in the distant future