Bug 30543 [DND] Files deleted when dragged to mozilla
In the Resource or Java perspectives, after dragging an html file from the navigator to be viewed in Mozilla, the file is deleted from the Eclipse views and from the filesystem. Not true of IE 5.5 or Netscape 4.72 on the same machine. Versions: - Eclipse 2.0.2 - NT 4.0 SP6 - Mozilla 1.2.1
bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/navigator/NavigatorDragAdapter.java
ISelectionProvider selectionProvider;
	private static final String CHECK_MOVE_TITLE = ResourceNavigatorMessages.getString("DragAdapter.title"); 
	private static final String CHECK_DELETE_MESSAGE = ResourceNavigatorMessages.getString("DragAdapter.checkDeleteMessage"); 	
	/**
	 * Constructs a new drag adapter.
	 */
	public NavigatorDragAdapter(ISelectionProvider provider) {
		selectionProvider = provider;
	}
	/**
	 * @see DragSourceListener#dragFinished
	 */
	public void dragFinished(DragSourceEvent event) {
		LocalSelectionTransfer.getInstance().setSelection(null);
		if (event.doit == false) {
			return;
		}
		final int typeMask = IResource.FOLDER | IResource.FILE;
		if (event.detail == DND.DROP_MOVE) {
			IResource[] resources = getSelectedResources(typeMask);	
			DragSource dragSource = (DragSource) event.widget;
			Control control = dragSource.getControl();
			Shell shell = control.getShell();
			ReadOnlyStateChecker checker;
			
			if (resources == null || resources.length == 0)
				return;
			
			checker = new ReadOnlyStateChecker(shell, CHECK_MOVE_TITLE, CHECK_DELETE_MESSAGE);
			resources = checker.checkReadOnlyResources(resources);