Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344918 - Bug between facets and customizations : BasicIndexOutOfBoundsException
Summary: Bug between facets and customizations : BasicIndexOutOfBoundsException
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 critical (vote)
Target Milestone: ---   Edit
Assignee: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 03:33 EDT by Vincent Lorenzo CLA
Modified: 2020-05-01 11:26 EDT (History)
3 users (show)

See Also:
gdupe: indigo+


Attachments
Patch for Bug 344918 (1.81 KB, patch)
2011-05-10 03:56 EDT, Nicolas Guyomar CLA
gdupe: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2011-05-06 03:33:26 EDT
In order to reproduce this bug, I use the example : Open Ecore Tabular Editor
1/Use the action Open Ecore Tabular Editor on a EPackage
	-> columns facets are loaded, it's Ok
2/Apply a new customization on the table : for example _example_Ecore_HideFacetColumn
	-> You get an Exception (see below)
	-> On of the facet is unloaded

I get this exception : 
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=29, size=29
	at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
	at java.util.Collections$UnmodifiableList.get(Unknown Source)
	at org.eclipse.emf.facet.widgets.nattable.internal.painter.CustomizedCellPainter.paintCell(CustomizedCellPainter.java:99)
	at net.sourceforge.nattable.painter.layer.CellLayerPainter.paintCell(CellLayerPainter.java:60)
	at net.sourceforge.nattable.selection.SelectionLayerPainter.paintCell(SelectionLayerPainter.java:123)
	at net.sourceforge.nattable.painter.layer.CellLayerPainter.paintLayer(CellLayerPainter.java:33)
	at net.sourceforge.nattable.painter.layer.GridLineCellLayerPainter.paintLayer(GridLineCellLayerPainter.java:16)
	at net.sourceforge.nattable.selection.SelectionLayerPainter.paintLayer(SelectionLayerPainter.java:34)
	at net.sourceforge.nattable.layer.CompositeLayer$CompositeLayerPainter.paintLayer(CompositeLayer.java:884)
	at net.sourceforge.nattable.NatTable$NatLayerPainter.paintLayer(NatTable.java:651)
	at net.sourceforge.nattable.NatTable.paintNatTable(NatTable.java:292)
	at net.sourceforge.nattable.NatTable.paintControl(NatTable.java:288)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:229)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1564)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4568)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4970)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2525)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3737)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	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:123)
	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(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: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)
Error while painting table: index=29, size=29
Comment 1 Nicolas Guyomar CLA 2011-05-10 03:56:49 EDT
Created attachment 195179 [details]
Patch for Bug 344918

Hi,

Please find attached a patch to fix this bug.
Facets were not correctly applied before processing customizations.

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 2 Nicolas Guyomar CLA 2011-05-10 09:05:27 EDT
Hi,

This patch cannot be tested properly with an SWTBot one because the 
LoadCustomization dialog (cause of the initial problem) is implemented in a way that prevent us to use it with a bot. It should be be implemented as an action, but as a usual Dialog (such as the SelectColumnToHideDialog)

Regards,
Nicolas Guyomar
Comment 3 Gregoire Dupe CLA 2011-05-10 09:13:08 EDT
Comment on attachment 195179 [details]
Patch for Bug 344918

Here is a contribution from one employee of Mia-Software, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

I've committed this contribution.

Committed revision 640.
Comment 4 Gregoire Dupe CLA 2011-05-10 09:13:57 EDT
This bug can be marked as fixed.
Comment 5 Vincent Lorenzo CLA 2011-06-09 04:34:36 EDT
This bug can be marked as closed