Bug 573869

Summary: e4 Lifecycle handler should allow to set clearPersistedState
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.17   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Lars Vogel CLA 2021-05-31 07:26:28 EDT
Currently the E4Application "only" uses the arguments of the application to dtermine if the model should be cleaned. Would be nice it we could allow the LifeCycle handler to set this in the content.

Current implementation:

// Persisted state
Boolean clearPersistedState = getArgValue(IWorkbench.CLEAR_PERSISTED_STATE, appContext, true).map(Boolean::parseBoolean).orElse(Boolean.FALSE);

To allow the lifeycycle handler to change this, we should check first in the context before consulting the arguments.