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

Bug 343859

Summary: The local customizations are not applied when we reopen a table
Product: z_Archived Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: EMF-FacetAssignee: Gregoire Dupe <gdupe>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emft.facet-inbox
Version: unspecifiedFlags: gdupe: indigo+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 341238    
Attachments:
Description Flags
This patch adds asserts which allow to prove the bug. It doesn't resolve it! gdupe: iplog+, gdupe: review+

Description Vincent Lorenzo CLA 2011-04-26 10:40:08 EDT
The local customization are stored in the fields localCustomization AND in customizations.
Sometimes, the save action is not correctly done -> when we re-open the table, the local customizations are not applied.
To get this bad state, we need to apply "external" customization on the table.

Step to reproduce the bugs : 
	1/Create a table
	2/Apply a customization on the table
	3/Save and close the table
	4/Open the table -> in the Load Customization Dialog, you can see that the local customizations are unloaded!
	
If we open the table in text mode, we notice that the path for local customizations is not correct : 
  <customizations href="/testTable/withTable.table#//@localCustomizations.0"/>
  <customizations href="/testTable/withTable.table#//@localCustomizations.1"/>
  <customizations href="emffacet:/customization/testCustomization#/"/>
  instead of 
  <customizations href="#//@localCustomizations.0"/>
  <customizations href="#//@localCustomizations.1"/>
  <customizations href="emffacet:/customization/testCustomization#/"/>

 FYI, if you do :
 	1/Create a table
	2/Save and close the table
	3/Open an Apply a customization on the table
	4/Save the table
	5/Open the table -> you don't have the problem
		6/ if you "Save As" your table -> you get bad paths for the local customizations
Comment 1 Vincent Lorenzo CLA 2011-04-27 07:19:53 EDT
Created attachment 194142 [details]
This patch adds asserts which allow to prove the bug. It doesn't resolve it!

(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 2 Gregoire Dupe CLA 2011-05-09 11:48:06 EDT
Comment on attachment 194142 [details]
This patch adds asserts which allow to prove the bug. It doesn't resolve it!

Here is a patch smaller that 250 lines (32 lines), no CQ is then needed.

I've committed this patch.

Committed revision 639.
Comment 3 Gregoire Dupe CLA 2011-05-09 11:49:27 EDT
I've fixed this bug by using "URI.createPlatformResourceURI" instead of "URI.createFileURI" to avoid XMI serialization problems.

Regards,
Gregoire Dupe
Comment 4 Vincent Lorenzo CLA 2011-05-10 03:41:39 EDT
This bug can be marked as closed