Juri Strumpflohner
Juri Strumpflohner Juri is a full stack developer and tech lead with a special passion for the web and frontend development. He creates online videos for Egghead.io, writes articles on his blog and for tech magazines, speaks at conferences and holds training workshops. Juri is also a recognized Google Developer Expert in Web Technologies

Persisting the current perspective state of an RCP

1 min read

If you're developing on Eclipse RCP applications it may be interesting to save the perspective layout and open views of the user s.t. when he launches the application the next time, everything looks as before. That may sound difficult but actually it is really simple.
In your ApplicationWorkbenchAdvisor.java, in the initialize(IWorkbenchConfigurer) just write the following:

public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {

public void initialize(IWorkbenchConfigurer configurer) {

This should work fine. In case it doesn't, try to get the WorkbenchConfigurer by calling the method getWorkbenchConfigurer() and invoke the setSaveAndRestore(...) on that.
Questions? Thoughts? Hit me up on Twitter
comments powered by Disqus