JFileChooser fc = new JFileChooser();
if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
boolean isLink = GenericAttachmentServiceItem.askForLink();
try {
ObjectManager.getInstance().setBusyCursor();
AttachmentServiceItem asi = new AttachmentServiceItem(fc.getSelectedFile(), isLink);
ServiceListTable.getActiveInstance().addItem(asi);
} catch (IOException ex) {
JOptionPane.showMessageDialog(ObjectManager.getInstance().getDatasoulMainForm(),
java.util.ResourceBundle.getBundle("datasoul/internationalize").getString("ERROR ATTACHING FILE:") + " " + fc.getSelectedFile().getName() + "\n" + ex.getLocalizedMessage());
} finally {