{\r
// 1. Load the mapping information from the file\r
Mapping map = new Mapping(uni.getClass().getClassLoader());\r
- java.net.URL url = uni.getClass().getResource("/uniprot_mapping.xml");\r
+ java.net.URL url = getClass().getResource("/uniprot_mapping.xml");\r
map.loadMapping(url);\r
\r
// 2. Unmarshal the data\r
\r
}\r
\r
- if (unknownSequences.size() > 0)\r
- {\r
- int reply = javax.swing.JOptionPane.showInternalConfirmDialog(\r
- Desktop.desktop, "Couldn't find a match for "+unknownSequences.size()+" sequences."\r
- +"\nPerform blast for unknown sequences?",\r
- "Blast for Unidentified Sequences",\r
- javax.swing.JOptionPane.YES_NO_OPTION, javax.swing.JOptionPane.QUESTION_MESSAGE);\r
-\r
- if(reply == javax.swing.JOptionPane.YES_OPTION)\r
- new WSWUBlastClient(ap, align, unknownSequences);\r
- }\r
- else\r
- ((Alignment)dataset).featuresAdded = true;\r
+ promptBeforeBlast();\r
+\r
+ }\r
+\r
+\r
+ void promptBeforeBlast()\r
+ {\r
+ // This must be outside the run() body as java 1.5\r
+ // will not return any value from the OptionPane to the expired thread.\r
+ if (unknownSequences.size() > 0)\r
+ {\r
+ int reply = javax.swing.JOptionPane.showConfirmDialog(\r
+ Desktop.desktop, "Couldn't find a match for "+unknownSequences.size()+" sequences."\r
+ +"\nPerform blast for unknown sequences?",\r
+ "Blast for Unidentified Sequences",\r
+ javax.swing.JOptionPane.YES_NO_OPTION, javax.swing.JOptionPane.QUESTION_MESSAGE);\r
+\r
+ System.out.println("response ?? "+reply);\r
+ if(reply == javax.swing.JOptionPane.YES_OPTION)\r
+ new WSWUBlastClient(ap, align, unknownSequences);\r
+ }\r
+ else\r
+ ((Alignment)dataset).featuresAdded = true;\r
\r
\r
ap.repaint();\r
\r
void updateIds()\r
{\r
+ // This must be outside the run() body as java 1.5\r
+ // will not return any value from the OptionPane to the expired thread.\r
int reply = JOptionPane.showConfirmDialog(\r
Desktop.desktop, "Automatically update suggested ids?",\r
"Auto replace sequence ids", JOptionPane.YES_NO_OPTION);\r