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 (from parent 1:
4dd6a77
)
Use id hash to add pdb mappings back to alignment
author
amwaterhouse
<Andrew Waterhouse>
Mon, 7 May 2007 13:58:17 +0000
(13:58 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Mon, 7 May 2007 13:58:17 +0000
(13:58 +0000)
src/jalview/gui/Jalview2XML.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/Jalview2XML.java
b/src/jalview/gui/Jalview2XML.java
index
48ba7f0
..
9bf6a21
100755
(executable)
--- a/
src/jalview/gui/Jalview2XML.java
+++ b/
src/jalview/gui/Jalview2XML.java
@@
-986,6
+986,8
@@
public class Jalview2XML
Hashtable gatherToThisFrame = new Hashtable();
Hashtable gatherToThisFrame = new Hashtable();
+ String errorMessage = null;
+
try
{
//UNMARSHALLER SEEMS TO CLOSE JARINPUTSTREAM, MOST ANNOYING
try
{
//UNMARSHALLER SEEMS TO CLOSE JARINPUTSTREAM, MOST ANNOYING
@@
-1040,22
+1042,19
@@
public class Jalview2XML
}
while (jarentry != null);
}
}
while (jarentry != null);
}
+ catch(java.io.FileNotFoundException ex)
+ {
+ ex.printStackTrace();
+ errorMessage = "Couldn't locate Jalview XML file : "+file;
+ System.err.println("Exception whilst loading jalview XML file : " +
+ ex + "\n");
+ }
catch (java.net.UnknownHostException ex)
{
ex.printStackTrace();
catch (java.net.UnknownHostException ex)
{
ex.printStackTrace();
- System.err.println("Couldn't locate Jalview XML file : " +
+ errorMessage = "Couldn't locate Jalview XML file : " +file;
+ System.err.println("Exception whilst loading jalview XML file : " +
ex + "\n");
ex + "\n");
-
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Couldn't locate " + file,
- "URL not found",
- JOptionPane.WARNING_MESSAGE);
- }
- });
}
catch (Exception ex)
{
}
catch (Exception ex)
{
@@
-1071,17
+1070,6
@@
public class Jalview2XML
System.err.println("Exception whilst loading jalview XML file : " +
ex + "\n");
System.err.println("Exception whilst loading jalview XML file : " +
ex + "\n");
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
-
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Error loading " + file,
- "Error loading Jalview file",
- JOptionPane.WARNING_MESSAGE);
- }
- });
}
if (Desktop.instance != null)
}
if (Desktop.instance != null)
@@
-1096,6
+1084,21
@@
public class Jalview2XML
(AlignFrame) en.nextElement());
}
(AlignFrame) en.nextElement());
}
+ if(errorMessage!=null)
+ {
+ final String finalErrorMessage = errorMessage;
+ javax.swing.SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,
+ finalErrorMessage,
+ "Error loading Jalview file",
+ JOptionPane.WARNING_MESSAGE);
+ }
+ });
+ }
+
return af;
}
return af;
}
@@
-1906,9
+1909,11
@@
public class Jalview2XML
String pdbFile = loadPDBFile(file, ids[p].getId());
String pdbFile = loadPDBFile(file, ids[p].getId());
- jalview.datamodel.SequenceI[] seq = new jalview.datamodel.SequenceI[]
+ jalview.datamodel.SequenceI[] seq = new jalview.datamodel.
+ SequenceI[]
{
{
- al.getSequenceAt(i)};
+ (jalview.datamodel.SequenceI)
+ seqRefIds.get(JSEQ[i].getId()+"")};
if (comp == null)
if (comp == null)