Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345593

Summary: Bug with Remove Line : exception + hidden columns appears
Product: z_Archived Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: EMF-FacetAssignee: Gregoire Dupe <gdupe>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: eclipse-bugzilla, gdupe, nicolas.guyomar
Version: unspecifiedFlags: gdupe: indigo+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 346465    
Bug Blocks:    
Attachments:
Description Flags
A plugin to open an empty table with hidden columns by default gdupe: iplog-

Description Vincent Lorenzo CLA 2011-05-12 09:01:53 EDT
Steps to reproduce : 
	1/ Create an empty table, with hidden columns by default
	2/ Drop an element in the table
	3/ Delete the line with your element
	4/ the hidden columns appears and I get the following exception : 
	!ENTRY org.eclipse.ui 4 0 2011-05-12 14:15:46.470
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0)
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4125)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3742)
	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)
Caused by: org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
	at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
	at org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget.getSelection(NatTableWidget.java:872)
	at org.eclipse.papyrus.table.common.internal.NatTableEditor.getSelection(NatTableEditor.java:336)
	at org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider.getSelection(MultiPageSelectionProvider.java:136)
	at org.eclipse.gmf.runtime.common.ui.action.AbstractContributionItem.getStructuredSelection(AbstractContributionItem.java:698)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.CustomContributionItem.getSelectedObjects(CustomContributionItem.java:187)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.CustomContributionItem.createOperationSet(CustomContributionItem.java:210)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.CustomContributionItem.getOperationSet(CustomContributionItem.java:197)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.CustomContributionItem.getCommand(CustomContributionItem.java:129)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.CustomContributionItem.getCommand(CustomContributionItem.java:120)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.CustomContributionItem.calculateEnabled(CustomContributionItem.java:85)
	at org.eclipse.gmf.runtime.common.ui.action.AbstractContributionItem.refresh(AbstractContributionItem.java:429)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.CustomContributionItem.refresh(CustomContributionItem.java:81)
	at org.eclipse.gmf.runtime.common.ui.action.AbstractContributionItem.update(AbstractContributionItem.java:416)
	at org.eclipse.gmf.runtime.common.ui.action.AbstractContributionItem$3.run(AbstractContributionItem.java:661)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	... 23 more
Comment 1 Nicolas Guyomar CLA 2011-05-13 05:11:15 EDT
Hi Vincent,

I do not really understand how I am supposed to reproduce this bug.

How do you create an empty table ? What do you mean by "with hidden columns by default" ?

Regards,
Nicolas Guyomar
Comment 2 Vincent Lorenzo CLA 2011-05-20 06:39:58 EDT
Created attachment 196198 [details]
A plugin to open an empty table with hidden columns by default

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Comment 3 Vincent Lorenzo CLA 2011-05-20 06:44:57 EDT
(In reply to comment #2)
This plugin allows to reproduce this bug : Steps to reproduce : 
1/ Create an empty table, with the action "Open bug example tabular editor"
2/ Drop an EClass in the table  (all its columns are hidden by the customization of my example)
3/ Delete the line with your element
4/ the hidden columns appears and I get an exception
Comment 4 Gregoire Dupe CLA 2011-06-14 10:32:24 EDT
(In reply to comment #3)
> (In reply to comment #2)
> This plugin allows to reproduce this bug : Steps to reproduce : 
> 1/ Create an empty table, with the action "Open bug example tabular editor"
> 2/ Drop an EClass in the table  (all its columns are hidden by the
> customization of my example)
> 3/ Delete the line with your element
> 4/ the hidden columns appears and I get an exception

I'm not able to reproduce this bug since the commit of the bug 346465. We can then mark this bug has fixed.
Comment 5 Gregoire Dupe CLA 2012-05-22 10:08:32 EDT
This bug can be closed.