Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337983 - Pressing delete with no entries in dependencies view throws exception
Summary: Pressing delete with no entries in dependencies view throws exception
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P5 normal (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 10:25 EST by Curtis Windatt CLA
Modified: 2011-05-16 17:34 EDT (History)
2 users (show)

See Also:
ankur_sharma: review+


Attachments
Fix (2.13 KB, patch)
2011-05-04 12:57 EDT, Curtis Windatt CLA
no flags Details | Diff
mylyn/context/zip (7.17 KB, application/octet-stream)
2011-05-04 12:57 EDT, Curtis Windatt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2011-02-23 10:25:47 EST
1) Open manifest editor to dependencies page
2) Select a requied bundle
3) Hit delete
4) Continue hitting delete key
Result:
Pressing delete with no entries will throw the following:

java.lang.ArrayIndexOutOfBoundsException: 0
	at org.eclipse.pde.internal.ui.editor.plugin.ExtensionsSection.modelChanged(ExtensionsSection.java:658)
	at org.eclipse.pde.internal.core.AbstractModel.fireModelChanged(AbstractModel.java:77)
	at org.eclipse.pde.internal.core.bundle.BundlePluginModelBase.fireModelChanged(BundlePluginModelBase.java:144)
	at org.eclipse.pde.internal.core.bundle.BundlePluginBase.fireStructureChanged(BundlePluginBase.java:483)
	at org.eclipse.pde.internal.core.bundle.BundlePluginBase.remove(BundlePluginBase.java:306)
	at org.eclipse.pde.internal.ui.editor.plugin.RequiresSection.removeImports(RequiresSection.java:374)
	at org.eclipse.pde.internal.ui.editor.plugin.RequiresSection.handleRemove(RequiresSection.java:365)
	at org.eclipse.pde.internal.ui.editor.plugin.RequiresSection.doGlobalAction(RequiresSection.java:230)
	at org.eclipse.pde.internal.ui.editor.PDEFormPage.performGlobalAction(PDEFormPage.java:155)
	at org.eclipse.pde.internal.ui.editor.PDEFormEditor.performGlobalAction(PDEFormEditor.java:796)
	at org.eclipse.pde.internal.ui.editor.PDEFormEditorContributor$GlobalAction.run(PDEFormEditorContributor.java:56)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
	at org.eclipse.ui.internal.keys.OutOfOrderListener.handleEvent(OutOfOrderListener.java:76)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1294)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:730)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2977)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:734)
	at org.eclipse.swt.widgets.Table.gtk_key_press_event(Table.java:1968)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1743)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4964)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:3652)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4369)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8256)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1239)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2258)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3168)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2697)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2661)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2495)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)



We should check that other tables in the editor don't have the same behaviour.
Comment 1 Dani Megert CLA 2011-03-21 11:35:48 EDT
Curtis, if you want this as 'polish' item then please add it to http://wiki.eclipse.org/index.php/Polish3.7.
Comment 2 Curtis Windatt CLA 2011-03-21 13:09:37 EDT
This doesn't need to go on the polish list.  Just something to look at if there is time.  Could easily be done in RC1.
Comment 3 Curtis Windatt CLA 2011-05-04 12:57:35 EDT
Created attachment 194741 [details]
Fix
Comment 4 Curtis Windatt CLA 2011-05-04 12:57:37 EDT
Created attachment 194742 [details]
mylyn/context/zip
Comment 5 Curtis Windatt CLA 2011-05-04 12:58:16 EDT
Patch just adds a check for an empty selection.

Ankur, please review and commit for RC1.
Comment 6 Ankur Sharma CLA 2011-05-05 02:20:45 EDT
Applied in HEAD
Comment 7 Curtis Windatt CLA 2011-05-16 17:34:59 EDT
Verified in I20110514-0800