1 | try {↵ | | 1 | try {↵
|
2 | String pluginID = (String) data.getData("Plugin.ID");↵ | | |
|
3 | IExtension extension = pluginHandler.getExtension(pluginID);↵ | | |
|
|
4 | i↵ | | 2 | List files = (List) data.getTransferData(DataFlavor.javaFileListFlavor);↵
|
| | | 3 | for (Iterator iterator = files.iterator(); iterator.hasNext();) {↵
|
|
| | | 4 | attachmentController.addFileAttachment((File) iterator.next());↵
|
| | | 5 | }↵
|
5 | mporter = (DefaultAddressbookImporter) extension↵ | | 6 | dataWasImported = ↵
|
6 | .instanciateExtension(args);↵ | | |
|
|
7 | importer.run();↵ | | |
|
8 | ↵ | | 7 | true;↵
|
| | | 8 | } catch (UnsupportedFlavorException e) {↵
|
| | | 9 | LOG.warning("A transferable with unsupported flavors tried to import data into the attachment gui.");↵
|
9 | } catch (Exception ex) {↵ | | 10 | } catch (IOException e) {↵
|
10 | ex.printStackTrace();↵ | | |
|
|
11 | if (ex.getCause() != null) {↵ | | |
|
12 | ex.getCause().printStackTrace();↵ | | |
|
13 | }↵ | | |
|
|
14 | return;↵ | | |
|
15 | ↵ | | 11 | LOG.warning("The data that was DnD into the attachment was no longer available.");↵
|
16 | } | | 12 | }
|