- if (pdbfile.id == null)
- {
- String reply = null;
-
- if (prompt)
- {
- reply = JOptionPane.showInternalInputDialog(Desktop.desktop,
- MessageManager
- .getString("label.couldnt_find_pdb_id_in_file"),
- MessageManager.getString("label.no_pdb_id_in_file"),
- JOptionPane.QUESTION_MESSAGE);
- }
- if (reply == null)
- {
- return null;
- }
-
- entry.setId(reply);
- }
- else
+ 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)