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

Bug 368192

Summary: Need to persist information in a window but only contributions have a persisted state map
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, dean.t.roberts, kai.toedter, Lars.Vogel, tom.schindl
Version: 4.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 320478, 366042    

Description Remy Suen CLA 2012-01-09 14:50:15 EST
I wanted to the workbench window's input for bug 366042 but then realized that this was not possible in the current version of our model.
Comment 1 Eric Moffatt CLA 2012-01-09 15:52:00 EST
This seems to be something we could expect EAP users to want as well. 

Currently, 'persistentData' is an attribute of MContribution in order to allow contributions to store their internal state (a la a View's memento). If we allow this we should likely bite the bullet and make this a generally available feature (i.e. allow it not just for MWindows but for everything).

I can see two aproaches:

1) Move the current 'persistentData' attribute under ApplicationElement (I was going to say MUIEelment but MAddons are *not* MUIElements but do need persistent state).

2) Provide PersistentData as a mix-in and decide who needs it.

Right now I'm leaning towards 1) for symmetry's sake.
Comment 2 Kai Toedter CLA 2012-01-10 01:53:05 EST
+1 for 1)
Comment 3 Thomas Schindl CLA 2012-01-10 03:15:05 EST
+1 for number 1)
Comment 4 Lars Vogel CLA 2012-01-12 00:16:06 EST
+1 for 1)
Comment 5 Dean Roberts CLA 2012-01-30 10:24:23 EST
Moved persistedState from Contribution to ApplicationElement as discussed.

As expected, persisted workbench state appears to be reconstituted in new location fine without any required migration code in reconciler.

Commit is http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ed0b857cf059faf90e52ea5e208fa4ce9628093a