-
- System.out.println("This is a annotation PDB");
-
-
- MCview.PDBfile pdbfile = new MCview.PDBfile(choice,
- protocol);
-
- if (pdbfile.id == null)
- {
- String reply = null;
-
- if (prompt) { reply = JOptionPane
- .showInternalInputDialog(
- Desktop.desktop,
- "Couldn't find a PDB id in the file supplied."
- + "Please enter an Id to identify this structure.",
- "No PDB Id in File", JOptionPane.QUESTION_MESSAGE);}
- if (reply == null)
- {
- return null;
- }
-
- entry.setId(reply);
- }
- else
- {
- entry.setId(pdbfile.id);
- }
-
- } catch (java.io.IOException ex)
+ // stacktrace already thrown so just return
+ return null;
+ }
+ String id = pdbfile.getId();
+ if (id == null && (id = (prompt
+ ? JvOptionPane.showInternalInputDialog(Desktop.getDesktopPane(),
+ MessageManager
+ .getString("label.couldnt_find_pdb_id_in_file"),
+ MessageManager.getString("label.no_pdb_id_in_file"),
+ JvOptionPane.QUESTION_MESSAGE)
+ : null)) == null)