FileDialog fileDialog = new FileDialog(parent,SWT.SINGLE|SWT.SAVE);
fileDialog.setFileName(request.getFileName());
fileDialog.setText("Select Destination to save received file.");
String file = fileDialog.open();
if(file == null) return;
IncomingFileTransfer fileTransfer = request.accept();
try {
fileTransfer.recieveFile(new File(file));
FileTransferUtil.showProgressMonitor(parent,fileTransfer,"Receiving file " + request.getFileName());
} catch (Exception e) {
throw new RuntimeException("Error while receiving file: " + e.getLocalizedMessage(),e);
}
}