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

Bug 345665

Summary: Columns are duplicated when you drop many elements in the same time
Product: z_Archived Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: EMF-FacetAssignee: Gregoire Dupe <gdupe>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: emft.facet-inbox, gdupe, nicolas.bros
Version: unspecifiedFlags: gdupe: indigo+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 334240    
Attachments:
Description Flags
Patch for Bug 345665
gdupe: iplog+
Patch for Bug 345665 Unit test gdupe: iplog+

Description Vincent Lorenzo CLA 2011-05-12 16:36:18 EDT
Steps to reproduce : you can use the Ecore Model of your example : 
	1/ select the EPackage of your model and choose "Open Ecore Tabular Editor"
	2/ create 2 EPackage in your model
	3/ select these 2 packages
	4/ drop these 2 packages in the same time in your table
		-> the new columns (eClassifiers, e	FactoryInstance, ...) are duplicated in the table
Comment 1 Nicolas Guyomar CLA 2011-05-17 03:53:33 EDT
Created attachment 195814 [details]
Patch for Bug 345665

Hi,

The problem was that we only checked whether the added EStructuralFeature column was already declared in the table.

I've added a test so that when we add several object with the same EStructuralFeature only one column is created.

(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-17 03:55:50 EDT
Created attachment 195815 [details]
Patch for Bug 345665 Unit test

Hi,

Please find attached a contribution to NatTableAPITests.addRowsTest() to add the verification that columns are not duplicated when we add several object with the same EStructuralFeature

(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 3 Gregoire Dupe CLA 2011-05-17 04:12:00 EDT
Comment on attachment 195814 [details]
Patch for Bug 345665

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 660.

A non-regression unit test has to be developed before to close this bug.
Comment 4 Gregoire Dupe CLA 2011-05-17 04:17:00 EDT
Comment on attachment 195815 [details]
Patch for Bug 345665 Unit test

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 661.
Comment 5 Gregoire Dupe CLA 2011-05-17 04:17:48 EDT
This bug can be marked as fixed.

Regards,
Gregoire Dupe
Comment 6 Vincent Lorenzo CLA 2011-06-09 04:47:04 EDT
This bug can be marked as closed