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

Bug 355099

Summary: deltaRestore needs to save and restore new cloneable snippets
Product: [Eclipse Project] Platform Reporter: Dean Roberts <dean.t.roberts>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: emoffatt, remy.suen
Version: 4.1   
Target Milestone: 4.2 M2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 339130    
Attachments:
Description Flags
Enable deltaRestore for clonableSnippets none

Description Dean Roberts CLA 2011-08-18 11:17:41 EDT
Clonable Snippets where added to MApplicationElement to support saving custom perspectives.

This model part needs to be saved and restored as part of the deltaRestore process.

Until this happens saved perspectives will only work if Eclipse is started with the command line argument -deltaRestore false
Comment 1 Dean Roberts CLA 2011-08-30 11:15:52 EDT
Created attachment 202430 [details]
Enable deltaRestore for clonableSnippets

Changes so clonableSnippets participate in deltaRestore.

This patch seems to work for me.

With no changes, it appears that delta restore was half saving the change, but the value was null causing a null pointer exception on startup when restarting a workspace that had a previous save perspective.

The only thing this patch does is make sure that clonableSnippets is recognized as a chained, and saving seems to work now.

Is anybody surprised that, with no changes, the save was half working?  Is this intended behaviour or should something more rational have been happenging in that case?
Comment 2 Remy Suen CLA 2011-09-02 09:25:32 EDT
(In reply to comment #1)
> Created attachment 202430 [details]
> Enable deltaRestore for clonableSnippets

Fix pushed to R4_development. Thanks, Dean!
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=d2a6aedea222ef6458553447378b81ac570c13a9

I have opened bug 356592 for tracking tests related to the persistence of the clonable snippets list.
Comment 4 Dean Roberts CLA 2011-09-15 13:40:46 EDT
Verified with I20110705-1340 by exercising the save perspective code.
Comment 5 Dean Roberts CLA 2011-09-15 13:48:23 EDT
Cut and paste error in previous comment.

This was verified in I20110915-0200