* @since 2.0
*/
public FileReceiverUI getFileReceiverUI(EclipseFileTransfer transfer, FileTransferParams params) {
return new FileReceiverUI() {
public void receiveStart(ID from, File aFile, long length, float rate) {
final IUser user = getUserForID(from);
String nick = Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
if (user != null) {
nick = user.getNickname();
}
showRawLine(from, NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVING, nick, aFile.getName()), null);
}
public void receiveData(ID from, File aFile, int dataLength) {
}
public void receiveDone(ID from, File aFile, Exception e) {
final IUser user = getUserForID(from);
String nick = Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
if (user != null) {
nick = user.getNickname();
}
showRawLine(from, NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVED, new Object[] {aFile.getName(), nick, getLocalFullDownloadPath()}), null);
refreshProject();
}
};