This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 418254 - [EditorMgmt] [KeyBindings] Ctrl+E and Delete causes IllegalArgumentException
Summary: [EditorMgmt] [KeyBindings] Ctrl+E and Delete causes IllegalArgumentException
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal with 3 votes (vote)
Target Milestone: 4.4 M4   Edit
Assignee: Dani Megert CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
: 380138 418886 419786 420031 421036 421260 421474 421769 422123 424120 431079 (view as bug list)
Depends on:
Blocks: 422152
  Show dependency tree
 
Reported: 2013-09-28 13:45 EDT by Mohsen Saboorian CLA
Modified: 2014-03-25 11:09 EDT (History)
17 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohsen Saboorian CLA 2013-09-28 13:45:18 EDT
After updating my Kepler Eclipse 4.3.0 to Service Release 1, pressing Ctrl+E (show list of opened editor) and pressing Delete button causes this problem. It was buggy with 4.3.0 as well but the bug differed a bit. With 4.3.0, when you pressed Delete on an item of Ctrl+E list, it's name was cleared in the list, but it's place in the list kept empty and it was like the item is not deleted from the list, just its name was renamed to empty string in the list.


What steps will reproduce the problem?
1. Open as many Java editor as you can, so that small icon appears at the right side of editor tabs.
2. Press Ctrl+E
3. Press Del. on an item


-- Error Details --
Date: Sat Sep 28 20:52:10 IRST 2013
Message: Problems occurred when invoking code from plug-in: "org.eclipse.jface".
Severity: Error
Product: Eclipse 2.0.1.20130919-0803 (org.eclipse.epp.package.jee.product)
Plugin: org.eclipse.jface
Session Data:
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

Exception Stack Trace:
java.lang.IllegalArgumentException: 
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElementsRecursive(ModelServiceImpl.java:286)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElements(ModelServiceImpl.java:371)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.findItemForPart(StackRenderer.java:748)
	at org.eclipse.e4.ui.internal.workbench.renderers.swt.BasicPartList$BasicStackListLabelProvider.getFont(BasicPartList.java:66)
	at org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnLabelProvider.java:41)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
	at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:400)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2167)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:712)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:650)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:637)
	at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1508)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1506)
	at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:544)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1465)
	at org.eclipse.e4.ui.internal.workbench.renderers.swt.AbstractTableInformationControl.removeSelectedItems(AbstractTableInformationControl.java:318)
	at org.eclipse.e4.ui.internal.workbench.renderers.swt.AbstractTableInformationControl$1.keyPressed(AbstractTableInformationControl.java:138)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
	at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1827)
	at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4975)
	at org.eclipse.swt.widgets.Table.WM_KEYDOWN(Table.java:6006)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4643)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5919)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4990)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Comment 1 Wojciech Sudol CLA 2013-10-08 07:28:25 EDT
*** Bug 418886 has been marked as a duplicate of this bug. ***
Comment 2 Wojciech Sudol CLA 2013-10-18 02:26:56 EDT
*** Bug 419786 has been marked as a duplicate of this bug. ***
Comment 3 Martin Mathew CLA 2013-11-04 23:47:11 EST
*** Bug 421036 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2013-11-05 06:48:38 EST
*** Bug 420031 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2013-11-05 06:50:56 EST
Eric, this is a regression from 4.3 and should be looked at.
Comment 6 Eric Moffatt CLA 2013-11-06 09:57:33 EST
Committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=a4948bfde0d278c49f6d440a68ee1b55ac9a7935

This just safes up the 'findItemForPart' to ensure that we don't try to find items for parts that aren't visible. The cause of the defect is that the delete removed the part from the model meaning that we failed because we couldn't find a window for the part.

Also committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1654dfd27b25767d6924034be42b81f35d27761c

Which adds an extra safety check where the original defect actually IAE'd.
Comment 7 Dani Megert CLA 2013-11-07 03:52:57 EST
The real issue is that the pop-up tries to render the removed element. With your changes, the IAE is gone, but now the deleted element stays in the pop-up without a label.
Comment 8 Stuart Johnston CLA 2013-11-07 04:08:46 EST
The behaviour of the deleted editor remaining in the popup without a label, after deletion, has been present for many version (pre 4.x). The IAE was new with 4.3.1, however.
Comment 9 Dani Megert CLA 2013-11-07 04:18:27 EST
(In reply to Stuart Johnston from comment #8)
> The behaviour of the deleted editor remaining in the popup without a label,
> after deletion, has been present for many version (pre 4.x).
                                                     ^^^^^^^
Yes, it has been present in *some* 4.x downloads, BUT:
- in 3.8.2 [1] (and previous versions) it works just fine
- in 4.0 Ctrl+E wasn't even implemented

[1] http://archive.eclipse.org/eclipse/downloads/drops/R-3.8.2-201301310800/
Comment 10 Dani Megert CLA 2013-11-07 05:52:41 EST
Fixed with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b0c66624c7e5570003fc05ae3fe0b9be9882ad49


Eric, this fix also works without your changes, but they still make sense - I think. Please double-check.
Comment 11 Paul Webster CLA 2013-11-07 09:31:31 EST
(In reply to Dani Megert from comment #10)
> Fixed with
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=b0c66624c7e5570003fc05ae3fe0b9be9882ad49

This is Bug 380138

PW
Comment 12 Paul Webster CLA 2013-11-07 10:38:30 EST
*** Bug 421260 has been marked as a duplicate of this bug. ***
Comment 13 Dani Megert CLA 2013-11-07 11:35:08 EST
*** Bug 380138 has been marked as a duplicate of this bug. ***
Comment 14 Paul Webster CLA 2013-11-11 13:25:18 EST
*** Bug 421474 has been marked as a duplicate of this bug. ***
Comment 15 Paul Webster CLA 2013-11-20 10:00:25 EST
*** Bug 422123 has been marked as a duplicate of this bug. ***
Comment 16 Dani Megert CLA 2013-12-10 09:49:43 EST
Verified in I20131209-2000.
Comment 17 Eric Moffatt CLA 2013-12-10 14:15:07 EST
Dani / Paul, do you think it's worth re-opening this for a deeper look or is it an unlikely enough corner case to leave as is ?
Comment 18 Eric Moffatt CLA 2013-12-10 14:29:49 EST
My previous comment was actually against bug 421170 but still may be applicable here. (is this a DUP?)
Comment 19 Paul Webster CLA 2013-12-11 16:35:09 EST
*** Bug 421769 has been marked as a duplicate of this bug. ***
Comment 20 Wojciech Sudol CLA 2013-12-16 08:18:36 EST
*** Bug 424120 has been marked as a duplicate of this bug. ***
Comment 21 Aaron Digulla CLA 2014-02-13 04:56:55 EST
Will this fix be part of 4.3.2?
Comment 22 Dani Megert CLA 2014-02-13 05:58:55 EST
(In reply to Aaron Digulla from comment #21)
> Will this fix be part of 4.3.2?

Yes, it got backported via bug 422152.
Comment 23 Dani Megert CLA 2014-03-25 11:09:19 EDT
*** Bug 431079 has been marked as a duplicate of this bug. ***