i devoloping application eclipse rcp. application should alwaysshow perspective when started. application saves workbench state , when restarted shows same perspective had when closed. tried add
public void initialize(iworkbenchconfigurer configurer){ configurer.setsaveandrestore(false); }
to applicationworkbenchadvisor
class, did'nt work. thought of selection right perspective, don't know add such piece of code.
how can application show same perspective on startup?
i found out if want same start perspective, can set default perspective during startup.
public class application implements iapplication { public object start(iapplicationcontext content){ platformui.getworkbench().getperspectiveregistry().setdefaultperspective("youperspective here"); //other code... } //other code... }
update: works if enable "clear workspace" in run configurations. current solution delete workbench file during program startup.
Comments
Post a Comment