Bug 573869 - e4 Lifecycle handler should allow to set clearPersistedState
Summary: e4 Lifecycle handler should allow to set clearPersistedState
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.17   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-31 07:26 EDT by Lars Vogel CLA
Modified: 2021-05-31 07:26 EDT (History)
0 users

See Also:


Attachments

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