Community
Participate
Working Groups
Created attachment 76448 [details] RCP application that demonstrates the problem Build ID: I20070621-1340 Steps To Reproduce: 1. Run the attached RCP app 2. Click the only button An editor and error log should appear. 3. Click on 'item' in the editor The following exception appears in the log: java.lang.ArrayIndexOutOfBoundsException: 1 at org.eclipse.jface.viewers.ColumnViewer$2.canEdit(ColumnViewer.java:236) at org.eclipse.jface.viewers.ColumnViewerEditor.activateCellEditor(ColumnViewerEditor.java:147) at org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorActivationEvent(ColumnViewerEditor.java:367) at org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivationEvent(ColumnViewer.java:637) at org.eclipse.jface.viewers.ColumnViewer.handleMouseDown(ColumnViewer.java:621) at org.eclipse.jface.viewers.ColumnViewer.access$0(ColumnViewer.java:617) at org.eclipse.jface.viewers.ColumnViewer$1.mouseDown(ColumnViewer.java:108) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:178) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at columnviewer.Application.start(Application.java:14) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) 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:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) at org.eclipse.equinox.launcher.Main.main(Main.java:1144) More information: The issue here is that the ColumnViewer's EditingSupport has a fixed columnIndex, which becomes wrong if a preceding column is disposed.
Created attachment 76472 [details] Fix We need to clear all legacy editing supports
Is this a 3.3.1 candidate?
Created attachment 76572 [details] Patch without needless DisposeEvent
Created attachment 76573 [details] mylyn/context/zip
Created attachment 76574 [details] Patch with Test-Case
Created attachment 76575 [details] mylyn/context/zip
Created attachment 76817 [details] More fixes => Fix against AIOB-Exceptions => Added check-method that only Legacy-Support-Instances are cleared
Created attachment 76818 [details] mylyn/context/zip
+1 for 3.3.1 (and HEAD)
Released to R3_3_maintenance >= 20070831
Integration for 3.4 is done in bug #201905
Sideeffects in complete Suite: - Widget Diposed on WinXP - NPE on OS-X
Ok. Current state CVS 3_3_maint-state is that we fixed the ArrayIndexOutOfBoundsException. The real fix (clearing the editors) to the problem produced failing tests. Removing target for now because we might (very likely) miss 3.3.1 cut off
What would be if we would recreate the editor every time when we are in legacy mode?
Created attachment 77833 [details] Patcht This way tests on WinXP passes
And the OS-X seems to be green too (well the suite is not green but the failing tests can have nothing to do with the change with the patch)
Created attachment 77891 [details] Patch for 3.3.1
The patch looks good, so +1 from me for 3.3.1 but we would need a separate bugzilla for it, and we should run the test suite on Windows, GTK, and the Mac to make sure there are no surprises. :)
Right, this is the bug for 3.3.1. Sorry for causing confusion.
Released to 3_3_1_maint >= 20070907
... and marking fixed
+1 from me but this methods need comments - it is not at all clear why this is being done just from the code.
(In reply to comment #22) > +1 from me but this methods need comments - it is not at all clear why this is > being done just from the code. > /** * Clear all cell-editors setup for backwards compatibility in * {@link #setupEditingSupport(int, ViewerColumn)}. This has to be done * whenever a column is disposed because the index cached when the anonymous * class is created has to be readjusted */ ?
That looks fine Tom.
added comment in CVS
Bug200558 test had an unused private class that I deleted as it was generating build warnings.
- Verified in M20070913-1500 - Integration in CVS-HEAD is done in bug #201905