Bug 12461 - [Navigator] Internal error pasting in navigator with no selection
Summary: [Navigator] Internal error pasting in navigator with no selection
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 2.1   Edit
Assignee: Knut Radloff CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-03-28 14:30 EST by John Arthorne CLA
Modified: 2002-09-06 10:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2002-03-28 14:30:05 EST
Build 20020321

1) Select a file in the navigator
2) Right click -> Copy
3) Control-click the file to deselect it
4) Right click -> Paste

An internal error occurs, stack below.  At the time, I had the navigator focused 
on a particular folder, and I was hoping it would paste the file as a direct 
child of that folder (ie, the current root of the tree).

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.RangeCheck(ArrayList.java(Compiled Code))
	at java.util.ArrayList.get(ArrayList.java(Compiled Code))
	at 
org.eclipse.ui.views.navigator.PasteAction.getContainer(PasteAction.java:106)
	at org.eclipse.ui.views.navigator.PasteAction.run(PasteAction.java:80)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
	at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:407)
	at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContribu
tionItem.java(Compiled Code))
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled 
Code))
	at 
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled 
Code))
	at 
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:705)
	at 
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:77
7)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:196)
	at org.eclipse.core.launcher.Main.run(Main.java:555)
	at org.eclipse.core.launcher.Main.main(Main.java:396)
Comment 1 Randy Giffen CLA 2002-04-24 10:54:29 EDT
Disabled paste in this case.

Moving to later to consider pasting to the root aof the tree (the paste action 
currently only has access to the selection).
Comment 2 Randy Giffen CLA 2002-08-09 16:10:15 EDT
Reopen to investigate
Comment 3 Knut Radloff CLA 2002-09-06 10:38:41 EDT
Pasting when no item is selected in the Navigator should paste to the workspace 
root. This works when a project was copied to the clipboard. Files and folders 
can't be pasted to the workspace root so paste should be disabled in this case.