Community
Participate
Working Groups
20021217 win 2000 1. Insert a disk in the floppy drive, for the file explorer select a file and copy to clipboard. 2. remove the floppy disk. start eclipse while booting you suddently get a dialog: 'There is no disk in the drive. Please insert a disk into drive A:' Get a stack trace usning CTRL + BREAK: PasteResourcesFromClipboardAction is the cause. This looks also like a performance issue. (E.g. if could take minutes if the drive is a network drive that is disconnected) at java.io.Win32FileSystem.getBooleanAttributes(Native Method) at java.io.File.exists(File.java:562) at org.eclipse.jdt.internal.ui.reorg.PasteResourcesFromClipboardAction.allFilesExis t(PasteResourcesFromClipboardAction.java:145) at org.eclipse.jdt.internal.ui.reorg.PasteResourcesFromClipboardAction.canPasteFile s(PasteResourcesFromClipboardAction.java:154) at org.eclipse.jdt.internal.ui.reorg.PasteResourcesFromClipboardAction.canOperateOn (PasteResourcesFromClipboardAction.java:106) at org.eclipse.jdt.internal.ui.reorg.PasteResourcesFromClipboardAction.selectionCha nged(PasteResourcesFromClipboardAction.java:48) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:181) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged (SelectionDispatchAction.java:176) at org.eclipse.jdt.internal.ui.reorg.DualReorgAction.selectionChanged (DualReorgAction.java:40) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:148) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1151) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:900) at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:343) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.restoreSelectionStat e(PackageExplorerPart.java:804) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.restoreUIState (PackageExplorerPart.java:763) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.createPartControl (PackageExplorerPart.java:306) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:135) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:852) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:133) at org.eclipse.ui.internal.ViewPane.createChildControl (ViewPane.java:202) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:177) at org.eclipse.ui.internal.ViewPane.createControl(ViewPane.java:181) at org.eclipse.ui.internal.PartTabFolder.createPartTab (PartTabFolder.java:251) at org.eclipse.ui.internal.PartTabFolder.createControl (PartTabFolder.java:223) at org.eclipse.ui.internal.PartSashContainer.createControl (PartSashContainer.java:181) at org.eclipse.ui.internal.PerspectivePresentation.activate (PerspectivePresentation.java:94) at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:665) at org.eclipse.ui.internal.WorkbenchPage.onActivate (WorkbenchPage.java:1633) at org.eclipse.ui.internal.WorkbenchWindow$7.run (WorkbenchWindow.java:1283) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:65) at org.eclipse.ui.internal.WorkbenchWindow.setActivePage (WorkbenchWindow.java:1270) at org.eclipse.ui.internal.WorkbenchWindow.restoreState (WorkbenchWindow.java:1153) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1300) at org.eclipse.ui.internal.Workbench.access$9(Workbench.java:1269) at org.eclipse.ui.internal.Workbench$10.run(Workbench.java:923) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:852) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.ui.internal.Workbench.openPreviousWorkbenchState (Workbench.java:875) at org.eclipse.ui.internal.Workbench.init(Workbench.java:675) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1422) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
this code is an equivalen of workbench code in PasteAction, which checks that all files on the clipbard exist which was to fix bug 25137 and bug 16129 asking platform for comment on what we should do here (by looking at the code of PasteAction, it has the same problem)
This could have an impact on performance even if you just have a large number of local files in the clipboard. I would suggest taking out the existing check in the selection change callback for the action. CopyFilesAndFoldersOperation should just check all source files for existence when importing or copying and display an error message listing them all. It currently only displays the first missing file.
Moving back to JDT UI. Reopened UI bug 16129 to track this on our side.
i'll make this one depend on bug 16129 for easier tracking
actually, as far as i understand i need to just remove the exists() check and because i call CopyFilesAndFoldersOperation.copyFiles i will be just fine when bug 16129 is fixed i will remove the check right now actually - please fix bug 16129
closing as fixed on this side