List files= checkFiles(SWTUtil.getShell(event.widget),(String[])data, target.getLocation()); if (files.size() > 0) { Shell shell= JavaPlugin.getActiveWorkbenchShell();  ImportOperation op= new ImportOperation(target.getFullPath(), FileSystemStructureProvider.INSTANCE, this, files); op.setCreateContainerStructure(false);  ProgressMonitorDialog dialog= new ProgressMonitorDialog(shell);  try { dialog.run(true, true, op); } catch (InvocationTargetException e) { String title= PackagesMessages.getString("DropAdapter.errorTitle"); String message= PackagesMessages.getString("DropAdapter.errorMessage"); ExceptionHandler.handle(e, title, message); return; } catch (InterruptedException e) { return; }   IStatus status= op.getStatus(); if (! status.isOK()) { String title= PackagesMessages.getString("DropAdapter.errorTitle"); String message= PackagesMessages.getString("DropAdapter.errorMessage"); ErrorDialog.openError(shell, title, message, status, IStatus.ERROR | IStatus.WARNING); return; }  event.data= files.toArray(new String[files.size()]);  event.detail= DND.DROP_COPY; return; } else { event.data= null; return; }
new CopyFilesAndFoldersOperation(JavaPlugin.getActiveWorkbenchShell()).copyFiles((String[])data, target);  event.detail= DND.DROP_COPY;
	public void drop(Object dropTarget, DropTargetEvent event) {		int operation= event.detail;				event.detail= DND.DROP_NONE;		Object data= event.data;		if (data == null || operation != DND.DROP_COPY)			return;					IContainer target= null;		if (dropTarget instanceof IContainer) {			target= (IContainer)dropTarget;		} else {			try {				target= (IContainer)((IJavaElement)dropTarget).getCorrespondingResource();				} catch (JavaModelException e) {			}		}		if (target == null)			return;				List files= checkFiles(SWTUtil.getShell(event.widget),(String[])data, target.getLocation());		if (files.size() > 0) {			Shell shell= JavaPlugin.getActiveWorkbenchShell();						ImportOperation op= new ImportOperation(target.getFullPath(), FileSystemStructureProvider.INSTANCE, this, files);			op.setCreateContainerStructure(false);												ProgressMonitorDialog dialog= new ProgressMonitorDialog(shell);						try {				dialog.run(true, true, op);			} catch (InvocationTargetException e) {				String title= PackagesMessages.getString("DropAdapter.errorTitle"); //$NON-NLS-1$				String message= PackagesMessages.getString("DropAdapter.errorMessage"); //$NON-NLS-1$				ExceptionHandler.handle(e, title, message);				return;			} catch (InterruptedException e) {				return;			}			// Special case since ImportOperation doesn't throw a CoreException on			// failure.			IStatus status= op.getStatus();			if (! status.isOK()) {				String title= PackagesMessages.getString("DropAdapter.errorTitle"); //$NON-NLS-1$				String message= PackagesMessages.getString("DropAdapter.errorMessage"); //$NON-NLS-1$				ErrorDialog.openError(shell,					title,					message,					status, IStatus.ERROR | IStatus.WARNING);				return;			}			// The files we have really handled.			event.data= files.toArray(new String[files.size()]);			// Import always performs a copy.			event.detail= DND.DROP_COPY;			return;		} else {			event.data= null;			return;		}	}