Bug 327

Summary: ArrayIndexOutOfBounds in PDE plugin.xml editor (1GKKMMG)
Product: [Eclipse Project] PDE Reporter: Veronika Irvine <veronika_irvine>
Component: UIAssignee: Dejan Glozic <dejan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Veronika Irvine CLA 2001-10-10 21:40:13 EDT
Create a PDE Plugin-project using the PDE Default Plugin Generator.
Edit the plugin.xml file.
Click on the "Runtime" tab.
Do NOT select anything in the "runtime" libraries list.
(the problem happens regardless of the number of items in the list.)
Click on the Up or Down button beside the Runtime libraries list.

Note you get the following exception:

Unhandled exception caught in event loop.
Reason: -1

Log: Mon Sep 24 14:49:06 EDT 2001
1 org.eclipse.core.resources 4 Unhandled exception caught in event loop.
Log: Mon Sep 24 14:49:06 EDT 2001
4 org.eclipse.ui 0 -1
java.lang.ArrayIndexOutOfBoundsException: -1
	at org.eclipse.pde.internal.editor.manifest.LibrarySection.handleUp(LibrarySection.java:288)
	at org.eclipse.pde.internal.editor.manifest.LibrarySection.access$5(LibrarySection.java:283)
	at org.eclipse.pde.internal.editor.manifest.LibrarySection$5.widgetSelected(LibrarySection.java:193)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:85)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.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:658)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:815)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
	at org.eclipse.core.launcher.Main.run(Main.java:433)
	at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)


NOTES:
Comment 1 DJ Houghton CLA 2001-10-24 07:08:55 EDT
PRODUCT VERSION:
0.136a
Windows 2000

Comment 2 Dejan Glozic CLA 2001-12-02 18:42:29 EST
Buttons should have been disabled initially, and enabled conditionally if
Up or Down action is valid in the context. Fixed.