Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343859 - The local customizations are not applied when we reopen a table
Summary: The local customizations are not applied when we reopen a table
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 341238
  Show dependency tree
 
Reported: 2011-04-26 10:40 EDT by Vincent Lorenzo CLA
Modified: 2020-05-01 11:26 EDT (History)
1 user (show)

See Also:
gdupe: indigo+


Attachments
This patch adds asserts which allow to prove the bug. It doesn't resolve it! (1.46 KB, patch)
2011-04-27 07:19 EDT, Vincent Lorenzo CLA
gdupe: iplog+
gdupe: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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