Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Issue with -clearPersistedState option
Issue with -clearPersistedState option [message #1784082] Thu, 22 March 2018 10:14 Go to next message
Kiran Hariyapuraju is currently offline Kiran HariyapurajuFriend
Messages: 4
Registered: March 2018
Junior Member
Hi all,

When we launch an e4 RCP application from eclipse, open a few Parts, close it and re-launch the application, we could see that the previous state is not stored and the earlier opened Parts/Views are closed by default. We found that in an RCP 3.x application, the state can be persisted by setting

IWorkBenchConfigurer.setSaveAndRestore(true);

As per our research and understanding, the same can be achieved in RCP 4.x application by removing the
"-clearPersistedState" argument from the .product file.

When we try this, the application itself is not being launched and no errors are seen in the console.

So my queries here are,

1) Is removing "-clearPersistedState" the correct solution to make eclipse application restore its previous state or is there any other?
2) Any specific reason as to why the application is not being launched when this argument is removed? We did try to debug this but couldn't see any errors
Re: Issue with -clearPersistedState option [message #1784786 is a reply to message #1784082] Wed, 04 April 2018 07:48 Go to previous message
py e4 is currently offline py e4Friend
Messages: 9
Registered: June 2016
Junior Member
Kiran Hariyapuraju wrote on Thu, 22 March 2018 10:14
Hi all,
...
1) Is removing "-clearPersistedState" the correct solution to make eclipse application restore its previous state or is there any other?
2) Any specific reason as to why the application is not being launched when this argument is removed? We did try to debug this but couldn't see any errors


1. I would say yes. make sure you don't have "persistState=false" somewhere.
see https://wiki.eclipse.org/Eclipse4/RCP/FAQ#How_can_I_prevent_my_workbench_model_from_being_saved_on_exit.3F

2. more likely something specific to your app. you should try stepping through it from eclipse ... you can also have a look to the .xmi file where the state is persisted.
Previous Topic:E4 Dependeny Incjection of OSGi services Lifecycle handling
Next Topic:focus behaviour changed on PartState.ACTIVATE in 4.7
Goto Forum:
  


Current Time: Fri Nov 16 04:12:45 GMT 2018

Powered by FUDForum. Page generated in 0.03252 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top